/* Poredaj.me — layout: one narrow phone column, sticky top bar, fixed bottom tab bar, views swapped by hash. */
:root{
  --bg:#eef2f7; --surface:#ffffff; --surface-2:#e3e9f2; --ink:#13213f; --muted:#5d6a85; --line:#d4dbe7;
  --accent:#d7262f; --accent-ink:#ffffff; --ok:#1f9d63; --ok-soft:#dff4ea; --sel:#ffe7a3;
  --gold:#e0a400; --sky:#2f6fdb; --sky-soft:#dbe7fb;
  --font-display:"Unbounded","Arial Black",system-ui,sans-serif;
  --font-body:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,Consolas,monospace;
  --tabbar:64px;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0d1426;--surface:#17213a;--surface-2:#1f2b48;--ink:#e8edf7;--muted:#9aa6c0;--line:#2a3654;
  --accent:#ff4b52;--accent-ink:#ffffff;--ok:#36c585;--ok-soft:#14382a;--sel:#5a4a14;
  --gold:#ffc83d;--sky:#6b9cff;--sky-soft:#1b2c55;color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0d1426;--surface:#17213a;--surface-2:#1f2b48;--ink:#e8edf7;--muted:#9aa6c0;--line:#2a3654;
  --accent:#ff4b52;--accent-ink:#ffffff;--ok:#36c585;--ok-soft:#14382a;--sel:#5a4a14;
  --gold:#ffc83d;--sky:#6b9cff;--sky-soft:#1b2c55;color-scheme:dark}

*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{min-height:100%;margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.45;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));
  padding-block:0 calc(var(--tabbar) + 28px + env(safe-area-inset-bottom,0px))}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--bg)}
.wrap{max-width:480px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
button{font:inherit;color:inherit;cursor:pointer}
a{color:var(--sky)}
button:focus-visible,a:focus-visible,.tile:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ico{width:1em;height:1em;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* top bar */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--bg);display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:14px 10px}
.logo{font-family:var(--font-display);font-weight:800;font-size:24px;letter-spacing:-.03em;line-height:1;display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);white-space:nowrap}
.logo .tld{color:var(--accent)}
/* znak: tri trake složene od najkraće do najdulje (ono što igrač radi u igri) */
.mark{width:30px;height:30px;flex:none;display:block}
.mark svg{width:100%;height:100%;display:block;overflow:visible}
.mk-bg{fill:var(--ink)}
.mk-bar{fill:var(--bg);transform-box:fill-box;transform-origin:left center}
.mk-1{fill:var(--accent)}
/* trake se "slože" kad se prijeđe mišem ili dodirne logo; u mirovanju su uvijek vidljive */
@keyframes bar-in{0%{transform:scaleX(.15)}100%{transform:none}}
.logo:hover .mk-bar,.logo:focus-visible .mk-bar{animation:bar-in .45s cubic-bezier(.2,.9,.3,1.25)}
.logo:hover .mk-2,.logo:focus-visible .mk-2{animation-delay:.08s;animation-fill-mode:backwards}
.logo:hover .mk-3,.logo:focus-visible .mk-3{animation-delay:.16s;animation-fill-mode:backwards}
.who{display:flex;align-items:center;gap:8px}
.pill{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:7px 12px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.pill.plus{background:var(--gold);border-color:var(--gold);color:#1b1400}
.iconbtn{width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;font-size:18px;color:var(--ink);flex:none}
.iconbtn[aria-pressed="false"]{color:var(--muted)}
body{transition:background-color .3s ease,color .3s ease}
.card,.pill,.iconbtn,.tabbar,.top,.modebar{transition:background-color .3s ease,border-color .3s ease,color .3s ease}
.who{gap:6px}
@media (max-width:430px){
  .logo{font-size:18px;gap:7px}
  .mark{width:26px;height:26px}
  .pname,.ptxt{display:none}
  #me{padding:3px}
  .top{gap:8px}
  .who{gap:4px}
  .iconbtn{width:32px;height:32px;font-size:16px}
  .pill.plus{padding:0;width:32px;height:32px;justify-content:center}
  .gbtn{padding:6px 9px;gap:6px}
}
@media (max-width:360px){ .gbtn .gtxt{display:none} }
.ava{position:relative;display:inline-grid;place-items:center;width:var(--s);height:var(--s);flex:none;border-radius:50%;overflow:hidden;
  background:var(--sky-soft);color:var(--ink);font-weight:800;font-size:calc(var(--s) * .44);line-height:1}
.ava img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.podium .ava{box-shadow:0 0 0 3px var(--surface)}
.podium .p1 .ava{box-shadow:0 0 0 3px var(--gold)}
.check{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--accent)}
.avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;background:var(--surface-2);border:2px solid var(--line)}
.gbtn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:7px 12px;font-weight:700;font-size:13px}
.gbtn svg{width:16px;height:16px}

