:root { --unit:clamp(14px,2.4vmin,24px); --card:#fff; --right:#1f8a6f; --wrong:#c0502a; }
* { box-sizing:border-box; }
html,body { height:100%; margin:0; }
body { font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; font-size:var(--unit); color:var(--ink); background:var(--bg);
  touch-action:manipulation; overscroll-behavior:none; -webkit-user-select:none; user-select:none; -webkit-tap-highlight-color:transparent; }
.app { min-height:100dvh; max-width:1000px; margin:0 auto; display:flex; flex-direction:column; gap:var(--unit);
  padding:calc(var(--unit) + env(safe-area-inset-top)) calc(var(--unit) + env(safe-area-inset-right)) calc(var(--unit) + env(safe-area-inset-bottom)) calc(var(--unit) + env(safe-area-inset-left)); }
/* Kotten, Skolappar's home button, floats top left: the bar starts to the right of it and the screens below it */
.bar { display:flex; align-items:center; gap:var(--unit); min-height:calc(80px - var(--unit)); padding-left:max(0px,calc(88px - var(--unit))); }
.bar .score { margin-left:auto; font-weight:700; }
button { font:inherit; color:inherit; border:0; border-radius:16px; min-height:48px; padding:0 1.1em; cursor:pointer; }
.back,.icon { background:#fff; box-shadow:0 2px 0 #0002; }
.icon { min-width:48px; padding:0; font-size:1.2em; }
.primary { background:var(--accent); color:#fff; font-weight:700; box-shadow:0 3px 0 #0003; }
.secondary { background:var(--brand); color:#fff; font-weight:600; box-shadow:0 3px 0 #0004; }
button:active { transform:translateY(2px); box-shadow:none; }
button:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.screen { display:flex; flex-direction:column; gap:calc(var(--unit)*.8); }
.screen[hidden] { display:none; }
h1 { margin:.2em 0 0; font-size:2.8em; color:var(--brand); }
h2 { margin:0; font-size:1.7em; color:var(--brand); }
.lead { margin:0; font-size:1.25em; }
.fine { margin:0; font-size:.75em; opacity:.7; }
.stations { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr)); gap:var(--unit); }
.station { background:var(--card); border-radius:22px; padding:1em; min-height:8.5em; display:flex; flex-direction:column; align-items:flex-start; gap:.25em; text-align:left; box-shadow:0 4px 0 #0001,0 1px 8px #0001; position:relative; }
.station .emoji { font-size:2em; }
.station b { font-size:1.25em; }
.station small { opacity:.75; }
.station i { position:absolute; right:.8em; top:.7em; font-style:normal; }
.task,.question { margin:0; font-size:1.2em; line-height:1.4; }
.question { font-size:1.35em; font-weight:600; }
.row { display:flex; flex-wrap:wrap; align-items:center; gap:.7em; }
.choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr)); gap:.6em; }
.choices button { background:#fff; box-shadow:0 3px 0 #0002; text-align:left; padding:.6em 1em; min-height:56px; line-height:1.3; }
.choices button.right { background:#d8f2e8; box-shadow:0 3px 0 var(--right); }
.choices button.wrong { background:#f8ddd2; box-shadow:0 3px 0 var(--wrong); }
.feedback { margin:0; min-height:2.6em; font-size:1.05em; line-height:1.4; }
.feedback.ok { color:var(--right); }
.feedback.no { color:var(--wrong); }
.count { font-size:.6em; opacity:.6; font-weight:600; }
.done { grid-column:1/-1; font-size:1.3em; line-height:1.8; }
/* the result's buttons sit inside .choices: keep them coloured */
.choices .done button { text-align:center; min-height:48px; padding:0 1.1em; }
.choices .done .primary { background:var(--accent); color:#fff; box-shadow:0 3px 0 #0003; }
.choices .done .secondary { background:var(--brand); color:#fff; box-shadow:0 3px 0 #0004; }
.stage { background:#fff; border-radius:22px; padding:1em; box-shadow:0 1px 8px #0001; display:flex; flex-direction:column; align-items:center; gap:.6em; }
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }

:root { --bg:#fff8ee; --ink:#2b2116; --brand:#7a4a22; --accent:#e2683b; }
.field { position:relative; background:#e9f6df; border-radius:24px; overflow:hidden; box-shadow:inset 0 0 0 4px #fff, 0 2px 10px #0001; }
.field canvas { display:block; width:100%; height:clamp(260px, 60dvh, 125vw); touch-action:none; }
.hud { min-height:1.6em; font-weight:600; }
.hud .bead { display:inline-block; width:1.1em; height:1.1em; border-radius:50%; vertical-align:-.2em; margin:0 .05em; box-shadow:inset -2px -3px 0 #0002; }
.hello { display:flex; align-items:center; gap:1em; }
.hello img { width:min(30vw,150px); height:auto; }
.result-kotten { display:block; width:7em; height:auto; margin:0 auto .3em; }
.credit { font-size:.65em; opacity:.6; }

/* Kort rad i sidfoten + fullständiga licenser i hopfälld rad */
.rost-attribution p { margin:0; }
.rost-attribution .rost-licens { margin-top:2px; }
.rost-attribution summary { cursor:pointer; }
