/* call.agor.me. Tokens copied from public/styles.css (sampled from agor.me/REFERENCE.md):
   dark only, one accent, type 48 / 20 / 16, spacing 4 8 12 16 20 24 32 40 48,
   radii 8 inputs, 12 buttons, 16 cards. */
:root {
  --bg: #050508;
  --fg: #EDEDED;
  --card: #0C0C12;
  --secondary: #1A1A24;
  --border: #1F1F2E;
  --muted: #A1A1AA;
  --prose: #D1D5DB;
  --violet: #8B5CF6;
  --grad: linear-gradient(90deg, #D946EF 0%, #8B5CF6 50%, #3B82F6 100%);
  --r-input: 8px; --r-btn: 12px; --r-card: 16px; --r-panel: 24px;
  --font: Geist, "Geist Fallback", Arial, Helvetica, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { min-height: 100dvh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.pad { padding-top: 16px; padding-bottom: 24px; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.b { font-weight: 700; }
.sm { font-size: 16px; color: var(--muted); }

/* header + tabs */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.word { font-weight: 700; font-size: 20px; line-height: 1; white-space: nowrap; }
.word .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sync { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-btn); background: var(--secondary); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sync.ok .dot { background: var(--violet); }
.sync.pending { color: var(--fg); }
.sync.pending .dot { background: var(--fg); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { min-height: 56px; display: grid; place-items: center; text-decoration: none; color: var(--muted); font-weight: 600; }
.tabs a.on { color: var(--fg); box-shadow: inset 0 2px 0 var(--violet); }

/* blocks */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.card h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.meta { color: var(--muted); }
.hook { color: var(--prose); }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--secondary); color: var(--prose); font-size: 16px; line-height: 1; white-space: nowrap; }
.pill.hot { border-color: var(--violet); color: var(--fg); }
.pill.now { background: var(--violet); border-color: var(--violet); color: #fff; }
.script { white-space: pre-wrap; color: var(--prose); background: var(--secondary); border-radius: var(--r-input); padding: 12px; margin: 0; }
details > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--muted); }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--border); background: var(--secondary); color: var(--fg); text-decoration: none; font-weight: 600; }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 56px; font-size: 20px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.oc { min-height: 48px; padding: 0 8px; border-radius: var(--r-btn); border: 1px solid var(--border); background: var(--secondary); color: var(--fg); font-weight: 600; font-size: 16px; line-height: 1.2; }
.oc.good { border-color: var(--violet); }
.oc.sel { background: var(--violet); border-color: var(--violet); color: #fff; }
.grid2.neg { margin-top: 16px; }
.toast .undo { margin-left: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-btn); border: 1px solid var(--violet); background: transparent; color: var(--fg); font-weight: 700; }
/* While dialling, the tab bar is hidden so a resting thumb cannot navigate away mid-call. */
body.dialing .tabs { display: none; }
body.dialing { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body.dialing .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
label { display: block; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px; border-radius: var(--r-input); border: 1px solid var(--border); background: var(--bg); color: var(--fg); }
textarea { min-height: 80px; resize: vertical; }

/* today header */
.goal { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.goal .n { font-size: 20px; font-weight: 700; }
.bar { height: 4px; border-radius: 4px; background: var(--secondary); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--grad); }
.timer { font-variant-numeric: tabular-nums; }

/* pipeline board */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.col { flex: 0 0 280px; scroll-snap-align: start; }
.col h3 { margin: 0 0 8px; font-size: 16px; display: flex; justify-content: space-between; }
.mini { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 12px; margin-bottom: 8px; }
.mini .meta { display: block; }

/* map */
#map { height: calc(100dvh - 56px - 64px - 140px); min-height: 320px; border-radius: var(--r-card); border: 1px solid var(--border); }
.leaflet-container { background: var(--card); font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--fg); border: 1px solid var(--border); }

/* stats */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 8px 4px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-btn); overflow: hidden; }
.seg button { min-height: 40px; padding: 0 16px; background: var(--secondary); border: 0; color: var(--muted); }
.seg button.on { background: var(--violet); color: #fff; }

/* detail */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.preview { width: 100%; height: 480px; border: 1px solid var(--border); border-radius: var(--r-input); background: #fff; }

/* sheet + toast */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 8, .8); display: flex; align-items: flex-end; }
.sheet-in { width: 100%; max-height: 88dvh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-panel) var(--r-panel) 0 0; padding-top: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 60; max-width: 528px; margin: 0 auto; background: var(--secondary); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 12px 16px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