/* bottom tab bar */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:25;background:var(--surface);border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom,0px);padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px))}
.tabbar nav{max-width:480px;margin:0 auto;display:grid;grid-template-columns:repeat(5,1fr);height:var(--tabbar)}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;color:var(--muted);font-size:11px;font-weight:700}
.tabbar a .ico{font-size:22px}
.tabbar a[aria-current="page"]{color:var(--accent)}

/* headings */
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);display:flex;align-items:center;gap:8px}
h1,h2,h3{text-wrap:balance}
.h1{font-family:var(--font-display);font-weight:600;font-size:21px;line-height:1.2;margin:0}
.h2{font-family:var(--font-display);font-weight:800;font-size:22px;margin:0}
.muted{color:var(--muted)}
.small{font-size:14px}

/* puzzle header with illustration */
.stage{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}
.badge{width:72px;height:72px;border-radius:18px;display:grid;place-items:center;font-size:40px;color:var(--accent);
  background:radial-gradient(circle at 30% 25%,var(--surface) 0 30%,transparent 31%),var(--surface-2);
  border:2px solid var(--line);animation:float 4s ease-in-out infinite}
@keyframes float{50%{transform:translateY(-4px) rotate(-3deg)}}
.prompt{display:flex;flex-direction:column;gap:4px;min-width:0}
.modebar{display:flex;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px}
.modebar button{flex:1;border:0;background:transparent;border-radius:999px;padding:8px 6px;font-weight:700;font-size:13px;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;gap:5px}
.modebar button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.lock{font-size:12px}

/* ladder */
.axis{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:8px}
.axis::after{content:"";flex:1;height:1px;background:var(--line)}
.ladder{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.tile{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;background:var(--surface);
  border:2px solid var(--line);border-radius:12px;padding:10px 10px 10px 8px;min-height:62px;
  transition:transform .18s ease,border-color .15s,background .15s;user-select:none;-webkit-user-select:none;
  animation:deal .4s cubic-bezier(.2,.8,.3,1.2) both;animation-delay:calc(var(--i) * 60ms)}
@keyframes deal{from{opacity:.001;transform:translateX(-24px) rotate(-2deg)}to{opacity:1;transform:none}}
.tile.clickable{cursor:grab;touch-action:none}
.tile.dragging{cursor:grabbing;z-index:5;position:relative;transition:none;box-shadow:0 10px 24px color-mix(in srgb,#000 25%,transparent);border-color:var(--ink)}
.tile.drop{border-style:dashed;border-color:var(--accent)}
.tile.clickable:hover{border-color:var(--muted)}
.tile.selected{background:var(--sel);border-color:var(--ink);transform:scale(1.02)}
.tile.locked{background:var(--ok-soft);border-color:var(--ok)}
.tile.reveal{animation:flip .5s ease both;animation-delay:calc(var(--i) * 90ms)}
@keyframes flip{0%{transform:rotateX(0)}50%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}
.rank{font-family:var(--font-display);font-weight:800;font-size:20px;text-align:center;color:var(--muted)}
.tile.locked .rank{color:var(--ok)}
.name{font-weight:700;font-size:16px;min-width:0;line-height:1.25}
.val{display:block;font-family:var(--font-mono);font-size:13px;color:var(--muted);font-weight:500;margin-top:2px}
.side{display:flex;align-items:center;gap:4px}
.arrow{font-weight:800;font-size:13px;padding:3px 8px;border-radius:999px;background:var(--bg);color:var(--accent);white-space:nowrap}
.mv{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:var(--bg);font-size:15px;line-height:1;display:grid;place-items:center}
.mv:disabled{opacity:.3;cursor:default}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.04)}100%{transform:scale(1)}}
.tile.flash{animation:pop .35s ease}

