/* One-screen phone app: a deck of name cards, Dutch orange meets Valencian naranja on a sea-mist ground. */
:root {
  --bg: #EAF0F2;
  --surface: #FFFFFF;
  --surface-2: #F4F7F8;
  --ink: #14233A;
  --muted: #5A6A7D;
  --line: #D3DCE2;
  --accent: #DD6B25;
  --accent-ink: #FFFFFF;
  --yes: #2D8757;
  --no: #B5445A;
  --maybe: #B98A12;
  --shadow: 0 18px 40px -18px rgba(20, 35, 58, .35);
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1623; --surface: #172236; --surface-2: #1D2A41; --ink: #E7EDF4; --muted: #95A5B9; --line: #2A3851;
    --accent: #F0873F; --accent-ink: #1A0E05; --yes: #4DB27E; --no: #E36D82; --maybe: #E2B543;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1623; --surface: #172236; --surface-2: #1D2A41; --ink: #E7EDF4; --muted: #95A5B9; --line: #2A3851;
  --accent: #F0873F; --accent-ink: #1A0E05; --yes: #4DB27E; --no: #E36D82; --maybe: #E2B543;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  padding-inline: 16px; padding-block: 0;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.app { max-width: 460px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 14px; padding-block: 14px 20px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; line-height: 1.1; }
.brand span { color: var(--accent); }
.who { font-size: 13px; color: var(--muted); text-align: right; }
.who button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.tabs button { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-weight: 600; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }

.panel { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; }

.progress { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.deck { position: relative; height: min(440px, 58vh); min-height: 340px; }
.card {
  position: absolute; inset: 0; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px;
  touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform;
}
.card.next { transform: scale(.95) translateY(14px); opacity: .7; pointer-events: none; }
.card.top { cursor: grab; }
.card.top:active { cursor: grabbing; }
.card.fly { transition: transform .32s ease-in, opacity .32s ease-in; }
.card.snap { transition: transform .25s cubic-bezier(.2,.9,.3,1.2); }
.round-tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.name { font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 16vw, 76px); line-height: .95; letter-spacing: -.03em; overflow-wrap: anywhere; }
.full { font-size: 15px; color: var(--muted); margin-top: -6px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; }
.stress { font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; }
.why { margin-top: auto; font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }
.stamp {
  position: absolute; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: .04em;
  border: 4px solid currentColor; border-radius: 10px; padding: 2px 12px; opacity: 0; pointer-events: none;
}
.stamp.yes { color: var(--yes); top: 24px; right: 20px; transform: rotate(12deg); }
.stamp.no { color: var(--no); top: 24px; right: 20px; transform: rotate(-12deg); }
.stamp.maybe { color: var(--maybe); bottom: 24px; left: 50%; transform: translateX(-50%) rotate(-4deg); font-size: 24px; }

.actions { display: flex; justify-content: center; align-items: center; gap: 18px; }
.act {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid currentColor; background: var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .12s;
}
.act:active { transform: scale(.92); }
.act svg { width: 28px; height: 28px; }
.act.no { color: var(--no); }
.act.yes { color: var(--yes); }
.act.maybe { color: var(--maybe); width: 52px; height: 52px; }
.act.maybe svg { width: 22px; height: 22px; }
.act.undo { color: var(--muted); width: 42px; height: 42px; border-width: 1.5px; box-shadow: none; }
.act.undo svg { width: 18px; height: 18px; }
.act:disabled { opacity: .35; cursor: default; }
.hint { text-align: center; font-size: 12px; color: var(--muted); }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.box h2, .box h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.box h2 { font-size: 24px; line-height: 1.15; }
.box h3 { font-size: 17px; }
.box p { margin: 0; }
.muted { color: var(--muted); }
.cta { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 600; font-size: 15px; }
.cta:disabled { opacity: .5; cursor: default; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-weight: 600; }
.thinking { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite alternate; flex: none; }
@keyframes pulse { from { opacity: .3; transform: scale(.8); } to { opacity: 1; transform: scale(1.1); } }
.error { color: var(--no); font-size: 14px; }

.section-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 4px 0 -4px; display: flex; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-display); font-weight: 700; font-size: 18px; padding: 6px 14px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); }
.chip.match { border-color: var(--yes); color: var(--yes); font-size: 22px; padding: 8px 18px; }
.chip small { font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; }
.empty-note { font-size: 14px; color: var(--muted); }

.rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .rn { font-family: var(--font-display); font-weight: 700; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.row .rn small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--muted); }
.seg { display: flex; gap: 4px; flex: none; }
.seg button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.on.ja { background: var(--yes); border-color: var(--yes); color: #fff; }
.seg button.on.nee { background: var(--no); border-color: var(--no); color: #fff; }
.seg button.on.misschien { background: var(--maybe); border-color: var(--maybe); color: #fff; }

.analysis .who-line { font-size: 13px; color: var(--muted); }
.analysis .tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); }
.tag.plus { border-color: var(--yes); color: var(--yes); }
.tag.min { border-color: var(--no); color: var(--no); }
.analysis h4 { margin: 4px 0 -6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick button { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 26px 10px; font-family: var(--font-display); font-weight: 800; font-size: 28px; }
.pick button:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .card.fly, .card.snap, .bar i { transition: none; }
  .dot { animation: none; }
}
.login { display: flex; flex-direction: column; gap: 10px; }
.login input { font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); }
.login input:focus { outline: none; border-color: var(--accent); }
body { margin: 0; -webkit-tap-highlight-color: transparent; }
.app { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
