@font-face{font-family:"Marcellus";src:url(/fonts/marcellus-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url(/fonts/source-sans-3-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url(/fonts/source-sans-3-latin-600-normal.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url(/fonts/source-sans-3-latin-700-normal.woff2) format("woff2");font-weight:700 800;font-display:swap}

:root{
  --bg:#faf7f0; --paper:#fffdf8; --ink:#26302c; --muted:#6c6a63; --line:#e6e0d3;
  --sage:#5e8073; --sage-d:#47665a; --sage-l:#e4eee9;
  --bluff:#a8443e; --bluff-l:#f6e6e2;
  --serif:"Marcellus",Georgia,serif;
  --sans:"Source Sans 3",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.45 var(--sans)}
body{min-height:100dvh}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--sage);outline-offset:2px}
.hidden{display:none!important}
.ico{width:22px;height:22px;flex:none}

main{max-width:520px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 110px);min-height:100dvh;display:flex;flex-direction:column}

/* ---------- Startsidan ---------- */
.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.iconbtn{border:1px solid var(--line);background:var(--paper);border-radius:12px;width:44px;height:44px;display:grid;place-items:center;color:var(--muted)}
.brand{text-align:center;margin:6px 0 22px}
.brand img{width:76px;height:76px;display:block;margin:0 auto 4px}
.brand h1{font:400 46px/1 var(--serif);margin:0;letter-spacing:.5px}
.brand p{margin:6px 0 0;color:var(--muted)}