/* action bar */
.bar{display:flex;align-items:center;gap:14px}
.tries{display:flex;gap:6px}
.dot{width:14px;height:14px;border-radius:50%;border:2px solid var(--muted)}
.dot.used{background:var(--muted)}
.dot.win{background:var(--ok);border-color:var(--ok)}
.go{flex:1;border:0;border-radius:12px;background:var(--accent);color:var(--accent-ink);font-family:var(--font-display);font-weight:600;font-size:16px;padding:15px;box-shadow:0 4px 0 color-mix(in srgb,var(--accent) 60%,#000)}
.go:active{transform:translateY(2px);box-shadow:0 2px 0 color-mix(in srgb,var(--accent) 60%,#000)}
.go:disabled{opacity:.5;cursor:default}
.clock{font-family:var(--font-mono);font-size:13px;color:var(--muted);min-width:46px;text-align:right}

/* cards */
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px}
.card.strong{border:2px solid var(--ink)}
.grid-emoji{font-family:var(--font-mono);font-size:18px;line-height:1.25;letter-spacing:2px;white-space:pre}
.stats3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.stats4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center}
.stat b{display:block;font-family:var(--font-display);font-size:22px;font-variant-numeric:tabular-nums}
.stat span{font-size:12px;color:var(--muted)}
.row{display:flex;gap:8px;flex-wrap:wrap}
.btn{flex:1;min-width:140px;border:2px solid var(--ink);border-radius:12px;background:transparent;font-weight:700;padding:12px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;color:var(--ink)}
.btn.primary{background:var(--ink);color:var(--bg)}
.btn.red{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.gold{background:var(--gold);border-color:var(--gold);color:#1b1400}
.btn:disabled{opacity:.5;cursor:default}
.next{font-size:14px;color:var(--muted)}
.next b{font-family:var(--font-mono);color:var(--ink)}

/* bars chart */
.bars{display:flex;flex-direction:column;gap:6px}
.barrow{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:center;font-size:13px;font-weight:700}
.barrow .track{height:24px;background:var(--surface-2);border-radius:6px;overflow:hidden}
.barrow .fill{height:100%;min-width:26px;background:var(--muted);color:var(--bg);border-radius:6px;display:flex;align-items:center;justify-content:flex-end;padding-right:7px;font-family:var(--font-mono);font-size:12px;
  transform-origin:left;animation:grow .7s cubic-bezier(.2,.8,.3,1) both}
.barrow .fill.hl{background:var(--ok)}
@keyframes grow{from{transform:scaleX(0)}}
.catrow{display:grid;grid-template-columns:22px 1fr auto;gap:8px;align-items:center;font-size:14px}
.catrow .ico{font-size:18px;color:var(--accent)}
.meter{grid-column:2/4;height:6px;background:var(--surface-2);border-radius:3px;overflow:hidden}
.meter i{display:block;height:100%;background:var(--ok)}

/* leaderboard */
.lb{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.lb li{display:grid;grid-template-columns:34px 32px 1fr auto;gap:10px;align-items:center;padding:10px 4px;border-bottom:1px solid var(--line)}
.lb li:last-child{border-bottom:0}
.lb .pos{font-family:var(--font-display);font-weight:800;text-align:center;color:var(--muted)}
.lb li.first .pos{color:var(--gold)}
.lb li.me{background:var(--sky-soft);border-radius:10px}
.lb .nm{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb .sc{font-family:var(--font-mono);font-size:13px;text-align:right;white-space:nowrap}
.lb .av{width:32px;height:32px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;font-weight:800;font-size:13px;color:var(--muted);overflow:hidden}
.lb .av img{width:100%;height:100%;object-fit:cover}
.podium{display:grid;grid-template-columns:1fr 1.15fr 1fr;align-items:end;gap:8px;text-align:center}
.podium div{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.podium .blk{width:100%;border-radius:10px 10px 0 0;background:var(--surface-2);font-family:var(--font-display);font-weight:800;font-size:22px;display:grid;place-items:center;color:var(--muted)}
.podium .p1 .blk{height:86px;background:var(--gold);color:#1b1400}
.podium .p2 .blk{height:64px}
.podium .p3 .blk{height:48px}
.podium .nm{font-weight:700;font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.example{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);border:1px dashed var(--line);border-radius:999px;padding:2px 8px;align-self:flex-start}

/* plus */
.plans{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:400px){.plans{grid-template-columns:1fr}}
.plan{border:2px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:6px;background:var(--surface)}
.plan.best{border-color:var(--gold)}
.plan .price{font-family:var(--font-display);font-weight:800;font-size:24px}
.feat{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.feat li{display:grid;grid-template-columns:22px 1fr auto auto;gap:8px;align-items:center;font-size:14px}
.feat .y{color:var(--ok);font-weight:800;text-align:center;width:36px}
.feat .n{color:var(--muted);text-align:center;width:36px}
.feat .hd{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);text-align:center;width:36px}

/* duel */
.ring{position:relative;width:64px;height:64px;flex:none}
.ring svg{width:64px;height:64px;transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:6}
.ring .bg{stroke:var(--surface-2)}
.ring .fg{stroke:var(--ok);stroke-linecap:round;transition:stroke-dashoffset 1s linear,stroke .3s}
.ring.warn .fg{stroke:var(--accent)}
.ring b{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--font-display);font-size:18px}
.duelhead{display:flex;align-items:center;gap:14px}
.rounds{display:flex;gap:6px}
.rounds i{width:28px;height:8px;border-radius:4px;background:var(--surface-2)}
.rounds i.done{background:var(--ink)}
.rounds i.now{background:var(--accent)}
.qr{align-self:center;padding:12px;background:#ffffff;border-radius:14px;line-height:0}
.qr img,.qr canvas{display:block;max-width:100%}
.link{font-family:var(--font-mono);font-size:12px;word-break:break-all;background:var(--surface-2);border-radius:8px;padding:8px 10px;user-select:all}
.vs{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;text-align:center}
.vs .big{font-family:var(--font-display);font-weight:800;font-size:34px;font-variant-numeric:tabular-nums}
.vs .who{flex-direction:column;gap:2px;font-weight:700}
.rtable{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.rtable th,.rtable td{padding:6px 4px;border-bottom:1px solid var(--line);text-align:center}
.rtable td.w{color:var(--ok);font-weight:800}
.field{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:14px}
.field input{font:inherit;border:2px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface);color:var(--ink)}

/* razmak između kartice rezultata, kratke statistike i oglasa */
#res{display:flex;flex-direction:column;gap:16px}
#res:empty{display:none}

/* obavijest: dnevna je odigrana */
.notice{background:var(--ok-soft);border:2px solid var(--ok);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:12px;animation:drop-in .45s cubic-bezier(.2,.8,.3,1.2) both}
@keyframes drop-in{from{opacity:.001;transform:translateY(-12px)}}
.notice-top{display:flex;gap:12px;align-items:flex-start}
.notice-ic{width:34px;height:34px;border-radius:50%;background:var(--ok);color:var(--surface);display:grid;place-items:center;font-size:20px;flex:none}
.notice-ic .ico{stroke-width:3}
.notice b[data-cd]{font-family:var(--font-mono)}
.btn.big{padding:15px;font-size:16px}
.linkbtn{border:0;background:none;color:var(--muted);font-weight:700;font-size:14px;text-decoration:underline;padding:6px;align-self:center}

/* Plus prozor */
.plus-sheet .card{gap:14px;animation:sheet-up .3s cubic-bezier(.2,.8,.3,1) both}
@keyframes sheet-up{from{transform:translateY(40px);opacity:.001}}
.perks{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:400px){.perks{grid-template-columns:1fr}}
.perks li{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;background:var(--surface-2);border-radius:10px;padding:9px 10px}
.perks .ico{color:var(--gold);font-size:18px}

/* kratka statistika nakon igre, vrh ljestvice zamućen */
.peek{position:relative;border-radius:12px;overflow:hidden;border:1px solid var(--line)}
.peek-rows{filter:blur(5px);opacity:.75;pointer-events:none;user-select:none}
.peekrow{display:grid;grid-template-columns:24px 26px 1fr auto;gap:8px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);font-size:14px}
.peekrow .pos{font-family:var(--font-display);font-weight:800;color:var(--muted);text-align:center}
.peekrow .nm{font-weight:700}
.peekrow .sc{font-family:var(--font-mono);font-size:12px}
.peek-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px;background:color-mix(in srgb,var(--surface) 35%,transparent)}
.peek-cover .btn{flex:none}

/* ljestvica: zaključan top 5 */
.masked{filter:blur(5px);user-select:none;color:var(--muted)}
.masked-ava{background:var(--surface-2);color:var(--muted)}
.locked-row .sc{color:var(--muted)}
.podium .masked-ava{box-shadow:0 0 0 3px var(--line)}
.unlock-strip{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;margin:4px 0 6px;padding:12px;border-radius:12px;
  border:2px dashed var(--gold);background:color-mix(in srgb,var(--gold) 10%,var(--surface))}
.unlock-strip .btn{min-width:0;flex:none;padding:10px 14px}
.lock-badge{width:34px;height:34px;border-radius:50%;background:var(--gold);color:#1b1400;display:grid;place-items:center;font-size:17px}
@media (max-width:400px){.unlock-strip{grid-template-columns:auto 1fr}.unlock-strip .btn{grid-column:1/-1}}
.lb-gap{text-align:center;color:var(--muted);font-weight:800;letter-spacing:4px}

/* obavijesti */
.btn.notify{border-color:var(--sky);color:var(--sky);background:var(--sky-soft)}
.btn.notify .ico{font-size:18px;animation:ring 3s ease-in-out infinite;transform-origin:50% 10%}
@keyframes ring{0%,80%,100%{transform:rotate(0)}84%{transform:rotate(14deg)}88%{transform:rotate(-12deg)}92%{transform:rotate(8deg)}96%{transform:rotate(-4deg)}}
[data-notify-off]{display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:8px}
.steps .ico{vertical-align:-3px;color:var(--sky)}

/* poklon Plusa */
.card.gift{border:2px dashed var(--gold);background:linear-gradient(160deg,color-mix(in srgb,var(--gold) 12%,var(--surface)),var(--surface) 60%)}
.card.gift .eyebrow{color:var(--gold)}
.gift-h{font-size:19px}
.gift-badge{color:var(--gold);animation:wiggle 2.4s ease-in-out infinite}
@keyframes wiggle{0%,100%{transform:rotate(0)}10%{transform:rotate(-8deg)}20%{transform:rotate(8deg)}30%{transform:rotate(-4deg)}40%{transform:rotate(0)}}

/* ads */
.ad{border:1px dashed var(--line);border-radius:12px;min-height:100px;display:grid;place-items:center;color:var(--muted);font-size:12px;text-align:center;padding:8px}

/* misc */
.toast{position:fixed;left:50%;bottom:calc(var(--tabbar) + 18px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);
  padding:10px 16px;border-radius:999px;font-weight:700;font-size:14px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:40;max-width:calc(100% - 32px);text-align:center}
.toast.show{opacity:1}
details{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 14px}
summary{font-weight:700;cursor:pointer}
details ul{margin:10px 0 0;padding-left:20px;color:var(--muted)}
footer{font-size:12px;color:var(--muted);text-align:center;display:flex;flex-direction:column;gap:4px}
footer a{color:var(--muted)}
.demo{font-size:12px;background:var(--sky-soft);color:var(--ink);border-radius:10px;padding:8px 12px}
#confetti{position:fixed;inset:0;pointer-events:none;z-index:50}
.sheet{position:fixed;inset:0;z-index:60;background:color-mix(in srgb,#000 45%,transparent);display:flex;flex-direction:column;align-items:center;overflow-y:auto;overscroll-behavior:contain;
  padding:calc(16px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.sheet>.card{width:100%;max-width:480px;margin-top:auto;flex:none}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
