/* Web Dúshlán an Lae — the iPhone app's look, for the browser.
   Same palette (lib/app/theme.dart), Fredoka, and the "Chunky" physical tile:
   2px border + a solid 4px shadow that disappears as the tile sinks when pressed. */
:root {
  --cream: #fbf7f1; --paper: #fff; --ink: #2a211c; --ink-soft: #6e625a; --line: #ede2d4;
  --brand: #f26a3d; --brand-dark: #c9502a; --brand-soft: #ffe4d6;
  --green: #1f9d55; --green-dark: #167a41; --mint: #cdefd9;
  --coral: #e5484d; --coral-soft: #fde2e1;
  --gold: #f4b53f; --gold-soft: #ffedc4;
  --ts: 1;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); }
body { font-family: Fredoka, system-ui, sans-serif; font-variation-settings: "wght" 450; -webkit-font-smoothing: antialiased; overflow-x: hidden; user-select: none; -webkit-user-select: none; }
body.big { --ts: 1.15; }
button { font: inherit; color: inherit; }
.w6 { font-variation-settings: "wght" 600; font-weight: 600; } .w7 { font-variation-settings: "wght" 700; font-weight: 700; }

.page { max-width: 560px; margin: 0 auto; padding: 12px 16px 40px; min-height: 100svh; display: flex; flex-direction: column; }