section{margin-bottom:22px}
section h2{font:400 21px/1.2 var(--serif);margin:0 0 4px}
section .sub{margin:0 0 10px;color:var(--muted);font-size:15px}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:4px;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:7px 8px 7px 14px;font-weight:600}
.chip button{border:0;background:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.chip button:hover{background:var(--bluff-l);color:var(--bluff)}
.addrow{display:flex;gap:8px;margin-top:10px}
.addrow input{flex:1;min-width:0;border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px 14px}
.msg{color:var(--bluff);font-size:15px;margin:6px 2px 0;min-height:1em}

.cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.cat{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid var(--line);background:var(--paper);border-radius:14px;padding:11px 12px;font-weight:600;line-height:1.2;min-height:54px}
.cat .e{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--sage-l);color:var(--sage);flex:none}
.cat[aria-pressed="true"] .e{background:var(--sage);color:#fff}
.catlbl{display:inline-flex;align-items:center;gap:6px}
.catlbl .ico{width:18px;height:18px}
.cat[aria-pressed="true"]{background:var(--sage-l);border-color:var(--sage);color:var(--sage-d)}
.linkrow{display:flex;gap:14px;margin-top:8px}
.link{border:0;background:none;color:var(--sage-d);font-weight:600;padding:4px 0;text-decoration:underline;text-underline-offset:3px}

.seg{display:flex;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:4px;gap:4px;overflow-x:auto}
.seg button{flex:1;border:0;background:none;border-radius:10px;padding:10px 8px;font-weight:600;white-space:nowrap;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--sage);color:#fff}
.seg button:disabled{opacity:.35;cursor:not-allowed}

.toggle{display:flex;gap:14px;align-items:flex-start;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:13px 14px;margin-bottom:8px;width:100%;text-align:left}
.toggle b{display:block;font-weight:600}
.toggle small{display:block;color:var(--muted);font-size:14.5px;line-height:1.35;margin-top:2px}
.sw{flex:none;width:46px;height:28px;border-radius:999px;background:var(--line);position:relative;margin-top:2px;transition:background .15s}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.toggle[aria-pressed="true"] .sw{background:var(--sage)}
.toggle[aria-pressed="true"] .sw::after{transform:translateX(18px)}

.dock{position:fixed;left:0;right:0;bottom:0;padding:28px 18px calc(env(safe-area-inset-bottom) + 14px);background:linear-gradient(rgba(250,247,240,0),var(--bg) 26px)}
.dock .inner{max-width:484px;margin:0 auto}
.dock .why{text-align:center;color:var(--muted);font-size:14.5px;margin:0 0 8px}

.btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;border:0;border-radius:16px;padding:17px 20px;font-weight:700;font-size:18px;background:var(--ink);color:#fff}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.sage{background:var(--sage)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.small{padding:12px 16px;font-size:16px;width:auto}
.btns{display:flex;flex-direction:column;gap:10px}

/* ---------- Utdelning ---------- */
.stage{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:18px}
.bar{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:15px}
.progress{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}
.progress i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.progress i.done{background:var(--sage)}
.progress i.now{background:var(--ink)}

.handover h2{font:400 34px/1.15 var(--serif);margin:0}
.handover p{margin:0;color:var(--muted)}

.card{--c:#cfe0d8;position:relative;width:min(84vw,340px);aspect-ratio:3/4;border-radius:26px;background:var(--c);
  box-shadow:0 1px 0 rgba(0,0,0,.04),0 18px 40px -22px rgba(38,48,44,.45);user-select:none;-webkit-user-select:none;
  touch-action:none;-webkit-touch-callout:none;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:26px;overflow:hidden}
.card .who{font:400 30px/1.1 var(--serif);margin:0 0 6px;word-break:break-word}
.card .cover,.card .face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:26px;transition:opacity .12s}
.card .face{opacity:0;background:var(--paper)}
.card.open .face{opacity:1}
.card.open .cover{opacity:0}
.card .mask{width:120px;height:120px;opacity:.85}
.card .press{margin-top:auto;font-weight:600;display:flex;align-items:center;gap:8px}
.card .pattern{position:absolute;inset:14px;border:1.5px dashed rgba(38,48,44,.22);border-radius:18px;pointer-events:none}
.face .label{color:var(--muted);font-size:15px;margin:0 0 6px}
.face .word{font:400 40px/1.1 var(--serif);margin:0;word-break:break-word}
.face .cat-l{margin-top:14px;color:var(--muted);font-size:15px}
.face.bluff{background:var(--bluff);color:#fff}
.face.bluff .label,.face.bluff .cat-l{color:rgba(255,255,255,.8)}
.face.bluff .word{font-size:34px}
.face .hint{margin-top:16px;background:rgba(255,255,255,.16);border-radius:12px;padding:8px 14px;font-size:17px}

/* ---------- Diskussion ---------- */
.talk h2{font:400 32px/1.15 var(--serif);margin:0}
.talk .starter{font-size:19px;margin:0}
.talk .starter b{background:var(--sage-l);color:var(--sage-d);padding:2px 8px;border-radius:8px}
.clock{position:relative;width:220px;height:220px}
.clock svg{width:100%;height:100%;transform:rotate(-90deg)}
.clock circle{fill:none;stroke-width:10}
.clock .track{stroke:var(--line)}
.clock .arc{stroke:var(--sage);stroke-linecap:round;transition:stroke-dashoffset .5s linear}
.clock.low .arc{stroke:var(--bluff)}
.clock .t{position:absolute;inset:0;display:grid;place-items:center;font:400 52px/1 var(--serif);font-variant-numeric:tabular-nums}
.clock.over .t{color:var(--bluff);font-size:30px}
.tips{color:var(--muted);font-size:15.5px;max-width:330px;margin:0}

/* ---------- Avslöjande ---------- */
.reveal .lbl{color:var(--muted);margin:0}
.reveal .names{font:400 34px/1.15 var(--serif);margin:2px 0 0}
.reveal .theword{font:400 44px/1.1 var(--serif);color:var(--bluff);margin:2px 0 0}
.reveal hr{width:120px;border:0;border-top:1px solid var(--line);margin:6px auto}
.reveal .note{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:12px 14px;color:var(--muted);font-size:15.5px;max-width:340px}

/* ---------- Dialog ---------- */
.modal{position:fixed;inset:0;z-index:50;background:rgba(38,48,44,.42);display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);width:100%;max-width:520px;max-height:88dvh;overflow:auto;border-radius:24px 24px 0 0;padding:22px 20px calc(env(safe-area-inset-bottom) + 20px);animation:up .22s ease-out}
.sheet h2{font:400 26px/1.2 var(--serif);margin:0 0 12px}
.sheet ol{padding-left:22px;margin:0 0 16px}
.sheet li{margin-bottom:9px}
.sheet p{margin:0 0 14px}
.sheet .row2{display:flex;gap:10px}
.sheet .row2 .btn{flex:1}
@keyframes up{from{transform:translateY(30px);opacity:0}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media (min-width:600px){.modal{align-items:center}.sheet{border-radius:24px}}