/* chunky tile */
.chunky { display: flex; align-items: center; justify-content: center; text-align: center; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line); padding: 14px 16px; cursor: pointer; transition: transform .09s ease-out, box-shadow .09s ease-out, background .2s, border-color .2s; margin-bottom: 4px; }
.chunky:active, .chunky.down { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.chunky[disabled] { cursor: default; }
.chunky.right { background: var(--mint); border-color: var(--green); box-shadow: 0 4px 0 var(--green); color: var(--green-dark); }
.chunky.wrong { background: var(--coral-soft); border-color: var(--coral); box-shadow: 0 4px 0 var(--coral); color: var(--coral); }
.chunky.sel { background: var(--gold-soft); border-color: var(--gold); box-shadow: 0 4px 0 var(--gold); }
.chunky.faded { opacity: .35; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.logo b { font-variation-settings: "wght" 700; font-size: 30px; color: var(--brand); letter-spacing: -.01em; line-height: 1; }
.logo small { display: block; font-size: 13px; color: var(--ink-soft); }
.iconbtn { width: 44px; height: 44px; padding: 0; border-radius: 14px; font-size: 18px; }

/* landing */
.hero { position: relative; background: var(--brand); color: #fff; border-radius: 26px; padding: 26px 22px 24px; box-shadow: 0 6px 0 var(--brand-dark); overflow: hidden; }
.hero .kick { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .9; font-variation-settings: "wght" 600; }
.hero h1 { margin: 8px 0 6px; font-variation-settings: "wght" 700; font-size: calc(40px * var(--ts)); line-height: 1.02; }
.hero p { margin: 0 0 20px; font-size: calc(17px * var(--ts)); max-width: 22ch; opacity: .95; line-height: 1.35; }
.hero .fia { position: absolute; right: -10px; bottom: 60px; width: 130px; height: 130px; border-radius: 28px; object-fit: cover; transform: rotate(6deg); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.playbtn { display: block; width: 100%; border: 0; border-radius: 18px; padding: 18px; background: var(--gold); color: var(--ink); font-variation-settings: "wght" 700; font-size: calc(24px * var(--ts)); box-shadow: 0 5px 0 #c98d1c; cursor: pointer; transition: transform .09s, box-shadow .09s; }
.playbtn:active { transform: translateY(5px); box-shadow: 0 0 0 #c98d1c; }
.meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.pill { background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink-soft); font-variation-settings: "wght" 600; }
.pill b { color: var(--brand); }
.how { margin: 16px auto 0; border: 0; background: none; color: var(--ink-soft); font-size: 16px; text-decoration: underline; cursor: pointer; }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.ladder div { background: var(--cream); border: 2px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: 13px; }
.ladder span { font-size: 24px; display: block; }

/* in game */
.gamebar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.gamebar .x { width: 44px; height: 44px; padding: 0; font-size: 20px; border-radius: 14px; }
.prog { flex: 1; height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s cubic-bezier(.3,1.3,.5,1); }
.gamebar .score { min-width: 54px; text-align: right; font-variation-settings: "wght" 700; font-size: 20px; }
.combo { color: #f08a2e; font-variation-settings: "wght" 700; font-size: 18px; animation: pop .4s; }
.instr { text-align: center; color: var(--ink-soft); font-size: 15px; font-variation-settings: "wght" 600; margin-bottom: 12px; }
.pic { width: min(56vw, 230px); aspect-ratio: 1; margin: 0 auto; padding: 18px; }
.pic img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.caption { text-align: center; color: var(--ink-soft); font-size: 17px; margin: 6px 0 12px; }
.bigprompt { text-align: center; font-variation-settings: "wght" 700; font-size: calc(34px * var(--ts)); margin: 14px 0 6px; line-height: 1.15; }
.emoji { font-size: 84px; text-align: center; line-height: 1.1; margin: 8px 0; }
.gap { text-align: center; font-variation-settings: "wght" 600; font-size: calc(26px * var(--ts)); line-height: 1.3; margin: 10px 0 4px; }
.hint { text-align: center; color: var(--ink-soft); font-size: 16px; font-style: italic; margin-bottom: 12px; }
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.opts .chunky { font-variation-settings: "wght" 600; font-size: calc(21px * var(--ts)); min-height: 62px; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tf .chunky { font-size: 22px; min-height: 70px; font-variation-settings: "wght" 600; }

/* letter boxes */
.boxes { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.boxes .sp { width: 14px; }
.box { width: clamp(36px, 10vw, 48px); height: clamp(44px, 12vw, 56px); border: 2px solid var(--line); border-radius: 12px; background: var(--paper); display: grid; place-items: center; font-size: calc(26px * var(--ts)); font-variation-settings: "wght" 600; transition: border-color .15s, background .15s; }
.box.cur { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.box.lock { background: var(--mint); border-color: var(--green); color: var(--green-dark); }
.box.bad { background: var(--coral-soft); border-color: var(--coral); }
.box.hole { border-style: dashed; border-color: var(--brand); background: var(--brand-soft); }
.box.filled { animation: pop .25s; }

/* letter bank + Irish keyboard: tap, never the device keyboard */
.bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bank .chunky { width: clamp(42px, 12vw, 54px); height: clamp(48px, 13vw, 58px); padding: 0; font-size: calc(24px * var(--ts)); font-variation-settings: "wght" 600; border-radius: 14px; }
.bank .chunky.used { visibility: hidden; }
.kb { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.kb .row { display: flex; justify-content: center; gap: 5px; }
.kb .chunky { flex: 1; max-width: 50px; height: 52px; padding: 0; font-size: 22px; font-variation-settings: "wght" 600; border-radius: 12px; }
.kb .chunky.fada { background: var(--gold-soft); border-color: #f1d9a3; box-shadow: 0 4px 0 #f1d9a3; }
.kb .chunky.wide { max-width: 90px; flex: 1.6; font-size: 17px; }
.helps { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.helps .chunky { padding: 9px 16px; font-size: 15px; border-radius: 999px; }
.checkbtn { margin-top: 14px; }

/* pairs */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pairs .chunky { height: clamp(70px, 17vw, 92px); padding: 4px; font-variation-settings: "wght" 600; font-size: calc(19px * var(--ts)); }
.pairs .chunky img { height: 88%; max-width: 70%; object-fit: contain; pointer-events: none; }
.pairs .chunky.gone { visibility: hidden; }
.pairsbar { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; font-variation-settings: "wght" 600; }

/* feedback sheet (like the app's bottom panel) */
.fb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,1.3,.4,1); }
.fb.ok { background: var(--mint); } .fb.no { background: var(--coral-soft); }
.fb .in { max-width: 560px; margin: 0 auto; }
.fb h3 { margin: 0; font-size: 24px; font-variation-settings: "wght" 700; display: flex; justify-content: space-between; }
.fb.ok h3 { color: var(--green-dark); } .fb.no h3 { color: var(--coral); }
.fb p { margin: 6px 0 14px; font-size: 18px; }
.fb p em { color: var(--ink-soft); font-style: normal; }
.fb .note { font-size: 15px; margin-top: -8px; }
.btn { display: block; width: 100%; border: 0; border-radius: 18px; padding: 16px; font-size: 20px; font-variation-settings: "wght" 700; cursor: pointer; transition: transform .09s, box-shadow .09s; }
.btn:active { transform: translateY(4px); box-shadow: none !important; }
.btn.go { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn.stop { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #b4363a; }
.btn.brand { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-dark); }
.btn.plain { background: var(--paper); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn + .btn { margin-top: 10px; }

/* results */
.done { text-align: center; }
.done .fiabig { width: 120px; height: 120px; border-radius: 30px; object-fit: cover; animation: pop .5s; }
.done h1 { margin: 8px 0 0; font-size: 40px; font-variation-settings: "wght" 700; }
.done .sub { color: var(--ink-soft); }
.stars { font-size: 42px; letter-spacing: 6px; margin: 10px 0 0; }
.stars span { display: inline-block; animation: pop .5s both; }
.stars .off { filter: grayscale(1) opacity(.25); }
.total { font-size: 76px; color: var(--brand); font-variation-settings: "wght" 700; line-height: 1; margin-top: 6px; }
.grid9 { font-size: 26px; letter-spacing: 3px; margin: 10px 0; }
.card { background: var(--paper); border: 2px solid var(--line); border-radius: 22px; box-shadow: 0 4px 0 var(--line); padding: 16px; margin-top: 16px; text-align: left; }
.card h3 { margin: 0 0 8px; font-size: 21px; font-variation-settings: "wght" 700; display: flex; align-items: center; gap: 8px; }
.card .lead { color: var(--ink-soft); margin: 0 0 10px; font-size: 15px; }
.pct { font-size: 20px; font-variation-settings: "wght" 600; margin-bottom: 10px; }
.pct b { color: var(--brand); font-size: 34px; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.hist i { flex: 1; background: var(--line); border-radius: 5px 5px 0 0; min-height: 3px; display: block; }
.hist i.me { background: var(--brand); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 2px solid var(--line); border-radius: 16px; margin-top: 8px; font-size: 17px; }
.lrow .n { width: 26px; text-align: center; font-variation-settings: "wght" 700; }
.lrow .nm { flex: 1; } .lrow .sc { color: var(--brand); font-variation-settings: "wght" 700; font-size: 20px; }
.lrow .of { color: var(--ink-soft); font-size: 14px; }
.lrow.you { background: var(--brand-soft); border-color: var(--brand); }
.tabs { display: flex; gap: 6px; margin: 8px 0 2px; }
.tabs button { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; font-variation-settings: "wght" 600; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.lgname { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-variation-settings: "wght" 700; font-size: 18px; }
.linkbtn { border: 0; background: none; color: var(--brand); font-variation-settings: "wght" 600; cursor: pointer; font-size: 15px; }
.inp { width: 100%; font: inherit; font-size: 17px; padding: 13px 14px; border: 2px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--cream); user-select: text; -webkit-user-select: text; }
.inp:focus { outline: none; border-color: var(--brand); }
.wl { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 2px solid var(--line); }
.wl:first-of-type { border-top: 0; }
.wl img { width: 40px; height: 40px; object-fit: contain; }
.wl .e { width: 40px; text-align: center; font-size: 26px; }
.wl .t { flex: 1; } .wl .t b { font-variation-settings: "wght" 600; font-size: 17px; } .wl .t div { color: var(--ink-soft); font-size: 14px; }
.wl .p { font-variation-settings: "wght" 700; color: var(--ink-soft); }
.wl .p.good { color: var(--green); }
.past a { display: flex; justify-content: space-between; padding: 12px 2px; border-top: 2px solid var(--line); text-decoration: none; color: inherit; font-variation-settings: "wght" 500; }
.past a:first-of-type { border-top: 0; }
.past a span { color: var(--ink-soft); }
.next { text-align: center; color: var(--ink-soft); margin-top: 18px; }
.foot { text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 26px; }
.foot a { color: inherit; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(42,33,28,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@media (min-width: 700px) { .modal { align-items: center; } .modalbox { border-radius: 26px !important; } }
.modalbox { background: var(--cream); width: 100%; max-width: 520px; border-radius: 26px 26px 0 0; padding: 22px 20px 26px; max-height: 92svh; overflow: auto; animation: up .3s cubic-bezier(.2,1.3,.4,1); }
.modalbox h2 { margin: 0 0 8px; font-size: 28px; font-variation-settings: "wght" 700; }
.modalbox p { font-size: 17px; line-height: 1.45; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 2px solid var(--line); font-size: 18px; }
.toggle input { width: 24px; height: 24px; accent-color: var(--brand); }

.shake { animation: shake .32s; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }
.slide { animation: slide .3s cubic-bezier(.2,1.2,.4,1); }
@media (min-width: 900px) { .page { padding-top: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- full-screen landing (phone + computer) ---- */
body.landing { background: var(--brand); }
.land { min-height: 100svh; display: flex; flex-direction: column; color: #fff; padding: 14px clamp(16px, 4vw, 48px) max(20px, env(safe-area-inset-bottom)); }
.land .top .logo b { color: #fff; } .land .top .logo small { color: rgba(255,255,255,.85); }
.land .top .iconbtn { background: rgba(255,255,255,.18); border-color: transparent; box-shadow: none; color: #fff; }
.land-main { flex: 1; display: grid; align-items: center; gap: 18px; grid-template-columns: 1fr; text-align: center; max-width: 1180px; width: 100%; margin: 0 auto; }
.land-fia { width: min(62vw, 300px); aspect-ratio: 1; border-radius: 40px; object-fit: cover; margin: 0 auto; box-shadow: 0 10px 0 var(--brand-dark), 0 24px 50px rgba(0,0,0,.18); transform: rotate(-3deg); }
.land-kick { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-variation-settings: "wght" 600; opacity: .92; }
.land h1 { margin: 6px 0 10px; font-variation-settings: "wght" 700; font-size: clamp(54px, 14vw, 116px); line-height: .92; letter-spacing: -.02em; text-shadow: 0 4px 0 rgba(0,0,0,.08); }
.land .lead2 { font-size: calc(clamp(18px, 2.2vw, 23px) * var(--ts)); max-width: 30ch; margin: 0 auto 22px; line-height: 1.35; opacity: .96; }
.land .playbtn { max-width: 440px; margin: 0 auto; font-size: calc(clamp(24px, 3vw, 30px) * var(--ts)); padding: 22px; }
.land .meta .pill { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
.land .meta .pill b { color: #fff; }
.land .how { color: #fff; opacity: .9; }
.land .foot { color: rgba(255,255,255,.8); }
@media (min-width: 860px) {
  .land-main { grid-template-columns: 1.15fr .85fr; text-align: left; gap: 48px; }
  .land .lead2 { margin-left: 0; } .land .playbtn { margin-left: 0; } .land .meta { justify-content: flex-start; } .land .how { margin-left: 0; display: block; }
  .land-fia { width: min(36vw, 440px); order: 2; }
}

/* ---- v2: clearer slots vs tiles, lives, phone vs computer layouts ---- */
.box { background: #f1e9dd; border: 2px dashed #d9cbb7; box-shadow: inset 0 2px 0 rgba(0,0,0,.04); color: var(--ink); }
.box.given { background: var(--paper); border: 2px solid var(--line); }
.box:not(:empty):not(.lock):not(.given):not(.hole) { background: var(--paper); border-style: solid; border-color: var(--gold); }
.box.cur { border-style: solid; border-color: var(--gold); background: var(--gold-soft); animation: blink 1.2s ease-in-out infinite; }
.box.hole { border: 3px dashed var(--brand); background: var(--brand-soft); color: var(--brand); animation: blink 1.2s ease-in-out infinite; }
.box.lock { border-style: solid; }
.tray { background: #f1e9dd; border-radius: 24px; padding: 12px 10px 10px; margin-top: 4px; }
.tray-label { text-align: center; font-size: 14px; color: var(--ink-soft); font-variation-settings: "wght" 600; margin-bottom: 10px; }
.tray .chunky { background: var(--paper); }
.kb .row { padding: 0; border: 0; margin: 0; }
.lives { display: flex; justify-content: center; align-items: center; gap: 4px; margin: -8px 0 12px; font-size: 18px; }
.lives .lost { filter: grayscale(1) opacity(.3); }
.lives em { font-style: normal; color: var(--ink-soft); font-size: 14px; margin-left: 6px; font-variation-settings: "wght" 600; }
@keyframes blink { 50% { box-shadow: 0 0 0 5px rgba(244,181,63,.25); } }
.land .lead2 { margin-bottom: 26px; }
.land .how { display: block; margin: 14px auto 0; font-size: 18px; text-decoration: none; font-variation-settings: "wght" 600; letter-spacing: .04em; }
@media (min-width: 860px) { .land .how { margin-left: 0; } }

/* computer: wider stage, prompt left and answers right, feedback as a floating card */
@media (min-width: 900px) {
  .page.game { max-width: 1060px; padding-top: 28px; }
  .split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; min-height: 62vh; }
  .split .pic { width: min(30vw, 340px); }
  .split .bigprompt { font-size: 46px; } .split .emoji { font-size: 130px; } .split .gap { font-size: 32px; }
  .split .opts .chunky { min-height: 72px; font-size: 23px; }
  .split .bank .chunky { width: 60px; height: 64px; font-size: 27px; }
  .split .box { width: 54px; height: 62px; font-size: 30px; }
  .split .kb .chunky { max-width: 60px; height: 58px; font-size: 24px; }
  .instr { font-size: 17px; }
  .fb { left: 50%; right: auto; bottom: 28px; width: min(620px, 92vw); transform: translateX(-50%); border-radius: 26px; box-shadow: 0 18px 50px rgba(42,33,28,.22); animation: upc .3s cubic-bezier(.2,1.3,.4,1); }
  .pairs { max-width: 720px; margin: 0 auto; gap: 14px; }
}
@keyframes upc { from { transform: translate(-50%, 40px); opacity: 0; } }
.mh { font-size: 18px; margin: 18px 0 6px; font-variation-settings: "wght" 700; }
.score-list div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 2px solid var(--line); font-size: 16px; }
.score-list b { color: var(--brand); white-space: nowrap; font-variation-settings: "wght" 700; }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 14px; }
.levels div { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; text-align: center; padding: 8px 2px; font-size: 22px; }
.levels b { display: block; font-size: 12px; } .levels span { display: block; font-size: 11px; color: var(--ink-soft); }
.level { display: inline-block; margin-top: 8px; background: var(--gold-soft); border: 2px solid var(--gold); border-radius: 999px; padding: 5px 14px; font-variation-settings: "wght" 700; }

/* ---- text logo instead of Fia pictures ---- */
.land .top .logo { visibility: hidden; }
.land-main { grid-template-columns: 1fr !important; text-align: center !important; }
.land-center { max-width: 680px; margin: 0 auto; }
.wordmark { font-variation-settings: "wght" 700; font-size: clamp(76px, 19vw, 168px); line-height: .9; letter-spacing: -.03em; color: #fff; text-shadow: 0 6px 0 var(--brand-dark); }
.land h1 { font-size: clamp(26px, 5vw, 40px) !important; margin: 18px 0 6px !important; line-height: 1.1 !important; text-shadow: none !important; }
.land-kick { margin-bottom: 10px; }
.land .lead2 { margin: 0 auto 28px !important; }
.land .playbtn { margin: 0 auto !important; }
.land .how { margin: 16px auto 0 !important; }
.logo b { font-size: 26px; }

.hbtns { display: flex; gap: 8px; align-items: center; }
.langbtn { padding: 0 14px; height: 44px; border-radius: 14px; font-size: 15px; font-variation-settings: "wght" 600; }
.land .top .langbtn { background: rgba(255,255,255,.18); border-color: transparent; box-shadow: none; color: #fff; }

.sizes { display: flex; gap: 6px; align-items: flex-end; }
.sizes .chunky { width: 44px; height: 44px; padding: 0; margin: 0; font-variation-settings: "wght" 700; }

/* the real Fia Says logo (text + deer) */
.logo img { width: auto; height: 46px; border-radius: 0; object-fit: contain; }
.land .top .logo { visibility: hidden; }
.wordmark-img { display: block; width: min(86vw, 560px); height: auto; margin: 0 auto; filter: drop-shadow(0 8px 0 rgba(0,0,0,.08)); }

.lgform { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--line); }
.lgform h4 { margin: 0 0 4px; font-size: 19px; font-variation-settings: "wght" 700; }
.flabel { display: block; margin: 14px 0 -4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-variation-settings: "wght" 600; }
.joinrow { display: flex; gap: 8px; align-items: flex-end; }
.joinrow .inp { flex: 1; } .joinrow .btn { width: auto; padding: 13px 20px; margin: 0; font-size: 17px; }
.code { font-size: 13px; color: var(--ink-soft); font-variation-settings: "wght" 500; margin-left: 6px; }

.lol-btn { margin-top: 14px; }
.loltable { margin-top: 10px; }
.lolhead, .lolrow { display: grid; grid-template-columns: 36px 1fr 40px 80px; gap: 8px; align-items: center; padding: 9px 10px; }
.lolhead { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-variation-settings: "wght" 600; }
.lolhead span:nth-child(n+3), .lolrow .pl, .lolrow .sc { text-align: right; }
.lolrow { border: 2px solid var(--line); border-radius: 14px; margin-top: 6px; background: var(--paper); font-size: 16px; }
.lolrow .n { text-align: center; font-variation-settings: "wght" 700; } .lolrow .pl { color: var(--ink-soft); font-size: 14px; }
.lolrow .sc { color: var(--brand); font-variation-settings: "wght" 700; }
.lolrow.you { background: var(--brand-soft); border-color: var(--brand); }
.lolgap { text-align: center; color: var(--ink-soft); letter-spacing: 4px; }
.small2 { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }

.about h4 { margin: 6px 0 10px; font-size: 18px; font-variation-settings: "wght" 600; }
.abtop { display: flex; justify-content: space-between; align-items: center; } .abtop h3 { margin: 0; font-size: 18px; } .dim { color: var(--ink-soft); font-size: 14px; }
.chips2 { display: flex; flex-wrap: wrap; gap: 8px; }
.chip2 { padding: 9px 14px; font-size: 16px; border-radius: 999px; margin: 0; font-variation-settings: "wght" 600; }
.chip2 span { font-variation-settings: "wght" 500; color: var(--ink-soft); }
.abfoot { display: flex; justify-content: space-between; margin-top: 12px; }
select.inp { appearance: auto; }

.sharepreview { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 12px; font-family: inherit; font-size: 15px; white-space: pre-wrap; word-break: break-all; }
.shareapps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.shareapp { text-decoration: none; color: var(--ink); font-size: 17px; font-variation-settings: "wght" 600; padding: 14px; margin: 0; }

/* ---- results page: full-width orange band + card grid (phone stacks, computer spreads) ---- */
.res { min-height: 100svh; }
.res-band { background: var(--brand); color: #fff; padding: 12px clamp(16px, 4vw, 48px) 34px; border-radius: 0 0 36px 36px; box-shadow: 0 6px 0 var(--brand-dark); }
.res-band-in { max-width: 1180px; margin: 0 auto; }
.res-band .top .langbtn, .res-band .top .iconbtn { background: rgba(255,255,255,.18); border-color: transparent; box-shadow: none; color: #fff; }
.res-band .done h1 { color: #fff; font-size: clamp(36px, 6vw, 56px); }
.res-band .done .sub { color: rgba(255,255,255,.9); }
.res-band .total { color: #fff; font-size: clamp(76px, 14vw, 132px); text-shadow: 0 6px 0 var(--brand-dark); }
.res-band .stars .off { filter: brightness(10) opacity(.35); }
.res-band .level { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.55); color: #fff; }
.res-band .grid9 { font-size: clamp(26px, 4vw, 38px); }
.sharebig { display: block; width: min(100%, 460px); margin: 6px auto 0; border: 0; border-radius: 20px; padding: 20px; background: var(--gold); color: var(--ink); font: inherit; font-size: 24px; font-variation-settings: "wght" 700; box-shadow: 0 6px 0 #c98d1c; cursor: pointer; transition: transform .09s, box-shadow .09s; }
.sharebig:active { transform: translateY(6px); box-shadow: none; }
.beat { margin-top: 10px; font-size: 15px; opacity: .92; }
.res-band .next { color: rgba(255,255,255,.85); margin-top: 8px; font-size: 14px; }
.res-grid { max-width: 1180px; margin: 0 auto; padding: 8px 16px 40px; }
.res-grid .card { break-inside: avoid; margin-top: 18px; }

/* ===== Screen sizes =====
   phone  < 640px   one column, app-like (the default above)
   tablet 640–1023  iPad: roomier tiles, results in 2 columns
   laptop 1024–1439 picture left / answers right, results in 3 columns
   big    ≥ 1440    same as laptop, a little larger
   Each results card has an area (c-*) so the grid can arrange them per size. */
.res-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
.res-grid .card { margin-top: 0; }
.res-grid > .c-compare, .res-grid > .c-about, .res-grid > .c-league, .res-grid > .c-game, .res-grid > .c-streak, .res-grid > .c-past { min-width: 0; }
.res-grid { padding-top: 22px; }

@media (min-width: 640px) {
  .page { max-width: 640px; }
  .pic { width: min(44vw, 260px); }
  .opts .chunky { min-height: 68px; font-size: 22px; }
  .bank .chunky { width: 56px; height: 62px; font-size: 26px; }
  .box { width: 50px; height: 58px; font-size: 28px; }
  .kb .chunky { max-width: 58px; height: 58px; font-size: 24px; }
  .res-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "compare league" "about league" "streak game" "past game"; }
  .c-compare { grid-area: compare; } .c-about { grid-area: about; } .c-league { grid-area: league; }
  .c-game { grid-area: game; } .c-streak { grid-area: streak; } .c-past { grid-area: past; }
  .logo img { height: 54px; }
}
@media (min-width: 1024px) {
  .res-grid { grid-template-columns: 1fr 1.15fr 1fr; grid-template-areas: "compare league game" "about league game" "streak league past"; }
  .res-band { padding-bottom: 44px; }
  .logo img { height: 60px; }
}
@media (min-width: 1440px) {
  .res-band-in, .res-grid { max-width: 1320px; }
  .page.game { max-width: 1180px; }
  .split .pic { width: min(28vw, 400px); }
}
/* iPad portrait gets the stacked game layout but bigger; landscape iPad/laptops get the split */
@media (min-width: 900px) and (max-width: 1023px) { .split { gap: 32px; } }

/* ---- results top v3: one centred composition ---- */
.res-band { padding-bottom: 40px; }
.res-band-in { text-align: center; }
.res-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-top: 6px; }
.res-top .hbtns { justify-self: end; }
.res-top .langbtn, .res-top .iconbtn { background: rgba(255,255,255,.18); border-color: transparent; box-shadow: none; color: #fff; }
.res-logo img { display: block; height: clamp(70px, 12vw, 120px); width: auto; filter: drop-shadow(0 6px 0 rgba(0,0,0,.1)); }
.ticket { position: relative; max-width: 520px; margin: 18px auto 0; background: var(--paper); color: var(--ink); border-radius: 28px; padding: 22px 22px 18px; box-shadow: 0 8px 0 var(--brand-dark), 0 24px 50px rgba(0,0,0,.18); }
.ticket::before, .ticket::after { content: ''; position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); transform: translateY(-50%); }
.ticket::before { left: -13px; } .ticket::after { right: -13px; }
.tk-kick { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-variation-settings: "wght" 600; }
.ticket .stars { margin-top: 8px; }
.ticket .stars .off { filter: grayscale(1) opacity(.25); }
.res-band .ticket .total { color: var(--brand); text-shadow: none; font-size: clamp(84px, 16vw, 128px); margin: 2px 0 6px; }
.tk-row { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-soft); font-size: 17px; }
.res-band .ticket .level { margin: 0; background: var(--gold-soft); border-color: var(--gold); color: var(--ink); }
.ticket .grid9 { margin: 14px 0 2px; font-size: clamp(26px, 5vw, 34px); }
.res-band .sharebig { width: min(100%, 520px); margin: 22px auto 0; font-size: clamp(22px, 3vw, 28px); padding: 22px; }
.res-band .beat, .res-band .next { text-align: center; }

.tiles9 { display: flex; justify-content: center; gap: 6px; margin: 16px 0 4px; flex-wrap: wrap; }
.t9 { width: clamp(30px, 8vw, 40px); height: clamp(30px, 8vw, 40px); border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; font-variation-settings: "wght" 700; animation: pop .45s cubic-bezier(.3,1.7,.5,1) both; }
.t9 { font-size: clamp(20px, 5vw, 26px); }
.t9.ok { background: #fff4cf; box-shadow: 0 3px 0 #f1d58a; }
.t9.help { background: #e9f1f7; box-shadow: 0 3px 0 #c9d9e6; }
.t9.no { background: #dfe7ef; box-shadow: 0 3px 0 #b9c7d6; }

/* ---- calm results body: one column under the one CTA ---- */
.res-body { max-width: 620px; margin: 0 auto; padding: 26px 16px 50px; }
.res-body .card { margin-top: 16px; }
.res-body .card:first-child { margin-top: 0; }
.c-compare .pct { font-size: 19px; margin-bottom: 8px; } .c-compare .pct b { font-size: 26px; }
.c-compare .hist { height: 54px; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 16px; padding: 12px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.strip b { display: block; font-size: 24px; font-variation-settings: "wght" 700; } .strip span { font-size: 13px; color: var(--ink-soft); }
details.fold { padding: 0; } details.fold summary { padding: 16px; font-variation-settings: "wght" 700; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.fold summary::after { content: '⌄'; color: var(--ink-soft); font-size: 22px; line-height: 1; } details.fold[open] summary::after { content: '⌃'; }
details.fold summary .dim { font-size: 15px; letter-spacing: 1px; margin-left: auto; }
details.fold > .wl, details.fold > a { margin: 0 16px; } details.fold[open] { padding-bottom: 8px; }
.lglinks { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; }
.aboutline { display: flex; justify-content: space-between; width: 100%; margin-top: 16px; border: 2px dashed var(--line); background: transparent; border-radius: 18px; padding: 14px 16px; font-size: 16px; color: var(--ink-soft); cursor: pointer; text-align: left; }
.aboutline span { color: var(--brand); }
.quiet { text-align: center; margin-top: 18px; }
@media (max-width: 480px) { details.fold summary .dim { display: none; } }

/* ---- one consistent background on the results page; everything scrolls ---- */
body.resbg { background: var(--brand); }
body.resbg .res-band { box-shadow: none; border-radius: 0; padding-bottom: 10px; }
body.resbg .res-body { padding-top: 18px; }
body.resbg .strip { color: #fff; border-color: rgba(255,255,255,.3); }
body.resbg .strip span { color: rgba(255,255,255,.85); }
body.resbg .quiet .linkbtn, body.resbg .foot, body.resbg .foot a { color: #fff; }
body.resbg .aboutline { border-color: rgba(255,255,255,.5); color: #fff; } body.resbg .aboutline span { color: #fff; }
/* league rows: one per league, like a road sign, tap to open */
.lgsign { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 10px; padding: 16px 18px; border: 0; border-radius: 16px; background: var(--green); color: #fff; box-shadow: 0 0 0 3px #fff inset, 0 0 0 5px var(--green), 0 5px 0 5px var(--green-dark); cursor: pointer; font-size: 18px; text-align: left; transition: transform .09s; }
.lgsign:active { transform: translateY(3px); }
.lgsign .lgn { font-variation-settings: "wght" 700; text-transform: uppercase; letter-spacing: .04em; }
.lgsign .lgp { font-variation-settings: "wght" 700; white-space: nowrap; }
.lgsign + .lgsign { margin-top: 14px; }

/* ---- How to play: slides with a mini phone and a tapping finger ---- */
.modalbox.tut { text-align: center; position: relative; padding-top: 18px; }
.tut-skip { position: absolute; right: 16px; top: 14px; border: 0; background: none; color: var(--ink-soft); font-size: 15px; cursor: pointer; }
.tut-title { font-size: 26px; font-variation-settings: "wght" 700; margin-top: 8px; }
.tut-line { color: var(--ink-soft); font-size: 16px; margin: 4px auto 14px; max-width: 30ch; min-height: 2.6em; }
.phone { width: 250px; height: 420px; margin: 0 auto; border-radius: 38px; background: var(--ink); padding: 10px; box-shadow: 0 16px 40px rgba(42,33,28,.25); }
.stage { position: relative; width: 100%; height: 100%; border-radius: 30px; background: var(--cream); overflow: hidden; }
.stage .screen { position: absolute; inset: 0; padding: 14px 12px; zoom: .58; display: flex; flex-direction: column; justify-content: center; }
.stage .screen .pic { width: 170px; padding: 12px; }
.stage .screen .opts .chunky { min-height: 56px; }
.stage .screen .tray { padding: 10px 8px; }
.stage .screen .pairs .chunky { height: 92px; }
.kb.mini .chunky { max-width: 54px; height: 54px; }
.finger { position: absolute; left: 0; top: 0; font-size: 34px; transition: transform .6s cubic-bezier(.45,.05,.3,1); filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); pointer-events: none; z-index: 2; }
.finger.tap { animation: tapf .16s ease-in-out; }
@keyframes tapf { 50% { scale: .82; } }
.tut-dots { display: flex; justify-content: center; gap: 7px; margin: 16px 0 12px; }
.tut-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); cursor: pointer; }
.tut-dots i.on { background: var(--brand); width: 22px; border-radius: 9px; }
.tut-nav { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.tut-nav .btn { margin: 0 !important; }
.tut-score { margin-top: 14px; }
.wx { display: flex; justify-content: space-around; margin: 16px 0 8px; font-size: 15px; }
.lvline { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 26px; margin: 10px 0 18px; }
.lvline span { display: flex; flex-direction: column; align-items: center; } .lvline i { font-style: normal; font-size: 11px; color: var(--ink-soft); }
.lvline b { color: var(--line); font-size: 18px; }
.quiet { line-height: 2; }

.skiprow { text-align: center; margin-top: 18px; } .skiprow .linkbtn { color: var(--ink-soft); font-size: 15px; }

/* ---- Your stats dashboard ---- */
.dash-level { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 2px solid var(--line); border-radius: 20px; padding: 14px 16px; margin-top: 6px; }
.dash-level .big { font-size: 46px; } .dash-level > div { flex: 1; } .dash-level b { font-size: 19px; }
.dash-level .bar { height: 10px; background: var(--line); border-radius: 999px; margin: 8px 0 4px; overflow: hidden; } .dash-level .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dash-level small { color: var(--ink-soft); }
.strip.dash { grid-template-columns: repeat(5, 1fr); } .strip.dash b { font-size: 20px; }
.hist14 { display: flex; align-items: flex-end; gap: 4px; height: 70px; } .hist14 i { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; }
.hist14 i.none { background: var(--line); } .hist14 i.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.wx.big { font-size: 26px; } .wx.big span { display: flex; flex-direction: column; align-items: center; } .wx.big b { font-size: 18px; }
.lvline span.me { background: var(--gold-soft); border-radius: 12px; padding: 2px 6px; outline: 2px solid var(--gold); }
.lvline { flex-wrap: wrap; font-size: 24px; } .lvline i { font-size: 10px; }
.linkrow { width: 100%; background: none; border: 0; border-top: 2px solid var(--line); cursor: pointer; text-align: left; font: inherit; font-size: 18px; color: var(--ink); }
.linkrow span { color: var(--brand); }
body.resbg .modalbox .strip { color: var(--ink); border-color: var(--line); } body.resbg .modalbox .strip span { color: var(--ink-soft); }
@media (max-width: 480px) {
  .res-top { grid-template-columns: 1fr auto; } .res-top > span:first-child { display: none; } .res-logo img { height: 64px; }
  .hbtns { gap: 6px; } .hbtns .iconbtn { width: 38px; height: 38px; font-size: 16px; border-radius: 12px; } .hbtns .langbtn { height: 38px; padding: 0 10px; font-size: 13px; border-radius: 12px; }
}

/* tries as shamrocks: a lost one fades and shrinks */
.lives { gap: 8px; font-size: 22px; }
.lives span { transition: opacity .5s, transform .5s, filter .5s; }
.lives .lost { opacity: .15; transform: scale(.7) rotate(-20deg); filter: grayscale(1); }
