/* Shared UI tokens (MOBILE_UI.md, September 24). Button tiers: full labeled
   actions, dense selectors / pagers / inline field actions, compact utilities.
   Small-control labels: the stroke sits behind the fill and scales with the text,
   and the selected state only thickens it (--active-stroke). */
:root{
 --tier-full-h:56px;--tier-full-fs:24px;--claim-hug-min:152px;--tier-dense-h:52px;--tier-dense-fs:21px;--tier-compact:44px;
 --label-stroke:.14em;--label-drop:.07em;
 --active-top:#ffdf75;--active-bottom:#ffc342;--active-edge:#302b2d;--active-lip:#c48f3c;--active-shine:#fff3bd;--active-ink:#fffaf1;--active-stroke:.17em;
 --help-face:#3e374b;--help-ring:#aea0b9;--help-ink:#fff0cd;--help-drop:#211e29;--help-disc:34px;
 --status-inset:112px;--z-status:60;
 /* AC339 visual style tokens (docs/VISUAL_STYLE.md): ink outline, unblurred drop, bevel rim. */
 --vs-ink:#241925;--vs-ink-text:#2f2116;--vs-outline:2px;--vs-drop-y:3px;--vs-rim:3px;--vs-radius:12px;--vs-good:#23702c;--vs-shortcut-band:#24192512;
 /* Visual polish v1 (2026-10-27): one core palette. Literals within one just-noticeable
    difference (CIE76 dE < 2.3) of a token use it (docs/qa/visual-polish-buttons/tokenize-css.mjs). */
 --cream-50:#fffaf0;--cream-200:#fff4db;--cream-250:#fff6d6;--cream-300:#fff0cd;--cream-350:#fff1c8;
 --card-face:#fffbe6;--paper:#fff5e4;--gold-50:#fff3c4;--gold-100:#ffe7a6;--honey-200:#ffe08a;--honey-300:#ffe27a;--shine-100:#fff3bd;
 --row-face:#f6e9cc;--row-inset:#e6d2a8;--text-on-cream:#4a3426;--ink-brown:#3a2414;--ink-navy:#192034;
 --ink-plum:#2a2230;--ink-plum-2:#292530;--panel-night:#17141e;--navy-600:#243b50;
 /* Rarity (docs/RARITY_COLORS.md is the only source of these hues). */
 --rarity-standard:#9ca3af;--rarity-great:#67c56b;--rarity-rare:#65bfff;--rarity-epic:#ad78ed;
 --rarity-legendary:#ffc14a;--rarity-legendary-accent:#f28a32;--rarity-mythic:#ed5964;
 --rarity-transcendent:#4edacb;--rarity-transcendent-accent:#a675f5;
 /* Button roles (VISUAL_STYLE.md §10): one face per meaning. Secondary = Close/Back/Cancel and
    utilities; commit = the action a popup exists for (Equip, Use, Merge, Learn…); claim = every
    Claim and Claim all; danger = destructive; disabled = solid grey parchment. Each set feeds the
    secondary plate's --small-top/-bottom/-edge/-lip/-shine. The primary pill keeps --bt-*;
    "go" (green) is the one advance colour: Start, Continue, Next day, Next floor. */
 --btn-secondary-top:#ffebbc;--btn-secondary-bottom:#d5ad71;--btn-secondary-edge:#3f302a;--btn-secondary-lip:#9f7448;--btn-secondary-shine:#fff8df;
 --btn-commit-top:#ffc76a;--btn-commit-bottom:#f0892c;--btn-commit-edge:#3b1f14;--btn-commit-lip:#b65a1d;--btn-commit-shine:#ffe9b8;
 --btn-claim-top:#b8ec6d;--btn-claim-bottom:#5bb73d;--btn-claim-edge:#1f3516;--btn-claim-lip:#3b872a;--btn-claim-shine:#e8ffc6;
 --btn-danger-top:#ff9a8e;--btn-danger-bottom:#e2544c;--btn-danger-edge:#4a1d1b;--btn-danger-lip:#a8322e;--btn-danger-shine:#ffd6d0;
 --btn-battle-top:#ff9f8f;--btn-battle-bottom:#e6465d;--btn-battle-edge:#4f1724;--btn-battle-lip:#a32f49;--btn-battle-shine:#ffd9d2;
 --btn-done-top:#c9e59a;--btn-done-bottom:#8fbf5a;--btn-done-edge:#2f4a1b;--btn-done-lip:#5f8f35;--btn-done-shine:#ecf8d6;
 --btn-disabled-top:#ddd3c4;--btn-disabled-bottom:#b8ab98;--btn-disabled-edge:#544a42;--btn-disabled-lip:#8e8270;--btn-disabled-shine:#f1eadf;
 --btn-primary-top:#ffc268;--btn-primary-face:#ff9c42;--btn-primary-low:#ef8037;--btn-primary-edge:#a94e32;--btn-rim:#171a29;
 --btn-go-top:#9de966;--btn-go-face:#70cc43;--btn-go-low:#48b742;--btn-go-edge:#297849;
}
/* AC816 (build 184, owner: "do tego to trzeba jakąś globalną regułę"): ONE text effect for outlined lettering,
   docs/SCREEN_RULES.md → Lettering: outline and drop. iOS 27 WebKit paints a `text-shadow` on stroked text under the
   last glyph only (b58 "2nd 9", b160 "only on the last letter", b184 AC800/AC816), so `text-shadow` is not used in any
   runtime stylesheet (gate backend/tests/text-effects.test.mjs). Outline = -webkit-text-stroke with paint-order
   stroke fill; drop = filter:drop-shadow() on the element that holds only the text (a filter draws from the painted
   layer, never per glyph). Lettering on a plate (button face, tab, title plate, ribbon, badge) takes the outline alone.
   New markup uses .ink-text and sets --ink (outline colour), optionally --ink-stroke and --ink-drop (0 = no drop). */
.ink-text{-webkit-text-stroke:var(--ink-stroke,var(--label-stroke)) var(--ink,var(--vs-ink));paint-order:stroke fill;text-shadow:none;filter:drop-shadow(0 var(--ink-drop,var(--label-drop)) 0 var(--ink,var(--vs-ink)))}
#skill-belt{flex:none;height:44px;display:flex;gap:6px;align-items:center;padding:3px 10px;background:#193348;border-bottom:1px solid #6e92922e}.book-shortcut{display:flex;align-items:center;gap:4px;background:none;border:0;font-size:9px;color:#d9d6c3;flex:none;padding:4px 0;min-height:34px}.book-shortcut .glyph{width:19px;height:19px}.learned-skills{display:flex;gap:5px;align-items:center;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}.learned{padding:0;flex:none;width:34px;height:34px;position:relative;background:none;border:0}.skill-icon{object-fit:contain;display:block;width:78px;height:78px;filter:none!important;opacity:1!important}.learned .skill-icon{width:34px;height:34px}.learned b{position:absolute;right:-1px;bottom:1px;display:grid;place-items:center;width:13px;height:13px;border-radius:4px;background:#132b3d;color:var(--gold-100);font-size:9px;border:1px solid #b39d5d}.learned-skills>.muted{font-size:10px}
.learned{width:59px;height:35px}.learned .skill-icon{width:27px;height:27px;margin:0 auto}.learned b{right:9px;bottom:10px;font-size:8px;width:11px;height:11px}.learned small{display:block;position:absolute;bottom:-1px;left:0;width:100%;font-size:7px;color:#d8e8e7;white-space:nowrap}.learned.skill-fired{background:none;box-shadow:none;outline:none;animation:none}.learned.skill-fired b{animation:skill-fire .65s ease-out}@keyframes skill-fire{0%,25%{background:var(--gold-100);color:#132b3d}100%{background:#132b3d;color:var(--gold-100)}}.learned:focus-visible{outline:2px solid #69cad9;outline-offset:-2px;border-radius:6px}@media(prefers-reduced-motion:reduce){.learned.skill-fired b{animation:none}}
#timeline{position:absolute;z-index:2;top:0;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:max-content max-content;align-items:center;gap:7px;width:max-content;max-width:calc(100% - 32px);height:48px;padding:4px 12px;background:linear-gradient(#142e43ed,#19394fe3);border:1px solid #d5b875;border-radius:22px;box-shadow:0 2px 0 #0d2238,0 3px 8px #0d223840;overflow:visible}
.route-label{font-size:8px;font-weight:900;letter-spacing:.3px;color:#f4dfae;padding-bottom:8px}
.days-rail{display:grid;grid-auto-flow:column;grid-auto-columns:max-content;align-items:start;width:max-content;height:38px;gap:0;padding:0}
.day-node{width:30px;gap:1px}.day-node .day-circle{width:27px;height:27px;border:1px solid #9b916e;background:#132b3d;box-shadow:0 1px 3px #050e1bcc}
.day-node .day-circle{position:relative;flex:none}
.day-node .day-circle .asset{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:28px;height:28px;max-width:none;object-fit:contain;filter:drop-shadow(0 1px 1px #0008)}
.day-node.current .day-circle{background:#6c592e;border:2px solid #fff0b0;box-shadow:0 0 0 2px #ffda7b44,0 0 6px #ffdb7760}
/* Story motion pass SM5: on the last two days of a route the boss node draws the eye: its icon swells three times,
   then rests (transform only; the strip stays put, AC616). Still under reduced motion. */
.day-node.boss-near .day-circle .asset{animation:day-boss-near 1.4s ease-in-out .45s 3 both}
@keyframes day-boss-near{0%,100%{transform:translate(-50%,-50%) scale(1)}30%{transform:translate(-50%,-50%) scale(1.24) rotate(-6deg)}55%{transform:translate(-50%,-50%) scale(1.12) rotate(4deg)}}
@media(prefers-reduced-motion:reduce){.day-node.boss-near .day-circle .asset{animation:none}}
.day-node small,.day-node:first-of-type small,.day-node.flag small{font-size:9px;padding:0;line-height:10px;letter-spacing:0;color:#dfebeb}.day-node.current small{color:var(--gold-100)}
.route-link{width:14px;height:27px;display:grid;place-items:center;font-size:17px;line-height:1;color:#e8c981}.route-link:not(.route-gap)::before{content:'';width:9px;height:2px;border-radius:2px;background:#e1c480}
#stats{height:56px;grid-template-columns:1.18fr 1.5fr .82fr .82fr;grid-template-rows:1fr;gap:8px;padding:5px 8px 7px;background:linear-gradient(#a0745e,#805849 55%,#67483f);border-top:2px solid #bd9276;border-bottom:3px solid #382c31;box-shadow:inset 0 1px 0 #e7b79860,inset 0 -2px 0 #b98a6c44}
#stats .stat{position:relative;display:block;min-width:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#stats .stat .stat-label{position:absolute;left:24px;right:0;top:-1px;display:block;margin:0;color:var(--cream-300);font-size:10px;line-height:12px;letter-spacing:.25px;font-weight:900;text-align:center;-webkit-text-stroke:2px #35242c;paint-order:stroke fill;filter:drop-shadow(0 1px 1px #2e2025);white-space:nowrap}
#xp-value{font-size:7px;font-weight:800;letter-spacing:0;margin-left:1px;color:#eddbc2}
#stats .stat .stat-well{position:absolute;display:flex;align-items:center;justify-content:center;left:14px;right:0;bottom:0;margin:0;min-width:0;height:25px;padding:0 3px 0 12px;border:2px solid #34212b;border-radius:15px;background:var(--panel-night);box-shadow:0 1px 0 #d5a38370,inset 0 2px 0 #0005;overflow:hidden;isolation:isolate}
#stats .stat .stat-symbol{position:absolute;z-index:3;left:-2px;top:7px;width:34px;height:35px;object-fit:contain;filter:drop-shadow(0 1px 0 #231820)}
#stats .stat .xp-track i,#stats .stat .hp-track i{display:block;position:absolute;left:0;top:0;height:100%;z-index:-1;transition:width .16s}
#stats .stat .xp-track i{background:linear-gradient(#73d543 0 18%,#4cb52e 19% 65%,#34932a 66%);border-right:1px solid #a0e360}
#stats .stat .hp-track i{background:linear-gradient(#fb7e8c 0 18%,#e75069 19% 65%,#c63854 66%);border-right:1px solid #ffacb6}
#stats .stat strong,#stats .stat.health strong{position:relative;display:block;line-height:20px;font-size:16px;font-weight:900;color:var(--paper);text-align:center;letter-spacing:-.3px;-webkit-text-stroke:2px #291a24;paint-order:stroke fill;filter:drop-shadow(0 1px #291a24);white-space:nowrap}
#stats .run-level .meter-text{display:flex;gap:3px;font-size:14px}#stats .run-level #level-value{font-size:15px}
#stats .stat.health strong{font-size:12px}#stats .stat.health em{font-size:11px;font-weight:900;font-style:normal;color:inherit}
#hp-percent{position:absolute;z-index:4;left:-3px;bottom:-3px;font-size:9px;line-height:11px;font-weight:900;color:var(--paper);-webkit-text-stroke:2px #291a24;paint-order:stroke fill}
@media(max-width:375px){#stats{gap:6px;padding-left:6px;padding-right:6px}#stats .stat .stat-symbol{width:31px;height:33px;left:-3px;top:9px}#stats .stat .stat-label{left:21px;font-size:9px}#stats .stat .stat-well{left:11px;padding-left:12px}#stats .stat.health strong{font-size:11px}#stats .stat.health em{font-size:10px}#stats .stat strong{font-size:15px}#xp-value{font-size:6.5px}}
#online button.primary,#modal button.primary{
  --bt-top:#ffc268;--bt-face:#ff9c42;--bt-low:#ef8037;--bt-edge:#a94e32;
  --press-depth:6px;--face-lip:6px;
  --button-shadow:0 6px 0 #171a29,inset 0 3px 0 #fff7d4a8,inset 0 calc(-1 * var(--face-lip)) 0 var(--bt-edge);
  --button-shadow-down:0 0 0 #171a29,inset 0 2px 0 #fff7d475,inset 0 -2px 0 var(--bt-edge);
  min-height:66px;width:calc(100% - 10px);margin:4px 5px 8px;padding:12px 18px;
  border-radius:999px;border:3px solid #171a29;gap:2px;
  font-family:Lucky,'Arial Rounded MT Bold','Arial Black',sans-serif;font-weight:400;font-size:32px;letter-spacing:.25px;line-height:1.1;
  background:linear-gradient(var(--bt-top),var(--bt-face) 65%,var(--bt-low));background-clip:padding-box;
  -webkit-text-stroke:0;text-shadow:none;
}
#online button.primary::before,#modal button.primary::before{content:'';position:absolute;left:19px;top:7px;width:16px;height:8px;border-radius:50%;background:#fff9dfb3;transform:rotate(-28deg);pointer-events:none}
#online button.primary>span{position:relative;min-width:0;overflow-wrap:anywhere}
/* Visual polish v1 (AC631): a primary pill's "!" hangs on its top edge like every other button's corner badge,
   never inline in the label row, so the label stays centred on the face. */
#online button.primary>.attention-badge{position:absolute;top:-7px;right:22px;left:auto}
#online button.primary.long-label{font-size:25px}
/* Visual polish v1: green "go" is the one advance colour (Start, Continue, Next day, Next floor, On the road),
   in the shell and in dialogs alike. */
:is(#online,#modal) button:is(.tone-green,.tone-go){--bt-top:var(--btn-go-top);--bt-face:var(--btn-go-face);--bt-low:var(--btn-go-low);--bt-edge:var(--btn-go-edge)}
#online button.tone-coral{--bt-top:#ff8c9e;--bt-face:#fa607d;--bt-low:#e54470;--bt-edge:#aa365b}
/* V6.17: full-bleed journal rule, quiet parchment entries and grouped rewards. */
#feed-heading{height:37px;margin:0;padding:0 12px;border-bottom:2px solid #bda77c;background:#efdfbb;color:#58472f;font-size:9px;letter-spacing:1.4px}
#latest-log{min-height:34px;padding:0 3px;color:#66583f;font-size:9px;font-weight:800;letter-spacing:.7px}
#latest-log:focus-visible{outline:2px solid #245c70;outline-offset:1px;border-radius:3px}
#feed{padding:6px 12px 12px;scrollbar-color:#aa916655 transparent}
.day-divider{justify-content:center;gap:9px;margin:7px 0 10px;color:#786446;font-size:10px;line-height:18px;font-weight:800;letter-spacing:.3px}
.day-divider:before,.day-divider:after{content:'';height:1px;flex:1;background:#bfa67980}
.log-entry{gap:9px;margin-bottom:9px;padding:11px 10px;border:1.5px solid #c8b387;border-radius:13px;background:var(--paper);color:var(--navy-600);box-shadow:0 2px 0 #b99f7133}
.log-entry.encounter,.log-entry.story{border-color:#c8b387}
.log-entry.good{border-color:#99af83;background:#fafbef}
.log-entry.bad{border-color:#ce9b86;background:#fff4e8}
.log-entry.level,.log-entry.skill{border-color:#cbaa55;background:var(--cream-350)}
.log-entry.lore{border-color:#a6b59b;background:#f2f6e7}
.log-entry h3{margin:1px 0 5px;color:#7b6441;font-size:9px;line-height:1.15;letter-spacing:.8px;font-weight:800}
.log-entry.good h3{color:#557343}.log-entry.bad h3{color:#9b4e3e}
.log-entry p{font-size:12px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.log-icon{display:grid;place-items:center;width:29px;height:30px;margin-top:1px;border-radius:8px;background:#ecdbb966;color:#8a6b39}
.log-icon .journal-emblem{width:27px;height:27px;object-fit:contain}
.log-icon .glyph{width:19px;height:19px;stroke-width:3}
.log-icon.journal-success{background:#dce8c5;color:#52743d;box-shadow:inset 0 0 0 1px #a7bb8699}
.log-icon.journal-warning{background:#f3d4ba;color:#a4623c;box-shadow:inset 0 0 0 1px #caa28299}
.log-icon.journal-reward{background:#edcf7680}
.log-changes{gap:5px;margin-top:9px;align-items:center}
.stat-change{min-height:24px;box-shadow:none}
.journal-xp,.journal-level{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #b99346;border-radius:9px;background:#f9dda0;color:#69461e;font-size:11px;line-height:1.2;font-weight:900;white-space:nowrap;font-variant-numeric:tabular-nums}
.journal-level{background:#30374c;color:var(--cream-350);border-color:#454d61}
.day-discovery{border:1.5px solid #c8b387;border-radius:13px;background:var(--paper);box-shadow:0 2px 0 #b99f7133}
@media(max-height:740px){#feed-heading{height:34px}.log-entry{padding:9px 9px;gap:8px;margin-bottom:8px}.log-entry p{font-size:11px}.log-icon{width:26px;height:27px}.log-icon .journal-emblem{width:25px;height:25px}.day-divider{margin:4px 0 8px}.log-changes{margin-top:7px}}
.change-symbol{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none}
/* F23 interim until the Max-HP icon (D1): a readable "Max HP +5%" caption, not
   the illegible 5px MAX tag. A heal keeps the bare heart and percentage. */
.stat-change .change-caption{font-size:11px;font-weight:800;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.stat-change .change-caption b{font-weight:900}

/* Host the existing HUD without changing server-owned state. */
#stats{display:grid;flex:none}#content.story-content{padding:0}
#skill-belt{background:linear-gradient(#293952,#1e2b43);height:44px;border-bottom:3px solid #101a2d}
.story-journal{background:linear-gradient(#efdfbb,var(--row-inset));color:var(--navy-600)}
#feed-heading{display:flex;align-items:center;justify-content:space-between}
#latest-log{background:none;border:0}
#feed{max-height:230px;min-height:120px;overflow-y:auto}
.log-entry{display:flex}.log-entry>div{min-width:0;flex:1}.log-entry p{margin:0}
.log-icon{flex:none}.log-changes{display:flex;flex-wrap:wrap}
.stat-change{display:inline-flex;align-items:center;gap:3px;padding:1px 7px 1px 2px;border:1px solid #394354;border-radius:var(--vs-radius);background:#242b38;color:#b3ed8e;font-size:11px}
.stat-change.negative{color:#ffb5a6}.change-icon{width:20px;height:20px;object-fit:contain}
#story-overlay{position:absolute;top:48px;left:0;right:0;pointer-events:none;text-align:center}
#round-label{display:block;font-family:Lucky;font-size:28px;color:#fff;-webkit-text-stroke:3px var(--ink-navy);paint-order:stroke fill;filter:drop-shadow(0 2px var(--ink-navy))}
.day-node{display:flex;flex-direction:column;align-items:center}.day-circle{display:grid;place-items:center;border-radius:50%}
#playback{top:96px;right:8px}
#online button.primary{position:relative;display:flex;align-items:center;justify-content:center;box-shadow:var(--button-shadow);color:#fff;-webkit-text-stroke:3px var(--ink-navy);paint-order:stroke fill;text-shadow:none}
#online button.primary:disabled{opacity:1;cursor:default}
#online button.primary:disabled:not([data-busy-lock]){filter:saturate(.45)}
#online button.primary[data-action^="story."],#online button.primary[data-action="weapon-modal"]{--bt-top:var(--btn-go-top);--bt-face:var(--btn-go-face);--bt-low:var(--btn-go-low);--bt-edge:var(--btn-go-edge)}
#content.story-content>button.primary{margin:18px 12px 22px;width:calc(100% - 24px)}
@media(max-height:760px){#world{height:235px}#feed{max-height:170px}#online button.primary{min-height:58px;font-size:29px}}
#story-overlay .hub-route-arrows{display:flex;justify-content:space-between;padding:0 10px;margin-top:28px}
#story-overlay .hub-route-arrows button{pointer-events:auto;background:#ffebbb;color:#24344c;border:3px solid #192538;border-radius:15px;font:bold 38px/1 sans-serif;width:44px;height:52px;padding:0}
.hub-start{margin-bottom:18px}
/* F13: travel keeps the Day timeline; the next encounter rolls as a pending
   journal entry that cycles generic kinds, then lands on the revealed entry. */
.log-entry.is-rolling{border-style:dashed;border-color:#c3a466;background:var(--cream-50)}
.log-icon.journal-roll{position:relative;overflow:hidden;background:var(--navy-600);box-shadow:inset 0 0 0 1.5px #d7b16a}
.journal-roll .roll-reel{position:absolute;inset:0}
.journal-roll .roll-icon{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);object-fit:contain;opacity:0;animation:journal-roll-cycle 1s steps(1) infinite}
.journal-roll .roll-icon:nth-child(2){animation-delay:-.8s}.journal-roll .roll-icon:nth-child(3){animation-delay:-.6s}.journal-roll .roll-icon:nth-child(4){animation-delay:-.4s}.journal-roll .roll-icon:nth-child(5){animation-delay:-.2s}
@keyframes journal-roll-cycle{0%,19.9%{opacity:1}20%,100%{opacity:0}}
/* H04 (build 23): the pending entry reserves the landed text's two lines (line
   height x 2, in the p's own em), so the reveal never changes the card height; the
   single-line reel runs in its own 18px window inside that box. */
.log-entry.is-rolling .roll-lines{height:3em;overflow:hidden}
.journey-view #feed .log-entry.is-rolling .roll-lines{height:2.7em}
.roll-window{display:block;height:18px;overflow:hidden}
.roll-track{display:block;animation:journal-roll-lines calc(var(--roll-lines,8)*.3s) steps(var(--roll-lines,8)) infinite}
.roll-track>span{display:block;height:18px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@keyframes journal-roll-lines{to{transform:translateY(-100%)}}
.roll-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.log-entry.just-revealed{animation:journal-landed .7s ease-out both}
.log-entry.just-revealed>.log-icon,.log-entry.just-revealed>div{animation:journal-text-in .32s ease-out both}
@keyframes journal-text-in{from{opacity:0}to{opacity:1}}
@keyframes journal-landed{0%{background:var(--shine-100);box-shadow:0 0 0 3px #f2c75c,0 2px 0 #b99f7133}100%{box-shadow:0 0 0 0 #f2c75c00,0 2px 0 #b99f7133}}
@media(prefers-reduced-motion:reduce){.journal-roll .roll-icon{animation:none}.journal-roll .roll-icon:last-child{opacity:1}.roll-track{animation:none}.log-entry.just-revealed,.log-entry.just-revealed>.log-icon,.log-entry.just-revealed>div{animation:none}}
.tower-view{height:100dvh;max-height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.tower-view #profile{flex:none}.tower-view #stage{flex:none}
.tower-view #world{height:clamp(170px,30dvh,260px)}
.tower-view #content{flex:1;min-height:0;overflow-y:auto;padding:10px 12px}
.tower-view #tabs{display:none}.tower-view #playback{top:90px}
.tower-panel{text-align:center;display:flex;flex-direction:column;gap:8px}
.tower-panel h1,.tower-panel h2,.tower-panel p{margin:0}
.tower-panel h2{font-size:21px}.tower-panel h1{font-size:38px}
.tower-panel .primary{min-height:54px;font-size:27px;margin:4px 0 8px}
.tower-panel .secondary{align-self:center;padding:7px 16px}
.tower-panel details{text-align:left;background:#ffffff10;border-radius:10px;padding:8px}
.tower-panel .tower-loadout{max-height:160px;overflow:auto}
.tower-selected{display:flex;justify-content:center;gap:16px}.tower-selected img{width:38px;height:38px;object-fit:contain}
.tower-auto{font-size:13px}.tower-loot img{width:26px;height:26px;vertical-align:middle}
.tower-result{border:2px solid #c9ac6b;border-radius:18px;background:var(--cream-300);color:var(--navy-600);padding:14px}
.tower-result.lost{background:#dfd8ed;border-color:#9d8abb}
/* Compact resource chrome retains illustrated icons; secondary actions live in Menu. */
#profile{gap:6px;padding:6px 8px;min-height:56px}
#profile>.profile-identity{flex:1;min-width:48px}
#profile .profile-identity>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
#profile .energy-pill{display:flex;align-items:center;gap:3px;height:44px;min-width:92px;padding:3px 5px;border:2px solid #405e70;border-radius:24px;background:#132f3d;box-shadow:inset 0 2px #70919b44;text-shadow:none}
#profile .energy-pill img{width:23px;height:32px}
#profile .energy-pill b{font:800 13px system-ui;margin:0;color:#ffe7ac}
#profile .energy-pill small{font-size:9px;color:#a8bfca}
#profile .energy-pill span{display:grid;place-items:center;width:19px;height:24px;border-radius:6px;background:#496b73;font-weight:800}
#profile .coin-pill{display:flex;align-items:center;gap:3px;white-space:nowrap}
#profile .coin-pill img{width:24px;height:29px}
#profile .coin-pill b{font:700 12px system-ui;margin:0}
#profile .profile-tools{gap:1px;margin:0}
#profile .server-badge{min-width:44px;min-height:44px;border:0;background:none;position:relative;isolation:isolate;padding:0}
#profile .server-badge:before{content:'';position:absolute;inset:12px 2px;background:var(--gold-100);border:1px solid #cba651;border-radius:6px;z-index:-1}
#profile .settings-icon{width:44px;height:44px;padding:7px;border:3px solid var(--ink-navy);border-radius:13px;background:linear-gradient(#a6a2bf,#75718e);box-shadow:inset 0 2px #d8d4e6,0 2px #101627}
#profile .settings-icon img{width:24px;height:24px}
#tabs{display:flex!important;position:sticky;bottom:0;flex:none;gap:8px;padding:6px 10px max(6px,var(--safe-bottom, env(safe-area-inset-bottom,0px)));z-index:3}
#tabs:empty{display:none!important}
#tabs .bottom-tab{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;border:3px solid var(--ink-navy);border-radius:13px;background:linear-gradient(#aaa5c3,#716d91);color:var(--cream-250);font:19px Lucky,sans-serif;box-shadow:inset 0 2px #e0dcef55,0 2px #12192a}
#tabs .bottom-tab img{width:27px;height:30px;object-fit:contain}
.hub-view#online{height:100dvh;min-height:0;max-height:100dvh;margin:0 auto;display:flex;flex-direction:column;padding-top:var(--safe-top, env(safe-area-inset-top,0px));border-width:0;border-radius:0;overflow:hidden}
.hub-view #profile{flex:none;background:linear-gradient(#2c415f,#1d2d44);border-bottom:2px solid #415874}
.hub-view #stage{flex:1;min-height:160px;display:flex;flex-direction:column}
.hub-view #scene-title{font-size:10px;letter-spacing:1.7px;text-transform:uppercase;text-align:center;padding:5px;flex:none}
.hub-view #world{height:0;flex:1;min-height:0;width:100%}
.hub-view #story-overlay{top:29px;bottom:0}
.hub-view #story-overlay .hub-route-arrows{position:absolute;top:48%;left:0;right:0;margin:0;padding:0 10px}
.hub-shortcut{pointer-events:auto;position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;width:52px;min-height:56px;padding:3px;border:2px solid #173046;border-radius:13px;color:#fff5cf;background:#20354be8;box-shadow:inset 0 1px #93abc355,0 3px #111e31a0}
.hub-shortcut img{width:29px;height:31px;object-fit:contain}.hub-shortcut small{font-weight:800;font-size:10px}.menu-lines{font-size:24px;line-height:28px}
.hub-menu{left:7px;top:8px}.hub-calendar{right:7px;top:8px}.hub-events{right:10px;bottom:15px;width:64px;border-color:#e3c578;background:linear-gradient(#334f70,#182d44)}
.hub-view #content{flex:none;padding:8px 10px 10px;background:linear-gradient(var(--navy-600),#1c2e45)}
.hub-launch .primary{width:100%;margin:0 0 12px!important;min-height:60px!important;font-size:25px!important;line-height:1.1}
.hub-bottom-boxes{display:grid;grid-template-columns:1fr 92px;gap:8px}
.hub-travel-box,.hub-afk-box{min-height:54px;border:2px solid #a28b61;border-radius:13px;background:linear-gradient(var(--cream-350),#e2c796);color:#293e4a;padding:4px 7px;display:flex;align-items:center;gap:7px;text-align:left}
.hub-travel-box>img{width:35px;height:37px;object-fit:contain}.hub-travel-box span{flex:1;min-width:0}.hub-travel-box b{font:18px Lucky}.hub-travel-box small{display:block;font-size:10px}.hub-travel-box strong{font-size:25px}
.hub-afk-box{display:grid;grid-template-columns:25px 1fr;gap:0 3px;text-align:center}.hub-afk-box img{width:25px;height:27px;object-fit:contain}.hub-afk-box small{grid-column:1/-1;font-size:10px}.hub-afk-box b{font-size:14px}
.event-pages{display:grid;gap:10px}.event-card{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:2px 10px;text-align:left;padding:14px;border:2px solid #8d774d;border-radius:16px;background:var(--navy-600);color:var(--gold-50);min-height:86px}.event-card img{grid-row:span 2;width:44px;height:44px;object-fit:contain}.event-card b{font:23px Lucky}.event-card small{font-size:11px}
.menu-grid{display:grid;gap:5px}.menu-grid button{width:100%;min-height:44px}
.eq-view#online{height:100dvh;min-height:0;max-height:100dvh;margin:0 auto;display:flex;flex-direction:column;padding-top:var(--safe-top, env(safe-area-inset-top,0px));border-width:0;border-radius:0;overflow:hidden}
.eq-view #profile,.eq-view #content{flex:none}.eq-view #stage{flex:1;min-height:210px;display:flex;flex-direction:column}.eq-view #world{height:0;flex:1;min-height:0}.eq-view #scene-title{font-size:11px;text-align:center;padding:5px}
.eq-view #story-overlay{top:35px;bottom:12px}.eq-scene-slots{height:100%;display:grid;grid-template-columns:54px 54px;justify-content:space-between;align-content:center;gap:10px;padding:0 9px}
.eq-view .eq-combat-power{position:absolute;top:calc(83% + 12px);left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:7px;min-width:94px;height:28px;padding:0 13px;border:1px solid #b79a64;border-radius:15px;background:linear-gradient(#363039,#201e27);box-shadow:0 2px #aa885333;color:#ffda80;white-space:nowrap}
.eq-combat-power img{width:25px;height:25px;object-fit:contain}
.eq-combat-power strong{font:20px/1 Lucky,sans-serif;font-variant-numeric:tabular-nums;filter:drop-shadow(0 1px #100e16)}
/* A server-confirmed, non-blocking power receipt after gear changes. */
#combat-power-change{position:fixed;z-index:var(--z-status);top:44%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:10px;width:min(322px,calc(100vw - 28px));min-height:72px;padding:9px 14px;border:2px solid #d8b978;border-radius:17px;background:linear-gradient(145deg,#423540,#252731);box-shadow:inset 0 2px #fff0c035,0 5px 0 #171924,0 14px 28px #11172370;color:var(--cream-300);pointer-events:none;isolation:isolate}
#combat-power-change .power-change-icon{flex:none;display:grid;place-items:center;width:39px;height:39px;border-radius:11px;background:#191e2b;border:1px solid #8c765c}
#combat-power-change .power-change-icon img{width:34px;height:34px;object-fit:contain}
#combat-power-change .power-change-body{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;gap:1px}
#combat-power-change .power-change-body small{font:800 11px/1.1 system-ui,sans-serif;letter-spacing:.3px;color:var(--row-inset)}
#combat-power-change .power-change-values{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;font:20px/1 Lucky,sans-serif;letter-spacing:-.25px;font-variant-numeric:tabular-nums;white-space:nowrap}
#combat-power-change .power-change-values b{color:#c8bdad;font-weight:400}
#combat-power-change .power-change-values i{font:700 16px/1 system-ui,sans-serif;color:#dfcfad;font-style:normal}
#combat-power-change .power-change-values strong{color:var(--cream-350);font-weight:400}
#combat-power-change .power-change-values em{display:grid;place-items:center;flex:none;width:25px;height:25px;border-radius:8px;background:#285b48;color:#b9ffc8;font:900 18px/1 system-ui,sans-serif;font-style:normal}
#combat-power-change.down .power-change-values em{background:#733c45;color:#ffd1be}
#combat-power-change.same .power-change-values em{background:#4f4d55;color:#e4ddcd}
#combat-power-change .power-change-detail{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 12px/1.2 system-ui,sans-serif;color:#d9f2c0}
.training-power{display:inline-flex;align-items:center;gap:3px;vertical-align:middle;font-weight:800}
.training-power img{width:17px;height:17px;object-fit:contain}
#combat-power-change.entering{animation:combat-power-enter .24s var(--ease-out) both}
#combat-power-change.leaving{animation:combat-power-leave .24s ease-in both}
@keyframes combat-power-enter{from{opacity:0;transform:translate(-50%,calc(-50% + 11px)) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes combat-power-leave{to{opacity:0;transform:translate(-50%,calc(-50% - 8px)) scale(.98)}}
@media(max-width:375px){#combat-power-change{gap:7px;padding-inline:10px}#combat-power-change .power-change-values{font-size:18px;gap:4px}}
@media(prefers-reduced-motion:reduce){#combat-power-change.entering,#combat-power-change.leaving{animation:none}}
/* P11 (build 27): over a training milestone the strip is the dialog's only Combat
   Power readout; it hangs in the safe top band so it never covers the rank title. */
#modal:has(.milestone-celebration)>#combat-power-change{top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 44px)}
/* AC786 (build 178): the shared upgrade moment (uiUpgradeMoment in ui-components.ts) for Blip Upgrade and a Training
   step. A pointer-transparent full-viewport status layer; the card centres on --upgrade-moment-y (AC798: one fixed
   slot at 38% of the viewport, below the header, never under mid-screen). The subject art stands out of the card's top edge over rays and a glow;
   the gold badge carries the new level. Motion is script-driven (transform/opacity); this is the still end state. */
#upgrade-moment{position:fixed;inset:0;z-index:var(--z-status);pointer-events:none;overflow:hidden;contain:layout paint}
#upgrade-moment[hidden]{display:none}
#upgrade-moment *{pointer-events:none;-webkit-user-select:none;user-select:none}
.upgrade-moment-card{position:absolute;left:50%;top:var(--upgrade-moment-y,36%);translate:-50% -50%;box-sizing:border-box;width:min(296px,calc(100vw - 40px));display:flex;flex-direction:column;align-items:center;gap:6px;padding:0 14px 14px;color:var(--cream-300);text-align:center;isolation:isolate}
.upgrade-moment-card:before{content:'';position:absolute;z-index:-1;inset:50px 0 0;border:2px solid #d8b978;border-radius:20px;background:radial-gradient(120% 70% at 50% 0,#6b5338 0,#4a3a44 42%,#262833 100%);box-shadow:inset 0 2px #fff0c040,0 5px 0 #171924,0 16px 34px #11172388}
.upgrade-moment-stage{position:relative;width:108px;height:108px;display:grid;place-items:center}
.upgrade-moment-stage>*{grid-area:1/1}
.upgrade-moment-rays{position:absolute;inset:-42px;border-radius:50%;background:repeating-conic-gradient(#ffe08a99 0deg 9deg,#ffe08a00 9deg 30deg);-webkit-mask-image:radial-gradient(closest-side,#0000 24%,#000 40%,#0009 66%,#0000 100%);mask-image:radial-gradient(closest-side,#0000 24%,#000 40%,#0009 66%,#0000 100%);opacity:.85}
.upgrade-moment-glow{position:absolute;inset:-8px;border-radius:50%;background:radial-gradient(circle,#fff6d0 0,#ffd36bc0 34%,#ffd36b00 70%);opacity:.55}
.upgrade-moment-ring{position:absolute;inset:14px;border-radius:50%;border:3px solid var(--gold-100);box-shadow:0 0 10px #ffd36b,inset 0 0 8px #ffd36b;opacity:0}
.upgrade-moment-spark{position:absolute;left:50%;top:50%;width:9px;height:9px;border-radius:2px;background:var(--shine-100);box-shadow:0 0 6px #ffd36b;opacity:0;transform:translate(-50%,-50%) rotate(45deg)}
.upgrade-moment-spark:nth-of-type(odd){width:6px;height:6px;background:var(--honey-200)}
.upgrade-moment-art{position:relative;width:100px;height:100px;object-fit:contain;filter:drop-shadow(0 4px 0 #0000004d) drop-shadow(0 0 10px #ffe08a80)}
.upgrade-moment-level{position:absolute;right:-22px;bottom:0;box-sizing:border-box;min-width:44px;height:44px;padding:0 9px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(#fff0a8,#f2b544 58%,#d98d26);border:2.5px solid #fff6d0;box-shadow:0 3px 0 #7a4a15,0 0 14px #ffd36bb3;color:#fff;font:24px/1 Lucky,system-ui;-webkit-text-stroke:.1em #7a4413;paint-order:stroke fill;text-shadow:none;font-variant-numeric:tabular-nums}
.upgrade-moment-title{max-width:100%;margin-top:2px;color:#fff;font:22px/1.1 Lucky,system-ui;-webkit-text-stroke:.09em var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 2px 0 var(--vs-ink));text-wrap:balance}
.upgrade-moment-gains{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.upgrade-moment-gain{display:inline-flex;align-items:center;gap:5px;min-height:30px;box-sizing:border-box;padding:3px 11px 3px 6px;border-radius:999px;background:#1d3f33;border:1.5px solid #4f9a73;color:#d9ffd8;font:800 14px/1.1 system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
.upgrade-moment-gain:not(:has(img)){padding-left:11px}
.upgrade-moment-gain img{width:22px;height:22px;object-fit:contain}
.upgrade-moment-gain b{color:#b7c9bd;font-weight:800}
.upgrade-moment-gain strong{color:#fff;font-weight:900}
.upgrade-moment-gain .ui-icon{width:14px;height:14px;margin:0 2px}
@media(max-width:375px){.upgrade-moment-title{font-size:20px}}
/* AC798 (build 182, owner: "raczej bez hero tylko jakaś cool animacja"): a moment without subject art (Training) is a
   code-drawn gold medallion carrying the level, with a second late ring, rising motes and a shine sweep (all driven
   by uiUpgradeMomentPlay); this is the still end state, also the reduced-motion card. No painted art. */
.upgrade-moment-card.is-emblem:before{inset:46px 0 0}
.upgrade-moment-card.is-emblem .upgrade-moment-stage{width:112px;height:100px}
.upgrade-moment-card.is-emblem .upgrade-moment-rays{inset:-48px}
.upgrade-moment-card.is-emblem .upgrade-moment-glow{inset:-14px}
.upgrade-moment-card.is-emblem .upgrade-moment-ring{inset:10px}
.upgrade-moment-ring.is-late{border-width:2px;border-color:var(--shine-100)}
.upgrade-moment-emblem{position:relative;box-sizing:border-box;width:80px;height:80px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle at 50% 28%,#fff8d6 0,#ffe08a 26%,#f4b84a 60%,#cf7f22 100%);border:3px solid #fff6d0;box-shadow:0 0 0 3px #7a4a15,0 5px 0 3px #4a2a0c,0 0 24px 4px #ffd36bb3,inset 0 -7px 10px #a5621a8c,inset 0 4px 5px #fffbe6}
.upgrade-moment-emblem:before{content:'';position:absolute;inset:7px;border-radius:50%;border:2px solid #fff3c08c;box-shadow:inset 0 0 0 2px #b8701f40}
.upgrade-moment-card.is-emblem .upgrade-moment-level{position:relative;z-index:1;right:auto;bottom:auto;min-width:0;height:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none;font-size:38px;-webkit-text-stroke:.11em #7a4413;filter:drop-shadow(0 3px 0 #7a4413)}
.upgrade-moment-emblem[data-digits="3"] .upgrade-moment-level{font-size:30px}
.upgrade-moment-shine{position:absolute;z-index:2;top:-20%;bottom:-20%;left:0;width:36%;background:linear-gradient(90deg,#fff0,#fffdf0e6 50%,#fff0);opacity:0;transform:translateX(-170%) rotate(20deg);mix-blend-mode:screen}
.upgrade-moment-mote{position:absolute;left:50%;top:50%;width:14px;height:14px;background:#fffbe6;filter:drop-shadow(0 0 4px #ffd36b);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0;transform:translate(-50%,-50%)}
.upgrade-moment-mote:nth-of-type(3n){width:10px;height:10px;background:var(--honey-200)}
.eq-scene-slots button{pointer-events:auto;min-height:57px;background:#f4e7c5;border:2px solid #927446;border-radius:var(--vs-radius);color:#293b53;padding:4px;display:flex;flex-direction:column;align-items:center}.eq-scene-slots img{width:32px;height:32px;object-fit:contain}.eq-scene-slots small{font-size:10px;font-weight:750}
.eq-view #content{padding:8px 10px 10px;background:linear-gradient(var(--cream-250),var(--row-inset));color:var(--navy-600)}
.eq-summary{text-align:center}.eq-summary h2{font-size:20px;margin:0 0 5px}.eq-summary>small{font-size:9px}
.eq-shortcuts{display:flex;gap:8px;margin-top:5px}.eq-shortcuts button{flex:1;min-height:44px;margin:0;font-size:17px}
.eq-training{display:flex;align-items:center;gap:6px;padding:8px;border:2px solid #ac8c59;border-radius:var(--vs-radius);background:var(--cream-250);margin-top:8px}.eq-training>div{flex:1}.eq-training small{display:block;font-size:10px}.eq-training p{font-size:10px;margin:3px 0 0}.eq-training .secondary{font-size:16px;min-height:44px;margin:0;padding:6px 9px}
#profile .settings-icon{font-size:25px;line-height:24px;text-shadow:none}
.skill-view#online,.journey-view#online{height:100dvh;min-height:0;max-height:100dvh;margin:0 auto;border:0;border-radius:0;display:flex;flex-direction:column;padding-top:var(--safe-top, env(safe-area-inset-top,0px))}
.skill-view #content{position:relative;isolation:isolate;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:54px 12px 16px}
.skill-draft-backdrop{position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 50% 15%,#6b5b4555,transparent 65%),var(--ink-plum-2)}
.skill-draft-backdrop canvas{display:block;width:100%;height:100%;opacity:.13}
/* Story motion pass, step U3 (SM3, story-ui.ts storyRunEntry*): the Story selector's stage as a still on the starting
   draft's backdrop. .run-entry-world carries the scenery repainted without actors and, over it, the live picture
   with the hero; it pushes in to the backdrop's framing (transform) while .run-entry-dim, the backdrop's own ground,
   comes over the opaque picture (opacity). .run-entry-chrome holds the Start button's copy as it drops away. */
.run-entry{position:fixed;inset:0;z-index:22;overflow:hidden;pointer-events:none}
.skill-draft-backdrop>.run-entry{position:absolute;z-index:auto}
.run-entry-world{position:absolute;transform-origin:0 0;will-change:transform}
.run-entry .run-entry-world>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;opacity:1}
.run-entry-dim{position:absolute;inset:0;opacity:0}
.run-entry-chrome{position:fixed;inset:0;z-index:44;pointer-events:none}
/* SM3, the return leg (review fix): the starting draft's answer pulls the picture back to the run stage. .run-arrive
   lies in #stage right over the stage canvas: .run-entry-world is a mirror of the live stage picture (and of the
   safe-area band above it), moved from the backdrop's framing to its own box (transform); .run-entry-dim is the
   backdrop's ground lifting off it (opacity); .run-arrive-floor is the page's ground under the lower panel as it
   rises. The run HUD and the lower panel paint above it while it plays (#online is a flex column). */
.run-arrive{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.run-arrive .run-entry-world>canvas{position:absolute;left:0;display:block;width:100%;opacity:1}
.run-arrive-floor{position:absolute}
#online.run-arriving>#content{z-index:1}
.skill-draft{width:100%;max-width:440px;display:flex;flex-direction:column;gap:16px}
.skill-draft-header{position:relative;text-align:center;isolation:isolate}
.skill-draft-mascot{position:relative;height:100px;width:150px;margin:auto;isolation:isolate}
.skill-spotlight{position:absolute;left:calc(50% - 114px);top:-48px;width:228px;height:228px;z-index:-1;pointer-events:none}
.skill-spotlight-glow,.skill-spotlight-rays{position:absolute;inset:0;border-radius:50%;pointer-events:none}
.skill-spotlight-glow{background:radial-gradient(circle,var(--spotlight-glow-core,#fff0c970) 0%,var(--spotlight-glow-mid,#ffe2a33d) 30%,var(--spotlight-glow-edge,#ffd48b14) 48%,transparent 70%);opacity:.8;animation:skill-spotlight-breathe 5s ease-in-out infinite}
.skill-spotlight-rays{background:repeating-conic-gradient(from 8deg,transparent 0deg 5deg,#fff2d15c 7deg 16deg,transparent 19deg 30deg);-webkit-mask-image:radial-gradient(circle,#000 10%,#000b 34%,transparent 68%);mask-image:radial-gradient(circle,#000 10%,#000b 34%,transparent 68%);animation:skill-spotlight-turn 64s linear infinite}
.skill-spotlight-star{position:absolute;width:13px;height:17px;background:var(--spotlight-twinkle,#fff4d7);clip-path:polygon(50% 0,63% 35%,100% 50%,63% 65%,50% 100%,37% 65%,0 50%,37% 35%);opacity:.75;animation:skill-spotlight-twinkle 3.8s ease-in-out infinite;pointer-events:none}
.skill-spotlight-star:nth-of-type(1){left:10%;top:40%;animation-delay:-.7s}
.skill-spotlight-star:nth-of-type(2){right:12%;top:28%;width:10px;height:14px;animation-delay:-2.1s}
.skill-spotlight-star:nth-of-type(3){left:24%;top:13%;width:8px;height:11px;animation-delay:-3.2s}
.skill-spotlight-star:nth-of-type(4){right:22%;top:65%;width:9px;height:12px;animation-delay:-1.5s}
@keyframes skill-spotlight-turn{to{transform:rotate(360deg)}}
@keyframes skill-spotlight-breathe{0%,100%{opacity:.65;transform:scale(.96)}50%{opacity:1;transform:scale(1.04)}}
@keyframes skill-spotlight-twinkle{0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:.95;transform:scale(1)}}
body:has(#modal[open]) .skill-spotlight>*{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.skill-spotlight>*{animation:none!important}.skill-spotlight-glow{opacity:.8}.skill-spotlight-star{opacity:.7}}
.skill-draft-mascot img{display:block;width:100%;height:120px;object-fit:contain;object-position:top}
.skill-draft-header h1{position:relative;margin:-6px 10px 0;padding:9px 8px 11px;border:3px solid #372a2e;border-radius:10px;background:linear-gradient(#ffe99a,#ffcc55 70%,#edaa3b);box-shadow:inset 0 2px #fff7cd,0 4px #a36b33,0 7px #1b172a66;font:29px/1.05 Lucky,sans-serif;color:var(--paper);-webkit-text-stroke:var(--label-stroke,.14em) #3c2b29;paint-order:stroke fill;text-shadow:none}
.skill-draft-header h1:before,.skill-draft-header h1:after{content:'';position:absolute;width:20px;height:30px;top:14px;z-index:-1;background:#cf8439;border:3px solid #372a2e;border-radius:5px;transform:rotate(8deg)}
.skill-draft-header h1:before{left:-14px}.skill-draft-header h1:after{right:-14px;transform:rotate(-8deg)}
.skill-draft-header p{margin:11px 0 0;font:600 13px/1.25 system-ui;color:#e9dfc9}
/* AC831: the intro drafts' one-line hint and their (?) in the header's free top-right corner. */
.skill-draft-header .skill-draft-hint{margin:10px 18px 0;font-size:14px;color:#f3ead6;text-wrap:balance}
.skill-draft-header>.help-button{position:absolute;top:2px;right:6px;z-index:3;width:44px;height:44px;min-height:44px;margin:0}
.skill-offers{display:grid;gap:14px}
.skill-view .skill-offer{position:relative;display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:10px;min-height:126px;padding:9px;margin:0;border:2px solid #44363b;border-radius:15px;background:linear-gradient(110deg,var(--cream-250),#f3e2bd);box-shadow:inset 0 2px #fffced,0 4px #a78a5d,0 6px #16152080;color:#342d32;text-align:left}
.skill-offer-art{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;align-self:center;width:78px;height:94px;padding:4px 3px 23px;border:3px solid #463c4e;border-radius:var(--vs-radius);background:linear-gradient(145deg,#c9c2d6,#928ca8);box-shadow:inset 0 2px #e9e4f3,inset 0 -3px #746d89,0 2px #302735}
.skill-view .skill-offer-art img{width:68px;height:68px;object-fit:contain;filter:drop-shadow(0 2px #53433555)}
.skill-offer-rank{position:absolute;bottom:0;inset-inline:0;display:block;min-height:22px;padding:3px 0;background:#494154;border-top:1px solid #726880;border-radius:0 0 7px 7px;color:var(--cream-350);font:700 11px/1.25 system-ui;text-align:center;white-space:nowrap}
.skill-offer-check{display:none;position:absolute;z-index:2;right:-8px;bottom:17px;width:25px;height:25px;border:2px solid #254534;border-radius:50%;background:#bce48b;color:#254534;font:800 18px/21px system-ui;text-align:center}
.skill-offer-copy{display:flex;flex-direction:column;align-self:stretch;min-width:0;justify-content:center}
.skill-offer-name{display:block;border-bottom:1px solid #c4ad8377;padding:0 0 5px;font:22px/1.05 Lucky,sans-serif;color:#382d37}
.skill-offer-cadence{display:block;align-self:flex-start;max-width:100%;margin-top:6px;padding:2px 7px;border-radius:999px;background:var(--row-inset);box-shadow:inset 0 0 0 1px #cdb381;color:#685338;font:750 10px/1.2 system-ui;letter-spacing:.35px;text-transform:uppercase}
.skill-offer-effect{display:block;margin-top:5px;font:14px/1.32 system-ui;color:#342e30}
.skill-offer-effect strong{font-weight:800;color:#286276;white-space:nowrap}
/* Category tag on the frame's top edge, trigger chip and one emphasized keyword.
   Neutral plum/parchment tones: skill groups must not read as item rarity. */
.skill-offer-group{position:absolute;top:-10px;left:50%;z-index:1;display:flex;align-items:center;gap:2px;transform:translateX(-50%);padding:1px 6px 1px 3px;border:2px solid var(--ink-plum);border-radius:7px;background:#4a4057;box-shadow:inset 0 1px #7b6f8c;color:var(--cream-350);font:800 9px/1.3 system-ui;letter-spacing:.3px;text-transform:uppercase;white-space:nowrap}
.skill-view .skill-offer-art .skill-offer-group img{width:13px;height:13px;object-fit:contain;filter:none}
.skill-offer-effect .skill-keyword{font-style:normal;font-weight:750;color:#2b5f9e}
.skill-view .skill-offer.selected{border-color:#6e9b5c;background:linear-gradient(110deg,#f5ffdf,#e1edbe);box-shadow:inset 0 0 0 2px #b6d887,0 4px #526b46,0 6px #16152080}
.skill-offer.selected .skill-offer-check{display:block}
/* K11 (build 26): rank 3 is the separate legendary art, marked by a gold frame
   (docs/RARITY_COLORS.md Legendary #FFC14A / #F28A32) and a "Legendary" label. */
.skill-legendary-tag{display:inline-block;align-self:flex-start;width:max-content;padding:2px 8px;border:2px solid #9a5a1c;border-radius:999px;background:linear-gradient(#ffd66e,var(--rarity-legendary) 55%,var(--rarity-legendary-accent));color:#4a2708;font:800 10px/1.25 system-ui,-apple-system,sans-serif;letter-spacing:.3px;text-transform:uppercase;white-space:nowrap}
.skill-view .skill-offer.legendary .skill-legendary-tag{position:absolute;z-index:2;top:-11px;right:12px}
.skill-view .skill-offer.legendary .skill-offer-art{border-color:#9a5a1c;background:linear-gradient(145deg,var(--honey-200),var(--rarity-legendary) 55%,var(--rarity-legendary-accent));box-shadow:inset 0 2px var(--gold-50),0 0 0 2px #ffc14a88}
.skill-view .skill-offer.legendary .skill-offer-rank{background:#8a4f17;border-top-color:#f2b24a}
#modal section.skill .skill-art-frame{display:grid;place-items:center;align-self:start;width:70px;height:80px;border-radius:14px}
#modal section.skill.legendary .skill-art-frame{border:3px solid #9a5a1c;background:linear-gradient(145deg,var(--honey-200),var(--rarity-legendary) 55%,var(--rarity-legendary-accent));box-shadow:inset 0 2px var(--gold-50)}
#modal section.skill.legendary .skill-art-frame img{width:60px;height:66px}
#modal section.skill.legendary{border-color:#9a5a1c;background:linear-gradient(110deg,var(--cream-250),var(--gold-100))}
#modal section.skill .skill-legendary-tag{margin:0 0 4px}
#modal section.skill .skill-legendary-preview{display:flex;align-items:center;gap:6px;margin:0 0 4px;font:750 11px/1.2 system-ui,-apple-system,sans-serif;color:#7a4a16}
#modal section.skill .skill-legendary-preview img{width:26px;height:26px;padding:1px;border:2px solid #c98a2e;border-radius:7px;background:linear-gradient(145deg,var(--honey-200),var(--rarity-legendary))}
#modal .skill-info section.skill{margin:0}
#modal .skill-info section.skill h1{font-size:26px;margin:0 0 5px}
/* P15 (build 27): the skill book is one compact list that scrolls only inside
   its bounded box (no pager); the title and Close stay fixed. */
#modal .skill-book h1{margin:0 0 8px}
#modal .skill-book-list{display:grid;gap:7px;max-height:min(58dvh,480px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:2px 0 6px;margin:0;border-radius:var(--vs-radius)}
@media(max-height:700px){#modal .skill-book-list{max-height:min(50dvh,340px)}}
:root:not([data-input-modality=keyboard]) #modal .skill-book-list:focus{outline:none}
#modal .skill-book-list section.skill{grid-template-columns:48px minmax(0,1fr);gap:10px;align-items:start;margin:0;padding:8px 10px;border-width:2px;border-radius:14px;box-shadow:0 3px #b99864}
#modal .skill-book-list section.skill .skill-art-frame{width:48px;height:52px;border-radius:11px}
#modal .skill-book-list section.skill img.skill-icon{width:46px;height:50px}
#modal .skill-book-list section.skill.legendary .skill-art-frame{border-width:2px}
/* Visual polish r2 (finding 106): every skill icon sits on the same tile; the legendary rank keeps its gold face. The
   section names are small caps labels, not second titles. */
#modal .skill-book-list section.skill:not(.legendary) .skill-art-frame{border:2px solid #b99864;background:radial-gradient(circle at 50% 38%,var(--cream-50),var(--row-inset) 78%);box-shadow:inset 0 2px var(--cream-50)}
#modal .skill-book-list section.skill:not(.legendary) .skill-art-frame img{width:40px;height:44px}
#modal .skill-book-list>h2{margin:6px 2px 0;font:14px/1.2 Lucky,system-ui;letter-spacing:.06em;text-transform:uppercase;color:#8a6a45}
#modal .skill-book-list>h2:first-child{margin-top:0}
#modal .skill-book-list section.skill.legendary .skill-art-frame img{width:40px;height:44px}
#modal .skill-book-list section.skill h3{font-size:18px;line-height:1.1;margin:0 0 3px}
/* AC586 (b127): "Rank N" is its own tight row right under the name (about 4px of ink gap),
   not an inline run inside the 23px body line box (which left ~13px). */
#modal .skill-book-list section.skill h3+small,#modal .skill-info section.skill h1+small{display:block;margin:0;line-height:1.2}
#modal .skill-book-list section.skill h3:has(+small){margin-bottom:1px}
#modal .skill-book-list section.skill p{font-size:12px;line-height:1.3;margin:2px 0 0}
#modal .skill-book-list section.skill .skill-legendary-tag{margin:0 0 2px;padding:1px 7px;font-size:9px}
#modal .skill-book-list section.skill .skill-legendary-preview{margin:0 0 2px;font-size:10px}
#modal .skill-book-list section.skill .skill-legendary-preview img{width:20px;height:20px}
#skill-belt .learned.legendary .skill-icon{box-sizing:border-box;border:2px solid var(--rarity-legendary);border-radius:8px;background:radial-gradient(#ffe28a55,#f28a3233);box-shadow:0 0 0 1px #9a5a1c}
#skill-belt .learned.legendary b{background:linear-gradient(#ffd66e,var(--rarity-legendary-accent));color:#3d2106;border-color:#9a5a1c}
.skill-draft-actions{display:flex;justify-content:center;gap:10px}
#online .skill-draft-actions>button.secondary{width:65%;min-width:210px;margin:0}
.wizard-draft .skill-draft-actions>button{flex:1;min-width:0!important}
@media(max-height:760px){
 .skill-draft{gap:12px}.skill-draft-mascot{height:57px}.skill-draft-mascot img{height:80px}
 /* b170 AC772: the full-figure Rabbit Wizard keeps a readable head above the banner on short phones. */
 .skill-draft-mascot img.skill-draft-wizard{height:92px}
 .skill-spotlight{left:calc(50% - 85px);top:-37px;width:170px;height:170px}
 .skill-draft-header h1{font-size:26px;padding-block:7px 9px}.skill-draft-header p{margin-top:9px}
 .skill-offers{gap:11px}.skill-view .skill-offer{min-height:110px;padding:7px 8px;gap:9px;grid-template-columns:70px minmax(0,1fr)}
 .skill-offer-art{width:70px;height:84px}.skill-view .skill-offer-art img{width:60px;height:60px}
 .skill-offer-name{font-size:21px;padding-bottom:4px}.skill-offer-cadence{margin-top:4px}.skill-offer-effect{margin-top:4px}
}
/* Mini (761-830px): 8px of slack so Linux/Noto metrics keep the draft actions inside the safe bottom. */
@media(min-height:761px) and (max-height:830px){.skill-draft{gap:14px}.skill-offers{gap:12px}}
.journey-view #stage{flex:0 1 auto;min-height:140px}.journey-view #world{height:clamp(145px,25dvh,250px)}.journey-view #scene-title{padding:6px 10px;font-size:12px}
.journey-view #story-overlay{top:33px}.journey-view #playback{top:42px}.journey-view #playback button{min-width:44px;min-height:44px;padding:4px 8px}.journey-view #round-label{text-align:left;margin-left:10px;font-size:23px}
.journey-view #content.story-content{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:56px 48px minmax(0,1fr) auto;gap:0;padding:0}
.journey-view #stats,.journey-view #skill-belt,.journey-view .story-journal{grid-column:1/-1}.journey-view #stats{display:grid}.journey-view #skill-belt{height:48px}
.journey-view .story-journal{display:flex;flex-direction:column;min-height:0}
/* AC386: non-interactive heading returns 16px to the contained journal list. */
.journey-view #feed-heading{height:28px;min-height:28px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;font-size:9px}
.journey-view #feed{flex:1;min-height:0;height:auto;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:7px 10px;scrollbar-width:thin}
.journey-view #feed .day-divider{display:block;margin:7px 0;font-size:10px}.journey-view #feed .log-entry{margin:0 0 8px;padding:8px;border-radius:13px}.journey-view #feed .log-entry p{font-size:12px;line-height:1.35}.journey-view #feed .log-entry h3{font-size:11px;margin-bottom:4px}.journey-view #feed .log-icon{width:23px;height:23px;margin-right:8px}
.journey-view #content.story-content>button.primary,.journey-view #content.story-content>button.secondary{width:calc(100% - 12px);margin:5px 6px 10px;min-height:54px;padding:6px 10px;font-size:20px;line-height:1.1;align-self:end}
.journey-view #content.story-content>button:nth-child(4):last-child{grid-column:1/-1;font-size:27px}
/* AC215: the single journal action and Battle share the larger plump face. */
.journey-view #content.story-content>button.primary:nth-child(4):last-child{min-height:70px;font-size:27px;grid-column:1/-1}
#online.journey-view button.story-choice{height:54px;min-height:54px;padding:6px 8px;white-space:nowrap}
/* A paired choice that cannot fit one line (ko rabbit wizard on Linux/Noto) wraps to two
   balanced lines inside the same 54px face instead of pushing past the screen edge. */
.journey-view #content.story-content:has(>button.story-choice){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
#online.journey-view #content.story-content>button.story-choice{white-space:normal;line-height:1}
#online.journey-view button.story-choice>.button-label{white-space:normal;text-wrap:balance;word-break:keep-all}
#online.journey-view button.story-choice.tone-neutral{--bt-top:#ffe7ad;--bt-face:#e4bc7c;--bt-low:#c99d62;--bt-edge:#986e43}
#online.journey-view button.story-choice:not(:disabled):active{transform:none;scale:.94;box-shadow:var(--button-shadow)}
.journey-view .book-shortcut{min-height:44px;min-width:44px}.journey-view .learned{width:44px;height:44px}.journey-view .learned small{font-size:9px}.journey-view .learned .skill-icon{margin:0 auto 10px}
/* F14: the rank badge and the cadence caption are optically centred. The badge is
   a 14px border-box square seated on the icon's lower-right corner, with tabular
   digits trimmed to cap height; the caption uses a 1-line box, not the font's. */
#skill-belt .learned b{box-sizing:border-box;width:14px;height:14px;padding:0;font:800 9px/12px system-ui,-apple-system,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:0;text-align:center}
@supports (text-box:trim-both cap alphabetic){#skill-belt .learned b{line-height:1;text-box:trim-both cap alphabetic}}
/* F14 re-check (WebKit + Chromium at 3x): the 44px buttons fill the belt's 44px
   content box on whole pixels (1px top padding, none below; 3px border), so badge
   digits never rasterize on a half pixel. The caption sits 3px up from the button
   bottom (at least 2px of clear belt under its ink), and the badge moves up with it. */
.journey-view #skill-belt{padding-top:1px;padding-bottom:0}
.journey-view #skill-belt .learned b{right:5px;bottom:13px}
#skill-belt .learned small{line-height:1;font-variant-numeric:tabular-nums;text-align:center}
.journey-view #skill-belt .learned small{bottom:3px}
/* SM6 (docs/workorders/STORY_MOTION.md, step U2): the charge ring of a learned skill while a fight plays
   (storySkillRing in story-ui.ts). A 34px ring centred on the 27px icon: a faint track, one jade segment per strike of
   the skill's cadence, open under the rank badge. Lit segments fade in (160 ms); the segments still to fill pulse when
   the next strike fires the skill; a fired skill throws one pale ring outwards (420 ms) with the badge's existing
   `skill-fire` flash. Opacity and transform only; `--sr-k` is .5 from 2x. It never takes a tap (the chip does). */
#skill-belt .skill-ring{position:absolute;left:50%;top:0;width:34px;height:34px;margin-left:-17px;overflow:visible;pointer-events:none}
#skill-belt .skill-ring rect{fill:none;stroke-linecap:butt}
#skill-belt .skill-ring>g:first-child{animation:sr-in .2s ease-out both}
#skill-belt .sr-track{stroke:#d8e8e7;stroke-width:2;opacity:.2}
#skill-belt .sr-seg{stroke:#3fd8ba;stroke-width:2.5;opacity:0;transition:opacity calc(.16s*var(--sr-k,1)) ease-out}
#skill-belt .sr-seg.on{opacity:1}
#skill-belt .sr-seg.next{stroke:#8ff3dc;animation:sr-ready calc(.45s*var(--sr-k,1)) ease-in-out infinite alternate}
#skill-belt .learned.is-armed .skill-ring{animation:sr-pulse calc(.45s*var(--sr-k,1)) ease-in-out infinite alternate}
#skill-belt .sr-burst{opacity:0;transform-origin:17px 17px}
#skill-belt .sr-burst-arc{stroke:#e4fff7;stroke-width:2.5}
#skill-belt .learned.skill-fired .sr-burst{animation:sr-burst calc(.42s*var(--sr-k,1)) cubic-bezier(.2,.8,.3,1) both}
#skill-belt .learned.is-fight.skill-fired b{animation-duration:calc(.65s*var(--sr-k,1))}
@keyframes sr-in{from{opacity:0}to{opacity:1}}
@keyframes sr-ready{from{opacity:.12}to{opacity:.8}}
@keyframes sr-pulse{from{transform:scale(1)}to{transform:scale(1.07)}}
@keyframes sr-burst{0%{opacity:1;transform:scale(1)}30%{opacity:.9}100%{opacity:0;transform:scale(1.2)}}
@media(prefers-reduced-motion:reduce){#skill-belt .skill-ring>g:first-child{animation-duration:.12s}#skill-belt .sr-seg{transition-duration:.12s}#skill-belt .sr-seg.next{animation:none;opacity:.5}#skill-belt .learned.is-armed .skill-ring,#skill-belt .learned.skill-fired .sr-burst{animation:none}}
@media(max-height:760px){.journey-view #world{height:clamp(135px,22dvh,168px)}}
#modal label:not(:has(>input[type=checkbox])){display:block;margin:12px 0;font-weight:700}
#modal label:has(>input[type=checkbox]){display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin:0;font-weight:700}
#modal label select{display:block;width:100%;margin-top:4px}

/* Story is a focused game mode, not another page inside the permanent hub. */
#online.story-mode{position:relative;height:100dvh;min-height:0;max-height:100dvh;margin:0 auto;display:flex;flex-direction:column;border:0;border-radius:0;padding-top:var(--safe-top,env(safe-area-inset-top,0px));padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px))}
#online.story-mode #profile,#online.story-mode #tabs,#online.story-mode #scene-title{display:none!important}
#story-settings{position:absolute;z-index:5;top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 6px);right:7px;left:auto;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;background:none;box-shadow:none}
#online.story-mode #story-overlay{top:6px}
/* The skill draft's backdrop covers both safe bands: #content takes the insets as padding instead of #online. */
#online.story-mode.skill-view{padding-top:0;padding-bottom:0}
#online.story-mode #round-label{margin:8px 0 0;text-align:center;font-size:17px;line-height:24px;-webkit-text-stroke:2px var(--ink-navy)}
#online.tower-view #round-label{font-size:17px;line-height:24px;-webkit-text-stroke:2px var(--ink-navy)}
#online.story-mode #world{height:clamp(180px,32dvh,300px)}
#online.story-mode.skill-view #content{padding-top:calc(54px + var(--safe-top,env(safe-area-inset-top,0px)));padding-bottom:calc(16px + var(--safe-bottom,env(safe-area-inset-bottom,0px)))}
#online.story-mode #content>.title-logo{max-height:100px;object-fit:contain}
#online.story-mode #content>.hero-head{max-height:130px;object-fit:contain}
/* First adventure: one logo, with the welcome group centered inside safe areas. */
/* Visual polish (layout): the first screen is a full-bleed title over the key-art contract
   /art/title/key-art.webp (size and safe zones: docs/qa/visual-polish-layout/README.md). The art runs
   under both safe areas; a soft vignette and a dark foot gradient carry the title, tagline and Start. */
#online.story-mode.first-adventure{background:#1c2b21 url('/art/title/key-art.webp') 50% 40%/cover no-repeat}
#online.first-adventure::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 125% 80% at 50% 42%,#0000 58%,#0a110d80 100%),linear-gradient(#0a110d73,#0000 20%,#0000 50%,#0a110d9e 66%,#0a110de6 82%,#080e0bf5)}
#online.first-adventure #content{position:relative;z-index:1;flex:1;min-height:0;display:flex;padding:10px 20px 16px}
.first-adventure-card{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;max-width:400px;min-height:0;margin:0 auto;text-align:center}
.first-adventure-card>.title-logo{flex:none;width:70%;max-width:310px;height:auto;max-height:27dvh;object-fit:contain;margin:0 0 auto;filter:drop-shadow(0 6px 10px #0b130e99)}
.first-adventure-card>h1,.first-adventure-card>p{margin:0}
.first-adventure-card>h1{line-height:1.1;color:var(--paper);-webkit-text-stroke:3px #1b2a20;paint-order:stroke fill;filter:drop-shadow(0 3px 0 #1b2a20) drop-shadow(0 6px 14px #000a)}
.first-adventure-card>p{color:var(--cream-300);font-weight:700;filter:drop-shadow(0 1px 2px #000) drop-shadow(0 2px 10px #000c)}
#online.first-adventure .first-adventure-card>.primary{flex:none;margin:6px 5px 6px}
#online.story-result #content{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:12px}
#online.story-result .paper{margin:0;padding:16px;text-align:center}
#online.story-result .paper h1{font-size:36px;margin-bottom:8px}
#online.story-result .paper h2{font-size:23px}
#online.story-result .paper p{font-size:14px;margin-bottom:8px}
#online.story-result .defeat-result{background:linear-gradient(#e5dfee,#c6b8db);border-color:#9e89bb}
#online.story-result #content>.primary{flex:none;margin:0 5px 8px}
/* Compact faces, full touch targets. These controls do not use a pill press. */
#online #playback{top:auto;bottom:0;right:5px;gap:2px;z-index:4}
#online #playback button{position:relative;isolation:isolate;display:grid;place-items:center;min-width:44px;min-height:44px;width:auto;height:44px;margin:0;padding:4px 9px;border:0;border-radius:0;background:none;box-shadow:none;font:700 13px/1 system-ui;color:#fff;-webkit-text-stroke:0;text-shadow:none}
#online #playback button:before{content:'';position:absolute;inset:6px 1px;z-index:-1;border:2px solid var(--ink-navy);border-radius:9px;background:linear-gradient(#aaa6c4,#77728e);box-shadow:inset 0 1px #eee8fb88,0 2px #111d2b}
#online #playback button:active:before{background:#68617f}
:is(#online,#modal,#error) button.secondary:active{transform:none}
#modal button.primary:not(:disabled):active{transform:translateY(6px);box-shadow:inset 0 2px #fff6d580}
#online button.primary:not(:disabled):active{transform:translateY(var(--press-depth,6px));box-shadow:var(--button-shadow-down)}
@media(max-height:700px){#online.story-mode #world{height:180px}#online.story-result .paper{padding:12px}#online.story-result #content{gap:8px}}

/* A deep identity plaque, narrow resource capsules, and a quiet tool corner. */
#online #profile{align-items:flex-start;gap:5px;padding:3px 6px 3px 0;min-height:66px;background:linear-gradient(#23354f 0 44px,#1b2b40 44px);border-bottom:0}
#profile .profile-card{display:flex;align-items:center;gap:5px;flex:1;min-width:0;min-height:60px;padding:5px 13px 5px 5px;border:1px solid #455c76;border-left:0;border-top:0;border-radius:0 0 25px 0;background:linear-gradient(125deg,#112233,#142c43);box-shadow:0 3px #0d1b2d}
#profile .profile-card>img{width:40px;height:46px;border:2px solid #9d8652;border-radius:11px;background:#ecdcb1;box-shadow:0 2px #080f1e}
#profile .profile-identity{flex:1;min-width:0}#profile .profile-identity>b{font-size:13px;color:var(--cream-300);margin:0}
#profile .profile-rank{display:flex;align-items:center;gap:3px;font-size:10px;color:#e4c775;margin-top:3px;white-space:nowrap}#profile .profile-rank img{width:15px;height:18px}
#online #profile .energy-pill{position:relative;isolation:isolate;flex:none;min-width:0;width:73px;height:44px;margin-top:3px;padding:0 3px;gap:1px;border:0;background:none;box-shadow:none}
#profile .energy-pill:before{content:'';position:absolute;z-index:-1;inset:7px 0;border-radius:20px;border:1px solid #516779;background:#101e30;box-shadow:inset 0 2px #0007,0 1px #748b9933}
#online #profile .energy-pill img{width:21px;height:31px;flex:none}#online #profile .energy-pill b{font-size:12px}#online #profile .energy-pill small{font-size:8px}#online #profile .energy-pill span{width:13px;height:18px;background:#49666a;border-radius:4px;font-size:13px}
#online #profile .coin-pill{flex:none;min-width:60px;height:30px;margin-top:10px;padding:1px 5px 1px 1px;gap:2px;border:1px solid #516779;border-radius:20px;background:#101e30;box-shadow:inset 0 2px #0007}
#online #profile .coin-pill img{width:23px;height:27px}#online #profile .coin-pill b{font-size:12px}
#online #profile .profile-tools{display:block;flex:none;width:44px;margin:3px 0 0}#online #profile .settings-icon{position:relative;width:44px;height:44px;padding:4px;font-size:24px}
#online #profile .server-badge{position:absolute;inset:auto 2px -8px;min-width:0;min-height:0;height:14px;padding:0;border:1px solid #b48f45;border-radius:4px;background:#ffe19a;color:#644722;font:800 8px/12px system-ui;letter-spacing:1px;text-shadow:none;pointer-events:none}
#online #profile .server-badge:before{display:none}
.hub-view #story-overlay .hub-route-arrows button{width:48px;height:48px;min-width:44px;min-height:44px;padding:3px;border:2px solid var(--navy-600);border-radius:50%;background:linear-gradient(var(--gold-50),#d9b576);box-shadow:inset 0 2px #fff9dd,0 3px #13263b99}
.route-arrow-art{display:block;width:36px;height:36px;overflow:visible}.route-arrow-art.left{transform:scaleX(-1)}

/* Bounded reward panels: illustration, live monitor, controls, no scroll. */
#modal.hub-reward-modal{width:min(400px,calc(100vw - 24px));max-height:calc(100dvh - var(--safe-top, env(safe-area-inset-top,0px)) - var(--safe-bottom, env(safe-area-inset-bottom,0px)) - 24px);padding:14px;overflow:visible;display:flex;flex-direction:column;gap:8px;border:3px solid #bd9a5d;background:linear-gradient(var(--cream-200),#e7cda0);border-radius:23px}
#modal.hub-reward-modal:not([open]){display:none}
.hub-rewards-panel{display:flex;flex-direction:column;gap:8px;min-height:0;text-align:center}
.hub-rewards-panel header h1{font-size:30px;line-height:1.05;margin:3px 0 0;color:#233e50}.hub-rewards-panel .eyebrow{font-size:8px;letter-spacing:1.4px}
.hub-rewards-panel>small{font-size:10px;line-height:1.3;color:#796747}
.travel-monitor{position:relative;flex:none;height:clamp(112px,20dvh,165px);overflow:hidden;border:4px solid var(--navy-600);border-radius:15px;background:var(--navy-600);box-shadow:0 3px #142436}
#travel-landscape{position:absolute;inset:0;width:100%;height:100%}
/* AC17 (build 39): the route title and the "On the road" label are centred on the
   card, horizontally and inside their bands (the LED label was left-aligned). */
.monitor-route{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:center;padding:6px 10px;background:#13283df2;border-bottom:2px solid #3e6488;color:var(--cream-350);font:13px/1.15 Lucky;letter-spacing:.3px;text-align:center}
/* AC17 reopened (build 48): the band reads as a bar (opaque, with a lit edge) and
   centerMonitorInk (hub-panels.js) shifts each label onto its ink centre. */
.monitor-ink{display:block;min-width:0}
/* b137 AC667: the destination's chapter follows the route title in the same header line, in gold after a small dot
   (decorative, not copy), so "Completed adventure / Chapter N" needs no row of its own. */
.monitor-chapter{color:#ffd47a}
.monitor-chapter::before{content:'';display:inline-block;width:4px;height:4px;margin:0 7px;border-radius:50%;background:#ffd47acc;vertical-align:.16em}
.monitor-ink-probe{display:inline-block;width:0;height:0;margin:0;padding:0;vertical-align:baseline}
.monitor-panda{position:absolute;width:74px;height:80px;left:25%;bottom:14%;filter:drop-shadow(0 2px 0 #13243644)}
.monitor-panda svg{width:100%;height:100%;overflow:hidden}
/* AC138: the runner canvas covers TRAVEL_RUN_REGION (form-ui.js): the 294 x 304 figure box plus the dragged blade behind it. */
.monitor-panda canvas.monitor-run{position:absolute;left:-87.07%;bottom:0;width:187.07%;height:auto;aspect-ratio:550/351;pointer-events:none}
/* b130 (AC602/AC605): updateHubMonitor owns the pose. The runner canvas stays laid out (its size sets the
   stride-matched ground speed) and is cleared while he stands; it also carries the settling skid dust.
   The standing figure squashes and stretches about its feet (crouch before the start, the turn after the brake). */
.monitor-panda .monitor-stand{transform-origin:50% 100%}.monitor-panda[data-pose=run] .monitor-stand{visibility:hidden}
.monitor-scout{position:absolute;width:44px;height:44px;overflow:hidden;left:calc(25% - 40px);bottom:calc(14% + 30px);animation:monitor-hover 3s ease-in-out infinite}
/* AC481 (build 109, owner: "Blip trochę za nisko leci"): Blip flies a little higher, its
   centre just above the runner's head instead of at eye level; beside the taller Giant
   Panda form a little more, like the Story run's form lift. It never rises into the route
   title band: 72px keeps its visible top (the frame's 5px clear margin and the 2px hover
   included) 2px under the band, and a monitor too short for the lift keeps the old height. */
.travel-monitor .monitor-scout{bottom:max(calc(14% + 30px),min(calc(14% + 42px),calc(100% - 72px)))}
.travel-monitor .monitor-scout.is-form{bottom:max(calc(14% + 30px),min(calc(14% + 52px),calc(100% - 72px)))}
@keyframes monitor-hover{50%{transform:translateY(-2px)}}
/* P29: coins flying from the Fast Travel monitor to the haul counter. Lead review (b130): they leave from behind the
   hero (his box is drawn over them) and pass under the route title band. The monitor makes no stacking context. */
.travel-monitor .monitor-panda{z-index:3}.travel-monitor .monitor-route{z-index:4}
.hub-rewards-panel[data-panel="travel"]{position:relative}
.travel-coin-fx{position:absolute;left:0;top:0;width:22px;height:22px;pointer-events:none;z-index:2;opacity:0;will-change:transform,opacity;filter:drop-shadow(0 1px 1px #5b3b1066)}
@media(prefers-reduced-motion:reduce){.travel-coin-fx{display:none}}
/* AC920: the coins lying ahead of the Fast Travel runner (under him, over the scene; clipped by the monitor), the
   picked coin's flight at the same size, and the pickup sparkle. Never shown under reduced motion. */
.travel-monitor .travel-ground-coin{position:absolute;left:0;top:0;width:18px;height:18px;z-index:2;pointer-events:none;will-change:translate;filter:drop-shadow(0 1px 1px #5b3b1066)}
.travel-coin-fx.travel-coin-pick{width:18px;height:18px;opacity:1}
.travel-pick-spark{position:absolute;z-index:2;width:0;height:0;pointer-events:none}
.travel-pick-spark>b{position:absolute;left:-3px;top:-1px;width:6px;height:2px;border-radius:1px;background:#fff7cf;box-shadow:0 0 2px #ffd45c;opacity:0}
@media(prefers-reduced-motion:reduce){.travel-ground-coin,.travel-pick-spark{display:none}}
.panel-loot{position:relative;display:grid;grid-template-columns:39px auto;justify-content:center;column-gap:7px;align-items:center;padding:6px 10px;border:1px solid #caa968;border-radius:var(--vs-radius);background:#fff6dccc;box-shadow:inset 0 2px var(--card-face);transition:border-color .3s,box-shadow .3s}
.panel-loot img{grid-row:span 2;width:35px;height:38px;object-fit:contain}.panel-loot :is(strong,.loot-sizer){font:29px/1 Lucky;color:#825b2d;text-align:left;white-space:nowrap}.panel-loot span{font-size:9px;color:#7b6845;text-align:left}
/* AFK has one icon and one value, unlike the two-row travel plaque. */
#modal .hub-rewards-panel[data-panel="afk"]>.panel-loot{display:flex;justify-content:center;align-items:center;gap:7px;min-width:0}
/* b130 AC604: the number and caption keep the size of their widest state (the ×20 range; every caption
   stacked in one cell), so the coin never moves and the box never changes height. */
.panel-loot .loot-num{display:grid;justify-items:start;align-items:end}.panel-loot .loot-num>*{grid-area:1/1}.panel-loot .loot-sizer{visibility:hidden}
.panel-loot #travel-coins{transform-origin:22% 60%;font-variant-numeric:tabular-nums}
.travel-swap{display:grid}.travel-swap>*{grid-area:1/1}.travel-swap>:not(.is-on):not(.is-leaving){visibility:hidden}
.travel-sparks{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none}
.travel-sparks>b{position:absolute;left:-5px;top:-5px;width:10px;height:10px;opacity:0;background:radial-gradient(circle,var(--card-face) 0 30%,#ffd45c 45%,#ffd45c00 72%);border-radius:50%}
#modal.hub-reward-modal select{min-height:44px;margin:3px 0 0;padding:4px 9px;background:var(--cream-200);border:2px solid #ba9b61;border-radius:10px;color:#294255;font-size:13px}
.travel-multipliers{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px}
/* AC920 (build 226 feedback): x50 / x100 follow x20 in the same row and size. Without the Monthly card they wear the
   solid locked face (MOBILE_UI.md: opaque, desaturated, label readable) with the painted padlock on the corner; the
   face stays a button (it opens the card), so it is never the translucent disabled look. */
/* Six faces share the row at 375px: one label size for all six (x100 at the dense tier's 21px would touch its face's
   edges), the same height as before. An API without the card multipliers keeps the four 21px faces. */
#modal .travel-multipliers.has-card button{font-size:18px;padding-inline:3px}
#modal .travel-multipliers .travel-card-lock{display:none;position:absolute;z-index:2;right:0;top:-7px;width:16px;height:19px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 0 #1b263b99)}
#modal .travel-multipliers button.is-card-locked .travel-card-lock{display:block}
#modal .travel-multipliers button.is-card-locked{--small-top:var(--btn-disabled-top);--small-bottom:var(--btn-disabled-bottom);--small-edge:var(--btn-disabled-edge);--small-lip:var(--btn-disabled-lip);--small-shine:var(--btn-disabled-shine);overflow:visible}
#modal .hub-rewards-panel>.primary{min-height:54px;margin:2px 0 7px;padding:8px 7px;font-size:23px;line-height:1.1;border-radius:999px}
#modal.hub-reward-modal>[data-action=dismiss]{width:100%;min-height:44px;align-self:center;margin:0;padding:5px;font-size:17px;border-radius:var(--vs-radius)}
.reward-meter{height:10px;min-height:10px;border:2px solid #30424a;background:#283848;border-radius:8px;overflow:hidden}.reward-meter i{display:block;height:100%;background:linear-gradient(#bbe76e,#7ab449);transition:width .35s}
/* G02: a trip collected in the open panel briefly shows its payout in the loot row. */
.panel-loot.is-collected{border-color:#d9a632;box-shadow:inset 0 2px var(--card-face),0 0 0 2px #f4cf6a88}
.panel-loot.is-collected strong{color:#3f8a3a}
/* b133 AC653 (owner, build 131: "jak diamentów w rybach w skrzyni – taki absolute"): the Fast Travel haul counter is the
   Lucky Chest award plaque (lucky-chest.css .lc-award: gold pill, brown rim and lip, small label over the icon and the
   outlined white number), absolutely placed over the scene's lower rim at the right, clear of the hero and Blip. The stage
   keeps room under the monitor for its lower half; the plaque keeps its widest number and caption, so it never resizes. */
.travel-stage{position:relative;flex:none;display:flex;flex-direction:column;margin-bottom:18px}
/* b137 AC668 (owner, build 136: "możemy bez tego tekstu i wtedy dać po środku a nie prawej, można trochę zmniejszyć"): the
   plaque is the coin and the number only (its caption is read to VoiceOver, never shown), a little smaller (18px number,
   20px coin, 30px tall instead of 44px), centred on the monitor's lower rim; it still never resizes between states and its
   top stays under the standing hero's feet (the hero stands 14% above the floor; the pill reaches 15px above the rim). */
#modal .travel-stage>.panel-loot{position:absolute;z-index:5;left:0;right:0;bottom:-15px;width:max-content;margin-inline:auto;display:grid;grid-template:"stack" auto/auto;justify-items:center;align-items:center;padding:2px 10px;border:3px solid #6b3a12;border-radius:18px;background:linear-gradient(#ffe98a,#ffb53f);box-shadow:inset 0 2px #fff7cf,0 3px #7a4516;pointer-events:none;transition:box-shadow .3s}
#modal .travel-stage>.panel-loot .loot-row{grid-area:stack;display:flex;align-items:center;gap:4px}
#modal .travel-stage>.panel-loot .loot-row>img{flex:none;width:20px;height:20px;object-fit:contain;filter:drop-shadow(0 1px 0 #7a451688)}
#modal .travel-stage>.panel-loot .loot-num{justify-items:start}
#modal .travel-stage>.panel-loot :is(strong,.loot-sizer){font:18px/1 Lucky;color:var(--cream-50);-webkit-text-stroke:var(--label-stroke,3px) #6b3a12;paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,2px) #6b3a12);text-align:left;white-space:nowrap}
/* The hidden sizer (a coin's width + gap, then the multiplier's range) shares the pill's one grid cell with the coin +
   number row: it sets the pill's width and the row is centred in it, whatever number it shows. */
#modal .travel-stage>.panel-loot>.loot-sizer{grid-area:stack;display:flex;gap:4px}
#modal .travel-stage>.panel-loot>.loot-sizer>i{flex:none;width:20px}#modal .travel-stage>.panel-loot>.loot-sizer>span{font-size:inherit}
#modal .travel-stage>.panel-loot .loot-caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#modal .travel-stage>.panel-loot.is-collected{border-color:#6b3a12;box-shadow:inset 0 2px #fff7cf,0 3px #7a4516,0 0 0 3px #ffe48a,0 0 14px 4px #ffd45caa}
#modal .travel-stage>.panel-loot.is-collected strong{color:var(--cream-50)}
/* The coin box row is gone, so a short screen gives the scene that room back (115 -> 136px at 730px or less). */
@media(max-height:730px){#modal .travel-stage .travel-monitor{height:136px}}
@media(max-height:620px){#modal .travel-stage{margin-bottom:16px}#modal .travel-stage .travel-monitor{height:104px}#modal .travel-stage>.panel-loot{bottom:-14px}#modal .travel-stage>.panel-loot :is(strong,.loot-sizer){font-size:16px}#modal .travel-stage>.panel-loot .loot-row>img,#modal .travel-stage>.panel-loot>.loot-sizer>i{width:18px;height:18px}}
/* b130 AC604: the day's event is read to VoiceOver only; the run and the track show the trip. */
.hub-rewards-panel .travel-event{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
/* b130 AC604: Start and the trip's track share one slot (the 3D primary face, same outline and depth). */
.travel-go{align-items:stretch}
#modal .travel-go>[data-action="auto.start"]{width:100%;margin:0}
.travel-track{position:relative;display:grid;place-items:center;min-height:56px;overflow:hidden;border:3px solid #171a29;border-radius:999px;background:linear-gradient(#1d2a3b,var(--navy-600) 60%,#33475e);box-shadow:0 6px 0 #171a29,inset 0 3px 0 #0e1622}
.travel-track-fill{position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(#ffc268,#ff9c42 65%,#ef8037);box-shadow:inset 0 3px 0 #fff7d4a8,inset 0 calc(-1 * var(--face-lip,6px)) 0 #a94e32,inset -2px 0 0 #fff2c255;will-change:transform}
/* "Trail complete" (lead review b130): the green face wipes in from the left over the full orange fill with a light
   edge running ahead of it (never a blend of the two); at rest the edge sits outside the track, clipped. */
.travel-track-done{position:absolute;inset:0;transform:translateX(calc(-100% - 12px));background:linear-gradient(#9de966,#70cc43 65%,#48b742);box-shadow:inset 0 3px 0 #f1ffd8b0,inset 0 calc(-1 * var(--face-lip,6px)) 0 #297849;will-change:transform}
.travel-track-done::after{content:'';position:absolute;top:0;bottom:0;right:-10px;width:10px;background:linear-gradient(90deg,#fdffe8,#fdffe800)}
.travel-track.is-done .travel-track-done{transform:none}
.travel-track-label{position:relative;font:24px/1.1 Lucky,'Arial Rounded MT Bold',sans-serif;color:#fff;-webkit-text-stroke:2px var(--ink-navy);paint-order:stroke fill;filter:drop-shadow(0 2px var(--ink-navy));white-space:nowrap}
.travel-track-label>*{display:block;text-align:center}
/* b137 (AC670 with AC631): the track is a 3D face like Start: its orange and green fills paint a 6px lip inside the bottom
   edge, so --face-lip draws that lip and the label moves up by half of it; the copy sits on its cap band (text-box trim),
   so "Trail complete" is centred on the face, not on the whole track (it was 2-2.5px low). */
.travel-track{--face-lip:6px}
.travel-track-label{translate:0 calc(var(--face-lip) / -2)}
/* Trail complete + the AC624 busy dots after it, one centred row: the dots sit on the copy's baseline like an ellipsis
   and always keep their width (they only scale and fade), so nothing shifts while they pulse. */
.travel-track-label>[data-k="done"]{display:flex;align-items:baseline;justify-content:center}
.travel-dots{display:flex;flex:none;gap:3px;margin-left:3px}
.travel-dots>i{display:block;width:5px;height:5px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px var(--ink-navy),0 2px 0 1px var(--ink-navy);animation:inline-loader-dot 1.2s ease-in-out infinite both}
.travel-dots>i:nth-child(2){animation-delay:.2s}.travel-dots>i:nth-child(3){animation-delay:.4s}
@media(prefers-reduced-motion:reduce){.travel-dots>i{animation:none;transform:none;opacity:1}}
@supports (text-box:trim-both cap alphabetic){.travel-track-label .travel-road-text,.travel-track-label .travel-countdown,.travel-track-label .travel-done-text{text-box:trim-both cap alphabetic;padding-block:calc((1lh - 1cap) / 2)}}
/* #264: every multiplier is visibly unavailable while travelling, including the selected one.
   aria-pressed retains the trip's chosen value; disabled/aria-disabled own its interaction state. */
#modal .travel-multipliers.is-locked button:disabled:not([data-busy-lock]){--small-top:var(--btn-disabled-top);--small-bottom:var(--btn-disabled-bottom);--small-edge:var(--btn-disabled-edge);--small-lip:var(--btn-disabled-lip);--small-shine:var(--btn-disabled-shine);filter:none;opacity:1}
#modal .travel-multipliers button{transition:opacity .2s,filter .2s}
/* Visual polish r2 #34/#264 (arena lane): while a trip runs, its slot is a progress groove, not a button face: recessed
   (inner shadow, no lip or drop), the orange fill carries static progress stripes, the label sits on the groove's centre. */
#modal .travel-go .travel-track:not(.is-done){--face-lip:0px;border-color:#141a28;background:linear-gradient(#737781,#565b65);box-shadow:inset 0 4px 7px #0007,inset 0 -2px 0 #ffffff12,0 2px 0 #ffffff40}
#modal .travel-go .travel-track-fill{background:repeating-linear-gradient(135deg,#ffffff00 0 12px,#ffffff30 12px 22px),linear-gradient(#ffc268,#ff9c42 65%,#ef8037);box-shadow:inset 0 3px 0 #fff7d4a8,inset 0 -3px 0 #c8642f,inset -2px 0 0 #fff2c255}
#modal .travel-go .travel-track-done{box-shadow:inset 0 3px 0 #f1ffd8b0,inset 0 -6px 0 #297849}
/* Cap trimming belongs to each text run, not its flex container: both swap states reserve the same line height. */
.travel-track-label>[data-k="road"]{display:flex;align-items:baseline;justify-content:center;gap:8px}
.travel-countdown{font:inherit;font-variant-numeric:tabular-nums;min-width:3ch}

.hub-rewards-panel>.travel-caption{font-size:10px;line-height:1.3;color:#796747}
.panel-info-header{position:relative;min-height:44px;display:grid;align-items:center;padding:0 44px}
/* AC846 (build 194, owner: "Może te nagłówki powinny być lepiej ostylowane"): a help dialog's title is a dressed
   heading: the title between two honey rules that end in a stud (the Store shelf's section-title rule, with the
   result heading's stud), on every (?) dialog that uses .afk-help. A long title wraps and the rules keep 18px. */
#modal .afk-help h1{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 6px;text-align:center;text-wrap:balance}
#modal .afk-help h1::before,#modal .afk-help h1::after{content:"";flex:1 1 0;min-width:18px;height:12px;background:radial-gradient(closest-side,#e2a43a 0 3px,#7a4a1c 3.5px 4.5px,transparent 5px) right 50%/12px 12px no-repeat,linear-gradient(90deg,#c7a06900,#c7a069) left 50%/calc(100% - 13px) 2.5px no-repeat}
#modal .afk-help h1::after{transform:scaleX(-1)}
#modal .afk-help p{font:600 14px/1.5 system-ui;margin:14px 0}
#modal.hub-reward-modal>[data-action="hub-afk"]{width:100%;min-height:44px;margin:0}
.reward-receipt{align-items:center;padding:8px}.reward-receipt h1{margin:0;font-size:35px}.reward-receipt>strong{font:32px Lucky;color:#845d24}.receipt-coin img{width:85px;height:90px;object-fit:contain;filter:drop-shadow(0 4px 4px #99712855)}
#modal.passive-receipt{padding:24px;overflow:visible}
#modal.passive-receipt .reward-receipt{gap:16px;padding:16px 8px;outline:none}
#modal.passive-receipt .reward-receipt>small{font:600 14px/1.4 system-ui;color:#675436}
#modal.passive-receipt>.receipt-dismiss{position:absolute;top:2px;right:2px;width:44px;min-height:44px;padding:0;margin:0;border:0;background:none;box-shadow:none;color:#54412f;font:32px/1 system-ui;text-shadow:none;-webkit-text-stroke:0}
#modal.passive-receipt>.receipt-dismiss::before,#modal.passive-receipt>.receipt-dismiss::after{display:none}
#modal.passive-receipt::backdrop{-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
/* F01 (owner, 2026-09-25): a passive receipt (AFK, Travel, Moonleaf, Inbox) and the
   treasure reveal show "Tap outside/anywhere to continue" once, on the backdrop
   beneath the panel, never inside it. The hint is a pointer-transparent #modal child,
   so a tap on it lands on the backdrop and dismisses. The dialog rises by half the
   hint's reserve with `translate` (the entry animation owns `transform`), and its
   max-height leaves that reserve free, so the hint stays inside the safe viewport. */
#modal.has-dismiss-hint{--dismiss-hint-reserve:56px}
#modal.has-dismiss-hint[open]{overflow:visible;translate:0 calc(var(--dismiss-hint-reserve) / -2);max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px - var(--dismiss-hint-reserve))}
#modal>.modal-dismiss-hint{position:absolute;left:0;right:0;top:calc(100% + var(--tap-hint-gap,24px));margin:0;padding:0 8px;pointer-events:none;text-align:center;font:700 15px/1.3 system-ui;color:var(--cream-200);filter:drop-shadow(0 1px 2px #0b0f1c) drop-shadow(0 0 8px #0b0f1ccc);-webkit-text-stroke:0;white-space:nowrap;animation:dismiss-hint-in .35s ease-out .5s both,dismiss-hint-breathe 1.8s ease-in-out .85s infinite alternate}
/* G14 (build 21): the dismiss hint fades in after the panel lands, then breathes
   in opacity only (no transform, so the --tap-hint-gap offset stays exact; AC05). */
@keyframes dismiss-hint-in{from{opacity:0}to{opacity:1}}
@keyframes dismiss-hint-breathe{from{opacity:1}to{opacity:.45}}
@media(prefers-reduced-motion:reduce){#modal>.modal-dismiss-hint{animation:none;opacity:1}}
.action-hint-hand{position:fixed;z-index:30;width:56px;height:64px;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-select:none;filter:drop-shadow(0 3px 2px #20182960);animation:action-hint-bob 1.6s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.action-hint-hand{animation:none}}
@media(max-height:730px){#modal.hub-reward-modal{padding:10px;gap:6px}.hub-rewards-panel{gap:6px}.hub-rewards-panel header h1{font-size:27px}.travel-monitor{height:115px}}
@media(prefers-reduced-motion:reduce){.monitor-scout{animation:none}.monitor-run{visibility:hidden}.monitor-panda .monitor-stand{visibility:visible!important}.reward-meter i{transition:none}}
@media(max-width:380px){#profile{gap:3px;padding:6px 4px}#profile>img{width:28px;height:32px}#profile .energy-pill{min-width:86px}#profile .profile-identity>b{font-size:11px}#profile .coin-pill{gap:0}.hub-launch .primary{font-size:23px!important}}

/* Hub chrome is graphite; the established combat belts and primary press stay intact. */
body{background:radial-gradient(ellipse at top,#484852,#1b1b23)}
#online{background:#2b2b36}
#online #profile{position:relative;z-index:6;height:48px;min-height:48px;padding:0 6px 0 0;background:linear-gradient(#393943,#272730);box-shadow:0 2px #17171e}
#online:not(.hub-view) #profile{height:64px;min-height:64px}
/* AC784 (b176): the iOS shell hides the status bar; the HUD's top colour fills the safe top above the header instead of
   an empty band. Paint only: no control or text enters the inset, the header row still starts below it. */
/* AC825 (build 186 feedback, owner: "nowy miał oddzielać Dynamic Island czy tam to miejsce gdzie godzina jest na górze"):
   the inset band reads as the phone's own top edge, not as more header. It is a darker graphite that deepens toward
   the Dynamic Island, and its bottom edge is the header's lit rim (1px) over a soft shadow the band casts onto the
   header's top. Box shadows of the zero-height band paint nothing, so phones without an inset keep the plain header.
   Paint only (no text effect); the header row, its controls and the AC815 lettering are unchanged. */
#online>#profile:before{content:'';position:absolute;left:0;right:0;bottom:100%;height:var(--safe-top,env(safe-area-inset-top,0px));background:linear-gradient(var(--hud-inset-top,#0f0f14),var(--hud-inset-fill,#1d1d25));box-shadow:0 1px 0 var(--hud-inset-rim,#5b5a68),0 2px 5px 1px #00000073;z-index:1;pointer-events:none}
#profile .profile-card{flex:1;min-height:62px;padding:5px 10px 5px 5px;border-color:#52515e;background:linear-gradient(120deg,var(--panel-night),var(--ink-plum-2));box-shadow:0 3px #111117}
#profile .profile-identity>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profile .profile-rank{color:#d6bddf}
#profile .energy-pill:before,#online #profile .coin-pill{background:#15151c;border-color:#53515e}
#online #profile .profile-tools{margin-top:0}
#online #profile .energy-pill{margin-top:0}
#online #profile .coin-pill{margin-top:7px}
#online #profile .settings-icon{border:2px solid var(--panel-night);background:linear-gradient(#aaa6bd,#77728b);box-shadow:inset 0 2px #dbd7e7,0 2px #111117}
#tabs{background:linear-gradient(#383740,#25252e);border-color:#595763}
.hub-view #content{background:linear-gradient(#30303b,var(--ink-plum-2))}
.hub-view #story-overlay{top:0}
/* Act identity belongs to the selector, never focused Story or Home. */
.story-act-plaque{position:absolute;top:12px;left:50%;transform:translateX(-50%);width:min(84%,330px);aspect-ratio:3.2;filter:drop-shadow(0 3px 1px #17232a70)}
.story-act-plaque>img{z-index:1;position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
.story-act-plaque>span{z-index:2;position:absolute;top:34%;left:34%;width:32%;font:12px/1.1 Lucky,sans-serif;color:#e9ecda;filter:drop-shadow(0 1px #14232a)}
.story-act-plaque>strong{z-index:2;position:absolute;top:55%;left:7%;width:86%;font:clamp(19px,5.4vw,23px)/1.1 Lucky,sans-serif;color:var(--cream-250);filter:drop-shadow(0 2px #3b271a)}
.story-act-plaque>.story-act-position{position:absolute;z-index:0;top:calc(100% - 12px);left:50%;transform:translateX(-50%);min-width:91px;padding:8px 12px 5px;border:2px solid #7c461f;border-top:0;border-radius:0 0 12px 12px;background:linear-gradient(#b87936,#975923);box-shadow:inset 2px 0 #e9b46d,inset -2px 0 #e9b46d,inset 0 -3px #d59b53,0 3px 0 #4c2d1b;color:var(--cream-300);font:14px/1 Lucky,sans-serif;white-space:nowrap;text-align:center;text-shadow:none}
.story-route-clouds{position:absolute;inset:0;z-index:4;overflow:hidden;pointer-events:none;contain:paint}
.route-cloud-bank{position:absolute;top:-3%;bottom:-3%;width:70%;animation:route-cloud-cover 420ms cubic-bezier(.4,0,.2,1) both;will-change:transform}
.route-cloud-bank.left{left:0;--cloud-away:-145%}
.route-cloud-bank.right{right:0;--cloud-away:145%}
.route-cloud-bank.right img{left:auto;right:-45%;transform:scaleX(-1)}
.route-cloud-bank img{position:absolute;left:-45%;width:165%;height:88%;object-fit:fill;pointer-events:none;translate:var(--drift) 0}
.hub-view #stage{touch-action:pan-y}
.story-route-clouds.revealing .route-cloud-bank{animation:route-cloud-reveal 480ms cubic-bezier(.4,0,.2,1) both}
.route-changing .hub-route-arrows{pointer-events:none}
.route-changing .hub-route-arrows button{pointer-events:none!important}
.hub-view:has(.route-changing) .hub-launch{pointer-events:none}
@keyframes route-cloud-cover{from{transform:translateX(var(--cloud-away))}to{transform:translateX(0)}}
@keyframes route-cloud-reveal{from{transform:translateX(0)}to{transform:translateX(var(--cloud-away))}}
@media(prefers-reduced-motion:reduce){.story-route-clouds{display:none}}
/* Adventure slots: an approved bounded horizontal scroll region (no pagination
   dots). Neighbors peek at both edges; it never chains to the document. */
.hub-view #story-overlay .route-slots{position:absolute;bottom:8px;left:0;right:0;display:flex;align-items:stretch;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-x;pointer-events:auto}
.hub-view #story-overlay .route-slots::-webkit-scrollbar{display:none}
.hub-view #story-overlay .route-slots:before,.hub-view #story-overlay .route-slots:after{content:'';flex:0 0 calc(13% - 8px)}
.hub-view #story-overlay .route-slot{position:relative;flex:0 0 74%;min-width:0;min-height:60px;display:flex;align-items:center;gap:10px;margin:0;padding:8px 12px;scroll-snap-align:center;scroll-snap-stop:always;border:1px solid #8f7b57;border-radius:var(--vs-radius);background:linear-gradient(110deg,var(--ink-plum-2),#3a3542);box-shadow:0 3px #19171fa0;color:var(--cream-300);text-align:left;transition:border-color .2s,scale .12s ease-out}
/* Slots are opaque (N2 / HS-03): the honey border and aria-current mark the
   selected one, a darker desaturated face with a readable lock badge a locked one. */
.hub-view #story-overlay .route-slot[aria-current=true]{border-color:#e1c982;background:linear-gradient(110deg,#302d38,#443d4c)}
.hub-view #story-overlay .route-slot.locked{background:linear-gradient(110deg,#222128,#2c2a31);border-color:#6f6776;color:#d8d0c3;filter:none}
.hub-view #story-overlay .route-slot.locked .route-slot-title{color:#e4dccd}
.route-slot-index{flex:none;display:grid;place-items:center;width:30px;height:30px;border:2px solid #a9bdc6;border-radius:50%;background:#1d1b24;color:var(--cream-300);font:17px/1 Lucky,sans-serif}
.route-slot.cleared .route-slot-index{border-color:#d1efa2;background:#4f8a34;font:800 16px/1 system-ui}
.route-slot.locked .route-slot-index{border-color:#b3a9bb;background:#3a3542;color:#f1e8d6}.route-slot.locked .route-slot-index svg{width:13px;height:16px}
.route-slot-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.route-slot-title{font:clamp(18px,5vw,21px)/1.1 Lucky,sans-serif;color:var(--cream-300);overflow-wrap:anywhere}
.route-slot-copy small{font:700 10px/1.25 system-ui;color:#e9dfc9}
/* Special slot (Rabbit Wizard's Trail, owner 2026-09-27): after the main routes,
   a lavender star badge and a "Special" tag instead of a route number. */
.hub-view #story-overlay .route-slot.special:not(.locked){border-color:#b59ae0;background:linear-gradient(110deg,#2d2838,#40354f)}
.hub-view #story-overlay .route-slot.special[aria-current=true]{border-color:#e1c982}
.route-slot.special:not(.cleared):not(.locked) .route-slot-index{border-color:#cdb8f2;background:#4b3a6b;color:var(--gold-100);font:800 16px/1 system-ui}
/* Same height as the main slots (motion review 2026-09-27): the tag rides the
   top border (the strip keeps a 9px transparent band so it is not clipped),
   the title stays on one line and the status keeps at most two. */
.hub-view #story-overlay .route-slots{padding-top:9px;padding-bottom:5px;bottom:3px}
/* Visual polish (layout lane): the neighbouring slots peek through a soft edge fade instead of reading as clipped empty slabs. */
.hub-view #story-overlay .route-slots{-webkit-mask-image:linear-gradient(90deg,#0000 0,#0008 5%,#000 12.5%,#000 87.5%,#0008 95%,#0000);mask-image:linear-gradient(90deg,#0000 0,#0008 5%,#000 12.5%,#000 87.5%,#0008 95%,#0000)}
.hub-view #story-overlay .route-slot.special{padding-block:5px}
.route-slot.special .route-slot-title{font-size:clamp(15px,4.2vw,18px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.route-slot-tag{position:absolute;top:-9px;left:52px;z-index:1;padding:1px 7px;border:1px solid #2d2140;border-radius:999px;background:#cdb8f2;color:#2d2140;font:800 9px/1 system-ui;font-style:normal;letter-spacing:.06em;text-transform:uppercase;pointer-events:none}
/* P14 (build 27): the Special entry keeps the plaque's own navy/gold ribbon
   (same face as "Story 2 / 5"); only its label differs. No purple override. */
/* One-shot spotlight after the Wizard discovery's Explore. Opacity-only ring;
   the negative delay keeps a poll rerender from replaying it. */
.hub-view #story-overlay .route-slot.is-spotlit:after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 2px var(--honey-200),inset 0 0 14px #ffd76a90;opacity:0;pointer-events:none;animation:route-slot-spotlight 900ms ease-out 2 both;animation-delay:var(--spot-delay,0ms)}
@keyframes route-slot-spotlight{0%{opacity:0}35%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.hub-view #story-overlay .route-slot{transition:none}.hub-view #story-overlay .route-slot.is-spotlit:after{animation:none;opacity:0}}
.hub-view .hub-menu{top:25px}.hub-view .hub-calendar{top:14px}
.hub-view .hub-shortcut{background:linear-gradient(#494653e8,#292733e8);border-color:#1b1924;box-shadow:inset 0 1px #a5a1b055,0 3px #17151fa0}
.hub-view .hub-events{bottom:102px;width:54px;min-height:52px;border-color:#ceb573}
/* V14 (build 32 feedback): the route arrows keep one place on every slot (story,
   chapter, special): just above the slot strip, never at mid-scene on some slots. */
.hub-view #story-overlay .hub-route-arrows{top:auto;bottom:96px}
.hub-view #story-overlay .hub-route-arrows button{border-color:var(--ink-plum-2);background:linear-gradient(#ada8c3,#77718d);box-shadow:inset 0 2px #e8e1f5,0 3px #19151fa0}
.hub-launch .primary{--bt-top:var(--honey-300);--bt-face:#ffbc47;--bt-low:#ffa12b;--bt-edge:#aa6330}

/* Three destinations: Equipment, Home services, Story route selection. */
#online #profile{gap:4px}
#online #profile .profile-card{flex:0 0 136px;width:136px;min-height:58px;gap:4px;padding:4px 9px 4px 4px;border-bottom-right-radius:20px}
#online #profile .profile-card>img{width:36px;height:36px;flex:none;object-fit:cover;border-radius:5px;box-shadow:0 0 0 2px #a3a0ad;background:#302e39}
#online #profile .profile-identity>b{font-size:11px;line-height:15px}
#online #profile .profile-rank{font-size:9px;gap:2px;margin-top:2px;max-width:84px;overflow:hidden}
#online #profile .profile-rank img{width:12px;height:14px;flex:none}
#online #profile .energy-pill{display:grid;grid-template-columns:19px 17px 5px 14px 22px;align-items:center;justify-content:center;column-gap:4px;flex:0 0 109px;width:109px;height:44px;padding:0 3px;margin:0;font-variant-numeric:tabular-nums}
#online #profile .energy-pill:before{inset:7px 0;border-radius:15px}
#online #profile .energy-pill .energy-value{position:static;margin:0;padding:0;font-size:12px;line-height:1;white-space:nowrap;min-width:15px;text-align:right}
#online #profile .energy-pill .energy-cap{position:static;margin:0;padding:0;font:700 10px/1 system-ui;color:#bdc5d0;white-space:nowrap}
#online #profile .energy-pill .energy-slash{position:static;width:5px;height:auto;margin:0;padding:0;background:none;border-radius:0;font:700 11px/1 system-ui;color:#bdc5d0;text-align:center}
/* F04 sweep: system-ui's "+" ink sat 1.4px low in the 12px/11px square every
   phone profile uses. A .2em bottom padding centres it (measured -0.07px); the
   .7 line box keeps that padding effective (a taller line box overflows the
   square and grid centring stops at the content edge). */
#online #profile .energy-pill .energy-plus{position:static;display:grid;place-items:center;width:22px;height:22px;min-width:22px;padding:0 0 .2em;border-radius:5px;font:800 19px/.7 system-ui;background:#526771;box-shadow:inset 0 1px #a6bac2;color:#fff}
#online #profile .energy-pill img{margin:0;width:19px;height:29px}
#online #profile .coin-pill{flex:0 0 62px;width:62px;min-width:62px;max-width:62px;padding-right:3px;gap:2px;justify-content:center}
#online #profile .coin-pill b{font-size:11px;white-space:nowrap;margin:0}
#online #profile .coin-pill img{width:20px;height:25px;flex:none}
#online #profile .profile-tools{margin-left:auto}
#tabs .bottom-tab{min-width:0;gap:4px;padding:5px;font-size:16px}
#tabs .bottom-tab img,#tabs .home-tab-icon{width:24px;height:27px;flex:none}
.hub-view #story-overlay .hub-route-arrows button{display:grid;place-items:center;padding:0}
.route-arrow-art{width:32px;height:32px;overflow:visible}
.hub-shortcut{gap:0;min-height:48px;height:48px;padding:2px}
.hub-shortcut img{width:27px;height:27px;margin:0}
.hub-shortcut small{font-size:9px;line-height:11px;margin:0}
.hub-shortcut .menu-lines{font-size:23px;line-height:27px}

.home-view#online,.detail-view#online{height:100dvh;max-height:100dvh;min-height:0;margin:0 auto;display:flex;flex-direction:column;border:0;border-radius:0;padding-top:var(--safe-top,env(safe-area-inset-top,0px))}
.home-view #profile,.detail-view #profile,.home-view #tabs,.detail-view #tabs{flex:none}
#online.home-view #profile{height:48px;min-height:48px}
.home-view #content{display:flex;flex:1;min-height:0;flex-direction:column;padding:0}
.home-scene{position:relative;flex:1;min-height:180px;container-type:size;isolation:isolate}
/* Owner 2026-11-21 ("to tło nie powinno być spłaszczane — tylko powinniśmy widzieć odpowiedni fragment"): the plate is
   never stretched to the scene. .home-art is a box with the painting's own 1024:1536 shape, sized to cover the scene
   (--home-art-h), and it holds the plate, the SVG layers and every actor placed in painting coordinates (hero, weapon
   stand, Blip, portal, onboarding chip), so they stay registered at every window shape. .home-stage crops the overflow.
   The crop keeps the hero's feet (67.38% down the painting) 76% down the scene, at least 88px above its bottom edge
   (the Camp radio) but never above 67.38% of a very short scene, and never shows past the painting's top or bottom;
   a scene taller than the painting crops the sides about the feet's column (55.18%). Blip hovers at the hero's head
   (bottom:46% of the painting, beside the hero's goggles; the old 52% was a share of the squashed scene and read too low, owner 2026-11-21). Rails, bands and buttons stay in scene coordinates. Without container
   units the box is the scene's own rectangle. */
.home-stage{position:absolute;inset:0;overflow:hidden}
.home-art{position:absolute;inset:0;background:url('/art/home-base-temple-v3.png') 0 0/100% 100% no-repeat}
@supports (width:1cqw){.home-art{--home-art-h:max(150cqw,100cqh);inset:auto;height:var(--home-art-h);width:calc(var(--home-art-h)/1.5);left:calc((100cqw - var(--home-art-h)/1.5)*.5518);top:clamp(100cqh - var(--home-art-h),max(min(76cqh,100cqh - 88px),67.38cqh) - var(--home-art-h)*.6738,0px)}}
.home-art:has(>.home-landscape-layers[data-time="night"]){background-image:url('/art/home-base-night-v1.png')}
.home-landscape-layers[data-time="night"] .home-clouds{opacity:.25;filter:brightness(.65) sepia(.18) hue-rotate(175deg)}
.home-landscape-layers[data-time="night"] .home-clouds-low{opacity:.16}
.home-scene:has([data-time="night"]) .home-hero{filter:brightness(.87) saturate(.88) drop-shadow(0 3px 2px #10152388)}
.home-scene:has([data-time="night"]) .home-scout{filter:brightness(.92) drop-shadow(0 0 5px #89d9f744)}
.home-scenery-options{margin:10px 0 0;padding:6px 8px 8px;border:1px solid #bca578;border-radius:var(--vs-radius)}
.home-scenery-options legend{font-size:12px;padding:0 5px}
.home-scenery-options>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.home-scenery-options button{min-height:44px;margin:0}
.home-landscape-layers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:0}
.home-fire{transform-origin:157px 910px;animation:home-fire-flicker 2.6s ease-in-out infinite alternate}
.home-embers{animation:home-ember-rise 5s ease-out infinite}
.home-near-foliage{transform-origin:1024px 1536px;animation:home-leaf-sway 6s ease-in-out infinite alternate}
.home-mist{animation:home-mist-drift 12s ease-in-out infinite alternate}
.home-clouds{opacity:.6;animation:home-cloud-drift 95s linear infinite}
.home-clouds-low{opacity:.28;animation-duration:130s;animation-delay:-42s}
@keyframes home-cloud-drift{from{transform:translateX(0)}to{transform:translateX(-1500px)}}
body:has(#modal[open]) .home-clouds{animation-play-state:paused}
body:has(#modal[open]) .home-landscape-layers g{animation-play-state:paused}
@keyframes home-fire-flicker{0%{transform:scaleY(.993);opacity:.97}50%{transform:scaleY(1.008);opacity:1}100%{transform:scaleY(.997);opacity:.985}}
@keyframes home-ember-rise{0%{transform:translate(0,12px);opacity:0}20%{opacity:.8}100%{transform:translate(13px,-60px);opacity:0}}
@keyframes home-leaf-sway{from{transform:skewX(-.12deg)}to{transform:skewX(.12deg)}}
@keyframes home-mist-drift{from{transform:translate(-5px,4px);opacity:.45}to{transform:translate(9px,-5px);opacity:.9}}
@media(prefers-reduced-motion:reduce){.home-landscape-layers g{animation:none!important}.home-embers{opacity:0}}
.home-scene .hub-menu{top:25px}.home-scene .hub-calendar{top:19px}
.home-scene .hub-events{right:8px;bottom:16px;width:53px;min-height:48px;height:48px}
.home-scene .hub-shortcut{background:linear-gradient(#494653ed,#292733ed);border-color:var(--ink-plum-2)}
.home-event-rail{position:absolute;right:7px;top:19px;z-index:2;display:flex;flex-direction:column;padding:3px;border:2px solid var(--ink-plum-2);border-radius:14px;background:linear-gradient(#494653ed,#292733ed);box-shadow:inset 0 1px #a5a1b055,0 3px #17151fa0}
.home-scene .home-event-rail .hub-shortcut{position:static;width:48px;height:48px;min-height:48px;border:0;border-radius:9px;background:transparent;box-shadow:none}
.home-event-rail .hub-events{border-top:1px solid #a5a1b044!important;border-top-left-radius:0!important;border-top-right-radius:0!important}
/* Platform center: (565, 1035) in the 1024 x 1536 plate. The asymmetric
   hero crop puts the center between the feet at 59.17%, not its tail-inclusive midpoint. */
.home-hero{position:absolute;left:55.18%;bottom:32.62%;transform:translateX(-59.17%);width:clamp(83px,24vw,114px);height:clamp(113px,32.6vw,155px);filter:drop-shadow(0 3px 1px #442d3a55)}
.home-hero svg{width:100%;height:100%;display:block}
.home-scout{position:absolute;width:43px;height:48px;object-fit:contain;left:69%;bottom:46%;animation:home-scout-hover 3.2s ease-in-out infinite}
.home-scout-lid{opacity:0;pointer-events:none}
@keyframes home-scout-hover{0%,100%{transform:translateY(2px) rotate(-2deg)}50%{transform:translateY(-3px) rotate(2deg)}}
body:has(#modal[open]) .home-scout{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.home-clouds,.home-scout{animation:none}}
.home-actions{flex:none;padding:8px 10px;background:linear-gradient(#37333e,var(--ink-plum-2))}
/* P10 (build 27): Choose adventure uses the Story tab's Start Adventure face
   (62px with its cost pill, 10/18/14 padding, 25px label, 23px at Mini), so both read the same size
   and the label sits centred on the face above its lip. */
.home-actions .primary{min-height:62px!important;font-size:25px!important;margin:6px 0 4px!important;width:100%!important;padding:12px 18px!important}
@media(max-width:380px){.home-actions .primary{font-size:23px!important}}
.home-actions .hub-bottom-boxes{grid-template-columns:1fr 100px}

/* Shallow resource chrome; the deeper identity plaque remains independent. */
#online:not(.story-mode) #profile{height:44px;min-height:44px;background:linear-gradient(#393943,#272730) top/100% 36px no-repeat;box-shadow:none}
#online #profile .profile-card{flex-basis:140px;width:140px;min-height:52px;gap:8px;padding:4px 7px 4px 4px}
#online #profile .energy-pill:before{inset:10px 0;border-radius:var(--vs-radius)}
#online #profile .coin-pill{height:24px;margin-top:10px}
#online #profile .coin-pill img{height:22px}
#online #profile .server-badge{left:8px;right:8px;bottom:-2px;height:10px;font:800 6px/8px system-ui;letter-spacing:.6px;border-radius:3px}
#online button:not(.primary),#modal button:not(.primary){transition:scale var(--tap-t,.12s ease-out);scale:1}
/* #error: Retry safely sits in the global status layer, outside #online when no modal is open. */
:is(#online,#modal,#error) button:not(.primary):not(:disabled):active{scale:.92}
.home-event-rail{top:50%;transform:translateY(-50%);background:#302d3c80;box-shadow:inset 0 1px #fff2,0 2px #18162255;border-color:#b2abb85c}
.home-actions .hub-bottom-boxes{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.home-actions .hub-travel-box,.home-actions .hub-afk-box{display:flex;align-items:center;gap:6px;min-width:0;height:58px;padding:5px 8px;text-align:left}
.home-actions .hub-travel-box>img,.home-actions .hub-afk-box>img{width:31px;height:34px;flex:none}
.home-actions .hub-travel-box b,.home-actions .hub-afk-box b{font:17px/1.1 Lucky;display:block}
.home-actions .hub-travel-box small,.home-actions .hub-afk-box small{font-size:9px;line-height:12px;display:block}
.home-actions .hub-travel-box strong{display:none}
.equipment-stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:5px 0}
.equipment-stat-row>div{display:flex;align-items:center;justify-content:center;gap:7px;background:#846653;border:1px solid #b69877;border-radius:18px;padding:3px 7px;color:var(--cream-250)}
.equipment-stat-row img{width:26px;height:28px;object-fit:contain}
.equipment-stat-row span{display:flex;flex-direction:column;text-align:left}
.equipment-stat-row small{font-size:8px;line-height:10px}.equipment-stat-row b{font:22px/22px Lucky}
.collections-panel h1{text-align:center}
.collection-tabs{display:flex;gap:5px;margin-bottom:8px}
.collection-tabs button{flex:1;min-height:44px;padding:5px;border:2px solid #5c526a;border-radius:10px;background:linear-gradient(#aaa5c0,#817a98);color:#fff;font:18px Lucky}
.collection-summary{text-align:center;font-size:11px;color:#675643}
.lore-page{min-height:200px;border:1px solid #b19c77;border-radius:var(--vs-radius);background:var(--card-face);padding:18px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}
.lore-page>img{width:45px;height:45px;object-fit:contain;margin-bottom:8px}.lore-page small{font-size:10px}.lore-page h2{font-size:22px;margin:6px 0}.lore-page p{font-size:14px}
.collection-skill-pages{display:grid;gap:7px;margin-bottom:7px}
.collection-skill{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:8px;min-height:105px;padding:8px;border:2px solid #ad9570;border-radius:var(--vs-radius);background:var(--cream-200)}
.collection-skill>img{width:54px;height:60px;object-fit:contain}.collection-skill h2{font-size:20px;margin:0 0 4px}.collection-skill p{font-size:12px;line-height:1.35;margin:0!important}
/* AC780: the one "not discovered yet" look: the art as a dark silhouette on its card (Fishing book fish, Journal
   creatures). Never pair it with the real name or alt text. */
:is(.ui-silhouette,.fishing-book-grid .is-unknown img){filter:brightness(0);opacity:.5}
.collection-enemies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:8px}
.collection-enemy{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:102px;border:1px solid #ad9570;border-radius:var(--vs-radius);background:var(--cream-200);padding:5px;text-align:center}
.collection-enemy>div{height:52px;width:65px;display:grid;place-items:center}.collection-enemy svg{height:100%;width:100%}.collection-enemy b{font:15px/17px Lucky}.collection-enemy small{font-size:9px}.collection-enemy.locked{background:#ddd2b9;color:#756758}.collection-enemy.locked span{font:38px Lucky}
/* Undiscovered enemies use the sealed dark locked face of the Events cards, with
   bright text, instead of grey-on-grey (EQG-10). */
#modal .collection-enemy.locked{background:repeating-linear-gradient(135deg,#ffffff0a 0 7px,transparent 7px 14px),linear-gradient(135deg,#3b3348,#231f2e);border-color:#8d7650;color:var(--cream-200)}
#modal .collection-enemy.locked small{color:#ffd98a;font-weight:700}
#modal .collection-enemy.locked span{color:var(--gold-100);filter:drop-shadow(0 2px var(--panel-night))}
@media(max-height:730px){.collection-enemy{min-height:88px}.collection-enemy>div{height:42px}.collection-skill{min-height:96px}}
/* AB20 (build 40, bestiary-v1): Journal → Enemies is one page per story act with
   the act reward card and a contained vertical scroll list of every creature
   (approved exception, SCREEN_RULES.md → Creature encyclopedia). Only the list
   scrolls; the title, tabs, act header, reward card and Close stay fixed. */
#modal .bestiary-act-nav{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 6px}
#modal .bestiary-act-title{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;line-height:1.1}
#modal .bestiary-act-title span{font:800 11px/1.2 system-ui;letter-spacing:.08em;text-transform:uppercase;color:#8a6a45}
#modal .bestiary-act-title strong{font:19px/1.15 Lucky;color:#3b2f27}
#modal .bestiary-act-title small{font-size:11px;color:#675643;margin-top:1px}
#modal .bestiary-act-arrow{flex:none;width:44px;height:44px;min-height:44px;padding:0;border:2px solid var(--ink-plum-2);border-radius:50%;background:linear-gradient(#aaa3c4,#7d7698);box-shadow:inset 0 2px #e4def088,0 3px #1b1923;color:#fff;font:26px/1 Lucky;display:grid;place-items:center}
#modal .bestiary-act-arrow:disabled{background:linear-gradient(#c9c4cf,#a9a4b0);color:#ece8f0}
#modal .bestiary-reward{display:flex;align-items:center;gap:8px;margin:0 0 7px;padding:7px 9px;border:2px solid #c29a5b;border-radius:13px;background:linear-gradient(var(--cream-250),#f4e2b4)}
#modal .bestiary-reward.is-ready{border-color:#d8a02c;background:linear-gradient(var(--gold-50),#f7d784);box-shadow:0 0 0 2px #ffe08a80}
#modal .bestiary-reward.is-claimed{background:linear-gradient(#f1f6e5,#dde9c8);border-color:#8fae6b}
#modal .bestiary-reward-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
#modal .bestiary-reward-copy small{font:700 11px/1.25 system-ui;color:#5f4a33}
#modal .bestiary-reward-items{justify-content:flex-start;gap:10px;padding:0;flex-wrap:wrap}
#modal .bestiary-reward-items>span{font:800 14px/1 system-ui;color:#3b2f27;gap:3px}
#modal .bestiary-reward-items img{width:26px;height:26px}
#modal .bestiary-reward-status{flex:none;font:16px/1.1 Lucky;color:#6e5638;white-space:nowrap}
#modal .bestiary-reward-status.is-claimed{color:#3f7a2c}
#modal .bestiary-reward .bestiary-claim{flex:none;min-width:96px;min-height:44px;margin:0;padding:6px 14px}
#modal .bestiary-list{max-height:min(38dvh,330px);margin:0 0 4px;padding:2px 2px 6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#ad9570 transparent;border-radius:var(--vs-radius);align-content:start}
@media(max-height:730px){#modal .bestiary-list{max-height:min(30dvh,250px)}#modal .bestiary-act-title strong{font-size:17px}}

/* Small controls use clean lettering, a complete raised face, and one scale press. */
#online .secondary,#modal .secondary,#tabs .bottom-tab,.collection-tabs button{
 border:2px solid var(--ink-plum-2);border-radius:var(--vs-radius);background:linear-gradient(#9993ad,#777188);
 box-shadow:inset 0 2px #dbd5e888,0 3px #1b1923;color:var(--cream-200);
 font:17px/1.15 Lucky;-webkit-text-stroke:0;text-shadow:none;paint-order:normal;
}
#online .secondary:before,#modal .secondary:before,#tabs .bottom-tab:before{display:none}
:is(#online,#modal,#error) .secondary:active,#tabs .bottom-tab:active{transform:none}
#tabs .bottom-tab{flex-direction:column;gap:2px;min-height:52px;padding:4px;font-size:13px}
#tabs .bottom-tab img,#tabs .home-tab-icon{height:25px;width:25px}
#online .eq-shortcuts .secondary,#online .eq-training .secondary{font-size:16px}
#modal .collection-pages{margin-top:12px;padding:0 3px 4px;gap:12px}
#modal .collection-pages button{font-size:15px}
#modal>.secondary[data-action=dismiss]{width:100%;font-size:16px;margin-top:12px}
#modal button.primary{position:relative;display:flex;align-items:center;justify-content:center;color:#fff;-webkit-text-stroke:2px var(--ink-navy);paint-order:stroke fill;text-shadow:none;box-shadow:var(--button-shadow)}
#modal .hub-rewards-panel>.primary{border-radius:999px;font-size:22px;min-height:54px;width:100%}
.travel-route-picker{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:6px;margin-top:4px;border:2px solid #b79a69;border-radius:var(--vs-radius);background:var(--cream-200);min-height:56px}
.travel-route-picker button{display:grid;place-items:center;width:44px;height:48px;padding:4px;border:0;background:none}
.travel-route-picker .route-arrow-art{width:26px;height:26px}
.travel-route-picker strong{font:16px/1.15 Lucky;text-align:center;min-width:0;overflow-wrap:anywhere}
.travel-route-picker small{display:block;font:10px/1.2 system-ui;margin-top:3px;color:#776447}
#modal .hub-rewards-panel{gap:9px}
.travel-monitor{height:clamp(110px,18dvh,146px)}
/* 8px of rail padding around the Calendar/Events faces (box-padding rule). */
.home-scene .home-event-rail{gap:6px;padding:8px}
/* G15 (build 21): entering Home slides the rail in from off-screen right and Menu
   from off-screen left. `translate` composes with the rail's centring transform;
   the buttons stay tappable during the slide. renderHome adds .is-entering only
   on arrival, so in-place refreshes never replay it. */
@keyframes rail-in-right{from{translate:calc(100% + 16px) 0;opacity:0}}
@keyframes rail-in-left{from{translate:calc(-100% - 16px) 0;opacity:0}}
.home-scene.is-entering .home-event-rail{animation:rail-in-right .38s cubic-bezier(.16,1,.3,1) var(--home-enter-delay,0s) both}
.home-scene.is-entering .hub-menu,.home-scene.is-entering .home-menu-band{animation:rail-in-left .38s cubic-bezier(.16,1,.3,1) var(--home-enter-delay,0s) both}
@media(prefers-reduced-motion:reduce){.home-scene.is-entering .home-event-rail,.home-scene.is-entering .hub-menu,.home-scene.is-entering .home-menu-band{animation:none}}
.home-scene .home-event-rail .hub-shortcut{background:linear-gradient(#625c71dd,#393344dd);border:1px solid #aaa0b76b!important;border-radius:9px!important;box-shadow:inset 0 1px #fff2,0 2px #18142188;width:48px;height:48px}

/* Visual faces are small; transparent hit areas remain 44px high. */
#online #profile{align-items:flex-start;gap:3px;padding-right:3px}
#online #profile .profile-card{position:relative;flex-basis:140px;width:140px;gap:8px}
#online #profile .energy-pill{grid-template-columns:17px 17px 4px 13px 17px;column-gap:4px;flex-basis:96px;width:96px;padding:0 2px}
#online #profile .energy-pill .energy-plus{width:17px;height:17px;min-width:17px;border-radius:4px;font-size:15px}
#online #profile .energy-pill img{width:17px;height:23px}
#online #profile .coin-pill{margin-top:10px}
#online #profile .settings-icon{border:0;background:none;box-shadow:none;padding:0;display:grid;place-items:center}
/* One illustrated cog on every surface; only its lavender face changes size. */
#online .settings-icon .settings-face{box-sizing:border-box;display:grid;place-items:center;width:44px;height:44px;border:2px solid #211e30;border-radius:var(--vs-radius);background:linear-gradient(155deg,#b6b0ca 0%,#9690ad 55%,#78738f 100%);box-shadow:inset 0 2px 0 #eee9fa,inset 0 -3px 0 #666078,0 3px 0 #171423;pointer-events:none}
#online .settings-icon .settings-face img{display:block;width:34px;height:34px;object-fit:contain;pointer-events:none}
#online #profile .settings-icon .settings-face{width:32px;height:32px;border-radius:9px;box-shadow:inset 0 1px 0 #eee9fa,inset 0 -2px 0 #666078,0 2px 0 #171423}
#online #profile .settings-icon .settings-face img{width:25px;height:25px}
/* P19 (build 27): in Story battle playback the cog face is the compact 32px of
   the speed/Skip faces; its 48px target and top-right place are unchanged. */
#online.story-playing #story-settings .settings-face{width:32px;height:32px;border-radius:9px;box-shadow:inset 0 1px 0 #eee9fa,inset 0 -2px 0 #666078,0 2px 0 #171423}
#online.story-playing #story-settings .settings-face img{width:25px;height:25px}
#online .settings-icon:focus-visible{outline:2px solid var(--gold-100);outline-offset:2px;border-radius:var(--vs-radius)}
#online #profile .server-test{position:absolute;z-index:1;left:0;top:39px;width:44px;height:44px;padding:0;display:flex;align-items:flex-start;justify-content:center;border:0;background:none;box-shadow:none}
#online #profile .server-test span{padding:1px 4px;border-radius:3px;background:#e5c888;color:#57452c;font:800 7px/10px system-ui;letter-spacing:.5px;border:1px solid #aa8956}

.collection-skill-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.collection-skill-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:76px;min-width:44px;padding:5px 2px;border:1px solid #b39b78;border-radius:10px;background:linear-gradient(var(--card-face),#ecdcbb);color:#3e3541;box-shadow:0 2px #af95604d}
.collection-skill-grid img{width:41px;height:41px;object-fit:contain}
.collection-skill-grid b{font:11px/1.15 Lucky;max-width:100%}
.collection-skill-detail header{display:flex;align-items:center;gap:10px;margin-bottom:8px}.collection-skill-detail header img{width:52px;height:58px;object-fit:contain}
#modal .collection-skill-detail h1{font-size:25px;margin:0}.collection-skill-detail>p{font-size:11px;color:#75654f}
.skill-levels{display:grid;gap:8px;margin:12px 0}
.skill-levels article{padding:10px;border:1px solid #b59d77;background:var(--card-face);border-radius:var(--vs-radius)}
.skill-levels article.legendary{display:flow-root;border:2px solid #c98a2e;background:linear-gradient(110deg,var(--cream-250),var(--gold-100))}
.skill-levels article.legendary>img{float:right;width:44px;height:44px;object-fit:contain;margin:-2px 0 0 8px;padding:2px;border:2px solid #9a5a1c;border-radius:10px;background:linear-gradient(145deg,var(--honey-200),var(--rarity-legendary) 55%,var(--rarity-legendary-accent))}
.skill-levels article.legendary .skill-legendary-tag{vertical-align:2px}
.skill-levels article>b{font:16px Lucky;color:#8a632f}
/* Visual polish r2 (meta #97): rank pips before each rank title. */
.skill-rank-pips{display:inline-flex;gap:1px;margin-right:6px;vertical-align:-3px}.skill-rank-pips>.ui-icon{width:17px;height:17px}.skill-levels p{font-size:12px;line-height:1.4;margin:4px 0 0!important}
.collection-skill-detail>.secondary{width:100%;min-height:44px;margin:4px 0}
/* Visual polish r2 (finding 24): lavender back arrow (All skills) at the header's left, (?) at its right. */
#modal .collection-skill-detail>header{position:relative;padding:0 60px;min-height:52px}
#modal .collection-skill-detail>header>.back-arrow{position:absolute;left:0;top:50%;translate:0 -50%;display:grid;place-items:center;width:54px;height:48px;margin:0;padding:3px;border:2px solid var(--ink-plum-2);border-radius:15px;background:linear-gradient(145deg,#aaa2b8,#857d99 70%,#79718b);box-shadow:inset 0 2px 0 #d9d0e1,inset 2px 0 0 #bcb2c9,inset -2px -3px 0 #6c637d,0 3px 0 var(--panel-night)}
#modal .collection-skill-detail>header>.back-arrow svg{width:43px;height:32px;overflow:visible;translate:0 -1.5px}
#modal .collection-skill-detail>header>.help-button{position:absolute;right:0;top:50%;translate:0 -50%}
#modal .collection-skill-help>p{font:15px/1.45 system-ui}
/* A help sheet's Back that reuses a commit action (Back to Combine) keeps the parchment face. */
#modal .equipment-actions>button.secondary.is-plain-back:not(:disabled){--small-top:var(--btn-secondary-top);--small-bottom:var(--btn-secondary-bottom);--small-edge:var(--btn-secondary-edge);--small-lip:var(--btn-secondary-lip);--small-shine:var(--btn-secondary-shine)}

.training-view #content{background:radial-gradient(ellipse at top,#5a515c,var(--ink-plum-2));justify-content:space-between;gap:8px;color:var(--cream-300)}
.training-heading{position:relative;padding:0 46px;text-align:center}.training-heading .eyebrow{font-size:8px;color:#e4c991}.training-heading p{font-size:12px;margin:3px 0}
.training-view .equipment-stat-row{margin:0;flex:none}
.training-board{background:linear-gradient(var(--cream-300),var(--row-inset));border:2px solid #b99a67;border-radius:16px;padding:10px;color:#3b3440;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:7px}
.training-progress{height:9px;flex:none;overflow:hidden;border:1px solid #635b65;border-radius:8px;background:#4a414b}.training-progress i{display:block;height:100%;background:linear-gradient(#b7e277,#6db84d)}
.training-steps{display:grid;gap:5px;flex:1;min-height:0;align-content:center}
.training-step{display:grid;grid-template-columns:30px 28px 1fr auto;gap:7px;align-items:center;min-height:47px;padding:5px;border-bottom:1px solid #c5ad8355}
.training-step.current{border:1px solid #b18a40;border-radius:9px;background:var(--honey-200);box-shadow:inset 0 1px var(--cream-350)}
.training-number{display:grid;place-items:center;width:28px;height:28px;background:#77677c;border:1px solid #514055;border-radius:50%;color:white;font:16px Lucky}
.training-step.done .training-number{background:#6a9855}.training-step img{width:28px;height:30px;object-fit:contain}
.training-step span b{font:17px Lucky}.training-step span small{display:block;font-size:9px;color:#826849}.training-step>strong{font-size:10px}
.training-board .collection-pages{margin-top:4px;gap:9px}.training-board .collection-pages .secondary{font-size:14px;min-height:44px}
.training-buy{flex:none;text-align:center}.training-buy p{margin:0;font-size:13px}.training-buy p small{display:block;font-size:10px;color:#d2c3ab}
.training-buy>.primary{width:100%;min-height:52px!important;font-size:23px!important;margin:6px 0 8px!important;padding:9px!important}
/* Visual polish v1: the finished Training Path ends on a flat gold achievement plate (no lip, no drop, so
   nothing reads as pressable) carrying the outlined "Maximum reached" and its quiet caption. */
.training-buy>.training-max{display:grid;justify-items:center;gap:2px;box-sizing:border-box;width:100%;min-height:52px;margin:6px 0 8px;padding:7px 12px;border:2px solid #b8862d;border-radius:var(--vs-radius);background:linear-gradient(var(--active-shine),var(--active-top) 45%,var(--active-bottom));box-shadow:inset 0 2px var(--cream-50)}
.training-buy>.training-max>b{font:23px/1.05 Lucky,system-ui;color:var(--cream-50);-webkit-text-stroke:.14em #7a4a14;paint-order:stroke fill;filter:drop-shadow(0 .07em #7a4a14)}
.training-buy>.training-max>small{font:800 11px/1.2 system-ui;color:#6b4a14}
@media(max-height:730px){.training-view #content{gap:5px}.training-board{padding:8px;gap:5px}.training-step{min-height:42px;padding:3px}.training-heading .eyebrow{display:none}.collection-skill-grid button{min-height:68px}.collection-skill-grid img{width:35px;height:35px}#modal .hub-rewards-panel{gap:6px}}

/* Compact dialogs retain their native top layer and local Close control. */
#modal,#modal.hub-reward-modal{width:min(460px,calc(100vw - 16px));max-width:calc(100vw - 16px);padding:12px;gap:6px}
#modal h1{font-size:27px;margin-bottom:8px}#modal p{margin-bottom:8px}
#modal .event-pages{gap:6px}#modal .event-card{padding:8px;min-height:70px;gap:0 8px}
#modal .event-card b{font-size:21px}#modal .event-card small{font-size:11px}
#modal .hub-rewards-panel{gap:6px}
#modal>.secondary[data-action=dismiss]{margin:8px 0 0;min-height:44px;padding:5px}

/* Standalone mining and exchange share a bottom return slot, never page scroll. */
.detail-view #content{flex:1;min-height:0;padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.detail-view #content h1{font-size:26px;margin:0;line-height:1.1}
.mining-title{text-align:center}.mining-title .eyebrow{font-size:8px;color:#dacba6}
.mining-wallet{display:flex;align-items:center;gap:8px;justify-content:space-between;min-height:44px;font-size:13px}
.mining-wallet span{display:flex;align-items:center;gap:5px}.mining-wallet img{width:23px;height:27px;object-fit:contain}
/* AC365: the Gems value is its own node for the shared count; it keeps the capsule's type. */
.mining-wallet .mining-gems>b{font-weight:inherit}
.mining-wallet .secondary{display:flex;align-items:center;justify-content:center;gap:4px;min-height:44px;width:auto;padding:4px 8px;font-size:15px;margin:0}
.miner-view .mining{flex:1;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;padding:8px;margin:0;background:linear-gradient(#645348,#382f31);border:2px solid #a58a66;border-radius:16px}
.mining-status{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--cream-300)}
.miner-view .mining>small{font-size:10px;line-height:1.2;color:#e6d2b2}
.miner-view .dig-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;width:min(100%,300px);margin:2px auto;flex:none}
.miner-view .tile{aspect-ratio:1;min-height:44px;min-width:44px;width:100%;height:auto;padding:2px;border:2px solid #30272a;border-radius:9px;background:linear-gradient(135deg,#c4a47c,#947450);box-shadow:inset 0 2px #e5c599,0 2px #251f23;position:relative}
.miner-view .tile.opened{opacity:1;background:#493d36;box-shadow:inset 0 2px #211d22}
.miner-view .tile.scan{outline:2px solid #aedd7a;outline-offset:-3px;background:linear-gradient(#b2b36c,#83834d)}
.miner-view .tile img{display:block;max-width:31px;max-height:31px;width:70%;height:70%;object-fit:contain;margin:auto}
.mining-hint{font-size:11px;line-height:1.25;margin:0;text-align:center;color:#fff0d2}
.mining-actions{display:flex;gap:4px}.mining-actions .secondary{flex:1;min-height:44px;margin:0;padding:5px;font-size:17px}
.mining-milestone{text-align:center}
.mining-title{position:relative;padding:0 38px;min-height:40px}
.mining-title h1{font-size:24px!important}
#tabs .back-arrow,.batch-draft .skill-draft-actions>.back-arrow{flex:none;display:grid;place-items:center;width:84px;height:48px;margin:0;padding:3px 10px;border:3px solid var(--panel-night);border-radius:var(--vs-radius);background:linear-gradient(#aaa5c2,#827b9a);box-shadow:inset 0 2px #e4dced88,0 2px var(--panel-night)}
.back-arrow svg{width:60px;height:38px}
.exchange-view #content>.center{margin:0;font-size:12px}
.exchange-view .catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px;flex:1;min-height:0}
.exchange-view .catalog .paper{margin:0;padding:8px;display:grid;grid-template-rows:40px minmax(0,1fr) 20px 56px;justify-items:center;align-items:center;gap:3px;min-width:0;min-height:0}
.exchange-view .catalog h3{display:flex;align-items:center;justify-content:center;width:100%;height:40px;font-size:17px;margin:0;line-height:1.1;text-align:center;overflow-wrap:anywhere}
.exchange-card-art{width:76px;height:76px;display:grid;place-items:center;align-self:center}
.exchange-view .catalog .exchange-card-art img{width:70px;height:70px;object-fit:contain;display:block;margin:0}
.exchange-card-limit{width:100%;text-align:center;font:700 11px/1.2 system-ui;color:#67513d;white-space:nowrap}
#online.exchange-view .catalog .secondary{font-size:var(--tier-full-fs);padding:6px 3px;min-height:56px;margin:0;width:100%;min-width:0;align-self:end}
#online.exchange-view .catalog .secondary:before{inset:0}
#online.exchange-view .catalog .exchange-price>.button-label{display:flex;align-items:center;justify-content:center;gap:5px}
#online.exchange-view .catalog .exchange-price>.button-label img{width:30px;height:30px;object-fit:contain;flex:none;filter:drop-shadow(0 1px 0 #1b263e)}
/* AC631: bamboo's transparent left margin (11/160) is pulled in so the icon + price ink is centred. */
#online.exchange-view .catalog .exchange-price>.button-label img{margin-inline-start:-2px}
.collection-pages{display:flex;align-items:center;gap:8px;flex:none}.collection-pages button{flex:1;min-height:44px;margin:0;padding:5px;font-size:17px}.collection-pages small{white-space:nowrap}
@media(max-height:730px){.detail-view #content{padding:6px 9px;gap:4px}.exchange-card-art{height:58px}.exchange-view .catalog .exchange-card-art img{height:58px}}

/* Event screens retain the game's artwork and controls, not reference-game economies. */
#online.tower-view{background:var(--ink-plum-2);padding-bottom:0}
#online.tower-view.tower-playing{padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px))}
.tower-view #stage{flex:1;min-height:190px;height:0;position:relative}
.tower-view #world{height:100%!important;width:100%;display:block}
.tower-view #content{flex:none;overflow:visible;padding:8px 12px 5px;background:linear-gradient(#39313deF,var(--ink-plum-2));border-top:2px solid #ad8854}
.tower-view #tabs{display:flex;flex:none}
.tower-view.tower-playing #tabs,.tower-view #tabs[hidden]{display:none!important}
.tower-view #story-overlay{top:0;bottom:0}
.tower-view.tower-playing #story-overlay{top:6px}
.tower-view #playback{top:auto;bottom:4px}
.tower-heading{position:absolute;top:10px;left:50%;transform:translateX(-50%);width:min(280px,calc(100% - 32px));display:grid;justify-items:center;gap:10px}
/* AC180: preparation help sits at the screen's upper-right, outside the plaque. */
.tower-view #story-overlay .tower-corner-help{position:absolute;top:10px;right:8px;pointer-events:auto}
.tower-scene-title{min-width:174px;text-align:center;border:2px solid #c7a16b;border-radius:8px 8px 22px 22px;padding:6px 14px 9px;background:linear-gradient(#664938ef,#362e3fed);box-shadow:0 4px #1c1828a0;color:var(--cream-350)}
.tower-heading .tower-loot{box-sizing:border-box;width:100%;border-width:2px;background:#211c2deb;box-shadow:0 3px #17142190}
.tower-scene-title>span{display:block;font:21px/1 Lucky;letter-spacing:1px}
#online.tower-view .tower-scene-title #round-label{position:static;display:block;transform:none;font:30px/1.15 Lucky;-webkit-text-stroke:0;color:var(--honey-200);background:none;border:0;padding:0;margin:3px 0;filter:drop-shadow(0 2px #201b28)}
.tower-scene-title small{font-size:10px;color:#e8d5b5}
.tower-panel{gap:4px}
.tower-opponent-card{display:grid;grid-template-columns:1fr auto;text-align:left;gap:1px 6px;padding:2px 4px}
.tower-opponent-card .eyebrow{grid-column:1/-1;font-size:8px;color:#d5bc90}
.tower-opponent-card h2{font-size:21px;line-height:24px;color:var(--cream-300)}
.tower-enemy-stats{display:flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}
.tower-enemy-stats img{width:18px;height:19px;object-fit:contain}
.tower-loot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 12px;border:1px solid #ab8959;border-radius:10px;background:#1c1925;color:var(--cream-350);min-height:38px}
.tower-loot small{font-size:11px}.tower-loot>span{display:flex;align-items:center;gap:6px;font-size:17px}.tower-loot img{width:25px;height:26px;object-fit:contain}
.tower-panel .tower-kit-button{display:flex;align-items:center;gap:8px;align-self:stretch;min-height:46px;margin:0;padding:4px 10px;text-align:left;font-size:16px}
.tower-kit-button>span:nth-child(2){flex:1}.tower-kit-button small{display:block;font:10px/1.3 system-ui;text-shadow:none;color:#f1e6f5}.tower-selected{gap:4px}.tower-selected img{width:32px;height:32px}
.tower-auto{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;font-size:12px}.tower-auto small{font-size:10px;color:#c8bccd}
.tower-panel .primary{min-height:54px!important;padding:9.5px 10px!important;font-size:26px!important;margin:0 0 3px!important;width:100%}
.tower-free{font-size:9px;color:#cec0a5}
.tower-result{padding:10px!important;background:linear-gradient(var(--cream-350),#ddc391);border:2px solid #d5b471;color:#302b38}
.tower-result h1{font-size:36px}.tower-result p{font-size:12px}.tower-result .eyebrow{font-size:9px;color:#826142}
.tower-result.lost{background:linear-gradient(#e0d9ef,#b3a3cb);border-color:#c1afd7}
.tower-kit{text-align:center}.tower-kit>p{font-size:12px}
.tower-kit .tower-loadout{grid-template-columns:1fr 1fr;gap:6px;margin:8px 0;max-height:none;overflow:visible}
.kit-skill{min-height:64px;padding:6px;display:flex;align-items:center;gap:6px;border:2px solid #988274;border-radius:10px;background:#eee0be;color:#343245;text-align:left}
.kit-skill b{font:16px/1.1 Lucky}.kit-skill img{width:35px;height:35px;flex:none;object-fit:contain}
.kit-skill[aria-pressed=true]{background:#e4f0b4;border-color:#57996d;box-shadow:inset 0 0 0 2px #b6d483}
.tower-kit .primary{font-size:24px!important;min-height:48px!important;margin:8px 0 0!important;padding:6px!important;width:100%}

#online.miner-view{background:#30282d}
.miner-view #content{background:linear-gradient(#211e2944,#201a2533),url('/art/buried-treasures-v1.png') center/cover;gap:6px;padding:10px 12px}
.miner-view .mining-title{flex:none;margin:0 47px;padding:6px 16px;min-height:46px;border:2px solid #bf905e;border-radius:8px 8px 18px 18px;background:linear-gradient(#755039,#403038);box-shadow:0 3px #211c2a;color:#ffe39e}
.miner-view .mining-title h1{font:27px/1.05 Lucky!important;color:#ffe39e;filter:drop-shadow(0 2px var(--ink-plum))}
.miner-view .mining-title .eyebrow{font-size:8px;white-space:nowrap;letter-spacing:1px;color:#e9d5b1}
/* Gems are their own bordered capsule and Exchange stands beside it, outside any
   box, so the 44px utility face never touches a frame (8px box-padding rule). */
.miner-view .mining-wallet{flex:none;padding:0;background:none;border:0;color:#ffe3a9;min-height:44px}
.miner-view .mining-wallet>span{min-height:36px;padding:4px 12px 4px 8px;border:1px solid #917256;border-radius:var(--vs-radius);background:#24212edb}
.miner-view .mining-wallet>.secondary{background:linear-gradient(#847b95,#625a72);font-size:14px;padding:2px 8px;border:1px solid #ab99b2;box-shadow:none}
.miner-view .mining{flex:1;min-height:0;justify-content:center;gap:7px;padding:8px 10px;margin:0;border:3px solid #b48b5e;outline:2px solid #2a2028;outline-offset:1px;border-radius:14px;background:linear-gradient(#443443ee,#292430ef);box-shadow:inset 0 0 0 2px #594237,0 5px #1b1925}
.miner-view .mining-hint{display:flex;align-items:center;justify-content:center;gap:8px;min-height:28px;font-size:12px;font-weight:750;color:#ffe6ac}
.mining-hint img{width:29px;height:29px;object-fit:contain}
.miner-view .dig-grid{width:min(100%,292px);max-width:292px;gap:4px;margin:0 auto}
.miner-view .tile{border:2px solid var(--ink-plum);background:linear-gradient(145deg,#a99caa,#756c83 70%);box-shadow:inset 2px 2px #d4c5ce88,inset -2px -2px #51475e,0 2px #1b1724;border-radius:10px;min-width:44px;min-height:44px;overflow:hidden}
.stone-face{position:absolute;inset:5px;border-radius:5px 13px 5px 12px;background:linear-gradient(135deg,#c1b3ba33,transparent 45%);border-top:1px solid #d4c5ca55}
.stone-face:after{content:'';position:absolute;right:4px;bottom:5px;width:8px;height:5px;border-radius:50%;background:#4d435344;box-shadow:-4px -7px 0 -1px #50445644}
.miner-view .tile:nth-child(3n) .stone-face{transform:rotate(90deg)}
.miner-view .tile.opened{background:#201c2a;border-color:#4d3c4b;box-shadow:inset 0 2px var(--panel-night)}
.miner-view .tile.scan{outline:2px solid #b7e886;outline-offset:-4px;background:linear-gradient(135deg,#a6ac79,#65744e)}
/* P04 (build 27): the scanned band. ::after is its gentle static glow (fixed
   opacity); on the scan receipt the grid gets .is-scan-sweeping for one pass: a
   light bar (::before, transform) crosses each tile in band order (--scan-i) and
   the glow flashes up and settles (opacity). Both clipped by the tile. */
.miner-view .tile.scan:after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 9px 1px #dcff9e;opacity:.45;pointer-events:none}
.miner-view .dig-grid.is-scan-sweeping .tile.scan:before{content:'';position:absolute;top:-2px;bottom:-2px;left:0;width:65%;background:linear-gradient(100deg,#0000,#f6ffd6d9 50%,#0000);transform:translateX(-110%);pointer-events:none;animation:miner-scan-sweep .5s ease-in-out calc(var(--scan-i,0)*110ms + var(--scan-elapsed,0ms)) both}
.miner-view .dig-grid.is-scan-sweeping .tile.scan-column:before{top:0;left:-2px;right:-2px;bottom:auto;width:auto;height:65%;background:linear-gradient(190deg,#0000,#f6ffd6d9 50%,#0000);transform:translateY(-110%);animation-name:miner-scan-sweep-down}
.miner-view .dig-grid.is-scan-sweeping .tile.scan:after{animation:miner-scan-glow .75s ease-out calc(var(--scan-i,0)*110ms + var(--scan-elapsed,0ms)) both}
@keyframes miner-scan-sweep{from{transform:translateX(-110%)}to{transform:translateX(165%)}}
@keyframes miner-scan-sweep-down{from{transform:translateY(-110%)}to{transform:translateY(165%)}}
@keyframes miner-scan-glow{0%{opacity:0}45%{opacity:1}100%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.miner-view .dig-grid.is-scan-sweeping .tile.scan:before{content:none}.miner-view .dig-grid.is-scan-sweeping .tile.scan:after{animation:none}}
/* Disabled tiles are solid state, not greyed controls (N2): dug tiles and treasure
   slices keep their art, and at 0 digs the stones only dim so the Scout band stays green. */
.miner-view .tile:disabled{opacity:1;filter:none}
.miner-view .tile:not(.opened):disabled{filter:brightness(.86)}
.dug-stone{font-size:25px;color:#5e5163}
.mining-milestone{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;font-size:10px;color:#ecd6b1;flex:none}
.mining-progress{width:100%;height:8px;border:1px solid #a58756;border-radius:6px;background:#211a29;overflow:hidden}.mining-progress i{height:100%;display:block;background:linear-gradient(#e6d786,#baa455);border-radius:5px}
.miner-view .mining-actions{flex:none;min-height:44px;gap:4px}.miner-view .mining-actions .secondary{font-size:18px;min-height:44px;margin:0;padding:4px}
.mining-charge-well{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:5px 11px;background:#24212eef;border:1px solid #aa8b65;border-radius:14px;color:var(--cream-350)}
.mining-charge-well b{font:18px/1 Lucky;white-space:nowrap}.mining-charge-well small{font-size:9px;text-align:right;max-width:160px;color:#d2c2b3}
/* One block per breakpoint. The two-line charge well keeps 8px of padding at every
   height; the board gives up the room instead, never tiles below 44px. */
.miner-view .mining-charge-well{padding-top:8px;padding-bottom:8px}
@media(min-height:801px) and (max-height:850px){.miner-view .dig-grid{max-width:256px}}
@media(min-height:851px) and (max-height:900px){.miner-view .dig-grid{max-width:280px}}
/* 731-800px (Pro with browser chrome): 44px tiles at a 3px gap and a one-row
   milestone keep the 56px mine action 8px inside the board frame. */
@media(max-height:800px){.miner-view .dig-grid{max-width:232px;gap:3px}.miner-view .mining{gap:5px;padding:6px 8px}.miner-view #content{padding:7px 10px;gap:5px}.miner-view .mining-hint{min-height:24px}.miner-view .mining-hint img{width:24px;height:24px}.mining-milestone{display:grid;grid-template-columns:auto minmax(40px,1fr) auto;align-items:center;column-gap:8px}.mining-milestone>span:last-of-type{grid-column:3;grid-row:1}.mining-progress{grid-column:2;grid-row:1;height:6px}.miner-view .mining-charge-well b{line-height:1.05}.tower-panel{gap:3px}.tower-view #content{padding:6px 10px 4px}}
/* F05 guard: with the 2px row gap a 1px tile lip keeps each row off the next. */
@media(max-height:730px){.miner-view .tile{box-shadow:inset 2px 2px #d4c5ce88,inset -2px -2px #51475e,0 1px #1b1724}}
@media(max-height:730px){.miner-view #content{padding-top:5px;gap:4px}.miner-view .dig-grid{max-width:228px;gap:2px}.miner-view .mining{padding:8px;gap:2px}.miner-view .mining-title{min-height:0;padding-top:2px;padding-bottom:5px}.miner-view .mining-title h1{font-size:25px!important}.miner-view .mining-hint{min-height:20px}.miner-view .mining-hint img{width:20px;height:20px}.miner-view .mining-charge-well{min-height:34px}.miner-view .mining-charge-well b{font-size:16px}.tower-view #stage{min-height:180px}.tower-kit .kit-skill{min-height:57px}}
/* Compact illustrated navigation. The existing large primary face is unchanged. */
#online .secondary,#modal .secondary,#tabs .bottom-tab,.collection-tabs button{
 border:2px solid #312c3f;border-radius:14px;background:linear-gradient(155deg,#c8bddb 0%,#a397bd 45%,#8b7ba6 100%);
 color:#292235;box-shadow:inset 0 2px #f3eaff,inset 0 -3px #75668e,0 3px #231d31;font:16px/1.1 Lucky,sans-serif;
}
#tabs .bottom-tab{position:relative;flex-direction:row;gap:6px;min-height:56px;padding:4px 6px;font-size:13px}
#tabs .bottom-tab img{width:38px;height:40px;object-fit:contain;filter:drop-shadow(0 1px 1px #1c152544)}
#online .eq-shortcuts .secondary,#online .eq-training .secondary{border-radius:14px;font-size:15px;padding:6px 11px}
#online #profile .profile-card{flex:0 0 128px;width:128px;gap:8px}
#online #profile .energy-pill{grid-template-columns:15px minmax(0,1fr) 14px;column-gap:3px;flex:0 0 59px;width:59px;padding:0 3px}
#online #profile .energy-pill .energy-value{font-size:11px;min-width:0}
#online #profile .energy-pill .energy-plus{width:14px;height:14px;min-width:14px;font-size:13px;border-radius:4px}
#online #profile .energy-pill img{width:15px;height:21px}
#online #profile .gem-pill{flex:0 0 53px;width:53px;height:24px;margin-top:10px;display:flex;align-items:center;gap:1px;background:#15151c;border:1px solid #53515e;border-radius:13px;padding:0 3px;color:#f3dfef;overflow:hidden}
#online #profile .gem-pill img{width:15px;height:22px;object-fit:contain;flex:none}
#online #profile .gem-pill b{font:800 10px/1 system-ui;white-space:nowrap;min-width:0}
#online #profile .server-test span{font:600 6px/8px system-ui;letter-spacing:.1px;padding:0 3px;border-radius:2px}
.training-board{justify-content:flex-start;gap:6px;overflow:hidden}
.training-board-head{display:flex;align-items:center;justify-content:space-between;flex:none;gap:6px;font-size:11px}
/* F09 (owner, 2026-09-25): Your progress is a compact 44px utility, not a dense
   52px/21px selector; it recenters the list and must not outweigh the Train action. */
#online .training-board-head .secondary{min-height:var(--tier-compact);margin:0;padding:4px 12px;font-size:17px}
.training-board-head>span{font-size:13px}
.training-scroll{flex:1;min-height:0;position:relative;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#95785b #dfcbae;border-radius:8px}
.training-scroll:focus-visible{outline:2px solid #805e37;outline-offset:-2px}
.training-steps{display:flex;flex-direction:column;gap:5px;min-height:min-content;padding:8px 4px}
.training-step{flex:none;min-height:58px;position:relative;grid-template-columns:30px 28px minmax(0,1fr) auto}
.training-step.current{border:2px solid #af7d34;background:linear-gradient(110deg,#ffe2a0,var(--gold-50))}
/* Done rows are solid: the green "✓ Trained" line and tint mark them, never transparency. */
.training-step.done{background:#f1ecd4}.training-step.done span small{color:#4c7a3a;font-weight:750}.training-step.done>strong{color:#8f8066}
.training-step>strong{font-variant-numeric:tabular-nums}
.training-board-head{margin-bottom:4px}
.tower-stats-only{font-size:11px;color:#d1c4d9}
.tower-auto{position:relative;align-self:center;gap:9px;padding:3px 11px;color:#f6e5c5;border:1px solid #7d708c;border-radius:var(--vs-radius);background:linear-gradient(#51465f,#342d42);box-shadow:inset 0 1px #fff2;cursor:pointer;transition:scale .12s}
.tower-auto:active{scale:.93}.tower-auto input{position:absolute;opacity:0;width:1px;height:1px}
.tower-auto>span:last-child{text-align:left}.tower-auto b{display:block;font:15px Lucky}.tower-auto small{display:block;line-height:1.15;font-size:9px}
.auto-switch{width:34px;height:20px;border-radius:var(--vs-radius);background:var(--ink-plum);border:1px solid #95859f;box-shadow:inset 0 2px #0005;position:relative}
.auto-switch:after{content:'';position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:linear-gradient(#ece6f1,#a89ab7);box-shadow:0 1px 2px #0008;transition:transform .15s}
.tower-auto input:checked+.auto-switch{background:#668741;border-color:#b4d68c}
.tower-auto input:checked+.auto-switch:after{transform:translateX(14px);background:#e8f5c7}
.tower-auto:has(input:focus-visible){outline:2px solid #ffe599;outline-offset:2px}
#online.tower-preparing #tabs{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:center}
#online.tower-preparing #tabs .secondary{width:100%;min-width:0;min-height:48px;margin:0;padding:6px 3px;font-size:18px;white-space:nowrap}
/* K12 limited Tower entries: header count, rules lines, button chip, milestone receipt. */
.tower-entries-chip{display:flex;width:max-content;align-items:center;gap:4px;margin:4px auto 0;padding:2px 9px 2px 4px;border:1px solid #c7a16b;border-radius:999px;background:#211c2dd9;font:700 12px/1.2 system-ui;font-style:normal;color:var(--gold-100);font-variant-numeric:tabular-nums}
.tower-entries-chip img{width:18px;height:18px;object-fit:contain}.tower-entries-chip.is-empty{color:#ffb4a6;border-color:#a8665b}
.tower-entries{display:grid;justify-items:center;gap:1px;text-align:center;line-height:1.25}
.tower-entries b{font:700 12px/1.3 system-ui;color:var(--gold-100);font-variant-numeric:tabular-nums}.tower-entries small{font-size:10px;color:#cec0a5}.tower-entries .tower-milestone{color:#f3d58f}
/* S04: one entries + refill line (bonus below when present); rules in the (?) sheet. */
.tower-entries-hourly{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px}
.tower-entries-hourly>div{display:grid;justify-items:center;gap:1px;min-width:0}
.tower-entries-hourly .tower-refill-line{font-size:13px}.tower-entries-hourly .tower-bonus-line{color:#f3d58f;font-weight:700}
#online.tower-preparing #tabs .tower-challenge{display:flex;align-items:center;justify-content:center;gap:8px}
.tower-entry-cost{display:inline-flex;flex:none;align-items:center;gap:2px;padding:1px 8px 1px 3px;border:2px solid #20452c;border-radius:999px;background:var(--cream-250);color:#2c4a2c;font:18px/1 Lucky;-webkit-text-stroke:0;text-shadow:none;box-shadow:inset 0 -2px #e2cf9a;font-variant-numeric:tabular-nums}
.tower-entry-cost img{width:20px;height:20px;object-fit:contain}
#online.tower-preparing #tabs .tower-entry-reset{font-size:16px;font-variant-numeric:tabular-nums}
/* Preparation footer is Back + Challenge only; Auto-next lives on the playback panel (G10). */
#online.miner-view .mining-wallet>.secondary{font-size:12px;min-height:44px;margin:0;padding:3px 7px;flex:none}
.mining-wallet>.secondary img{width:21px;height:25px}
@media(max-width:380px){#tabs .bottom-tab{gap:3px;font-size:12px;padding:4px}#tabs .bottom-tab img{width:34px;height:38px}}
#online #profile .profile-identity>b{font-size:10px}
/* Playback keeps a small visible face inside its 44px overlay hit target. */
#online #playback button:before{display:block;background:linear-gradient(155deg,#c8bddb,#8b7ba6);border-color:#312c3f;box-shadow:inset 0 1px #f3eaff,inset 0 -2px #75668e,0 2px #231d31}
#online #playback button{color:#292235;text-shadow:none}
/* Equipment slots expose selection, and open only their own item family. */
/* X04/X05: bounded free gifts; settlement and daily availability are server-owned. */
#online:has(.store-panel){height:100dvh;max-height:100dvh;min-height:0;display:flex;flex-direction:column;padding-top:var(--safe-top,env(safe-area-inset-top,0px))}
.store-panel{padding:16px;align-self:start;width:100%;box-sizing:border-box}
.store-panel>h1,.store-panel>h2{text-align:center}
.daily-gift{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:10px;padding:12px;border:2px solid #c8a572;border-radius:20px;background:var(--cream-300)}
.daily-gift>div{min-width:0}.daily-gift h2{font-size:22px;line-height:1.1;margin:0 0 7px}.daily-gift small{display:block;font:600 12px/1.25 system-ui;margin-top:6px}
.daily-gift>.daily-gift-art{padding:0;min-height:86px;width:100px;border:0;background:none;box-shadow:none;filter:none}
.daily-gift-art>img{width:100%;height:86px;object-fit:contain}
.daily-gift>button:last-child{grid-column:1/-1}
.daily-receipt>img{width:120px;height:120px;object-fit:contain}
.daily-gift.is-calendar{grid-template-columns:64px minmax(0,1fr);gap:6px;padding:8px;margin:8px 0}
.daily-gift.is-calendar>.daily-gift-art{width:64px;min-height:64px}.daily-gift.is-calendar .daily-gift-art>img{height:64px}
.daily-gift.is-calendar>button:last-child{display:none}.daily-gift.is-calendar h2{font-size:20px}.daily-gift.is-calendar small{font-size:11px}
/* Y02: one corner gift, not a second calendar card. Claim state is server-owned. */
.moonleaf-calendar{position:relative}
#modal .moonleaf-calendar>header{position:relative;padding-right:84px;min-height:58px;gap:0}
#modal .moonleaf-calendar:has(.calendar-gift)>header>img{display:none}
#modal .moonleaf-calendar>header h1{min-width:0;max-width:100%;overflow-wrap:normal}
/* AB10 (build 39): the header chest sits on its own cream tile, inset inside the
   75px green header (7px top/right padding), with the Gem chip on the tile's lip.
   The chip straddles the inner border (bottom:-1px) and the chest sits above it,
   so nothing overflows the button box (layout gate: no overflowing modal BUTTON). */
#modal .calendar-gift{position:absolute;top:7px;right:9px;display:grid;place-items:center;width:62px;height:58px;min-height:58px;margin:0;padding:3px 4px 16px;border:2px solid #c99a55;border-radius:14px;background:radial-gradient(circle at 50% 38%,var(--cream-50),#f7e2b2 70%,#ecca86);box-shadow:inset 0 2px var(--cream-50),inset 0 -3px #d9ae6a,0 3px #13403c;box-sizing:border-box}
.calendar-gift>img{width:44px;height:34px;align-self:start;object-fit:contain;filter:drop-shadow(0 2px 1px #5a3d2140)}
.calendar-gift>span:not(.attention-badge){position:absolute;bottom:2px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:1px 6px;border:1px solid #976d47;border-radius:9px;background:var(--cream-350);color:#39294b;font:800 12px/1.2 system-ui;white-space:nowrap}
.calendar-gift>span img{width:15px;height:15px;object-fit:contain}
#modal .calendar-gift.is-claimed{filter:grayscale(.65)}
/* Visual polish r2 (finding 13): the gift's "!" sits inside its own tile, never over the header edge. */
#modal .calendar-gift>.attention-badge{top:3px;right:3px}
/* Compact phones: the header is 62px (moonleaf.css), so the tile shrinks with it. */
@media(max-height:730px){#modal .calendar-gift{width:56px;height:46px;min-height:46px;padding:2px 3px 12px}.calendar-gift>img{width:38px;height:28px}#modal .moonleaf-calendar>header{padding-right:76px}}
/* Y16: the inspected player's public loadout, never the viewer's inventory. */
.rank-loadout{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:8px auto;max-width:286px}
.rank-loadout-slot{display:grid;justify-items:center;gap:3px;min-width:0}
.rank-loadout-slot .eq-slot-icon{position:relative;width:48px;height:48px}
.rank-loadout-slot .eq-slot-icon>img{width:100%;height:100%;object-fit:contain}
.rank-loadout-slot .eq-slot-icon>b{position:absolute;left:1px;bottom:0;padding:0 3px;border-radius:5px;background:#302530;color:var(--shine-100);font:12px/1.2 Lucky}
.rank-loadout-slot small{font:600 10px/1.1 system-ui}
.rank-loadout-slot.is-empty .eq-slot-icon{filter:grayscale(1)}
.rank-detail:has(.rank-loadout) .rank-character{height:136px}
.rank-detail:has(.rank-loadout) p{margin:5px 0}
/* Y20: entries live beside the floor information, not in a second bottom band. */
.tower-scene-title .tower-entries-hourly{margin:2px -7px -3px;gap:3px;pointer-events:auto}
.tower-scene-title .tower-entries-hourly .tower-refill-line{font-size:11px}
.tower-scene-title .tower-entries-hourly .tower-bonus-line{font-size:10px}
.tower-heading:has(.tower-entries-hourly){gap:7px}

/* AC285: one compact preparation plaque contains floor, entries and rewards. */
#online.tower-preparing .tower-heading{width:min(264px,calc(100% - 112px));box-sizing:border-box;gap:0;padding:10px 12px;border:3px solid #c7a16b;border-radius:22px;background:linear-gradient(#70513feb,#403448f0);box-shadow:inset 0 2px #ffe4b64a,0 4px #1c1828a0;color:var(--cream-350)}
#online.tower-preparing .tower-scene-title{box-sizing:border-box;width:100%;min-width:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.tower-preparing .tower-scene-title>span{font-size:17px;line-height:1.2;letter-spacing:.5px}
#online.tower-preparing .tower-scene-title #round-label{width:max-content;max-width:100%;min-width:144px;margin:6px auto;padding:3px 12px 5px;border:2px solid #966b47;border-radius:14px;background:linear-gradient(var(--cream-350),#f3d38f);box-shadow:inset 0 2px var(--card-face),0 2px #211a29a0;color:#62462f;font-size:24px;line-height:1.15;text-shadow:none;filter:none}
.tower-preparing .tower-scene-title>small{display:block;font-size:11px;line-height:1.3;color:#f1dfc3}
.tower-preparing .tower-scene-title .tower-entries-hourly{min-height:0;margin:7px 0 0;padding:6px 0 0;gap:5px;border:0;border-top:1px solid #c7a16b80;border-radius:0;background:none}
.tower-preparing .tower-entries-hourly>img{flex:none;width:20px;height:20px;object-fit:contain}
.tower-preparing .tower-entries-hourly>div{min-width:0}
.tower-preparing .tower-scene-title .tower-refill-line{font-size:11px;line-height:1.35}
/* Centre the label and every wrapped tile row within the AC513 card. */
.tower-preparing .tower-heading .tower-preview-loot{display:grid;grid-template-columns:minmax(0,1fr);justify-content:center;justify-items:center;gap:4px;min-height:0;margin-top:7px;padding:6px 0 0;border:0;border-top:1px solid #c7a16b80;border-radius:0;background:none;box-shadow:none}
.tower-preparing .tower-preview-loot>small{text-align:center;font-size:11px;line-height:1.3}
.tower-preparing .tower-preview-loot>.tower-preview-items{flex:none;width:100%;min-width:0;flex-wrap:wrap;justify-content:center;gap:10px;margin:0;padding-bottom:4px}
.tower-preview-items .tower-preview-reward{position:relative;width:48px;height:48px;padding:5px}
.tower-preview-items .tower-preview-reward img{width:100%;height:100%;object-fit:contain}
.eq-scene-slots button{position:relative}
.eq-scene-slots button.equipped{background:linear-gradient(var(--cream-350),#dec18b);border-color:#dfb953}
/* Empty/locked slots: a dashed muted face and a solid grey silhouette, never a
   faded icon (EQG-11). */
.eq-scene-slots button:is(.empty,.owned-unworn){background:#ebe1ca;border-style:dashed;border-color:#a8977a}
.eq-scene-slots button:is(.empty,.owned-unworn)>img{filter:grayscale(1) contrast(.85)}
.eq-slot-wear-cue{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:16px;height:16px;box-sizing:border-box;border:1px solid var(--vs-ink);border-radius:50%;background:var(--vs-good);color:var(--cream-50);font-size:0;pointer-events:none}
/* Owner 2026-11-21: the plus is two centred bars; the font glyph sat off-centre in the disc. */
.eq-slot-wear-cue::before,.eq-slot-wear-cue::after{content:'';position:absolute;left:50%;top:50%;width:8px;height:2px;border-radius:1px;background:currentColor;translate:-50% -50%}
.eq-slot-wear-cue::after{width:2px;height:8px}
.eq-scene-slots .slot-status{font:600 7.5px/1.1 system-ui,sans-serif;color:#534b40;white-space:nowrap}
.eq-scene-slots .equipped .slot-status{color:#37653b}
.eq-scene-slots button img{object-fit:contain}
.owned-skins{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.owned-skins button{display:flex;flex-direction:column;align-items:center;min-width:0;min-height:100px;padding:6px;background:#f7efd9;border:2px solid #b6a382;border-radius:var(--vs-radius);color:#283543}
.owned-skins button[aria-pressed="true"]{background:#e4edcb;border-color:#748b45;opacity:1}
.owned-skins img{width:100%;height:64px;object-fit:contain}
.owned-skins b{font:600 11px/1.2 system-ui,sans-serif}
.owned-skins small{font:600 9px/1.2 system-ui,sans-serif;margin-top:3px}
.weapon-picker{display:grid;gap:8px}
.weapon-picker h1,.weapon-picker p{margin:0}
.glove-picker{text-align:center}.glove-picker>img{height:94px;object-fit:contain}
.mining-wallet>.secondary{font-size:11px;padding:3px 7px;min-height:44px;background:linear-gradient(#eee7d5,#c6bda9) center/100% 30px no-repeat;border:0;box-shadow:none;border-radius:10px;color:#303645;-webkit-text-stroke:0;text-shadow:none}
/* Treasure rolls are contained, server-settled interactions. */
.treasure-panel{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;min-height:0}
.treasure-panel h1,.treasure-panel p{margin:0}
.treasure-panel>small{font-size:11px;line-height:1.4}
.treasure-tap{display:block;padding:0;border:0;background:none;width:min(190px,40dvh);height:min(190px,27dvh);flex:none}
.treasure-tap img{display:block;width:100%;height:100%;object-fit:contain}
.treasure-tap:disabled{opacity:1}
.treasure-tap.shaking img{animation:treasure-shake .4s ease-out}
.treasure-attempts{display:flex;gap:10px}
.treasure-attempts span{display:grid;place-items:center;width:38px;height:38px;border:2px solid #b09a70;border-radius:var(--vs-radius);background:#e6d8b8;color:#716749;font:bold 24px system-ui}
.treasure-attempts .success{background:#d6e6b4;border-color:#789d53;color:#3d622c}
.treasure-attempts .miss{background:#edcabb;border-color:#ae7c68;color:#834633}
.treasure-bonus{display:grid;gap:5px}
.treasure-loot{display:flex;justify-content:center;gap:10px}
.treasure-item{width:70px;height:80px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:3px solid #454039;border-radius:var(--vs-radius);background:linear-gradient(#e7efc3,#a8c376);box-shadow:inset 0 2px var(--cream-250),0 3px #aca078}
.treasure-item.gem{background:linear-gradient(#e1cff5,#aa83cc)}
.treasure-item img{width:40px;height:40px;object-fit:contain}
.treasure-item strong{font:800 15px/1 system-ui;color:var(--cream-50);filter:drop-shadow(0 1px 2px var(--ink-plum-2));-webkit-text-stroke:1px #3a303c;paint-order:stroke fill}
.dig-grid .treasure-door{width:90%;height:90%;display:block;margin:auto}
@keyframes treasure-shake{0%,100%{transform:rotate(0)}20%{transform:rotate(-5deg)}40%{transform:rotate(5deg)}60%{transform:rotate(-3deg)}80%{transform:rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.treasure-tap.shaking img{animation:none}}
/* S07 (build 28): the chamber's free tries in a cozy cave nook. Transform and
   opacity only; each try's effect classes exist for one render (keyed in
   showTreasure), so re-renders never replay it. */
#modal.hub-reward-modal:has(.treasure-panel){border-color:#b27a3f;background:linear-gradient(var(--cream-250),#f3d39c 70%,#e9bd7c);box-shadow:inset 0 3px var(--card-face),0 14px 36px #1a101c99}
.treasure-panel{--nook-h:clamp(168px,30dvh,238px);--chest:calc(var(--nook-h)*.68);gap:7px}
.treasure-panel>.eyebrow{color:#9a6a2e}
.treasure-panel>h1{color:#4a2c1c}
.treasure-nook{position:relative;isolation:isolate;overflow:hidden;width:100%;height:var(--nook-h);flex:none;border:3px solid #6b4526;border-radius:18px;background:#2d2234;box-shadow:inset 0 0 0 2px #e8b56a55,0 3px #a4733f}
.treasure-nook-art{position:absolute;inset:0;width:100%;height:100%;display:block}
.treasure-nook .treasure-blip{position:absolute;z-index:2;right:8px;top:17%;width:clamp(52px,15%,64px);height:auto;transform:rotate(-12deg);filter:drop-shadow(0 2px 2px #1a1020aa);pointer-events:none}
.treasure-nook .treasure-tap{position:absolute;z-index:3;left:50%;bottom:4px;width:var(--chest);height:var(--chest);margin-left:calc(var(--chest)/-2);min-height:0}
.treasure-nook .treasure-tap:active{transform:scale(.95)}
.treasure-chest{position:absolute;inset:0;display:block;transform-origin:50% 92%}
.treasure-nook .treasure-tap img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 3px #2a1a1488)}
.treasure-nook .treasure-tap img.treasure-old{opacity:0}
.treasure-spark{position:absolute;z-index:1;width:16px;height:16px;color:var(--shine-100);font:16px/1 Lucky;filter:drop-shadow(0 0 8px #ffe98a) drop-shadow(0 0 3px #fff);opacity:0;pointer-events:none}
.treasure-spark:before{content:"✦"}
.treasure-spark.s1{left:6%;top:20%}.treasure-spark.s2{right:4%;top:12%;font-size:12px}.treasure-spark.s3{right:0;top:58%;font-size:14px}.treasure-spark.s4{left:0;top:62%;font-size:11px}
/* The tap target carries an 8px motion margin around the chest: the idle wobble
   (tn-idle) and the twinkling sparks rotate inside the button instead of pushing
   past its box (four-screen gate: no overflowing modal control). The chest keeps
   its size and resting position. */
.treasure-nook .treasure-tap{--tap-pad:8px;width:calc(var(--chest) + 2*var(--tap-pad));height:calc(var(--chest) + 2*var(--tap-pad));margin-left:calc(var(--chest)/-2 - var(--tap-pad));bottom:calc(4px - var(--tap-pad))}
.treasure-nook .treasure-chest{inset:var(--tap-pad)}
.treasure-nook .treasure-spark.s1{left:calc(var(--tap-pad) + 6%);top:calc(var(--tap-pad) + 20%)}.treasure-nook .treasure-spark.s2{right:calc(var(--tap-pad) + 4%);top:calc(var(--tap-pad) + 12%)}.treasure-nook .treasure-spark.s3{right:var(--tap-pad);top:58%}.treasure-nook .treasure-spark.s4{left:var(--tap-pad);top:62%}
.treasure-burst{position:absolute;z-index:1;left:50%;width:250px;height:250px;margin-left:-125px;bottom:calc(4px + var(--chest)*.56 - 125px);border-radius:50%;background:radial-gradient(circle,#fffbe0 0 10%,#ffe48acc 24%,#ffc85a55 42%,transparent 64%);opacity:0;pointer-events:none}
.treasure-burst:before{content:"";position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(#fff2b3b0 0 7deg,transparent 7deg 22deg);-webkit-mask-image:radial-gradient(circle,#000 18%,transparent 66%);mask-image:radial-gradient(circle,#000 18%,transparent 66%)}
.treasure-pop{position:absolute;z-index:4;left:50%;bottom:calc(var(--chest)*.94);transform:translateX(-50%);white-space:nowrap;padding:3px 13px 4px;border-radius:999px;pointer-events:none}
.treasure-pop.lucky{border:3px solid #6b3a12;background:linear-gradient(#ffe98a,#ffb53f);box-shadow:inset 0 2px #fff7cf,0 3px #7a4516;color:var(--cream-50);font:22px/1.05 Lucky;-webkit-text-stroke:var(--label-stroke) #6b3a12;paint-order:stroke fill;text-shadow:none}
.treasure-pop.miss{border:2px solid #7d6b57;background:#f3e8d4;box-shadow:0 2px #7d6b57;color:#5b4a3c;font:800 15px/1.2 system-ui}
.treasure-puff{position:absolute;z-index:4;left:50%;bottom:6px;width:var(--chest);margin-left:calc(var(--chest)/-2);height:30px;pointer-events:none}
.treasure-puff i{position:absolute;bottom:0;width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 40% 40%,#f5eadb,#c8b9a4 70%);opacity:0}
.treasure-puff.poof{bottom:calc(4px + var(--chest)*.28)}.treasure-puff.poof i{background:radial-gradient(circle at 40% 40%,var(--card-face),#ffd98a 70%)}
.treasure-puff i:nth-child(1){left:4%}.treasure-puff i:nth-child(2){left:calc(50% - 15px);bottom:-6px}.treasure-puff i:nth-child(3){right:4%}
.treasure-attempts{gap:9px}
.treasure-attempts span{position:relative;width:42px;height:42px;border:2.5px solid #a47d45;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--cream-200),#ecd3a0 58%,#c9a466);box-shadow:inset 0 -3px #b99459,0 2px #7f5f33;color:#7a5a2e}
.treasure-attempts span svg{width:25px;height:25px;fill:#b3935c;opacity:.45}
.treasure-attempts span b{position:absolute;inset:0;display:grid;place-items:center;font:21px/1 Lucky;color:#7a5a2e;-webkit-text-stroke:0}
.treasure-attempts .success{border-color:#9a6512;background:radial-gradient(circle at 35% 30%,#fff8c4,#ffd44e 55%,#e09c22);box-shadow:inset 0 -3px #c98419,0 2px #7a4c10}
.treasure-attempts .success svg{fill:#8a4d12;opacity:.9}
.treasure-attempts .miss{border-color:#7d6e60;background:radial-gradient(circle at 35% 30%,#f5efe6,#d2c7b8 60%,#a99a88);box-shadow:inset 0 -3px #9b8c7b,0 2px #685a4e}
.treasure-attempts .miss svg{fill:#8c7d6f;opacity:.85}
.treasure-attempts :is(.success,.miss) b{inset:auto -5px -4px auto;width:19px;height:19px;border:2px solid #2f6a24;border-radius:50%;background:#6fbf4a;color:#fff;font:900 11px/1 system-ui}
.treasure-attempts .miss b{border-color:#8a3a26;background:#e0785c}
/* U09 (build 31): an unplayed try is a solid bronze coin with a bold "?" (no ghost
   paw at partial opacity), in the same coin family as the gold hit / grey miss. */
.treasure-attempts .pending{border-color:#7a5424;background:radial-gradient(circle at 35% 30%,#f7e2ae,#dcae63 56%,#b27f3b);box-shadow:inset 0 2px var(--cream-300),inset 0 -3px #946630,0 2px #5c3f1c}
.treasure-attempts .pending>svg{display:none}
.treasure-attempts .pending b{font:25px/1 Lucky;color:var(--cream-50);-webkit-text-stroke:3px #6a4418;paint-order:stroke fill;filter:drop-shadow(0 2px #6a4418)}
.treasure-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(prefers-reduced-motion:no-preference){
 .treasure-nook .tn-lantern{animation:tn-sway 3.4s ease-in-out infinite alternate}
 .treasure-nook .tn-lantern.l2{animation-duration:4.1s;animation-delay:-1.3s}
 .treasure-nook .tn-lantern.l3{animation-duration:3.8s;animation-delay:-2.2s}
 .treasure-nook .tn-halo{animation:tn-flicker 2.3s ease-in-out infinite alternate}
 .treasure-nook :is(.tn-pool,.tn-beam){animation:tn-breathe 4.2s ease-in-out infinite alternate}
 .treasure-nook .tn-glow{animation:tn-flicker 2.9s ease-in-out infinite alternate}.treasure-nook .tn-glow.g2{animation-delay:-1.4s}
 .treasure-nook .treasure-blip{animation:tn-blip 2.4s ease-in-out infinite alternate}
 .treasure-panel.is-trying .treasure-chest{animation:tn-idle 2.8s ease-in-out infinite}
 .treasure-panel.is-trying .treasure-spark{animation:tn-twinkle 1.9s ease-in-out infinite}
 .treasure-spark.s2{animation-delay:.5s!important}.treasure-spark.s3{animation-delay:1s!important}.treasure-spark.s4{animation-delay:1.4s!important}
 /* T18 (build 31): shake builds 0-350ms, swap + flash/poof at 350ms, settle 350-670ms. */
 .treasure-panel.try-success .treasure-chest{animation:tn-charge .35s cubic-bezier(.45,0,.9,.6),tn-settle .32s .35s cubic-bezier(.2,.7,.3,1),tn-idle 2.8s .67s ease-in-out infinite}
 .treasure-panel.try-success .treasure-chest>img:first-child{animation:tn-swap-in .35s step-end both}
 .treasure-panel.try-success .treasure-old{animation:tn-swap-out .35s step-end both}
 .treasure-panel.try-success .treasure-burst{animation:tn-flash .6s .35s ease-out both}
 .treasure-panel.try-success .treasure-burst:before{animation:tn-rays .6s .68s linear both}
 .treasure-panel.try-success .treasure-puff i{animation:tn-poof .45s .32s ease-out both}
 .treasure-panel.try-success .treasure-puff i:nth-child(2){animation-delay:.34s}.treasure-panel.try-success .treasure-puff i:nth-child(3){animation-delay:.36s}
 .treasure-panel.try-success .treasure-blip{animation:tn-cheer .8s .35s ease-out both,tn-blip 2.4s 1.15s ease-in-out infinite alternate}
 .treasure-panel.try-success .treasure-pop{animation-delay:.42s}
 .treasure-panel.try-miss .treasure-chest{animation:tn-sulk .48s ease-out,tn-idle 2.8s .48s ease-in-out infinite}
 .treasure-panel.try-miss .treasure-puff i{animation:tn-puff .65s ease-out both}
 .treasure-panel.try-miss .treasure-puff i:nth-child(2){animation-delay:.06s}.treasure-panel.try-miss .treasure-puff i:nth-child(3){animation-delay:.1s}
 .treasure-panel.try-miss .treasure-blip{animation:tn-droop .7s ease-out both,tn-blip 2.4s .7s ease-in-out infinite alternate}
 .treasure-pop{animation:tn-pop .5s .34s cubic-bezier(.18,.85,.3,1.35) both}
 .treasure-attempts .is-new{animation:tn-token .45s .15s cubic-bezier(.18,.85,.3,1.4) both}
}
@keyframes tn-sway{from{transform:rotate(-4deg)}to{transform:rotate(4deg)}}
@keyframes tn-flicker{from{opacity:.62}to{opacity:1}}
@keyframes tn-breathe{from{opacity:.72}to{opacity:1}}
@keyframes tn-blip{from{transform:translateY(0) rotate(-12deg)}to{transform:translateY(-6px) rotate(-7deg)}}
@keyframes tn-idle{0%,52%,100%{transform:none}22%{transform:translateY(-4%)}40%{transform:translateY(0) scale(1.02,.98)}62%{transform:rotate(-3deg)}70%{transform:rotate(3deg)}78%{transform:rotate(-2deg)}86%{transform:rotate(1deg)}}
@keyframes tn-twinkle{0%,100%{opacity:0;transform:scale(.4)}50%{opacity:1;transform:scale(1) rotate(25deg)}}
@keyframes tn-charge{0%{transform:none}12%{transform:rotate(-1.5deg)}24%{transform:rotate(2deg)}36%{transform:rotate(-3deg) translateY(-1%)}48%{transform:rotate(4deg) translateY(-1%)}60%{transform:rotate(-5.5deg) translateY(-2%) scale(1.02)}72%{transform:rotate(7deg) translateY(-2%) scale(1.03)}84%{transform:rotate(-8deg) translateY(-3%) scale(1.05,.97)}100%{transform:scale(1.12,.86)}}
@keyframes tn-settle{0%{transform:translateY(-12%) scale(.86,1.16)}28%{transform:translateY(1%) scale(1.12,.88)}46%{transform:translateY(-3%) rotate(-4deg) scale(.97,1.03)}62%{transform:rotate(3deg)}78%{transform:rotate(-1.5deg)}90%{transform:rotate(.6deg)}100%{transform:none}}
@keyframes tn-sulk{0%{transform:none}14%{transform:rotate(-4deg)}30%{transform:rotate(3.5deg)}46%{transform:rotate(-2.5deg)}62%{transform:rotate(1.5deg) translateY(2%) scale(1.04,.95)}80%{transform:translateY(2%) scale(1.03,.96)}100%{transform:none}}
@keyframes tn-flash{0%{opacity:0;transform:scale(.3)}55%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.25)}}
@keyframes tn-poof{0%{opacity:.9;transform:scale(.4)}100%{opacity:0;transform:translateY(-16px) scale(1.7)}}
@keyframes tn-swap-in{0%{opacity:0}100%{opacity:1}}
@keyframes tn-swap-out{0%{opacity:1}100%{opacity:0}}
@keyframes tn-rays{from{transform:rotate(0)}to{transform:rotate(40deg)}}
@keyframes tn-cheer{0%{transform:rotate(-12deg)}25%{transform:translateY(-14px) rotate(-22deg)}50%{transform:translateY(-4px) rotate(-2deg)}75%{transform:translateY(-10px) rotate(-18deg)}100%{transform:rotate(-12deg)}}
@keyframes tn-droop{0%{transform:rotate(-12deg)}40%{transform:translateY(5px) rotate(4deg)}100%{transform:rotate(-12deg)}}
@keyframes tn-puff{0%{opacity:.95;transform:scale(.3)}100%{opacity:0;transform:translateY(-12px) scale(1.5)}}
@keyframes tn-pop{0%{opacity:0;transform:translate(-50%,45%) scale(.4)}60%{opacity:1;transform:translate(-50%,-10%) scale(1.12)}100%{opacity:1;transform:translateX(-50%)}}
@keyframes tn-token{0%{transform:scale(.4)}60%{transform:scale(1.25)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.treasure-nook :is(.treasure-burst,.treasure-puff){display:none}}

/* Gemstones: a bounded Equipment child, with independent sockets per item. */
#online.gemstones-view{background:radial-gradient(ellipse at 50% 0%,#685b60,var(--ink-plum-2) 70%);color:var(--cream-300)}
#online.gemstones-view #content{flex:1;min-height:0;display:flex;flex-direction:column;gap:9px;padding:10px 12px;overflow:hidden}
#online.gemstones-view #tabs{display:flex;flex:none;align-items:center;min-height:58px}
.gemstone-heading{display:flex;align-items:center;justify-content:space-between;min-height:52px;gap:8px;flex:none}
.gemstone-heading>div{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
.gemstone-heading h1{font:26px/1.1 Lucky;margin:0;color:var(--cream-300)}
.gemstone-wallet{display:flex;align-items:center;gap:4px;background:#191820;padding:5px 6px;border:1px solid #8b7493;border-radius:18px;font:800 13px/1 system-ui;white-space:nowrap}
.gemstone-wallet img{width:21px;height:25px;object-fit:contain}
.gemstone-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}
.gemstone-collection,.gemstone-draw,.gemstone-merge-collection{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px}
.gemstone-merge-intro{flex:none;margin:0;padding:8px 10px;border:1px solid #9d8260;border-radius:11px;background:var(--cream-300);color:#524032;font:700 13px/1.25 system-ui;text-align:center}
.gemstone-sockets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;flex:none;padding:3px 0}
.gemstone-socket{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:44px;min-height:72px;border:2px solid #514148;border-radius:13px;background:linear-gradient(#ead9be,#b99572);box-shadow:inset 0 2px var(--cream-200),0 3px var(--panel-night);padding:4px 4px 6px;color:#3f3031;gap:3px}
/* The selected socket uses the shared honey --active-* face like every segmented
   picker (A14 regression); the small system-font label keeps a dark ink. */
.gemstone-socket[aria-pressed=true]{border-color:var(--active-edge);background:linear-gradient(var(--active-top),var(--active-bottom));box-shadow:inset 0 2px var(--active-shine),inset 0 -3px var(--active-lip),0 3px var(--panel-night);color:var(--ink-brown)}
.gemstone-socket>img{height:36px;width:36px;object-fit:contain}
.gemstone-socket small{font:700 11px/1.1 system-ui}
.socket-stone{position:absolute;right:6px;top:6px;width:25px;height:25px;border:1px solid var(--gem-color);border-radius:6px;display:grid;place-items:center;background:var(--ink-plum-2);color:#eee4d2}
/* AB09: square gemstone art (gemstones-v2) sits in square boxes. */
.socket-stone .gemstone-art{width:21px;height:21px;object-fit:contain}
.gemstone-active-bonuses{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:7px 8px;border:1px solid #84715d;border-radius:9px;background:#211d28;font:700 12px/1.1 system-ui;flex:none}
.gemstone-active-bonuses>span{font-size:10px;color:#d8c6a4}
/* Selected item caption card (N4): the 44px Remove gem control sits inside the
   bordered card with 8px padding, never overflowing a shorter row or touching
   the Active bonuses box. min-height = 44px control + 2 x 8px padding + border. */
.gemstone-slot-caption{display:flex;align-items:center;justify-content:space-between;min-height:62px;padding:8px 8px 8px 12px;border:1px solid #84715d;border-radius:var(--vs-radius);background:var(--ink-plum);flex:none;gap:8px}
.gemstone-slot-caption>div{display:grid;gap:4px;min-width:0}
.gemstone-slot-caption b{font:700 14px/1.15 system-ui;color:var(--cream-300)}
.gemstone-remove{flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;background:#4d404b;border:2px solid #a894a0;border-radius:var(--vs-radius);color:var(--cream-200);font:24px/1 system-ui;padding:0}
.gemstone-hint{font:12px/1.25 system-ui;color:#e4d5bc;flex:none;margin:0}
.gemstone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(76px,1fr));gap:9px;flex:1;min-height:161px;max-height:310px;align-content:start}
.gemstone-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:64px;min-width:0;padding:6px 3px 9px;border:2px solid var(--gem-color);border-radius:13px;background:linear-gradient(135deg,#4c4554,#211e2b);box-shadow:inset 0 2px #fdf4d52b,0 3px var(--panel-night);gap:3px;color:var(--paper);overflow:hidden}
.gemstone-card:after{content:'';position:absolute;bottom:0;left:0;right:0;height:4px;background:linear-gradient(135deg,var(--gem-color),var(--gem-accent));pointer-events:none}
.gemstone-card>.gemstone-art{width:70%;height:calc(100% - 24px);min-height:32px;max-height:84px;object-fit:contain}
.gemstone-card>small{font:700 10px/1.1 system-ui;white-space:nowrap}
.gemstone-count{position:absolute;right:6px;top:6px;border-radius:5px;background:#16151cdc;padding:2px 4px;font:800 12px/1 system-ui}
.gemstone-count.is-ready{background:#3f7a35;color:#f4ffe6;box-shadow:inset 0 0 0 1px #9fdb7e}
.gemstone-pin{position:absolute;left:5px;top:4px;color:var(--gold-50);font-size:12px}
.gemstone-pages{display:flex;align-items:center;justify-content:center;gap:18px;min-height:44px;flex:none;font:700 13px/1 system-ui}
.gemstone-pages button{height:44px;width:52px;min-height:44px;background:#51454d;color:var(--cream-300);border:2px solid #9d836f;border-radius:var(--vs-radius);padding:9px}
.gemstone-pages svg{width:20px;height:20px}
/* F05 guard: the 5px compact gap would leave the stone cards' 3px lip 2px off the pager. */
@media(max-height:730px){.gemstone-pages{margin-top:2px}}
.gemstone-empty{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center}
.gemstone-empty>img{height:100px;max-height:20vh;object-fit:contain}
.gemstone-empty h2{font:24px/1.1 Lucky;margin:0;color:var(--gold-50)}
.gemstone-empty p{font:13px/1.3 system-ui;margin:0;max-width:270px;color:#e4d5bc}
#online .gemstone-empty .secondary{margin:0;min-height:var(--tier-full-h);font-size:var(--tier-full-fs);width:80%}
.gemstone-coffer{display:flex;gap:8px;align-items:center;justify-content:center;flex:1;min-height:66px;max-height:145px}
.gemstone-coffer>img{width:32%;height:100%;max-height:130px;min-height:50px;object-fit:contain}
.gemstone-coffer h2{font:26px/1.05 Lucky;margin:0;color:var(--gold-50)}
.gemstone-coffer p{font:13px/1.25 system-ui;margin:5px 0 0;color:#e4d5bc}
.gemstone-coffer>div{min-width:0;flex:1}
.exchange-wallet{display:flex;align-items:center;justify-content:center;gap:16px;flex:none}
/* b148 AC699: the Bamboo balance alone, centred: a dark currency capsule with the Bamboo art overlapping its left end. */
.exchange-wallet:has(>.exchange-bamboo){margin:2px 0 8px}
.exchange-wallet>.exchange-bamboo{position:relative;display:inline-flex;align-items:center;gap:0;height:36px;box-sizing:border-box;padding:0 18px 0 46px;border:2px solid #53515e;border-radius:999px;background:#15151c;box-shadow:inset 0 2px #0008,0 3px 0 #0006}
.exchange-bamboo>img{position:absolute;left:-6px;top:50%;width:48px;height:48px;object-fit:contain;transform:translateY(-50%);filter:drop-shadow(0 2px 0 #0007)}
.exchange-bamboo>b{font:24px/1 Lucky,sans-serif;color:#fff;font-variant-numeric:tabular-nums;letter-spacing:.5px;-webkit-text-stroke:3px #15151c;paint-order:stroke fill;margin:0}
.exchange-wallet>span{display:flex;align-items:center;gap:4px}
.exchange-wallet .gemstone-key-art{height:23px;width:23px;object-fit:contain}
/* W04 (build 33): one odds table for every rarity sheet. Two compact columns
   sized to their content and centred, the value a short gap after the longest
   label, percentages aligned on the decimal point (oddsPercents), and an odd
   last row centred under both columns instead of hanging on the left. */
.gemstone-odds{flex:none;padding:10px 12px;border:2px solid #9d8260;border-radius:14px;background:var(--cream-300);color:#413439}
.gemstone-odds h2{font:20px/1.1 Lucky;margin:0 0 6px;color:#554033}
.gemstone-odds>div{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));justify-content:center;gap:4px 26px}
.gemstone-odds p{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;column-gap:6px;margin:0;min-height:20px;font:600 11px/1.1 system-ui}
.gemstone-odds p:last-child:nth-child(odd){grid-column:1/-1;justify-self:center}
.gemstone-odds p i{width:10px;height:10px;border:1px solid #524959;background:linear-gradient(135deg,var(--gem-color),var(--gem-accent));border-radius:3px;flex:none;box-sizing:border-box}
.gemstone-odds p span{min-width:0;overflow-wrap:anywhere}
.gemstone-odds p b{display:flex;justify-content:flex-end;padding-left:6px;font-variant-numeric:tabular-nums;white-space:nowrap}
.gemstone-odds p b .odds-pad{visibility:hidden}
.gemstone-odds>small{font:11px/1.3 system-ui;display:block;margin-top:7px;color:#645446}
.gemstone-chance-note{font:12px/1.3 system-ui;color:#e4d5bc;margin:0;text-align:center;flex:none}
.gemstone-draw-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex:none;margin-top:3px}
.gemstone-draw-actions>div{display:flex;flex-direction:column;align-items:center;gap:5px}
#online .gemstone-draw-actions .secondary{width:100%;min-width:0;min-height:var(--tier-full-h);padding:8px;margin:0;font-size:var(--tier-full-fs)}
#online .gemstone-draw-actions .secondary:before,#online .gemstone-empty .secondary:before{inset:0}
.gemstone-draw-actions b{font:800 13px/1 system-ui;color:#ecd7ff}
.gemstone-detail,.gemstone-merge,.gemstone-confirm,.gemstone-receipt{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
#modal :is(.gemstone-detail,.gemstone-merge,.gemstone-confirm,.gemstone-receipt) h1{font-size:28px;margin:0}
#modal :is(.gemstone-detail,.gemstone-merge,.gemstone-confirm,.gemstone-receipt) p{font:13px/1.35 system-ui;margin:0}
.gemstone-detail-art{width:90px;height:100px;border:3px solid var(--gem-color);border-radius:16px;background:linear-gradient(#51475a,var(--ink-plum));display:grid;place-items:center;box-shadow:0 3px #3f3339}
.gemstone-detail-art>img{width:75px;height:88px;object-fit:contain}
.gemstone-detail-bonus{font:27px/1.1 Lucky;color:#65472c}
.gemstone-detail .gemstone-sockets{width:100%;gap:6px}
.gemstone-detail>small{font:12px/1.3 system-ui;color:#67533c}
.gemstone-detail>small.gemstone-detail-reason{font-weight:750;color:#7a3f22}
#modal .gemstone-detail>.secondary{width:65%;min-height:var(--tier-full-h);margin:0;font-size:var(--tier-full-fs)}
#modal .gemstone-detail>.secondary:before{inset:0}
/* Visual polish r2 (findings 44/54/271): one status chip under the heading, the
   Inactive badge on the gear tab, and full 44px faces on the column actions. */
#modal .gemstone-status-chip{display:inline-flex;align-items:center;gap:5px;margin:-2px 0 0;padding:3px 11px 3px 6px;border:2px solid #3f7a46;border-radius:999px;background:linear-gradient(#e7f6d9,#c7e6ad);color:#24502b;font:800 13px/1.2 system-ui;box-shadow:0 2px #3f7a4655}
#modal .gemstone-status-chip>.ui-icon{width:18px;height:18px}
#modal .gemstone-status-chip.is-inactive{border-color:#7a6f7c;background:linear-gradient(#efe7f0,#d8ccd9);color:#4a3f4c;padding-left:11px}
#modal .gemstone-socket>.socket-inactive{position:absolute;left:3px;top:3px;z-index:3;padding:1px 5px;border:1.5px solid #514148;border-radius:999px;background:#6f6470;color:#fff6e6;font:800 9px/1.2 system-ui;white-space:nowrap}
#modal .gemstone-comparison .gemstone-tile-action.button-compact:before{inset:0}
/* I01: the display font is ~6% wider than Lilita One; "Replace gem" needs more than half the row, Close does not.
   V21: Close is first (left), the action on the right. */
#modal:has(.gemstone-detail) .equipment-actions{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
#modal:has(.gemstone-detail) .equipment-actions:has(>[data-action=gemstone-results-back]:first-child){grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
.gemstone-confirm-cost{display:flex;align-items:center;gap:8px;font-weight:800!important;font-size:20px!important}
.gemstone-confirm-cost>img{height:30px;width:25px;object-fit:contain}
.gemstone-confirm .gemstone-odds{width:100%;text-align:left}
.gemstone-merge-art{display:flex;align-items:center;justify-content:center;gap:18px;width:100%;margin:5px 0}
.gemstone-merge-art>div{position:relative;display:flex;flex-direction:column;align-items:center;width:35%;border:2px solid var(--gem-color);border-radius:13px;background:#342c3f;padding:7px;color:var(--cream-300);gap:4px}
.gemstone-merge-art img{width:82px;height:82px;object-fit:contain}
.gemstone-merge-art small{font:700 11px/1 system-ui}
.gemstone-merge-art>span{font-size:30px}
.gemstone-merge h2{font:23px/1.1 Lucky;margin:0}
/* AC529 (b126): receipt rows centre for every card count (a short or last row
   no longer leaves the right columns empty); a slot keeps the 5-column width. */
.gemstone-receipt-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;width:100%;margin:8px 0}
.gemstone-receipt-grid>.gemstone-card{flex:0 0 calc((100% - 28px) / 5 - .01px)}
.gemstone-receipt-grid .gemstone-card{height:88px;padding:3px;min-width:0}
.gemstone-receipt-grid .gemstone-card small{display:none}
.gemstone-receipt-grid .gemstone-art{height:68px;width:90%}
.gemstone-receipt-grid.single>.gemstone-card{flex-basis:140px}
.gemstone-receipt-grid.single .gemstone-card{height:160px}
.gemstone-receipt-grid.single .gemstone-card small{display:block}
/* AC592 (b127): a single receipt card that shows both the rarity word and its ×N (Merge all
   with one class) stacks them: the word, then the count on its own row, both in flow inside
   the card (the absolute bottom-centred count used to land on the word: "Leg×1ary"). */
.gemstone-receipt-grid.single .gemstone-card>small+.gemstone-count{position:relative;left:auto;bottom:auto;transform:none;margin:0 0 3px;flex:none;line-height:1}
.gemstone-receipt-grid.single .gemstone-art{height:120px}
/* P06 (build 27): merged stones pop in one after another, then a glint sweeps
   each tile. Transform/opacity only; fill backwards so press feedback keeps
   working afterwards. Off under reduced motion (block below). */
.gemstone-receipt.is-merged .gem-merge-new{overflow:visible;animation:gem-merge-pop .42s cubic-bezier(.2,1.35,.4,1) backwards;animation-delay:calc(170ms + var(--i,0) * 90ms)}
.gem-merge-glint{position:absolute;inset:0;z-index:1;border-radius:inherit;overflow:hidden;pointer-events:none}
.gemstone-receipt.is-merged .gem-merge-glint:after{content:'';position:absolute;display:block;top:-12%;bottom:-12%;left:0;right:auto;width:42%;height:auto;background:linear-gradient(90deg,#fff0,#fffc 50%,#fff0);opacity:0;transform:translateX(-130%) skewX(-18deg);animation:gem-merge-glint .62s ease-out backwards;animation-delay:calc(430ms + var(--i,0) * 90ms)}
@keyframes gem-merge-pop{0%{opacity:0;transform:scale(.35)}60%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:none}}
@keyframes gem-merge-glint{0%{opacity:0;transform:translateX(-130%) skewX(-18deg)}25%{opacity:1}100%{opacity:0;transform:translateX(340%) skewX(-18deg)}}
@media(prefers-reduced-motion:reduce){.gemstone-receipt.is-merged .gem-merge-new{animation:none}.gemstone-receipt.is-merged .gem-merge-glint:after{display:none;animation:none}}
.gemstone-help p{font:14px/1.4 system-ui}
/* N10 (build 26): the merge rules are the last section of the one Gemstones help sheet. */
.gemstone-help .gemstone-merge-help{margin-top:12px;padding-top:10px;border-top:2px solid #c9ad7a}
.gemstone-help .gemstone-merge-help h2{margin:0 0 4px;font:20px/1.15 Lucky;text-align:center}
/* A13: the Combine sheet's (?) sits in its heading and opens only the merge section. */
.gemstone-merge-heading{display:grid;grid-template-columns:var(--tier-compact) minmax(0,1fr) var(--tier-compact);align-items:center;gap:4px;width:100%}
.gemstone-merge-heading h1{grid-column:2;min-width:0}
.gemstone-merge-heading .help-button{grid-column:3}
#modal .gemstone-merge .gemstone-merge-short{font:700 12px/1.25 system-ui;color:#8a3b22}
.gemstone-help.is-merge-only .gemstone-merge-help{margin:0;padding:0;border:0}
.gemstone-help.is-merge-only .gemstone-merge-help h2{margin:0 0 8px;font-size:28px}
@media(max-height:730px){#online.gemstones-view #content{gap:6px;padding:5px 10px}.gemstone-heading{min-height:44px}.gemstone-heading h1{font-size:26px}.gemstone-coffer{max-height:85px}.gemstone-coffer h2{font-size:22px}.gemstone-collection,.gemstone-draw,.gemstone-merge-collection{gap:5px}.gemstone-socket{min-height:65px}.gemstone-socket>img{height:30px}.gemstone-grid{gap:7px;max-height:225px}.gemstone-odds{padding:8px 10px}.gemstone-empty>img{height:72px}.gemstone-detail-art{height:76px;width:70px}.gemstone-detail-art>img{width:56px;height:65px}.gemstone-detail{gap:5px}}
/* Approved Trail parchment (B). Utility controls retain compact inset faces. */
#online .secondary,#modal .secondary,#error .secondary,#tabs .bottom-tab,.collection-tabs button{
 --small-top:var(--btn-secondary-top);--small-bottom:var(--btn-secondary-bottom);--small-edge:var(--btn-secondary-edge);--small-lip:var(--btn-secondary-lip);--small-shine:var(--btn-secondary-shine);--face-lip:3px;
 position:relative;isolation:isolate;min-height:44px;min-width:44px;
 border:0;background:none;box-shadow:none;color:var(--cream-50);
 /* The stroke sits behind the fill, so scale it with the label: a fixed hairline
    became illegible on long, wide parchment titles (feedback A21). */
 -webkit-text-stroke:var(--label-stroke) var(--small-edge);paint-order:stroke fill;text-shadow:none;
}
#online .secondary:before,#modal .secondary:before,#error .secondary:before,#tabs .bottom-tab:before,.collection-tabs button:before{
 content:'';display:block;position:absolute;inset:4px 0;z-index:-1;pointer-events:none;
 border:3px solid var(--small-edge);border-radius:15px;
 background:linear-gradient(var(--small-top),var(--small-bottom) 90%);
 box-shadow:inset 0 2px var(--small-shine),inset 0 calc(-1 * var(--face-lip)) var(--small-lip),0 3px var(--small-edge);
}
/* One active/selected face for the main tabs, tab strips and segmented pickers:
   the bright honey token (Fast Travel multiplier) replaces the former dark-brown
   selected faces. The state stays in aria-current/-selected/-pressed; the label
   gets a heavier outline for contrast and there is never a second outer halo. */
#tabs .bottom-tab[aria-current=page],.collection-tabs button[aria-current=page],#modal .travel-multipliers button[aria-pressed=true],#online .trail-level-picker button[aria-pressed=true],#online .gemstone-tabs [aria-selected=true],#online .rank-categories [aria-pressed=true],#online .arena-tabs [aria-selected=true],#modal .avatar-tabs [aria-selected=true],#modal .home-scenery-options button[aria-pressed=true],#modal .language-options button[aria-pressed=true]{
 --small-top:var(--active-top);--small-bottom:var(--active-bottom);--small-edge:var(--active-edge);--small-lip:var(--active-lip);--small-shine:var(--active-shine);
 outline:0;color:var(--active-ink);-webkit-text-stroke-width:var(--active-stroke);
}
/* outline:0 above removes any old selected halo, not keyboard focus: a focused
   selected control still shows the keyboard-only ring (pointer taps never do). */
:root[data-input-modality=keyboard] :is(#online,#modal) :is([aria-current=page],[aria-pressed=true],[aria-selected=true]):focus-visible{outline:2px solid #b67939;outline-offset:2px}
/* Visual polish r2 (shared lane): the one scroll edge fade (`.scroll-fade`; ui-components.ts keeps .at-top/.at-bottom
   and opts the existing list scrollers in). An edge that hides more content fades over 20px (--sf-size); an end it rests on, or a
   list that does not scroll, stays hard. Lists on a transparent ground fade their content with a mask; lists that paint
   their own well in a flex/block column (brown Star Quest wells, the Moonleaf tan well) keep the well and lay a sticky well-coloured
   gradient over the rows instead (--sf-gap: the list's own row gap, measured by the script). The rank list is a grid
   (sticky layers would take a track), so it masks; its well and the board behind it are both dark. */
.scroll-fade{--sf-size:20px;--sf-top:var(--sf-size);--sf-bottom:var(--sf-size)}
.scroll-fade.at-top{--sf-top:0px}
.scroll-fade.at-bottom{--sf-bottom:0px}
.scroll-fade:not(.star-chapter-list,.star-track-rows,.moonleaf-exchange-list){-webkit-mask-image:linear-gradient(#0000,#000 var(--sf-top),#000 calc(100% - var(--sf-bottom)),#0000);mask-image:linear-gradient(#0000,#000 var(--sf-top),#000 calc(100% - var(--sf-bottom)),#0000)}
.scroll-fade:is(.star-chapter-list,.star-track-rows){--sf-well:#5a4030}
.scroll-fade.moonleaf-exchange-list{--sf-well:#bd9f7a}
.scroll-fade:is(.star-chapter-list,.star-track-rows,.moonleaf-exchange-list)::before,.scroll-fade:is(.star-chapter-list,.star-track-rows,.moonleaf-exchange-list)::after{content:'';display:block;flex:none;position:sticky;z-index:4;height:var(--sf-size);pointer-events:none;transition:opacity .16s var(--ease-out,ease-out)}
.scroll-fade:is(.star-chapter-list,.star-track-rows,.moonleaf-exchange-list)::before{top:calc(-1 * var(--sf-pad-top,0px));margin-bottom:calc(-1 * var(--sf-size) - var(--sf-gap,0px));background:linear-gradient(var(--sf-well) 2px,#0000)}
.scroll-fade:is(.star-chapter-list,.star-track-rows,.moonleaf-exchange-list)::after{bottom:calc(-1 * var(--sf-pad-bottom,0px));margin-top:calc(-1 * var(--sf-size) - var(--sf-gap,0px));background:linear-gradient(#0000,var(--sf-well) calc(100% - 2px))}
.scroll-fade.at-top::before,.scroll-fade.at-bottom::after{opacity:0}
@media(prefers-reduced-motion:reduce){.scroll-fade::before,.scroll-fade::after{transition:none}}
/* Visual polish r2 (shared lane, findings 23/47): every tab strip (tabStrip()'s role=tablist: Star Quest, Avatar /
   Frame / Titles, Arena, Perks; and the Journal's tab nav) is one segmented control, not a row of extra actions: a flat
   inset track, the selected segment raised on the shared --active-* face, the others flat brown text. The track's 3px
   inset comes out of the segments, so the strip keeps its height. */
:is(#online,#modal) :is([role=tablist],.collection-tabs){gap:3px;padding:3px;border-radius:17px;background:var(--row-inset);box-shadow:inset 0 2px 0 color-mix(in srgb,var(--vs-ink) 22%,transparent),0 1px 0 var(--cream-50)}
:is(#online,#modal) :is([role=tablist],.collection-tabs)>:is(button.secondary,button){min-height:calc(var(--tier-dense-h) - 6px)}
:is(#online,#modal) :is([role=tablist],.collection-tabs)>button:not([aria-selected=true],[aria-current=page]){color:#7a5838;-webkit-text-stroke:0;text-shadow:none}
:is(#online,#modal) :is([role=tablist],.collection-tabs)>button:not([aria-selected=true],[aria-current=page])::before{opacity:0}
:is(#online,#modal) :is([role=tablist],.collection-tabs)>button:is([aria-selected=true],[aria-current=page])::before{border-radius:14px}
/* The Journal tabs carry their copy as bare text (no .button-label, so no AC631 face shift): the line box (Lucky's cap
   band) is centred on the face above the 3px lip. */
#modal .collection-tabs.collection-tabs>button{display:flex;align-items:center;justify-content:center;height:calc(var(--tier-dense-h) - 6px);padding:0 2px var(--face-lip)}
/* Visual polish r2 (shared lane, finding 71): two modal header variants only. Reward / celebration receipts keep the
   ribbon banner; every utility sheet uses the centred title (no left-aligned sheet titles, no teal bands): Settings,
   Delete account, Arena rules, What's new, Events, Calendar and every other sheet that opens with its title. Headers
   that pair the title with a control (account title + help, analytics consent, fishing sheets) keep their own row. */
#modal>section>h1:first-child{text-align:center}
#modal .settings-panel>h1+p{text-align:center}
#modal section>header.events-header{margin:0 0 10px;padding:0;overflow:visible;background:none;border:0;color:inherit;text-align:center}
#modal section>header.events-header:after{content:none}
#modal section>header.events-header .eyebrow{color:#9a7448}
#modal section>header.events-header h1{color:inherit}
#modal .moonleaf-calendar>header{justify-content:center;height:auto;min-height:58px;padding:0 84px;background:none;color:inherit}
@media(max-height:730px){#modal .moonleaf-calendar>header{padding:0 76px}}
/* Visual polish r2 (finding 18, AC226): a chest card keeps no helper line under its buttons; the reason is spoken and
   becomes the denied-tap toast. AC842 (build 194): the unaffordable price keeps its normal lettering (no red). */
.chest-draw-reason{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
/* Visual polish r2 (finding 41): a price numeral on a confirm face is lettered like its label (the Moonleaf buy
   confirm's lettering): Fishing Buy bait and the Moonleaf Exchange quantity confirm. */
#modal .fishing-buy-action .gemstone-price,#modal:has(.moonleaf-exchange-qty)>.equipment-actions .moonleaf-cost{font:19px/1 Lucky,system-ui;color:var(--cream-50);-webkit-text-stroke:var(--label-stroke) var(--small-edge);paint-order:stroke fill;text-shadow:none}
/* The quantity confirm lays label and price in one row (moonleaf.css), so the price drops the 7px under-label gap and
   shares the label's midline on the face. */
#modal:has(.moonleaf-exchange-qty)>.equipment-actions [data-action="moonleaf.exchange"]>.moonleaf-cost{margin-top:0}
/* Visual polish v1 (2026-10-27): button roles, one rule for the whole game (VISUAL_STYLE.md §10).
   Close/Back/Cancel keep the parchment secondary face. The action a popup exists for (commit) is the
   warm orange face, every Claim / Claim all the green claim face, a fight the battle face and a
   destructive confirm the red danger face. Callers opt in with .role-*; existing markup is matched
   by its stable action so the same action has the same colour everywhere. Disabled keeps the
   shared opaque grey fallback (MOBILE_UI.md), so a role only paints an enabled face. */
:is(#online,#modal,#tabs) .secondary:is(.role-commit,.backpack-use,.gemstone-empty>button,.reroll-confirm,[data-skill-confirm],
[data-action="story.equip"],[data-action="gemstone-merge-preview"],[data-action="gemstones.merge"],[data-action="gemstones.mergeAll"],[data-action="gear.merge"],[data-action="gear.mergeAll"],[data-action="gemstones.socket"]:not(.gemstone-detail-remove),[data-action="gear.equip"]:not([data-payload*='"id":null']),[data-action="gloves.equip"][data-payload*='"equipped":true'],[data-action="wardrobe.equip"][data-payload*='"equipped":true'],[data-action="miner.next"],[data-action="treasure-panel"]):not(:disabled){--small-top:var(--btn-commit-top);--small-bottom:var(--btn-commit-bottom);--small-edge:var(--btn-commit-edge);--small-lip:var(--btn-commit-lip);--small-shine:var(--btn-commit-shine)}
:is(#online,#modal,#tabs) .secondary:is(.role-claim,[data-action="arena.claim"],[data-action="miner.collect"],[data-action="bestiary.claim"]):not(:disabled){--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
:is(#online,#modal,#tabs) .secondary:is(.role-battle,.arena-fight):not(:disabled){--small-top:var(--btn-battle-top);--small-bottom:var(--btn-battle-bottom);--small-edge:var(--btn-battle-edge);--small-lip:var(--btn-battle-lip);--small-shine:var(--btn-battle-shine)}
:is(#online,#modal,#tabs) .secondary.role-danger:not(:disabled){--small-top:var(--btn-danger-top);--small-bottom:var(--btn-danger-bottom);--small-edge:var(--btn-danger-edge);--small-lip:var(--btn-danger-lip);--small-shine:var(--btn-danger-shine)}
#tabs .bottom-tab{flex-direction:column;min-height:66px;gap:0;padding:4px 2px 7px;font-size:15px;line-height:1}
#tabs .bottom-tab img{width:44px;height:36px;object-fit:contain;filter:drop-shadow(0 1px var(--ink-plum-2))}
/* The label <b> inherits the tab's --label-stroke (and --active-stroke when
   selected), like every other small control; only the drop is left out. */
#tabs .bottom-tab b{font:inherit;text-shadow:none}
/* Deliberate compact exceptions (Treasures wallet Exchange, playback 32-in-44
   faces) keep a thinner 1px outline on their small labels. */
#online.miner-view .mining-wallet>.secondary{background:none;box-shadow:none;color:var(--cream-50);font-size:12px;-webkit-text-stroke:1px var(--small-edge)}
#online.miner-view .mining-wallet>.secondary:before{inset:7px 0;border-width:2px;border-radius:10px}
#online #playback button{color:var(--cream-50);-webkit-text-stroke:1px #3f302a;paint-order:stroke fill;text-shadow:none}
#online #playback button:before{background:linear-gradient(#ffebbc,#d5ad71);border-color:#3f302a;box-shadow:inset 0 1px var(--cream-200),inset 0 -2px #9f7448,0 2px #3f302a}
#online #playback button:active:before{background:linear-gradient(#ffebbc,#d5ad71)}
/* Only the standings list scrolls; podium, own position and return stay fixed. */
#online.rankings-view{background:radial-gradient(ellipse at 50% 20%,#54483d,var(--ink-plum-2) 65%)}
#online.rankings-view #content{flex:1;min-height:0;padding:8px 12px;overflow:hidden;display:flex}
#rank-content{flex:1;width:100%;min-height:0;display:flex;flex-direction:column;gap:8px}
.rank-heading{position:relative;text-align:center;flex:none;padding:2px 44px;min-height:50px}
.rank-heading .eyebrow{font-size:9px;letter-spacing:1.6px;color:#cbb28b}
.rank-heading h1{font-size:32px;line-height:1.05;margin:0;color:#ffe9b5;filter:drop-shadow(0 2px #201b27)}
.rank-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none}
#online .rank-categories .secondary{display:flex;align-items:center;justify-content:center;gap:4px;font-size:14px;padding:3px;margin:0;min-width:0}
.rank-categories img{width:25px;height:28px;object-fit:contain}
.rank-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;flex:none;padding-bottom:3px}
.rank-filters label{position:relative;display:block;min-width:0;transition:transform .1s ease}
.rank-filters label>span{position:absolute;left:13px;top:5px;z-index:1;font:700 10px/12px system-ui;color:#755638;pointer-events:none}
.rank-filters label::after{content:'';position:absolute;right:12px;top:21px;width:14px;height:10px;pointer-events:none;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='m2 2 6 6 6-6' fill='none' stroke='%23604531' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.rank-filters select{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;height:48px;margin:0;padding:16px 33px 3px 11px;border:2px solid #49382e;border-radius:13px;background:linear-gradient(var(--cream-300),#e7c48b);box-shadow:inset 0 2px var(--card-face),inset 0 -3px #c09865,0 3px #201a21;color:#392c26;font:700 16px/20px system-ui,sans-serif;letter-spacing:0;text-shadow:none;-webkit-text-stroke:0;color-scheme:light;cursor:pointer;touch-action:manipulation}
.rank-filters select option{background:var(--cream-300);color:#392c26}
.rank-filters select:focus-visible{outline:3px solid #73d2ed;outline-offset:2px}
.rank-filters label:has(select:active:not(:disabled)){transform:scale(.96)}
.rank-filters label:has(select:disabled){filter:grayscale(.8) brightness(.92)}
.rank-filters select:disabled{cursor:default;opacity:1}
@media(prefers-reduced-motion:reduce){.rank-filters label{transition:none}}
.rank-context{display:flex;justify-content:space-between;gap:4px;flex:none;font-size:10px;color:#cbbca5}
.rank-context b{color:#f8dfac}
.rank-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);align-items:end;gap:6px;flex:1;min-height:190px;max-height:255px;padding:0 4px 14px;margin-bottom:4px;border-bottom:2px solid #89704c;background:radial-gradient(ellipse at 50% 75%,#ca9c4933,transparent 70%)}
.rank-winner,.rank-seat-empty{--podium-metal:#c3c3d0;--podium-top:#777383;--podium-bottom:#403947;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;height:100%;margin:0;padding:0;border:0;background:none;color:var(--cream-300)}
.rank-winner.place-1{--podium-metal:#e5bd60;--podium-top:#a67c3e;--podium-bottom:#604329}.rank-winner.place-3{--podium-metal:#ba8864;--podium-top:#86604d;--podium-bottom:#493632}
.rank-character{display:block;width:100%;height:130px;min-height:0;object-fit:contain;object-position:center bottom;flex:0 1 130px;margin-bottom:-2px}
/* P21 (build 27): the portrait is centred on its block (feet at the canvas centre)
   and may overhang the column by 8px a side, so a long weapon costs less figure size. */
.rank-winner .rank-character{align-self:center;width:calc(100% + 16px);max-width:none;margin-inline:-8px;pointer-events:none}
.rank-pedestal{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:none;width:100%;height:69px;padding:7px 2px 3px;border:2px solid var(--podium-metal);border-radius:9px 9px 5px 5px;background:linear-gradient(var(--podium-top),var(--podium-bottom));box-shadow:inset 0 4px #fff3,0 4px var(--panel-night)}
.place-1 .rank-pedestal{height:87px}.place-3 .rank-pedestal{height:61px}
.rank-medal{position:absolute;top:-11px;left:3px;z-index:1;display:grid;place-items:center;width:21px;height:21px;border:2px solid #ddd2ae;border-radius:50%;background:var(--ink-plum-2);font:14px Lucky;color:#ffeabb}
.rank-winner-name{flex:none;width:100%;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rank-winner strong{flex:none;font:23px/1 Lucky;color:var(--gold-100)}.rank-winner small{font-size:9px;line-height:1}
.rank-seat-empty{justify-content:center;opacity:.6;border:2px dashed #aaa0b2;border-radius:14px;background:var(--ink-plum-2);box-shadow:none;height:77%;min-height:85px}.rank-seat-empty span{font:24px Lucky}.rank-seat-empty small{font-size:10px}
.rank-board{flex:1;min-height:170px;display:flex;flex-direction:column;padding:7px;border:2px solid #a98a60;border-radius:15px;background:#211e29;box-shadow:0 3px var(--panel-night)}
.rank-board>header{display:flex;justify-content:space-between;align-items:center;margin:0 3px 5px;color:#e7d2b1;font-size:11px}.rank-board>header small{font-size:10px}
.rank-list{flex:1;display:grid;grid-auto-rows:48px;align-content:start;gap:5px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#aa9166 #211e29;padding:2px}
.rank-row{display:grid;grid-template-columns:28px 32px minmax(0,1fr) auto;align-items:center;gap:5px;width:100%;min-width:0;min-height:44px;padding:3px 7px;margin:0;border:2px solid #a88c66;border-radius:10px;background:linear-gradient(var(--cream-300),#ddc196);color:#3a2d2c;text-align:left}
.rank-row.is-you{border-color:#bda16f;background:linear-gradient(#7c6750,#4e4036);color:var(--cream-250)}
.rank-row img{width:30px;height:34px;object-fit:contain}.rank-place{font:18px Lucky;text-align:center}.rank-person{min-width:0}.rank-person>b{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-person small{display:block;font-size:9px;line-height:1.15;opacity:.85}
.rank-row>strong{font:20px Lucky;max-width:92px;overflow:hidden;text-overflow:ellipsis}
.rank-empty{grid-row:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px;color:#dfc7a0}.rank-empty b{font:21px Lucky}.rank-empty p{font-size:12px;margin:6px 0 0}
.rank-mine{flex:none;display:flex;align-items:center;gap:5px;min-height:48px;margin-top:auto;border:1px solid #92744c;border-radius:var(--vs-radius);padding:3px;background:var(--panel-night);color:var(--cream-300)}.rank-mine>.rank-row{flex:1;min-width:0}.rank-mine>span{padding:3px 9px}.rank-mine>span b,.rank-mine>span small{display:block}.rank-mine>span b{font-size:12px}.rank-mine>span small{font-size:10px}
.rank-own-next{width:44px;min-height:44px;background:none;color:#ffe3a8;border:0;padding:3px}.rank-own-next svg{display:block;width:20px;height:20px;margin:auto}.rank-own-next small{font-size:9px}
.rank-status{flex:1;display:flex;flex-direction:column;justify-content:center;text-align:center;color:#ebd5b3}.rank-status h2{font-size:24px}.rank-status p{font-size:13px;overflow-wrap:anywhere}
#online.rankings-view #tabs{flex:none;display:flex;gap:8px;padding-top:6px}
#online #tabs .back-arrow,#modal .treasure-help-sheet>.back-arrow,#online .batch-draft .skill-draft-actions>.back-arrow{width:54px;height:48px;padding:3px;border:2px solid var(--ink-plum-2);border-radius:15px;background:linear-gradient(145deg,#aaa2b8,#857d99 70%,#79718b);box-shadow:inset 0 2px 0 #d9d0e1,inset 2px 0 0 #bcb2c9,inset -2px -3px 0 #6c637d,0 3px 0 var(--panel-night)}
#online #tabs .back-arrow svg,#modal .treasure-help-sheet>.back-arrow svg,#online .batch-draft .skill-draft-actions>.back-arrow svg{width:43px;height:32px;overflow:visible}
.rank-list:has(.rank-empty){display:flex}.rank-list .rank-empty{flex:1}
/* Visual polish r2 (arena lane). #181: podium blocks read as a podium: a lit top face over the front face,
   metal medals (a crown over #1) and a soft static light behind the winner (AC640: behind its subject, no rays). */
.rank-pedestal::before{content:'';position:absolute;left:-2px;right:-2px;top:-9px;height:9px;border:2px solid var(--podium-metal);border-bottom:0;border-radius:6px 6px 0 0;background:linear-gradient(color-mix(in srgb,var(--podium-metal) 70%,#fff),var(--podium-metal));clip-path:polygon(7% 0,93% 0,100% 100%,0 100%);pointer-events:none}
.rank-pedestal{box-shadow:inset 0 4px #fff3,inset 6px 0 #ffffff14,inset -6px 0 #00000026,0 4px var(--panel-night)}
.rank-winner .rank-medal{--medal-top:#eef1f4;--medal-bottom:#b9c0c8;top:-19px;width:24px;height:24px;border:2px solid var(--vs-ink);background:linear-gradient(var(--medal-top),var(--medal-bottom));box-shadow:inset 0 2px #ffffff80,0 2px var(--vs-ink);font:15px/1 Lucky;color:var(--vs-ink)}
.rank-winner.place-1 .rank-medal{--medal-top:#f3d66d;--medal-bottom:#d9a93a}
.rank-winner.place-3 .rank-medal{--medal-top:#e7b48a;--medal-bottom:#b8784f}
.rank-medal>.rank-crown{position:absolute;left:50%;top:-19px;width:26px;height:22px;transform:translateX(-50%)}
.rank-winner.place-1{isolation:isolate}
.rank-winner.place-1 .rank-portrait::before{content:'';position:absolute;left:-6%;right:-6%;top:-8%;bottom:-4%;z-index:-1;border-radius:50% 50% 40% 40%;background:radial-gradient(ellipse at 50% 70%,#ffd98a66 0%,#ffcf6a26 45%,transparent 72%);pointer-events:none}
/* #273: an empty seat is a pale silhouette on a grey pedestal, not a dashed outline. */
.rank-seat-empty{justify-content:flex-end;opacity:1;border:0;border-radius:0;background:none;height:100%;min-height:0}
.rank-seat-empty .rank-seat-silhouette{width:min(78%,96px);aspect-ratio:1;object-fit:contain;object-position:center bottom;margin-bottom:6px;filter:brightness(0) saturate(0);opacity:.3}
.rank-seat-empty .rank-pedestal{opacity:.72}
.rank-seat-empty.place-1 .rank-pedestal{height:87px}.rank-seat-empty.place-3 .rank-pedestal{height:61px}
.rank-seat-empty .rank-medal{position:absolute;top:-19px;left:3px;width:24px;height:24px;font:15px/1 Lucky;color:#ffeabb}
.rank-seat-empty .rank-pedestal small{font-size:10px;color:var(--cream-300)}
@media(max-height:800px){.rank-seat-empty .rank-seat-silhouette{width:64px}.rank-seat-empty .rank-pedestal{height:54px}.rank-seat-empty.place-1 .rank-pedestal{height:66px}.rank-seat-empty.place-3 .rank-pedestal{height:48px}}
/* #273: an empty board shows one standard cream list line, not a brown slab. */
.rank-list:has(.rank-empty){display:grid;background:none}
.rank-list .rank-empty{flex:none;grid-row:auto;justify-content:center;min-height:0;padding:9px 12px;border:2px solid #a88c66;border-radius:10px;background:linear-gradient(var(--cream-300),#ddc196);color:#3a2d2c}
.rank-list .rank-empty b{font:18px/1.1 Lucky}.rank-list .rank-empty p{margin:3px 0 0;font-size:12px;color:#5a4636}
/* #100: the profile switch is a framed icon button of fixed width with its count under the chevron. */
#online .rank-own-next{display:grid;place-items:center;align-content:center;gap:1px;flex:none;width:48px;min-height:44px;margin:0;padding:3px;border:2px solid #92744c;border-radius:12px;background:#3a3040;color:#ffe3a8}
.rank-own-next>.ui-icon{width:20px;height:20px}
.rank-own-next small{font:700 10px/1 system-ui;font-variant-numeric:tabular-nums}
/* AC779 (b170, supersedes the #182 grey skeleton): the loading board is the loaded layout itself (context line,
   unclaimed podium seats, Explorers board with the shared busy dots, own-position bar). It appears only after
   250 ms (hub-panels.ts clears `is-pending`), so a quick answer never flashes it; then it fades in and the
   silhouettes breathe softly (both still under reduced motion). */
.rank-loading{display:contents}
.rank-loading>*{transition:opacity .22s ease-out}
.rank-loading.is-pending>*{visibility:hidden;opacity:0}
.rank-podium.is-loading .rank-seat-silhouette{animation:rank-loading-breathe 1.6s ease-in-out infinite alternate}
.rank-podium.is-loading .place-1 .rank-seat-silhouette{animation-delay:-.5s}.rank-podium.is-loading .place-3 .rank-seat-silhouette{animation-delay:-1s}
@keyframes rank-loading-breathe{from{opacity:.22}to{opacity:.42}}
.rank-board.is-loading .rank-list{grid-auto-rows:auto;place-content:center;place-items:center;overflow:hidden;background:none}
.rank-board.is-loading .inline-loader{color:#e9cf9c}
.rank-mine.is-loading{min-height:54px;opacity:.6}
@media(prefers-reduced-motion:reduce){.rank-loading>*{transition:none}.rank-podium.is-loading .rank-seat-silhouette{animation:none}}
.rank-status.is-error{align-items:center;gap:8px}
.rank-status-art{display:grid;place-items:center;width:72px;height:72px;border:2px solid #a98a60;border-radius:50%;background:#2c2734}
.rank-status-art>.ui-icon{width:40px;height:40px;filter:saturate(.4);opacity:.85}
#online .rank-status.is-error .secondary{min-width:180px;margin:6px 0 0}
/* #101: the (?) sheet as icon rows. */
#modal .ranking-help-rows{display:grid;gap:8px;margin-top:8px}
#modal .ranking-help-row{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;text-align:left}
#modal .ranking-help-icon{display:grid;place-items:center;width:30px;height:30px}
#modal .ranking-help-icon>:is(img,.ui-icon){width:26px;height:26px;object-fit:contain}
#modal .ranking-help-row p{margin:0;font-size:14px;line-height:1.3}
#modal .ranking-help-row p>b{display:block;font:16px/1.15 Lucky;color:#5a3d2a}
.rank-detail{text-align:center}.rank-detail h1{overflow-wrap:anywhere;font-size:26px}.rank-detail p{font-size:13px}.rank-detail h2 small{font:12px system-ui}
/* Owner 2026-11-21: the preview still is 480x420 so the Equipment-size blade fits without shrinking the hero. */
.rank-detail .rank-character{height:176px;width:204px;margin:0 auto}
.rank-npc{display:inline-block;font:800 8px/1.15 system-ui;letter-spacing:.5px;border:1px solid #c8c0a5;border-radius:4px;padding:1px 4px;color:var(--cream-300);background:#3c3843;vertical-align:middle;margin-left:4px}
.rank-pedestal .rank-npc{margin:0}.rank-winner-name{line-height:1.15}
@media(max-height:800px){.rank-podium{min-height:129px;max-height:155px;padding-bottom:12px;margin-bottom:3px}.rank-character{height:76px;flex-basis:76px}.rank-pedestal{height:54px}.place-1 .rank-pedestal{height:66px}.place-3 .rank-pedestal{height:48px}#rank-content{gap:5px}.rank-list{grid-auto-rows:44px}.rank-winner strong{font-size:18px}.rank-heading{min-height:38px}.rank-heading h1{font-size:27px}}

/* Reserve a real gap before the energy plus, even for compact large balances. */
#online #profile .energy-pill{flex:0 0 81px;width:81px;grid-template-columns:13px minmax(0,1fr) 12px;column-gap:5px;padding:0 9px}
#online #profile .energy-pill img{width:13px;height:17px}
#online #profile .energy-pill .energy-plus{width:12px;height:12px;min-width:12px;font-size:11px;border-radius:3px}
#online #profile .energy-pill .energy-value{font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap;font-size:10px}
#online #profile .profile-card{flex-basis:128px;width:128px}
#online #profile .gem-pill{flex-basis:52px;width:52px;padding-inline:4px;gap:2px;justify-content:center}
#online #profile .gem-pill img{width:12px;height:16px}
#online #profile .energy-pill .energy-value,#online #profile .gem-pill b,#online #profile .coin-pill b{font:800 10px/1 system-ui;font-variant-numeric:tabular-nums}
#online #profile .coin-pill{flex-basis:55px;width:55px;min-width:55px;max-width:55px}
/* G19 (build 21): larger Energy/Gems/Gold pills on wider phones. Mini/SE (375)
   keeps the sizes above; 390+ grows them a step and 420+ (Pro Max, 430) about
   25%, still clear of the 128px profile card and the Settings gear. */
@media(min-width:390px){
 #online #profile .energy-pill{flex:0 0 88px;width:88px;grid-template-columns:15px minmax(0,1fr) 15px;padding:0 8px}
 #online #profile .energy-pill:before{inset:8px 0;border-radius:14px}
 #online #profile .energy-pill img{width:15px;height:20px}
 #online #profile .energy-pill .energy-plus{width:15px;height:15px;min-width:15px;font-size:13px;border-radius:4px}
 #online #profile .gem-pill{flex-basis:56px;width:56px;height:28px;margin-top:8px;border-radius:14px}
 #online #profile .gem-pill img{width:14px;height:19px}
 #online #profile .coin-pill{flex-basis:60px;width:60px;min-width:60px;max-width:60px;height:28px;margin-top:8px}
 #online #profile .coin-pill img{width:21px;height:24px}
 #online #profile .energy-pill .energy-value,#online #profile .gem-pill b,#online #profile .coin-pill b{font-size:12px}
}
@media(min-width:420px){
 #online #profile .energy-pill{flex:0 0 98px;width:98px;grid-template-columns:18px minmax(0,1fr) 18px;padding:0 8px}
 #online #profile .energy-pill:before{inset:7px 0;border-radius:15px}
 #online #profile .energy-pill img{width:18px;height:25px}
 #online #profile .energy-pill .energy-plus{width:18px;height:18px;min-width:18px;font-size:16px;border-radius:5px}
 #online #profile .gem-pill{flex-basis:64px;width:64px;height:30px;margin-top:7px;border-radius:15px;gap:3px}
 #online #profile .gem-pill img{width:17px;height:23px}
 #online #profile .coin-pill{flex-basis:72px;width:72px;min-width:72px;max-width:72px;height:30px;margin-top:7px}
 #online #profile .coin-pill img{width:24px;height:27px}
 #online #profile .energy-pill .energy-value,#online #profile .gem-pill b,#online #profile .coin-pill b{font-size:14px}
}
.eq-scene-slots button{justify-content:center}
.eq-scene-slots button img{width:34px;height:40px;max-width:100%;object-fit:contain}
.wardrobe-picker{text-align:center}
.wardrobe-picker>img{width:112px;height:112px;object-fit:contain;margin:10px auto}
.wardrobe-picker h2{font-size:19px}.wardrobe-picker p{font-size:12px}
.wardrobe-picker button{margin-inline:auto}
.equipment-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
#modal .equipment-actions>.secondary{width:100%;min-width:0;min-height:44px;margin:0}
/* Visual polish v1: when a sheet's other action is gone (e.g. a maxed Upgrade), the lone parchment action spans
   the footer instead of sitting half-width at the left. */
#modal .equipment-actions>.secondary:only-child{grid-column:1/-1}
#modal:has(.first-weapon){max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px);overflow:hidden;padding:16px}
.first-weapon{text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
#modal .first-weapon h1,#modal .first-weapon h2,#modal .first-weapon p{margin:0}
#modal .first-weapon h2{font-size:23px}
#modal .first-weapon p{font-size:14px;line-height:1.45;max-width:360px;text-align:left}
.first-weapon-display{display:grid;place-items:center;width:120px;height:136px;border:2px solid #bf9b60;border-radius:20px;background:radial-gradient(ellipse,var(--cream-200),#efd399);box-shadow:inset 0 2px var(--card-face),0 3px #bd975533}
.first-weapon-display img{display:block;width:80px;height:112px;object-fit:contain;transform:rotate(12deg)}
#modal:has(.first-weapon) .equipment-actions{margin-top:14px;gap:10px}
#modal:has(.first-weapon) .equipment-actions>button{display:flex;align-items:center;justify-content:center;min-height:var(--tier-full-h);font-size:var(--tier-full-fs);line-height:1;padding:6px}
/* First-weapon film: portrait video in the dialog, own x Close and a full-tier Skip over it. */
#modal.cutscene-modal{--cutscene-h:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px);width:min(94vw,calc(var(--cutscene-h)*720/1260));max-width:none;max-height:var(--cutscene-h);padding:0;gap:0;border:3px solid #c4a268;border-radius:24px;background:#10151c;overflow:hidden}
.weapon-cutscene{display:block;margin:0;line-height:0}
.weapon-cutscene-video{display:block;width:100%;height:auto;max-height:calc(var(--cutscene-h) - 6px);aspect-ratio:720/1260;object-fit:contain;background:#10151c}
/* AC857 / AC862 (build 198): the film's last frame, held while the waiting command draws the next screen. */
#modal.cutscene-modal:has(.weapon-cutscene-still)>.equipment-actions:empty{display:none}
#modal.cutscene-modal:has(.weapon-cutscene-still) [data-action="dismiss"]{display:none}
/* AC865: under the level-up moment a spent stop's choice buttons are gone (a tap skips the moment, never picks). */
#online.level-up-moment #content button:not(.story-journal button,#stats button,#skill-belt button){visibility:hidden;pointer-events:none}
.intro-portal-fade{position:fixed;inset:0;z-index:2147483000;pointer-events:none;background:radial-gradient(circle at 55% 50%,#b2f790 0%,#47c25a 48%,#24a544 100%);animation:intro-portal-fade .9s ease-out forwards}
.intro-portal-fade.is-waiting{display:grid;grid-template-rows:1fr auto 1fr;row-gap:12px;place-items:center;z-index:calc(var(--z-status) - 1);animation:none;pointer-events:auto}
.intro-portal-fade.is-waiting .training-progress{grid-row:2;position:relative;width:min(240px,calc(100% - 32px));margin:0}
.intro-portal-fade.is-waiting .retry-action{grid-row:3;align-self:start}
.intro-portal-fade.is-waiting .inline-loader{position:absolute;inset:0;color:var(--cream-300);--busy-dot:6px}
.intro-portal-fade.is-waiting [hidden]{display:none}
@keyframes intro-portal-fade{0%,35%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){.intro-portal-fade{display:none}}
#modal.cutscene-modal>.receipt-dismiss{position:absolute;top:6px;right:6px;width:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:22px;background:#0b0f1466;box-shadow:none;color:#fff;font:30px/1 system-ui;text-shadow:none;-webkit-text-stroke:0}
#modal.cutscene-modal>.receipt-dismiss::before,#modal.cutscene-modal>.receipt-dismiss::after{display:none}
#modal.cutscene-modal>[data-action=cutscene-skip]{position:absolute;left:0;right:0;bottom:14px;width:fit-content;min-width:132px;min-height:var(--tier-full-h);margin:0 auto;padding:6px 26px;font-size:var(--tier-full-fs);line-height:1}
@media(max-height:730px){.first-weapon{gap:8px}.first-weapon-display{height:102px;width:102px}.first-weapon-display img{height:86px;width:68px}#modal .first-weapon p{font-size:13px}}

/* Labeled actions are not utility chips. Match the visible face, not just the
   invisible touch region; preserve the shared press-to-shrink interaction. */
#online .skill-draft-actions>button.secondary,
#modal .equipment-actions>button.secondary,
#modal .event-lock-popover>button.secondary,
#modal>button.secondary[data-action=dismiss]{
 display:flex;align-items:center;justify-content:center;flex-shrink:0;
 min-height:56px;padding:8px 12px;font:24px/1.1 Lucky,sans-serif;--face-lip:4px;
}
#online .skill-draft-actions>button.secondary:before,
#modal .equipment-actions>button.secondary:before,
#modal .event-lock-popover>button.secondary:before,
#modal>button.secondary[data-action=dismiss]:before{
 inset:0;border-radius:17px;
 box-shadow:inset 0 3px var(--small-shine),inset 0 calc(-1 * var(--face-lip)) var(--small-lip),0 4px var(--small-edge);
}
/* AC492 (build 111 feedback, owner: "Tu brakuje przyklejonego claim all"): the one sticky Claim all
   of reward lists (barClaimAllButton), shown only while something is claimable. On a bottom bar it
   fills the space opposite Back exactly like the Perks Claim all (honey, full 56px/24px tier); in a
   reward dialog it sits above Close with the dialog footer's face.
   AC770 (build 170, owner: "Zazwyczaj claim jest mniej więcej szerokości tekstu"): like every other Claim, it
   hugs its label (24px of face either side, never under --claim-hug-min); only a label too long for the slot
   reaches the slot's width. Height and type stay on the full 56px/24px tier.
   AC844 (build 194, owner: "Ten button z odbiorem to chyba do prawej powinien być"): in the bottom bar it sits at
   the right edge, opposite Back (the action is always on the right); in a dialog it stays centred above Close. */
#tabs.has-bar-claim-all{display:grid!important;grid-template-columns:84px minmax(0,1fr);align-items:center}
#tabs.has-bar-claim-all .bar-claim-all{justify-self:end;width:auto;min-width:min(var(--claim-hug-min),100%);max-width:100%;min-height:var(--tier-full-h);margin:0;padding:6px 24px;font-size:var(--tier-full-fs);white-space:nowrap}
:is(#tabs,#modal) .bar-claim-all:not(:disabled){--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
#modal>button.bar-claim-all{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;width:auto;min-width:min(var(--claim-hug-min),100%);max-width:100%;min-height:56px;margin:4px auto 0;padding:8px 24px;font:24px/1.1 Lucky,sans-serif;white-space:nowrap;--face-lip:4px}
#modal>button.bar-claim-all:before{inset:0;border-radius:17px;box-shadow:inset 0 3px var(--small-shine),inset 0 calc(-1 * var(--face-lip)) var(--small-lip),0 4px var(--small-edge)}

/* Arena owns a fixed portrait shell. Only standings and history may scroll. */
#online.arena-view{background:linear-gradient(180deg,#201b2bae 0%,#221b2abb 42%,#1d1927e8 100%),url('/assets/parallax/chapters/arena-coliseum-v1.png') center 42% / cover no-repeat;color:var(--cream-300)}
#online.arena-view #content{display:flex;flex-direction:column;flex:1;min-height:0;gap:9px;padding:10px 12px;overflow:hidden}
.arena-heading{display:flex;align-items:center;gap:8px;flex:none;min-height:68px}
.arena-emblem{display:block;width:48px;height:54px;flex:none}
.arena-heading>div{flex:1;min-width:0;display:grid;gap:3px}
.arena-heading h1{font:26px/1.05 Lucky;margin:0;color:var(--cream-300)}
.arena-heading b{font-size:15px}.arena-heading small{font-size:11px;color:#dac7ab}
/* T15 (build 29): the player's own Combat Power shares the points line. */
.arena-heading-line{display:flex;align-items:center;flex-wrap:wrap;column-gap:10px;row-gap:2px;min-width:0}
.arena-heading .arena-own-power{padding:2px 8px 2px 5px;border:1px solid #a78862;border-radius:10px;background:#28222dc9;color:var(--cream-300);font:700 14px/1.1 system-ui}
.arena-heading .arena-own-power b{font-size:14px}
.arena-heading .arena-own-power img{width:18px;height:18px}
.arena-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:none}
#online .arena-tabs .secondary{margin:0;min-width:0;padding:7px 3px}
.arena-lobby,.arena-board,.arena-leagues,.arena-result{display:flex;flex-direction:column;flex:1;min-height:0;gap:9px}
.arena-attempts{display:flex;gap:7px;align-items:center;justify-content:space-between;flex:none;font-size:12px;padding:9px;border:1px solid #a78862;border-radius:var(--vs-radius);background:#28222dc9}
.arena-attempts>span:last-child{display:flex;gap:4px;align-items:center;font-weight:800}
.arena-attempts img{width:20px;height:23px;object-fit:contain}
.arena-opponents{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center;gap:12px}
.arena-opponent{flex:0 1 120px;min-height:86px;display:flex;align-items:center;gap:5px;width:100%;padding:7px 9px;text-align:left;border:3px solid #3f302e;border-radius:18px;background:linear-gradient(var(--cream-250),#efd5a6);box-shadow:inset 0 2px var(--card-face),0 4px #a38460;color:#332b31;text-shadow:none;-webkit-text-stroke:0;transition:transform .12s}
.arena-opponent:active{transform:scale(.92)}
.arena-avatar{display:block;width:70px;height:87px;flex:none;overflow:hidden}
.arena-rival{display:flex;flex:1;min-width:0;flex-direction:column;gap:6px}
.arena-rival>b{font:22px/1.05 Lucky;overflow-wrap:anywhere}
.arena-rival>small{font-size:12px;font-weight:700;color:#7b5946}
.arena-stats{display:flex;align-items:center;gap:9px;font:700 13px/1.1 system-ui}
.arena-stats>span{display:flex;gap:2px;align-items:center;white-space:nowrap}
.arena-stats img{width:19px;height:20px;object-fit:contain}
.arena-challenge-mark img{width:28px;height:34px;object-fit:contain}
.arena-entry-cost{display:flex;flex-direction:column;gap:4px;align-items:center;padding:8px;flex:none;background:#201d2880;border-radius:var(--vs-radius)}
.arena-entry-cost strong{font:23px/1.1 Lucky}.arena-entry-cost small{font-size:12px}
.arena-status{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:15px}
.arena-status h2{font:25px/1.1 Lucky;margin:0}.arena-status p{font-size:14px;margin:0;line-height:1.35}
#online.arena-view #tabs{display:grid!important;grid-template-columns:54px minmax(0,1fr) minmax(0,1fr);align-items:center;gap:9px;flex:none}
#online.arena-view #tabs .secondary,.arena-paired .secondary{min-width:0;min-height:var(--tier-full-h);margin:0;padding:8px;font-size:var(--tier-full-fs);line-height:1.1}
#online.arena-view #tabs .secondary:before,.arena-paired .secondary:before{inset:0;border-radius:15px}
.arena-scroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;border:2px solid #92745a;border-radius:13px;background:#231e2990;scrollbar-width:thin;scrollbar-color:#b89771 var(--ink-plum)}
.arena-rank{display:grid;grid-template-columns:27px 32px minmax(0,1fr) 50px;align-items:center;gap:7px;min-height:58px;padding:6px 9px;border-bottom:1px solid #ae967544}
.arena-rank .arena-emblem{width:30px;height:35px}.arena-rank>span{display:grid;align-content:center;gap:1px;min-width:0;line-height:1.2}.arena-rank>span>b{font-size:14px;overflow-wrap:anywhere}.arena-rank small{font-size:11px;color:#d7c9b8}
.arena-rank.is-you,.arena-league-row.is-you{background:#9e78494a;box-shadow:inset 3px 0 #f0cc73}
.arena-own{text-align:center;font-size:14px;padding:10px 5px;flex:none}
.arena-board h2{font:24px/1 Lucky;margin:0}
.arena-history-row{display:grid;grid-template-columns:1fr 45px 65px;gap:8px;align-items:center;padding:13px;border-bottom:1px solid #ae967544;font-size:15px}
.arena-history-row>span:last-child{display:flex;align-items:center;gap:4px}.arena-history-row img{width:22px;height:22px;object-fit:contain}
.arena-leagues{gap:6px}.arena-leagues p{margin:0;text-align:center;font-size:12px}
.arena-league-list{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:space-evenly;border:2px solid #92745a;border-radius:13px;background:#231e2990}
.arena-league-row{display:grid;grid-template-columns:33px minmax(0,1fr) 83px;align-items:center;gap:8px;padding:3px 9px;min-height:38px}
.arena-league-row .arena-emblem{width:30px;height:32px}.arena-league-row>span{display:grid;gap:1px}.arena-league-row b{font-size:14px}.arena-league-row small{font-size:10px;color:#ddcbb6}
.arena-leagues>small{text-align:center;font-size:12px;flex:none}
.arena-claim{display:flex;align-items:center;gap:10px;flex:none;padding:8px 8px 8px 12px;background:#493728;border-radius:var(--vs-radius)}
.arena-claim>span{display:grid;gap:3px;flex:1;font-size:13px}.arena-claim .secondary{min-width:0;min-height:56px;margin:0;font-size:24px}
.arena-result{align-items:center;justify-content:center;gap:12px}.arena-result>span{font-size:12px;color:#d9c3a4}.arena-result h2{font:38px/1 Lucky;margin:0;color:#ffe7a0}
.arena-result-actors{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:15px}
.arena-result-actors>div{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;font-size:14px}
.arena-result-actors b{max-width:100%;overflow-wrap:anywhere;text-align:center}
.arena-result-actors .arena-avatar{width:90px;height:120px}.arena-score-delta{font-size:18px}
.arena-prize{display:flex;align-items:center;justify-content:center;gap:8px;font-size:20px}.arena-prize>span{display:flex;align-items:center;gap:4px;padding:7px;border:2px solid #b69868;border-radius:var(--vs-radius);background:var(--cream-350)}
.arena-prize img{width:28px;height:30px;object-fit:contain}.arena-paired{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:9px;margin-top:3px}
/* The inline draw result stacks the same pair as the result modal (T09/AB18):
   Choose rival or Back to Arena on top, Replay below. */
.arena-paired.is-single{grid-template-columns:1fr}
#online .arena-paired>.primary{width:100%;min-height:var(--tier-full-h);margin:0;font-size:var(--tier-full-fs)}
#online .arena-paired .secondary,#online .arena-claim .secondary,#online .arena-board>.secondary,#online .arena-status .secondary{min-height:var(--tier-full-h);margin:0;padding:8px 10px;font-size:var(--tier-full-fs)}
#online .arena-paired .secondary::before,#online .arena-claim .secondary::before,#online .arena-board>.secondary::before,#online .arena-status .secondary::before{inset:0}
.arena-confirm,.arena-receipt{text-align:center}.arena-confirm .arena-avatar{width:90px;height:115px;margin:auto}.arena-confirm .arena-stats{justify-content:center;margin:10px 0}.arena-confirm h2{margin:5px 0;font:26px Lucky}.arena-confirm p{font-size:16px;line-height:1.35}.arena-confirm small{display:block;font-size:12px;line-height:1.3;margin-bottom:10px}
.arena-receipt .arena-emblem{width:70px;height:80px;margin:12px auto}.arena-receipt .arena-prize{margin-bottom:15px}
#modal .arena-help p{font-size:14px;line-height:1.35;margin:10px 0}
/* Build 30: the Arena rules gained sudden death and the round cap; the centred sheet
   must clear the 59px safe top at 393x752 (pl), so the tighter text starts at 760px. */
@media(max-height:760px){#modal :is(.arena-help,.gemstone-help) p{font-size:13px;line-height:1.3;margin:8px 0}}
/* Linux/Noto pl wraps about two lines more: tighter Arena rule lines keep the sheet inside
   Mini's asymmetric safe area and Compact's max height without a nested scroll. */
#modal .arena-help p{line-height:1.3}
@media(max-height:760px){#modal .arena-help p{line-height:1.22;margin:5px 0}}
#online.arena-playing{padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px))}
/* Visual polish (bugs lane): during the replay the stage canvas starts under the safe area; the strip above it showed
   a second, darker crop of the coliseum (the Arena screen backdrop) with a hard seam. The replay keeps one painted
   arena (the canvas) and the strip is the plain run ground, as above the Story stage. */
#online.arena-view.arena-playing{background:#2b2b36}
#online.arena-playing #tabs,#online.arena-playing #content{display:none!important}
#online.arena-playing #stage{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}
#online.arena-playing #world{width:100%;height:0;flex:1;min-height:0}
#online.arena-playing #story-overlay{inset:0}
/* Q05: the replay shows only Skip (no speed) in the standard bottom-right playback corner. */
#online.arena-playing #playback{bottom:6px;right:8px}
/* b205 AC875 / AC877b (owner, build 205: "inspirując się topowymi grami walki 1 vs 1 np. Tekken"): the duel HUD of the
   Arena replay and the Mountain fight (story-ui.ts duelHudMarkup / duelHudUpdate). Two long slanted HP bars meet a
   centre round crest; health stays next to the crest, so a bar empties from its outer end. Portrait chips sit in the
   outer corners, names (one line, ellipsis) over the bars, the HP number small under them. Green fill, amber below
   60%, red at 30% or less; the pale trail holds the old length for 350ms, then shrinks over 400ms. Lettering takes the
   outline only (AC816). Reduced motion: no transitions. */
.duel-hud{--duel-ink:#1b1220;--duel-crest:56px;--duel-bar:18px;--duel-chip:42px;--duel-slant:12px;--duel-tuck:10px;position:absolute;z-index:3;top:6px;left:6px;right:6px;display:grid;grid-template-columns:minmax(0,1fr) var(--duel-crest) minmax(0,1fr);align-items:start;pointer-events:none;color:var(--cream-300)}
.duel-hud:before{content:'';position:absolute;z-index:-1;left:-6px;right:-6px;top:-12px;height:calc(100% + 30px);background:linear-gradient(#140d1ab8 0%,#140d1a80 55%,#140d1a00);pointer-events:none}
.duel-hud.has-tag{top:27px}
/* The Mountain hall is dark already; a scrim there would print a seam at the stage top (the #world-top-edge band). */
.tower-view .duel-hud:before{display:none}
.duel-side{position:relative;display:grid;grid-template-columns:var(--duel-chip) minmax(0,1fr);grid-template-rows:20px var(--duel-bar) 16px;column-gap:5px;row-gap:3px;min-width:0}
.duel-side.is-right{grid-template-columns:minmax(0,1fr) var(--duel-chip)}
.duel-portrait{grid-row:1/3;grid-column:1;align-self:end;position:relative;z-index:1;box-sizing:border-box;display:grid;place-items:center;width:var(--duel-chip);height:var(--duel-chip);border:2px solid var(--duel-ink);border-radius:9px;background:radial-gradient(circle at 50% 38%,var(--paper,#fff6e2) 0%,#f0d7ae 62%,#cfa877 100%);box-shadow:0 0 0 2px #d8b06a,0 3px 0 2px #120b16;overflow:hidden}
.duel-side.is-right .duel-portrait{grid-column:2}
.duel-portrait>img{width:100%;height:100%;object-fit:cover}
.duel-portrait>svg{width:92%;height:92%}
.duel-portrait .avatar-framed{position:relative;display:block;width:100%;height:100%;background:none}
.duel-portrait .avatar-framed>img{position:absolute;display:block;margin:0;padding:0;border:0;box-shadow:none;background:none}
.duel-portrait .avatar-portrait{inset:var(--avatar-inset);width:calc(100% - 2 * var(--avatar-inset));height:calc(100% - 2 * var(--avatar-inset));object-fit:cover}
.duel-portrait .avatar-framed.is-default .avatar-portrait{object-fit:contain;object-position:50% 85%}
.duel-portrait .avatar-frame{inset:0;width:100%;height:100%}
/* The duel chip's own 9px rounded clip cut the frame's corners; a framed chip takes the frame's shape instead. */
.duel-portrait:has(>.avatar-framed){border:0;border-radius:7%;background:none;overflow:visible;box-shadow:0 3px 0 #120b16}
.duel-name{grid-row:1;grid-column:2;display:flex;align-items:center;gap:4px;min-width:0;font:17px/20px Lucky;letter-spacing:.3px;white-space:nowrap}
.duel-side.is-left .duel-name{padding-right:4px}
.duel-side.is-right .duel-name{grid-column:1;justify-content:flex-end;padding-left:4px}
.duel-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;padding:0 2px;color:#fff3d8;-webkit-text-stroke:4px var(--duel-ink);paint-order:stroke fill}
.duel-name .arena-npc{flex:none}
.duel-bar{grid-row:2;grid-column:2;position:relative;display:block;margin-right:calc(0px - var(--duel-tuck));padding:2px calc(var(--duel-tuck) + 1px) 2px 2px;background:linear-gradient(#f6dc9c,#c49a55 55%,#7d5428);clip-path:polygon(var(--duel-slant) 0,100% 0,100% 100%,0 100%)}
.duel-side.is-right .duel-bar{grid-column:1;margin:0 0 0 calc(0px - var(--duel-tuck));padding:2px 2px 2px calc(var(--duel-tuck) + 1px);clip-path:polygon(0 0,calc(100% - var(--duel-slant)) 0,100% 100%,0 100%)}
.duel-track{position:relative;display:block;height:100%;background:linear-gradient(#0d0810,#2c2132);clip-path:polygon(calc(var(--duel-slant) - 1px) 0,100% 0,100% 100%,0 100%);overflow:hidden}
.duel-side.is-right .duel-track{clip-path:polygon(0 0,calc(100% - var(--duel-slant) + 1px) 0,100% 100%,0 100%)}
.duel-fill,.duel-trail{position:absolute;inset:0;transform-origin:right center}
.duel-side.is-right :is(.duel-fill,.duel-trail){transform-origin:left center}
.duel-trail{background:linear-gradient(#fffaf0,#ffe1b8);transition:transform .4s cubic-bezier(.4,0,.8,.6) .35s}
.duel-fill{transition:transform .08s linear}
.duel-fill:after{content:'';position:absolute;left:0;right:0;top:2px;height:4px;background:#ffffff5c}
.duel-fill.is-high{background:linear-gradient(#bff58e,#5ccc4c 48%,#2b8f39)}
.duel-fill.is-mid{background:linear-gradient(#ffe39a,#f2a93a 48%,#c26d17)}
.duel-fill.is-low{background:linear-gradient(#ffaaa0,#ea4553 48%,#a3203a)}
.duel-trail.is-reset,.duel-hud.is-reduced :is(.duel-fill,.duel-trail){transition:none}
@media(prefers-reduced-motion:reduce){.duel-hud :is(.duel-fill,.duel-trail){transition:none}}
.duel-foot{grid-row:3;grid-column:2;display:flex;align-items:center;gap:7px;min-width:0;padding:0 2px}
.duel-side.is-right .duel-foot{grid-column:1;flex-direction:row-reverse}
.duel-hp{font:800 13px/16px system-ui;font-variant-numeric:tabular-nums;color:#fff3d8;-webkit-text-stroke:3px var(--duel-ink);paint-order:stroke fill}
.duel-pips{display:flex;gap:5px;padding:0 2px}.duel-pips[hidden]{display:none}
.duel-pips i{width:8px;height:8px;rotate:45deg;border:2px solid var(--duel-ink);background:#5a4a5f}
.duel-pips i.is-left{background:linear-gradient(#ffe3a0,#e3902f)}
.duel-centre{position:relative;z-index:2;display:grid;justify-items:center}
.duel-tag{position:absolute;bottom:calc(100% + 3px);left:50%;translate:-50% 0;padding:2px 10px 3px;border:1px solid #c79d5c;border-radius:9px;background:#1b1220d9;color:#f3d79c;font:800 9px/12px system-ui;letter-spacing:1.6px;text-transform:uppercase;white-space:nowrap}
.duel-crest{position:relative;box-sizing:border-box;display:grid;justify-items:center;align-content:start;width:var(--duel-crest);height:64px;padding-top:5px;background:linear-gradient(#ffe6a6,#c8984f 55%,#7a5023);clip-path:polygon(18% 0,82% 0,100% 15%,100% 72%,50% 100%,0 72%,0 15%);filter:drop-shadow(0 3px 0 #120b16)}
.duel-crest:before{content:'';position:absolute;inset:3px;z-index:0;background:radial-gradient(circle at 50% 30%,#4d3a55,#24182b 70%);clip-path:polygon(18% 0,82% 0,100% 15%,100% 72%,50% 100%,0 72%,0 15%)}
.duel-crest>*{position:relative;z-index:1}
.duel-round{display:block;font:27px/27px Lucky;color:#ffe7a8;-webkit-text-stroke:3px var(--duel-ink);paint-order:stroke fill;font-variant-numeric:tabular-nums}
.duel-word{display:block;margin-top:1px;font:800 7.5px/9px system-ui;letter-spacing:1px;color:#e7c88a;white-space:nowrap}
.duel-limit{display:block;font:800 10px/12px system-ui;color:#cbb59a;font-variant-numeric:tabular-nums}
@media(max-width:380px){.duel-hud{--duel-chip:38px;--duel-crest:52px}.duel-name{font-size:15px}}
@media(max-height:730px){#online.arena-view #content{gap:6px;padding:6px 10px}.arena-heading{min-height:62px}.arena-heading h1{font-size:24px}.arena-lobby{gap:6px}.arena-opponents{gap:9px}.arena-opponent{flex-basis:100px}.arena-opponent .arena-avatar{height:68px;width:55px}.arena-result{gap:8px}.arena-result-actors .arena-avatar{height:90px;width:70px}}

/* iPhone feedback pass: one optical baseline and a real pointer press state. */
#online button>.button-label,#modal button>.button-label,#error button>.button-label{display:block;position:relative;pointer-events:none}
/* Legacy Chromium HTML paint-order: a decorative fill over the existing stroke, never shadow copies.
   Empty alternate text keeps generated lettering out of the accessible button name (Chromium 77+). */
:is(.button-label,.ui-icon-copy)[data-text-fill]{position:relative}
:is(.button-label,.ui-icon-copy)[data-text-fill]::after{content:attr(data-text-fill) / "";position:absolute;inset:0;padding:inherit;text-box:inherit;overflow:inherit;text-overflow:inherit;pointer-events:none;-webkit-text-stroke:0;text-shadow:none}
/* AC25 (build 42, ASC AELoQQaoUeOH3bE2C4hksBc): one price-button rule. A button
   that stacks its label over a currency price (Buy / 30 Gems, Upgrade / Cores,
   Draw / Gems, Refresh / Gems) reads as one tight group: no optical label lift,
   a line-height of 1, the price pulled up under the label (over the label's empty
   descender space) and the currency icon
   4px from its amount (AC53, build 43: 1px glued the icon to the number).
   Screen styles keep sizes and colours, never these gaps. */
#online button>.button-label:has(+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)),
#modal button>.button-label:has(+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)){transform:none;line-height:1}
#online button>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost),
#modal button>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost){gap:4px;margin-top:7px;line-height:1}
#online button:has(>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)),
#modal button:has(>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)){row-gap:0}
/* AC53 reopened (build 49, ASC AGeAS6KFoRu69LNoFM907J0): 4px still read as glued on
   device ("Enhance 60"). Every price inside a button (Enhance, Merge, draws, Store,
   Exchange, Upgrade, Travel, Energy, Founder) keeps its currency icon 6px from the
   amount; screen styles may not narrow it. Gate: priceGapIssues in
   backend/tests/layout-gate.mjs (min 5px), backend/tests/price-gap-audit.mjs.
   AC53 reopened again (build 52, ASC ACMv-BK810dB809JxnVPQ2g, AFY1GhHa5HFyOIzkRr-n9iQ):
   "Again 20" and "Enhance 60" still read as too close on device. The icon now sits
   9px from its amount, and a price under its label starts 7px below the label's
   line box, so even a descender (Again, Upgrade, Spin) keeps >= 4px of visible
   space above the price; gate: priceGapIssues icon 8-12px, label 4-12px.
   Build 53: the icon sits 8px from its amount (owner: about 8px); gate 7-10px. */
:is(#online,#modal) button :is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.arena-entry-cost,.gemstone-price,.button-cost,.energy-purchase-price,.founder-offer-price,.founder-price-line,.moonleaf-exchange-cost,.store-pack-price,.travel-start-cost,.weapon-copy-price,.weapon-level-price,.drone-perk-state){column-gap:7px!important}
/* Build 53: measured on the icons' opaque pixels, ~8px everywhere: icons with a
   wide transparent margin (Bamboo, festival ticket, Scout Core) sit closer. */
:is(#online,#modal) .exchange-price>.button-label{column-gap:6px!important}
:is(#online,#modal) button :is(.moonleaf-cost,.drone-perk-state){column-gap:5px!important}
/* AC53 reopened again (build 53, ASC ADIeEZACgFoFognnu3yiJQg): the 7px drop pushed
   the price chip ("Enhance 60") below the button FACE onto its dark lip and ledge.
   The face is the ::before plate minus its 3px border and the 3px bottom lip, so it
   is 3px deeper at the bottom than at the top, and the label's letters start ~2px
   into their line box while a chip fills its box. A label-over-price button
   therefore pads 5px more at the bottom than at the top: the label and the price
   sit centred inside the face with even space above and below, and a button grows
   (never clips) when its min-height cannot hold both. AC631 (b131) supersedes the
   5px bottom pad: the same total is split evenly (8.5px a side, a screen's own
   --price-face-pad keeps its old total: Scout and Reroll 9px, Fishing Buy 7.5px,
   Moonleaf ticket shop 7px, Chest results 6px) and the whole group moves up half the
   lip (--face-shift, end of file); --price-face-lift is gone.
   Icon to amount: about 8px of visible space (owner).
   Gate: priceGapIssues 'face' rows (PRICE_FACE) in backend/tests/layout-gate.mjs. */
#online button:has(>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)),
#modal button:has(>.button-label+:is(.moonleaf-cost,.drone-cost,.form-cost,.arena-button-cost,.gemstone-price,.exchange-cost)){justify-content:center;padding-top:calc(var(--price-face-pad,8.5px) + var(--price-face-cjk,0px) + var(--price-face-grow,0px))!important;padding-bottom:calc(var(--price-face-pad,8.5px) - var(--price-face-cjk,0px) + var(--price-face-grow,0px))!important}
/* CJK labels fill their em box, so their ink starts higher and ends lower than
   Latin letters: the group sits 2.5px lower and gets 1.5px more face on each side
   (build 53 audit, ja/ko/zh-Hans). */
:is(:lang(ja),:lang(ko),:lang(zh-Hans),:lang(zh-Hant)) :is(#online,#modal) button{--price-face-cjk:2.5px;--price-face-grow:1.5px}
/* A price drawn as a filled chip (chest Draw buttons) sits flush under the label, never over its descenders. */
:is(#online,#modal) .chest-buy>.button-label+.gemstone-price{margin-top:7px}
#online button:not(.primary):not(:disabled).is-pressed,#modal button:not(.primary):not(:disabled).is-pressed,#error button:not(:disabled).is-pressed{scale:.94}
#online button.primary:not(:disabled).is-pressed,#modal button.primary:not(:disabled).is-pressed{transform:translateY(var(--press-depth,6px));box-shadow:var(--button-shadow-down,inset 0 2px #fff6d580);scale:1}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #b67939;outline-offset:2px}
:root:not([data-input-modality=keyboard]) :is(#online,#modal,#error) :is(button,input[type=checkbox]):focus{outline:none}
/* AC482 (build 109): touch never paints a focus ring. After an app switch or a closed
   dialog WebKit gives the last tapped element :focus-visible again, and its UA ring
   framed the Home hero (a role=button span) and other non-button targets. While the
   input modality is pointer no focused element shows an outline, on any layer (#online,
   #modal, the ad and lock dialogs); text fields keep their editing outline. Keyboard
   focus (data-input-modality=keyboard) keeps every ring; VoiceOver draws its own cursor. */
:root:not([data-input-modality=keyboard]) :focus:not(input:not([type=checkbox],[type=radio],[type=range],[type=button],[type=submit],[type=reset]),textarea,[contenteditable]:not([contenteditable=false])){outline:none!important}
#modal .menu-grid{gap:10px}
#modal .menu-grid .secondary{display:flex;align-items:center;justify-content:center;min-height:var(--tier-full-h);margin:0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky}
#modal .menu-grid .secondary:before{inset:0}
#modal:has(.settings-panel){width:min(410px,calc(100vw - 28px));padding:16px}
.settings-panel>h1{margin:0 0 10px;font-size:30px}
/* Visual polish r2 #69/#104 (arena lane): utility sheet titles are centred like Journal, Outfit and Fast Travel. */
#modal :is(.settings-panel,.server-panel,.language-panel,.skill-book,.arena-help,.ranking-help)>h1{text-align:center}
.settings-panel>p{margin:0 0 14px;font:14px/1.4 system-ui}
#modal:has(.settings-panel)>button{margin-top:10px}
/* Settings language row and picker (owner request 2026-09-26): one dense button
   naming the current language in its own script, then a bounded five-row list. */
.settings-language{margin:10px 0 0;padding:6px 8px 8px;border:1px solid #bca578;border-radius:var(--vs-radius)}
.settings-language legend{font-size:12px;padding:0 5px}
#modal .settings-language .secondary{display:flex;align-items:center;justify-content:center;width:100%;margin:0;padding:6px 10px}
/* V15: Server (its code) and Language sit side by side as one labelled row. */
#modal .settings-rows{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:8px;margin:10px 0 0}
#modal .settings-rows>.settings-language{min-width:0;margin:0}
#modal .settings-rows legend{max-width:100%;white-space:nowrap;overflow:hidden}
.language-options{display:grid;gap:8px}
#modal .language-options .secondary{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--tier-dense-h);margin:0;padding:6px 10px;font-size:var(--tier-dense-fs)}
#modal .language-options .secondary:before{inset:0}
/* Visual polish r2 (meta #28): Lucky has no CJK glyphs, so the native names fell back to a regular-weight system face.
   Each CJK name uses that script's heaviest rounded/gothic system face (the AC589a stamp stacks) under the same outline. */
#modal .language-options .secondary:lang(ja){font-family:Lucky,"Hiragino Maru Gothic ProN","Hiragino Sans","Noto Sans JP",sans-serif;font-weight:800}
#modal .language-options .secondary:lang(zh){font-family:Lucky,"PingFang SC","Hiragino Sans GB","Noto Sans SC",sans-serif;font-weight:900}
#modal .language-options .secondary:lang(ko){font-family:Lucky,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;font-weight:800}
/* G22: realm picker rows reuse the language list; code, name and small tags on one line. */
#modal .server-options .secondary{gap:8px}
#modal .server-options .button-label b{font-weight:900}
#modal>button.secondary[data-action=realm-picker],#online .paper>button.secondary[data-action=realm-picker]{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--tier-full-h);margin:10px 0 0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky}
#modal>button.secondary[data-action=realm-picker]:before,#online .paper>button.secondary[data-action=realm-picker]:before{inset:0}
#modal .server-option-tag{flex:none;padding:2px 8px;border-radius:999px;background:rgba(44,51,79,.12);color:inherit;font-size:12px;font-weight:800;line-height:1.3}
/* AC88: Settings → Server is the switcher: the server rows (current one pressed, the
   shared honey face of .language-options), a one-line hint, the notice and the copyable code; switching confirms. */
.server-switcher>h1{margin-bottom:8px}
#modal .server-switcher .server-options{margin:0 0 6px}
#modal .server-option-tag.is-current{background:#2f7a3e;color:#fff}
/* AC99 (build 52, ASC ACdYCsn1h36Sf-gj9xDBFZw): the switcher is a clean list sheet,
   not a stack of plump honey buttons. One framed cream list; each server is a flat
   56px row (code, name, tags at the right, a chevron when it can be switched to),
   rows split by 1px hairlines (the list's own colour), the current one tinted (AC119: no gold edge). The rows stay
   real buttons (aria-pressed, Switch server? confirm). */
#modal .server-switcher .server-options{gap:1px;overflow:hidden;border:2px solid #c9ad7a;border-radius:14px;background:#e6d6b4}
#modal .server-switcher .server-options .secondary{justify-content:flex-start;gap:8px;min-height:56px;padding:8px 12px 8px 14px;border-radius:0;color:#2d3440;-webkit-text-stroke:0;text-shadow:none;font:800 16px/1.2 system-ui;text-align:left}
#modal .server-switcher .server-options .secondary:before,#modal .server-switcher .server-options button[aria-pressed=true]:before{inset:0;border:0;border-radius:0;background:var(--cream-50);box-shadow:none}
#modal .server-switcher .server-options button[aria-pressed=true]{color:#2d3440;-webkit-text-stroke-width:0}
/* AC119 reopened: one uniform current-row tint. Keep the row filled on press,
   without shrinking it inside the list's normal border and exposing side strips. */
#modal .server-switcher .server-options button[aria-pressed=true],
#modal .server-switcher .server-options button[aria-pressed=true]:is(:active,.is-pressed){background:var(--cream-350);transform:none;scale:1}
#modal .server-switcher .server-options button[aria-pressed=true]:before{background:var(--cream-350);box-shadow:none}
#modal .server-switcher .server-option-tag.is-current{display:inline-flex;align-items:center;gap:4px;padding:2px 9px 2px 7px}
#modal .server-switcher .server-option-tag.is-current:before{content:"\2713";font:900 12px/1 system-ui}
#modal .server-switcher .server-options .button-label{flex:1;min-width:0;transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#modal .server-switcher .server-options .button-label b{margin-right:4px;color:#8a5a1f;font-weight:900}
#modal .server-switcher .server-options button:not([aria-pressed=true]):after{content:"\203A";flex:none;color:#a07a45;font:700 24px/1 system-ui}
#modal .server-switcher .server-options button:disabled{opacity:.55}
.server-switcher .server-switch-hint{margin:0 0 6px;font:600 13px/1.35 system-ui}
.server-switcher>p:not(.eyebrow):not(.server-switch-hint){margin:0 0 6px;font:13px/1.35 system-ui}
.server-switcher .account-id{margin-top:8px}
.server-confirm-target{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:10px;border:1px solid #bca578;border-radius:var(--vs-radius);font:700 17px/1.2 system-ui}
.server-confirm-target .button-label b{font-weight:900}
.server-confirm-target .server-option-tag{flex:none;padding:2px 8px;border-radius:999px;background:rgba(44,51,79,.12);font-size:12px;font-weight:800;line-height:1.3}
/* H06: rounds-left badge on the locked battle Skip (does not change its width).
   P17 (build 27): a small 14px counter on the face's corner, not a big disc. */
#online #playback .skip-rounds{position:absolute;top:2px;right:-3px;z-index:1;min-width:14px;height:14px;padding:0 3px;border-radius:7px;background:#2c3a52;box-shadow:0 0 0 1.5px var(--cream-50);color:#fff;font:800 9px/14px system-ui;text-align:center;-webkit-text-stroke:0;text-shadow:none}
#online #playback .skip-rounds[hidden]{display:none!important}
/* H06: owner-only Feature flags toggles (whole row is the 44px touch target). */
.feature-flag-list{display:grid;gap:8px}
#modal .feature-flag-list label.feature-flag{display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:10px;min-height:44px;margin:0;padding:6px 10px;border:1px solid #bca578;border-radius:var(--vs-radius);background:var(--paper);font:700 15px/1.25 system-ui;color:var(--navy-600);cursor:pointer}
#modal .feature-flag input{flex:none;width:24px;height:24px;margin:0;accent-color:#50b840}
/* Fast Travel multipliers: parchment small controls with the shared label
   outline; their dense tier and honey selected face come from the shared rules. */
#modal .travel-multipliers button{display:grid;place-items:center;min-width:44px;margin:0;padding:5px;border-radius:11px}
.travel-start-cost{display:flex;align-items:center;justify-content:center;gap:5px;font:700 14px/1.1 system-ui}
.travel-start-cost img{width:22px;height:25px;object-fit:contain}
#modal .hub-rewards-panel>[data-action="auto.start"],#modal .travel-go>[data-action="auto.start"]{margin:0;min-height:56px;font-size:26px;padding:6px 12px;border-radius:999px;width:100%}
#modal .travel-monitor{height:clamp(120px,20dvh,180px);border-radius:13px}
.panel-info-header{padding:0 48px 0 4px;text-align:left;min-height:44px}
.panel-info-header h1{font-size:28px!important}
/* Global status layer: toasts, errors and Retry share one slot (placed by the P20
   rule below), above every screen and any open modal (client.js re-parents it into
   the open dialog), narrowed by --status-inset = 2 × (44px control + 12px). The
   combat-power strip shares --z-status.
   Status text never renders inside a modal panel or footer. */
#feedback,#error{position:fixed;z-index:var(--z-status);top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 8px);left:50%;transform:translateX(-50%);box-sizing:border-box;margin:0;max-width:calc(100vw - var(--status-inset));box-shadow:0 4px 0 #2a1f1c33,0 10px 26px #11172366;transition:opacity .16s}
/* P20 (build 27): one slot for the whole app, never over the header: bottom-centre
   10px above the bottom bar (--status-bottom, measured by placeStatusAnchor), and
   centred in the viewport inside an open dialog or on a screen without that bar. */
#feedback,#error{top:auto;bottom:var(--status-bottom,calc(var(--safe-bottom,env(safe-area-inset-bottom,0px)) + 96px))}
:root[data-status-anchor=centre] :is(#feedback,#error),#modal>:is(#feedback,#error){top:50%;bottom:auto;transform:translate(-50%,-50%)}
/* AC631: a centred status layer lands on whole pixels, so its Retry face and copy are not split across
   a half pixel (an odd-height layer put the label 0.4px off its face). */
:root[data-status-anchor=centre] :is(#feedback,#error),#modal>:is(#feedback,#error){transform:translate(round(-50%,1px),round(-50%,1px))}
/* AC546 (build 125 feedback, owner: "Tego typu stylu komunikat miałeś poprawić na taki jak mamy teraz w treasures"):
   every status toast is the Buried Treasures "Not enough digs" band (AC511): a full-width dark band (about 80%)
   between two thin gold rules that fade toward the screen edges, outlined white Lucky lettering, a gold second part
   (<strong>). One look shared by #feedback and .miner-empty-banner (the band rules right below); the slot (P20) is
   unchanged: above the bottom bar, centred inside a dialog. It never takes input. */
#feedback{width:100vw;max-width:100vw;min-height:50px;padding:10px 18px;display:flex;flex-wrap:wrap;gap:2px 10px;align-items:center;justify-content:center;border:0;border-radius:0;box-shadow:none;color:#fff;font:19px/1.15 Lucky,system-ui;-webkit-text-stroke:.09em var(--vs-ink-text);paint-order:stroke fill;text-shadow:none;text-align:center;text-wrap:balance;pointer-events:none}
#feedback strong{white-space:nowrap;color:#ffe3a9;font-weight:400}
/* AC546 (build 126 second review): the band core under the lettering is 98% opaque (was 90%, text behind showed
   through while it opened); only the outer 15% each side fades, to 60% at the screen edge. Whatever still
   shows through the edges and the opening band is blurred 6px. Shared with .miner-empty-banner (one look). */
#feedback,.miner-empty-banner{background:linear-gradient(90deg,#0b081099,#110c17fa 15%,#110c17fa 85%,#0b081099);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#feedback:before,#feedback:after,.miner-empty-banner:before,.miner-empty-banner:after{content:'';position:absolute;left:0;right:0;height:1.5px;background:linear-gradient(90deg,#e0b04a00,#e0b04acc 14%,#ffe39e 50%,#e0b04acc 86%,#e0b04a00)}
#feedback:before,.miner-empty-banner:before{top:3px}#feedback:after,.miner-empty-banner:after{bottom:3px}
#error{width:min(360px,calc(100vw - var(--status-inset)));padding:12px 14px;border:2px solid #cf875b;border-radius:14px;background:var(--cream-350);color:#613422;font:600 14px/1.4 system-ui;text-align:center}
#error .retry-action{display:flex;align-items:center;justify-content:center;width:100%;margin:10px 0 0}
/* AC13 (build 39): the Retry dialog has a heading over the message and a compact,
   centred Retry button (the 44px compact tier, not the full-width 56px one). */
#error.has-retry{padding:14px 16px 16px}
/* AC51 (build 44, shared modal rule, SCREEN_RULES.md → Modal scrim): every blocking modal
   dims the screen behind it. Dialogs do it with dialog::backdrop; the Connection problem
   (Retry) layer is not a dialog, so a full-viewport .status-scrim right before it
   (client.js placeStatusScrim) draws the same tint and is the tap shield: nothing behind it can be tapped until Retry. */
.status-scrim{display:none;position:fixed;inset:0;z-index:var(--z-status);background:#10192db8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.status-scrim:has(+#error.has-retry:not([hidden])){display:block}
#error .status-title{margin:0 0 4px;color:#4a2414;font:24px/1.1 Lucky,system-ui;letter-spacing:.01em}
#error .status-body{margin:0;font:600 14px/1.4 system-ui}
:is(#error,#intro-art-gate) .secondary.retry-action{width:auto;min-width:min(176px,100%);max-width:100%;min-height:var(--tier-compact);padding:6px 22px;font-size:19px}
#error .secondary.retry-action{margin:12px auto 0}
/* AC624 (build 130 feedback, owner: "już lepiej 3 kropki jedna po drugiej, i na środku w pionie"): the one
   busy indicator (UI_BUSY_DOTS) is three dots that pulse in turn: 1.2s loop, 0.2s stagger, scaled about
   their own centres so the row never drifts. A standalone row (Store processing) sits in flow; inside a
   busy button see the AC624 placement rule near the end of this file. Reduced motion: three full-size
   static dots in a gentle opacity step (45%, 72%, 100%). */
/* AC774: the one shared countdown line (`uiTimer` in ui-components.ts): clock and time on one line, tabular
   digits, a fixed box while it ticks; the dark chip is the Key offer clock look, `.is-plain` drops the chip. */
:is(.ui-timer,.key-offer-countdown){align-self:center;display:flex;align-items:center;gap:8px;border:2px solid #24334e;border-radius:20px;background:linear-gradient(#263c60,#1b2c48);color:var(--cream-250);padding:4px 14px;font:800 14px/1.2 system-ui;font-variant-numeric:tabular-nums;white-space:nowrap;box-shadow:inset 0 1px #adc9e84d,0 1px #94c6f780}
:is(.ui-timer,.key-offer-countdown):before{content:'';width:14px;height:14px;flex:none;box-sizing:border-box;border:2px solid #ffe19a;border-radius:50%;background:linear-gradient(#ffe19a,#ffe19a) 50% 30%/2px 5px no-repeat,linear-gradient(#ffe19a,#ffe19a) 75% 55%/4px 2px no-repeat;box-shadow:0 0 0 1px #111f36}
.ui-timer{max-width:100%}
.ui-timer.is-plain{border-color:transparent;background:none;box-shadow:none;color:var(--text-on-cream,#3a2d2c);padding:2px 0}
.ui-timer.is-plain:before{border-color:currentColor;background:linear-gradient(currentColor,currentColor) 50% 30%/2px 5px no-repeat,linear-gradient(currentColor,currentColor) 75% 55%/4px 2px no-repeat;box-shadow:none}
.inline-loader{--busy-dot:12px;--busy-gap:8px;display:inline-flex;flex:none;align-items:center;justify-content:center;color:#6c4322;line-height:0;pointer-events:none}
.inline-loader>i{display:block;flex:none;width:var(--busy-dot);height:var(--busy-dot);margin:0;border-radius:50%;background:currentColor;box-shadow:0 0 0 var(--busy-ring-w,0px) var(--busy-ring,transparent);animation:inline-loader-dot 1.2s ease-in-out infinite both}
.inline-loader>i+i{margin-left:var(--busy-gap)}
.inline-loader>i:nth-child(2){animation-delay:.2s}
.inline-loader>i:nth-child(3){animation-delay:.4s}
@keyframes inline-loader-dot{0%,60%,100%{transform:scale(.55);opacity:.5}30%{transform:scale(1);opacity:1}}
/* style.css stops every animation under reduced motion; the row then reads as a gentle opacity step. */
@media(prefers-reduced-motion:reduce){.inline-loader>i{animation:none;transform:none;opacity:1}.inline-loader>i:first-child{opacity:.45}.inline-loader>i:nth-child(2){opacity:.72}}
#error .retry-action.is-loading{opacity:1}
.wallet-currency-fx{position:fixed;left:0;top:0;width:22px;height:22px;object-fit:contain;z-index:60;pointer-events:none;filter:drop-shadow(0 2px 2px #33204780)}
/* AC813 (build 184): the wallet dock. A manual popover (top layer, above any dialog) covering the viewport without
   taking input; its pills are style copies of the header's. Anchored slots sit on the real pill; a hidden header
   gets its pills in one row centred under the safe area. Tokens fly inside it (fixed, no transformed ancestor). */
.wallet-dock{position:fixed;inset:0;width:auto;height:auto;margin:0;padding:0;border:0;background:none;color:inherit;overflow:visible;pointer-events:none;z-index:61}
.wallet-dock::backdrop{background:none}
/* AC822: the copy starts where the header pill starts, so its icon sits on the header's icon and a longer exact
   amount grows to the right instead of shifting the icon the tokens land in. */
.wallet-dock-slot{position:fixed;display:flex;align-items:center;justify-content:flex-start;filter:drop-shadow(0 0 7px #ffe6a0b3) drop-shadow(0 3px 5px #0009)}
.wallet-dock-slot.is-row{position:relative;filter:none}
.wallet-dock-row{position:fixed;left:0;right:0;top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 12px);display:flex;align-items:center;gap:6px;width:max-content;margin:0 auto;filter:drop-shadow(0 0 7px #ffe6a0b3) drop-shadow(0 3px 6px #000a)}
/* Hidden while the dialog's entry transform would anchor fixed children to the
   panel. visibility, not only opacity: the strip's entering animation holds opacity. */
:is(#feedback,#error,#combat-power-change).status-settling{visibility:hidden;opacity:0;transition:none}
/* Arena tables: column headers share their rows' grid template (header padding =
   row padding + the list's 2px border), compact two-line cells centred on the
   emblem, reward icons/amounts in aligned columns and a claim strip with real padding. */
.arena-view{--arena-rank-cols:24px 30px minmax(0,1fr) 52px;--arena-league-cols:30px minmax(0,1fr) 106px}
.arena-league-header{display:grid;grid-template-columns:var(--arena-league-cols);gap:5px;flex:none;padding:5px 10px;font:700 12px/1.2 system-ui;color:var(--row-inset)}
.arena-league-header>b:first-child{grid-column:1/3}
.arena-league-header>b:last-child{grid-column:3;text-align:center}
.arena-league-row{grid-template-columns:var(--arena-league-cols);gap:5px;padding:5px 8px}
.arena-reward-amounts{display:grid;grid-template-columns:1fr 1fr;gap:5px;align-items:center}
.arena-reward-amounts>span{display:flex;align-items:center;justify-content:flex-end;gap:3px;white-space:nowrap}
.arena-reward-amounts img{width:16px;height:20px;object-fit:contain}
.arena-reward-amounts b{font:700 12px/1 system-ui;font-variant-numeric:tabular-nums}
.arena-rank{grid-template-columns:var(--arena-rank-cols);gap:6px;padding:8px;min-height:62px}
.arena-rank>strong,.arena-rank>b{font-variant-numeric:tabular-nums}.arena-rank>b{text-align:right}
.arena-standings-header{grid-template-columns:var(--arena-rank-cols);gap:6px;padding:0 10px}
.arena-standings-header>b:first-child{grid-column:3}
.arena-standings-header>b:last-child{grid-column:4;text-align:right}
.arena-rank>strong{text-align:center}
/* Direct child of the league row, so it outranks .arena-league-row>span{gap:1px}. */
.arena-league-row>.arena-reward-amounts{gap:8px}.arena-league-row .arena-reward-amounts>span{justify-content:flex-start}
.arena-claim .arena-reward-amounts{grid-template-columns:repeat(2,max-content);justify-content:start;gap:4px 14px}
.arena-npc{display:inline-block;padding:2px 4px;border:1px solid #aa8761;border-radius:5px;background:#57443b;color:#ffe7b2;font:700 10px/1 system-ui;vertical-align:middle}
.arena-npc-note{font:13px/1.4 system-ui;color:#785534}

/* September 23 phone follow-up: intentional faces, no touch selection/callout. */
/* Global, not per screen (IMG_3463): every control, its label/icon descendants,
   toggle labels, the tab bar and artwork. Only real text fields stay selectable. */
button,button *,[role=button],[role=button] *,[role=tab],[role=tab] *,[data-action],[data-action] *,a,a *,label,label *,summary,summary *,select,img,svg,#tabs,#tabs *,#feedback,#combat-power-change,#combat-power-change *{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,[contenteditable],:is(#online,#modal) input:not([type=checkbox]):not([type=radio]):not([type=range]),:is(#online,#modal) textarea{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
#tabs .bottom-tab{min-height:70px;padding:5px 2px 9px;gap:1px;font-size:18px}
#tabs .bottom-tab:before{inset:0;border-width:2px;border-radius:14px;box-shadow:inset 0 2px var(--small-shine),inset 0 -3px var(--small-lip),0 2px var(--small-edge)}
#tabs .bottom-tab b{transform:translateY(-.12em)}
#tabs .bottom-tab img{height:34px;width:40px}
/* I01 review: Baloo 2 is ~6% wider than Lilita One; pl "Ekwipunek" ran ~4px past its 375px-wide tab. */
@media(max-width:389px){#tabs .bottom-tab b{font-size:16px;letter-spacing:-.2px}}
.eq-view #story-overlay{top:0;bottom:0}
.eq-view .eq-combat-power{top:calc(50% + min(25vw,108px))}
/* First/last route, busy and cloud transition: a solid grey disc with a muted
   arrow, never a ghosted one (N2 / HS-02). */
.hub-route-arrows button:disabled{opacity:1;pointer-events:none}
.hub-view #story-overlay .hub-route-arrows button:disabled{border-color:#35313b;background:linear-gradient(#bdb9c4,#8e8a98);box-shadow:inset 0 2px #e4e1e9,0 3px #19151fa0;filter:none}
.hub-route-arrows button:disabled .route-arrow-art{filter:grayscale(1) contrast(.72) brightness(1.08)}
/* One (?) help control everywhere, the AFK Rewards disc (IMG_3448): a 44px touch
   target around a 34px plum disc with a lavender ring and a cream Lucky "?".
   helpButton() (story-ui.js) emits .help-button>span; screens only place it.
   Screen explanations and secondary rules live behind it, not in paragraphs.
   F04 (2026-09-25): no padding. Lucky's "?" ink (18.5px tall, resting on the
   baseline) is centred in the disc to 0.1px by the plain 26px line box; the old
   3px bottom padding lifted it 1.6px. afk-help-audit pins the ink centre. */
.help-button{flex:none;display:grid;place-items:center;width:var(--tier-compact);height:var(--tier-compact);min-width:var(--tier-compact);min-height:var(--tier-compact);margin:0;padding:0;border:0;border-radius:50%;background:none;box-shadow:none}
.help-button>span{box-sizing:border-box;display:grid;place-items:center;width:var(--help-disc);height:var(--help-disc);padding:0;border:2px solid var(--help-ring);border-radius:50%;background:var(--help-face);box-shadow:0 2px var(--help-drop);color:var(--help-ink);font:26px/1 Lucky,sans-serif;text-shadow:none;-webkit-text-stroke:0}
.help-button:focus-visible{outline-offset:-3px}
/* Placement: the top-right corner of centred headings, inline in flex headings. */
:is(.training-heading,.rank-heading,.mining-title)>.help-button{position:absolute;right:0;top:0}
/* The (?) sits beside the plaque, never on its border: the plaque's 47px side
   margin leaves the 34px disc (in its 44px target) 8px clear of the frame. */
.miner-view .mining-title>.help-button{right:-49px;top:calc(50% - 22px)}
.panel-info-header>.help-button{position:absolute;right:0;top:50%;transform:translateY(-50%)}
#modal:has(.events-panel),#modal:has(.account-panel){width:min(410px,calc(100vw - 28px));padding:16px}
.events-panel h1,.account-panel h1{margin:0 0 14px;font:30px/1.1 Lucky}
#modal .events-panel .event-pages{gap:10px}
#modal .events-panel .event-card{position:relative;min-height:82px;padding:10px 42px 10px 60px;border-width:2px;border-radius:16px;opacity:1}
#modal .events-panel .event-card>img{left:10px;width:40px;height:48px}
#modal .events-panel .event-card>b{font:24px/1.1 Lucky}
#modal .events-panel .event-card>small{font:12px/1.35 system-ui;margin-top:6px}
#modal .event-card.is-locked{background:#56515c;color:var(--cream-300);border-color:#a79577}
#modal .event-card.is-locked>img{filter:saturate(.7) brightness(.9)}
.event-lock{display:inline-block;width:24px;height:28px;background:url('/art/ui-lock-v1/padlock.png') center/contain no-repeat}
.event-card .event-lock{position:absolute;right:12px;top:calc(50% - 14px)}
/* H01: lock badge, Locked eyebrow and title are one centered stack (the badge is the
   golden circle of the locked Events cards, scaled up). */
.event-locked-info{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.event-lock-badge{display:grid;place-items:center;width:64px;height:64px;border:3px solid var(--ink-plum);border-radius:50%;background:linear-gradient(var(--gold-100),#dca64a);box-shadow:inset 0 3px var(--cream-350),0 4px var(--panel-night)}
.event-lock-badge .event-lock{position:static;width:28px;height:33px;color:#3d2f2c}
#modal .event-locked-info .eyebrow{margin-top:4px;line-height:1.2;letter-spacing:2px}
#modal .event-locked-info h1{margin:0;line-height:1.05;overflow-wrap:anywhere}
#modal .event-locked-info p{margin:4px 0 0;font-size:15px;line-height:1.35;color:#4a3b2c}
/* H02: the unlock step stacks above the still-open Events list (nested native dialog). */
#modal .event-lock-popover{width:min(340px,86vw);max-width:none;padding:22px 20px 18px;margin:auto;overflow:hidden}
#modal .event-lock-popover::backdrop{background:#10192d8c;backdrop-filter:none}
#modal .event-lock-popover>button.secondary{width:100%;margin:16px 0 0}
#modal .events-panel .secondary,#modal .account-panel .secondary,#modal:has(.events-panel)>button,#modal:has(.account-panel)>button{width:100%;min-height:var(--tier-full-h);margin:10px 0 0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky}
#modal .events-panel .secondary:before,#modal .account-panel .secondary:before{inset:0}
#modal .account-panel>p,#modal .backpack-panel>p{font:14px/1.45 system-ui}
#modal .danger-action{--small-top:var(--btn-danger-top);--small-bottom:var(--btn-danger-bottom);--small-edge:var(--btn-danger-edge);--small-lip:var(--btn-danger-lip);--small-shine:var(--btn-danger-shine)}
/* Copyable identity field: read-only value, Copy beside it, hint directly below. */
#modal .account-id{display:grid;gap:5px;margin:0 0 12px;text-align:left}
#modal .account-id-label{font:700 13px/1.2 system-ui;color:#5d4a2f}
#modal .account-id-row{display:flex;align-items:center;gap:8px}
#modal .account-id-value{flex:1;min-width:0;min-height:52px;display:flex;align-items:center;padding:5px 10px;border:2px solid #c1a06b;border-radius:10px;background:var(--paper);color:#2d3440;font:700 12px/1.3 ui-monospace,Menlo,monospace;overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}
#modal .account-id-row>button.secondary{flex:none;width:auto;min-width:96px;margin:0;padding:6px 12px}
#modal .account-id>small,#modal .field-hint{display:block;font:500 12px/1.35 system-ui;color:#7a6541}
/* Delete account (F10/O7): the six characters to type are highlighted in the ID,
   the field sits directly under it, and its 20px text never triggers iOS zoom.
   While typing, the dialog sits at the safe top so the field and Confirm stay above
   the keyboard; the panel itself never scrolls. */
#modal .delete-account-panel>p{margin:0 0 10px}
#modal .delete-account-panel .account-id{margin:0 0 10px}
#modal .delete-account-panel .account-id-value{min-height:44px}
#modal .delete-account-panel mark{padding:0 2px;border-radius:4px;background:#ffd66b;color:var(--ink-plum);box-shadow:inset 0 -2px #d9a33d}
#modal .delete-account-panel label.delete-confirm-field{display:grid;gap:9px;margin:0;font:700 13px/1.25 system-ui;color:#5d4a2f;text-align:left}
#modal .delete-confirm-field>input{width:100%;min-height:48px;margin:0;padding:6px 12px;border:2px solid #a88c65;border-radius:10px;background:var(--paper);color:var(--ink-plum);font:700 20px/1.2 ui-monospace,Menlo,monospace;letter-spacing:.12em;text-align:center}
#modal .delete-confirm-field>input:focus{outline:3px solid #e2a13f;outline-offset:0}
/* G08: the header name is a free rename control (only while the API projects
   account.canRename). It keeps the plaque's look and a 44px-tall target. */
#profile .profile-name-button{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-height:44px;margin:0;padding:0;border:0;background:none;box-shadow:none;color:inherit;font:inherit;text-align:left;text-shadow:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
#profile .profile-name-button:active{scale:.96}
#profile .profile-name-button:focus-visible{outline:2px solid #f4cf6a;outline-offset:2px;border-radius:6px}
#modal .profile-name-panel{display:grid;gap:10px;text-align:center}
#modal .profile-name-panel h1{margin:0}
#modal .profile-name-panel p{margin:0;font-size:14px;line-height:1.35}
#modal .profile-name-field{display:grid;gap:8px;margin:0;font:700 13px/1.25 system-ui;color:#5d4a2f;text-align:left}
#modal .profile-name-field>input{width:100%;box-sizing:border-box;min-height:48px;margin:0;padding:6px 12px;border:2px solid #a88c65;border-radius:10px;background:var(--paper);color:var(--ink-plum);font:800 20px/1.2 system-ui;text-align:center}
#modal .profile-name-field>input:focus{outline:3px solid #e2a13f;outline-offset:0}
#modal .profile-name-hint{min-height:1.3em;font:600 12px/1.3 system-ui;color:#6d5a3d}
#modal .profile-name-hint.is-invalid{color:#b0402f}
/* I08: the header avatar is a picker control (only while the API projects
   account.avatar). A transparent 48px overlay keeps the portrait's own styling;
   the TEST badge is a label and lets taps through. */
#profile .profile-avatar-button{position:absolute;z-index:1;left:0;top:0;width:48px;height:100%;min-height:44px;margin:0;padding:0;border:0;border-radius:10px;background:none;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
#profile .profile-avatar-button:before{content:none}
#profile .profile-avatar-button:focus-visible{outline:2px solid #f4cf6a;outline-offset:-2px}
#online #profile .server-test{z-index:2;pointer-events:none}
#modal .avatar-panel{display:grid;gap:10px;text-align:center}
#modal .avatar-panel h1{margin:0}
#modal .avatar-panel p{margin:0;font-size:14px;line-height:1.35}
/* Five avatars (glasses and goggles dropped 2026-09-27): rows of three, the
   last row centred (3+2). */
#modal .avatar-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
#modal .avatar-grid>.avatar-choice{flex:0 0 calc((100% - 16px)/3);box-sizing:border-box}
#modal .avatar-choice{position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:44px;min-height:44px;margin:0;padding:4px;border:2px solid #b39b78;border-radius:var(--vs-radius);background:linear-gradient(var(--card-face),#ecdcbb);box-shadow:0 2px #af95604d;cursor:pointer}
#modal .avatar-choice img{width:100%;height:100%;object-fit:cover;border-radius:8px;pointer-events:none}
#modal .avatar-choice.is-current{border-color:#d49a2c;box-shadow:0 0 0 3px #f2c75c,0 2px #af95604d}
#modal .avatar-choice:active{scale:.95}
#modal .avatar-choice:disabled{opacity:.7}
/* AC59: a locked avatar (Giant Panda before the form) is greyed with a padlock; the tap explains the unlock. */
#modal .avatar-choice.is-locked>:not(.avatar-lock){filter:grayscale(.85) brightness(.82)}
#modal .avatar-lock{position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;background:#2c2433e6;box-shadow:0 0 0 2px #f6e2b4,0 2px 3px #0006}
#modal .avatar-lock::before{content:"";position:absolute;left:8px;top:5px;width:8px;height:8px;border:3px solid #f6e2b4;border-bottom:0;border-radius:7px 7px 0 0}
#modal .avatar-lock::after{content:"";position:absolute;left:7px;top:13px;width:16px;height:11px;border-radius:3px;background:#f6e2b4}
/* AC72 (build 48): a newly available avatar waits for a tap to unlock. Its portrait
   sits under a dim veil with a slow diagonal sheen, a golden open padlock and an
   "Unlock" pill; the gold rim pulses (transform/opacity only, still under reduced
   motion). The unlock reveal (client.js playAvatarReveal) fades the veil, sweeps a
   shine and pops sparkles over the tile. */
#modal .avatar-choice.is-unlockable{border-color:#e0a63a;background:linear-gradient(var(--cream-300),#f3cf7c);box-shadow:0 0 0 2px #ffd970,0 0 12px 2px #ffcf4d99,0 2px #af95604d;overflow:visible}
#modal .avatar-unlock-face{position:absolute;inset:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:8px;background:#2c2433a6;overflow:hidden;pointer-events:none}
#modal .avatar-unlock-face>b{position:relative;max-width:calc(100% - 8px);padding:2px 8px 1px;border:2px solid #6b3a0a;border-radius:999px;background:linear-gradient(var(--honey-300),#f0a028);box-shadow:0 2px #6b3a0a;color:var(--cream-50);font:13px/1.15 Lucky,system-ui;letter-spacing:.02em;-webkit-text-stroke:.14em #6b3a0a;paint-order:stroke fill;white-space:nowrap;overflow:hidden;text-overflow:clip}
#modal .avatar-unlock-lock{position:relative;width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff1b0,#f2b134 60%,#c27a12);box-shadow:0 0 0 2px #6b3a0a,0 0 10px 3px #ffd75a}
#modal .avatar-unlock-lock::before{content:"";position:absolute;left:12px;top:2px;width:8px;height:9px;border:3px solid #6b3a0a;border-bottom:0;border-radius:7px 7px 0 0;transform:rotate(25deg);transform-origin:0 100%}
#modal .avatar-unlock-lock::after{content:"";position:absolute;left:8px;top:12px;width:14px;height:11px;border-radius:3px;background:#6b3a0a}
#modal .avatar-sheen{position:absolute;top:-20%;bottom:-20%;left:0;width:38%;background:linear-gradient(90deg,#fff0,#fff8 50%,#fff0);transform:translateX(-160%) rotate(20deg);animation:avatar-sheen 2.4s ease-in-out infinite}
@keyframes avatar-sheen{0%,35%{transform:translateX(-160%) rotate(20deg)}75%,100%{transform:translateX(330%) rotate(20deg)}}
#modal .avatar-reveal{position:absolute;inset:-6px;pointer-events:none;overflow:visible;z-index:2}
#modal .avatar-reveal-veil{position:absolute;inset:10px;border-radius:8px;background:#2c2433a6;opacity:0}
#modal .avatar-reveal-shine{position:absolute;top:-10%;bottom:-10%;left:30%;width:40%;background:linear-gradient(90deg,#fff0,#fffbe0e6 50%,#fff0);opacity:0}
#modal .avatar-reveal-spark{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;background:var(--gold-50);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);filter:drop-shadow(0 0 3px #ffc93a);opacity:0;transform:scale(0)}
@media(prefers-reduced-motion:reduce){#modal .avatar-sheen{animation:none;opacity:0}}
#modal .avatar-check{position:absolute;right:-6px;top:-6px;display:grid;place-items:center;width:22px;height:22px;border:2px solid var(--cream-250);border-radius:50%;background:#3f9a52;color:#fff;font:900 13px/1 system-ui;box-shadow:0 1px 2px #0005}
/* P25: a framed avatar is a frameless portrait under a separate frame overlay
   (client.js framedAvatar); --avatar-inset keeps the portrait inside the frame
   opening. The header keeps the 36px avatar box plus 2px, now that the frame is
   the border.
   Owner 2026-11-21 ("something clips this frame, or they all lack one border radius"): every square frame file has
   one outer shape, a rounded square of 18/256 = 7% (game/art/avatar-frames-v1/frame_shape.py), so the wrapper's
   radius is 7% in every context and nothing clips the frame art: no overflow on the wrapper or its tile, only the
   portrait is rounded into the opening. */
:is(#modal,#profile) .avatar-framed{position:relative;display:block;flex:none;aspect-ratio:1;border-radius:7%;background:none}
:is(#modal,#profile) .avatar-framed>img{position:absolute;display:block;margin:0;padding:0;border:0;box-shadow:none;background:none;pointer-events:none}
:is(#modal,#profile) .avatar-framed .avatar-portrait{inset:var(--avatar-inset);width:calc(100% - 2*var(--avatar-inset));height:calc(100% - 2*var(--avatar-inset));object-fit:cover;border-radius:4%}
:is(#modal,#profile) .avatar-framed.is-default .avatar-portrait{object-fit:contain;object-position:50% 85%}
:is(#modal,#profile) .avatar-framed .avatar-frame{inset:0;width:100%;height:100%;border-radius:0}
#online #profile .profile-card>.avatar-framed{width:34px;height:34px}
/* AC224: the portrait leaves room for the complete rank. The left inset matches
   its top inset: 8.5px in the 52px plaque, 9px when the existing 44px name target
   makes the plaque 53px tall. Keep the 44px transparent avatar touch target. */
#online #profile{--header-gutter:max(8.5px,calc(var(--safe-left, env(safe-area-inset-left,0px)) + 4px))}
#online #profile:has(.profile-name-button){--header-gutter:max(9px,calc(var(--safe-left, env(safe-area-inset-left,0px)) + 4px))}
#online #profile .profile-card{flex-basis:calc(122px + var(--header-gutter));width:calc(122px + var(--header-gutter));gap:6px;padding-left:var(--header-gutter)}
#online #profile .server-test{left:calc(var(--header-gutter) - 4px)}
#profile .profile-avatar-button{width:44px}
#online #profile .energy-pill{flex-basis:77px;width:77px;padding:0 7px}
@media(min-width:390px){#online #profile .energy-pill{flex-basis:84px;width:84px;padding:0 6px}}
@media(min-width:420px){
 #online #profile .profile-card{flex-basis:calc(124px + var(--header-gutter));width:calc(124px + var(--header-gutter));gap:8px}
 #online #profile .energy-pill{flex-basis:98px;width:98px;padding:0 8px}
}
/* AC76 (build 49, ASC AFJRxKk8lMOmFgdhf_J-YMY): the Energy / Gems / Gold pills size to
   their content with real inner padding (7-8px between the pill edge and its icon
   or value, the icon 5-6px from its value) and a 6px gap between pills, at every
   phone width. AC355: the profile plaque fits its content and leaves unused space
   in the bar; its name still ellipsizes before a long balance crowds a pill.
   Gate: topBarIssues in backend/tests/layout-gate.mjs, run by
   backend/tests/b49-rules-ui-audit.mjs at the four phones. */
#online #profile{column-gap:3px}
#online #profile .profile-card{flex:0 1 auto;width:auto;min-width:0;margin-right:auto}
/* A flex-start name button must also constrain its text child for ellipsis. */
#online #profile .profile-identity>b{min-width:0;max-width:100%}
#online #profile .energy-pill{flex:none;width:auto;min-width:0;padding:0 7px;column-gap:5px;grid-template-columns:13px auto 12px}
#online #profile .energy-pill .energy-value{min-width:2ch}
#online #profile :is(.gem-pill,.coin-pill){flex:none;width:auto;min-width:0;max-width:none;margin-left:3px;padding-inline:8px;gap:5px;justify-content:center;box-sizing:border-box}
#online #profile .gem-pill img{width:14px;height:18px}
#online #profile .coin-pill img{width:17px;height:20px}
#online #profile .profile-tools{margin-left:2px}
@media(min-width:390px){
 #online #profile .energy-pill{grid-template-columns:15px auto 15px}
 #online #profile .gem-pill img{width:15px;height:20px}
 #online #profile .coin-pill img{width:19px;height:22px}
}
@media(min-width:420px){
 #online #profile .energy-pill{padding:0 8px;column-gap:6px;grid-template-columns:18px auto 18px}
 #online #profile :is(.gem-pill,.coin-pill){padding-inline:9px;gap:6px}
 #online #profile .gem-pill img{width:17px;height:23px}
 #online #profile .coin-pill img{width:22px;height:25px}
}
#modal .avatar-choice .avatar-framed{width:100%;height:100%}
#modal .avatar-panel.has-frames{gap:8px}
#modal .avatar-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
/* Visual polish r2 (meta #216): frames are compared at three per row (~110px tiles), not four small ones. */
#modal .avatar-grid.is-frames>.avatar-choice{flex-basis:calc((100% - 16px)/3)}
/* V15: Delete account is a quiet text link at the end of the Account dialog;
   Close stays the one bottom button. 44px target, no button face. */
#modal .account-panel>.account-delete-link{display:block;min-height:44px;margin:8px auto 0;padding:8px 14px;border:0;border-radius:10px;background:none;box-shadow:none;color:#9b3f2e;font:700 15px/1.2 system-ui;text-decoration:underline;text-underline-offset:3px;-webkit-text-stroke:0;text-shadow:none}
#modal .account-panel>.account-delete-link:before,#modal .account-panel>.account-delete-link:after{content:none}
#modal .delete-account-panel>.field-hint{margin:4px 0 0;text-align:left}
/* Visual polish r2 (meta #16): centred unless an on-screen keyboard is up (html.keyboard-up).
   b148 iOS: + the keyboard's visual-viewport pan (--vv-top, client.ts syncVisualViewport) keeps the title below the status bar. */
html.keyboard-up #modal:has(.delete-account-panel:focus-within){margin-top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 8px + var(--vv-top,0px))}
/* Android: keep the delete sheet stationary through input blur and Chromium button focus
   on touch-down; focus-dependent margins can move the action before touch-up. */
html[data-native-platform="android"] #modal:has(.delete-account-panel){margin-top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 8px + var(--vv-top,0px))}
/* P09: e-mail link steps reuse the rename field; the dialog moves to the safe top
   while typing so the field and its action stay above the keyboard. 18px text
   never triggers iOS zoom and fits a long address at Mini width. */
#modal .email-link-field>input{font-size:18px}
#modal .email-link-field>#email-link-code{font:800 24px/1.2 ui-monospace,Menlo,monospace;letter-spacing:.35em}
#modal .email-link-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
#modal .email-link-row>button{width:100%;margin:0}
/* T10 (build 29): the generic `#modal label` rule (display:block) outranked the
   rename field's grid, so its label gap never applied and "E-mail address" sat
   on the field. Both steps keep 10px between the label and its field. The code
   step puts a dense-tier Paste face beside the field, both 52px high. */
#modal .email-link-panel .email-link-field{display:grid;gap:10px}
#modal .email-code-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;margin:12px 0}
#modal .email-code-row>.email-link-field{margin:0}
#modal .email-code-row .email-link-field>input{min-height:var(--tier-dense-h)}
#modal .email-code-row>.secondary{width:auto;min-width:96px;margin:0;min-height:var(--tier-dense-h);font-size:var(--tier-dense-fs)}
#modal .account-panel>.email-link-status{font-weight:800;overflow-wrap:anywhere}
#modal .account-panel>.primary{width:100%;margin:10px 0 0}
#modal:has(.email-link-panel){margin-top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 8px + var(--vv-top,0px))}
#modal .field-hint{margin:2px 0 0}
#modal .copy-buffer{position:fixed;top:0;left:0;width:1px;height:1px;opacity:0;font-size:16px}
.arena-opponent{gap:8px;padding:9px;flex-basis:124px}.arena-opponent:active{transform:none}
.arena-portrait{display:grid;place-items:center;flex:none;width:54px;height:60px;border:2px solid #937451;border-radius:13px;background:linear-gradient(#ffe9ad,#b8b2c9);overflow:hidden;box-shadow:inset 0 2px #fff7d2}
.arena-portrait img{width:52px;height:56px;object-fit:contain}
/* AC126 (build 56): the rival avatar is a tap target for its player preview;
   it looks exactly like the portrait it wraps (shared .is-pressed feedback). */
#online .arena-portrait-button{flex:none;display:grid;min-width:0;min-height:44px;margin:0;padding:0;border:0;border-radius:13px;background:none;box-shadow:none}
#modal .arena-rival-detail h1{margin:4px 0 2px}
#modal .arena-rival-detail .title-badge{margin:0 auto 4px}
.arena-rival-detail .arena-rival-league{display:flex;align-items:center;justify-content:center;gap:6px;margin:4px 0}
.arena-rival-detail .arena-rival-league .arena-emblem{width:26px;height:29px}
.arena-rival-detail .arena-rival-league b{font:16px/1.1 Lucky;color:var(--text-on-cream)}
.arena-rival-detail .arena-rival-power{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 12px;margin:4px 0}
.arena-rival-detail .arena-rival-power .arena-stats{font-size:13px}
.arena-rival{gap:4px}.arena-rival>b{font-size:20px}.arena-stats{gap:6px;font-size:11px}.arena-stats img{width:15px;height:17px}
.arena-power{display:flex;align-items:center;gap:4px;color:#63452e;font:700 15px/1.1 system-ui}
.arena-power img{width:21px;height:21px;object-fit:contain}
/* Compact heights: rival stats and power share one row, and each league row puts
   its threshold beside the name, so text keeps >= 8px from the card/list frame. */
@media(max-height:730px){
 .arena-rival{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;column-gap:6px;row-gap:3px}
 .arena-rival>b,.arena-rival>small{grid-column:1/-1}
 .arena-league-row>span{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:6px}
 .arena-league-row{min-height:34px;padding-top:3px;padding-bottom:3px}
 .arena-league-row .arena-emblem{width:26px;height:28px}
}
/* One fixed 64px face in the free, paid and limit states: the price tag is a single
   line ("Free" or Gems), and the daily limit is stated once in the entry-cost strip. */
#online .arena-fight{flex:none;width:78px;height:64px;min-height:64px;margin:0;padding:6px;font:23px/1.1 Lucky;display:flex;flex-direction:column;justify-content:center;gap:3px}
#online .arena-fight:before{inset:0}
.arena-fight small{display:flex;gap:3px;align-items:center;justify-content:center;font:700 11px/1.1 system-ui;-webkit-text-stroke:0;color:#533c2c;max-width:100%;text-align:center;white-space:nowrap}
.arena-fight small img{width:16px;height:16px;object-fit:contain}
/* Visual polish v1: on the battle face the Free/gem cost reads as cream lettering on the face's own ink. */
#online .arena-fight:not(:disabled) small{color:var(--cream-50);-webkit-text-stroke:3px var(--small-edge);paint-order:stroke fill}
/* T14 (build 29): label and price tag are one optically centred group. The shared
   -.12em label lift pushed "Walcz" against the top and opened a wide gap above
   "Za darmo"; a slightly wider face keeps the Lucky label off the side bevel. */
#online .arena-fight{width:84px;padding:5px 4px 7px;gap:4px}
#online .arena-fight>.button-label{transform:none;line-height:1;white-space:nowrap}
.arena-button-cost{display:flex;align-items:center;gap:4px;font:700 15px/1 system-ui;color:#503745;-webkit-text-stroke:0}
.arena-button-cost img{width:24px;height:21px;object-fit:contain}
#online.arena-view #tabs:has([data-action="arena.refresh"]){grid-template-columns:54px max-content minmax(0,1fr)}
#online.arena-view #tabs:not(:has([data-action="arena.refresh"])){grid-template-columns:54px minmax(0,1fr)}
.arena-history-notice{margin:0;font:13px/1.35 system-ui}
.arena-empty-history{padding:22px 16px;margin:0;text-align:center;font:15px/1.45 system-ui}
.arena-damage{position:absolute;transform:translate(-50%,-50%);font:38px/1 Lucky;color:var(--cream-350);-webkit-text-stroke:3px #592b32;paint-order:stroke fill;filter:drop-shadow(0 3px #39222d);pointer-events:none}
.arena-damage.is-crit{color:#ffd34d}

/* Global action scale: visual faces fill the touch target. Utility icons retain
   their compact 44px hit target; actions never masquerade as tiny text pills. */
#online .secondary,#modal .secondary,#error .secondary{min-height:var(--tier-full-h);padding:8px 10px;font-size:var(--tier-full-fs);line-height:1.1}
#online .secondary:before,#modal .secondary:before,#error .secondary:before{inset:0}
/* Dense tier, one rule: segmented pickers, tab strips (incl. Equipment Gear/Merge
   and the Chests shortcut in their row), paired pagers in every realm and inline
   field actions. Screen rules keep only layout; plain list, so no selector gains
   specificity. Approved exceptions (EQ shortcuts, Rankings categories) stay local. */
#modal .travel-multipliers button,
#online .arena-tabs .secondary,
#online .gemstone-eq-tabs .secondary,
#modal .collection-tabs button,
#modal .email-link-row .secondary,
#modal .avatar-tabs .secondary,
#modal .home-scenery-options .secondary,
#modal .settings-language .secondary,
#modal .paired-pager .secondary,
#modal .account-id-row>button.secondary{min-height:var(--tier-dense-h);font-size:var(--tier-dense-fs)}
/* AC537: the quantity stepper's faces left this dense tier; they are compact (see the stepper block). */
#online #playback button{font-size:16px}
#online #playback button:before{inset:0}
/* Speed/Skip only: shorter faces, unchanged width and a stationary 44px target.
   Animate the face/label, never shrink the hit box away from a finger's edge. */
#online #playback .playback-compact{height:44px;min-height:44px;scale:1;transform:none;transition:none}
#online #playback .playback-compact:before{inset:6px 0;border-radius:10px;transition:transform .12s ease-out}
#online #playback .playback-compact>.button-label{transition:scale var(--tap-t,.12s ease-out)}
#online #playback .playback-compact:not(:disabled):is(:active,.is-pressed):before{transform:scale(.94)}
#online #playback .playback-compact:not(:disabled):is(:active,.is-pressed)>.button-label{scale:.94}
@media(prefers-reduced-motion:reduce){#online #playback .playback-compact:before,#online #playback .playback-compact>.button-label{transition:none}}
/* Widths follow each label (Gemstones is the longest) so no 21px label nearly
   touches its border at 375px (EQG-15). */
#online .eq-shortcuts .secondary{flex:1 1 auto;min-height:var(--tier-full-h);padding:6px 10px;font-size:var(--tier-dense-fs)}
#online .eq-training .secondary{min-height:var(--tier-full-h);min-width:112px;padding:8px;font-size:var(--tier-full-fs)}
.eq-training{padding:9px;gap:10px}.eq-training>div{min-width:0}
.eq-training small,.eq-training p{font-size:11px;line-height:1.35}
/* Refresh carries its Gem cost inline, so it keeps the same 56px face as History. */
#online .arena-refresh{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;padding-left:6px;padding-right:6px}
.arena-button-cost{justify-content:center;gap:2px;font-size:14px}
.arena-button-cost img{width:20px;height:18px}
#online .collection-pages .secondary,#modal .collection-pages .secondary{min-height:var(--tier-dense-h);font-size:var(--tier-dense-fs);padding:6px 10px}
#modal .collection-tabs button{padding:6px}
/* Journal tabs paint their whole 52px dense face, like every other tab strip. */
#modal .collection-tabs button:before{inset:0}
/* Full 56/24 tier (2026-09-25). The labels are short enough not to wrap in the
   ~160px Mini face ("Claim", "Open", "Next chamber" 141px), so the horizontal
   padding only keeps the centred label clear of the face edge. */
#online .mining-actions .secondary{min-height:var(--tier-full-h);font-size:var(--tier-full-fs);padding:8px 4px}
/* Q03: Blip scan leads with the Blip drone art (scout/front.png), sized like the Exchange price icons. */
/* AC391: room for the Exchange tile at 375px. */
#online .mining-actions .mining-scan-button{display:flex;align-items:center;justify-content:center;gap:4px}
#online .mining-actions .mining-scan-drone{width:28px;height:28px;object-fit:contain;flex:none;margin:-4px 0;pointer-events:none;filter:drop-shadow(0 1px 0 #1b263e)}
#online .rank-categories .secondary{min-height:var(--tier-dense-h);font-size:18px;padding:6px 3px}
/* Mini width: a slimmer icon and gap keep "Treasures" 8px clear of its face edge. */
@media(max-width:400px){#online .rank-categories .secondary{gap:2px}.rank-categories img{width:19px;height:23px}}
#online.miner-view .mining-wallet>.secondary{min-height:var(--tier-compact);font-size:16px;padding:6px 8px}
#online.miner-view .mining-wallet>.secondary:before{inset:0;border-radius:var(--vs-radius)}
#online.tower-preparing #tabs .secondary{min-height:var(--tier-full-h);font-size:var(--tier-full-fs)}
.arena-portrait img{width:100%;height:100%;object-fit:cover}

/* Drawing lives in Chests; placing and merging stones live under Equipment. */
#online.shop-view{height:100dvh;max-height:100dvh;min-height:0;margin:0 auto;display:flex;flex-direction:column;border:0;border-radius:0;padding-top:var(--safe-top,env(safe-area-inset-top,0px))}
#online.shop-view #content{gap:12px;padding-top:14px}
.gemstone-collection-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;font:23px/1.1 Lucky}
#online .gemstone-collection-title .secondary{margin:0}
/* Equipment → Gemstones: Gear/Merge are two equal tabs across the full row (N3:
   no Chests shortcut; Chests is a primary tab). */
.gemstone-eq-tabs{gap:8px}
.gemstone-eq-tabs .gemstone-tabs{flex:1;min-width:0}
#online .gemstone-eq-tabs .gemstone-tabs .secondary{min-width:0;padding:6px 4px}
.chest-shop-card{border:3px solid #171326;border-radius:20px;padding:12px;background:radial-gradient(ellipse at 22% 45%,#9975e1,#50358a 70%);box-shadow:inset 0 2px #c7adea,0 5px #181522;color:var(--cream-300);display:flex;flex-direction:column;gap:9px;flex:1;min-height:220px;max-height:350px}
.chest-shop-card>h2{margin:0;text-align:center;font:29px/1.1 Lucky;color:var(--cream-300);filter:drop-shadow(0 2px #271a3f)}
.chest-shop-card .gemstone-coffer{max-height:none;min-height:92px;gap:12px}
.chest-shop-card .gemstone-coffer>div{flex:1}
.chest-display{height:100%;display:grid;place-items:center;background:radial-gradient(ellipse,#f8dca96b,transparent 70%)}
.chest-display img{height:100%;width:100%;max-height:160px;object-fit:contain;filter:drop-shadow(0 5px 2px #22163788)}
.gemstone-coffer small{display:block;margin-top:9px;font:12px/1.4 system-ui;color:var(--row-face)}
#online .chest-buy,#modal .chest-buy{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:72px;width:100%;margin:0;padding:8px;font:24px/1.1 Lucky}
#online .chest-buy:before,#modal .chest-buy:before{inset:0;border-radius:15px}
.gemstone-price{display:flex;align-items:center;justify-content:center;gap:5px;font:750 14px/1.1 system-ui;color:#423029;-webkit-text-stroke:0;text-shadow:none}
/* AC842 (build 194, owner: "Możemy coś zrobić z tym czerwonym, wciąż źle to wygląda"; supersedes the short red of
   visual polish r2, findings 45/173): an unaffordable draw price (chest cards, the result's Again) is lettered like
   every other price. The shortfall is told by the muted stone face alone, with the currency icon kept in colour
   (the AC804 rule for Exchange prices, now for every button price). */
:is(#online,#modal) .secondary:disabled:not([data-busy-lock]):has(>.gemstone-price.is-short){filter:none}
.gemstone-price img{width:24px;height:24px;object-fit:contain}
.gemstone-price b{font:inherit!important;color:inherit!important}

/* Receipt-only celebration. The saved server result exists before this opens. */
#modal:has(.gem-results){box-sizing:border-box;width:min(460px,100vw);max-width:100vw;height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)));max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)));margin:var(--safe-top,env(safe-area-inset-top,0px)) auto var(--safe-bottom,env(safe-area-inset-bottom,0px));border:0;border-radius:0;padding:18px 18px 12px;overflow:hidden;background:radial-gradient(ellipse at 50% 42%,#493653,var(--ink-plum-2) 65%);color:var(--cream-200);display:flex;flex-direction:column;gap:8px}
/* Visual polish (layout lane): the receipt stays inside the safe viewport, and its backdrop takes the panel's own edge
   colour so the status-bar and home-indicator bands continue the receipt instead of showing flat slabs. */
#modal:has(.gem-results)::backdrop{background:var(--ink-plum-2);-webkit-backdrop-filter:none;backdrop-filter:none}
#modal:has(.gem-results){box-shadow:none}
.gem-results{--stack-gap:16px;position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;gap:var(--stack-gap);flex:1;min-height:0;text-align:center}
.gem-results header{flex:none;position:relative;z-index:1}
/* AC536 (build 125 feedback): the gem/gear results title is a heading, not a button face: outlined cream lettering
   between two thin rules that fade in from the edges, each ending in a small round gem dot in the best result's rarity
   colour (--gem-color from the reveal's glow). No border, plate or drop under it. */
/* AC536 review (build 126): title 10% smaller (32→29px, 28→25px on short phones), the label block centred on the
   rules' line (line box 1, glyph optical offset below), rules 3px, and the dot ringed in gold over a dark edge so the
   rarity colour reads on the dark reveal. */
#modal :is(.gem-results h1,.rarity-heading){display:flex;align-items:center;gap:10px;margin:0;padding:4px 0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--card-face);font:29px/1 Lucky;letter-spacing:.01em;-webkit-text-stroke:.13em var(--ink-plum);paint-order:stroke fill;filter:drop-shadow(0 3px 0 #1b1727)}
#modal :is(.gem-results h1,.rarity-heading)>span{flex:none;max-width:calc(100% - 64px);white-space:nowrap;translate:0 var(--title-optical,0px)}
#modal :is(.gem-results h1,.rarity-heading)::before,#modal :is(.gem-results h1,.rarity-heading)::after{content:"";flex:1 1 0;min-width:22px;height:16px}
#modal :is(.gem-results h1,.rarity-heading)::before{background:radial-gradient(closest-side,var(--gem-color,#ffd36a) 0 4px,var(--ink-plum) 4.5px 5.5px,#ffe39e 6px 7.5px,transparent 8px) right 50%/16px 16px no-repeat,linear-gradient(90deg,#e8b54c00,#f2c35fdd 70%,#ffe39e) left 50%/calc(100% - 14px) 3px no-repeat}
#modal :is(.gem-results h1,.rarity-heading)::after{background:radial-gradient(closest-side,var(--gem-color,#ffd36a) 0 4px,var(--ink-plum) 4.5px 5.5px,#ffe39e 6px 7.5px,transparent 8px) left 50%/16px 16px no-repeat,linear-gradient(270deg,#e8b54c00,#f2c35fdd 70%,#ffe39e) right 50%/calc(100% - 14px) 3px no-repeat}
/* AC637: the same heading and rules on the cream gemstone sheets, tinted by their rarity. */
#modal h1.rarity-heading{align-self:stretch;color:var(--gem-color);-webkit-text-stroke:2px #453528;filter:drop-shadow(0 1px #453528)}
#modal h1.rarity-heading::before{background:linear-gradient(90deg,transparent,var(--gem-color)) center/100% 3px no-repeat}
#modal h1.rarity-heading::after{background:linear-gradient(270deg,transparent,var(--gem-accent,var(--gem-color))) center/100% 3px no-repeat}
.gem-results header p{margin:10px 0 0;font:13px/1.3 system-ui;color:#dec7df}
.gem-results-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 9px;width:100%;align-content:center;flex:none;min-height:0;max-height:390px}
.gem-reveal{position:relative;aspect-ratio:1;min-width:0;align-self:center}
.gem-reveal:nth-child(9):nth-last-child(2){grid-column:2}
.gem-results-grid.single{grid-template-columns:minmax(0,210px);justify-content:center;max-height:260px}
.gem-reveal .gemstone-card{height:100%;width:100%;border:3px solid var(--gem-color);border-radius:var(--vs-radius);padding:4px 1px 8px;background:linear-gradient(145deg,color-mix(in srgb,var(--gem-color) 48%,#40324f),#272033);opacity:0;transform:perspective(420px) rotateY(90deg) scale(.7);transition:opacity .14s,transform .42s cubic-bezier(.2,.9,.3,1.25);box-shadow:inset 0 2px #fff5,0 4px var(--panel-night)}
.gem-reveal .gemstone-art{height:70%;width:70%;min-height:0}
.gem-reveal .gemstone-card small{font:700 8px/1.1 system-ui;max-width:100%}
.gem-reveal.is-revealed .gemstone-card{opacity:1;transform:none}
.gem-results.is-ready .gemstone-card{transition:none}
/* Visual polish r2 (findings 236/259): one glow scale by rarity (--glow: none below Rare, Rare .25,
   Epic .4, Legendary .6, Mythic .75, Transcendent 1) drives the halo behind every revealed tile, so a
   higher class always glows more. It is born when the tile lands (AC640); a single stone gets a wider
   warm spotlight. Static filters (no layout, no motion), so reduced motion keeps it. */
.gem-reveal{--glow:0}
.gem-reveal>.gem-reveal-light{--hero-face:100%;--hero-light:200%;--lb-size:170%;top:50%}
.gem-results-grid.single .gem-reveal-light{--lb-size:200%}
.gemstone-list.item-well>.gemstone-card{filter:drop-shadow(0 0 calc(8px * var(--glow,0)) color-mix(in srgb,var(--gem-color) calc(60% * var(--glow,0)),transparent))}
.gem-reveal[data-tier="2"]{--glow:.25}.gem-reveal[data-tier="3"]{--glow:.4}.gem-reveal[data-tier="4"]{--glow:.6}.gem-reveal[data-tier="5"]{--glow:.75}.gem-reveal[data-tier="6"]{--glow:1}
.gem-reveal.is-revealed:not([data-tier="0"]):not([data-tier="1"]){filter:drop-shadow(0 0 calc(3px + 9px * var(--glow)) color-mix(in srgb,var(--gem-color) calc(40% + 60% * var(--glow)),transparent)) drop-shadow(0 0 calc(6px + 18px * var(--glow)) color-mix(in srgb,var(--gem-accent) calc(20% + 55% * var(--glow)),transparent))}
.gem-results-grid.single .gem-reveal.is-revealed:not([data-tier="0"]):not([data-tier="1"]){filter:drop-shadow(0 0 calc(6px + 14px * var(--glow)) color-mix(in srgb,#ffe9a8 calc(45% + 55% * var(--glow)),transparent)) drop-shadow(0 0 calc(14px + 30px * var(--glow)) color-mix(in srgb,var(--gem-color) calc(30% + 60% * var(--glow)),transparent))}
/* AC19 (build 41): the shared Gemstone/Gear reveal, punchier. The tile slams in
   (overshoot from 1.6x), a ray star spins out behind Rare+ tiles, Epic+ shakes
   the frame and Legendary+ flashes the screen. impact-a/-b alternate so each
   hit restarts its animation. Transform/opacity only. */
.gem-reveal>.gemstone-card{position:relative;z-index:1}
.gem-reveal.is-bursting>.gemstone-card{animation:draw-slam .52s cubic-bezier(.2,.9,.3,1.15) both}
.draw-fx{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}.draw-fx.is-front{z-index:3}
#modal .draw-reveal{z-index:1}
.gem-starburst{position:absolute;width:var(--size,200px);height:var(--size,200px);margin:calc(var(--size,200px) / -2) 0 0 calc(var(--size,200px) / -2);border-radius:50%;background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--gem-color) 70%,#fff) 0 7deg,transparent 7deg 30deg);-webkit-mask-image:radial-gradient(circle,#000 12%,transparent 64%);mask-image:radial-gradient(circle,#000 12%,transparent 64%);opacity:0;pointer-events:none}
.draw-fx>.gem-starburst{animation:draw-starburst 1s ease-out both}.draw-fx>.gem-starburst.is-big{animation-duration:1.4s}
.draw-flash{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 45%,#fff 0,color-mix(in srgb,var(--gem-color) 55%,#fff) 30%,transparent 75%);opacity:0}
.gem-results.impact-a{animation:draw-shake-a .4s ease-out}.gem-results.impact-b{animation:draw-shake-b .4s ease-out}
#modal:has(.gem-results.impact-a.is-legendary-hit) .draw-flash{animation:draw-flash-a .65s ease-out both}#modal:has(.gem-results.impact-b.is-legendary-hit) .draw-flash{animation:draw-flash-b .65s ease-out both}
@keyframes draw-slam{0%{opacity:0;transform:scale(1.6) rotate(-8deg)}35%{opacity:1;transform:scale(.86) rotate(3deg)}65%{opacity:1;transform:scale(1.08) rotate(-1deg)}100%{opacity:1;transform:none}}
@keyframes draw-starburst{0%{opacity:0;transform:scale(.3) rotate(0deg)}25%{opacity:1}100%{opacity:0;transform:scale(1.15) rotate(50deg)}}
@keyframes draw-shake-a{0%,100%{transform:none}20%{transform:translate(-7px,3px) rotate(-.6deg)}40%{transform:translate(6px,-4px) rotate(.5deg)}60%{transform:translate(-4px,2px)}80%{transform:translate(2px,-1px)}}
@keyframes draw-shake-b{0%,100%{transform:none}20%{transform:translate(7px,-3px) rotate(.6deg)}40%{transform:translate(-6px,4px) rotate(-.5deg)}60%{transform:translate(4px,-2px)}80%{transform:translate(-2px,1px)}}
@keyframes draw-flash-a{0%{opacity:0}20%{opacity:.9}100%{opacity:0}}@keyframes draw-flash-b{0%{opacity:0}20%{opacity:.9}100%{opacity:0}}
/* Anticipation (A22): empty slot → rarity wisp flies in and charges → flash,
   ring and shards as the tile flips. Cosmetic only; the stones are saved. */
.gem-reveal:before{content:'';position:absolute;inset:6%;border:2px dashed #ffffff26;border-radius:var(--vs-radius);background:#ffffff0a;transition:opacity .2s}
.gem-reveal.is-revealed:before{opacity:0}
.gem-charge{position:absolute;inset:0;z-index:2;pointer-events:none}
.gem-charge:before{content:'';position:absolute;inset:-14%;border-radius:50%;background:radial-gradient(circle,var(--card-face) 0,color-mix(in srgb,var(--gem-color) 80%,#fff) 14%,color-mix(in srgb,var(--gem-color) 45%,transparent) 38%,transparent 68%);opacity:0;transform:scale(.3)}
.gem-reveal.is-charging .gem-charge:before{animation:gem-charge-glow var(--charge,430ms) ease-in both}
.gem-reveal.is-revealed .gem-charge:before{animation:gem-pop-out .5s ease-out both}
.gem-wisp{position:absolute;left:32%;top:26%;width:36%;height:48%;opacity:0}
.gem-wisp:before,.gem-wisp:after{content:'';position:absolute;inset:0;border-radius:50% 50% 50% 50%/62% 62% 38% 38%}
.gem-wisp:before{z-index:1;background:radial-gradient(ellipse at 50% 70%,var(--cream-50) 0 14%,var(--gem-accent) 34%,var(--gem-color) 58%,transparent 74%);filter:drop-shadow(0 0 9px var(--gem-color));animation:gem-wisp-flicker .16s ease-in-out infinite alternate}
.gem-wisp:after{inset:45% 22% -70%;border-radius:50%;background:linear-gradient(color-mix(in srgb,var(--gem-color) 60%,transparent),transparent);filter:blur(3px);opacity:.85}
.gem-reveal.is-charging .gem-wisp{animation:gem-wisp-fly var(--charge,430ms) cubic-bezier(.35,.05,.35,1) both}
.gem-reveal.is-revealed .gem-wisp{animation:none;opacity:0}
.gem-burst{position:absolute;inset:0;display:none}
.gem-reveal.is-bursting .gem-burst{display:block}
.gem-burst:before{content:'';position:absolute;inset:4%;border:3px solid color-mix(in srgb,var(--gem-color) 70%,#fff);border-radius:14px;box-shadow:0 0 16px var(--gem-color),inset 0 0 12px var(--gem-color);--pop-from:.55;--pop-to:1.7;animation:gem-pop-out .55s ease-out both}
.gem-burst i{--d:70px;position:absolute;left:50%;top:50%;width:6px;height:6px;margin:-3px;border-radius:50%;background:var(--cream-200);box-shadow:0 0 8px 2px var(--gem-color);animation:gem-shard .62s cubic-bezier(.15,.7,.3,1) both}
.gem-burst i:nth-child(even){--d:50px;width:4px;height:4px;margin:-2px}
.gem-reveal:is([data-tier="4"],[data-tier="5"],[data-tier="6"]) .gem-burst i{--d:104px;animation-duration:.85s}
.gem-reveal:is([data-tier="4"],[data-tier="5"],[data-tier="6"]) .gem-burst:before{border-width:4px;animation-duration:.75s}
.gem-results.is-ready .gem-reveal:not(.is-bursting) .gem-charge{display:none}
.gem-results-source{position:absolute;z-index:1;left:var(--sx,50%);top:var(--sy,80%);width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:radial-gradient(circle,var(--card-face) 0,color-mix(in srgb,var(--gem-color) 75%,#fff) 22%,color-mix(in srgb,var(--gem-color) 40%,transparent) 48%,transparent 70%);opacity:0;pointer-events:none;transition:opacity .4s}
.gem-results.is-revealing .gem-results-source{opacity:1;animation:gem-source-pulse .7s ease-in-out infinite alternate}
.gem-results.is-ready .gem-results-source{opacity:0;animation:none}
.gem-results-aura{position:absolute;z-index:-1;inset:0;width:100%;pointer-events:none;overflow:hidden}
.gem-results-aura:before{content:'';position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 10deg,transparent 0deg 18deg,color-mix(in srgb,var(--gem-color) 15%,transparent) 19deg 27deg,transparent 28deg 40deg);mask-image:radial-gradient(ellipse,#000 0%,transparent 70%);animation:gem-rays 24s linear infinite}
.gem-results-aura:after{content:'';position:absolute;inset:12%;border-radius:50%;background:radial-gradient(ellipse,color-mix(in srgb,var(--gem-color) 22%,transparent),transparent 70%);animation:gem-glow 3s ease-in-out infinite alternate}
.gem-results-aura i{position:absolute;width:4px;height:4px;border-radius:50%;background:var(--cream-200);box-shadow:0 0 8px 2px var(--gem-color);left:18%;top:35%;animation:gem-drift 4s ease-in-out infinite}.gem-results-aura i:nth-child(2){left:82%;top:60%;animation-delay:-1.4s}.gem-results-aura i:nth-child(3){left:55%;top:88%;animation-delay:-2.7s}
.gem-results-hint{font:12px/1.3 system-ui;margin:0;color:#ebdace}
.gem-results footer{display:flex;flex-direction:column;align-items:center;gap:10px;flex:none}
.gem-skip{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;font:700 14px/1.2 system-ui}
.gem-skip input{accent-color:#a5da56;width:22px;height:22px;margin:0}
#modal .gem-results footer .chest-buy{width:70%;max-width:260px;visibility:hidden}
#modal .gem-results footer .chest-buy{--price-face-pad:6px}
#modal .gem-results.is-ready footer .chest-buy{visibility:visible}
/* AC527: ad first, then the same-count repeat; keep the reveal footer compact. */
.draw-again-actions{display:flex;justify-content:center;align-items:stretch;gap:12px;width:70%;max-width:260px}
.draw-again-actions:has(.ad-draw-button,.ad-ready-button){width:100%;max-width:none}
#modal .gem-results footer .draw-again-actions .chest-buy{flex:1;min-width:0;width:auto;max-width:260px}
/* AC53 (build 53): Again's price has no chip (icon + amount), so it needs no extra
   bottom lift to sit centred in the face (shared rule, gate PRICE_FACE). */
/* G07 (build 21): "Tap anywhere to continue" is the shared plain-text dismiss
   hint (same face as #modal>.modal-dismiss-hint, incl. the G14 fade/breathe),
   still a real button for VoiceOver. Hidden until the reveal is ready. */
#modal .gem-continue{flex:none;align-self:center;width:auto;min-width:0;min-height:44px;margin:0;padding:0 12px;border:0;border-radius:0;background:none;box-shadow:none;font:700 15px/1.3 system-ui;color:var(--cream-200);filter:drop-shadow(0 1px 2px #0b0f1c) drop-shadow(0 0 8px #0b0f1ccc);-webkit-text-stroke:0;white-space:nowrap;opacity:0;pointer-events:none}
#modal .gem-continue:before,#modal .gem-continue:after{content:none}
#modal .gem-continue .button-label{font:inherit;color:inherit;text-shadow:inherit;-webkit-text-stroke:0}
/* AC05 reopened (build 49, ASC ALr8Q7xXZSgtUj0m9Q9mnj0): the hint's words sit at
   the TOP of its 44px target, so they land right under the reward boxes while the
   target extends downwards. A flex container whose gap separates the boxes from
   the hint declares that gap as --stack-gap; the hint cancels it down to the
   shared --tap-hint-gap. Gate: tapHintIssues (layout-gate.mjs), max 20px. */
/* AC05 reopened (build 53, ASC AHRkhz0N4pVfHY-zqe822gM): about 8px read as glued
   to the boxes; the letters now start ~24px under their visible bottom edge (gate
   band 20-28px, TAP_HINT_GAP). One token for every overlay: --tap-hint-gap. */
#modal{--tap-hint-gap:24px}
#modal .tap-continue{display:flex;align-items:flex-start;justify-content:center;padding:2px 12px 0;margin-top:calc(var(--tap-hint-gap,24px) - var(--stack-gap,0px))}
/* V08 (build 32 feedback): every "Tap anywhere to continue" breathes, on every
   screen that shows it (Gemstone and Gear chest draws included). */
#modal:has(.gem-results.is-ready) .gem-continue{pointer-events:auto;animation:dismiss-hint-in .35s ease-out .15s both,dismiss-hint-breathe 1.8s ease-in-out .5s infinite alternate}
@media(prefers-reduced-motion:reduce){#modal:has(.gem-results.is-ready) .gem-continue{animation:none;opacity:1}}
.gemstone-draw-reason{flex:none;margin:0;font:700 13px/1.3 system-ui;text-align:center;color:var(--cream-300)}
.gem-results footer .gemstone-draw-reason{visibility:hidden;color:#ffe2a8}
.gem-results.is-ready footer .gemstone-draw-reason{visibility:visible}
@keyframes gem-rays{to{transform:rotate(360deg)}}
@keyframes gem-glow{to{opacity:.45;transform:scale(.85)}}
@keyframes gem-drift{0%,100%{opacity:.15;transform:translateY(0)}50%{opacity:1;transform:translateY(-24px)}}
@keyframes gem-wisp-fly{0%{opacity:0;transform:translate(var(--wx,0px),var(--wy,0px)) scale(.4)}12%{opacity:1}55%{transform:translate(calc(var(--wx,0px) * .4 + var(--wc,0px)),calc(var(--wy,0px) * .4 - 16px)) scale(.8)}80%{opacity:1;transform:translate(0,0) scale(1)}100%{opacity:1;transform:translate(0,0) scale(1.3)}}
@keyframes gem-wisp-flicker{from{transform:scale(.92,1.04)}to{transform:translateY(1px) scale(1.06,.94)}}
@keyframes gem-charge-glow{0%,50%{opacity:0;transform:scale(.3)}100%{opacity:1;transform:scale(1)}}
/* Shared flash/ring burst: scales from --pop-from to --pop-to while fading out. */
@keyframes gem-pop-out{from{opacity:1;transform:scale(var(--pop-from,1))}to{opacity:0;transform:scale(var(--pop-to,1.5))}}
@keyframes gem-shard{0%{opacity:1;transform:rotate(var(--a)) translateY(0) scale(1)}100%{opacity:0;transform:rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(.3)}}
@keyframes gem-source-pulse{to{transform:scale(1.25);opacity:.75}}
@media(max-height:730px){#online.shop-view #content{gap:7px;padding-top:7px}.chest-shop-card{padding:8px;min-height:195px;gap:6px}.chest-shop-card>h2{font-size:26px}.chest-shop-card .gemstone-coffer{min-height:65px}.chest-display img{max-height:100px}#modal .travel-monitor{height:115px}.gem-results{--stack-gap:10px}.gem-results-grid{gap:10px 8px;max-height:280px}.gem-results footer{gap:4px}#modal .gem-results h1{font-size:25px;padding:3px 0}#modal:has(.gem-results){padding-top:10px}}
/* Build 41: the AC05 continue under the reward boxes and the AC19 tiles made the
   ten-draw receipt overflow on 731-800px browser-chrome phones (pro-chrome), so
   the compact draw-reveal spacing now applies up to 800px. */
@media(max-height:800px){.gem-results{--stack-gap:10px}.gem-results-grid{gap:10px 8px;max-height:280px}.gem-results footer{gap:4px}#modal .gem-results h1{font-size:25px;padding:3px 0}#modal:has(.gem-results){padding-top:10px}}
@media(prefers-reduced-motion:reduce){.gem-results,.gem-results *,.gem-results :before,.gem-results :after{animation:none!important;transition:none!important}.gem-reveal .gemstone-card{opacity:1;transform:none}.gem-charge,.gem-results-source,.gem-reveal:before,.draw-fx{display:none}}

/* One local result presentation for Story, Tower and Arena. No claim step. */
#modal.victory-modal{width:min(390px,calc(100vw - 32px));padding:24px 20px 20px;border:3px solid #d7b16d;border-radius:30px;background:radial-gradient(ellipse at 50% 12%,var(--card-face) 0%,var(--cream-350) 55%,#ecd2a0 100%);box-shadow:0 8px 0 #8e6948,0 24px 70px #0007;overflow:visible;max-height:calc(100dvh - var(--safe-top, env(safe-area-inset-top,0px)) - var(--safe-bottom, env(safe-area-inset-bottom,0px)) - 32px)}
#modal.victory-modal::backdrop{background:#101827ad;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
.victory-celebration{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;outline:none;isolation:isolate}
.victory-hero{position:relative;width:190px;height:158px;flex:none;display:grid;place-items:end center;pointer-events:none}
.victory-hero>img{position:relative;width:154px;height:146px;object-fit:contain;filter:drop-shadow(0 7px 3px #9b682e35);animation:victory-hero-enter .65s cubic-bezier(.16,1,.3,1) both}
/* AC687: reserve light around the complete portrait. The old bottom-aligned
   158px box put the aura up behind the head and against the dialog's top clip. */
.victory-celebration:not(.defeat-celebration) .victory-hero{height:216px;place-items:center}
.victory-celebration:not(.defeat-celebration) .victory-hero>.victory-aura{inset:0 -30px}
@media(max-height:730px){.victory-celebration:not(.defeat-celebration) .victory-hero{height:164px}}
.victory-aura{position:absolute;inset:-25px -30px -10px;pointer-events:none}
.victory-glow,.victory-rays{position:absolute;inset:0;border-radius:50%}
.victory-glow{background:radial-gradient(circle,#ffc552aa 0%,#ffdb8366 35%,transparent 69%);animation:skill-spotlight-breathe 4s ease-in-out infinite}
.victory-rays{background:repeating-conic-gradient(from 10deg,transparent 0deg 9deg,#e8aa4077 10deg 20deg,transparent 22deg 36deg);-webkit-mask-image:radial-gradient(circle,#000 12%,#0009 40%,transparent 70%);mask-image:radial-gradient(circle,#000 12%,#0009 40%,transparent 70%);animation:skill-spotlight-turn 48s linear infinite}
.victory-star{position:absolute;width:14px;height:20px;background:var(--cream-50);filter:drop-shadow(0 0 3px #eab45c);clip-path:polygon(50% 0,63% 35%,100% 50%,63% 65%,50% 100%,37% 65%,0 50%,37% 35%);animation:skill-spotlight-twinkle 3s ease-in-out infinite}
.victory-star:nth-of-type(1){left:12%;top:42%;animation-delay:-.4s}.victory-star:nth-of-type(2){right:9%;top:28%;animation-delay:-1.6s}.victory-star:nth-of-type(3){left:29%;top:9%;width:10px;height:14px;animation-delay:-2.1s}.victory-star:nth-of-type(4){right:25%;top:72%;width:10px;height:14px;animation-delay:-.9s}.victory-star:nth-of-type(5){left:9%;top:72%;width:8px;height:12px;animation-delay:-2.4s}.victory-star:nth-of-type(6){right:26%;top:6%;width:8px;height:12px;animation-delay:-1.3s}
#modal .victory-celebration header{position:relative;width:100%}.victory-celebration .eyebrow{font:800 11px/1.3 system-ui;letter-spacing:1.8px;color:#88643a}
#modal .victory-celebration h1{font:46px/1.05 Lucky;color:var(--cream-250);-webkit-text-stroke:var(--label-stroke,.14em) #5b2d14;paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,.07em) #5b2d14) drop-shadow(0 5px 12px #79422259);margin:3px 0 2px}
.victory-detail{display:flex;align-items:center;justify-content:center;gap:8px;font:700 16px/1.35 system-ui;color:#493c39;max-width:100%;overflow-wrap:anywhere}.victory-detail .arena-emblem{width:34px;height:38px;flex:none}
#modal .victory-note{font:14px/1.4 system-ui;color:#68523e;margin:0}
.victory-loot{display:flex;justify-content:center;gap:20px;padding:10px 24px;background:var(--card-face);border:2px solid #d8bb7e;border-radius:17px;color:#655034;font:26px/1.2 Lucky}.victory-loot>span{display:flex;align-items:center;gap:7px}.victory-loot img{width:30px;height:32px;object-fit:contain}
.victory-actions{display:flex;flex-direction:column;width:100%;gap:10px;margin-top:4px}
#modal .victory-actions>button{width:100%;margin:0 0 5px;min-height:56px;font-size:26px}
#modal .victory-actions>.secondary{font-size:24px}
/* Tower Victory has no Auto switch (F20); with Auto on it only says what happens next.
   The caption wraps (balanced) instead of overflowing when a font runs wide (pl on Linux). */
#modal .victory-actions .tower-auto-caption{margin:0;font:600 14px/1.3 system-ui;color:#6d5640;text-align:center;font-variant-numeric:tabular-nums;text-wrap:balance}
#modal .victory-celebration .tower-loot{margin:0;width:100%;padding:8px;border-radius:16px;background:var(--card-face);color:#655034}
/* Visual polish v1: Victory rewards on the shared reward tiles (the Story result's Rewards panel), not a text field. */
#modal .victory-celebration .victory-rewards{width:100%;margin:0;padding:2px 10px 12px;box-sizing:border-box}
#modal .victory-celebration .victory-rewards .reward-tile::before{top:50%;width:84px;height:84px;margin:-42px 0 0 -42px}
#modal .victory-celebration .victory-rewards>h2{margin:0 0 8px;text-align:center;font:20px/1.1 Lucky,system-ui;color:var(--ink-navy)}
/* Visual polish r2 #232 (arena lane): one or two reward tiles grow 1.3x over a shared warm-gold skill spotlight born
   with them (AC695, AC640: behind the subject, clockwise only, never on Defeat).
   AC901 (owner 2026-11-18, "'tower' -> 'victory' trzeba poprawic ten akordeon - zle wyglada ten ekran calosciowo"):
   the "accordion" was #232's title ribbon, a plate with two pseudo-element tails clipped into folds, the look the owner
   retired on 2026-11-17 for every receipt. A Mountain or Arena Victory now sets its title on the shared title ribbon
   (`.victory-ribbon`, the one `--rb-art` drawing of the reward receipts, see "The title ribbon"), and the whole dialog
   uses one spacing scale: 4 / 8 / 12 / 16 / 24 px (Compact: the same steps, one step tighter between blocks).
   Max: 24 px top padding, 16 px sides and bottom, 12 px between blocks, 4 px eyebrow to ribbon, 8 px heading to
   tiles, 12 px between tiles, 16 px from the tiles to the action. Compact (730 px of height or less): 16 / 12 px
   padding, 8 px between blocks, 12 px tiles to action. Every milestone extra is a tile of the same row (3 per row at
   5 tiles, 2 at 4). `data-title="plain"` is the no-ribbon alternative (the Defeat's lettering) kept for review. */
#modal.victory-modal:has(>.victory-celebration[data-title]){padding:24px 16px 16px}
#modal .victory-celebration[data-title]{gap:12px}
.victory-celebration[data-title] .victory-hero{height:184px}
.victory-celebration[data-title] .victory-hero>.victory-aura{inset:-8px -30px -16px}
#modal .victory-celebration[data-title] header{display:flex;flex-direction:column;align-items:center;gap:4px}
#modal .victory-celebration[data-title] header>.eyebrow{display:block;margin:0}
#modal .victory-celebration[data-title] .victory-detail{gap:8px;margin:0;line-height:24px}
#modal .victory-celebration[data-title] .victory-detail>strong{font-weight:800}
.victory-detail .victory-floor-icon{flex:none;width:24px;height:24px;color:#88643a}
#modal .victory-celebration[data-title] .victory-note{margin:0}
#modal .victory-celebration[data-title] .victory-rewards{padding:0}
#modal .victory-celebration[data-title] .victory-rewards>h2{margin:0 0 8px}
#modal .victory-celebration[data-title] .victory-rewards .sr-rewards{gap:12px}
#modal .victory-celebration[data-title] .victory-rewards .sr-rewards[data-count="4"]{max-width:calc(2 * var(--tv-face,68px) + 12px);margin-inline:auto}
#modal .victory-celebration[data-title] .victory-rewards .sr-rewards:is([data-count="5"],[data-count="6"]){max-width:calc(3 * var(--tv-face,68px) + 24px);margin-inline:auto}
/* Three or more tiles: 80 px faces where the height allows (#modal's 68 px rule otherwise wins over the 78 px step). */
@media(min-height:761px){#modal .victory-celebration[data-title] .victory-rewards .sr-rewards:has(>:nth-child(3)){--tv-face:80px}#modal .victory-celebration[data-title] .victory-rewards .sr-rewards:has(>:nth-child(3)) .reward-tile-face{width:80px;height:80px;padding:11px}#modal .victory-celebration[data-title] .victory-rewards .sr-rewards:has(>:nth-child(3)) .reward-tile-count{font-size:17px}}
#modal .victory-celebration[data-title] .victory-actions{gap:8px;margin-top:4px}
#modal .victory-celebration[data-title] .victory-actions>button{margin:0 0 4px}
/* The ribbon: the receipts' size and lettering; it unfolds once after the hero (reduced motion: still). */
#modal .victory-celebration[data-title=ribbon] .victory-ribbon{z-index:1;width:calc(100% - 68px);max-width:440px;padding:7px 18px 9px;animation:reward-ribbon-in .34s cubic-bezier(.2,.9,.3,1.3) .18s both}
#modal .victory-celebration[data-title=ribbon] h1{margin:0;color:var(--cream-50);font:31px/1.05 Lucky,system-ui;text-align:center;letter-spacing:.02em;white-space:nowrap;-webkit-text-stroke:var(--label-stroke,.14em) var(--ink-brown);paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,.07em) 0 var(--ink-brown)) drop-shadow(0 2px 8px #3a241466);overflow-wrap:normal}
#modal .victory-celebration[data-title=plain] h1{margin:0}
@media(max-height:730px){
 #modal.victory-modal:has(>.victory-celebration[data-title]){padding:16px 16px 12px}
 #modal .victory-celebration[data-title]{gap:8px}
 .victory-celebration[data-title] .victory-hero{height:136px}
 .victory-celebration[data-title] .victory-hero>.victory-aura{inset:-8px -30px -12px}
 #modal .victory-celebration[data-title=ribbon] .victory-ribbon{padding:6px 16px 8px}
 #modal .victory-celebration[data-title=ribbon] h1{font-size:28px}
 #modal .victory-celebration[data-title] .victory-actions{margin-top:4px}
}
@media(prefers-reduced-motion:reduce){#modal .victory-celebration[data-title=ribbon] .victory-ribbon{animation:none}}
/* #232: use the AC695 shared component and cream palette, born with the Arena/Tower tile row. */
#modal .victory-reward-row{position:relative;isolation:isolate;width:max-content;max-width:100%;margin-inline:auto}
#modal .victory-reward-light{position:absolute;inset:0;pointer-events:none;--lb-size:160%;--lb-delay:0s}
@media(min-height:761px){#modal .victory-celebration .victory-rewards .sr-rewards:is([data-count="1"],[data-count="2"]) .reward-tile-face{width:92px;height:92px;padding:13px}#modal .victory-celebration .victory-rewards .sr-rewards:is([data-count="1"],[data-count="2"]) .reward-tile-count{font-size:19px}}
#modal:is(.victory-modal,.defeat-modal)>.receipt-dismiss{position:absolute;top:4px;right:4px;width:44px;min-height:44px;padding:0;margin:0;border:0;background:none;box-shadow:none;color:#806847;font:30px/1 system-ui;text-shadow:none;-webkit-text-stroke:0}
#modal:is(.victory-modal,.defeat-modal)>.receipt-dismiss:before,#modal:is(.victory-modal,.defeat-modal)>.receipt-dismiss:after{display:none}
@keyframes victory-hero-enter{from{opacity:0;transform:translateY(14px) scale(.85)}to{opacity:1;transform:none}}
/* The same composition turns quiet after a defeat: cool light, softer motes,
   a tired hero. The character still enters as the result lands, not on polls. */
#modal.defeat-modal{width:min(390px,calc(100vw - 32px));padding:24px 20px 20px;border:3px solid #9a9db6;border-radius:30px;background:radial-gradient(ellipse at 50% 12%,#f7f5ee 0%,#e6e4e7 53%,#c6c8d6 100%);box-shadow:0 8px 0 #66667b,0 24px 70px #0008;overflow:visible;max-height:calc(100dvh - var(--safe-top, env(safe-area-inset-top,0px)) - var(--safe-bottom, env(safe-area-inset-bottom,0px)) - 32px)}
#modal.defeat-modal::backdrop{background:#101827ba;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
.defeat-celebration .victory-glow{background:radial-gradient(circle,#c8d3e5a8 0%,#b8bed381 35%,transparent 69%);animation:skill-spotlight-breathe 5s ease-in-out infinite}
.defeat-celebration .victory-rays{background:repeating-conic-gradient(from 10deg,transparent 0deg 16deg,#a1a9c157 17deg 25deg,transparent 26deg 45deg);opacity:.55;animation:skill-spotlight-turn 72s linear infinite}
.defeat-celebration .victory-star{background:#f5f5ff;filter:drop-shadow(0 0 3px #a8acc5);opacity:.7}
.defeat-celebration .victory-hero>img{filter:drop-shadow(0 7px 3px #62637b48);animation:defeat-hero-enter .65s cubic-bezier(.16,1,.3,1) both}
.defeat-celebration .eyebrow{color:#5d6179}
#modal .defeat-celebration h1{color:#f9f4f4;-webkit-text-stroke:var(--label-stroke,.14em) #353450;filter:drop-shadow(0 var(--label-drop,.07em) #353450) drop-shadow(0 5px 12px #4c4b6859)}
.defeat-celebration .victory-detail{color:#44465a}#modal .defeat-celebration .victory-note{color:#5d5f73}
.defeat-celebration .victory-loot{background:#f9f8f2;border-color:#b2b4c5;color:#4b4c60}
#modal.defeat-modal>.receipt-dismiss{color:#5f6176}
@keyframes defeat-hero-enter{from{opacity:0;transform:translateY(-10px) rotate(-5deg) scale(.92)}65%{opacity:1;transform:translateY(7px) rotate(2deg)}to{opacity:1;transform:none}}
@media(max-height:730px){#modal:is(.victory-modal,.defeat-modal){padding:18px 16px 14px}.victory-celebration{gap:9px}.victory-hero{width:170px;height:124px}.victory-hero>img{width:130px;height:120px}#modal .victory-celebration h1{font-size:42px}.victory-actions{gap:8px}}
@media(prefers-reduced-motion:reduce){.victory-hero *{animation:none!important;transition:none!important}}

/* Permanent unlocks are revealed one at a time after the Story result. */
#modal.discovery-modal{width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - var(--safe-top, env(safe-area-inset-top,0px)) - var(--safe-bottom, env(safe-area-inset-bottom,0px)) - 24px);overflow:hidden;padding:20px 18px 18px;border:3px solid #d6af68;border-radius:27px;background:radial-gradient(ellipse at 50% 15%,var(--card-face),var(--cream-300) 60%,#eacb94);box-shadow:0 7px #8c6546,0 22px 60px #0007}
#modal.discovery-modal::backdrop{background:#101827ad;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
.discovery-card{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;outline:none}
.discovery-eyebrow{color:#866138;font:800 11px/1.2 system-ui;letter-spacing:2px}
.discovery-art{position:relative;isolation:isolate;display:grid;place-items:center;width:148px;height:145px;flex:none}
.discovery-art:before{content:'';position:absolute;inset:5px;border-radius:50%;background:radial-gradient(circle,#fff3ad 7%,#ffce687a 38%,transparent 72%);animation:skill-spotlight-breathe 4s ease-in-out infinite}
.discovery-rays{position:absolute;z-index:-1;inset:-30%;border-radius:50%;background:repeating-conic-gradient(#ebad4d88 0deg 13deg,transparent 14deg 31deg);-webkit-mask-image:radial-gradient(circle,transparent 20%,#0009 40%,transparent 72%);mask-image:radial-gradient(circle,transparent 20%,#0009 40%,transparent 72%);animation:skill-spotlight-turn 44s linear infinite}
.discovery-art img{position:relative;width:118px;height:118px;object-fit:contain;filter:drop-shadow(0 6px 2px #9b682e55);animation:victory-hero-enter .55s cubic-bezier(.16,1,.3,1) both}
#modal .discovery-card h1{margin:0;color:#2e4051;font:34px/1.04 Lucky;-webkit-text-stroke:0;filter:drop-shadow(0 2px #fff9de)}
[data-discovery-id="treasures"] .discovery-art:before{background:radial-gradient(circle,#d3f7ef 7%,#8bcfbb88 40%,transparent 72%)}
/* S08 (build 28): Outfit and Boots, the two item cutouts overlapping (outfit
   behind, boots in front), entering like every discovery art. */
[data-discovery-id="wardrobe"] .discovery-art img{position:absolute;width:62%;height:62%}
[data-discovery-id="wardrobe"] .discovery-art .discovery-wardrobe-outfit{left:6%;top:8%}
[data-discovery-id="wardrobe"] .discovery-art .discovery-wardrobe-boots{right:4%;bottom:6%;width:54%;height:54%;animation-delay:.12s}
#modal .discovery-card p{margin:0;max-width:315px;color:#55483c;font:600 14px/1.45 system-ui}
.discovery-remaining{color:#907154;font:700 11px/1.25 system-ui}
.discovery-actions{width:100%;margin-top:6px}
#modal .discovery-actions>.primary,#modal.discovery-modal>[data-action="discovery-later"]{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--tier-full-h);margin:0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky}
#modal.discovery-modal>[data-action="discovery-later"]{margin-top:10px}
@media(max-height:730px){#modal.discovery-modal{padding:12px 15px}.discovery-card{gap:6px}.discovery-art{width:112px;height:104px}.discovery-art img{width:92px;height:92px}#modal .discovery-card h1{font-size:29px}#modal .discovery-card p{font-size:13px}}
@media(prefers-reduced-motion:reduce){.discovery-art *,.discovery-art:before{animation:none!important}}

/* Energy is an optional, server-quoted Gem purchase in the resource header. */
#modal:has(.energy-purchase){width:min(390px,calc(100vw - 28px));padding:12px;border:3px solid #b49363;border-radius:25px;background:linear-gradient(var(--cream-200),#f1ddb5);box-shadow:0 6px #785b42,0 18px 55px #0008}
.energy-purchase{display:flex;flex-direction:column;align-items:stretch;gap:10px;color:#514339;text-align:center}
#modal .energy-purchase h1{margin:0;color:#324052;font:34px/1.1 Lucky}
.energy-purchase-balance{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;border-radius:16px;background:#292a39;color:var(--cream-200)}
.energy-purchase-balance img{width:30px;height:36px;object-fit:contain}
.energy-purchase-balance strong{font:28px/1 Lucky}
.energy-purchase-balance span{font:700 12px/1.2 system-ui;color:#e4d4b6}
.energy-purchase-offer{display:grid;grid-template-columns:48px minmax(0,1fr) 104px;align-items:center;gap:8px;min-height:106px;padding:10px;border:2px solid #c9aa70;border-radius:17px;background:var(--paper);box-shadow:inset 0 2px #fff,0 3px #bca075}
/* AC470 (build 106 feedback): each card's Energy is the shared neutral item tile
   (Backpack face, ink outline, hard drop, centred ×N count), never a tinted plate. */
#modal .energy-purchase-offer>.energy-purchase-tile{box-sizing:border-box;width:48px;height:48px;min-width:48px;min-height:48px;margin:0;padding:0;cursor:default;pointer-events:none}
.energy-purchase-details{display:flex;flex-direction:column;gap:5px;min-width:0;text-align:left}
.energy-purchase-details b{font:22px/1.1 Lucky;color:#31435a}
.energy-purchase-details small{font:700 12px/1.3 system-ui;color:#795d3e}
.energy-purchase-price{display:flex;align-items:center;justify-content:center;gap:7px;font:inherit;color:inherit}
.energy-purchase-price img{width:18px;height:18px;object-fit:contain}
#modal .energy-purchase-note{min-height:34px;margin:0;color:#6d5c4b;font:600 13px/1.3 system-ui}
/* AC390: existing compact secondary tier: 32px face / 16px label in a 44px target. */
.energy-purchase-heading{display:flex;align-items:center;justify-content:center;gap:8px}
#modal button.energy-offer-action.secondary.button-compact{width:104px;height:44px;min-height:44px;margin:0;padding:4px 6px}
#modal .energy-buy:not(:disabled){--small-top:var(--active-top);--small-bottom:var(--active-bottom);--small-edge:var(--active-edge);--small-lip:var(--active-lip);--small-shine:var(--active-shine)}
#modal .energy-offer-action .button-label{white-space:nowrap}
#modal .energy-purchase-price b{font:inherit}
#modal:has(.energy-purchase)>[data-action="dismiss"]{width:100%;min-height:var(--tier-full-h);margin:4px 0 0;font-size:var(--tier-full-fs)}
@media(max-width:380px){.energy-purchase-details b{font-size:20px}}
@media(max-height:730px){#modal:has(.energy-purchase){padding:12px}.energy-purchase{gap:7px}.energy-purchase-offer{min-height:106px}}

/* Bamboo Exchange uses a bounded detail so the quantity and total stay visible. */
#modal:has(.exchange-offer-detail){width:min(390px,calc(100vw - 28px));padding:16px;border:3px solid #b49363;border-radius:23px;background:linear-gradient(var(--cream-200),#f1ddb5);box-shadow:0 6px #785b42,0 18px 55px #0008}
#modal .exchange-offer-detail{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
#modal .exchange-offer-detail h1{font-size:26px;line-height:1.08;margin:0}
#modal .exchange-detail-art{height:82px;width:92px;display:grid;place-items:center}
#modal .exchange-detail-art img{display:block;width:76px;height:76px;object-fit:contain}
#modal .exchange-detail-limit,#modal .exchange-space{margin:0;font:700 13px/1.25 system-ui;color:#65513c}
/* AC45 (build 44): every quantity row (label, −, value, +, Max) is centred in its dialog. */
/* AC75 (build 49, ASC AJrF2k7w9LZrErSJ2m6iyRk): − and + are 56px wide (52px tall) touch
   targets, wider than the 44px minimum, in every quantity row. */
/* AC537 (build 125 feedback, owner: "globalnie bardziej kompaktowo i dać min"): every quantity row is one compact
   stepper [Min] [−] value [+] [Max] (uiQuantityStepper): 44px faces (the compact tier, still 44px targets) with 4px
   gaps, Min mirroring Max. Supersedes AC75's 56px-wide, 52px-tall − and +. */
#modal .exchange-stepper{display:grid;grid-template-columns:minmax(64px,max-content) 44px minmax(52px,1fr) 44px minmax(64px,max-content);gap:4px;align-items:center;width:100%;max-width:312px;margin-inline:auto;justify-self:center;align-self:center}
#modal .exchange-stepper>span{grid-column:1/-1;font:800 12px/1.2 system-ui;color:#5c4938;text-align:center}
#modal .exchange-stepper>button{width:100%;min-width:0;height:var(--tier-compact,44px);min-height:var(--tier-compact,44px);margin:0;padding:2px 3px;font-size:17px}
/* AC537 review (build 126): Min and Max are at least 64px wide with 10px side padding (Polish "Maks." keeps >=8px a side). */
#modal .exchange-stepper>button:is(:first-of-type,:last-of-type){min-width:64px;padding-inline:10px;white-space:nowrap}
#modal .exchange-stepper>button:is(:nth-of-type(2),:nth-of-type(3)){font-size:22px}
#modal .exchange-stepper>output{display:grid;place-items:center;box-sizing:border-box;height:40px;min-width:0;border:2px solid #a88c65;border-radius:11px;background:var(--paper);color:#334356;font:800 19px/1 system-ui;font-variant-numeric:tabular-nums}
/* AC818 (build 184, "Ile tych powtórzeń? Zrób lepiej"): the wallet once (the Bamboo icon and the balance, red when it
   cannot pay, the Moonleaf sheet's wallet line) and the price once, under the Exchange label like every priced action. */
#modal .exchange-balance{display:flex;align-items:center;justify-content:center;gap:6px;margin:2px 0 0;font:700 15px/1.3 system-ui;color:#65543e;font-variant-numeric:tabular-nums}
#modal .exchange-balance>img{width:24px;height:24px;object-fit:contain}
#modal .exchange-balance.is-short{color:#b3261e;font-weight:800}
#modal:has(.exchange-offer-detail)>.equipment-actions button:has(>.exchange-cost){display:flex;flex-direction:column;align-items:center}
#modal:has(.exchange-offer-detail)>.equipment-actions .exchange-cost{display:flex;align-items:center;justify-content:center;column-gap:7px;font:19px/1 Lucky,system-ui;color:var(--cream-50);-webkit-text-stroke:var(--label-stroke) var(--small-edge);paint-order:stroke fill;text-shadow:none}
#modal:has(.exchange-offer-detail)>.equipment-actions .exchange-cost>img{width:24px;height:24px;object-fit:contain}
#modal:has(.exchange-offer-detail)>.equipment-actions .exchange-cost>b{font:inherit}
#modal .exchange-unavailable{margin:0;color:#9b4339;font:800 13px/1.2 system-ui}
#modal:has(.exchange-offer-detail)>.equipment-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
#modal:has(.exchange-offer-detail)>.equipment-actions button{min-height:var(--tier-full-h);width:100%;margin:0;padding:6px;font-size:var(--tier-full-fs)}
@media(max-height:730px){#modal:has(.exchange-offer-detail){padding:10px}#modal .exchange-offer-detail{gap:5px}#modal .exchange-detail-art{height:64px}#modal .exchange-detail-art img{height:60px}}

/* Treasures: the lit scan band is a clue, while the revealed footprint reads
   as one find. Queued taps stay visible without locking the whole board. */
.miner-view .tile.queued:not(.opened){border-color:#ffe2a1;box-shadow:inset 0 0 0 2px #ffe2a1,0 0 10px #ffd26688}
/* Buried Treasures: one chest image sliced across its footprint; finds wait to be tapped. */
.miner-view .tile.opened.treasure-part{background:var(--treasure-art) var(--treasure-x) var(--treasure-y)/var(--treasure-size-x) var(--treasure-size-y) no-repeat border-box,radial-gradient(circle at 50% 45%,#6d5431,var(--ink-plum) 78%);border-color:#d6ad62;box-shadow:inset 0 0 0 1px #ffe6a044,0 2px #1b1724;opacity:1}
/* The ready pulse fades a fixed brighter glow layer (opacity only, no per-frame
   box-shadow repaint); the empty tile lets that outer glow overflow. */
.miner-view .tile.opened.treasure-ready{overflow:visible;border-color:var(--gold-100);box-shadow:0 0 0 2px #ffcf5a,0 0 14px #ffd46acc}
.miner-view .tile.treasure-ready:after{content:'';position:absolute;inset:-2px;border-radius:inherit;box-shadow:0 0 0 2px var(--shine-100),0 0 22px #ffe487;opacity:0;pointer-events:none;animation:treasure-ready-glow 1.2s ease-in-out infinite alternate}
@keyframes treasure-ready-glow{to{opacity:1}}
/* G06 (build 21): a fully uncovered treasure is one unbroken, framed chest over
   its footprint (spans the cells and their gaps) and the only tap target. The
   sliced parts fade out beneath it; the merge plays once (.is-merging). */
.miner-view .dig-grid .treasure-whole{position:relative;z-index:2;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:3px;border:2px solid var(--gold-100);border-radius:11px;background:radial-gradient(circle at 50% 45%,#6d5431,var(--ink-plum) 78%);box-shadow:0 0 0 2px #ffcf5a,0 0 14px #ffd46acc;overflow:visible;cursor:pointer;-webkit-tap-highlight-color:transparent}
/* Absolute art never feeds the grid's row sizing: the square tiles size the rows. */
.miner-view .dig-grid .treasure-whole>img{position:absolute;inset:4px;width:calc(100% - 8px);height:calc(100% - 8px);max-width:none;max-height:none;object-fit:contain;margin:0;filter:drop-shadow(0 3px 3px #0008);pointer-events:none}
.miner-view .dig-grid .treasure-whole:after{content:'';position:absolute;inset:-2px;border-radius:inherit;box-shadow:0 0 0 2px var(--shine-100),0 0 24px #ffe487;opacity:0;pointer-events:none;animation:treasure-ready-glow 1.2s ease-in-out infinite alternate}
.miner-view .dig-grid .treasure-whole:active{scale:.97}
.miner-view .tile.treasure-part.is-merged{opacity:0;box-shadow:none;pointer-events:none}
.miner-view .tile.treasure-part.is-merged:after{content:none}
.miner-view .dig-grid:has(.treasure-whole.is-merging) .tile.treasure-part.is-merged{animation:treasure-parts-join .45s ease-in var(--merge-delay,0ms) both}
@keyframes treasure-parts-join{from{opacity:1;scale:1}to{opacity:0;scale:.9}}
/* --merge-delay (client.js treasureMergeDelay): waits for the last dig's burst,
   negative when a re-render resumes a running merge. */
.miner-view .dig-grid .treasure-whole.is-merging{animation:treasure-whole-in .55s cubic-bezier(.16,1,.3,1) calc(.12s + var(--merge-delay,0ms)) both}
.miner-view .dig-grid .treasure-whole.is-merging:after{animation-delay:calc(.7s + var(--merge-delay,0ms))}
.miner-view .dig-grid .treasure-whole.is-merging:before{content:'';position:absolute;z-index:1;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(115deg,transparent 30%,#fff7d488 48%,transparent 66%) -150% 0/250% 100% no-repeat;animation:treasure-whole-shine .6s ease-out calc(.45s + var(--merge-delay,0ms)) both}
@keyframes treasure-whole-in{from{opacity:0;scale:.94}to{opacity:1;scale:1}}
@keyframes treasure-whole-shine{to{background-position:150% 0}}
body:has(#modal[open]) .miner-view .dig-grid .treasure-whole:after{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.miner-view .dig-grid .treasure-whole,.miner-view .dig-grid .treasure-whole:before,.miner-view .dig-grid .treasure-whole:after,.miner-view .dig-grid .tile.treasure-part.is-merged{animation:none!important}.miner-view .dig-grid .treasure-whole:before{content:none}}
.miner-view .tile.opened.loot{border-color:#b3965f;background:radial-gradient(circle at 50% 45%,#71603f,var(--ink-plum) 74%)}
.miner-view .tile.loot img{width:78%;height:78%;max-width:36px;max-height:36px;animation:treasure-loot-bob 1.4s ease-in-out infinite alternate}
@keyframes treasure-loot-bob{to{transform:translateY(-3px)}}
/* G05: every find collected by one tap rises out of its cell together. */
.miner-find-fly{position:fixed;z-index:30;pointer-events:none;object-fit:contain;filter:drop-shadow(0 3px 5px #0008)}
/* Dig strike, hammer v2 (owner 2026-09-27): a fixed, pointer-transparent layer
   over the tapped tile and two pooled particle layers (under / over the hammer),
   all outside the board's layout (no shift). client.js drives only transform and
   opacity: swing, smear, flash, sparks, two-stage cracks, squash, shake, chunks
   cut from the tile's own stone, dust, pebbles, glint, ring and sparkles. */
.miner-dig-fx{position:fixed;z-index:25;pointer-events:none;contain:layout style}
.miner-dig-fx *,.miner-dig-particles *{pointer-events:none}
.miner-dig-rock,.miner-dig-cover{position:absolute;inset:0;box-sizing:border-box;margin:0}
.miner-dig-cover{overflow:hidden}
.miner-dig-cover>i{position:absolute;inset:5px;border-radius:5px 13px 5px 12px;background:linear-gradient(135deg,#c1b3ba33,transparent 45%);border-top:1px solid #d4c5ca55}
.miner-dig-crack{position:absolute;inset:0;width:100%;height:100%;overflow:visible;opacity:0;fill:none;stroke:#1d1724;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 0 #d9ccd566)}
.miner-dig-crack.is-deep{stroke-width:3.2}
.miner-dig-hammer{position:absolute;max-width:none;max-height:none;margin:0;opacity:0;transform-origin:26% 80%;filter:drop-shadow(0 3px 3px #0009);will-change:transform,opacity}
.miner-dig-smear{position:absolute;opacity:0;background:conic-gradient(from 0deg at 26% 80%,#fff0 0deg,#fff2 50deg,#fffbe8c8 104deg,#fff0 113deg,#fff0 360deg)}
.miner-dig-particles{position:fixed;inset:0;z-index:24;pointer-events:none;overflow:hidden;contain:strict}
.miner-dig-particles.is-over{z-index:26}
.miner-p{position:absolute;box-sizing:border-box;margin:0;opacity:0;will-change:transform,opacity}
.miner-dig-flash{border-radius:50%;background:radial-gradient(circle,#fff 0,#fffbeaee 22%,#ffe7a077 42%,#ffe7a000 66%)}
.miner-dig-flash.is-gold{background:radial-gradient(circle,#fff6d0 0,#ffd46acc 28%,#ffb33a55 48%,#ffb33a00 68%)}
.miner-dig-chunk{background:#211a29}
.miner-dig-chunk>b{position:absolute;inset:0;box-sizing:border-box}
.miner-dig-spark{border-radius:2px;background:linear-gradient(#fff,#ffe58a 45%,#ff9d2e00)}
.miner-dig-dust{border-radius:50%;background:radial-gradient(circle,#e6d9cfd0,#b9a9b070 45%,#b9a9b000 70%)}
.miner-dig-pebble{border-radius:35%;background:#5a4f63;box-shadow:inset 1px 1px #a99caa}
.miner-dig-glint{overflow:hidden;border-radius:8px}
.miner-dig-glint>b{position:absolute;top:-20%;bottom:-20%;left:0;width:45%;background:linear-gradient(90deg,#fff0,#fffbe6d0 50%,#fff0)}
.miner-dig-ring{border-radius:50%;border:3px solid var(--gold-100);box-shadow:0 0 12px #ffd46acc,inset 0 0 8px #fff1b888}
.miner-dig-sparkle{background:radial-gradient(circle,#fff 0,#fff3b0 35%,#ffcf5a 60%);clip-path:polygon(50% 0,64% 36%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 36%)}
@media(prefers-reduced-motion:reduce){.miner-dig-fx,.miner-dig-particles{display:none}}
body:has(#modal[open]) .miner-view .tile.treasure-ready:after,body:has(#modal[open]) .miner-view .tile.loot img{animation-play-state:paused}
.mining-charge-well .mining-counter{display:grid;gap:1px;min-width:0}
.mining-charge-well .mining-counter small{max-width:none;text-align:left}
.mining-charge-well .mining-scans{justify-items:end}.mining-charge-well .mining-scans small{text-align:right}
@media(prefers-reduced-motion:reduce){.miner-view .tile.treasure-ready:after,.miner-view .tile.loot img{animation:none}}
#modal.hub-reward-modal:has(.treasure-panel)>[data-action="dismiss"]{display:none}
#modal.treasure-reveal-modal{width:min(460px,calc(100vw - 20px));min-height:min(310px,calc(100dvh - var(--safe-top, env(safe-area-inset-top,0px)) - var(--safe-bottom, env(safe-area-inset-bottom,0px)) - 30px));padding:0;gap:0;overflow:hidden;border:3px solid #201d28;border-radius:21px;background:radial-gradient(ellipse at 50% 25%,#594423 0%,var(--ink-plum-2) 68%);box-shadow:0 0 0 3px #e2ac4c,0 18px 45px #0f0b1dc9;color:var(--cream-300)}
#modal.treasure-reveal-modal::backdrop{background:#100e18d9;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
/* The panel clips its own banner corners and card pops: the dialog stays
   overflow-visible for the dismiss hint beneath it (F01). */
.treasure-reveal{position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:center;isolation:isolate;flex:1;min-height:304px;padding:0 14px 16px;overflow:hidden;border-radius:18px;text-align:center;animation:treasure-reveal-enter .38s cubic-bezier(.17,.84,.32,1.2) both}
.treasure-reveal:before{content:"";position:absolute;z-index:-1;inset:24px 0 47px;background:radial-gradient(circle at 50% 50%,#f9dd7552,transparent 65%);pointer-events:none}
.treasure-reveal h1{position:relative;width:calc(100% - 20px);min-height:67px;display:grid;place-items:center;margin:-1px 0 4px;border:3px solid #533319;border-radius:0 0 15px 15px;background:linear-gradient(#ffdb70,#ffb93e 70%,#e39430);box-shadow:inset 0 3px var(--shine-100),0 5px #a9682f;color:var(--cream-50);font:clamp(29px,8vw,39px)/1 Lucky;-webkit-text-stroke:var(--label-stroke) #513427;paint-order:stroke fill;text-shadow:none}
.treasure-reveal-items{display:flex;justify-content:center;align-items:center;gap:clamp(10px,4vw,20px);width:100%;min-height:154px;padding:9px 2px 0}
.treasure-reveal-card{display:grid;grid-template-rows:1fr auto auto;justify-items:center;align-items:center;width:min(125px,38%);height:137px;padding:8px 5px 9px;border:4px solid #211d28;border-radius:16px;background:linear-gradient(#d7ec77,#79b842);box-shadow:inset 0 3px #ffffcf,0 6px var(--panel-night);animation:treasure-reward-pop .56s calc(.12s + var(--reward-order)*.12s) cubic-bezier(.18,.85,.3,1.3) both}
.treasure-reveal-card.gem{background:linear-gradient(#eed0ff,#a472dc)}
.treasure-reveal-card img{width:68px;height:72px;object-fit:contain;filter:drop-shadow(0 3px 1px #15212277)}
/* F06: one scaled stroke behind the fill plus one drop, like the button labels;
   four offset shadow copies ghosted in WebKit. */
.treasure-reveal-card strong{color:var(--cream-50);font:27px/1 Lucky;-webkit-text-stroke:var(--label-stroke) var(--ink-plum-2);paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop) var(--ink-plum-2))}
.treasure-reveal-card small{color:var(--ink-plum);font:800 12px/1.1 system-ui}
.treasure-reveal p{margin:5px 0 0;color:#f5e3b4;font:700 13px/1.2 system-ui}
.treasure-reveal-hit{position:absolute;inset:0;z-index:2;width:100%;height:100%;padding:0;margin:0;border:0;border-radius:17px;background:transparent;box-shadow:none;cursor:pointer}
.treasure-reveal-hit:is(:active,.is-pressed){transform:none}.treasure-reveal-hit:focus-visible{outline:3px solid #fff4b8;outline-offset:-6px}
.treasure-reveal-sparkles{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.treasure-reveal-star{position:absolute;color:#fff9c6;font:23px/1 Lucky;filter:drop-shadow(0 0 11px #fff7ac) drop-shadow(0 0 5px #fff)}
.treasure-reveal-star:before{content:"✦"}.treasure-reveal-star.star-1{left:12%;top:29%;animation:treasure-twinkle 1.5s .1s infinite}.treasure-reveal-star.star-2{left:27%;top:66%;font-size:14px;animation:treasure-twinkle 1.7s .4s infinite}.treasure-reveal-star.star-3{left:78%;top:27%;animation:treasure-twinkle 1.4s .6s infinite}.treasure-reveal-star.star-4{left:88%;top:63%;font-size:16px;animation:treasure-twinkle 1.8s .25s infinite}.treasure-reveal-star.star-5{left:45%;top:25%;font-size:11px;animation:treasure-twinkle 1.6s .7s infinite}.treasure-reveal-star.star-6{left:9%;top:77%;font-size:10px;animation:treasure-twinkle 1.9s .9s infinite}.treasure-reveal-star.star-7{left:67%;top:81%;font-size:12px;animation:treasure-twinkle 1.7s .3s infinite}.treasure-reveal-star.star-8{left:54%;top:57%;font-size:9px;animation:treasure-twinkle 1.3s .8s infinite}.treasure-reveal-star.star-9{left:92%;top:40%;font-size:10px;animation:treasure-twinkle 2s .5s infinite}
@keyframes treasure-reveal-enter{from{opacity:0;transform:translateY(12px) scale(.94)}to{opacity:1;transform:none}}
@keyframes treasure-reward-pop{from{opacity:0;transform:translateY(38px) scale(.55) rotate(-7deg)}to{opacity:1;transform:none}}
@keyframes treasure-twinkle{0%,100%{opacity:.2;transform:scale(.65)}45%{opacity:1;transform:scale(1.15)}}
@media(max-height:730px){.treasure-reveal{min-height:260px}.treasure-reveal h1{min-height:54px}.treasure-reveal-items{min-height:133px}.treasure-reveal-card{height:115px}.treasure-reveal-card img{height:54px;width:58px}.treasure-reveal-card strong{font-size:23px}}
@media(prefers-reduced-motion:reduce){.treasure-reveal,.treasure-reveal-card,.treasure-reveal-star{animation:none!important}}
#modal .treasure-exit{display:grid;gap:12px;text-align:center}
#modal .treasure-exit h1,#modal .treasure-exit p{margin:0}
#modal .treasure-exit label{display:flex;align-items:center;gap:8px;justify-content:center;font:700 14px/1.3 system-ui}
#modal .treasure-exit-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#modal .treasure-exit-actions button{min-height:56px;width:100%;margin:0;font-size:21px}
/* K10: Resume or Abandon an adventure left mid-run. Resume is the full-width primary. */
#modal .unfinished-run{display:grid;gap:12px;text-align:center}
#modal .unfinished-run h1,#modal .unfinished-run p{margin:0}
#modal .unfinished-run .unfinished-run-where{font:800 15px/1.3 system-ui,-apple-system,sans-serif;color:#7a5a2c}
/* N01 (build 26): Resume is a normal 56px/24px full action, not the 66px hero size,
   and Abandon sits 20px below its face (14px clear of its 6px lip). */
#modal .unfinished-run-actions{display:grid;gap:20px;margin-top:4px}
#modal .unfinished-run-actions button{width:100%;margin:0}
#modal .unfinished-run-actions button.primary{min-height:var(--tier-full-h);font-size:var(--tier-full-fs);padding:8px 16px}
/* N02: the confirm's Back is the shared grey Back arrow beside Abandon run. */
#modal .unfinished-run-actions.paired{grid-template-columns:84px 1fr;gap:10px;align-items:start}
#modal .unfinished-run-actions.paired button{min-height:56px;font-size:21px;padding:8px 10px}
#modal .unfinished-run-actions .back-arrow{display:grid;place-items:center;height:56px;padding:3px;border:2px solid var(--ink-plum-2);border-radius:15px;background:linear-gradient(145deg,#aaa2b8,#857d99 70%,#79718b);box-shadow:inset 0 2px 0 #d9d0e1,inset 2px 0 0 #bcb2c9,inset -2px -3px 0 #6c637d,0 3px 0 var(--panel-night)}
#modal .unfinished-run-actions .back-arrow svg{width:52px;height:36px;overflow:visible}
#modal .hub-rewards-panel[data-panel="afk"]>.primary{min-height:56px;margin:8px 0 0}
/* AC253 / AC926: a transparent shell reserves room above the visible AFK plate (the title ribbon rides its top edge).
   The plate is the dialog's ::before. */
#modal:has([data-panel="afk"]){isolation:isolate;border-color:transparent;background:none;box-shadow:none;padding-top:40px;overflow:visible;max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 24px)}
#modal:has([data-panel="afk"]):before{content:'';position:absolute;inset:24px 0 0;z-index:-1;pointer-events:none;border:3px solid #bd9a5d;border-radius:23px;background:linear-gradient(var(--cream-200),#e7cda0);box-shadow:0 6px 24px #0006}
/* AC258: centered heroes rise above the visible plate in a reserved header
   footprint; C titles follow the delivered 1024x640 ribbon centers. */
.dialog-hero-art{position:absolute;left:50%;top:-82px;translate:-50% 0;width:288px;height:180px;max-width:none;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 2px #10192d66);z-index:0}
#modal:has([data-dialog-hero]):before{top:82px}
#modal:has(.key-offers-panel[data-dialog-hero]):before{top:82px}
#modal:has(.key-offers-panel[data-dialog-hero]){padding-top:92px}
#modal .key-offers-panel[data-dialog-hero] .key-offer-title{overflow:visible;isolation:isolate}
#modal [data-dialog-hero] header h1{z-index:1}
#modal .key-offers-panel[data-dialog-hero="c"] .key-offer-title{background:none;border-color:transparent}

/* Lead-selected C: the scene owns the ribbon; no second painted plaque.
   The help target stays in the transparent upper-right margin of the scene. */
#modal [data-dialog-hero="c"] .dialog-hero-art{width:300px;height:187.5px}
#modal .key-offers-panel[data-dialog-hero="c"] .key-offer-title{height:130px}
#modal [data-dialog-hero] header .help-button{top:-72px}
#modal [data-dialog-hero="c"] header h1{position:absolute;left:50%;right:auto;top:71px;bottom:auto;translate:-50% -50%;width:192px;max-width:none;margin:0;padding:0;border:0;background:none;text-align:center;font:24px/1 Lucky,system-ui;font-size:var(--dialog-hero-title-size,24px)!important;letter-spacing:0;white-space:nowrap;word-break:keep-all;overflow-wrap:normal}

/* Each delivered ribbon has its own painted vertical center. */
#modal .key-offers-panel[data-dialog-hero="c"]:has([data-dialog-hero-name="gear"]) header h1{top:80px}

/* Event choices use one illustrated composition instead of plain stacked bars. */
#modal:has(.events-panel){background:linear-gradient(165deg,var(--cream-200),var(--row-inset));overflow:hidden}
#modal .events-header{position:relative;overflow:hidden;margin:-16px -16px 12px;padding:16px 18px 14px;background:radial-gradient(circle at 90% 15%,#8bbaad88,transparent 44%),linear-gradient(135deg,#274854,#223146);border-bottom:3px solid #b58d5d;color:var(--cream-300)}
#modal .events-header:after{content:'✦';position:absolute;right:20px;top:5px;font:48px Lucky;color:#f8d78244}
#modal .events-header .eyebrow{color:#f6cf8b}
/* Visual polish r2 (finding 206): the painted Events emblem (the Home Events shortcut art) replaces the faint
   star decor; a locked card reads as one line: padlock + the adventure to complete. */
#modal .events-header:after{content:none}
#modal .events-header{padding-right:68px}
#modal .events-header>.events-header-emblem{position:absolute;right:16px;top:50%;translate:0 -50%;width:44px;height:44px}
#modal .events-header>.events-header-emblem>img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 0 #10202a)}
#modal .events-panel .event-card-copy small.event-card-unlock{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap}
#modal .events-panel .event-card-copy small.event-card-unlock>.ui-icon{flex:none;width:15px;height:15px}
#modal .events-panel .event-card-copy small.event-card-unlock>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* The panel spans the dialog's padding so the header bleed stays inside it (no inner overflow). */
#modal .events-panel{margin:-16px -16px 0;padding:16px 16px 8px}
#modal .events-header h1{margin:2px 0 0;color:var(--cream-200)}
#modal .events-panel .event-pages{gap:10px}
/* Every Events card has one height (a two-line title, or a one-line title with a
   two-line blurb and a two-line event tag, fits in every shipped language), and a
   paged list reserves three card rows, so Previous/Next and Close never jump
   between pages. The pager keeps the card gap (7px + the face's 3px margin) above its faces. */
#modal .events-panel .event-pages>.event-card{min-height:108px}
#modal .events-panel .event-pages.is-paged{grid-template-rows:repeat(3,108px)}
#modal .events-panel .paired-pager{margin-top:7px}
#modal .events-panel .event-card{display:grid;grid-template-columns:62px minmax(0,1fr) 28px;align-items:center;min-height:94px;padding:8px 9px;gap:8px;border:3px solid #4b3b38;border-radius:18px;background:radial-gradient(circle at 16% 45%,#8cc8d344,transparent 45%),linear-gradient(135deg,#29485b,#203047);box-shadow:inset 0 2px #ffffff44,0 4px #4b3b38;color:var(--cream-200)}
#modal .events-panel .event-miner{background:radial-gradient(circle at 16% 45%,#f0c97455,transparent 45%),linear-gradient(135deg,#645138,#3b3134)}
#modal .events-panel .event-arena{background:radial-gradient(circle at 16% 45%,#e7876c55,transparent 45%),linear-gradient(135deg,#663b38,#342b39)}
/* T13 (build 29): themed card plates cropped from each event's own scene art, with
   the Moonleaf overlay treatment (dark tint left for the copy, the art shows right). */
#modal .events-panel .event-tower:not(.is-locked,.is-blocked){background:linear-gradient(90deg,#16283aee 18%,#1d364cb0 62%,#22405a70),url('/art/tower-bands-v2/band-01.jpg') center 47%/cover;border-color:#8d9fae}
#modal .events-panel .event-miner:not(.is-locked,.is-blocked){background:linear-gradient(90deg,#2e2116ee 18%,#3b2a1cb4 62%,#46321f66),url('/art/buried-treasures-v1.png') center 9%/cover;border-color:#a1864e}
#modal .events-panel .event-arena:not(.is-locked,.is-blocked){background:linear-gradient(90deg,#3a1d1fee 18%,#4a2629b0 62%,#552d2c5c),url('/assets/parallax/chapters/arena-coliseum-v1.png') center 11%/cover;border-color:#b0805e}
#modal .events-panel .event-wizard{background:radial-gradient(circle at 16% 45%,#c3a8f055,transparent 45%),linear-gradient(135deg,#54447a,#2e2842)}
/* Locked: a sealed dark card with a bright title, an amber unlock step and a lock badge. */
#modal .events-panel .event-card:is(.is-locked,.is-blocked){background:repeating-linear-gradient(135deg,#ffffff0a 0 7px,transparent 7px 14px),linear-gradient(135deg,#3b3348,#231f2e);border-color:#8d7650;color:var(--cream-200)}
#modal .events-panel .event-card:is(.is-locked,.is-blocked) .event-card-copy small{color:#ffd98a;font-weight:750}
#modal .events-panel .event-card:is(.is-locked,.is-blocked) .event-card-edge{justify-self:center;width:30px;height:30px;border:2px solid var(--ink-plum);border-radius:50%;background:linear-gradient(var(--gold-100),#dca64a);box-shadow:0 2px var(--panel-night)}
#modal .events-panel .event-card:is(.is-locked,.is-blocked) .event-card-edge .event-lock{width:14px;height:17px;color:#3d2f2c}
#modal .events-panel .event-card-tag{justify-self:start;display:inline-flex;align-items:center;min-height:20px;padding:2px 8px;border:1px solid #e9c77a;border-radius:999px;background:#10262dcc;color:var(--gold-100);font:800 11px/1.15 system-ui}
/* Blocked (disabled) cards are solid like locked ones: no fading or extra filter. */
#modal .events-panel .event-card:disabled{filter:none;opacity:1}
#modal .event-card-art{display:grid;place-items:center;width:60px;height:60px;border:2px solid #f8e0a88a;border-radius:14px;background:#172b39aa;box-shadow:inset 0 2px #fff4c533}
#modal .events-panel .event-card .event-card-art img{position:static;grid-row:auto;width:48px;height:48px;object-fit:contain}
#modal .event-card-copy{display:grid;gap:4px;min-width:0;text-align:left}
#modal .events-panel .event-card-copy b{font:21px/1.05 Lucky}
#modal .events-panel .event-card-copy small{font:12px/1.25 system-ui;color:#f8e5c5}
#modal .event-card-edge{display:grid;place-items:center;font:38px/1 Lucky;color:#ffda86}
#modal .event-card-edge .event-lock{position:static;width:22px;height:25px;color:#ffdf9a}
#modal .events-panel .event-card:is(.is-locked,.is-blocked) .event-card-art{filter:saturate(.7) brightness(.9);opacity:1}
/* P26 (build 27): compact cards so four share one page (EVENTS_PER_PAGE) on Mini;
   one fixed height per card, and a paged list reserves four rows. */
#modal .events-panel .event-pages{gap:8px}
#modal .events-panel .event-pages>.event-card{min-height:88px;height:88px}
#modal .events-panel .event-pages.is-paged{grid-template-rows:repeat(4,88px)}
#modal .events-panel .event-card{grid-template-columns:52px minmax(0,1fr) 28px;min-height:88px;padding:6px 8px;gap:8px}
#modal .events-panel .event-card-art{width:52px;height:52px;border-radius:var(--vs-radius)}
#modal .events-panel .event-card .event-card-art img{width:40px;height:40px}
#modal .events-panel .event-card-copy{gap:3px}
#modal .events-panel .event-card-copy b{font-size:19px}
#modal .events-panel .event-card-copy small{font-size:11.5px;line-height:1.2}
#modal .events-panel .event-card-tag{min-height:18px;padding:1px 7px;font-size:10.5px}
#modal .events-panel .event-card-edge{font-size:32px}

/* A rank-up is a hero entrance, with the same restraint and reduced-motion
   fallback as the existing Victory celebration. */
#modal:has(.milestone-celebration){text-align:center;overflow:hidden;background:radial-gradient(circle at 50% 27%,var(--cream-250),#edd9aa 70%)}
#modal:has(.milestone-celebration)::backdrop{background:#111923ad;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
.milestone-celebration{position:relative;isolation:isolate;display:grid;justify-items:center;gap:5px}
.milestone-celebration h1,.milestone-celebration h2,.milestone-celebration p{position:relative;z-index:1;margin:0}
.milestone-art{position:relative;display:grid;place-items:center;width:160px;height:160px;overflow:visible}
/* F08 (owner, 2026-09-25): the hard-edged spoke sunburst, clipped at the dialog top,
   is replaced by the Victory aura (breathing glow, soft rays fading out, four
   twinkling stars). It stays inside the art box, so nothing reaches past the modal
   padding; reduced motion keeps it static. */
.milestone-art .victory-aura{inset:0}
.milestone-art .victory-rays{animation-duration:56s}
@media(prefers-reduced-motion:reduce){.milestone-art *{animation:none!important}}
.eq-scene-slots{grid-template-columns:70px 70px;grid-template-rows:repeat(3,minmax(70px,auto));gap:14px}
/* G16/G18: one power block under the hero feet: Combat Power plaque, the
   HP/ATK/DEF pills, then the icon-over-caption shortcuts (bottom-tab pattern).
   The lower cream panel keeps only the Training card. */
.eq-view .eq-scene-slots{height:88%}
.eq-view .eq-power-block{position:absolute;left:0;right:0;top:calc(44% + min(25vw,108px));display:flex;flex-direction:column;align-items:center;gap:6px;padding:0 16px;pointer-events:none}
.eq-view .eq-power-block .eq-combat-power{position:relative;top:auto;left:auto;transform:none}
.eq-power-block .equipment-stat-row{width:100%;margin:0}
.eq-nav{display:flex;justify-content:center;gap:10px;width:100%;pointer-events:auto}
/* H08 (build 23): the block runs to the stage floor and the shortcut row docks at
   its bottom, directly above the Training card, instead of floating under the
   stats. The row clips its own overflow so the entry slide rises from behind the
   lower panel's edge; the padding keeps the resting faces, lips and focus rings clear. */
.eq-view .eq-power-block{bottom:0}
.eq-view .eq-nav{margin-top:auto;padding:6px 0 8px;overflow:hidden}
/* I07 (build 24): the HP/ATK/DEF pills travel with the shortcut row as one block
   docked above the Training card; the free space sits between the plaque (kept
   under the hero's feet) and the pills, never between the row and the card. */
.eq-view .eq-power-block .equipment-stat-row{margin-top:auto}
.eq-view .eq-power-block .equipment-stat-row+.eq-nav{margin-top:0}
#online .eq-nav .eq-nav-item{flex:0 1 84px;min-width:66px;min-height:58px;margin:0;padding:6px 4px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:13px;line-height:1;pointer-events:auto}
#online .eq-nav .eq-nav-item:before{inset:0}
.eq-nav-item img{width:34px;height:32px;object-fit:contain;filter:drop-shadow(0 1px var(--ink-plum-2))}
.eq-nav-item b{font:inherit;text-shadow:none;white-space:nowrap}
/* V11 (build 32 feedback): one optical icon size across Backpack / Journal /
   Gemstones / Gear (the art has different padding, so each is scaled to the same
   visible height), and the label overlaps the icon's bottom like game nav buttons. */
#online .eq-nav .eq-nav-item{gap:0}
.eq-nav-item img{position:relative;z-index:0;width:40px;height:38px;margin-bottom:-8px;transform:scale(var(--eq-nav-icon-scale,1));transform-origin:50% 55%}
.eq-nav-item[data-action=collections] img{--eq-nav-icon-scale:.97}
.eq-nav-item[data-action=gemstone-open] img{--eq-nav-icon-scale:.92}
.eq-nav-item b{position:relative;z-index:1}
.eq-view #content:has(>.eq-training:only-child){padding-top:8px}
.eq-view .eq-training{margin-top:0}
/* Short phones (375x667, Mini with browser chrome 375x712): tighter pills and
   shortcuts so the block clears the panel. */
@media(max-height:760px){.eq-view .eq-power-block{gap:4px}.eq-power-block .equipment-stat-row>div{padding:1px 7px}.eq-power-block .equipment-stat-row b{font-size:19px;line-height:19px}.eq-power-block .equipment-stat-row img{width:22px;height:24px}#online .eq-nav .eq-nav-item{min-height:50px;padding:4px}.eq-nav-item img{width:34px;height:32px;margin-bottom:-7px}}
/* I06 (build 24): a worn item sits centred on its own framed icon tile tinted by
   its tier (docs/RARITY_COLORS.md; standard until a tier or upgrade level exists),
   so it no longer reads as a cutout. A future per-item icon (.has-icon) fills the
   tile with its own background. Empty slots keep the dashed silhouette face. */
.eq-scene-slots .eq-slot-icon{--tier:var(--rarity-standard);--tier-accent:var(--tier);position:relative;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;flex:none;width:60px;height:60px;box-sizing:border-box;padding:3px;border-radius:9px;border:1.5px solid color-mix(in srgb,var(--tier) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--tier) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--tier-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -2px color-mix(in srgb,var(--tier-accent) 40%,#0000)}
.eq-scene-slots button:has(>.eq-slot-icon){padding:3px}
.eq-scene-slots .eq-slot-icon img{width:100%;height:100%;max-width:none;object-fit:contain;filter:drop-shadow(0 1px 1px #3a2a1a55)}
/* P07 (build 27): approved icons are transparent cutouts (item-icons-v2), so the
   rarity tile shows around them, exactly like a gemstone tile.
   The 4px inset keeps every centred cutout clear of its frame. */
.eq-scene-slots .eq-slot-icon.has-icon{padding:4px}
.eq-slot-icon[data-tier=great]{--tier:var(--rarity-great)}
.eq-slot-icon[data-tier=rare]{--tier:var(--rarity-rare)}
.eq-slot-icon[data-tier=epic]{--tier:var(--rarity-epic)}
.eq-slot-icon[data-tier=legendary]{--tier:var(--rarity-legendary);--tier-accent:var(--rarity-legendary-accent)}
.eq-slot-icon[data-tier=mythic]{--tier:var(--rarity-mythic)}
.eq-slot-icon[data-tier=transcendent]{--tier:var(--rarity-transcendent);--tier-accent:var(--rarity-transcendent-accent)}
/* N08/N09 (build 26): the same framed item tile wherever an item is shown as an
   item - weapon look picker, Gloves/Outfit/Boots pickers, Bamboo Exchange cards and
   detail, and the skin catalog. The approved icon fills the tile; a missing icon
   keeps the sprite centred on the tier tile. Locked items stay greyed out. */
:is(.owned-skins,.weapon-card-art,.glove-picker,.wardrobe-picker,.exchange-card-art,.exchange-detail-art,.skin,.tower-preview-items) .eq-slot-icon{--tier:var(--rarity-standard);--tier-accent:var(--tier);display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;flex:none;box-sizing:border-box;padding:6px;border-radius:var(--vs-radius);border:2px solid color-mix(in srgb,var(--tier) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--tier) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--tier-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--tier-accent) 40%,#0000),0 1px 2px #3a2a1a40}
:is(.owned-skins,.weapon-card-art,.glove-picker,.wardrobe-picker,.exchange-card-art,.exchange-detail-art,.skin) .eq-slot-icon img{display:block;width:100%;height:100%;max-width:none;margin:0;object-fit:contain}
:is(.owned-skins,.weapon-card-art,.glove-picker,.wardrobe-picker,.exchange-card-art,.exchange-detail-art,.skin) .eq-slot-icon.has-icon{padding:4px}
:is(.owned-skins,.weapon-card-art,.glove-picker,.wardrobe-picker,.exchange-card-art,.exchange-detail-art,.skin,.gemstone-socket) .eq-slot-icon.has-icon img{filter:drop-shadow(0 2px 2px #3a2a1a66)}
/* P07: the Gemstones gear row shows the same rarity tile inside each gear button. */
.gemstone-socket>.eq-slot-icon{--tier:var(--rarity-standard);--tier-accent:var(--tier);display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;box-sizing:border-box;width:40px;height:40px;padding:2px;border-radius:9px;border:1.5px solid color-mix(in srgb,var(--tier) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--tier) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--tier-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -2px color-mix(in srgb,var(--tier-accent) 40%,#0000)}
.gemstone-socket>.eq-slot-icon img{width:100%;height:100%;max-width:none;object-fit:contain}
.owned-skins .eq-slot-icon{width:64px;height:64px;margin-bottom:4px}
.owned-skins button[aria-pressed=true] .eq-slot-icon{outline:2px solid #748b45;outline-offset:1px}
#modal :is(.glove-picker,.wardrobe-picker)>.eq-slot-icon{width:112px;height:112px;margin:10px auto}
#modal :is(.glove-picker,.wardrobe-picker)>.eq-slot-icon.is-locked{filter:grayscale(1) contrast(.8) brightness(1.05)}
/* S02 (build 28): the one empty-slot dialog for every slot repeats the Equipment
   row's empty face (dashed tile, grey silhouette) above "Empty slot". */
#modal .eq-slot-empty{display:grid;justify-items:center;gap:6px;text-align:center}
#modal .eq-slot-empty>h1{margin:0}
#modal .eq-slot-empty>p{margin:0}
#modal .eq-slot-empty-tile{display:grid;place-items:center;width:84px;height:84px;margin:4px 0;box-sizing:border-box;border:2px dashed #a8977a;border-radius:16px;background:#ebe1ca}
#modal .eq-slot-empty-tile img{width:52px;height:56px;object-fit:contain;filter:grayscale(1) contrast(.85)}
/* AC793 (build 178 feedback, owner pick B): a tap on a locked Equipment slot opens one full-width
   card under (or over) its tile, the tail pointing at the tile (placeEquipmentSlotHint sets
   --eq-hint-x/-y/-w and the tail's x). One row: the dashed silhouette with the painted padlock
   (VISUAL_STYLE §4), "Locked" + slot name + unlock step, Go on the right; the progress bar spans
   the bottom. Cream card, ink outline and hard drop (§1); a light scrim, a tap on it closes. */
#modal.eq-slot-hint-modal{width:min(460px,calc(100vw - 24px));padding:12px 14px 14px;border:3px solid var(--vs-ink);border-radius:18px;background:#fbefcf;box-shadow:inset 0 2px var(--cream-50),0 4px 0 var(--vs-ink);overflow:visible}
#modal.eq-slot-hint-modal::backdrop{background:#10192d47;-webkit-backdrop-filter:none;backdrop-filter:none}
#modal.eq-slot-hint-modal.is-anchored:is([open],.is-closing){position:fixed;inset:auto;left:var(--eq-hint-x);top:var(--eq-hint-y);width:var(--eq-hint-w);max-width:none;margin:0}
#modal.eq-slot-hint-modal.is-below{transform-origin:var(--eq-hint-tail) 0}
#modal.eq-slot-hint-modal.is-above{transform-origin:var(--eq-hint-tail) 100%}
#modal .eq-slot-hint{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"tile name go" "tile step go" "bar bar bar";align-items:center;column-gap:12px;text-align:left;color:#3b2c1e}
#modal .eq-slot-hint-tail{display:none}
#modal.is-anchored .eq-slot-hint-tail{display:block;position:absolute;left:calc(var(--eq-hint-tail) - 11px);width:16px;height:16px;background:#fbefcf;border:3px solid var(--vs-ink);rotate:45deg;pointer-events:none}
#modal.is-anchored.is-below .eq-slot-hint-tail{top:-11px;border-width:3px 0 0 3px}
#modal.is-anchored.is-above .eq-slot-hint-tail{bottom:-11px;border-width:0 3px 3px 0}
#modal .eq-slot-hint-head{display:contents}
#modal .eq-slot-hint-tile{grid-area:tile;position:relative;display:grid;place-items:center;width:54px;height:54px;margin-bottom:6px;box-sizing:border-box;border:2px dashed #a8977a;border-radius:12px;background:#ebe1ca}
#modal .eq-slot-hint-tile img{width:34px;height:36px;object-fit:contain;filter:grayscale(1) contrast(.85)}
#modal .eq-slot-hint-tile .event-lock{position:absolute;left:50%;bottom:-10px;width:18px;height:21px;translate:-50% 0;filter:drop-shadow(0 1px 0 var(--vs-ink))}
#modal .eq-slot-hint-name{grid-area:name;display:grid;gap:1px;min-width:0;align-self:end}
#modal .eq-slot-hint-name .eyebrow{line-height:1.2;letter-spacing:1.5px;color:#8a6a3a}
#modal .eq-slot-hint-name>h1{margin:0;font-size:21px;line-height:1.05;overflow-wrap:anywhere}
#modal .eq-slot-hint>p{grid-area:step;align-self:start;margin:2px 0 0;font:700 14px/1.3 system-ui,-apple-system,sans-serif;color:#3b2c1e}
#modal .eq-slot-hint-progress{grid-area:bar;display:flex;align-items:center;gap:8px;margin-top:10px}
#modal .eq-slot-hint-bar{flex:1;min-width:0;height:10px;overflow:hidden;border:2px solid var(--vs-ink);border-radius:6px;background:#d9c8a3;box-shadow:inset 0 2px #0002}
#modal .eq-slot-hint-bar>i{display:block;height:100%;background:linear-gradient(#bfec73,#68b349)}
#modal .eq-slot-hint-progress>small{display:flex;align-items:center;gap:3px;flex:none;font:800 12px/1 system-ui,-apple-system,sans-serif;color:#3b2c1e}
#modal .eq-slot-hint-progress>small>img{width:16px;height:16px;object-fit:contain}
#modal .eq-slot-hint>button.secondary{grid-area:go;width:auto;min-width:76px;min-height:44px;margin:0;padding:6px 14px;font-size:20px}
.exchange-view .catalog .exchange-card-art .eq-slot-icon{width:70px;height:70px}
.exchange-view .catalog .exchange-card-art .eq-slot-icon img{width:100%;height:100%}
#modal .exchange-detail-art .eq-slot-icon{width:76px;height:76px}
#modal .exchange-detail-art .eq-slot-icon img{width:100%;height:100%}
.skin .eq-slot-icon{width:112px;height:112px;margin:0 auto 6px}
.skin .eq-slot-icon img{height:100%}
@media(max-height:730px){.exchange-view .catalog .exchange-card-art .eq-slot-icon{width:58px;height:58px}#modal .exchange-detail-art .eq-slot-icon{width:60px;height:60px}}
/* AC78 (build 49, ASC AAibvAQDGWGmI-XnZR3jEk8): Bamboo Exchange has no pages. All
   offers sit in one compact two-column list (title, art, limit, price) that scrolls
   only inside its own box (approved contained scroll, AGENTS.md); the next row peeks
   to show there is more. Title, wallet line and Back stay fixed. */
.exchange-view .exchange-catalog{grid-template-rows:none;grid-auto-rows:max-content;align-content:start;gap:8px 7px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:none;margin:0 -3px;padding:2px 3px 8px}
.exchange-view .exchange-catalog::-webkit-scrollbar{display:none}
.exchange-view .exchange-catalog .paper{grid-template-rows:36px 62px minmax(16px,1fr) 56px;gap:4px;padding:7px 8px 8px}
.exchange-view .exchange-catalog h3{height:36px;font-size:16px}
.exchange-view .exchange-catalog .exchange-card-art,.exchange-view .exchange-catalog .exchange-card-art .eq-slot-icon{width:62px;height:62px}
.exchange-view .exchange-catalog .exchange-card-art img{width:60px;height:60px}
@media(max-height:730px){.exchange-view .exchange-catalog .paper{grid-template-rows:34px 54px minmax(16px,1fr) 56px;padding:6px 7px 7px}.exchange-view .exchange-catalog .exchange-card-art,.exchange-view .exchange-catalog .exchange-card-art .eq-slot-icon{width:54px;height:54px}.exchange-view .exchange-catalog .exchange-card-art img{width:52px;height:52px}}
/* Visual polish r2 (findings 81/82/109): the Exchange wallet is HUD-style chips; every good
   stands on one soft radial tile (bare keys, coin and scroll as well as skins and gloves);
   an unaffordable price stays tan with a red amount; a soft bamboo-green glow lifts the screen. */
#online.exchange-view #content{background:radial-gradient(120% 60% at 50% 0,#2f4a3a 0,#25303a 55%,#232532 100%)}
.exchange-wallet{gap:8px;flex-wrap:wrap}
.exchange-wallet>.exchange-chip{display:inline-flex;align-items:center;gap:5px;min-height:32px;box-sizing:border-box;padding:3px 10px 3px 5px;border:1.5px solid #8b7493;border-radius:18px;background:#191820;color:var(--cream-50);font:800 15px/1 system-ui;white-space:nowrap}
.exchange-wallet>.exchange-chip.is-bamboo{border-color:#7fb05a}
.exchange-wallet>.exchange-chip>img,.exchange-wallet>.exchange-chip>.gemstone-key-art,.exchange-wallet>.exchange-chip>.gear-key-art{width:24px;height:24px;object-fit:contain;flex:none}
.exchange-view .exchange-catalog .exchange-card-art{box-sizing:border-box;border:2px solid #b89a6a;border-radius:16px;background:radial-gradient(circle at 50% 40%,var(--cream-50),#f3dfb4 58%,#ddb97c);box-shadow:inset 0 2px #fffaf0,inset 0 -3px #c99d5f}
.exchange-view .exchange-catalog .exchange-card-art>img,.exchange-view .exchange-catalog .exchange-card-art>.gemstone-key-art,.exchange-view .exchange-catalog .exchange-card-art>.gear-key-art,.exchange-view .exchange-catalog .exchange-card-art>.reroll-scroll-art{width:76%;height:76%}
.exchange-view .exchange-catalog .exchange-card-art>.eq-slot-icon:not(.is-lv5){width:100%;height:100%;border-color:transparent;background:none;box-shadow:none}
/* AC804 (build 184, owner: "Wciąż ochydny ten czerwony napis, jakieś lepsze pomysły?"; supersedes AC783's short-red
   ink): an unaffordable Exchange price is lettered exactly like every other price (cream on the face's own edge
   stroke) and the shortfall is told by the face: the shared muted stone face (`--btn-disabled-*`), the icon kept in
   colour. It stays tappable (denied-tap toast). No red lettering on any Exchange card (keys, form, reroll, skins). */
:is(#online,#modal) button.secondary.exchange-price.is-short{--small-top:var(--btn-disabled-top);--small-bottom:var(--btn-disabled-bottom);--small-edge:var(--btn-disabled-edge);--small-lip:var(--btn-disabled-lip);--small-shine:var(--btn-disabled-shine)}

/* K05/K07 (build 24 round 3): Equipment Gemstones is one view. Under the gear row
   and bonuses, the owned stones fill the rest of the screen as one contained,
   touch-scrolling list (no pages). Each stone is a framed tile like an I06
   equipment item: rarity-tinted parchment face, tinted frame, count badge in the
   top-right corner. The same face is used by receipts and merge previews. */
.gemstone-list-bar{display:flex;align-items:center;gap:8px;flex:none;min-height:44px}
.gemstone-list-bar>h2{flex:1;min-width:0;margin:0;font:20px/1.1 Lucky;color:var(--gold-50)}
#online .gemstone-list-bar .gemstone-merge-all{flex:1;min-width:0;width:auto;margin:0;min-height:var(--tier-dense-h);font-size:var(--tier-dense-fs);padding:6px 14px}
.gemstone-grid.gemstone-list{grid-template-rows:none;grid-auto-rows:104px;max-height:none;min-height:0;flex:1 1 0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:2px 8px 6px;margin:3px 0 0;scrollbar-width:none}
.gemstone-grid.gemstone-list::-webkit-scrollbar{display:none}
.gemstone-card,.gemstone-merge-art>div,.gemstone-tile-mini{border:2px solid color-mix(in srgb,var(--gem-color) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--gem-color) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--gem-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--gem-accent) 40%,#0000),0 3px var(--panel-night);color:#3b2a1c}
.gemstone-card:after{display:none}
.gemstone-card>.gemstone-art,.gemstone-merge-art img,.gemstone-tile-mini>img{filter:drop-shadow(0 2px 2px #3a2a1a66)}
.gemstone-card>small{color:#3b2a1c}
.gemstone-count{color:var(--paper)}
.gemstone-merge-art>div{color:#3b2a1c}
.gem-reveal .gemstone-card,.gem-reveal .gemstone-card>small{color:var(--paper)}
.gemstone-detail-art{border:3px solid color-mix(in srgb,var(--gem-color) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--gem-color) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--gem-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--gem-accent) 40%,#0000),0 3px #3f3339}
/* K05: a stone detail with Add/Replace gem and Merge puts Close on its own full row
   (V21: Close is the first child; it drops below the two actions). */
#modal:has(.gemstone-detail) .equipment-actions:has(>button:nth-child(3)){grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
#modal:has(.gemstone-detail) .equipment-actions>button:first-child:nth-last-child(3){grid-column:1/-1;grid-row:2}
/* AC133: Remove and Replace share the top row equally; Close spans the row below, or
   (with Merge) sits on the left of the second row and Merge on its right (V21 order). */
#modal:has(.gemstone-detail) .equipment-actions:has(>.gemstone-detail-remove):has(>button:nth-child(3)){grid-template-columns:repeat(2,minmax(0,1fr))}
#modal:has(.gemstone-detail) .equipment-actions:has(>.gemstone-detail-remove)>button:first-child:nth-last-child(4){grid-column:1;grid-row:2}
@media(max-height:730px){.gemstone-grid.gemstone-list{grid-auto-rows:88px}}
/* K03: Merge all confirm sheet, one row per merge (3× Great HP → 1× Rare HP). */
.gemstone-merge-all-sheet{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;min-width:0}
#modal .gemstone-merge-all-sheet h1{font-size:28px;margin:0}
#modal .gemstone-merge-all-sheet p,#modal .gemstone-merge-all-sheet>small{font:13px/1.35 system-ui;margin:0}
.gemstone-merge-rows{list-style:none;margin:0;padding:2px;display:grid;gap:6px;width:100%;max-height:min(46dvh,330px);overflow-y:auto;overscroll-behavior:contain}
.gemstone-merge-row{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:8px;padding:5px 7px;border:1px solid #cfb787;border-radius:var(--vs-radius);background:var(--paper)}
.gemstone-tile-mini{position:relative;display:grid;place-items:center;width:52px;height:52px;box-sizing:border-box;border-radius:10px;padding:4px}
.gemstone-tile-mini>img{width:38px;height:38px;object-fit:contain}
.gemstone-tile-mini>b{position:absolute;right:-4px;top:-5px;border-radius:5px;background:#16151cdc;color:var(--paper);padding:2px 4px;font:800 11px/1 system-ui}
.gemstone-merge-row-text{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 6px;min-width:0;color:var(--text-on-cream)}
.gemstone-merge-row-text small{font:700 12px/1.2 system-ui}
.gemstone-merge-row-text i{font-style:normal;font-size:16px}
/* Equipment child dialogs share one centred title (EQG-16) and the standard
   dialog width; items not owned yet use the solid locked art (EQG-17). */
#modal :is(.weapon-picker,.training-help,.gemstone-help,.eq-slot-empty)>h1,#modal:has(>.backpack-panel)>h1{text-align:center}
#modal .collection-skill-detail header{justify-content:center}
#modal :is(.glove-picker,.wardrobe-picker)>img.is-locked{filter:grayscale(1) contrast(.8) brightness(1.05)}

/* Phone readability pass: retain the existing art and button faces. */
.home-actions .hub-travel-box,.home-actions .hub-afk-box{height:62px}
.home-actions .hub-travel-box b,.home-actions .hub-afk-box b{font-size:18px}
.home-actions .hub-travel-box small,.home-actions .hub-afk-box small{font-size:11px;line-height:1.15}
.gemstone-odds p{font-size:12px}
.gemstone-odds>small{font-size:12px}
.chest-shop-card{max-height:460px}
.rank-person>b{font-size:13px}
.backpack-empty{display:grid;place-items:center;gap:4px;min-height:94px;padding:13px 18px;border:1px solid #cfb787;border-radius:15px;background:radial-gradient(ellipse at 50% 20%,var(--paper),#f0dfbc);color:#66513a;font:700 14px/1.3 system-ui;box-shadow:inset 0 2px var(--cream-50),0 3px #cbb18466}
.backpack-empty:before{content:'✦';font:25px/1 Lucky;color:#b58d51;filter:drop-shadow(0 2px var(--cream-200))}
@media(max-height:730px){.home-actions .hub-travel-box,.home-actions .hub-afk-box{height:60px}}
/* Visual polish r2 #91/#137 (arena lane): Fast Travel and AFK Rewards share one card anatomy: the same 42px icon box
   (the AFK pile is drawn smaller in its art, so it gets the larger scale) and one-line copy. */
.home-actions :is(.hub-travel-box,.hub-afk-box)>img{width:42px;height:42px;object-fit:contain}
.home-actions .hub-afk-box>img{scale:1.18}
.home-actions :is(.hub-travel-box,.hub-afk-box)>span{flex:1;min-width:0}
.home-actions :is(.hub-travel-box,.hub-afk-box) small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Paired pagers (Events, Moonleaf guide and calendar): Previous, page, Next. The
   dense tier above sizes the faces; this is layout only, kept last so it follows
   the panels' own full-width .secondary rules as it did from moonleaf.css. */
.paired-pager{display:grid;grid-template-columns:1fr 35px 1fr;align-items:center;gap:4px;text-align:center}
#modal .paired-pager .secondary{width:100%;margin:3px 0;padding:7px}
.paired-pager>span{font:12px/1 system-ui}
/* Disabled controls are solid, never translucent (owner report 2026-09-25, N2).
   style.css greys every disabled button with an opaque filter instead of the old
   opacity:.5; the button families below get a muted, desaturated parchment face
   with a readable label. Bottom tabs are disabled only for a short server
   transaction, so they keep their faces and never flash grey. A selected weapon
   look and a finished treasure chest are disabled states that must not look off. */
#online button.primary:disabled:not([data-busy-lock]),#modal button.primary:disabled:not([data-busy-lock]){opacity:1;filter:saturate(.3);cursor:default}
:is(#online,#modal,#error) .secondary:disabled:not([data-busy-lock]){
 --small-top:#ece5d7;--small-bottom:#c2b6a2;--small-edge:#544a42;--small-lip:#9b8f7c;--small-shine:var(--cream-50);
 opacity:1;filter:saturate(.3);color:var(--cream-50);
}
/* R-1: the finished chest is disabled but is the prize artwork; #modal outranks
   style.css button:disabled:not([data-busy-lock]) (0,2,1), which greyed it. */
#tabs .bottom-tab:disabled,.owned-skins button[aria-pressed=true],#modal .treasure-tap:disabled,button.treasure-tap:disabled{opacity:1;filter:none}
/* R-2: showModal() focuses the <dialog> itself when a panel has no enabled control
   (finished treasure). Dialog autofocus never draws the UA ring around the panel;
   controls inside keep their keyboard focus ring. */
#modal:focus,#modal:focus-visible{outline:none}
/* A control locked only while a command is in flight (client.js sets
   data-busy-lock) keeps its normal face: every tap must not flash the whole
   screen grey. Revealed Mine tiles are board state, not off controls. */
button[data-busy-lock]:disabled,.miner-view .tile.opened:disabled{filter:none}

/* Owner report 2026-09-25 / Home-Story sweep: Home, Story, battle, Travel,
   Settings. Kept last so it follows the screens' earlier rules. */
/* AC335: keep the horizontal 32-in-44 row below Settings, clear of enemy art/vitals.
   Compact's 180px scene needs the clear upper-left corner, before the round title. */
#online.journey-view #playback{flex-direction:row;align-items:center;gap:2px;top:60px;bottom:auto}
@media(max-height:730px){#online.journey-view #playback{top:0;bottom:auto;left:1px;right:auto}}
/* N4: the corner close keeps at least 8px between its glyph and the panel edge. */
#modal.passive-receipt>.receipt-dismiss{top:5px;right:5px}
/* HS-09: web Account / Recover actions are full-width 56px faces like Settings. */
#modal>button.secondary:is([data-action=logout],[data-action=recover-account]),#modal #recover-form>button.secondary{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--tier-full-h);margin:10px 0 0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky}
#modal>button.secondary:is([data-action=logout],[data-action=recover-account]):before,#modal #recover-form>button.secondary:before{inset:0}
/* HS-14: the skill-book shortcut is a real 44px control face with a book icon. */
.journey-view #skill-belt .book-shortcut{flex-direction:column;justify-content:center;gap:1px;width:50px;min-width:50px;height:44px;min-height:44px;padding:3px 2px;border:2px solid #5a4f72;border-radius:11px;background:linear-gradient(#4b4363,#342e48);box-shadow:inset 0 1px #ffffff33,0 2px #0d1422;color:var(--cream-250);font:700 11px/1 system-ui}
.journey-view #skill-belt .book-shortcut .glyph{width:22px;height:22px}
/* P16 (build 27): the label's line box holds its whole ink (ascent included), so
   the text never rides up onto the book icon: 19px icon, 3px gap, 13px line. */
.journey-view #skill-belt .book-shortcut{gap:3px;padding:2px 2px 3px}
.journey-view #skill-belt .book-shortcut .glyph{flex:none;width:19px;height:19px}
.journey-view #skill-belt .book-shortcut>span{display:block;flex:none;max-width:100%;font-size:11px;line-height:13px;white-space:nowrap}
/* C-1: at very short heights Fast Travel sheds its eyebrow and a little monitor
   height so Start, the caption and Close stay in flow instead of overlapping. */
@media(max-height:620px){#modal .hub-rewards-panel header .eyebrow{display:none}#modal .hub-rewards-panel header h1{margin:0;font-size:25px}#modal .travel-monitor{height:92px}#modal .travel-monitor .monitor-panda{width:56px;height:61px}#modal .travel-monitor .monitor-scout{width:32px;height:32px;left:calc(25% - 30px);bottom:calc(14% + 20px)}#modal .panel-loot{padding:3px 10px}#modal .panel-loot :is(strong,.loot-sizer){font-size:25px}}
/* HS-13: Start Adventure keeps a short label; its Energy cost is a chip. */
.hub-launch .primary .button-cost{display:inline-flex;align-items:center;gap:2px;margin-left:10px;padding:2px 9px 2px 4px;border:2px solid #20452c;border-radius:999px;background:var(--cream-250);color:#2c4a2c;font:21px/1 Lucky;-webkit-text-stroke:0;text-shadow:none;box-shadow:inset 0 -2px #e2cf9a}
.hub-launch .primary .button-cost img{width:20px;height:24px;object-fit:contain}
/* C17 / F26 Inbox (docs/INBOX.md). A third face in the Home rail with an unread
   dot, a bounded dialog whose message list is the only (contained) scroll
   region, a local message view and the standard receipt for a first open. */
.home-scene .home-event-rail .hub-inbox{position:relative}
.hub-inbox .inbox-envelope{display:block;width:29px;height:29px;margin:-1px 0 -1px}
.inbox-dot{position:absolute;top:3px;right:3px;width:12px;height:12px;border:2px solid var(--ink-plum);border-radius:50%;background:#ff5a47;box-shadow:0 0 0 1.5px var(--cream-250);pointer-events:none}
.inbox-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
#modal:has(.inbox-panel),#modal:has(.inbox-message){width:min(410px,calc(100vw - 28px));padding:16px;background:linear-gradient(165deg,var(--cream-200),var(--row-inset))}
#modal:has(.inbox-panel)>button.secondary{width:100%;min-height:var(--tier-full-h);margin:10px 0 0;padding:8px 10px;font:var(--tier-full-fs)/1.1 Lucky;flex:none}
#modal:has(.inbox-panel)>button.secondary:before{inset:0}
.inbox-panel{display:flex;flex-direction:column;min-height:0;flex:0 1 auto}
.inbox-header{text-align:center}
.inbox-header h1{margin:2px 0 12px;font:30px/1.1 Lucky}
/* Approved contained scroll (AGENTS.md): only this list moves, never the
   dialog or the document, and it does not chain to the page. */
.inbox-list{display:flex;flex-direction:column;gap:8px;min-height:0;max-height:min(50dvh,392px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:2px 2px 6px;border-radius:16px;outline-offset:2px}
/* Dialog autofocus lands on the list region: no ring unless the keyboard is in use. */
:root:not([data-input-modality=keyboard]) .inbox-list:focus{outline:none}
:root[data-input-modality=keyboard] .inbox-list:focus-visible{outline:2px solid #b67939;outline-offset:2px}
.inbox-row{position:relative;flex:none;display:grid;grid-template-columns:38px minmax(0,1fr) 16px;align-items:center;gap:0 10px;width:100%;min-height:74px;margin:0;padding:10px 12px;text-align:left;border:2px solid #8d774d;border-radius:16px;background:var(--navy-600);color:var(--gold-50);box-shadow:0 3px #172636;font:inherit}
.inbox-row.is-read{border-color:#8a8170;background:#4c515a;box-shadow:0 3px #2c3037}
/* K01: unread stands out (brighter blue, gold rim, visible New tag); read is muted. */
.inbox-row.is-unread{border-color:#e0ad4f;background:linear-gradient(170deg,#2f6592,#214d74);box-shadow:0 3px #15324c,0 0 0 2px #ffe3a066}
.inbox-row.is-read .inbox-row-copy>b{color:#e8dcc0}
.inbox-row.is-read .inbox-row-copy>small{color:#cdc2a8}
.inbox-row.is-read .inbox-row-icon{opacity:.72}
.inbox-new{display:inline-block;margin:0 6px 0 0;padding:1px 7px;border-radius:999px;background:#ffd46b;color:#3a2610;font:800 11px/1.35 system-ui;font-style:normal;letter-spacing:.02em;vertical-align:1px}
.inbox-row-icon .inbox-envelope{display:block;width:38px;height:38px}
.inbox-row-copy{display:grid;gap:3px;min-width:0}
.inbox-row-copy>b{font:19px/1.15 Lucky;color:var(--cream-250);overflow-wrap:anywhere;-webkit-text-stroke:0}
.inbox-row-copy>small{font:600 12px/1.3 system-ui;color:#e6d6ae}
.inbox-row-edge{font:24px/1 Lucky;color:#ffd47a;text-align:center}
.inbox-row.is-read .inbox-row-edge{font:700 17px/1 system-ui;color:#9fd79a}
.inbox-row .inbox-dot{top:7px;right:7px}
.inbox-rewards{display:flex;flex-wrap:wrap;gap:4px 6px;margin-top:3px}
.inbox-reward{display:inline-flex;align-items:center;gap:3px;min-height:24px;padding:1px 9px 1px 3px;border:1.5px solid #c9a86a;border-radius:999px;background:var(--cream-200);color:#3b2e24;font:16px/1.1 Lucky}
.inbox-reward img{width:20px;height:20px;object-fit:contain}
.inbox-empty{display:grid;justify-items:center;gap:6px;padding:12px 8px 6px;text-align:center}
.inbox-empty .inbox-envelope{width:64px;height:64px}
.inbox-empty b{font:22px/1.15 Lucky;color:#3b3024}
.inbox-empty p{margin:0;font:14px/1.4 system-ui;color:#675436}
.inbox-message{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;min-height:0}
.inbox-message h1,.inbox-receipt h1{margin:0;font:27px/1.1 Lucky;overflow-wrap:anywhere}
.inbox-message-meta{font:600 12px/1.3 system-ui;color:#7a6546}
.inbox-message-text{margin:0;font:15px/1.45 system-ui;color:#3b3024;overflow-wrap:anywhere}
.inbox-message-rewards{display:grid;justify-items:center;gap:6px;width:100%;padding:8px 12px;border:2px solid #d8bd85;border-radius:14px;background:var(--paper)}
.inbox-message-rewards>b{font:600 12px/1.3 system-ui;color:#5f7d4c}
.inbox-message-rewards .inbox-rewards{justify-content:center;margin:0}
#modal:has(.inbox-message) .equipment-actions{margin-top:12px}
#modal.passive-receipt .inbox-receipt{gap:10px}
.inbox-receipt-rewards{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.inbox-receipt-reward{display:grid;justify-items:center;gap:2px;min-width:84px;padding:8px 10px;border:2px solid #d8bd85;border-radius:14px;background:var(--paper)}
.inbox-receipt-reward img{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 3px 3px #99712855)}
.inbox-receipt-reward b{font:24px/1 Lucky;color:var(--cream-250);-webkit-text-stroke:var(--label-stroke,2px) #3b2e24;paint-order:stroke fill}
.inbox-receipt-reward small{font:600 11px/1.2 system-ui;color:#675436}
@media(max-height:700px){.inbox-list{max-height:min(46dvh,320px)}.inbox-row{min-height:68px;padding:8px 10px}.inbox-message-text{font-size:14px;line-height:1.4}.inbox-receipt-rewards{gap:8px}.inbox-receipt-reward{flex:0 0 92px;min-width:0;padding:6px}.inbox-receipt-reward img{width:36px;height:36px}.inbox-receipt-reward b{font-size:21px}}

/* Chests gemstone card (owner 2026-09-27, "zdecydowanie ładniej"): a banner card
   with a title bar, the (?) on its corner, a big chest over slow soft light rays,
   a speech-bubble callout naming the top tiers in their rarity colours, the keys
   line and two chunky draws (warm Draw 1, green Draw 10). The chances live in the
   card's (?) sheet. Disabled draws keep the shared opaque grey face (N2): the
   colour tokens below apply only to enabled buttons. */
.gemstone-draw:has(.gem-chest-card){justify-content:center}
#online .chest-shop-card.gem-chest-card{--gem-title-pt:9px;--gem-title-pb:8px;--gem-title-fs:clamp(22px,6.8vw,28px);position:relative;flex:0 1 auto;min-height:0;max-height:none;padding:0 12px 12px;gap:8px;background:radial-gradient(ellipse at 27% 52%,#a987ee,#5b3c9e 52%,#3a2570)}
#online .gem-chest-card>.gem-chest-title{margin:0 -12px;padding:var(--gem-title-pt) 42px var(--gem-title-pb);border-radius:17px 17px 0 0;background:linear-gradient(#7254c6,#4e3397);border-bottom:3px solid #1d1233;box-shadow:inset 0 2px #a991ea;font:var(--gem-title-fs)/1.1 Lucky;color:var(--cream-200);-webkit-text-stroke:var(--label-stroke) #1d1233;paint-order:stroke fill;text-shadow:none}
/* The disc straddles the card's top edge at its right corner; its 44px target
   stays inside the section width, which must not scroll sideways. */
/* AC775 (build 170, owner: "Akurat znak zapytania to nie powinien wychodzić"): the (?) sits fully inside
   the title band, its 44px target centred on the band's painted height (padding + one 1.1 line), 4px in
   from the card's inner edge so the disc clears the rounded corner. The band's padding and size are tokens so every variant stays centred. */
.gem-chest-card>.help-button{position:absolute;top:calc((var(--gem-title-pt) + var(--gem-title-pb) + 1.1 * var(--gem-title-fs)) / 2 - var(--tier-compact) / 2);right:4px;z-index:2}
/* The stage spans the card's inner width and clips the static rays to it. */
.gem-chest-stage{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:center;gap:10px;min-height:0;margin:0 -12px;padding:4px 12px;overflow:hidden}
.gem-chest-hero{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0}
.gem-chest-art{position:relative;isolation:isolate;display:grid;place-items:center;width:100%;height:clamp(118px,25dvh,215px)}
.gem-chest-art img{position:relative;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 3px #1d123399)}
.gem-chest-rays{position:absolute;left:50%;top:50%;z-index:-1;width:150%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;background:repeating-conic-gradient(#fff3cf66 0 8deg,#fff3cf00 8deg 22.5deg);-webkit-mask:radial-gradient(closest-side,#000 25%,transparent);mask:radial-gradient(closest-side,#000 25%,transparent);pointer-events:none}
/* S01 (build 28, owner "Te kreski nie mają się nigdy animować"): the rays are a
   static decoration. They never turn or shine, not at rest, not during a draw
   and not while its reveal plays (supersedes N07/P22 draw-time rotation). */
.gem-chest-art:before{content:'';position:absolute;inset:14%;z-index:-1;border-radius:50%;background:radial-gradient(closest-side,#ffe9b0aa,#c6a6ff44 60%,transparent)}
.gem-chest-keys{margin:0;font:14px/1.15 Lucky;text-align:center;color:var(--cream-250);-webkit-text-stroke:.2em #1d1233;paint-order:stroke fill}
.gem-chest-callout{position:relative;isolation:isolate;margin:0;padding:12px 10px;border:3px solid #1d1233;border-radius:16px;background:#34215f;box-shadow:inset 0 2px #8466cc;font:18px/1.28 Lucky;text-align:center;word-break:keep-all;overflow-wrap:break-word;color:var(--paper);-webkit-text-stroke:.2em #1d1233;paint-order:stroke fill}
.gem-chest-callout:before{content:'';position:absolute;left:-11px;top:calc(50% - 9px);width:16px;height:16px;border:3px solid #1d1233;border-width:0 0 3px 3px;background:#34215f;rotate:45deg}
.gem-tier{position:relative;display:inline-block;white-space:nowrap;color:transparent;-webkit-text-stroke:0;background:linear-gradient(135deg,var(--gem-color),var(--gem-accent));-webkit-background-clip:text;background-clip:text}
.gem-tier:before{content:attr(data-text);position:absolute;inset:0;z-index:-1;color:#1d1233;-webkit-text-stroke:.24em #1d1233}
/* Visual polish (layout lane, AC226): the chest bubble lists the top tiers, one per line (the sentence is in (?)). */
.gem-chest-callout.gem-chest-tiers{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;line-height:1.18}
#online .gem-chest-card .gemstone-draw-actions{gap:10px;margin:0}
#online .gem-chest-buy{min-height:80px;gap:4px;padding:8px 6px;font:25px/1.05 Lucky}
/* Visual polish v1: chest card faces also colour the receipt's Again (Draw 1 warm, Draw 10 green). */
:is(#online,#modal) .chest-buy.is-warm:not(:disabled){--small-top:var(--btn-commit-top);--small-bottom:var(--btn-commit-bottom);--small-edge:var(--btn-commit-edge);--small-lip:var(--btn-commit-lip);--small-shine:var(--btn-commit-shine)}
:is(#online,#modal) .chest-buy.is-green:not(:disabled){--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
#online .gem-chest-buy .gemstone-price{max-width:100%;padding:3px 8px;border-radius:9px;background:#0000002e;white-space:nowrap;font:800 14px/1.1 system-ui;color:var(--cream-50);-webkit-text-stroke:3px var(--small-edge);paint-order:stroke fill}
#online .gem-chest-buy .gemstone-price img{width:20px;height:20px}
.gem-chest-alert{position:absolute;top:-5px;right:-5px;display:grid;place-items:center;width:26px;height:26px;border:2px solid #3a0d12;border-radius:8px;background:linear-gradient(#ff7272,#d62f3c);box-shadow:inset 0 2px #ffb8b8,0 2px #3a0d12;font:20px/1 Lucky;color:#fff;-webkit-text-stroke:0;text-shadow:none;rotate:8deg;pointer-events:none}
#modal .gem-chest-help .gemstone-odds{margin:10px 0}
/* W04: the generic `#modal p` margin and `.gemstone-help p` type must not stretch odds rows. */
#modal .gemstone-odds p{margin:0;line-height:1.15}
@media(max-height:730px){#modal .gem-chest-help .gemstone-odds{margin:6px 0}}
/* AC539 (build 125 feedback, "Da się jakoś ulepszyć układ tej tabeli?"): every chances table (Gem Chest and Gear Chest
   help, gemstoneOdds/gearOdds) is one aligned list in rarity order, rarest (Transcendent, its gradient chip) at the
   bottom: colour chip, name left-aligned, percentage right-aligned in one fixed column (tabular digits, % signs in
   line; the decimal pad is not drawn here), alternating subtle row tint. The footnote stays below the list. */
/* AC539 review (build 126): no inner bordered panel; the help card's own 2px frame is the only frame, the rows'
   alternating tint sits straight on it. */
.gemstone-odds>.odds-table{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;gap:0;margin:0;border:0;border-radius:8px;overflow:hidden;background:none}
.gemstone-odds>.odds-table>p,.gemstone-odds>.odds-table>p:last-child:nth-child(odd){grid-column:auto;justify-self:stretch;display:grid;grid-template-columns:12px minmax(0,1fr) auto;column-gap:8px;align-items:center;min-height:21px;margin:0;padding:2px 10px;font:600 13px/1.15 system-ui}
.gemstone-odds>.odds-table>p:nth-child(even){background:var(--row-face)}
.gemstone-odds>.odds-table>p+p{border-top:1px solid #ecdcbc}
.gemstone-odds>.odds-table>p i{width:12px;height:12px;border-radius:3px}
/* Visual polish r2 (finding 85): each odds row carries its rarity's tile (the same colour
   and accent gradient as the stone tiles, cyan to violet for Transcendent) with the stone on it. */
.gemstone-odds>.odds-table>p{grid-template-columns:18px minmax(0,1fr) auto}
.gemstone-odds>.odds-table>p i{position:relative;display:grid;place-items:center;width:18px;height:18px;border:1.5px solid color-mix(in srgb,var(--gem-color) 55%,#3b2c25);border-radius:5px;background:linear-gradient(135deg,var(--gem-color) 15%,var(--gem-accent) 90%)}
.gemstone-odds>.odds-table>p i>img{width:14px;height:14px;object-fit:contain}
.gemstone-odds>.odds-table>p span{text-align:left}
.gemstone-odds>.odds-table>p b{min-width:4.2em;padding-left:0;font-weight:800;color:#3b2c25}
.gemstone-odds>.odds-table>p b .odds-pad{display:none}
@media(max-height:730px){.gemstone-odds>.odds-table>p,.gemstone-odds>.odds-table>p:last-child:nth-child(odd){min-height:19px;padding-block:1px;font-size:12px}}
@media(max-height:730px){#online .chest-shop-card.gem-chest-card{--gem-title-pt:7px;--gem-title-pb:6px;--gem-title-fs:clamp(22px,6.4vw,25px)}.gem-chest-art{height:clamp(100px,20dvh,150px)}.gem-chest-callout{font-size:16px;padding:9px 8px}#online .gem-chest-buy{min-height:70px;font-size:23px}}

/* Shared motion layer (owner request 2026-09-27; docs/SCREEN_RULES.md → Motion).
   Transform/opacity only. The modal backdrop fades in with the panel; a closing
   modal is pinned by client.js (installModalMotion) over .modal-exit-shade, a copy
   of its backdrop, while both fade out. Status toasts drop in from the safe top. */
#modal[open]::backdrop{animation:panda-backdrop-in .22s ease-out}
@keyframes panda-backdrop-in{from{opacity:0}}
.modal-exit-shade{position:fixed;inset:0;z-index:58;pointer-events:none}
/* AC103 (build 52, ASC AMQoETBwWxzbfdgTsrqkp_g, APjQHOMGVXck4OFWddXlo3Q): a closed
   #modal is never painted. Panel classes stay on the dialog after close and several
   of them set `display` (the AC54 claim overlay, hub reward panels, draw reveals),
   which beat the UA `dialog:not([open]){display:none}` and left a dismissed Rewards
   overlay drawn in the page, outside the top layer and without its backdrop. Only
   the exit motion (.is-closing, pinned inline by installModalMotion) may paint it. */
#modal:not([open]):not(.is-closing){display:none!important}
#error:not([hidden]){animation:panda-status-in .2s var(--ease-out)}
/* AC546: the toast band opens from zero height like the AC511 band (120ms) while its text fades in. */
/* AC546 (build 126 review): the toast band opens from its centre line, scaleY 0→1 over 160ms (easeOutCubic),
   while the lettering (fill, outline, drop) fades in over 120ms after 40ms. Leaving (.is-leaving, set by
   showStatusToast 120ms before it hides) the band collapses back to the line (120ms, easeInCubic) and the
   lettering fades out first (80ms). The -50% offsets use `translate`, so the scale stays centred on the band.
   Reduced motion: a plain fade in (160ms) and out (120ms); these two are !important because style.css switches every
   animation off under reduced motion, and the review asked for the fade there. #error keeps its own entry. */
#feedback{transform:none;translate:-50% 0}
:root[data-status-anchor=centre] #feedback,#modal>#feedback{transform:none;translate:-50% -50%}
/* Visual polish (bugs lane): one status look. A plain error (no Retry) is the same AC546 band as every toast, so
   "Not enough Bamboo." reads the same on Home, Exchange, Fast Travel and Story; the Retry dialog keeps its card.
   On the Story stage the centred slot is the stage's middle (--status-stage-y, placeStatusAnchor), clear of the HUD. */
#error:not(.has-retry){width:100vw;max-width:100vw;min-height:50px;padding:10px 18px;display:flex;flex-wrap:wrap;gap:2px 10px;align-items:center;justify-content:center;border:0;border-radius:0;box-shadow:none;color:#fff;font:19px/1.15 Lucky,system-ui;-webkit-text-stroke:.09em var(--vs-ink-text);paint-order:stroke fill;text-shadow:none;text-align:center;text-wrap:balance;pointer-events:none;background:linear-gradient(90deg,#0b081099,#110c17fa 15%,#110c17fa 85%,#0b081099);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#error:not(.has-retry):before,#error:not(.has-retry):after{content:'';position:absolute;left:0;right:0;height:1.5px;background:linear-gradient(90deg,#e0b04a00,#e0b04acc 14%,#ffe39e 50%,#e0b04acc 86%,#e0b04a00)}
#error:not(.has-retry):before{top:3px}#error:not(.has-retry):after{bottom:3px}
:root[data-status-anchor=centre] :is(#feedback,#error:not(.has-retry)){top:var(--status-stage-y,50%)}
#feedback:not([hidden]){animation:panda-toast-band-in .16s cubic-bezier(.33,1,.68,1),panda-toast-ink-in .12s ease-out .04s backwards}
#feedback:not([hidden]) strong{animation:panda-toast-ink-in .12s ease-out .04s backwards}
#feedback.is-leaving:not([hidden]){animation:panda-toast-band-out .12s cubic-bezier(.32,0,.67,0) forwards,panda-toast-ink-out .08s ease-in forwards}
#feedback.is-leaving:not([hidden]) strong{animation:panda-toast-ink-out .08s ease-in forwards}
@keyframes panda-toast-band-in{from{scale:1 0}}
@keyframes panda-toast-band-out{to{scale:1 0}}
@keyframes panda-toast-ink-in{from{color:transparent;-webkit-text-stroke-color:transparent;text-shadow:none}}
@keyframes panda-toast-ink-out{to{color:transparent;-webkit-text-stroke-color:transparent;text-shadow:none}}
@keyframes panda-toast-fade-in{from{opacity:0}}
@keyframes panda-toast-fade-out{to{opacity:0}}
@keyframes panda-status-in{from{opacity:0;translate:0 10px}}
@media(prefers-reduced-motion:reduce){#modal[open]::backdrop,#error:not([hidden]){animation:none}.modal-exit-shade{display:none}
 #feedback:not([hidden]){animation:panda-toast-fade-in .16s ease-out!important}#feedback.is-leaving:not([hidden]){animation:panda-toast-fade-out .12s ease-in forwards!important}#feedback:not([hidden]) strong{animation:none}}

/* Attention badge (owner 2026-09-27, SCREEN_RULES.md → Attention badges): the
   Chests card "!" as the one shared marker for something to collect or see. It is
   absolute on its host's top-right corner (never moves layout), transform-only
   motion (a pop when it appears, then a short wiggle on a shared 3.6s clock for at
   most three badges), static under reduced motion. The host keeps its own name
   plus ", new" (aria-label); the badge itself is aria-hidden. */
.attention-host{position:relative}
/* Visual polish (bugs lane, AC631): \`#online button.primary>span\` made a primary face's "!" an inline
   flow item that pushed its label off centre (Home Choose adventure). The badge rides the corner as on
   every other host; the label alone is centred on the face. */
#online button.primary>span.attention-badge{position:absolute}
/* N03 (build 26): about 60% of the old 20-26px marker, 14px box + 1.5px cream ring
   (17px visual), hung on the host's top-right corner like an iOS badge so it never
   sits over the icon centre or the label. */
.attention-badge{position:absolute;top:-6px;right:-6px;z-index:3;display:grid;place-items:center;width:14px;height:14px;border:1.5px solid #3a0d12;border-radius:5px;background:linear-gradient(#ff7272,#d62f3c);box-shadow:inset 0 1.5px #ffb8b8,0 0 0 1.5px var(--cream-250),0 1.5px 0 1.5px #3a0d12;font:12px/1 Lucky,system-ui,sans-serif;color:#fff;-webkit-text-stroke:0;text-shadow:none;rotate:8deg;pointer-events:none;transform-origin:50% 70%;user-select:none;-webkit-user-select:none}
/* AC799 (build 182): a count of things waiting on a panel card (uiCountBadge), drawn like the "!" (same face, outline,
   ring, tilt), widened for up to "99+" and a little taller so the digits stay legible. Never on navigation faces. */
.count-badge{position:absolute;top:-6px;right:-6px;z-index:3;box-sizing:border-box;display:grid;place-items:center;min-width:19px;height:19px;padding:0 4px;border:1.5px solid #3a0d12;border-radius:6px;background:linear-gradient(#ff7272,#d62f3c);box-shadow:inset 0 1.5px #ffb8b8,0 0 0 1.5px var(--cream-250),0 1.5px 0 1.5px #3a0d12;font:13px/1 Lucky,system-ui,sans-serif;color:#fff;-webkit-text-stroke:0;text-shadow:none;font-variant-numeric:tabular-nums;white-space:nowrap;rotate:8deg;pointer-events:none;user-select:none;-webkit-user-select:none}
/* The weapon slot keeps its gem marker in the top-right, so its badge hangs on the top-left corner. */
.attention-badge.attention-left{right:auto;left:-6px;rotate:-8deg}
/* P01 (build 27): Moonleaf's Get tickets sits beside Skip animation in a tight
   row under the centred "Every spin" caption, so its "!" stands on the button's
   top edge above the ticket art (left end): never over the gap toward the next
   control and clear of the caption in every language. */
.attention-badge.attention-top{top:-12px;right:auto;left:12px;rotate:-8deg}
/* The Equipment shortcut row clips its overflow (entry slide) with 6px of top padding. */
.eq-nav .attention-badge{top:-4px}
.attention-badge.gem-chest-alert{top:-7px;right:-7px;width:16px;height:16px;border-radius:6px;font-size:13px}
/* AC771 (build 170): the visual polish r2 still dot for 'new' information is retired; every level draws this "!". */
@keyframes attention-pop{0%{transform:scale(0)}65%{transform:scale(1.25)}100%{transform:scale(1)}}
@keyframes attention-wiggle{0%,80%,100%{transform:none}84%{transform:translateY(-2px) scale(1.2) rotate(-12deg)}88%{transform:translateY(-1px) scale(1.14) rotate(10deg)}92%{transform:scale(1.06) rotate(-7deg)}96%{transform:scale(.96) rotate(3deg)}}
.attention-badge.is-animated{animation:attention-wiggle 3.6s ease-in-out var(--attention-delay,0s) infinite}
.attention-badge.is-popping{animation:attention-pop .34s cubic-bezier(.2,.8,.3,1.3) both}
@media(prefers-reduced-motion:reduce){.attention-badge,.attention-badge.is-animated,.attention-badge.is-popping{animation:none!important}}
/* R02 (build 28) weapon skin levels, docs/SKIN_LEVELS.md. Lv2-4: gold pips on the
   item tile. Lv5: warm glow, a sheen band sweeping across the tile and three
   twinkling sparkles. Motion is transform/opacity only; its phase comes from the
   clock (--shine-phase), so re-renders continue it. Reduced motion: static glow. */
.eq-slot-icon:has(>.skin-shine,>.skin-level-pips){position:relative}
.skin-level-pips{position:absolute;left:50%;bottom:3px;z-index:1;display:flex;gap:2px;transform:translateX(-50%);pointer-events:none}
.skin-level-pips i{display:block;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--gold-50) 0 25%,#ffc93c 60%,#d9891c);box-shadow:0 0 0 1px #7a4a14,0 1px 1px #3a2a1a66}
.eq-scene-slots .skin-level-pips{bottom:1px;gap:1px}
.eq-scene-slots .skin-level-pips i,.gemstone-socket .skin-level-pips i{width:4px;height:4px}
:is(.owned-skins,.weapon-card-art,.exchange-card-art,.exchange-detail-art,.skin,.eq-scene-slots,.gemstone-socket) .eq-slot-icon.is-lv5{border-color:#f0b43c;box-shadow:inset 0 1px #fffb,inset 0 -3px #f28a3255,0 0 0 1px var(--honey-200),0 0 10px 2px #ffc64a99}
.skin-shine{position:absolute;inset:0;z-index:1;overflow:hidden;border-radius:inherit;pointer-events:none}
.skin-sheen{position:absolute;top:-25%;bottom:-25%;left:0;width:38%;background:linear-gradient(90deg,#fff0,#fffbe6d9 50%,#fff0);transform:translateX(-140%) skewX(-16deg);animation:skin-sheen 2.6s linear var(--shine-phase,0ms) infinite;will-change:transform}
.skin-spark{position:absolute;width:22%;aspect-ratio:1;background:#fff7cf;clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);opacity:0;transform:scale(.4);animation:skin-spark 1.3s ease-in-out var(--shine-phase,0ms) infinite}
.skin-spark:nth-of-type(2){top:6%;right:8%}
.skin-spark:nth-of-type(3){top:44%;left:6%;width:16%;animation-delay:calc(var(--shine-phase,0ms) - 430ms)}
.skin-spark:nth-of-type(4){bottom:8%;right:22%;width:14%;animation-delay:calc(var(--shine-phase,0ms) - 870ms)}
@keyframes skin-sheen{0%{transform:translateX(-140%) skewX(-16deg)}42%,100%{transform:translateX(330%) skewX(-16deg)}}
@keyframes skin-spark{0%,100%{opacity:0;transform:scale(.4) rotate(0)}50%{opacity:1;transform:scale(1) rotate(20deg)}}
@media(prefers-reduced-motion:reduce){.skin-sheen,.skin-spark{animation:none}.skin-sheen{opacity:0}.skin-spark{opacity:.75;transform:none}}
.skin-level-chip{position:absolute;top:4px;right:4px;z-index:2;padding:1px 5px;border-radius:8px;background:#5a3b1c;color:var(--gold-100);font:700 9px/1.3 system-ui,sans-serif;font-style:normal;pointer-events:none}
.owned-skins button{position:relative}
.weapon-picker.has-levels{gap:5px}
.weapon-picker.has-levels .owned-skins button{min-height:92px;padding:5px}
.weapon-picker.has-levels .owned-skins .eq-slot-icon{width:58px;height:58px}
/* AB03-AB05 (build 37 feedback): one balanced card. Top row: the hero preview
   and the look's name, level, five-segment copy bar and next-level readout,
   vertically centred together. Bottom row: equal compact plump faces (the same
   44px tier as Upgrade): Preview Lv5 and Equip, or the same-size green Equipped
   status. AC09: at Lv5 the toggle reads Preview (hero holding the look). */
/* AC08 (build 39 feedback: the buttons stuck to the tiles): the action row sits
   8px under the info row, 12px of card padding below its lip and 8px more
   between the card and the tile grid, so the faces read clearly separated. */
.weapon-level-card{display:grid;grid-template-columns:118px minmax(0,1fr);grid-template-areas:'hero info' 'actions actions';align-items:center;column-gap:10px;row-gap:8px;padding:6px 10px 12px;margin-bottom:8px;border:2px solid #b6a382;border-radius:14px;background:#f7efd9}
.weapon-level-card.is-lv5{border-color:#e6ae43;background:radial-gradient(circle at 18% 40%,var(--gold-50),#f7efd9 60%)}
.weapon-level-card.is-preview{border-style:dashed}
/* AC09: by default the card shows the weapon alone (its item tile, with pips or
   the Lv5 shine) in the box the former hero preview used; AC136 (build 56): Preview
   shows the same tile at Lv5, so Preview never moves the card. */
.weapon-card-art{grid-area:hero;display:grid;place-items:center;width:118px;aspect-ratio:400/370}
.weapon-picker.has-levels .weapon-card-art .eq-slot-icon{position:relative;width:96px;height:96px}
/* AC08 on Compact (375x667): the same separation, trimmed so the picker fits. */
@media(max-height:700px){.weapon-level-card{row-gap:6px;padding:4px 10px 10px;margin-bottom:4px}}
/* AC136 (build 56) on Compact: without the hero canvas the art box only holds its 96px
   tile, so it shrinks to the tile; with 52px look tiles and 3px section gaps (the card
   keeps its 21px over the tiles, AC08) a look named on three lines (pl "Szabla
   Księżycowego Liścia") still fits without the dialog scrolling. */
@media(max-height:700px){
 .weapon-picker.has-levels{gap:3px}
 .weapon-picker.has-levels .weapon-level-card{grid-template-columns:100px minmax(0,1fr);margin-bottom:6px}
 .weapon-picker.has-levels .weapon-card-art{width:100px;height:96px;aspect-ratio:auto}
 .weapon-picker.has-levels .owned-skins .eq-slot-icon{width:52px;height:52px}
}
.weapon-level-info{grid-area:info;display:grid;gap:3px;min-width:0;justify-items:start;text-align:left}
.weapon-level-info b{max-width:100%;font:700 15px/1.2 system-ui,sans-serif;color:#283543;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.weapon-level-value{max-width:100%;font:800 18px/1.15 system-ui,sans-serif;color:#8a5516;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* One segment per copy: a copy is a level, so the bar reads both at once. */
.weapon-level-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;width:100%;max-width:170px;margin-top:2px}
.weapon-level-bar i{display:block;height:9px;border:1px solid #b6a382;border-radius:5px;background:var(--paper);box-shadow:inset 0 1px #fff}
.weapon-level-bar i.is-on{border-color:#a8701f;background:linear-gradient(#ffd977,#e9a33a);box-shadow:inset 0 1px var(--shine-100)}
.weapon-level-bar i.is-preview{border:1.5px dashed #c48f3c;background:var(--cream-300)}
.weapon-level-bar.is-max i.is-on{box-shadow:inset 0 1px var(--shine-100),0 0 4px #ffc64a}
.weapon-level-next,.weapon-level-note{font:600 12px/1.25 system-ui,sans-serif;color:#5e4a33}
.weapon-level-actions{grid-area:actions;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
/* Visual polish r2 (finding 112): Equipped is a green check badge over the art tile's top-left corner;
   the pager is two round lavender arrows around the page count. */
.weapon-level-card{position:relative}
.weapon-level-card>.weapon-equipped-badge{position:absolute;z-index:2;top:2px;left:6px;display:inline-flex;align-items:center;gap:3px;padding:2px 8px 2px 4px;border:2px solid var(--btn-done-edge);border-radius:999px;background:linear-gradient(var(--btn-done-top),var(--btn-done-bottom));color:var(--cream-50);font:14px/1.1 Lucky,system-ui;-webkit-text-stroke:2px var(--btn-done-edge);paint-order:stroke fill;box-shadow:0 2px #2f4a1b80}
.weapon-level-card>.weapon-equipped-badge>.ui-icon{width:16px;height:16px;-webkit-text-stroke:0}
.weapon-level-actions:empty{display:none}
#modal .weapon-pager{justify-content:center;gap:18px}
#modal .weapon-pager>button{flex:none;width:44px;min-width:44px;padding:0}
.weapon-picker-head{position:relative;display:grid;place-items:center;min-height:44px;padding:0 48px}
.weapon-picker-head>.help-button{position:absolute;right:0;top:50%;translate:0 -50%}
#modal .weapon-pager>small{min-width:44px;text-align:center;font:800 15px/1 system-ui;color:#5a4128}
#modal .weapon-pager>.weapon-page-arrow:disabled{background:linear-gradient(#b2adbe,#928a9d);color:#e1dce7;opacity:1}
/* AC136: a Lv5 look has no Preview; its Equipped status stays one column wide, centred. */
#modal .weapon-level-actions>.weapon-card-action:only-child{grid-column:1/-1;justify-self:center;width:calc(50% - 4px)}
#modal .weapon-card-action{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-width:0;height:44px;min-height:44px;margin:0;padding:0 6px;font-size:16px;line-height:1;white-space:nowrap}
#modal .weapon-card-action .button-label{white-space:nowrap}
#modal .weapon-card-action{gap:4px}
.weapon-preview-spark{font-size:.8em;line-height:1}
/* The pressed Preview wears the shared honey selected face. */
#modal .weapon-preview-toggle[aria-pressed=true]{--small-top:var(--active-top);--small-bottom:var(--active-bottom);--small-edge:var(--active-edge);--small-lip:var(--active-lip);--small-shine:var(--active-shine);color:var(--active-ink);-webkit-text-stroke-width:var(--active-stroke)}
/* Equipped: the same face in green, a status (not a control). */
#modal .weapon-equipped-status{--small-top:var(--btn-done-top);--small-bottom:var(--btn-done-bottom);--small-lip:var(--btn-done-lip);--small-edge:var(--btn-done-edge);--small-shine:var(--btn-done-shine);cursor:default}
/* Visual polish v1: an owned Exchange offer shows the same green done status, distinct from an unaffordable grey price. */
/* AC819 (build 184): Equip on an owned, unworn unlock is the next step, a live control on the same green face. */
:is(#online [data-offer],#modal) .secondary.exchange-equip-go{--small-top:var(--btn-done-top);--small-bottom:var(--btn-done-bottom);--small-lip:var(--btn-done-lip);--small-edge:var(--btn-done-edge);--small-shine:var(--btn-done-shine);color:var(--cream-50)}
#online [data-offer] .secondary.exchange-owned:disabled{--small-top:var(--btn-done-top);--small-bottom:var(--btn-done-bottom);--small-lip:var(--btn-done-lip);--small-edge:var(--btn-done-edge);--small-shine:var(--btn-done-shine);filter:none;opacity:1;color:var(--cream-50);cursor:default}
.weapon-level-price{display:flex;align-items:center;gap:4px;font:600 11px/1.25 system-ui,sans-serif;color:#5e4a33}
.weapon-copy-price{display:inline-flex;align-items:center;gap:2px;font-weight:800;color:#283543}
.weapon-copy-price img{width:16px;height:16px}
.weapon-copy-have.is-short{color:#9b4339}
/* Picker tiles: the selected one (the card's look) wears the honey ring, the
   equipped one keeps its green face; "New" hangs on the top-left corner. */
.weapon-picker.has-levels .owned-skins button.is-equipped{background:#e4edcb;border-color:#748b45}
.weapon-picker.has-levels .owned-skins button[aria-pressed=true]{border-color:#c48f3c;box-shadow:0 0 0 2px #ffd66b;background:var(--cream-300)}
.weapon-picker.has-levels .owned-skins button.is-equipped[aria-pressed=true]{background:#eef3d6}
.weapon-picker.has-levels .owned-skins button[aria-pressed=true] .eq-slot-icon{outline-color:#c48f3c}
.weapon-picker.has-levels .owned-skins button:not(.is-equipped) .eq-slot-icon{outline:0}
.skin-new-chip{position:absolute;top:4px;left:4px;z-index:2;padding:1px 5px;border:1px solid #3a0d12;border-radius:8px;background:linear-gradient(#ff7272,#d62f3c);color:#fff;font:800 9px/1.3 system-ui,sans-serif;font-style:normal;text-transform:uppercase;letter-spacing:.02em;pointer-events:none}
.moonleaf-level-actions{margin-top:6px}
.moonleaf-level-note{display:block;margin-top:4px;text-align:center}
.moonleaf-reward-level{font-style:normal;font-weight:800;font-size:10px;color:#8a5516}
/* S06 Tower bands: the one-time "New area" caption on the stage (client.js
   renderTowerBandBanner) and the floor-100 summit ribbon in the victory modal.
   Opacity/transform only; under reduced motion both simply appear (style.css). */
.tower-band-banner{position:absolute;left:50%;top:40%;z-index:6;display:grid;justify-items:center;gap:2px;width:max-content;max-width:calc(100% - 32px);padding:8px 22px 10px;border:2px solid #d9b56f;border-radius:18px;background:#1f1a2be6;box-shadow:0 6px 18px #0007;color:var(--cream-300);text-align:center;pointer-events:none;transform:translate(-50%,0);opacity:1;animation:tower-band-banner 2.6s ease-out both}
.tower-band-banner span{font:800 11px/1.2 system-ui;letter-spacing:2px;text-transform:uppercase;color:#d5bc90}
.tower-band-banner b{font-family:Lucky,system-ui,sans-serif;font-size:24px;line-height:1.1;color:var(--gold-100)}
.tower-band-banner.is-sky{border-color:#bfe3ff;background:linear-gradient(#2a4f86e8,#1d2f5ce8);box-shadow:0 6px 22px #9fd4ff55,0 6px 18px #0007}
.tower-band-banner.is-sky span{color:#cfe9ff}.tower-band-banner.is-sky b{color:var(--cream-250)}
@keyframes tower-band-banner{0%{opacity:0;transform:translate(-50%,10px) scale(.96)}14%,78%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-6px) scale(1)}}
/* AC901: the summit is one honey badge on the Victory's floor line (the reward receipts' source badge), born once. */
#modal .tower-summit{display:inline-flex;align-items:center;flex:none;padding:4px 12px 3px;border:2px solid #5a3a1c;border-radius:999px;background:linear-gradient(#ffd977,#e9a83a);box-shadow:0 2px #5a3a1c;color:var(--cream-50);font:17px/1.1 Lucky,system-ui;letter-spacing:.02em;-webkit-text-stroke:.14em #5a3a1c;paint-order:stroke fill;white-space:nowrap;animation:tower-summit-in .4s cubic-bezier(.2,.9,.3,1.3) .3s both}
@keyframes tower-summit-in{0%{opacity:0;transform:scale(.9)}100%{opacity:1;transform:scale(1)}}
@keyframes tower-summit-glow{0%{opacity:0;transform:scale(.4)}40%{opacity:.9}100%{opacity:0;transform:scale(1.2)}}
/* S06 reduced motion: the caption and the ribbon simply appear (the caption timer still removes it). */
@media(prefers-reduced-motion:reduce){.tower-band-banner,#modal .tower-summit{animation:none!important;opacity:1}.tower-band-banner{transform:translate(-50%,0)}#modal .tower-summit{transform:none}}
/* Endless Chapters (chapters-v1, docs/SCREEN_RULES.md → Chapter slot): the amber
   Chapter slot between Whispering Halls and Special, its card hanging under the
   act plaque (route, power check, first clear or the gate) and the launch row. */
.hub-view #story-overlay .route-slot.chapter-slot{padding-block:5px;border-color:#c9973f;background:linear-gradient(110deg,#302a21,#4a3a25)}
.hub-view #story-overlay .route-slot.chapter-slot[aria-current=true]{border-color:var(--honey-200);background:linear-gradient(110deg,#382f23,#56432a)}
.route-slot.chapter-slot .route-slot-index{border-color:#ffd88a;background:#6b4a1c;color:var(--gold-100);font:800 19px/1 system-ui}
.route-slot.chapter-slot .route-slot-tag{border-color:#4a3312;background:#ffd88a;color:#3b2a10}
.route-slot.chapter-slot .route-slot-title{font-size:clamp(16px,4.4vw,19px);white-space:nowrap}
.route-slot.chapter-slot .route-slot-copy small{overflow-wrap:anywhere}
.story-act-plaque>.chapter-card{position:absolute;z-index:0;top:calc(100% + 26px);left:50%;transform:translateX(-50%);width:min(104%,92vw);box-sizing:border-box;margin:0;padding:7px 12px 8px;border:2px solid #cba967;border-radius:14px;background:linear-gradient(#294459f0,#1b3044f0);box-shadow:0 3px 0 #142334;color:var(--cream-300);text-align:center;filter:none;pointer-events:none}
.chapter-card .chapter-route{margin:0 0 5px;font:17px/1.15 Lucky,sans-serif;color:var(--cream-250);filter:drop-shadow(0 1px #142334);overflow-wrap:anywhere}
.chapter-card .chapter-power{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0}
/* W03 (build 33): both boxes are label / centred value / status line; the
   Recommended box keeps an empty status slot so both values sit on one line. */
.chapter-card .chapter-power>div{display:grid;grid-auto-rows:auto;justify-items:center;align-content:center;row-gap:1px;min-width:0;padding:3px 4px 4px;border-radius:9px;background:#0e1d2b8c}
.chapter-card .chapter-power dt{max-width:100%;font:700 10px/1.2 system-ui;color:#d8e2e6}
.chapter-card .chapter-power dd{margin:0}
.chapter-card .chapter-power .chapter-power-value{display:flex;align-items:center;justify-content:center;gap:3px;font:17px/1.1 Lucky,sans-serif;color:var(--cream-300);font-variant-numeric:tabular-nums}
.chapter-card .chapter-power dd img{width:17px;height:17px;object-fit:contain}
.chapter-card .chapter-power .chapter-power-status{min-height:11px;max-width:100%;font:800 10px/1.1 system-ui;overflow-wrap:anywhere}
.chapter-card .chapter-power>div:last-child{box-shadow:inset 0 0 0 2px var(--chapter-tone)}
.chapter-card .chapter-power>div:last-child dd b,.chapter-card .chapter-power>div:last-child .chapter-power-status{color:var(--chapter-tone)}
.chapter-power.is-good{--chapter-tone:#9be07a}.chapter-power.is-close{--chapter-tone:#ffd36b}
.chapter-power.is-low{--chapter-tone:#ff9f6e}.chapter-power.is-hard{--chapter-tone:#ff7b7b}
.chapter-card .chapter-first{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px;margin:6px 0 0;font:700 11px/1.2 system-ui;color:#e9dfc9}
.chapter-loot{display:inline-flex;align-items:center;gap:8px}
.chapter-loot>span{display:inline-flex;align-items:center;gap:2px}
.chapter-loot img{width:18px;height:18px;object-fit:contain}
.chapter-loot b{font:16px/1 Lucky,sans-serif;color:var(--cream-300)}
.chapter-card .chapter-need{margin:6px 0 4px;font:800 12px/1.25 system-ui;color:#ffd88a;overflow-wrap:anywhere}
.chapter-gate-bar{position:relative;height:18px;margin:0 4px;overflow:hidden;border:2px solid #0e1d2b;border-radius:999px;background:#0e1d2b}
.chapter-gate-bar>i{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:linear-gradient(#ffd88a,#d89a3a)}
.chapter-gate-bar>b{position:relative;display:block;font:13px/14px Lucky,sans-serif;color:#fff;filter:drop-shadow(0 1px 2px #0e1d2b)}
.chapter-card .chapter-preview{display:block;margin-top:5px;font:700 10px/1.25 system-ui;color:#d8e2e6;overflow-wrap:anywhere}
/* AC824: a requirement already met reads as met (with its check), in the Recommended power card's "good" green. */
.chapter-card .chapter-preview.is-met{color:#9be07a}
.victory-note.chapter-next{color:#5a3f16;font-weight:800}
.chapter-extra-loot{margin-top:6px}
.chapter-extra-loot img{width:26px;height:26px;object-fit:contain}
/* b219 AC895: the Wizard trail's unlock under the plaque, in the chapter card's ground: the Outfit and Boots looks
   and the completions count (0 / 2), no sentence (the words are in the plaque's (?) sheet). Not interactive. */
.story-act-plaque>.wizard-unlock{position:absolute;z-index:0;top:calc(100% + 26px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;margin:0;padding:4px 10px 4px 6px;border:2px solid #cba967;border-radius:14px;background:linear-gradient(#294459f0,#1b3044f0);box-shadow:0 3px 0 #142334;filter:none;pointer-events:none;white-space:nowrap}
.wizard-unlock-looks{display:inline-flex;align-items:center;gap:4px}
.wizard-unlock-looks>img{width:36px;height:36px;object-fit:contain;padding:2px;border-radius:9px;background:#0e1d2b8c}
.wizard-unlock-count{font:17px/1 Lucky,sans-serif;color:var(--cream-300);font-variant-numeric:tabular-nums;filter:drop-shadow(0 1px #142334)}
.wizard-unlock-help{display:flex;align-items:center;gap:10px;text-align:left}
.wizard-unlock-help .wizard-unlock-looks>img{width:40px;height:40px;background:#0000000f}
.wizard-unlock-help-count{font-weight:inherit;white-space:nowrap}
/* AC922: the repeatable Special trail's level picker under the plaque, on the unlock plate's ground: three dense
   segmented faces (honey active face, never wrapping) and the Trail Chests the chosen level pays. Rules in the (?) sheet. */
.story-act-plaque>.trail-levels{position:absolute;z-index:1;top:calc(100% + 26px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;margin:0;padding:4px 10px 4px 5px;border:2px solid #cba967;border-radius:14px;background:linear-gradient(#294459f0,#1b3044f0);box-shadow:0 3px 0 #142334;white-space:nowrap;pointer-events:auto}
.trail-level-picker{display:grid;grid-template-columns:repeat(3,48px);gap:4px;flex:none}
#online .trail-level-picker .secondary{min-width:44px;min-height:var(--tier-dense-h);margin:0;padding:4px 2px;border-radius:11px;font-size:var(--tier-dense-fs);white-space:nowrap}
.trail-level-chests{display:inline-flex;align-items:center;gap:3px;flex:none}
.trail-level-chests>img{width:34px;height:34px;object-fit:contain}
.trail-level-chests>b{font:17px/1 Lucky,sans-serif;color:var(--cream-300);font-variant-numeric:tabular-nums;filter:drop-shadow(0 1px #142334)}
.trail-level-chests.is-capped{opacity:.5}
.trail-odds{display:grid;gap:6px;margin:6px 0 0;padding:0;list-style:none;text-align:left}
.trail-odds>li{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:8px}
.trail-odds-art{display:grid;place-items:center;width:28px;height:28px}
.trail-odds-art>img,.trail-odds-art>canvas{max-width:28px;max-height:28px;object-fit:contain}
.trail-odds>li>b,.trail-result-chance{font-variant-numeric:tabular-nums;white-space:nowrap}
.trail-result{text-align:center}
.trail-result-list{display:grid;gap:8px;margin:10px 0 0;padding:0;list-style:none;text-align:left}
.trail-result-list>li{display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:10px}
.trail-result-list .backpack-slot{width:56px;height:56px}
.trail-result-name{min-width:0;overflow-wrap:anywhere}
/* The chapter card under the plaque never reaches the route arrows: they sit just
   above the slot strip on every slot (V14), so no chapter-only position. */
.chapter-run-chip{position:absolute;z-index:2;top:56px;left:10px;padding:3px 9px 4px;border:1px solid #d5b875;border-radius:999px;background:linear-gradient(#4a3a25ed,#302a21e3);color:var(--gold-100);font:13px/1 Lucky,sans-serif;white-space:nowrap;text-shadow:none;pointer-events:none}
/* Compact heights: the card drops its route line (the slot names it) and keeps
   the power verdict inline, so the hero's face stays clear. */
@media(max-height:700px){
 .story-act-plaque>.chapter-card{top:calc(100% + 22px);padding:5px 10px 6px}
 /* On a short stage the hero's head and Blip stand right under the tab: the unlock sits beside the tab instead,
    on its line and within the plaque's width. */
 .story-act-plaque>.wizard-unlock{top:calc(100% - 12px);left:calc(50% + 50px);transform:none;gap:5px;padding:2px 7px 2px 3px;border-radius:11px}
 .story-act-plaque>.wizard-unlock .wizard-unlock-looks{gap:2px}
 .story-act-plaque>.wizard-unlock .wizard-unlock-looks>img{width:22px;height:22px;padding:1px;border-radius:6px}
 .story-act-plaque>.wizard-unlock .wizard-unlock-count{font-size:14px}
 /* AC922: the level plate is too wide to sit beside the tab; it moves up and slims to its 44px faces so the hero's head
    stays clear under it. */
 .story-act-plaque>.trail-levels{top:calc(100% + 19px);gap:6px;padding:1px 8px 1px 3px;border-radius:12px}
 #online .trail-level-picker .secondary{min-height:44px;height:44px;padding:2px}
 .trail-level-chests>img{width:28px;height:28px}
 .trail-level-chests>b{font-size:15px}
 .chapter-card .chapter-route{display:none}
 .chapter-card .chapter-power>div{padding:2px 4px}
 .chapter-card .chapter-power .chapter-power-value{font-size:15px}
 .chapter-card .chapter-power .chapter-power-status{min-height:10px;font-size:9px;line-height:10px}
 .chapter-card .chapter-first,.chapter-card .chapter-need{margin-top:4px}
 .chapter-gate-bar{height:16px}.chapter-gate-bar>b{font-size:12px;line-height:12px}
}
/* Invite friends (docs/REFERRALS.md). With the extra Settings row, the owner's
   Server info and Feature flags share one row so Settings still fits 667px. */
#modal .menu-grid .settings-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#modal .menu-grid .settings-pair .secondary{font-size:var(--tier-dense-fs);padding:8px 6px}
#modal .referral-panel>p{margin:0 0 8px}
#modal .referral-panel .inbox-rewards{display:flex;justify-content:center;gap:10px;margin:0 0 10px}
#modal .referral-panel .account-id{margin:0 0 4px}
#modal .referral-panel .field-hint{margin:0 0 10px}
#modal .referral-note{font:500 13px/1.35 system-ui;color:#5d4a2f}
#modal .referral-panel .referral-note+button.secondary{display:block;margin:0 0 10px}
#modal .referral-claim{display:flex;align-items:flex-end;gap:8px}
#modal .referral-claim .profile-name-field{flex:1;min-width:0;margin:0}
#modal .referral-claim .profile-name-field input{text-transform:uppercase;letter-spacing:.08em}
#modal .referral-claim>button.secondary{flex:none;margin:0;min-height:48px}
#modal .referral-status{margin:4px 0 0;padding:10px 12px;border:2px solid #9fc58a;border-radius:var(--vs-radius);background:#eef7df;font:600 13px/1.4 system-ui;color:#2f5a2c}

/* V18 (build 33): the current league's progress toward the next league floor.
   A static meter (no motion), so reduced motion needs no variant. */
.arena-progress{display:flex;align-items:center;gap:7px;min-width:0}
.arena-progress-track{flex:0 1 140px;min-width:60px;height:8px;border:1px solid #a78862;border-radius:5px;background:#1b1622cc;overflow:hidden}
.arena-progress-track>i{display:block;height:100%;transform-origin:left center;background:linear-gradient(90deg,#f0cc73,#ffe7a0)}
.arena-heading .arena-progress small{font:700 11px/1.1 system-ui;color:var(--cream-300);white-space:nowrap}
/* V17 (build 33): a History row names both fighters, shows the league after the
   fight and carries its own Replay. Rows from an older API keep result/points/coins. */
.arena-history-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;min-height:60px;padding:7px 9px}
.arena-history-row.has-detail{grid-template-columns:30px minmax(0,1fr) auto}
.arena-history-row .arena-emblem{width:30px;height:34px}
.arena-history-row>.arena-history-main{display:grid;gap:3px;min-width:0}
.arena-history-names{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 13px/1.25 system-ui;color:#eadbc4}
.arena-history-result{display:flex;align-items:center;flex-wrap:wrap;column-gap:9px;row-gap:1px;font-size:15px;white-space:nowrap}
.arena-history-row.is-win .arena-history-result>b{color:#ffe7a0}
.arena-history-row.is-loss .arena-history-result>b{color:#f3c0b2}
.arena-history-coins{display:flex;align-items:center;gap:3px}
/* Compact tier (44px), like the Training board's inline action. */
#online .arena-history-row .arena-history-replay{margin:0;min-width:0;min-height:var(--tier-compact);padding:4px 10px;font-size:16px;line-height:1.1}
#online .arena-history-row .arena-history-replay::before{inset:0}
/* Visual polish r2 (arena lane, 2026-10-27). #165: the league header sits on a dark plate, not on the colosseum art. */
#online.arena-view .arena-heading{box-sizing:border-box;padding:7px 9px;border:1px solid #a7886266;border-radius:var(--vs-radius);background:rgba(22,18,30,.72);box-shadow:0 3px 8px #0d0a1266}
#online.arena-view .arena-heading small.arena-season-clock{font:600 13px/1.2 system-ui;color:var(--cream-300)}
/* #5: Refresh's Gem cost is a price chip lettered like the label; red numeral when the wallet is short. */
#online .arena-refresh .arena-button-cost{flex:none;gap:4px;padding:3px 8px 3px 5px;border-radius:9px;background:#0000002e;font:20px/1 Lucky;color:var(--cream-50);-webkit-text-stroke:3px var(--small-edge);paint-order:stroke fill}
/* Refresh is a single row: remove the shared stacked-price margin; intrinsic width keeps Polish ink inside its face. */
#online button.arena-refresh>.arena-button-cost{margin-top:0}
#online button.arena-refresh:disabled:not([data-busy-lock]){--small-top:var(--btn-disabled-top);--small-bottom:var(--btn-disabled-bottom);--small-edge:var(--btn-disabled-edge);--small-lip:var(--btn-disabled-lip);--small-shine:var(--btn-disabled-shine);filter:none;opacity:1}
#online .arena-refresh .arena-button-cost b{font:inherit;color:inherit}
#online .arena-refresh .arena-button-cost img{width:20px;height:20px}
#online .arena-refresh .arena-button-cost.is-short b{color:#ff8a7a}
/* #6: one claim card: status eyebrow, league, rewards and the green Claim. */
.arena-claim .arena-claim-status{font:800 10px/1.2 system-ui;letter-spacing:.8px;text-transform:uppercase;color:#f3d58f}
.arena-claim>span>b{font:20px/1.1 Lucky;color:var(--cream-300)}
/* #166: the empty pool keeps a large league badge centred in the free sand. */
.arena-empty-state{gap:14px}
.arena-empty-state .arena-emblem{width:104px;height:116px;filter:drop-shadow(0 6px 8px #0007)}
.arena-empty-state h2{padding:6px 14px;border-radius:var(--vs-radius);background:#16121eb8}
/* #167: medals for ranks 1-3; the player's row docks under the list. */
.arena-rank-place.arena-medal{display:grid;place-items:center;justify-self:center;box-sizing:border-box;width:26px;height:26px;border:2px solid var(--vs-ink);border-radius:50%;background:linear-gradient(var(--medal-top),var(--medal-bottom));box-shadow:inset 0 2px #ffffff80,0 2px var(--vs-ink);font:16px/1 Lucky;color:var(--vs-ink)}
.arena-medal.place-1{--medal-top:#f3d66d;--medal-bottom:#d9a93a}
.arena-medal.place-2{--medal-top:#eef1f4;--medal-bottom:#b9c0c8}
.arena-medal.place-3{--medal-top:#e7b48a;--medal-bottom:#b8784f}
.arena-rank.arena-own-row{flex:none;border:2px solid #f0cc73;border-radius:13px;background:linear-gradient(#5b4532f2,#3b2e2af2);box-shadow:inset 3px 0 #f0cc73,0 3px #120d16a8;min-height:56px}
.arena-own-row>span>small{color:#f3d58f}
/* #76: History rows: outcome tab, rival portrait with league badge, trophy delta, coins, day, round Replay. */
.arena-history-row{position:relative;padding-left:15px}
.arena-history-row::before{content:'';position:absolute;left:0;top:7px;bottom:7px;width:5px;border-radius:0 4px 4px 0;background:var(--outcome,#c9b28a)}
.arena-history-row.is-win{--outcome:#62c95a}.arena-history-row.is-loss{--outcome:#e5566b}.arena-history-row.is-draw{--outcome:#c9b28a}
.arena-history-row.has-detail{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}
.arena-history-face{position:relative;display:block;width:46px;height:50px}
.arena-history-face .arena-portrait{width:46px;height:50px;border-radius:11px}
.arena-history-face .arena-emblem{position:absolute;right:-6px;bottom:-5px;width:22px;height:25px}
.arena-history-row .arena-history-names{font:700 14px/1.25 system-ui;color:var(--cream-300)}
.arena-history-row .arena-history-result{column-gap:10px;font-size:14px}
.arena-history-row .arena-history-result>b{color:var(--outcome)}
.arena-history-delta{display:inline-flex;align-items:center;gap:3px;font-weight:800;font-variant-numeric:tabular-nums}
.arena-history-delta>.ui-icon{width:17px;height:17px}
.arena-history-row .arena-history-coins img{width:18px;height:18px}
.arena-history-ago{font-size:11px;color:#cdbca5}
#online .arena-history-row .arena-history-replay{display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:0;border-radius:50%}
#online .arena-history-row .arena-history-replay::before{border-radius:50%}
.arena-history-replay .ui-icon{width:26px;height:26px}
/* #75: the (?) sheet is headed icon rows. */
#modal .arena-rules{display:grid;gap:9px;margin-top:8px}
#modal .arena-rule{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:start;text-align:left}
#modal .arena-rule-icon{display:grid;place-items:center;width:30px;height:30px}
#modal .arena-rule-icon>:is(img,.ui-icon,svg){width:26px;height:26px;object-fit:contain}
#modal .arena-rule h2{margin:0 0 1px;font:16px/1.15 Lucky;color:#5a3d2a}
#modal .arena-help .arena-rule p{margin:0;font-size:13px;line-height:1.3}
@media(max-height:760px){#modal .arena-rules{gap:5px;margin-top:4px}#modal .arena-rule{grid-template-columns:22px minmax(0,1fr);gap:7px}#modal .arena-rule-icon{width:22px;height:22px}#modal .arena-rule-icon>:is(img,.ui-icon,svg){width:20px;height:20px}#modal .arena-rule>div{font-size:12px;line-height:1.25}#modal .arena-rule h2{display:inline;margin:0 5px 0 0;font-size:14px;line-height:1}#modal .arena-help .arena-rule p{display:inline;font-size:12px;line-height:1.25;margin:0}}
/* V02 (build 31 feedback): the selected look's Upgrade bar under the tiles. One
   fixed height in every state (price + Upgrade, Max level, or a source note), so
   choosing another look never stretches the card or the grid. */
.weapon-upgrade-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;box-sizing:border-box;height:60px;padding:0 8px 0 10px;border:2px solid #b6a382;border-radius:14px;background:#f7efd9;text-align:left}
.weapon-upgrade-info{display:grid;gap:1px;min-width:0}
.weapon-upgrade-info b{font:700 13px/1.2 system-ui,sans-serif;color:#283543;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.weapon-upgrade-info .weapon-level-price,.weapon-upgrade-info .weapon-level-note{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#modal .weapon-upgrade-bar .weapon-upgrade{min-width:0;min-height:var(--tier-compact,44px);height:44px;margin:0;padding:0 16px;font-size:18px;white-space:nowrap}
/* AC01 (build 38): Backpack is a classic inventory. A leather-dark inset holds a
   5x4 window of recessed slots; an owned item sits on a warm lit slot with
   its count in the corner, empty slots stay dim. Tap opens the item detail. */
#modal .backpack-panel>p{margin:0 0 8px;text-align:center;font:13px/1.35 system-ui;color:#5d4a36}
.backpack-grid{position:relative;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:9px;border-radius:16px;background:linear-gradient(#6d5137,#4d3826);box-shadow:inset 0 3px 7px #2a1c1199,inset 0 -2px #8f6d4a,0 2px var(--card-face)}
.backpack-slot{position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:0;min-height:44px;margin:0;padding:6px;border:2px solid var(--vs-ink-text);border-radius:var(--vs-radius);background:radial-gradient(circle at 50% 38%,var(--cream-300),#e9c98c 62%,#c79b5c);box-shadow:inset 0 2px var(--cream-50),inset 0 -3px #a77b43,0 2px #1f150d;color:inherit;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.backpack-slot:active{transform:translateY(1px) scale(.97);box-shadow:inset 0 2px var(--cream-50),inset 0 -2px #a77b43,0 1px #1f150d}
.backpack-slot img{width:78%;height:78%;object-fit:contain;filter:drop-shadow(0 2px 1px #4a311a66);pointer-events:none}
/* AC85 (build 49, ASC AFJ954vJgdjHp1hU7Fbuz7g): the ×N badge is inset 6-8px from the
   slot's corner on every tile (audit: b49-rules-ui-audit.mjs). */
.backpack-slot .backpack-count{position:absolute;right:5px;bottom:5px;font:15px/1 Lucky,system-ui;color:var(--cream-50);letter-spacing:.2px;-webkit-text-stroke:3px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 2px var(--vs-ink-text));pointer-events:none}
.backpack-slot.is-empty{cursor:default;border-color:#3a2a1c;background:linear-gradient(#5a432e,#47331f);box-shadow:inset 0 3px 5px #24180f99,inset 0 -1px #7d5f40}
/* Visual polish r2 (findings 10/56/78/219): no pager. The grid window is always
   five by four slots, so the dialog never changes height; more items scroll
   inside it (whole rows, a soft bottom fade while more is below). An empty
   Backpack shows the backpack art and one line in the same window, no grid. */
.backpack-panel{container-type:inline-size}
.backpack-panel.is-scrolling>.backpack-grid{grid-auto-rows:calc((100cqw - 46px)/5);align-content:start;height:calc((100cqw - 46px)*.8 + 39px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
.backpack-grid.has-more{-webkit-mask-image:linear-gradient(#000 calc(100% - 18px),#0008);mask-image:linear-gradient(#000 calc(100% - 18px),#0008)}
.backpack-empty-state{display:grid;place-items:center;align-content:center;gap:10px;height:calc((100cqw - 46px)*.8 + 39px);box-sizing:border-box;padding:12px}
.backpack-empty-state>img{width:min(120px,34cqw);height:auto;aspect-ratio:1;object-fit:contain;opacity:.9;filter:drop-shadow(0 4px 2px #4a311a40)}
#modal .backpack-empty-state>.backpack-empty{display:block;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;text-align:center;color:#66513a;font:700 16px/1.35 system-ui}
#modal:has(>.backpack-panel)>h1{margin-bottom:4px}
.backpack-detail{display:grid;justify-items:center;gap:6px;text-align:center}
/* Visual polish r2 (finding 55): the item's (?) sits in the detail's top-right corner. */
.backpack-detail.has-help{position:relative;padding-inline:44px}
.backpack-detail.has-help>.help-button{position:absolute;top:0;right:0}
.backpack-detail h1{margin:0}
.backpack-detail .eyebrow{margin:0}
.backpack-detail-art{position:relative;display:grid;place-items:center;width:116px;height:116px;border:3px solid var(--vs-ink-text);border-radius:22px;background:radial-gradient(circle at 50% 38%,var(--cream-200),#ecca8b 62%,#c99a58);box-shadow:inset 0 3px var(--cream-50),inset 0 -4px #a77b43,0 3px #1f150d55}
.backpack-detail-art img{width:84px;height:84px;object-fit:contain;filter:drop-shadow(0 3px 2px #4a311a66)}
.backpack-detail-art .backpack-detail-count{font-size:17px}
.backpack-detail p{margin:0;font:14px/1.4 system-ui;color:#4f3e2c;max-width:30ch}
/* AB27 (build 37 feedback): the Training milestone / rank-up is a celebration.
   Emblem pop over the Victory aura with a one-shot burst ring, rank title on a
   rank-coloured ribbon, then a receipt card with the three permanent stats and
   the gained one highlighted. Entries are transform/opacity, 150-450 ms, staggered;
   the aura keeps its slow rays. Reduced motion shows the end state. */
#modal:has(.rankup-celebration){background:radial-gradient(circle at 50% 24%,var(--card-face) 0,var(--gold-100) 34%,#f0cf86 62%,#ddb46b 100%);border-color:#b07a35}
.rankup-celebration{--rank-ribbon:#a8693b;--rank-ribbon-dark:#6f4021;gap:4px}
.rankup-celebration[data-rank=explorer]{--rank-ribbon:#2f8c93;--rank-ribbon-dark:#1b5559}
.rankup-celebration[data-rank=pathfinder]{--rank-ribbon:#bf3a3f;--rank-ribbon-dark:#7b1f24}
.rankup-celebration[data-rank=guardian]{--rank-ribbon:#6d43a6;--rank-ribbon-dark:#3f2468}
/* Visual polish r2 (meta #241): milestone and rank-up share one orange Lucky headline (the former rank-up style). */
.rankup-eyebrow{position:relative;z-index:1;margin:0;font:21px/1.1 Lucky,system-ui;letter-spacing:.5px;text-transform:none;color:#c0561c;filter:drop-shadow(0 2px var(--cream-250));text-wrap:balance}
.rankup-celebration.is-promoted .rankup-eyebrow{font:21px/1.1 Lucky,system-ui;letter-spacing:.5px;text-transform:none;color:#c0561c;filter:drop-shadow(0 2px var(--cream-250))}
.rankup-celebration .milestone-art{width:176px;height:168px}
.rankup-celebration .victory-glow{background:radial-gradient(circle,#ffd25fdd 0%,#ffe08f88 36%,transparent 70%)}
.rankup-celebration .victory-rays{opacity:.95}
.rankup-burst{position:absolute;z-index:0;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;border-radius:50%;border:5px solid var(--gold-50);box-shadow:0 0 18px #ffd36b,inset 0 0 14px #ffd36b;opacity:0;animation:rankup-burst .45s ease-out .12s both}
.rankup-emblem{position:relative;z-index:1;width:140px;height:140px;object-fit:contain;filter:drop-shadow(0 7px 7px #6a431c77);animation:rankup-emblem .45s cubic-bezier(.2,.9,.25,1.25) both}
.rankup-title{position:relative;z-index:1;margin:2px 0 0;animation:rankup-rise .36s ease-out .14s both}
.rankup-title span{display:inline-block;min-width:170px;max-width:100%;padding:5px 30px 8px;font:30px/1.05 Lucky,system-ui;color:var(--cream-50);text-shadow:none;background:linear-gradient(var(--rank-ribbon),var(--rank-ribbon-dark));clip-path:polygon(0 0,100% 0,calc(100% - 14px) 50%,100% 100%,0 100%,14px 50%);box-shadow:inset 0 2px #ffffff55}
.rankup-path{position:relative;z-index:1;margin:2px 0 0;font:800 15px/1.25 system-ui;color:#5a3a1c;animation:rankup-rise .36s ease-out .2s both}
.rankup-level{position:relative;z-index:1;margin:2px 0 0;padding:3px 12px;border-radius:999px;background:var(--cream-200);border:1px solid #d7b073;font:800 13px/1.3 system-ui;color:#6b4a24;animation:rankup-rise .36s ease-out .22s both}
.rankup-receipt{position:relative;z-index:1;width:100%;margin-top:6px;padding:9px 10px 8px;border:2px solid #c99b5a;border-radius:16px;background:linear-gradient(var(--cream-50),#f7e7c4);box-shadow:inset 0 2px #fff,0 3px #b98b4f66;animation:rankup-rise .36s ease-out .28s both}
.rankup-celebration .rankup-receipt h2{margin:0 0 6px;font:24px/1.1 Lucky,system-ui;color:#2f7d3a;filter:drop-shadow(0 2px #fff)}
.rankup-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.rankup-stat{position:relative;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;align-items:center;column-gap:4px;padding:5px 6px;border:1px solid #d9c095;border-radius:var(--vs-radius);background:var(--cream-50);text-align:left;min-width:0}
.rankup-stat img{grid-row:1/3;width:26px;height:26px;object-fit:contain}
.rankup-stat small{font:700 11px/1.1 system-ui;color:#7b6448}
.rankup-stat b{font:800 15px/1.15 system-ui;color:#3b2a1a;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
.rankup-stat.is-gained{border-color:#d9962e;background:linear-gradient(var(--cream-350),#ffe08f);box-shadow:0 0 0 2px #ffd56f88}
.rankup-stat em{position:absolute;top:-9px;right:-4px;padding:1px 6px;border-radius:999px;background:#3c9a48;color:#fff;font:800 12px/1.3 system-ui;font-style:normal;box-shadow:0 2px #1f5f2a}
.rankup-celebration .rankup-receipt p{margin:7px 0 0;font:13px/1.35 system-ui;color:#5c4730}
@keyframes rankup-emblem{0%{opacity:0;transform:scale(.35) rotate(-14deg)}70%{opacity:1;transform:scale(1.08) rotate(3deg)}100%{opacity:1;transform:none}}
@keyframes rankup-burst{0%{opacity:.95;transform:scale(.5)}100%{opacity:0;transform:scale(1.25)}}
@keyframes rankup-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
/* Visual polish r2 (meta #272/#240): the gained stat's green chip is the one gain marker (no repeated "HP +5"
   heading); it pops in once the receipt has risen. The celebration ends on the green "go" action, not a tan Close. */
.rankup-receipt{padding-top:12px;padding-bottom:10px}
.rankup-stat.is-gained em{animation:rankup-pop .32s cubic-bezier(.3,.7,.4,1) .62s both}
@keyframes rankup-pop{0%{opacity:0;transform:scale(.8)}65%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:none}}
#modal:has(.milestone-celebration)>button.rankup-ok{width:100%;min-height:62px;margin:12px 0 2px;font-size:28px}
/* Short phones: the Combat Power strip owns the safe top band, so the dialog
   starts below it (nothing hides behind the strip) and the art shrinks. */
/* AB27 integration: browser-chrome phones (701-800px tall) keep the compact celebration below the Combat Power strip. */
@media(max-height:800px){#modal:has(.rankup-celebration){margin-top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 92px);margin-bottom:auto}}
@media(max-height:700px){#modal:has(.rankup-celebration){margin-top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 122px)}}
@media(max-height:800px){.rankup-celebration .milestone-art{width:132px;height:112px}.rankup-emblem{width:100px;height:100px}.rankup-burst{width:104px;height:104px;margin:-52px 0 0 -52px}.rankup-title span{font-size:25px}.rankup-celebration .rankup-receipt p{margin-top:5px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.rankup-celebration,.rankup-celebration *{animation:none!important}.rankup-burst{display:none}}
#modal:has(.backpack-detail) .equipment-actions>button:only-child{grid-column:1/-1;width:100%;flex:1 1 100%}
/* AC35 (build 40 feedback, ASC ALPRV3OhRY7rtCubVw4by9c): the shared reward claim
   receipt (showRewardClaim in hub-panels.js) replaces the small claim toasts of
   daily tasks, the Patrol Log and the Gear key gift.
   AC54 (build 43 feedback, ASC ACohvEq9Hrz6uGHLFKa__co, the Capybara Go flair):
   no cream card. #modal.reward-claim-modal is a transparent dialog filling the safe
   area over a near-black dim; a golden ribbon "Rewards" spans the screen over a
   dark slate band with gold rules, the rewards glow on the band (framed item
   tiles: the Equipment / Backpack face, rarity tile per docs/RARITY_COLORS.md, a
   gold halo and a twinkling sparkle each), sparkles scatter above and below, and
   "Tap to close" (a real button, AC05 panel hint) sits right under the band. A tap
   anywhere closes it. Transform/opacity motion only; reduced motion is the still
   end state. */
#modal.passive-receipt.reward-claim-modal{position:fixed;inset:var(--safe-top,env(safe-area-inset-top,0px)) 0 var(--safe-bottom,env(safe-area-inset-bottom,0px));width:100vw;max-width:none;height:auto;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;overflow:hidden;color:var(--cream-200)}
#modal.passive-receipt.reward-claim-modal::backdrop{background:#030409e8;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
#modal.passive-receipt .reward-claim{position:relative;display:flex;flex-direction:column;align-items:center;gap:0;width:100%;box-sizing:border-box;margin:0;padding:0;outline:none}
.reward-claim-stars{position:relative;width:100%;height:58px;flex:none;pointer-events:none}
/* AC291 (build 78 feedback): the decorative stars arrive as one brief accent (200 ms
   ease-out, 50 ms stagger) and then breathe in opacity only, so the earned tiles
   stay the strongest element. Positions, sizes and paint are unchanged. */
.reward-claim-stars i{--s:16px;position:absolute;left:var(--x);top:var(--y);display:block;width:var(--s);height:var(--s);filter:drop-shadow(0 0 4px #ffe48acc);animation:reward-star-pop 200ms cubic-bezier(.23,1,.32,1) calc(120ms + var(--i) * 50ms) both,reward-star-twinkle 1.4s ease-in-out calc(.75s + var(--i) * .27s) infinite alternate}
.reward-claim-stars i::before{content:"";display:block;width:100%;height:100%;background:radial-gradient(circle,#fffef0 0 18%,var(--honey-300) 55%,#ffc53d);clip-path:polygon(50% 0,59% 41%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 41%)}
.reward-claim-stars.is-top i:nth-child(1){--x:12%;--y:60%;--s:12px}.reward-claim-stars.is-top i:nth-child(2){--x:28%;--y:16%;--s:18px}.reward-claim-stars.is-top i:nth-child(3){--x:52%;--y:30%;--s:24px}.reward-claim-stars.is-top i:nth-child(4){--x:70%;--y:6%;--s:14px}.reward-claim-stars.is-top i:nth-child(5){--x:84%;--y:48%;--s:19px}
.reward-claim-stars.is-bottom i:nth-child(1){--x:16%;--y:16%;--s:17px}.reward-claim-stars.is-bottom i:nth-child(2){--x:34%;--y:58%;--s:12px}.reward-claim-stars.is-bottom i:nth-child(3){--x:58%;--y:22%;--s:21px}.reward-claim-stars.is-bottom i:nth-child(4){--x:74%;--y:64%;--s:13px}.reward-claim-stars.is-bottom i:nth-child(5){--x:86%;--y:12%;--s:16px}
@keyframes reward-star-pop{from{opacity:0;transform:scale(.94) rotate(-8deg)}to{opacity:1;transform:none}}
@keyframes reward-star-twinkle{from{opacity:1}to{opacity:.65}}
/* The title ribbon (owner 2026-11-17: the old one "wygląda jak akordeon", then "możesz rozwiązać klasę problemu?").
   One look for every title ribbon: the reward claim, unlock, first weapon and pack receipts and the fishing catch card.
   The whole ribbon is ONE vector drawing (--rb-art): both swallow tails, the plate's ink outline with its hard drop as a
   single ink shape, the fill, the lit top and the lower lip. It is a border image, so there are no stacked layers and no
   joints: every earlier defect came from a joint (tail boxes laid over the plate, ragged gradient outlines, a fold
   triangle, a tail hanging under the plate, a hairline between the border and its drop shadow). Slices: the two 42 px
   end caps (tail and plate corner) keep their shape, only the plate's middle stretches sideways; the top and bottom
   halves meet at the notch tip, so a taller plate adds height there and a shorter one scales the caps down in
   proportion. The drawing reaches --rb-out past each side for the tails and 3 px under the box for the drop. Each tail
   meets the plate inside its height and ends above its bottom. A palette is one drawing; gold is the default.
   AC901: the Mountain and Arena Victory title (`.victory-ribbon`) is the same drawing. */
.reward-claim-ribbon,.fishing-catch:not(.is-chest)>h1,.victory-ribbon,.afk-ribbon{--rb-art:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='174' viewBox='0 0 120 58'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffe48a'/%3E%3Cstop offset='.52' stop-color='%23ffc93f'/%3E%3Cstop offset='1' stop-color='%23f6a92a'/%3E%3C/linearGradient%3E%3ClinearGradient id='t' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f39a33'/%3E%3Cstop offset='1' stop-color='%23d8701c'/%3E%3C/linearGradient%3E%3ClinearGradient id='s' gradientUnits='userSpaceOnUse' x1='14' y1='0' x2='31' y2='0'%3E%3Cstop offset='0' stop-opacity='0'/%3E%3Cstop offset='1' stop-opacity='.22'/%3E%3C/linearGradient%3E%3CclipPath id='c'%3E%3Crect x='31' y='3' width='58' height='49' rx='6'/%3E%3C/clipPath%3E%3Cpath id='l' d='M31 6.5L1.5 12 11.5 33 1.5 54 31 48.5Z'/%3E%3C/defs%3E%3Cg id='e'%3E%3Cuse href='%23l' fill='url(%23t)'/%3E%3Cuse href='%23l' fill='url(%23s)'/%3E%3Cuse href='%23l' fill='none' stroke='%233a2414' stroke-width='3' stroke-linejoin='round'/%3E%3C/g%3E%3Cuse href='%23e' transform='matrix(-1 0 0 1 120 0)'/%3E%3Crect x='28' width='64' height='58' rx='9' fill='%233a2414'/%3E%3Cg clip-path='url(%23c)'%3E%3Crect x='31' y='3' width='58' height='49' fill='url(%23p)'/%3E%3Crect x='31' y='3' width='58' height='3' fill='%23fff3c4'/%3E%3Crect x='31' y='48' width='58' height='4' fill='%23d98a1f'/%3E%3C/g%3E%3C/svg%3E");--rb-out:28px;position:relative;box-sizing:border-box;border:3px solid #0000;background:none;box-shadow:none;border-image:var(--rb-art) 98 126 74 126 fill/32.667px 42px 24.667px 42px/0 var(--rb-out) 3px stretch}
.reward-claim-ribbon{z-index:2;flex:none;width:calc(100% - 68px);max-width:440px;margin-bottom:-24px;padding:7px 18px 9px;animation:reward-ribbon-in .34s cubic-bezier(.2,.9,.3,1.3) both}
#modal .reward-claim-ribbon h1{margin:0;color:var(--cream-50);font:31px/1.05 Lucky,system-ui;text-align:center;letter-spacing:.02em;white-space:nowrap;-webkit-text-stroke:var(--label-stroke,.14em) var(--ink-brown);paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,.07em) 0 var(--ink-brown)) drop-shadow(0 2px 8px #3a241466);overflow-wrap:normal}
@keyframes reward-ribbon-in{from{opacity:0;transform:scaleX(.4)}to{opacity:1;transform:none}}
/* The band: full width, dark slate, gold rules top and bottom. AC100 (build 52, ASC
   ABNCMV41vESn0OynQmfZe6c, "almost good: refine sizes and centring"): even space
   from the ribbon to the source pill and from the names to the gold rule, 92px tile
   faces with the icon clear of the count, one gap rhythm between the rows. */
.reward-claim-band{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;box-sizing:border-box;padding:40px 16px 18px;border-block:3px solid #f2a33a;background:radial-gradient(ellipse 55% 75% at 50% 55%,#ffd76a26,#ffd76a00 70%),linear-gradient(#34334a,#27263a);box-shadow:0 -6px 0 var(--panel-night),0 6px 0 var(--panel-night),0 -9px 0 #f2a33a66,0 9px 0 #f2a33a66;transform-origin:50% 0;animation:reward-band-open .42s cubic-bezier(.2,.9,.3,1.12) .16s both}
@keyframes reward-band-open{from{opacity:.3;transform:scaleY(.08)}to{opacity:1;transform:none}}
.reward-claim-source{display:inline-flex;align-items:center;max-width:100%;padding:4px 12px 3px;border:2px solid #5a3a1c;border-radius:999px;background:linear-gradient(#ffd977,#e9a83a);box-shadow:0 2px #5a3a1c;color:var(--cream-50);font:15px/1.1 Lucky,system-ui;letter-spacing:.02em;-webkit-text-stroke:.14em #5a3a1c;paint-order:stroke fill;text-align:center}
.reward-claim-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 16px;margin:0;padding:0;list-style:none}
.reward-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:100px;min-width:0;animation:reward-tile-pop .26s linear calc(.5s + var(--i) * 80ms) both}
/* A soft gold halo behind each tile (opacity-only pulse). */
.reward-tile::before{content:"";position:absolute;z-index:0;left:50%;top:46px;width:136px;height:136px;margin:-68px 0 0 -68px;border-radius:50%;background:radial-gradient(circle,#ffd76a8c,#ffd76a26 48%,#ffd76a00 70%);pointer-events:none;animation:reward-halo-pulse 1.8s ease-in-out .9s infinite alternate}
/* AC562 review (build 126): each tile pops 0.6 → 1.08 → 1 in 260ms, 80ms apart. */
@keyframes reward-tile-pop{0%{opacity:0;transform:scale(.6);animation-timing-function:cubic-bezier(.33,1,.68,1)}62%{opacity:1;transform:scale(1.08);animation-timing-function:cubic-bezier(.65,0,.35,1)}100%{opacity:1;transform:none}}
/* Visual polish v1 (motion): receipt celebration tiers (ui-components.ts uiRewardReceipt data-celebration). Small keeps a
   calmer, smaller halo; the best tile of a medium or large receipt pops higher (1.16) and its halo is larger; a large
   receipt's best grid tile adds the AC695 spotlight (the shared light burst, sized to the band) over a brighter halo. */
.reward-claim[data-celebration=small] .reward-claim-grid>.reward-tile::before{scale:.8;background:radial-gradient(circle,#ffd76a66,#ffd76a1c 48%,#ffd76a00 70%)}
.reward-claim-grid>.reward-tile.is-best{animation-name:reward-tile-pop-best;z-index:1}
.reward-claim-grid>.reward-tile.is-best::before{scale:1.22}
.reward-claim[data-celebration=large] .reward-claim-grid>.reward-tile.is-best::before{scale:1.4;background:radial-gradient(circle,#fff0b0d9,#ffd25c80 40%,#ffb84a2e 58%,#ffb84a00 70%)}
.reward-claim-grid>.reward-tile>.reward-tile-light{--hero-face:92px;--hero-light:180px}
.reward-claim-grid.is-dense>.reward-tile>.reward-tile-light{--hero-face:72px;--hero-light:132px}
@keyframes reward-tile-pop-best{0%{opacity:0;transform:scale(.5);animation-timing-function:cubic-bezier(.33,1,.68,1)}58%{opacity:1;transform:scale(1.16);animation-timing-function:cubic-bezier(.65,0,.35,1)}100%{opacity:1;transform:none}}
@keyframes reward-halo-pulse{from{opacity:1}to{opacity:.55}}
.reward-tile-face{--tier:var(--rarity-standard);--tier-accent:var(--tier);position:relative;z-index:1;display:grid;place-items:center;width:92px;height:92px;box-sizing:border-box;padding:13px;border-radius:14px;border:2.5px solid color-mix(in srgb,var(--tier) 65%,#5e4630);background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--tier) 22%,var(--cream-200)) 0 35%,color-mix(in srgb,var(--tier-accent) 50%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--tier-accent) 40%,#0000),0 0 0 3px var(--honey-200),0 0 16px 4px #ffd25c99,0 4px var(--panel-night)}
.reward-tile-face img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 1px #4a311a66)}
/* AC269: reward item inspection keeps the established neutral tile and target. */
#modal .reward-tile-face{flex:none;min-width:44px;min-height:44px;margin:0;cursor:pointer}
/* AC265: the Gear reveal heading needs the same clear ink edge as reward titles. */
#modal .draw-reveal.is-gear header h1{-webkit-text-stroke:2.5px var(--ink-brown);paint-order:stroke fill;filter:drop-shadow(0 4px 3px #171020cc)}
.reward-tile-count{position:absolute;right:5px;bottom:2px;font:19px/1 Lucky,system-ui;color:var(--cream-50);letter-spacing:.2px;-webkit-text-stroke:3px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 2px var(--vs-ink-text))}
/* AC291 follow-up (owner, 2026-10-08): each tile's corner sparkle breathes with the
   decorative stars' calm twinkle (opacity 1 to .65 only, never shrinking or spinning)
   on its own unchanged 1.2 s period and 0.3 s per-tile stagger. */
.reward-tile-spark{position:absolute;right:-9px;top:-9px;width:20px;height:20px;filter:drop-shadow(0 0 4px #fff3b0);animation:reward-star-twinkle 1.2s ease-in-out calc(1s + var(--i) * .3s) infinite alternate}
.reward-tile-spark::before{content:"";display:block;width:100%;height:100%;background:radial-gradient(circle,#fff 0 20%,#ffe58f 60%);clip-path:polygon(50% 0,59% 41%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 41%)}
.reward-tile>small{position:relative;z-index:1;max-width:100%;color:var(--cream-250);font:800 13px/1.15 system-ui;text-align:center;filter:drop-shadow(0 1px 2px #0b0f1c);overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.reward-tile[data-tier=great] .reward-tile-face{--tier:var(--rarity-great)}
.reward-tile[data-tier=rare] .reward-tile-face{--tier:var(--rarity-rare)}
.reward-tile[data-tier=epic] .reward-tile-face{--tier:var(--rarity-epic)}
.reward-tile[data-tier=legendary] .reward-tile-face{--tier:var(--rarity-legendary);--tier-accent:var(--rarity-legendary-accent)}
.reward-tile[data-tier=mythic] .reward-tile-face{--tier:var(--rarity-mythic)}
.reward-tile[data-tier=transcendent] .reward-tile-face{--tier:var(--rarity-transcendent);--tier-accent:var(--rarity-transcendent-accent)}
:lang(ja) .reward-claim-source,:lang(ko) .reward-claim-source,:is(:lang(zh-Hans),:lang(zh-Hant)) .reward-claim-source{font:800 14px/1.2 system-ui;-webkit-text-stroke:.16em #5a3a1c}
/* "Tap to close": the shared AC05 hint face (a real button), right under the band. */
/* AC05: keep the letters ~24px under the visible band. Story r2 #26 (its lane README) replaces
   the old 9px ledge with a 6px ledge, so the shared hint compensation decreases by the same 3px. */
#modal .reward-claim .reward-claim-close{margin-top:calc(var(--tap-hint-gap,24px) + 2px);font-size:17px;pointer-events:auto;animation:dismiss-hint-in .35s ease-out .8s both,dismiss-hint-breathe 1.8s ease-in-out 1.15s infinite alternate}
@media(max-height:700px){.reward-claim-stars{height:40px}#modal .reward-claim-ribbon h1{font-size:27px}.reward-claim-band{padding-top:36px;padding-bottom:14px;gap:10px}.reward-tile-face{width:78px;height:78px;padding:10px}.reward-tile{width:86px}.reward-tile::before{top:39px}.reward-tile-count{font-size:17px}}
@media(prefers-reduced-motion:reduce){.reward-claim-stars i,.reward-claim-ribbon,.reward-claim-band,.reward-tile,.reward-tile::before,.reward-tile-spark{animation:none}#modal .reward-claim .reward-claim-close{animation:none;opacity:1}}
/* AC460 (build 105 feedback): more than nine rewards (for example a Moonleaf
   ten-draw with several grand prizes, which never merge) use a denser tile, four to
   a row on every phone, so the whole receipt fits without scrolling; one to nine
   rewards keep the AC100 sizes. The row gap stays 12px (F05 lip clearance) and the
   pop stagger tightens to 50ms, so eleven tiles land in about the time eight take
   at the normal 90ms. */
.reward-claim-grid.is-dense{gap:12px 10px}
.reward-claim-grid.is-dense>.reward-tile{width:76px;animation-delay:calc(.5s + var(--i) * 50ms)}
.reward-claim-grid.is-dense>.reward-tile::before{top:36px;width:104px;height:104px;margin:-52px 0 0 -52px}
#modal .reward-claim-grid.is-dense .reward-tile-face{width:72px;height:72px;padding:9px;border-radius:var(--vs-radius)}
/* AC466 (build 106 feedback, owner 2026-10-13: "Nagroda główna powinna być specjalnie wyróżniona w rewards, zrób coś
   cool motion design też"): an opt-in highlighted reward (an event's grand prize) leaves the grid for one centred
   hero row above it. Its tile is larger, framed in a double gold rim, and stands on a spotlight: a warm glow that
   breathes, slow gold rays, four twinkles and a periodic shine sweeping across the face; a short gold label pill sits
   under it (clear of the centred count). One hero uses the largest face; two share the row; three or more drop to the
   regular tile size so the row still fits Mini. The entry is client.ts animateRewardHero (.is-hero-reveal delays the
   grid tiles and Tap to close until the hero has landed); idle loops are opacity/transform only and stop under reduced
   motion, which shows the same still end state. Highlight is presentation emphasis, never a rarity colour. */
.reward-claim-hero{--hero-face:112px;--hero-light:212px;--hero-room:20px;display:flex;flex-wrap:wrap;justify-content:center;gap:14px 26px;margin:2px 0 4px;padding:0;list-style:none}
.reward-claim-hero[data-count="2"]{--hero-face:100px;--hero-light:196px}
.reward-claim-hero:not([data-count="1"],[data-count="2"]){--hero-face:96px;--hero-light:124px;--hero-room:8px;gap:12px 10px}
.reward-claim-hero>.reward-tile{width:calc(var(--hero-face) + var(--hero-room));gap:9px;animation:none}
.reward-claim-hero>.reward-tile::before{content:none}
#modal .reward-claim-hero .reward-tile-face{width:var(--hero-face);height:var(--hero-face);padding:calc(var(--hero-face) * .13);border-radius:18px;border-color:#b97a1f;box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--tier-accent) 40%,#0000),0 0 0 3px #fff0b0,0 0 0 6px #e9a53a,0 0 26px 9px #ffd25cc4,0 5px var(--panel-night)}
.reward-claim-hero .reward-tile-face .reward-tile-count{font-size:19px}
.reward-claim-hero .reward-tile-spark{right:-12px;top:-12px;width:24px;height:24px}
/* The spotlight is one fixed circle (sized so a hero-only receipt's light ends inside the band): its rays turn as a
   pseudo-element clipped to that circle, so nothing at rest reaches past it, the receipt never gains a scroll area and
   the AC05 hint keeps measuring from the band. */
.reward-hero-spotlight{position:absolute;z-index:0;left:50%;top:calc(var(--hero-face) / 2);width:var(--hero-light);height:var(--hero-light);margin:calc(var(--hero-light) / -2) 0 0 calc(var(--hero-light) / -2);pointer-events:none}
.reward-hero-spotlight>i{position:absolute;inset:0;display:block;border-radius:50%}
.reward-hero-glow{background:radial-gradient(circle,#fff6d0e6 0,#ffd25cad 24%,#ffb84a4d 46%,#ffb84a00 68%);animation:reward-hero-breathe 2.4s ease-in-out infinite alternate}
.reward-hero-rays{overflow:hidden}
.reward-hero-rays::before{content:"";position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 6deg,#ffe58a00 0deg 5deg,#ffd76ad0 7deg 13deg,#ffe58a00 15deg 30deg);-webkit-mask-image:radial-gradient(circle,#000 20%,#0008 44%,transparent 70%);mask-image:radial-gradient(circle,#000 20%,#0008 44%,transparent 70%);animation:skill-spotlight-turn 28s linear infinite}
/* The receipt's source pill stays above the light that rises behind it. */
.reward-claim-hero~*,.reward-claim.has-hero .reward-claim-source{position:relative;z-index:1}
/* A hero without a label keeps the same room under its face, so its light still ends inside the band. */
.reward-claim-hero:not(:has(.reward-hero-label)){padding-bottom:34px}
/* Owner (2026-10-13): the label stays on one line. Heroes sharing one label (several grand prizes) show it once,
   centred under their row with the band's width, instead of squeezed under each tile. */
.reward-claim-hero>.reward-hero-caption{flex:0 0 100%;display:flex;justify-content:center;margin:0;padding:0;list-style:none}
#modal .reward-hero-caption>.reward-hero-label{max-width:calc(100vw - 40px);white-space:nowrap;text-wrap:nowrap}
.reward-hero-spotlight>.reward-hero-twinkle{inset:auto;width:15px;height:15px;border-radius:0;background:radial-gradient(circle,#fffef0 0 18%,var(--honey-300) 55%,#ffc53d);clip-path:polygon(50% 0,59% 41%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 41%);animation:reward-hero-twinkle 1.6s ease-in-out infinite alternate}
.reward-hero-spotlight>.reward-hero-twinkle:nth-child(3){left:12%;top:24%;animation-delay:-.3s}
.reward-hero-spotlight>.reward-hero-twinkle:nth-child(4){right:11%;top:30%;width:11px;height:11px;animation-delay:-1.1s}
.reward-hero-spotlight>.reward-hero-twinkle:nth-child(5){left:18%;bottom:20%;width:10px;height:10px;animation-delay:-.7s}
.reward-hero-spotlight>.reward-hero-twinkle:nth-child(6){right:16%;bottom:16%;width:13px;height:13px;animation-delay:-1.5s}
.reward-hero-shine{position:absolute;z-index:2;inset:0;border-radius:15px;overflow:hidden;pointer-events:none}
.reward-hero-shine::before{content:"";position:absolute;top:-25%;bottom:-25%;left:-55%;width:38%;background:linear-gradient(90deg,#fff0,#ffffffb8 50%,#fff0);opacity:0;transform:skewX(-18deg);animation:reward-hero-shine 3.6s ease-in-out 1.8s infinite}
/* One hero's label may use the band's width; side-by-side heroes keep theirs inside their own column (a long
   label wraps between words, balanced). */
#modal .reward-hero-label{position:relative;z-index:2;flex:none;box-sizing:border-box;width:max-content;max-width:min(300px,calc(100vw - 40px));margin:0;padding:3px 11px 4px;border:2.5px solid var(--ink-brown);border-radius:999px;background:linear-gradient(#ffe48a,#ffc93f 55%,#f6a92a);box-shadow:inset 0 2px var(--gold-50),0 2px var(--ink-brown);color:var(--cream-50);font:16px/1.05 Lucky,system-ui;letter-spacing:.02em;text-align:center;-webkit-text-stroke:.14em var(--ink-brown);paint-order:stroke fill;text-wrap:balance;overflow-wrap:break-word}
#modal .reward-claim-hero[data-count="2"] .reward-tile>.reward-hero-label{max-width:calc(var(--hero-face) + 36px);font-size:14px}
#modal .reward-claim-hero:not([data-count="1"],[data-count="2"]) .reward-tile>.reward-hero-label{max-width:calc(var(--hero-face) + 8px);padding:2px 8px 3px;font-size:12px}
:lang(ja) #modal .reward-hero-label,:lang(ko) #modal .reward-hero-label,:is(:lang(zh-Hans),:lang(zh-Hant)) #modal .reward-hero-label{font:800 14px/1.2 system-ui;-webkit-text-stroke:.16em var(--ink-brown)}
@keyframes reward-hero-breathe{from{opacity:1;transform:none}to{opacity:.7;transform:scale(.93)}}
@keyframes reward-hero-twinkle{from{opacity:1;transform:none}to{opacity:.3;transform:scale(.55)}}
@keyframes reward-hero-shine{0%{opacity:0;transform:translateX(0) skewX(-18deg)}6%{opacity:1}28%{opacity:1;transform:translateX(430%) skewX(-18deg)}34%,100%{opacity:0;transform:translateX(430%) skewX(-18deg)}}
/* The reveal's transient light and particles, centred on the hero face (client.ts animateRewardHero). */
.reward-hero-fx{position:absolute;z-index:4;left:50%;top:calc(var(--hero-face) / 2);width:0;height:0;pointer-events:none}
.reward-hero-fx>i{position:absolute;left:0;top:0;display:block;opacity:0}
.reward-hero-mote{width:9px;height:9px;margin:-4.5px;border-radius:50%;background:radial-gradient(circle,#fff 0 30%,#ffd24d 62%,#ffd24d00 74%)}
.reward-hero-flash{width:190px;height:190px;margin:-95px;border-radius:50%;background:radial-gradient(circle,#fff 0 12%,#fffbe0e6 26%,#ffd24d99 46%,#ffd24d00 68%)}
.reward-hero-ring{width:110px;height:110px;margin:-55px;box-sizing:border-box;border:5px solid #ffd24d;border-radius:50%;box-shadow:0 0 12px #ffd24d,inset 0 0 10px #ffd24d}
.reward-hero-ring.is-thin{border-width:3px;border-color:var(--card-face)}
.reward-hero-star{width:20px;height:20px;margin:-10px;background:radial-gradient(circle,#fffef0 0 18%,var(--honey-300) 55%,#ffc53d);clip-path:polygon(50% 0,59% 41%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 41%)}
.reward-hero-star.is-white{background:var(--card-face)}
.reward-hero-confetti{width:8px;height:12px;margin:-6px -4px;border-radius:2px;background:var(--c,#ffd24d);box-shadow:inset 0 -3px #0000001f}
/* While the hero reveals, the grid tiles pop after it lands and Tap to close follows them. */
.reward-claim.is-hero-reveal .reward-claim-grid>.reward-tile{animation-delay:calc(.96s + var(--i) * 70ms)}
#modal .reward-claim.is-hero-reveal .reward-claim-close{animation-delay:1.35s,1.7s}
/* AC466 follow-up (owner 2026-10-13, "rewards x2"): the first screen of a staged receipt holds the highlighted rewards
   alone, so they grow and the band gains room around them; the light still ends inside the band. */
/* The source label keeps the standard receipt's place (padding-top), so it stays put when step two swaps in. */
.reward-claim.is-hero-stage .reward-claim-band{padding-top:40px;padding-bottom:40px}
.reward-claim.is-hero-stage .reward-claim-hero{--hero-face:150px;--hero-light:296px;gap:16px 24px;margin-top:14px}
.reward-claim.is-hero-stage .reward-claim-hero[data-count="2"]{--hero-face:120px;--hero-light:200px;--hero-room:16px;gap:16px 20px}
.reward-claim.is-hero-stage .reward-claim-hero:not([data-count="1"],[data-count="2"]){--hero-face:96px;--hero-light:124px;--hero-room:8px;gap:14px 10px}
.reward-claim.is-hero-stage .reward-claim-hero .reward-tile-face .reward-tile-count{font-size:22px}
#modal .reward-claim.is-hero-stage .reward-hero-caption>.reward-hero-label{padding:4px 14px 5px;font-size:19px}
/* The second screen replacing the first in place (client.ts rewardClaimContinue): the ribbon, band and stars are
   already on screen, so they do not enter again; the tiles pop in right away and the tap hint follows. */
.reward-claim.is-continued .reward-claim-ribbon,.reward-claim.is-continued .reward-claim-band{animation:none}
.reward-claim.is-continued .reward-claim-stars i{animation:reward-star-twinkle 1.4s ease-in-out calc(var(--i) * .27s) infinite alternate}
.reward-claim.is-continued .reward-claim-grid>.reward-tile{animation-delay:calc(.04s + var(--i) * 60ms)}
#modal .reward-claim.is-continued .reward-claim-close{animation-delay:.42s,.78s}
/* A short status line under the rewards (reward claim `note`), on its own dark capsule inside the band. */
#modal .reward-claim-note{max-width:100%;margin:0;padding:4px 12px 5px;border-radius:999px;background:#15141fcc;color:var(--cream-250);font:800 14px/1.25 system-ui;text-align:center;text-shadow:none}
@media(max-height:700px){.reward-claim.is-hero-stage .reward-claim-band{padding-top:36px;padding-bottom:32px}.reward-claim.is-hero-stage .reward-claim-hero{--hero-face:128px;--hero-light:240px;gap:12px 22px;margin-top:10px}.reward-claim.is-hero-stage .reward-claim-hero[data-count="2"]{--hero-face:104px;--hero-light:170px;gap:12px 20px}.reward-claim.is-hero-stage .reward-claim-hero:not([data-count="1"],[data-count="2"]){--hero-face:82px;--hero-light:112px;gap:12px 10px}#modal .reward-claim.is-hero-stage .reward-hero-caption>.reward-hero-label{font-size:17px}.reward-claim.is-hero-stage .reward-claim-hero .reward-tile-face .reward-tile-count{font-size:20px}}
@media(max-height:700px){.reward-claim-hero{--hero-face:100px;--hero-light:184px;gap:10px 22px}.reward-claim-hero[data-count="2"]{--hero-face:86px;--hero-light:168px}.reward-claim-hero:not([data-count="1"],[data-count="2"]){--hero-face:82px;--hero-light:112px;gap:10px}.reward-claim-hero>.reward-tile{gap:7px}.reward-claim-hero .reward-tile-face .reward-tile-count{font-size:17px}#modal .reward-claim-hero[data-count="1"] .reward-hero-label{font-size:15px}}
@media(prefers-reduced-motion:reduce){.reward-hero-glow,.reward-hero-rays::before,.reward-hero-spotlight>.reward-hero-twinkle{animation:none}.reward-hero-shine,.reward-hero-fx{display:none}}
/* Unlock reveal (uiUnlockReceipt / showUnlockReveal): the claim receipt's band holds one featured art over the shared
   Victory aura (warm glow, slow rays, twinkling stars), a one-off ring of sparkles and the name in the ribbon's outlined
   lettering. A long localized title wraps inside the ribbon at the ribbon's own size. Entries come from
   animateUnlockReveal; after its pop the art floats 3px on a slow loop. Reduced motion is the still end state. */
#modal .unlock-reveal .reward-claim-ribbon h1{white-space:normal;text-wrap:balance}
.unlock-reveal .reward-claim-band{gap:10px}
.unlock-reveal-art{position:relative;display:grid;place-items:center;width:136px;height:116px}
.unlock-reveal-aura{position:absolute;inset:-12px -26px;pointer-events:none}
.unlock-reveal-aura .victory-aura{inset:0}
.unlock-reveal-icon{position:relative;z-index:1;display:grid;place-items:center;width:96px;height:96px}
.unlock-reveal-icon>img{display:block;width:100%;height:100%;margin:0;object-fit:contain;border:0;border-radius:0;box-shadow:none;background:none;filter:drop-shadow(0 3px 0 var(--panel-night));animation:unlock-reveal-float 2.6s ease-in-out 1.1s infinite}
@keyframes unlock-reveal-float{0%,100%{transform:none}50%{transform:translateY(-3px)}}
.unlock-reveal-burst{position:absolute;left:50%;top:50%;z-index:2;width:0;height:0;pointer-events:none}
.unlock-reveal-burst i{position:absolute;left:-7px;top:-7px;width:14px;height:14px;opacity:0;filter:drop-shadow(0 0 3px #ffe48acc);animation:unlock-reveal-burst .5s var(--ease-out) calc(.56s + var(--i) * 10ms) forwards}
.unlock-reveal-burst i::before{content:"";display:block;width:100%;height:100%;background:radial-gradient(circle,#fffef0 0 18%,var(--honey-300) 55%,#ffc53d);clip-path:polygon(50% 0,59% 41%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 41%)}
@keyframes unlock-reveal-burst{from{opacity:1;transform:rotate(var(--a)) translateX(26px) scale(.5)}70%{opacity:1}to{opacity:0;transform:rotate(var(--a)) translateX(84px) scale(1)}}
#modal .unlock-reveal-name{position:relative;z-index:1;max-width:100%;color:var(--cream-50);font:24px/1.1 Lucky,system-ui;text-align:center;letter-spacing:.02em;-webkit-text-stroke:.14em var(--ink-brown);paint-order:stroke fill;filter:drop-shadow(0 3px 0 var(--ink-brown));overflow-wrap:anywhere}
@media(max-height:700px){.unlock-reveal-art{width:120px;height:100px}.unlock-reveal-icon{width:80px;height:80px}}
@media(prefers-reduced-motion:reduce){.unlock-reveal-art *,.unlock-reveal-art ::before,.unlock-reveal-art ::after{animation:none!important}.unlock-reveal-burst{display:none}}
/* AC37 (build 41 feedback, ASC AB-QKnes_lzMuIVrp7Y1GYk): ONE screen-title sign for
   every illustrated banner (docs/SCREEN_RULES.md → Screen-title sign). Built by
   bannerSignHtml() in hub-panels.js inside a positioned banner box; the art is the
   AC07 hanging signboard (game/art/store-sign-v1: ropes in the upper 48%, the
   board in the lower 52%). Fixed layout, never per screen:
   - height: 46% of the banner, clamped to 56-84px and rounded to an even pixel
     (aspect 640:311, so 115-173px wide), anchored bottom-centre 4px above the
     banner's lower edge, so at least the upper half of the banner art stays clear;
   - lettering: 27% of the sign height (about 15-23px), on the board's inner panel
     between 13% side insets; AC23 ink centring per script is kept;
   - no button shape, hit target or press state; a soft cast shadow and a 1.4deg
     sway from its hooks, still under reduced motion. */
.banner-sign{--banner-sign-share:46%;--banner-sign-min:56px;--banner-sign-max:84px;position:absolute;z-index:1;left:50%;bottom:4px;height:round(nearest,clamp(var(--banner-sign-min),var(--banner-sign-share),var(--banner-sign-max)),2px);aspect-ratio:640/311;margin:0;padding:0;border:0;border-radius:0;background:url(/art/store-sign-v1/hanging-sign.png) center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 4px 3px #2b14084d);container-type:size;transform:translateX(-50%);transform-origin:50% 0;pointer-events:none;user-select:none;-webkit-user-select:none;font:inherit}
.banner-sign-text{position:absolute;left:13%;right:13%;top:52%;bottom:7%;display:grid;place-items:center;color:#fbe7bd;font:27cqh/1 Lucky,system-ui;letter-spacing:.02em;white-space:nowrap;-webkit-text-stroke:.07em #4a2611;paint-order:stroke fill;filter:drop-shadow(0 .06em 0 #5b31164d);transform:translateY(var(--sign-ink-shift,calc(.02em + 1px)))}
/* AC23 (build 42): centred on the board's inner panel by its ink, per script
   (pixel-checked within 1.5px at the four phones by store-sign-centre-audit.mjs).
   AC37: the smaller sign needs a fixed 1px part beside the em part. */
:lang(en) .banner-sign-text{--sign-ink-shift:calc(.02em + 1.5px)}
:lang(pl) .banner-sign-text{--sign-ink-shift:.4px}
:is(:lang(zh-Hans),:lang(zh-Hant)) .banner-sign-text,:lang(ko) .banner-sign-text{--sign-ink-shift:calc(.08em + 1px)}
:lang(ja) .banner-sign-text{--sign-ink-shift:calc(.12em + 1px)}
@media(prefers-reduced-motion:no-preference){.banner-sign{animation:banner-sign-sway 4.2s ease-in-out infinite alternate}}
@keyframes banner-sign-sway{from{transform:translateX(-50%) rotate(-1.4deg)}to{transform:translateX(-50%) rotate(1.4deg)}}
/* AC77 audit (build 49): the two Buried Treasures actions share the row by their label
   length (auto basis), so a short decision ("Dalej", "Claim") leaves room for the
   longer Blip scan label at Mini's 24px tier; neither wraps, both stay full height. */
#online .mining-actions>.secondary{flex:1 1 auto;min-width:0}
/* AC90 (build 50, ASC AJxHnRCSuAeqOz1oQ64gxfE): Capybara Go style mail list.
   Cream message cards with the envelope (red "!" while unread), title, age and
   framed reward tiles; Delete All / Claim All sit fixed under the list. */
.hub-inbox img.inbox-envelope{width:31px;height:31px;margin:-2px 0 -2px;object-fit:contain;filter:drop-shadow(0 1px 0 #2a223055)}
.mail-header{display:grid;grid-template-columns:var(--tier-compact) minmax(0,1fr) var(--tier-compact);align-items:center}
.mail-header h1{grid-column:2;margin:0 0 10px}
.mail-header .help-button{grid-column:3;margin-bottom:10px}
.mail-list{gap:9px;padding:8px;border-radius:16px;background:#3d3746;box-shadow:inset 0 2px 6px #00000055}
.mail-row{position:relative;flex:none;display:grid;grid-template-columns:62px minmax(0,1fr);align-items:center;gap:0 10px;width:100%;min-height:86px;margin:0;padding:9px 11px 9px 8px;text-align:left;border:3px solid #e3c88f;border-radius:14px;background:var(--cream-200);box-shadow:inset 0 0 0 2px var(--cream-50),0 3px #1f1a26;color:#3b2e24;font:inherit;animation:mail-row-in .28s ease-out both;animation-delay:calc(min(var(--i,0),6) * 40ms)}
.mail-row.is-read{border-color:#d7c7a6;background:#ece2cc;box-shadow:inset 0 0 0 2px #f7f0e1,0 3px #1f1a26}
.mail-envelope{position:relative;display:grid;place-items:center;width:62px;height:62px}
.mail-envelope:before{content:'';position:absolute;inset:9px;border-radius:7px;background:var(--row-inset);rotate:45deg;z-index:0}
.mail-row.is-read .mail-envelope:before{background:#dfd2b6}
.mail-envelope img{position:relative;z-index:1;width:54px;height:54px;object-fit:contain}
.mail-row.is-read .mail-envelope img{opacity:.88}
.mail-alert{position:absolute;z-index:2;top:2px;right:-2px;display:grid;place-items:center;width:21px;height:21px;border:2px solid #3a0d12;border-radius:7px;background:linear-gradient(#ff7272,#d62f3c);box-shadow:inset 0 2px #ffb8b8,0 0 0 2px var(--cream-250);font:17px/1 Lucky,system-ui,sans-serif;font-style:normal;color:#fff;text-shadow:none;rotate:8deg}
.mail-copy{display:grid;gap:6px;min-width:0}
.mail-head{display:flex;align-items:baseline;gap:8px;min-width:0}
.mail-head b{flex:1 1 auto;min-width:0;font:18px/1.12 Lucky;color:#3b2e24;overflow-wrap:anywhere;-webkit-text-stroke:0}
.mail-head small{flex:none;font:800 12px/1.2 system-ui;color:#8b7552;white-space:nowrap}
.mail-row.is-read .mail-head b{color:#5f513f}
.mail-rewards{display:flex;flex-wrap:wrap;gap:6px}
.mail-reward{position:relative;display:grid;place-items:center;width:44px;height:44px;border:2px solid var(--ink-plum);border-radius:9px;background:linear-gradient(#ffcf7d,#f09b45);box-shadow:inset 0 2px #ffffff80,inset 0 -3px #00000026}
.mail-reward[data-resource=gems]{background:linear-gradient(#c79bff,#8b55dd)}
.mail-reward[data-resource=gemstoneKeys],.mail-reward[data-resource=gearKeys]{background:linear-gradient(#8fd4ff,#4f8fdc)}
.mail-reward[data-resource=energy],.mail-reward[data-resource=bamboo]{background:linear-gradient(#a9eb88,#53b04a)}
.mail-reward img{width:31px;height:31px;margin-top:-6px;object-fit:contain;filter:drop-shadow(0 1px 0 #2a223066)}
.mail-reward b{position:absolute;left:0;right:0;bottom:1px;font:12px/1 Lucky;color:#fff;text-align:center;-webkit-text-stroke:2.6px var(--ink-plum);paint-order:stroke fill}
.mail-row.is-read .mail-reward{filter:saturate(.45) brightness(.95)}
.mail-reward-check{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:18px;height:18px;border:2px solid var(--ink-plum);border-radius:50%;background:#7bd94f;font:900 11px/1 system-ui;font-style:normal;color:#173b0c}
.mail-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
#modal .mail-actions .secondary{width:100%;min-width:0;min-height:var(--tier-full-h);margin:0;padding:8px 6px;font:var(--tier-full-fs)/1.05 Lucky}
#modal .mail-actions .secondary:before{inset:0}
#modal .mail-actions .mail-delete-all{--small-top:var(--btn-danger-top);--small-bottom:var(--btn-danger-bottom);--small-edge:var(--btn-danger-edge);--small-lip:var(--btn-danger-lip);--small-shine:var(--btn-danger-shine)}
#modal .mail-actions .mail-claim-all{--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
#modal .mail-actions .secondary:disabled{--small-top:var(--btn-disabled-top);--small-bottom:var(--btn-disabled-bottom);--small-lip:var(--btn-disabled-lip);--small-shine:var(--btn-disabled-shine);opacity:1}
.mail-empty-art{width:72px;height:72px;object-fit:contain}
#modal:has(.inbox-delete-confirm){width:min(380px,calc(100vw - 28px))}
.inbox-delete-confirm{text-align:center}
.inbox-delete-confirm h1{margin:0 0 8px}
.inbox-delete-confirm p{margin:0;font:15px/1.4 system-ui;color:#3b3024}
@keyframes mail-row-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.mail-row{animation:none}}
@media(max-height:700px){.mail-row{min-height:78px;padding:7px 9px 7px 6px}.mail-envelope{width:54px;height:54px}.mail-envelope img{width:46px;height:46px}.mail-row{grid-template-columns:54px minmax(0,1fr)}.mail-reward{width:40px;height:40px}.mail-reward img{width:27px;height:27px}.mail-actions{margin-top:10px}}
/* AC114 (build 52): HUD value change flash (opacity only), see storyStatsMotion. */
#stats .stat .stat-flash{position:absolute;inset:-2px;border-radius:inherit;pointer-events:none;opacity:0}
#stats .stat .stat-flash.is-up{background:radial-gradient(ellipse at 50% 50%,#8dff7acc 0,#4fd65a88 45%,#4fd65a00 75%);box-shadow:0 0 8px 2px #7dff6a99}
#stats .stat .stat-flash.is-down{background:radial-gradient(ellipse at 50% 50%,#ff8a7acc 0,#e2475788 45%,#e2475700 75%);box-shadow:0 0 8px 2px #ff6a6a99}
#stats .stat .xp-track i,#stats .stat .hp-track i{transform-origin:0 50%}
#stats .stat strong{transform-origin:50% 55%}
/* AC117 (build 53, ASC APyQrVfJeiBm_zT_deXr14E): the Home Menu is a side drawer that
   slides in from the left over the dimmed scrim (reference: a full-height dark panel
   between the top and bottom safe areas with a profile header, icon rows with "!"
   badges and a close bar). The drawer is the
   #modal dialog itself: a tap on the scrim, the close bar or Escape closes it. Slide
   motion in animateModalEntry / installModalMotion (client.js); reduced motion shows
   it at rest. It never scrolls: five rows fit at 375x667. */
/* AC117: also .is-closing, because installModalMotion runs the slide-out after the
   native close removed [open]; the drawer must keep its look while it leaves. */
#modal.home-menu-modal:is([open],.is-closing){position:fixed;inset:var(--safe-top,env(safe-area-inset-top,0px)) auto var(--safe-bottom,env(safe-area-inset-bottom,0px)) 0;display:flex;flex-direction:column;gap:0;width:min(330px,86vw);max-width:none;height:auto;max-height:none;margin:0;padding:12px 0 0;overflow:hidden;border:0;border:3px solid var(--panel-night);border-left:0;border-radius:0 22px 22px 0;background:linear-gradient(#35313f,#252230 70%);box-shadow:8px 0 28px #0009;color:#fff;text-align:left}
#modal.home-menu-modal::backdrop{background:#0d0b14b8;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
#modal.home-menu-modal .home-menu-title{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.home-menu-profile{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;padding:2px 16px 14px;border-bottom:3px solid var(--panel-night)}
.home-menu-profile>:first-child{width:78px;height:78px;border-radius:var(--vs-radius)}
.home-menu-profile>img:first-child{object-fit:cover;border:3px solid var(--panel-night);box-sizing:border-box}
.home-menu-profile>b{max-width:100%;padding-block:6px;margin-block:-6px;padding-inline-start:3px;margin-inline-start:-3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--cream-50);font:24px/1.1 Lucky,system-ui;-webkit-text-stroke:var(--label-stroke,2px) var(--panel-night);paint-order:stroke fill;filter:drop-shadow(0 2px var(--panel-night))}
.home-menu-rank{display:flex;align-items:center;gap:6px;color:#cdbcff;font:800 15px/1.2 system-ui}
.home-menu-rank img{width:20px;height:20px;object-fit:contain}
/* Rows are separate faces split by 3px dark lines (the list's own colour shows
   through the grid gap), so no two button faces touch (F05). */
#modal .home-menu-list{display:grid;gap:3px;flex:none;margin:0;padding:0 0 3px;background:var(--panel-night)}
#modal .home-menu-row{position:relative;display:flex;align-items:center;gap:14px;width:100%;min-height:68px;margin:0;padding:8px 14px 8px 10px;border:0;border-radius:0;background:linear-gradient(#5f5a74,#4c4862);box-shadow:inset 0 2px #ffffff26;color:var(--cream-50);font:22px/1.1 Lucky,system-ui;text-align:left;-webkit-text-stroke:var(--label-stroke,2px) #1b1826;paint-order:stroke fill;text-shadow:none}
#modal .home-menu-row:not(:disabled).is-pressed,#modal .home-menu-row:not(:disabled):active{scale:.98}
/* AC389: expand the clip vertically and at inline start; equal negative margins keep the text and row geometry. */
#modal .home-menu-row .button-label{flex:1;min-width:0;transform:none;padding-block:6px;margin-block:-6px;padding-inline-start:3px;margin-inline-start:-3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-menu-icon{flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:var(--vs-radius);background:#3a3649;box-shadow:inset 0 2px 3px #0006}
.home-menu-icon img{width:44px;height:44px;object-fit:contain}
#modal .home-menu-row .attention-badge{top:7px;right:10px}
#modal .home-menu-close{flex:none;display:grid;place-items:center;width:100%;min-height:60px;margin:auto 0 0;padding:0;border:0;border-radius:0;background:#1d1b26;box-shadow:inset 0 3px var(--panel-night);color:var(--cream-50);font:34px/1 Lucky,system-ui;-webkit-text-stroke:2px #0d0b14;paint-order:stroke fill}
#modal .home-menu-close:not(:disabled).is-pressed,#modal .home-menu-close:active{scale:1;opacity:.8}
/* A drawn chunky cross (one outline around both bars), like the reference close. */
/* Visual polish v1 (F06): the close cross is one drawn shape with a real 2px ink outline (stroke under the
   cream stroke) and one drop, not five stacked drop-shadow copies. */
#modal .home-menu-close>span:not(.ui-icon){position:relative;display:block;width:38px;height:38px;font-size:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cpath d='M7 7 31 31M31 7 7 31' stroke='%230d0b14' stroke-width='13' stroke-linecap='round'/%3E%3Cpath d='M7 7 31 31M31 7 7 31' stroke='%23fffaf0' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;filter:drop-shadow(0 2px #0d0b14)}
@media(max-height:700px){.home-menu-profile>:first-child{width:64px;height:64px}#modal .home-menu-row{min-height:60px}.home-menu-icon{width:46px;height:46px}.home-menu-icon img{width:40px;height:40px}#modal .home-menu-close{min-height:54px}}
/* Visual polish r2 #131 (arena lane): the drawer hugs its profile, rows and close bar instead of leaving an empty band. */
#modal.home-menu-modal:is([open],.is-closing){bottom:auto;max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)))}

/* AC157: title, art and limit retain the card layout and open shared item info.
   The independent price face keeps its existing purchase action. */
.exchange-view .exchange-catalog .exchange-item-info{grid-row:1/4;display:grid;grid-template-rows:36px 62px minmax(16px,1fr);gap:4px;justify-items:center;align-self:stretch;width:100%;min-height:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:inherit;text-align:center}
.exchange-view .exchange-item-info .exchange-card-title{display:flex;align-items:center;justify-content:center;align-self:stretch;font:800 16px/1.08 Lucky,system-ui}
.exchange-view .exchange-item-info .exchange-card-limit{font:700 12px/1.1 system-ui;align-self:center}
@media(max-height:730px){.exchange-view .exchange-catalog .exchange-item-info{grid-template-rows:34px 54px minmax(16px,1fr)}}
/* AC150: a shared lower parchment face inside a stationary 44px touch target.
   Use for track Claim and row Go; other task/dialog actions keep their tier. */
:is(#online,#modal) .secondary.button-compact{min-height:44px;min-width:44px;padding:4px 12px;font:16px/1.05 Lucky;-webkit-text-stroke:2px var(--small-edge);text-shadow:none}
:is(#online,#modal) .secondary.button-compact:before{inset:6px 0;border-width:2.5px;border-radius:var(--vs-radius)}
:is(#online,#modal) .secondary.button-compact:not(:disabled):is(:active,.is-pressed){scale:1}
:is(#online,#modal) .secondary.button-compact:before,:is(#online,#modal) .secondary.button-compact>.button-label{transition:scale var(--tap-t,.12s ease-out)}
:is(#online,#modal) .secondary.button-compact:not(:disabled):is(:active,.is-pressed):before,:is(#online,#modal) .secondary.button-compact:not(:disabled):is(:active,.is-pressed)>.button-label{scale:.94}
@media(prefers-reduced-motion:reduce){:is(#online,#modal) .secondary.button-compact:before,:is(#online,#modal) .secondary.button-compact>.button-label{transition:none}}
/* AC171: tighten only the Book icon/label pair, with its existing target. */
.journey-view #skill-belt .book-shortcut{gap:0}
/* AC162: result detail, same rarity/icon/stat and back/close actions. */
#modal .gemstone-result-detail{display:grid;grid-template-columns:84px minmax(0,1fr);grid-template-rows:auto auto;gap:4px 14px;align-content:center;align-items:center;width:100%;padding:16px;border:2px solid #c4a268;border-radius:18px;background:radial-gradient(ellipse at 20% 50%,color-mix(in srgb,var(--gem-color) 16%,var(--card-face)),var(--cream-200) 75%);box-shadow:inset 0 2px var(--cream-50),0 3px #b99868}
#modal .gemstone-result-detail .gemstone-detail-art{grid-column:1;grid-row:1/3;width:78px;height:86px}
#modal .gemstone-result-detail .gemstone-detail-art>img{width:64px;height:74px}
#modal .gemstone-result-detail h1{grid-column:2;grid-row:1;align-self:end;font-size:25px;text-align:left}
#modal .gemstone-result-detail .gemstone-detail-bonus{grid-column:2;grid-row:2;align-self:start;font-size:27px;text-align:left}
/* AC164: the Perks tile borrows the right rail's framed backdrop and tile face. */
/* AC182: Menu and both entries share the same painted left-rail width. */
.home-scene{--home-left-rail-width:52px}
.home-scene .hub-menu{width:var(--home-left-rail-width)}
.home-perks-rail{position:absolute;left:7px;top:calc(96px + var(--pack-offers,0) * 108px);z-index:3;box-sizing:border-box;width:var(--home-left-rail-width);padding:0}
.home-scene .home-perks-rail .hub-perks{position:static;box-sizing:border-box;width:var(--home-left-rail-width);height:64px;min-height:64px;border:2px solid #aaa0b76b;border-radius:9px;background:linear-gradient(#625c71dd,#393344dd);box-shadow:inset 0 1px #fff2,0 2px #18142188;margin:0;padding:2px}
.home-perks-rail .hub-perks img{width:29px;height:29px;object-fit:contain}
.home-perks-rail .hub-perks small{font:700 10px/1.1 system-ui;white-space:nowrap}
/* AC201 panel finish; AC210 contains its frame inside Menu width.
   Keep the established rail position. */
.home-perks-rail{left:7px}
.home-perks-rail::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border:2px solid #b2abb85c;border-radius:14px;background:#302d3c80;box-shadow:inset 0 1px #fff2,0 2px #18162255}
/* Two unclaimed packs leave less room at reduced browser heights. Tighten only
   the rail's outer spacing; retain Menu width and every pack position. */
@media(max-height:750px){.home-perks-rail[data-pack-offers="2"]{top:calc(90px + var(--pack-offers) * 108px);padding:0}}
/* AC191: compare the selected stone with this slot without changing dialog height. */
.gemstone-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%}
.gemstone-comparison-stone{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}
.gemstone-comparison-stone>small{font:700 12px/1.2 system-ui;color:#67533c}
.gemstone-comparison .gemstone-detail-bonus{font-size:22px;min-height:25px}
.gemstone-comparison .gemstone-detail-art.is-empty{border-style:dashed;background:#b6a08425;color:#78654e;font:28px/1 system-ui;box-shadow:none}
#modal:has(.gemstone-comparison) .equipment-actions{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
#modal:has(.gemstone-comparison) .equipment-actions>button:first-child{grid-column:1/-1;grid-row:2}
#modal:has(.gemstone-comparison) .equipment-actions:has(>[data-action="gemstone-merge-preview"])>button:first-child{grid-column:1;grid-row:2}
#modal:has(.gemstone-comparison) .equipment-actions>[data-action="gemstone-merge-preview"]{grid-column:2;grid-row:2}
#modal:has(.gemstone-comparison) .equipment-actions>.gemstone-action-space{grid-column:2;grid-row:1;min-height:56px}
#modal:has(.gemstone-comparison) .equipment-actions>.gemstone-detail-remove{grid-column:1;grid-row:1}
#modal:has(.gemstone-comparison) .equipment-actions>[data-action="gemstones.socket"]:not(.gemstone-detail-remove){grid-column:1;grid-row:1}
#modal:has(.gemstone-comparison) .equipment-actions:has(>.gemstone-detail-remove)>[data-action="gemstones.socket"]:not(.gemstone-detail-remove){grid-column:2;grid-row:1}
#modal .gemstone-merge-keeps{font:13px/1.3 system-ui;margin:0 0 8px;color:#67533c}

/* AC210: every left-rail tile with its own background uses Menu's border-box width.
   Owner 2026-10-07: the pack offers (art without a tile background) are exempt and
   keep their own size; their tag stays on one line and may extend past the art. */
.home-scene :is(.home-key-offer,.home-perks-rail){box-sizing:border-box;width:var(--home-left-rail-width);min-width:var(--home-left-rail-width);max-width:var(--home-left-rail-width)}
.home-scene .home-key-offer .hub-key-offers{width:100%}
.home-scene .founder-offer-tag{width:max-content;max-width:none;white-space:nowrap;overflow-wrap:normal}

/* AC212: only the lone Add gem footer follows the submitted action/Close order. */
#modal:has(.gemstone-comparison) .equipment-actions[data-order=action-first]{grid-template-columns:repeat(2,minmax(0,1fr))}
#modal:has(.gemstone-comparison) .equipment-actions[data-order=action-first]>button{grid-column:auto;grid-row:auto}

/* AC332: normalize painted occupancy only in Backpack; keep the square targets. */
.backpack-grid>.backpack-slot[data-item=gemstone-key]>img,
.backpack-grid>.backpack-slot[data-item=gear-key]>img{width:62%;height:62%}
.backpack-grid>.backpack-slot[data-item=reset-token]>img{width:58%;height:58%}
/* Visual polish r2 (finding 144): Backpack art fills ~70% of its tile (was ~58%); the AC332 key / token occupancy
   ratios scale with it. The AC237 centred count is kept. */
.backpack-grid>.backpack-slot>img{width:92%;height:92%}
.backpack-grid>.backpack-slot:is([data-item=gemstone-key],[data-item=gear-key])>img{width:73%;height:73%}
.backpack-grid>.backpack-slot[data-item=reset-token]>img{width:68%;height:68%}

/* AC339 P3.3: only the right Home rail and Equipment shortcuts lose their own
   tile faces. The shared rail panel and Menu/Perks width contract stay intact. */
.home-scene .home-event-rail .hub-shortcut{background:none;border:0!important;box-shadow:none}
.home-scene .home-event-rail .hub-shortcut:before,#online .eq-nav .eq-nav-item:before{content:none}
.home-scene .home-event-rail .hub-shortcut b,#online .eq-nav .eq-nav-item b{color:#fff;-webkit-text-stroke:2.5px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}
#online .eq-nav .eq-nav-item{border:0;background:none;box-shadow:none}
/* The existing Compact stage clipped the bottom 3px of shortcut ink. Reserve
   those pixels inside the same stage instead of hiding the labels. */
@media(max-height:760px){.eq-view .eq-power-block{bottom:4px}.eq-view .eq-nav{flex-shrink:0;padding:2px 0 5px}#online .eq-nav .eq-nav-item{min-height:44px;padding:2px 4px}}

/* AC339 review: labels belong on the bottom of the enlarged art, inside the
   existing rail and navigation targets. The seasonal AC267 rail keeps its face. */
.home-scene .home-event-rail .hub-shortcut{justify-content:center;padding:2px;gap:0}
.home-scene .home-event-rail .hub-shortcut img{width:42px;height:42px;margin:0 0 -9px;object-fit:contain}
.home-scene .home-event-rail .hub-shortcut small{position:relative;z-index:1;color:#fff;-webkit-text-stroke:2px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}
#online .eq-nav .eq-nav-item img{width:48px;height:46px;margin-bottom:-10px}
@media(max-height:760px){#online .eq-nav .eq-nav-item img{width:42px;height:40px;margin-bottom:-9px}}

/* AC341: a compact instance of the shared standard reward list, without receipt motion. */
.reward-claim-grid.is-compact{gap:8px;padding:3px 0 5px}
.reward-claim-grid.is-compact .reward-tile{width:48px;animation:none}
.reward-claim-grid.is-compact .reward-tile::before{content:none}
#modal .reward-claim-grid.is-compact .reward-tile-face{width:48px;height:48px;padding:6px;border-radius:9px}
#modal .reward-claim-grid.is-compact .reward-tile-face img{width:100%;height:100%}
.reward-claim-grid.is-compact .reward-tile-count{font-size:12px;right:2px;bottom:1px}
.reward-claim-grid.is-compact .reward-tile-spark{width:12px;height:12px;right:-4px;top:-4px;animation:none}
/* AC345: Equipment lost its group backdrop. Home retains its existing rail panel. */
.eq-view .eq-nav{position:relative;isolation:isolate}
.eq-view .eq-nav{overflow:visible}
.eq-view .eq-nav::before{content:'';position:absolute;z-index:-1;pointer-events:none;border-radius:999px;background:var(--vs-shortcut-band)}
.eq-view .eq-nav::before{left:0;right:0;top:35%;bottom:8px}

/* AC356/AC363: separate soft Menu and Bonusy bands; targets and pack faces
   stay put. Seasonal event faces (Moonleaf, Fishing) keep their existing seasonal band. */
.home-menu-band,.home-bonus-band{position:absolute;left:7px;top:25px;width:var(--home-left-rail-width);z-index:1;pointer-events:none;border:2px solid #b2abb85c;border-radius:14px;background:#302d3c80;box-shadow:inset 0 1px #fff2,0 2px #18162255}
/* AC380 supersedes AC363: opaque colour of the shallow header bar. */
.home-menu-band{background:#303039}
.home-scene .hub-menu{z-index:3}
.home-perks-rail::before{content:none}
.home-scene :is(.hub-menu,.home-perks-rail .hub-perks,.home-key-offer .hub-key-offers,.home-seasonal-rail .hub-moonleaf,.home-seasonal-rail .hub-fishing){border:0!important;background:none!important;box-shadow:none!important;overflow:visible;justify-content:center;padding:2px;gap:0}
.home-scene :is(.hub-menu,.hub-perks,.hub-key-offers,.hub-moonleaf,.hub-fishing)::before{content:none}
.home-scene :is(.hub-perks,.hub-key-offers,.hub-moonleaf,.hub-fishing)>img{width:42px;height:42px;margin-bottom:-9px;object-fit:contain}
.home-scene .hub-menu .menu-lines{font-size:36px;line-height:30px;margin-bottom:-4px;color:#fff;-webkit-text-stroke:1px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 2px var(--vs-ink-text))}
/* AC709: the icon and label share the shortcut's centred flex stack. */
.home-scene :is(.hub-menu,.hub-perks,.hub-key-offers,.hub-moonleaf,.hub-fishing) small{position:relative;z-index:1;color:#fff;-webkit-text-stroke:2px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}

/* Preserve the Offers target position and outer size when its 2px frame goes. */
.home-scene .home-key-offer{border:0;background:none;box-shadow:none;padding:2px 2px 6px}

/* b84: only the Compact Home subtitle returns to its existing 9px tier. */
@media(max-height:700px){.home-actions .hub-travel-box small{font-size:9px;white-space:nowrap}}

/* AC352: keep help beside the title and explicit switch choices full width. */
#modal .account-panel h1.account-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
#modal .account-panel-title .help-button{flex-shrink:0}
#modal:has(.email-switch-warning)>button{width:100%;min-height:var(--tier-full-h);margin:10px 0 0;font:var(--tier-full-fs)/1.1 Lucky}

/* Join polish: 6px top offset + the unchanged 48px Settings target + 4px gap. */
/* Pre-join has no view class, but still occupies the native safe viewport. b148 (iOS simulator smoke, sheets c/j):
   every platform, not only Android: on iPhone the T-001 card started 26pt down, under the Dynamic Island. */
/* AC830: the join card now sits inside the full-bleed .join-scene (title-ui.css), which handles the safe areas. */

/* AC370: the mine's first row is passive header chrome, directly below safe-top.
   Face/art/value metrics match AC342. Exchange alone uses the compact utility tier. */
#online.miner-view #content{padding-top:0}
#online.miner-view .mine-top-bar{position:relative;isolation:isolate;flex:none;height:41px;min-height:41px;display:flex;align-items:flex-start;gap:16px;margin:0 -12px;padding:0 8px 0 22px;background:linear-gradient(#393943,#272730) top/100% 36px no-repeat}
#online.miner-view .mine-top-bar:after{content:'';position:absolute;z-index:-1;pointer-events:none;left:0;right:0;top:36px;height:5px;background:linear-gradient(var(--vs-ink) 0 2px,transparent 2px);box-shadow:inset 0 -3px 0 color-mix(in srgb,var(--vs-ink) 25.1%,transparent)}
.mine-top-bar .mine-currency{position:relative;flex:none;display:flex;align-items:center;height:20px;box-sizing:border-box;margin-top:12px;padding:0 8px 0 14px;border:1px solid #53515e;border-radius:999px;background:#15151c;color:#fff}
.mine-top-bar .mine-currency>b{font:800 13px/1 system-ui;font-variant-numeric:tabular-nums;white-space:nowrap;margin:0}
.mine-top-bar .wallet-icon{position:absolute;left:0;top:50%;width:0;height:18px;transform:translateY(-50%)}
.mine-top-bar .wallet-icon img{position:absolute;left:0;top:50%;width:24px;height:24px;max-width:none;object-fit:contain;transform:translate(-50%,-50%)}
.mine-top-bar .mine-gems .wallet-icon img{filter:drop-shadow(0 -2.25px 0 var(--vs-ink)) drop-shadow(0 2.25px 0 var(--vs-ink))}
@media(max-height:800px){#online.miner-view .mine-top-bar{margin-inline:-10px}}

/* AC371 help fits the safe viewport with complete prose and ordinary type. */
#modal:has(.mine-help-text){box-sizing:border-box;top:var(--safe-top,env(safe-area-inset-top,0px));bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px));max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px)}
#modal .mine-help-text{text-align:left}
#modal .mine-help-text>p:first-child{margin-top:0}
#modal .mine-help-text>p:last-child{margin-bottom:0}
@media(max-height:730px){#modal .mine-help-text>p{margin-bottom:0}}
/* AC370 freed-height fit: retain 44px cells with a visible 1px drop clearance. */
@media(max-height:730px){#online.miner-view .dig-grid{max-width:232px;gap:3px}}
/* AC371 dynamite (art game/art/mine-dynamite-v1, motion in client.ts minerBlast*).
   The waiting stick fills its tile and sways on its base; the burning spark sits on
   the painted fuse tip (69.1% / 11.3% of the square art) and flickers, shedding two
   embers, forever. Paused under a dialog; reduced motion keeps a still, lit spark.
   Transform/opacity only. A used stick leaves a scorch on its dug stone. */
.miner-view .dig-grid .tile.dynamite{overflow:visible;z-index:1}
.mine-dynamite{position:absolute;inset:4%;display:block;margin:0;pointer-events:none;transform-origin:50% 90%;animation:mine-dynamite-sway 2.4s ease-in-out infinite}
/* Beats the generic `.miner-view .tile img` find-icon size: the sprite's own canvas carries its padding. */
:is(.miner-view .tile,.miner-blast-stick) .mine-dynamite-art{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:contain;filter:drop-shadow(0 2px 0 #1a1220aa)}
.mine-dynamite-spark{position:absolute;left:69.1%;top:11.3%;width:30%;height:30%;margin:-15% 0 0 -15%;border-radius:50%;background:radial-gradient(circle,var(--cream-50) 0 13%,#ffe58a 24%,#ffb340 40%,#ff6a2a66 56%,#ff6a2a00 70%);animation:mine-dynamite-spark .26s ease-in-out infinite alternate}
.mine-dynamite-spark:before,.mine-dynamite-spark:after{content:'';position:absolute;left:44%;top:44%;width:13%;height:13%;border-radius:50%;background:#ffd76a;box-shadow:0 0 3px #ff9a2a;opacity:0;animation:mine-dynamite-ember .9s ease-out infinite}
.mine-dynamite-spark:after{left:52%;top:40%;width:10%;height:10%;animation-duration:1.15s;animation-delay:.45s}
@keyframes mine-dynamite-sway{0%,100%{transform:rotate(-2.5deg)}50%{transform:rotate(2.5deg)}}
@keyframes mine-dynamite-spark{from{transform:scale(.8) rotate(0deg);opacity:.86}to{transform:scale(1.14) rotate(25deg);opacity:1}}
@keyframes mine-dynamite-ember{0%{transform:translate(0,0) scale(1);opacity:0}12%{opacity:1}100%{transform:translate(170%,-330%) scale(.3);opacity:0}}
body:has(#modal[open]) :is(.mine-dynamite,.mine-dynamite-spark,.mine-dynamite-spark:before,.mine-dynamite-spark:after){animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.mine-dynamite-spark:before,.mine-dynamite-spark:after{display:none}}
#online.miner-blasting .dig-grid .tile.dynamite .mine-dynamite{visibility:hidden}
.miner-view .dig-grid .tile.dynamite-spent .dynamite-scorch{position:absolute;inset:14%;border-radius:50%;background:radial-gradient(circle,#0d0910 0 26%,#2a1c25d9 50%,#3b2a3400 72%);box-shadow:0 0 0 1px #ff8a3a14;pointer-events:none}
.miner-blast-fire{border-radius:50%;background:radial-gradient(circle,var(--cream-250) 0,#ffd257 22%,#ff8a2b 44%,#e5452aa8 60%,#e5452a00 72%)}
.miner-blast-smoke{border-radius:50%;background:radial-gradient(circle,#8b7f8ccc,#5d5361aa 45%,#5d536100 70%)}
.miner-blast-beam{border-radius:999px;background:linear-gradient(90deg,#ffd25700,#fff3c0e6 35%,var(--cream-50) 50%,#fff3c0e6 65%,#ffd25700)}
.miner-dig-ring.is-blast{border-color:#ffc35a;box-shadow:0 0 16px #ff9a2acc,inset 0 0 10px #fff1b888}
.miner-blast-stick{overflow:visible}

/* AC391: a square Exchange tile leads the mine's full-tier action row at every height. */
#online .mining-actions>.miner-exchange{flex:none;width:56px;min-width:56px;height:56px;min-height:56px;margin:0;padding:0;position:relative;overflow:visible}
#online .mining-actions>.miner-exchange:before{inset:0;border-radius:var(--vs-radius);box-shadow:inset 0 2px var(--small-shine),inset 0 -3px var(--small-lip)}
#online .mining-actions>.miner-exchange>.miner-exchange-art{position:absolute;width:44px;height:44px;left:50%;top:2px;transform:translateX(-50%);object-fit:contain;pointer-events:none;z-index:0;filter:drop-shadow(0 1px var(--ink-plum-2))}
#online .mining-actions>.miner-exchange>.button-label{position:absolute;left:0;right:0;bottom:4px;z-index:1;padding:0;text-align:center;font:12px/1 Lucky,system-ui;letter-spacing:0;white-space:normal;word-break:keep-all;overflow-wrap:break-word;max-height:24px;color:var(--cream-50);-webkit-text-stroke:var(--label-stroke) var(--small-edge);paint-order:stroke fill;text-shadow:none;transform:none}
/* AC391: the 5px milestone gap and the 4px action gap leave no room outside, so the tile's "!" (ring and tilt included)
   sits inside its top-right corner, clear of the milestone text and the scan face. */
#online .mining-actions>.miner-exchange>.attention-badge{top:0;right:0}

/* AC402: account-only identity grid; shared referral/server/delete fields stay intact. */
#modal .account-panel:not(.delete-account-panel){display:grid;gap:6px}
#modal .account-panel:not(.delete-account-panel)>:is(h1,p,button){margin:0}
/* AC415: the 6px grid plus these margins clears primary (6px) / secondary (3px) drops by 10px. */
#modal .account-panel:not(.delete-account-panel)>.primary+:is(.primary,.secondary){margin-top:10px}
#modal .account-panel:not(.delete-account-panel)>.secondary+:is(.primary,.secondary){margin-top:7px}
#modal .account-panel:not(.delete-account-panel) .account-id{grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;margin:0;padding-bottom:8px;border-bottom:1px solid #c1a06b66}
#modal .account-panel:not(.delete-account-panel) .account-id-row{display:contents}
#modal .account-panel:not(.delete-account-panel) .account-id-label{grid-column:1;grid-row:1;align-self:center}
#modal .account-panel:not(.delete-account-panel) .account-id-row>button.secondary{grid-column:2;grid-row:1;width:auto;min-width:64px;height:44px;min-height:44px;margin:0;padding:4px 12px;font:16px/1.05 Lucky;-webkit-text-stroke:2px var(--small-edge);text-shadow:none}
#modal .account-panel:not(.delete-account-panel) .account-id-row>button.secondary::before{inset:6px 0;border-width:2.5px;border-radius:var(--vs-radius)}
#modal .account-panel:not(.delete-account-panel) .account-id-value{grid-column:1/-1;grid-row:2;min-height:36px;white-space:nowrap;overflow-wrap:normal;font-size:12px}
#modal .account-panel:not(.delete-account-panel) .account-id>small{grid-column:1/-1;margin:0}
#modal:has(>.account-panel:not(.delete-account-panel))>button{margin-top:6px}

#modal:has(>.account-panel:not(.delete-account-panel)){max-height:calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px)}

/* AC412: keep the old flex slot and pedestal; only the paint box grows 1.5×/48:37. */
.rank-winner .rank-portrait{position:relative;display:block;align-self:center;width:calc(100% + 16px);height:130px;min-height:0;flex:0 1 130px;margin-inline:-8px;margin-bottom:-2px;pointer-events:none}
.rank-winner .rank-portrait>.rank-character{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:150%;height:129.72973%;max-width:none;margin:0;flex:none}
@media(max-height:800px){.rank-winner .rank-portrait{height:76px;flex-basis:76px}}
/* Visual polish (layout lane): on Compact (375x667) the podium keeps its 76px portraits and the standings list gives
   way (it scrolls) so the pinned Your position row clears the Back bar. */
@media(max-height:700px){#online.rankings-view .rank-podium{min-height:146px}#online.rankings-view .rank-winner .rank-portrait{flex:none}#online.rankings-view .rank-board{min-height:96px}}

/* AC421–424: confirm the code before the secondary address actions. */
#modal .email-link-panel>[data-action="email-link-verify"]{width:100%;margin:0 0 16px}
/* Event Gift Packs contain the existing rewarded refill; no paid offers. */
.event-gift-pack-nav{width:68px;min-width:44px;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 4px;border:2px solid var(--vs-ink);border-radius:var(--vs-radius);background:#26374be8;box-shadow:0 3px 0 var(--vs-ink);color:var(--shine-100);font:12px/14px Lucky}
.event-gift-pack-nav>img{width:32px;height:28px;object-fit:contain}
.event-gift-pack>article{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:2px solid var(--vs-ink);border-radius:14px;background:#f5e3c1;color:#382a36}
.event-gift-pack>article>.backpack-slot{width:48px;height:48px;min-width:44px;aspect-ratio:1;margin:0}
.event-gift-pack>article>div{display:flex;flex-direction:column;gap:5px}
.event-gift-pack>article b{font:18px/1.15 Lucky}
.event-gift-pack>article small{font:13px/1.2 system-ui}
#online.miner-view #tabs{display:flex;align-items:center;justify-content:space-between}

/* AC445: one compact Gift Pack beside the fixed Treasures Back action. */
#online.miner-view #tabs>.miner-footer-tools{display:flex;flex:none;align-items:center;justify-content:flex-end;gap:8px}
#online.miner-view .miner-footer-tools>.event-gift-pack-nav{flex:none;width:68px}

/* AC450: Exchange and Gift Pack share the compact footer; scan keeps its full row. */
#online.miner-view .miner-footer-tools>.miner-exchange{width:68px;min-width:44px;min-height:48px;margin:0;padding:2px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:2px solid var(--vs-ink);border-radius:var(--vs-radius);background:#26374be8;box-shadow:0 3px 0 var(--vs-ink);color:var(--shine-100)}
#online.miner-view .miner-footer-tools>.miner-exchange:before{display:none}
#online.miner-view .miner-footer-tools>.miner-exchange>img{width:32px;height:28px;object-fit:contain;position:static;transform:none}
#online.miner-view .miner-footer-tools>.miner-exchange>.button-label{padding:0;font:12px/14px Lucky;color:var(--shine-100);-webkit-text-stroke:0;text-shadow:none}
/* Visual polish r2 (finding 98): the footer is one tile family. Exchange and Gift Pack wear the Back action's lavender
   face (same ink edge, bevel and drop) with outlined cream labels, and the dig counter is a bevelled ink-outlined
   plate led by the hammer, like the other Buried Treasures tiles, instead of a flat dark strip. */
#online.miner-view .miner-footer-tools>:is(.miner-exchange,.event-gift-pack-nav,.miner-card-nav){border:2px solid var(--ink-plum-2);border-radius:15px;background:linear-gradient(145deg,#aaa2b8,#857d99 70%,#79718b);box-shadow:inset 0 2px 0 #d9d0e1,inset 2px 0 0 #bcb2c9,inset -2px -3px 0 #6c637d,0 3px 0 var(--panel-night);color:var(--cream-50)}
/* Exchange keeps Gift Pack's caption line box (not the trimmed cap band), so both art+caption groups sit alike on the face. */
#online.miner-view .miner-footer-tools>.miner-exchange>.button-label{text-box:normal;padding-block:0;line-height:14px}
#online.miner-view :is(.miner-footer-tools>.event-gift-pack-nav,.miner-footer-tools>.miner-card-nav,.miner-footer-tools>.miner-exchange>.button-label){color:var(--cream-50);-webkit-text-stroke:2.5px var(--ink-plum-2);paint-order:stroke fill}
#online.miner-view .mining-charge-well{border:2px solid var(--vs-ink);background:linear-gradient(#3b3449,#29242f);box-shadow:inset 0 1px 0 #ffffff24,0 3px 0 var(--vs-ink)}
#online.miner-view .mining-charge-well:not(.has-ad)::before{content:'';flex:none;width:30px;height:30px;margin-right:-2px;background:url('/art/miner-v1/hammer.png') center/contain no-repeat;filter:drop-shadow(0 2px 0 var(--vs-ink))}
#online.miner-view .mining-charge-well:not(.has-ad)>.mining-counter{margin-right:auto}

/* Seasonal Home shortcuts share the existing rail's exact 48px faces. */
.home-seasonal-rail{position:absolute;right:7px;top:16px;z-index:3;display:flex;gap:10px;padding:8px;border:2px solid #b2abb85c;border-radius:14px;background:#302d3c80;box-shadow:inset 0 1px #fff2,0 2px #18162255}
.home-scene .home-seasonal-rail .hub-shortcut{position:relative;inset:auto;width:48px;height:48px;min-height:48px;background:linear-gradient(#625c71dd,#393344dd);border:1px solid #aaa0b76b;border-radius:9px;box-shadow:inset 0 1px #fff2,0 2px #18142188}
.home-seasonal-rail small{max-width:46px;white-space:nowrap}

/* AC510 (build 119 feedback, owner: "Nie podoba mi się ta plansza z nazwą, taka mdła nie
   połączona"): the Buried Treasures title is the game's hanging signboard (AC07/AC37
   `store-sign-v1`, the same art as every screen-title sign), hung on its ropes from the mine's
   top bar instead of a flat brown box floating under it. The art is nine-sliced (ropes and
   notched ends kept, plank stretched) so the title keeps its full Lucky tier at Mini; the rope
   tops run behind the opaque top bar. The chamber line is a small navy tag with a gold rim
   pinned to the plank's lower edge (the Story plaque/chapter-card navy and gold). A warm rim
   from the lantern side lights the plank's left end. No sway: the (?) disc beside it is a
   stationary 44px target 8px clear of the plank. No new art, copy or rule text. */
#online.miner-view .mine-top-bar{z-index:2}
/* Visual polish r2 (finding 99): the event wallets sit where the shared HUD keeps its currencies,
   right-aligned in the header bar, instead of alone at the left edge. */
#online.miner-view .mine-top-bar{justify-content:flex-end;gap:12px;padding:0 14px 0 22px}
.miner-view .mining-title.hanging-title{margin-inline:52px}
.hanging-title.hanging-title{--sign-rope:45px;--sign-hide:26px;position:relative;z-index:1;flex:none;box-sizing:border-box;min-height:0;margin:calc(-1 * var(--sign-hide)) 0 9px;padding:calc(var(--sign-rope) + 6px) 14px 12px;border:0;border-radius:0;background:none;box-shadow:none;
 border-image:url(/art/store-sign-v1/hanging-sign.png) 150 120 24 120 fill / var(--sign-rope) 36px 8px / 0 stretch;filter:drop-shadow(-2px 0 4px #ffb04a4d) drop-shadow(0 4px 3px #2b14084d);color:#fbe7bd}
@supports (-webkit-mask-box-image:none){.hanging-title.hanging-title:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(100deg,#ffc56a52,#ffc56a1f 22%,#ffc56a00 46%);-webkit-mask-box-image:url(/art/store-sign-v1/hanging-sign.png) 150 120 24 120 / var(--sign-rope) 36px 8px stretch}}
.hanging-title.hanging-title>h1{position:relative;z-index:1;margin:0;font:26px/1.08 Lucky!important;color:#fbe7bd;white-space:nowrap;letter-spacing:.01em;-webkit-text-stroke:.08em #4a2611;paint-order:stroke fill;filter:drop-shadow(0 .07em 0 #4a26114d)}
.hanging-title.hanging-title .eyebrow{position:absolute;z-index:2;left:50%;bottom:-9px;transform:translateX(-50%);box-sizing:border-box;max-width:calc(100% - 28px);overflow:hidden;padding:3px 10px 2px;border:1.5px solid #cba967;border-radius:7px;background:linear-gradient(#294459,#1b3044);box-shadow:inset 0 1px #ffffff26,0 2px 0 var(--vs-ink);color:var(--cream-300);font:800 8px/1.2 system-ui;letter-spacing:1px;white-space:nowrap;text-shadow:none}
.hanging-title.hanging-title>.help-button{right:-52px;top:calc(var(--sign-rope) + (100% - var(--sign-rope)) / 2 - 22px)}
@media(max-height:730px){.hanging-title.hanging-title{--sign-hide:28px;margin-bottom:8px;padding-top:calc(var(--sign-rope) + 4px);padding-bottom:10px}.hanging-title.hanging-title>h1{font-size:25px!important}}

/* AC513: Tower shares AC510's nine-sliced board, ropes, lettering and subtitle tag. */
#online.tower-preparing .tower-heading{top:0;width:calc(100% - 112px);max-width:310px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;gap:5px}
.tower-heading>.hanging-title{width:100%;pointer-events:none}
#online.tower-view .hanging-title #round-label{position:absolute;min-width:0;width:max-content;margin:0;font:800 11px/1.2 system-ui;color:var(--cream-300);-webkit-text-stroke:0;filter:drop-shadow(0 1px #0e1a26)}
#online.tower-preparing .tower-scene-title{padding:8px 10px;border:2px solid #c7a16b;border-radius:var(--vs-radius);background:#302b3be6;box-shadow:0 3px var(--vs-ink)}
#online.tower-preparing .tower-heading .tower-preview-loot{margin:0;padding:0;border:0}
#online.tower-preparing .tower-scene-title>small{font-size:11px}
#online.tower-preparing .tower-heading .tower-entries-hourly{margin:5px 0;padding-top:5px}

/* AC511 (build 119 feedback): the owner's Capybara Go reference ("Insufficient Pickaxe"): a
   full-width dark band between thin gold rules that fade toward the screen edges, centred over the
   dig grid. Opens from zero height (120ms) with the text fading in, holds ~1.2s, collapses and
   fades (200ms). Never takes input. Reduced motion: a plain fade. */
.miner-empty-banner{position:fixed;left:0;right:0;z-index:40;display:flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;min-height:58px;padding:8px 18px;transform:translateY(-50%);transform-origin:50% 50%;pointer-events:none;color:#fff}
.miner-empty-banner[hidden]{display:none}
/* Band background and gold rules: shared with #feedback (AC546, see the status layer). */
.miner-empty-banner>img{flex:none;width:36px;height:36px;object-fit:contain;filter:drop-shadow(0 2px 0 color-mix(in srgb,var(--vs-ink) 45.1%,transparent))}
.miner-empty-banner>span{display:grid;justify-items:start;gap:1px;min-width:0}
.miner-empty-banner b{font:21px/1.08 Lucky,system-ui;color:#fff;white-space:nowrap;-webkit-text-stroke:.09em var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 2px 0 var(--vs-ink))}
.miner-empty-banner small{font:700 12px/1.2 system-ui;color:#ffe3a9;white-space:nowrap}
.miner-empty-banner.is-showing{animation:miner-empty-banner 1.52s linear both}
.miner-empty-banner.is-showing>*{animation:miner-empty-banner-text 1.52s linear both}
@keyframes miner-empty-banner{0%{opacity:1;transform:translateY(-50%) scaleY(0);animation-timing-function:var(--ease-out)}7.9%{opacity:1;transform:translateY(-50%) scaleY(1)}86.8%{opacity:1;transform:translateY(-50%) scaleY(1);animation-timing-function:ease-in}100%{opacity:0;transform:translateY(-50%) scaleY(0)}}
@keyframes miner-empty-banner-text{0%{opacity:0}2.6%{opacity:0;animation-timing-function:ease-out}9.2%{opacity:1}86.8%{opacity:1}96%{opacity:0}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){@keyframes miner-empty-banner{0%{opacity:0;transform:translateY(-50%)}7.9%{opacity:1;transform:translateY(-50%)}86.8%{opacity:1;transform:translateY(-50%)}100%{opacity:0;transform:translateY(-50%)}}@keyframes miner-empty-banner-text{0%,100%{opacity:1}}}
#online.miner-view #tabs .event-gift-pack-nav.is-nudged{animation:miner-gift-nudge .55s ease-out 2}
@keyframes miner-gift-nudge{0%,100%{transform:none}35%{transform:translateY(-7px) scale(1.06)}65%{transform:translateY(0) scale(.98)}}
@media(prefers-reduced-motion:reduce){#online.miner-view #tabs .event-gift-pack-nav.is-nudged{animation:none}}

/* AC514: fixed Tower slots across preparation, playback and result. Hidden HUD
   and footer retain their geometry; content crossfades inside its reserved slot. */
#online.tower-view{padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px))}
#online.tower-view #profile[hidden]{display:flex!important;visibility:hidden;pointer-events:none}
#online.tower-view #content{position:relative;box-sizing:border-box;height:144px;min-height:144px;flex:0 0 144px;display:flex;justify-content:center}
#online.tower-view #tabs,#online.tower-view.tower-playing #tabs{display:flex!important;box-sizing:border-box;height:72px;min-height:72px;flex:0 0 72px;padding:6px 12px 10px}
#online.tower-view.tower-playing #tabs{visibility:hidden;pointer-events:none}
.tower-view .tower-panel{width:100%;justify-content:center}
.tower-view .tower-live{padding:0}
.tower-view .tower-panel-out{position:absolute;inset:8px 12px 5px;width:auto;pointer-events:none}
#online.tower-view .tower-result.lost{gap:1px;padding:4px 8px!important}
.tower-view .tower-result.lost h1{font-size:26px}
.tower-view .tower-result.lost p{font-size:11px;line-height:1.1}
/* Visual polish r2 (arena lane): #50/#124/#185 the preparation guardian is a card filling the AC514 band:
   framed sprite portrait, name and HP/ATK chips, vertically centred (Tower actors keep their size, AC643). */
#online.tower-preparing .tower-panel{justify-content:center}
.tower-opponent-card.is-guardian-card{grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:0 12px;box-sizing:border-box;width:100%;padding:10px 12px;border:2px solid #c7a16b;border-radius:var(--vs-radius);background:linear-gradient(#4a3c4bf2,#2d2636f2);box-shadow:inset 0 2px #ffe4b633,0 3px var(--vs-ink)}
.tower-guardian-portrait{display:grid;place-items:center;width:72px;height:72px;box-sizing:border-box;padding:5px;border:2px solid var(--vs-ink);border-radius:14px;background:radial-gradient(circle at 50% 40%,var(--paper,#fff6df),#e4c28d);box-shadow:inset 0 2px #fff8,0 3px var(--vs-ink)}
.tower-guardian-portrait svg{width:100%;height:100%}
.tower-guardian-copy{display:grid;gap:2px;min-width:0}
.is-guardian-card .tower-guardian-copy .eyebrow{font-size:10px;letter-spacing:1.4px;color:#e5c88f}
#online.tower-view .is-guardian-card h2{margin:0;font:24px/1.1 Lucky;color:var(--cream-300);overflow-wrap:anywhere}
.is-guardian-card .tower-enemy-stats{display:grid;gap:6px;justify-items:stretch}
.tower-stat-chip{display:flex;align-items:center;gap:5px;padding:3px 10px 3px 6px;border:1px solid #c7a16b99;border-radius:999px;background:#1b1622d9;font:800 15px/1.1 system-ui;color:var(--cream-300);font-variant-numeric:tabular-nums}
.tower-stat-chip>.ui-icon{width:18px;height:18px}
/* AC877 (build 205 feedback, `towerPairs`): a pair floor's card stacks both opponents (small portrait, name, HP/ATK
   chips) under one eyebrow inside the same 144px AC514 band; the single guardian card is unchanged. */
.tower-opponent-card.is-guardian-card.is-pair{grid-template-columns:minmax(0,1fr);gap:4px;padding:6px 10px}
.is-guardian-card.is-pair>.eyebrow{font-size:10px;line-height:12px;letter-spacing:1.4px;color:#e5c88f}
.tower-pair-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:0 8px;min-width:0}
.is-pair .tower-guardian-portrait{width:44px;height:44px;padding:3px;border-radius:10px;box-shadow:inset 0 2px #fff8,0 2px var(--vs-ink)}
#online.tower-view .is-guardian-card.is-pair h2{font-size:18px;line-height:1.05;text-align:left}
.is-guardian-card.is-pair .tower-enemy-stats{display:flex;gap:5px}
.is-pair .tower-stat-chip{padding:2px 8px 2px 5px;font-size:14px}
.is-pair .tower-stat-chip>.ui-icon{width:16px;height:16px}
/* #138/#185: the scene panel leads with one stat row (floors cleared, entries) and the reward row beside its label. */
#online.tower-preparing .tower-scene-title{display:grid;gap:6px;background:rgba(30,26,40,.88)}
.tower-stat-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 12px}
#online.tower-preparing .tower-stat-row>small.tower-cleared{display:flex;align-items:center;gap:4px;font:700 12px/1.2 system-ui;color:#f1dfc3}
.tower-cleared>.ui-icon{width:18px;height:18px}
#online.tower-preparing .tower-stat-row .tower-entries-hourly{margin:0;padding:0;border:0;min-height:0;gap:4px}
#online.tower-preparing .tower-stat-row .tower-entries-hourly>img{width:18px;height:18px}
#online.tower-preparing .tower-stat-row .tower-refill-line{font-size:12px}
#online.tower-preparing .tower-heading .tower-preview-loot{grid-template-columns:auto auto;align-items:center;justify-content:center;gap:12px;padding-top:6px;border-top:1px solid #c7a16b66}
#online.tower-preparing .tower-preview-loot>small{font:800 11px/1.2 system-ui;letter-spacing:.6px;text-transform:uppercase;color:#f3d58f}
#online.tower-preparing .tower-preview-loot>.tower-preview-items{width:auto;padding:4px}
.tower-preview-items .tower-preview-reward{width:64px;height:64px;padding:7px;box-shadow:0 0 0 2px #ffd98a66,0 0 14px 4px #ffc94a59,inset 0 1px #fffb}
/* #110: the spent Tower entry is a chip under the defeat line. */
.tower-defeat-cost{display:flex;justify-content:center;margin:2px 0 4px}
.tower-defeat-cost .tower-entries-chip{margin:0;padding:3px 12px 3px 6px;font-size:16px;color:#ffd0c4;border-color:#a8665b}
.tower-defeat-cost .tower-entries-chip img{width:22px;height:22px}

/* AC515: stationary help disc, retained by AC533. */
.treasure-panel{position:relative}
.treasure-panel>.help-button{position:absolute;right:0;top:0}
/* AC526: let the nook use side padding as the narrow/tall chest grows. Symmetric
   bleed preserves the chest target's size and screen position, with symmetric side insets. */
@media(max-width:399px){
 #modal .treasure-panel{--chance-bleed:clamp(0px,calc((var(--nook-h) - 201px)*.34),12.5px);width:calc(100% + 2*var(--chance-bleed));margin-inline:calc(-1*var(--chance-bleed));padding-inline:var(--chance-bleed)}
 #modal .treasure-panel>.help-button{right:var(--chance-bleed)}
 #modal .treasure-nook{width:calc(100% + 2*var(--chance-bleed));margin-inline:calc(-1*var(--chance-bleed))}
}
.treasure-help-open>.treasure-panel{visibility:hidden}
.treasure-help-sheet{position:absolute;inset:0;z-index:10;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:inherit;background:#f5e5bd;color:var(--navy-600)}
#modal .treasure-help-sheet>h1{flex:none;margin:0;padding:0;font-size:26px}
.treasure-help-sheet .mine-help-text{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
.treasure-help-sheet>.back-arrow{align-self:flex-start;flex:none;min-width:54px;min-height:56px}
/* AC525: three short instructions, one inline Chance bullet, then the milestone. */
.mine-help-text>ul{margin:0;padding-inline-start:20px}
.mine-help-text li{margin:0 0 8px;line-height:1.4}
#mine-help-odds{white-space:nowrap}

/* AC521: the chest light belongs to the complete inner panel, rather than a
   masked circle around the art. The border clips its rounded corners. Keep
   S01's existing static treatment (also still under reduced motion). */
#online .chest-shop-card.gem-chest-card{isolation:isolate}
.gem-chest-card>.gem-chest-rays{inset:0;left:0;top:0;width:auto;height:auto;aspect-ratio:auto;translate:none;border-radius:14px;background:repeating-conic-gradient(from 0deg at 26% 44%,#fff3cf66 0 8deg,#fff3cf00 8deg 22.5deg);-webkit-mask:none;mask:none;overflow:hidden}

/* AC533/AC534: passive rarity pill on a reserved floor strip below the chest.
   One plate; its fill is a full-size layer (rarity colour at 85% alpha, 1px lighter rim) so an
   upgrade can stack the old fill over the new one. data-ink picks dark ink on light fills and
   outlined white on darker ones (Epic, Mythic). CJK falls back to a heavy rounded face so
   ja/ko/zh match the ExtraBold Latin. */
.treasure-nook .treasure-tap{bottom:22px}
.treasure-rarity{position:absolute;z-index:4;left:50%;bottom:6px;transform:translateX(-50%);display:flex;justify-content:center;white-space:nowrap;padding:4px 9px;border-radius:999px;overflow:hidden;color:#2b1d3c;box-shadow:0 2px var(--vs-ink);font:800 11.5px/1.15 Lucky,"Hiragino Maru Gothic ProN","M PLUS Rounded 1c",sans-serif;letter-spacing:.02em;pointer-events:none}
.treasure-rarity:lang(ko){font-family:Lucky,"Apple SD Gothic Neo","Noto Sans KR",sans-serif}
.treasure-rarity:lang(zh){font-family:Lucky,"PingFang SC","Hiragino Sans GB","Noto Sans SC",sans-serif}
/* Weight 800 picks real heavy cuts for ko/zh, but Hiragino Maru ships only W4 (800 is barely
   synthesised), so a stroke in the ink colour brings the CJK stems up to the ExtraBold Latin stem. */
.treasure-rarity:is(:lang(ja),:lang(ko),:lang(zh)) .treasure-rarity-name{-webkit-text-stroke:.55px currentColor}
.treasure-rarity:lang(ja) .treasure-rarity-name{-webkit-text-stroke-width:.9px}
.treasure-rarity-fill{--pill-fill:color-mix(in srgb,var(--gem-color) 85%,transparent);position:absolute;z-index:-1;inset:0;border:1px solid color-mix(in srgb,var(--gem-color) 55%,#fff);border-radius:inherit;background:var(--pill-fill)}
.treasure-rarity-fill[data-rarity="transcendent"]{--pill-fill:linear-gradient(135deg,color-mix(in srgb,var(--gem-color) 85%,transparent),color-mix(in srgb,var(--gem-accent) 85%,transparent));border-color:color-mix(in srgb,var(--gem-color) 55%,#fff) color-mix(in srgb,var(--gem-accent) 55%,#fff) color-mix(in srgb,var(--gem-accent) 55%,#fff) color-mix(in srgb,var(--gem-color) 55%,#fff)}
.treasure-rarity-fill[data-rarity="legendary"]{--pill-fill:linear-gradient(color-mix(in srgb,var(--gem-color) 85%,transparent) 55%,color-mix(in srgb,var(--gem-accent) 85%,transparent))}
.treasure-rarity-size{flex:none;visibility:hidden}
/* The names live in a reel clipped to the fill's inner rounded box (1px in from the rim), so a
   rolling name never draws over the rim, the ink shadow or above the plate. */
.treasure-rarity-reel{position:absolute;inset:1px;display:flex;justify-content:center;align-items:center;border-radius:inherit;overflow:hidden;clip-path:inset(0 round 999px)}
.treasure-rarity-name{flex:none}
.treasure-rarity .treasure-rarity-name[data-ink="light"]{color:#fff;-webkit-text-stroke:2px #2b1d3c;paint-order:stroke fill;filter:drop-shadow(0 1px #2b1d3c)}
.treasure-rarity-name.is-old{position:absolute;left:50%;top:3px;transform:translateX(-50%)}
.treasure-rarity .is-old{opacity:0}
/* Upgrade (starts with the 350ms chest swap, 220ms), all on the one plate:
   width runs old label -> new label (4-45%); the new fill comes up under the old one (6-28%)
   and only then does the old fill fade off it (28-46%, no muddy double-fade), so the first and last frames match the static
   pills; the names roll like a reel - old up and out, new up and in, locked together so the
   plate is never blank and they never overlap (6-45%, the new name settles by 66%) - and the
   plate pops 1.0 -> 1.12 -> 1.0 with its peak at 50%. */
.treasure-rarity.is-rolling{animation:treasure-rarity-pop 220ms 350ms ease-in-out both,treasure-rarity-width 220ms 350ms both}
.treasure-rarity.is-rolling>.treasure-rarity-fill:not(.is-old){animation:treasure-rarity-fill-in 220ms 350ms both}
.treasure-rarity.is-rolling>.treasure-rarity-fill.is-old{animation:treasure-rarity-fill-out 220ms 350ms both}
.treasure-rarity.is-rolling .treasure-rarity-name.is-old{animation:treasure-rarity-name-out 220ms 350ms both}
.treasure-rarity.is-rolling .treasure-rarity-name:not(.is-old){animation:treasure-rarity-name-in 220ms 350ms both}
@keyframes treasure-rarity-pop{0%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.12)}100%{transform:translateX(-50%) scale(1)}}
@keyframes treasure-rarity-width{0%,4%{width:var(--plate-from);animation-timing-function:cubic-bezier(.25,0,.2,1)}45%,100%{width:var(--plate-to)}}
@keyframes treasure-rarity-fill-in{0%,6%{opacity:0}28%,100%{opacity:1}}
@keyframes treasure-rarity-fill-out{0%,28%{opacity:1}46%,100%{opacity:0}}
@keyframes treasure-rarity-name-out{0%,6%{opacity:1;transform:translate(-50%,0);animation-timing-function:cubic-bezier(.45,0,.3,1)}45%{opacity:1;transform:translate(-50%,-150%)}45.1%,100%{opacity:0;transform:translate(-50%,-150%)}}
@keyframes treasure-rarity-name-in{0%,6%{transform:translateY(150%);animation-timing-function:cubic-bezier(.45,0,.3,1)}45%{transform:translateY(-10%);animation-timing-function:ease-out}66%,100%{transform:translateY(0)}}
/* AC575 (b126 feedback) Forge merge cinematic: the panel chrome steps back
   (painted by .forge-panel, which fades back in), two fixed full-screen layers
   sit under and over the flying receipt cards, everything is pointer
   transparent and animates only transform/opacity. */
#modal.forge-cinema{overflow:visible!important;background:none!important;border-color:transparent!important;box-shadow:none!important}
.forge-panel{position:absolute;z-index:-1;pointer-events:none;box-sizing:border-box}
.gemstone-receipt.forge-receipt{position:relative}
.gemstone-receipt.forge-receipt .gem-merge-new,.gemstone-receipt.forge-receipt .gear-reveal.is-merged{position:relative;animation:none}
.forge-receipt .gem-merge-glint{display:none}
.forge-receipt .forge-flying{z-index:2}
.forge-stage{position:fixed;inset:0;z-index:1;overflow:hidden;pointer-events:none;contain:strict}
.forge-stage.is-over{z-index:3}
.forge-stage>*{position:absolute;left:0;top:0;pointer-events:none;opacity:0}
.forge-dim{right:0;bottom:0;background:#05030c;will-change:opacity}
.forge-stage.is-bloom{z-index:4;mix-blend-mode:plus-lighter}
/* Additive burst bloom centred on the orb: white core into the tier colour, transparent
   well inside its box, so the burst never washes the whole screen. */
.forge-bloom{border-radius:50%;background:radial-gradient(circle closest-side,#fff 0 9%,color-mix(in srgb,var(--gem-color) 30%,#fff) 24%,color-mix(in srgb,var(--gem-color) 80%,#0000) 44%,color-mix(in srgb,var(--gem-color) 28%,#0000) 70%,#0000 100%)}
.forge-rays{width:320px;height:320px}
.forge-rays>i{position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--gem-color) 45%,#fff) 0 6deg,#fff0 9deg 27deg,color-mix(in srgb,var(--gem-color) 70%,#fff0) 30deg 33deg,#fff0 36deg 45deg);-webkit-mask:radial-gradient(circle closest-side,#000 0 14%,#0009 38%,#0000 100%);mask:radial-gradient(circle closest-side,#000 0 14%,#0009 38%,#0000 100%)}
.forge-orb{width:88px;height:88px;border-radius:50%;background:radial-gradient(circle,#fff 0 20%,color-mix(in srgb,var(--gem-color) 35%,#fff) 34%,var(--gem-color) 56%,color-mix(in srgb,var(--gem-color) 45%,#0000) 66%,#0000 71%);box-shadow:0 0 30px 10px color-mix(in srgb,var(--gem-color) 55%,#0000)}
.forge-orb>i{position:absolute;inset:8%;border-radius:50%;background:radial-gradient(circle,#fff 0 46%,#fff0 72%)}
.forge-stone{display:grid;place-items:center}
.forge-stone:before{content:'';position:absolute;inset:-28%;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--gem-color) 70%,#fff) 0,color-mix(in srgb,var(--gem-color) 40%,#0000) 40%,#0000 68%)}
.forge-stone>img,.forge-stone>.gear-tile{position:relative;width:100%;height:100%;object-fit:contain}
.forge-ring{width:150px;height:150px;border-radius:50%;border:5px solid #fff;box-shadow:0 0 0 3px var(--gem-color),0 0 22px 6px var(--gem-color),inset 0 0 16px 3px var(--gem-color)}
.forge-beam{width:12px;height:170px;margin-top:-85px;transform-origin:50% 100%;border-radius:50% 50% 3px 3px;background:linear-gradient(#fff0,color-mix(in srgb,var(--gem-color) 65%,#fff) 55%,#fff)}
.forge-p{position:absolute;pointer-events:none;opacity:0}
/* A long crystal splinter: bright facet, the tier colour, a dark heel. */
.forge-shard{clip-path:polygon(50% 0,100% 38%,50% 100%,0 38%);background:linear-gradient(120deg,#fff 0 14%,color-mix(in srgb,var(--gem-color) 55%,#fff) 26%,var(--gem-color) 50%,color-mix(in srgb,var(--gem-color) 60%,#1b1028) 100%)}
.forge-sparkle{border-radius:50%;background:radial-gradient(circle,#fff 0 22%,var(--gem-color) 46%,#0000 72%)}
.forge-sparkle.is-star{border-radius:0;background:radial-gradient(circle,#fff 0 18%,color-mix(in srgb,var(--gem-color) 50%,#fff) 40%,var(--gem-color) 70%);clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%)}
/* Rarity stamp: a tier-coloured plate (cream inner rim, dark outline and a 2px dark drop, so
   it separates from a same-tier card) slammed onto the hero card's top edge, clear of its art
   (a child of its scaled card: --forge-unit = 1/card scale keeps the on-screen size; the JS
   sets top). Text: white face over a dark ink outline.
   CJK takes the treasure pills' heavy rounded fallback plus a face stroke, so ja/ko/zh stems
   match the Lucky weight. */
.forge-stamp{--u:var(--forge-unit,1);--forge-size:28px;position:absolute;left:50%;top:0;z-index:6;display:grid;place-items:center;padding:calc(4px * var(--u)) calc(11px * var(--u)) calc(5px * var(--u));border:calc(3px * var(--u)) solid var(--cream-300);border-radius:calc(11px * var(--u));background:linear-gradient(180deg,color-mix(in srgb,var(--gem-color) 55%,#fff) 0,var(--gem-color) 42%,color-mix(in srgb,var(--gem-color) 70%,#1b1028) 100%);box-shadow:0 0 0 calc(2.5px * var(--u)) var(--vs-ink),0 calc(2px * var(--u)) 0 calc(2.5px * var(--u)) var(--vs-ink),inset 0 0 0 calc(1.5px * var(--u)) color-mix(in srgb,var(--gem-color) 45%,var(--cream-300)),inset 0 calc(-3px * var(--u)) 0 color-mix(in srgb,var(--gem-color) 55%,#1b1028),0 0 calc(18px * var(--u)) color-mix(in srgb,var(--gem-color) 80%,#0000);transform:translate(-50%,-50%) rotate(-8deg);pointer-events:none;opacity:0;white-space:nowrap}
.forge-receipt .forge-stamped{overflow:visible}
#modal .forge-stamp>*{grid-area:1/1;max-width:none;overflow:visible;font:900 calc(var(--forge-size) * var(--u))/1.05 Lucky,"Hiragino Maru Gothic ProN","M PLUS Rounded 1c",sans-serif;font-style:normal;letter-spacing:.01em}
#modal .forge-stamp>.forge-stamp-ink{color:var(--vs-ink);-webkit-text-stroke:calc(6px * var(--u)) var(--vs-ink)}
#modal .forge-stamp>.forge-stamp-face{background:linear-gradient(180deg,#fff 0 55%,color-mix(in srgb,var(--gem-color) 22%,#fff) 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
#modal .forge-stamp:lang(ko)>*{font-family:Lucky,"Apple SD Gothic Neo","Noto Sans KR",sans-serif}
#modal .forge-stamp:lang(zh)>*{font-family:Lucky,"PingFang SC","Hiragino Sans GB","Noto Sans SC",sans-serif}
#modal .forge-stamp:is(:lang(ja),:lang(ko),:lang(zh))>.forge-stamp-face{-webkit-text-stroke:calc(1.1px * var(--u)) #fff}
#modal .forge-stamp:lang(ja)>.forge-stamp-face{-webkit-text-stroke-width:calc(1.6px * var(--u))}
#modal .forge-stamp:is(:lang(ja),:lang(ko),:lang(zh))>.forge-stamp-ink{-webkit-text-stroke-width:calc(7px * var(--u))}
.forge-dust{border-radius:50%;background:radial-gradient(circle closest-side,#fffef8 0 12%,color-mix(in srgb,var(--gem-color) 22%,var(--cream-300)) 34%,color-mix(in srgb,var(--gem-color) 40%,#ffe2b0a0) 58%,#ffe2b000 100%)}
.forge-combo{font:900 36px/1 Lucky,system-ui,sans-serif;white-space:nowrap;color:var(--honey-300);-webkit-text-stroke:6px var(--vs-ink);paint-order:stroke fill;filter:drop-shadow(0 3px 0 var(--vs-ink)) drop-shadow(0 0 14px #ffb84a)}
.forge-card-back{position:absolute;inset:-2px;z-index:5;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at 50% 44%,#fff 0 9%,color-mix(in srgb,var(--gem-color) 35%,#fff) 20%,var(--gem-color) 52%,color-mix(in srgb,var(--gem-color) 55%,#1d1430) 100%);box-shadow:inset 0 0 0 3px #fffa}
.forge-card-spark,.forge-shine{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:3}
.forge-card-spark>i{position:absolute;inset:0;background:linear-gradient(90deg,transparent,#fffd,transparent);opacity:0}
.forge-shine:after{content:'';position:absolute;inset:-10% 0;width:40%;background:linear-gradient(90deg,transparent,#fff6,transparent);animation:forge-shine 2.5s ease-out infinite;opacity:0}
@keyframes forge-shine{0%,65%{opacity:0;transform:translateX(-130%) skewX(-18deg)}72%{opacity:.65}100%{opacity:0;transform:translateX(360%) skewX(-18deg)}}
@media(prefers-reduced-motion:reduce){.forge-shine:after{animation:none;display:none}}
/* AC551 (build 125 feedback): every Story/Chapters Battle action is a warm coral-red face with
   the same depth system as the green/orange faces (top highlight, inner lip, 6px drop). The
   in-progress face is a calmer red, never the grey disabled filter: it is the current action. */
#online button.primary.tone-battle[data-action]{--bt-top:#ff9f8f;--bt-face:#f8636c;--bt-low:#e6465d;--bt-edge:#a32f49}
#online button.primary.tone-battle[data-action]:disabled{filter:none;--bt-top:#f6a092;--bt-face:#e86f75;--bt-low:#d65666;--bt-edge:#97384d}
#online button.primary.tone-battle[data-action]:disabled::before{opacity:.75}
/* AC552: "Battling" + three dots that fill one by one (≈400ms a step) in fixed-width slots,
   so the word never moves. Reduced motion shows all three, still. */
#online button.tone-battle.is-battling>.button-label{display:inline-flex;align-items:baseline;white-space:nowrap}
.battling-dots{display:inline-flex;flex:none}
.battling-dots>i{display:inline-block;width:.27em;font-style:normal;text-align:left}
.battling-dots>i:nth-child(2){animation:battling-dot-2 1.2s steps(1,end) infinite}
.battling-dots>i:nth-child(3){animation:battling-dot-3 1.2s steps(1,end) infinite}
@keyframes battling-dot-2{0%{opacity:0}33.333%{opacity:1}}
@keyframes battling-dot-3{0%{opacity:0}66.667%{opacity:1}}
@media(prefers-reduced-motion:reduce){.battling-dots>i{animation:none!important}}
/* Visual polish (bugs lane, AC631): the word alone is centred on the face; the three dot slots hang
   after it outside the centred box, so the reserved dot width never pulls "Battling" left. */
#online button.is-battling>.button-label{position:relative}
#online button.is-battling .battling-dots{position:absolute;left:100%;top:0}

/* AC565: during a Story battle the 2× speed and Skip leave the stage and flank the main face
   in the bottom action row, as round 62px discs (stationary hit boxes, at least 44px). */
#online .battle-action-row{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;gap:8px}
#online.journey-view #content.story-content>.battle-action-row{grid-column:1/-1;align-self:end;margin:5px 6px 10px}
#online .battle-action-row>button:is(.primary,.secondary){width:100%;min-width:0;min-height:70px;margin:0;padding:6px 10px;font-size:27px;line-height:1.1}
#online.battle-docked #playback{display:none}
#online .battle-dock{display:grid;place-items:center;width:64px;height:70px;margin-top:-6px}
#online .battle-dock>button.playback-compact{position:relative;isolation:isolate;display:grid;place-items:center;align-content:center;width:64px;height:64px;min-width:64px;min-height:64px;margin:0;padding:0;border:0;border-radius:var(--vs-radius);background:none;box-shadow:none;scale:1;transform:none;
 color:#fff;font:400 25px/1 Lucky,'Arial Rounded MT Bold','Arial Black',sans-serif;letter-spacing:.2px;-webkit-text-stroke:3px var(--ink-navy);paint-order:stroke fill;text-shadow:none;transition:none}
/* The painted disc is the ::before face inside a stationary 64px hit box; a press shrinks only the face and label. */
#online .battle-dock>button.playback-compact::before{content:'';position:absolute;inset:1px;z-index:-1;border:3px solid #171a29;border-radius:50%;
 background:radial-gradient(7px 4px at 17px 12px,#fffbe8e0 0 90%,#fffbe800 100%),linear-gradient(var(--cream-350),#ecc985 58%,#d9a964);background-clip:padding-box;box-shadow:0 5px 0 #171a29,inset 0 3px 0 #fffbe6c0,inset 0 -5px 0 #a3713f;transform:none;transition:transform .12s ease-out}
#online .battle-dock>button.playback-compact>.button-label{position:relative;transform:translateY(-.06em);transition:scale var(--tap-t,.12s ease-out)}
#online .battle-dock>button.playback-compact:not(:disabled):is(:active,.is-pressed){scale:1;transform:none}
#online .battle-dock>button.playback-compact:not(:disabled):is(:active,.is-pressed)::before{transform:scale(.94)}
#online .battle-dock>button.playback-compact:not(:disabled):is(:active,.is-pressed)>.button-label,#online .battle-dock>button.playback-compact.skip-face:not(:disabled):is(:active,.is-pressed)::after{scale:.94}
#online .battle-dock>button.playback-compact.skip-face{grid-template-rows:auto auto;gap:0;font-size:12px;-webkit-text-stroke:2.5px var(--ink-navy);text-shadow:none}
#online .battle-dock>button.playback-compact.skip-face::after{content:'';display:block;width:30px;height:23px;margin:0 auto;grid-row:1;transition:scale var(--tap-t,.12s ease-out);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cg fill='%23ffffff' stroke='%23192034' stroke-width='2.6' stroke-linejoin='round' paint-order='stroke fill'%3E%3Cpath d='M3.5 4.2v15.6a1.3 1.3 0 0 0 2 1.1l10.6-7.8a1.3 1.3 0 0 0 0-2.2L5.5 3.1a1.3 1.3 0 0 0-2 1.1z'/%3E%3Cpath d='M13.5 4.2v15.6a1.3 1.3 0 0 0 2 1.1l10.6-7.8a1.3 1.3 0 0 0 0-2.2L15.5 3.1a1.3 1.3 0 0 0-2 1.1z'/%3E%3Crect x='25.2' y='2.6' width='3.6' height='18.8' rx='1.5'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
#online .battle-dock>button.playback-compact.skip-face>.button-label{grid-row:2;transform:none;margin-top:1px;line-height:1}
/* b133 (owner rule 2026-10-20, AC631 face): the docked Skip disc's plate paints a 5px lip, so it sets --face-lip:5px,
   and its icon (its ::after) rides the face shift with the label (it sat unshifted under a label lifted for a 3px lip:
   the pair landed 2.25px below the face centre). */
#online .battle-dock>button.playback-compact.skip-face{--face-lip:5px}
#online .battle-dock>button.playback-compact.skip-face::after{translate:0 var(--face-shift)}
/* A locked Skip is solid grey parchment (never translucent) with its rounds-left badge. */
#online .battle-dock>button.playback-compact.skip-face:disabled{filter:none;color:#f4f1ea}
#online .battle-dock>button.playback-compact.skip-face:disabled::before{background:radial-gradient(7px 4px at 17px 12px,#fffdf6b0 0 90%,#fffdf600 100%),linear-gradient(#e6e1d6,#c4bdb0 58%,#aaa294);background-clip:padding-box;box-shadow:0 5px 0 #171a29,inset 0 3px 0 #fffdf6a0,inset 0 -5px 0 #7d766b}
#online .battle-dock>button.playback-compact.skip-face:disabled::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cg fill='%23f4f1ea' stroke='%23192034' stroke-width='2.6' stroke-linejoin='round' paint-order='stroke fill'%3E%3Cpath d='M3.5 4.2v15.6a1.3 1.3 0 0 0 2 1.1l10.6-7.8a1.3 1.3 0 0 0 0-2.2L5.5 3.1a1.3 1.3 0 0 0-2 1.1z'/%3E%3Cpath d='M13.5 4.2v15.6a1.3 1.3 0 0 0 2 1.1l10.6-7.8a1.3 1.3 0 0 0 0-2.2L15.5 3.1a1.3 1.3 0 0 0-2 1.1z'/%3E%3Crect x='25.2' y='2.6' width='3.6' height='18.8' rx='1.5'/%3E%3C/g%3E%3C/svg%3E")}
#online .battle-dock .skip-rounds{position:absolute;top:-5px;right:-5px;z-index:2;min-width:22px;height:22px;padding:0 5px;border:2px solid var(--cream-50);border-radius:11px;background:#2c3a52;box-shadow:0 2px 0 #171a29;color:#fff;font:800 12px/18px system-ui,sans-serif;text-align:center;-webkit-text-stroke:0;text-shadow:none}
#online .battle-dock .skip-rounds[hidden]{display:none!important}
@media(max-width:380px){#online .battle-action-row{grid-template-columns:60px minmax(0,1fr) 60px;gap:6px}#online .battle-dock{width:60px}#online .battle-dock>button.playback-compact{width:60px;height:60px;min-width:60px;min-height:60px}}
@media(prefers-reduced-motion:reduce){#online .battle-dock>button.playback-compact::before,#online .battle-dock>button.playback-compact>.button-label{transition:none}}

/* AC554 (build 125 feedback): each stat label sits on its box, 2–3px above the well's top
   edge, instead of floating at the top of the HUD. AC553: the whole stat group pulses from
   its centre when its value changes (story-ui.ts storyStatFlash); a pulsing group rises
   above its neighbours so the scale is never clipped. */
#stats .stat .stat-label{top:auto;bottom:25px}
#stats .stat{transform-origin:55% 60%}
#stats .stat.is-pulsing{z-index:2}

/* AC561 (build 125 feedback): every two-button Story choice row (rest, gifts, aid, decisions,
   encounters, the parcel) uses two equal columns and the single Battle / Next day face height. */
#online.journey-view #content.story-content>button.story-choice{width:calc(100% - 12px);height:70px;min-height:70px;padding:6px 10px;font-size:22px}

/* AC558 (build 125 feedback): reveal rays (skill choice spotlight, Victory/Defeat, discoveries and
   the featured-reward spotlight) have no hard ends. The mask is sized to the ray disc itself
   (closest-side) and fades every ray to transparent from about 55% of its length. */
.skill-spotlight-rays,.victory-rays,.reward-hero-rays::before{-webkit-mask-image:radial-gradient(closest-side,#000 0 22%,#000e 45%,#000c 55%,#0008 64%,#0004 74%,#0001 86%,#0000 96%);mask-image:radial-gradient(closest-side,#000 0 22%,#000e 45%,#000c 55%,#0008 64%,#0004 74%,#0001 86%,#0000 96%)}
.discovery-rays{-webkit-mask-image:radial-gradient(closest-side,#0000 22%,#0009 42%,#0007 58%,#0003 78%,#0000 100%);mask-image:radial-gradient(closest-side,#0000 22%,#0009 42%,#0007 58%,#0003 78%,#0000 100%)}

/* AC563 (build 125 feedback): the Field Journal reads like a story. Larger body text (17px), about
   two entries in view, and one calm card for every entry type (no per-type tints or dashed borders;
   the small type icon stays). The newest entry is followed into view by restoreStoryFeed. */
#online.journey-view #feed{padding:8px 10px 10px}
#online.journey-view #feed .log-entry,#online.journey-view #feed .log-entry:is(.encounter,.story,.good,.bad,.level,.skill,.lore,.is-rolling){gap:10px;margin:0 0 10px;padding:10px 12px 11px;border:1.5px solid #d8c59e;border-style:solid;border-radius:14px;background:var(--paper);box-shadow:0 2px 0 #c7af8640}
#online.journey-view #feed .log-entry h3,#online.journey-view #feed .log-entry:is(.good,.bad) h3{margin:0 0 3px;color:#8b7552;font-size:11px;line-height:1.2;letter-spacing:.7px}
#online.journey-view #feed .log-entry p{font-size:17px;line-height:1.38;font-weight:600;color:#2c2b31}
#online.journey-view #feed .log-icon{width:26px;height:26px;margin-top:2px;border-radius:8px;background:#efe2c4;box-shadow:none;color:#8a6b39}
#online.journey-view #feed .log-icon .journal-emblem{width:24px;height:24px}
#online.journey-view #feed .log-icon.journal-roll{background:var(--navy-600);box-shadow:inset 0 0 0 1.5px #d7b16a}
#online.journey-view #feed .day-divider{margin:4px 0 8px;font-size:12px;line-height:18px}
#online.journey-view #feed .log-changes{margin-top:6px}
@media(max-height:700px){#online.journey-view #feed .log-entry p{font-size:16px;line-height:1.34}#online.journey-view #feed .log-entry{padding:8px 10px 9px;margin-bottom:8px}}
/* A choice with an icon (encounters, the parcel) wraps only between words, never inside one. */
#online.journey-view #content.story-content>button.story-event-choice{font-size:21px}
#online.journey-view button.story-event-choice .story-event-choice-text{overflow-wrap:normal;word-break:keep-all;text-wrap:balance;line-height:1}
/* Visual polish (bugs lane): 6px side padding on Compact keeps the longest one-line thanks ("Maks. HP +180" with its
   icon) on one line at the unchanged 19px; the face stays symmetric. */
@media(max-width:380px){#online.journey-view #content.story-content>button.story-event-choice{font-size:19px;padding-inline:6px}}

/* AC558 (lead review): the skill spotlight's lower rays also fade top-to-bottom, so they are gone
   before the cream skill cards. The vertical mask must not turn with the rays, so the ray disc
   stays still (radial + vertical masks intersected) and its ::before carries the turning rays. */
:is(.skill-spotlight,.light-burst)>.skill-spotlight-rays{background:none;animation:none;
 -webkit-mask-image:radial-gradient(closest-side,#000 0 22%,#000e 45%,#000c 55%,#0008 64%,#0004 74%,#0001 86%,#0000 96%),linear-gradient(to bottom,#000 0%,#000 62%,transparent 92%);
 mask-image:radial-gradient(closest-side,#000 0 22%,#000e 45%,#000c 55%,#0008 64%,#0004 74%,#0001 86%,#0000 96%),linear-gradient(to bottom,#000 0%,#000 62%,transparent 92%);
 -webkit-mask-composite:source-in;mask-composite:intersect}
:is(.skill-spotlight,.light-burst)>.skill-spotlight-rays::before{content:'';position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 8deg,transparent 0deg 5deg,var(--spotlight-ray,#fff2d15c) 7deg 16deg,transparent 19deg 30deg);animation:skill-spotlight-turn 64s linear infinite}
body:has(#modal[open]) .skill-spotlight>.skill-spotlight-rays::before{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){:is(.skill-spotlight,.light-burst)>.skill-spotlight-rays::before{animation:none!important}}

/* AC563 (lead review): each group of entries is a .journal-day section; its Day N / Start header
   is sticky at the top of the journal, so entries never show without their header and the next
   header pushes the previous one out. AC556: the journal ends with clear paper for the tutorial
   hand, so the hand above the action never covers journal text. */
#online.journey-view #feed{padding-top:0}
#online.journey-view #feed .journal-day{position:relative}
#online.journey-view #feed .day-divider{position:sticky;top:0;z-index:2;display:block;margin:0 -10px 4px;padding:4px 12px 2px;color:#6e5838;font-size:12px;line-height:18px;font-weight:800;letter-spacing:.3px;
 background:linear-gradient(#eedcb6 0 78%,#eedcb600)}
#online.journey-view #feed::after{content:'';display:block;height:38px}
/* AC556 (owner review, build 126): the hand belongs to the bottom action bar. It rests 7px up and bobs
   down into the press, where its fingertip overlaps the top 28% of the face; there a ring opens on the
   button (at the fingertip, never above the wrist). While the hand reaches over the Story journal, the
   journal text fades out above it (--hint-clear, set per frame by updateActionHint) and the journal
   ends with that much clear paper, so the newest entry still scrolls fully into view. */
@keyframes action-hint-bob{0%,100%{transform:translateY(-7px)}38%{transform:translateY(-7px)}56%,64%{transform:none}84%{transform:translateY(-7px)}}
.action-hint-ripple{position:fixed;z-index:29;width:44px;height:22px;margin:-11px 0 0 -22px;border:3px solid var(--card-face);border-radius:50%;box-sizing:border-box;pointer-events:none;opacity:0;
 box-shadow:0 0 0 1.5px #5a1d2a59,0 0 8px 2px #fff4d080,inset 0 0 0 1.5px #5a1d2a40;animation:action-hint-ripple 1.6s linear infinite}
@keyframes action-hint-ripple{0%,55%{opacity:0;transform:scale(.4)}58%{opacity:1;transform:scale(.55)}100%{opacity:0;transform:scale(1.5)}}
.action-hint-ripple[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.action-hint-hand{animation:none;transform:none}.action-hint-ripple{animation:none;opacity:.8;transform:none}}
#online.journey-view #feed.has-action-hint{-webkit-mask-image:linear-gradient(#000 calc(100% - var(--hint-clear) - 14px),#0000 calc(100% - var(--hint-clear)));mask-image:linear-gradient(#000 calc(100% - var(--hint-clear) - 14px),#0000 calc(100% - var(--hint-clear)))}
#online.journey-view #feed.has-action-hint::after{height:max(38px,calc(var(--hint-clear) + 18px))}

/* AC560 (owner review, build 126): while a Refresh waits, a bare outline of each card's place at about
   30% alpha holds the board (no text-line skeleton, no sweep); the first deal shows nothing in the
   empty places. The old cards fly out as still copies in .skill-fly-layer above the board.
   Reduced motion never shows either (no fly-out). */
.skill-offers{position:relative}
.skill-offers>.skill-offer{z-index:1}
/* AC596: the cards drop in from above, top to bottom: each one comes down from behind the card above it
   (descending z-index), and the header's line stays over the first card's start. At rest nothing overlaps. */
.skill-offers>.skill-offer:nth-child(1){z-index:4}.skill-offers>.skill-offer:nth-child(2){z-index:3}.skill-offers>.skill-offer:nth-child(3){z-index:2}
.skill-draft-header{z-index:5}
.skill-offer-slot{position:absolute;z-index:0;box-sizing:border-box;border:2px solid #fff3d64d;border-radius:15px;background:none;pointer-events:none}
.skill-fly-layer{position:fixed;inset:0;z-index:23;pointer-events:none}
.skill-fly-layer>.skill-offer{position:absolute;box-sizing:border-box;margin:0}
/* AC578 (b127, b128 lead review: the white sheen was invisible on the cream face): the landing sweep.
   A warm gold sheen crosses each dealt card once with a brighter glint along its 2px rim. The layer
   covers the card's border box (inset -2px) and is painted under the art frame and the copy (z-index
   -1 inside the card's own stacking context, .skill-offers>.skill-offer has z-index 1), so it never
   washes the text; the rim band is masked to the 2px border ring. WAAPI drives both bands in step
   (story-ui.ts dealSkillOffers) and removes the layer when it has passed. Never on the outlines.
   The Refresh row sits above the cards (z-index 2), so a card rising from 40px low passes under the
   button and never over it. */
.skill-draft-actions{position:relative;z-index:2}
.skill-offer-sweep{position:absolute;inset:-2px;z-index:-1;border-radius:15px;overflow:hidden;pointer-events:none}
.skill-offer-sweep i{position:absolute;top:-12%;bottom:-12%;left:0;width:44%;opacity:0;transform:translateX(-110%) skewX(-18deg);will-change:transform,opacity}
.skill-offer-sweep>i{background:linear-gradient(90deg,#ffe9a800 0,#ffe9a873 26%,#ffdf8aa6 44%,#fff6d6c7 50%,#ffdf8aa6 56%,#ffe9a873 74%,#ffe9a800 100%)}
.skill-offer-sweep>b{position:absolute;inset:0;border-radius:15px;padding:2px;box-sizing:border-box;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.skill-offer-sweep>b>i{width:44%;background:linear-gradient(90deg,#ffe9a800 0,#ffe9a8cc 30%,var(--card-face) 50%,#ffe9a8cc 70%,#ffe9a800 100%)}
.skill-fly-layer .skill-offer-sweep{display:none}
/* SM11 + SM1 (docs/workorders/STORY_MOTION.md; story-ui.ts SKILL_PICK). A pressed draft card tilts toward the finger
   (--tilt-x/--tilt-y from skillCardTilt, at most 6 and 4 degrees) and eases back on release. A plain draft's pick shows
   its cards as still copies in .skill-pick-layer above the board, and above the draft's still copy once the answer is
   here: the unpicked ones fall away, the picked one holds with the honey ring and turns jade as it collapses into the
   spark that flies to the learned-skills strip (story-events-ui.css .story-jade-spark). Transform and opacity only. */
.skill-view .skill-offers>.skill-offer{transition:transform .16s var(--ease-out)}
.skill-view .skill-offers>.skill-offer.is-tilted{transform:perspective(720px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transition-duration:.07s}
.skill-pick-layer{z-index:46}
.skill-pick-layer>.skill-offer.is-picked{box-shadow:inset 0 2px #fffced,0 4px #a78a5d,0 0 0 3px var(--honey-200),0 0 22px #ffd36baa}
.skill-pick-glow{position:absolute;inset:-2px;z-index:3;border-radius:inherit;opacity:0;pointer-events:none;background:radial-gradient(circle,#e4fff7 0%,#8ff3dc 32%,#3fd8ba 66%,#1faf93 100%)}
@media(prefers-reduced-motion:reduce){.skill-view .skill-offers>.skill-offer{transition:none}.skill-view .skill-offers>.skill-offer.is-tilted{transform:none}}

/* AC565 extension (owner 2026-10-17): Tower and Arena playback share the bottom row. Tower keeps its
   in-progress face in the panel; the Arena replay shows the row under the duel with its cream Fight
   face (not dimmed). The leaving row's still copy (.battle-row-ghost) plays the exit over the next screen. */
#online .battle-action-row>button.is-battling>.button-label{display:inline-flex;align-items:baseline;white-space:nowrap}
.tower-live>.battle-action-row{margin:2px 6px 0}
#online.arena-playing #content{display:block!important;flex:none;padding:6px 6px 10px}
#online.arena-playing #content>.battle-action-row{margin:0}
#online .battle-action-row.is-arena>button.secondary:disabled{--small-top:var(--btn-secondary-top);--small-bottom:var(--btn-secondary-bottom);--small-edge:var(--btn-secondary-edge);--small-lip:var(--btn-secondary-lip);--small-shine:var(--btn-secondary-shine);filter:none;opacity:1;color:var(--cream-50)}
#online .battle-row-ghost{position:fixed;z-index:24;margin:0;pointer-events:none;background:var(--battle-row-ground,#2b2b36);box-shadow:0 0 0 8px var(--battle-row-ground,#2b2b36)}
/* AC567 (b126): the warden's skill chest reveal (story-ui.ts chestReveal*). Dim stage, the
   chest large with an idle glow, one Open action; charge, burst in the best offer's rarity
   colour, then the chest flies into the draft's spotlight and deals the cards.
   AC581 (b128): the jade-and-gold chest (journey/boss-chest-jade.png, 2 x 2 cells: closed,
   cracking, open, open-glow; feet at 91% of the cell) drops into the dim from above the
   screen; its contact shadow and dust stay on the floor (stage children, not body). */
.chest-trunk{display:block;background-repeat:no-repeat;background-size:200% 200%;background-position:0 0}
.chest-trunk[data-frame="1"]{background-position:100% 0}.chest-trunk[data-frame="2"]{background-position:0 100%}.chest-trunk[data-frame="3"]{background-position:100% 100%}
.chest-reveal{--chest-rate:1;--chest-ray:var(--gold-50);--chest-deep:#ffd36b;position:fixed;inset:0;z-index:45;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:calc(var(--safe-top, env(safe-area-inset-top,0px)) + 40px) 16px calc(var(--safe-bottom, env(safe-area-inset-bottom,0px)) + 56px);overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none}
.chest-reveal-shade{position:absolute;inset:0;background:radial-gradient(ellipse 80% 55% at 50% 47%,#3a2c3ad9 0%,#1a1424ee 58%,#0b0911f5 100%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
/* AC581 round 2: the battle-state run UI's still copy (story-ui.ts chestRevealFreezeRunUI) under the dim, in a stand-in #online
   that keeps the battle classes; it crossfades out over the result screen (chestRevealThaw). Blur 8 px: no text under the dim reads. */
.chest-reveal>.chest-reveal-freeze{position:absolute!important;inset:0!important;display:block!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;overflow:hidden!important;transform:none!important;filter:none!important;pointer-events:none;z-index:0}
.chest-reveal>.chest-reveal-freeze:before,.chest-reveal>.chest-reveal-freeze:after{content:none!important}
/* AC581: under the reveal the journal's own Open skill chest stays out of sight (the reveal has the action). */
#online:has(> #chest-reveal) #content [data-action="story.reward"]{visibility:hidden}
/* AC581: the outgoing level-up draft's still copy (story-ui.ts chestRevealGhostDraft) dissolves into the dim. */
.chest-reveal-ghost{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.chest-reveal-ghost-back{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 15%,#6b5b4555,transparent 65%),var(--ink-plum-2)}
.chest-reveal-ghost-back>*{position:absolute}.chest-reveal-ghost-scenery canvas{display:block;width:100%;height:100%}
/* The flying chest has landed on the draft's own chest: its light goes, its rays and sparks fade (story-ui.ts chestRevealDeal). */
.chest-reveal.is-handed :is(.chest-reveal-beam,.chest-reveal-bloom,.chest-reveal-glow,.chest-reveal-shadow){visibility:hidden}.chest-reveal.is-open.is-handed .chest-reveal-rays:after{opacity:0}
.chest-reveal-ghost-gear{display:grid;place-items:center;padding:0;border:0;background:none;box-shadow:none}
.chest-reveal-ghost .skill-offer.is-picked{box-shadow:inset 0 2px #fffced,0 4px #a78a5d,0 0 0 3px var(--honey-200),0 0 22px #ffd36baa}
/* AC581 lead review: the burst light is additive and sits UNDER the chest (stage z 2): a warm halo over the dim
   centred on the seam, never a flat sheet over the whole screen or over the chest. */
.chest-reveal-flash{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;mix-blend-mode:plus-lighter;background:radial-gradient(circle 70vmax at var(--chest-bloom-x,50%) var(--chest-bloom-y,50%),color-mix(in srgb,var(--chest-ray) 28%,transparent) 0%,color-mix(in srgb,var(--chest-deep) 13%,transparent) 26%,color-mix(in srgb,var(--chest-deep) 6%,transparent) 48%,transparent 72%)}
.chest-reveal-bloom{position:absolute;left:50%;top:54.5%;width:440px;height:440px;margin:-220px 0 0 -220px;border-radius:50%;opacity:0;pointer-events:none;mix-blend-mode:plus-lighter;background:radial-gradient(circle,#fffef7 0%,var(--cream-250) 12%,color-mix(in srgb,var(--chest-ray) 80%,#fff) 24%,color-mix(in srgb,var(--chest-ray) 42%,transparent) 40%,color-mix(in srgb,var(--chest-deep) 14%,transparent) 56%,transparent 70%)}
.chest-reveal-title{position:relative;z-index:5;margin:0 0 6px;text-align:center;font:34px/1.05 Lucky,sans-serif;color:var(--card-face);-webkit-text-stroke:2px #3b2a2c;paint-order:stroke fill;filter:drop-shadow(0 3px #2a1d24) drop-shadow(0 0 24px #ffd77a88)}
.chest-reveal-stage{position:relative;z-index:2;width:250px;height:236px;transform-origin:50% 50%}
.chest-reveal-glow{position:absolute;left:50%;top:54%;width:300px;height:300px;margin:-150px 0 0 -150px;border-radius:50%;background:radial-gradient(circle,#ffe9a8aa 0%,#ffcf6a55 30%,#8fe3b81f 50%,transparent 70%);animation:chest-glow-breathe 2.6s ease-in-out calc((820ms + var(--chest-lead,0ms)) / var(--chest-rate)) infinite}
.chest-reveal-rays{position:absolute;left:50%;top:44%;width:520px;height:520px;margin:-260px 0 0 -260px;opacity:.32;transform:scale(.72);pointer-events:none}
.chest-reveal-rays:after{opacity:0}.chest-reveal.is-open .chest-reveal-rays:after{opacity:1}
.chest-reveal-rays:before{content:'';position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 0deg,transparent 0deg 6deg,color-mix(in srgb,var(--chest-ray) 80%,transparent) 9deg 15deg,transparent 18deg 24deg);-webkit-mask-image:radial-gradient(circle,#000 6%,#000c 26%,transparent 66%);mask-image:radial-gradient(circle,#000 6%,#000c 26%,transparent 66%);animation:skill-spotlight-turn 18s linear infinite}
.chest-reveal-rays:after{content:'';position:absolute;inset:22%;border-radius:50%;background:radial-gradient(circle,var(--cream-50) 0%,color-mix(in srgb,var(--chest-ray) 85%,transparent) 26%,transparent 66%)}
/* The idle bob starts where the drop-in ends (720 ms), so the hand-over never jumps. */
.chest-reveal-body{position:absolute;left:50%;bottom:6px;width:212px;height:212px;margin-left:-106px;transform-origin:50% 91%;animation:chest-idle-bob 2.4s ease-in-out calc((720ms + var(--chest-lead,0ms)) / var(--chest-rate)) infinite}
.chest-reveal-body .chest-trunk{position:absolute;inset:0;filter:drop-shadow(0 5px 5px #0005)}
.chest-reveal-shadow{position:absolute;left:50%;bottom:19px;width:140px;height:18px;margin-left:-70px;border-radius:50%;background:radial-gradient(ellipse,#000a 0%,#0007 45%,transparent 72%);animation:chest-shadow-breathe 2.4s ease-in-out calc((720ms + var(--chest-lead,0ms)) / var(--chest-rate)) infinite}
.chest-reveal-dust{position:absolute;left:50%;bottom:16px;width:44px;height:26px;margin-left:-84px;border-radius:50%;opacity:0;pointer-events:none;background:radial-gradient(ellipse,#efe0c4a6 0%,#cdb79366 38%,transparent 68%);filter:blur(1.5px)}
.chest-reveal-dust.is-right{margin-left:40px}
/* Light leaking out of the closed lid seam (the jade chest's seam runs across the gold band at about 56% of the cell). */
.chest-reveal-seam{position:absolute;left:20%;width:60%;top:52.5%;height:7%;border-radius:50%;background:radial-gradient(ellipse,var(--card-face) 0%,#ffe08acc 35%,#ffc24a33 65%,transparent 75%);opacity:.25;mix-blend-mode:screen;transform:rotate(-1.5deg);animation:chest-seam-flicker 1.9s ease-in-out infinite}
/* The jade gem in the lock plate glows softly and flares as the chest charges. */
/* Lead review: a soft emerald glint at rest (the gem stays deep green); the bright flare is the charge's. */
.chest-reveal-gem{position:absolute;left:32.4%;top:50.8%;width:18%;height:18%;border-radius:50%;pointer-events:none;background:radial-gradient(circle,#d8ffe6 0%,#5fe6a6a0 20%,#1fbf7a40 46%,transparent 68%);mix-blend-mode:screen;opacity:.16;animation:chest-gem-glow 2.4s ease-in-out infinite}
/* The light column out of the opened chest (behind the trunk art, so it rises from inside the box). */
/* The light column rises out of the open box behind its back lid: a white-hot shaft in the rarity colour, reading
   well above the lid (it never washes over the chest). */
.chest-reveal-beam{position:absolute;left:35%;width:30%;bottom:48%;height:205%;border-radius:50% 50% 14% 14%/22% 22% 8% 8%;opacity:0;pointer-events:none;transform-origin:50% 100%;background:linear-gradient(to top,#fffef8 0%,var(--cream-50) 22%,color-mix(in srgb,var(--chest-ray) 72%,#fff) 42%,color-mix(in srgb,var(--chest-ray) 50%,transparent) 64%,color-mix(in srgb,var(--chest-deep) 14%,transparent) 84%,transparent 100%);filter:blur(4px);mix-blend-mode:plus-lighter}
.chest-reveal-twinkle{position:absolute;width:15px;height:20px;background:var(--cream-250);clip-path:polygon(50% 0,63% 35%,100% 50%,63% 65%,50% 100%,37% 65%,0 50%,37% 35%);opacity:.2;animation:chest-twinkle 2.2s ease-in-out infinite;pointer-events:none}
.chest-reveal-twinkle:nth-of-type(1){left:6%;top:30%;animation-delay:-.4s}.chest-reveal-twinkle:nth-of-type(2){right:8%;top:18%;width:11px;height:15px;animation-delay:-1.3s}
.chest-reveal-twinkle:nth-of-type(3){left:20%;top:4%;width:9px;height:12px;animation-delay:-1.8s}.chest-reveal-twinkle:nth-of-type(4){right:16%;top:58%;width:10px;height:13px;animation-delay:-.9s}
.chest-reveal-actions{position:relative;z-index:2;width:min(330px,100%);margin-top:18px}
.chest-reveal-actions>button{margin:0}
/* A slow network: after the 450 ms build-up the chest keeps rattling at full charge until the result is here. */
.chest-reveal.is-charging .chest-reveal-body{animation:chest-charge calc(450ms / var(--chest-rate)) cubic-bezier(.5,0,.9,.6) forwards,chest-rattle 140ms linear calc(450ms / var(--chest-rate)) infinite}
.chest-reveal.is-charging .chest-reveal-seam{animation:chest-seam-charge calc(450ms / var(--chest-rate)) ease-in forwards}
.chest-reveal.is-charging .chest-reveal-glow{animation:chest-glow-charge calc(450ms / var(--chest-rate)) ease-in forwards}
.chest-reveal.is-charging .chest-reveal-gem{animation:chest-gem-charge calc(450ms / var(--chest-rate)) ease-in forwards}
.chest-reveal.is-charging .chest-reveal-actions,.chest-reveal.is-open .chest-reveal-actions{opacity:0;transform:translateY(10px) scale(.92);transition:opacity .16s,transform .16s}
.chest-reveal.is-open .chest-reveal-body{animation:none}.chest-reveal.is-open :is(.chest-reveal-seam,.chest-reveal-gem){opacity:0;animation:none}
.chest-reveal.is-open .chest-reveal-glow{background:radial-gradient(circle,var(--cream-50) 0%,color-mix(in srgb,var(--chest-ray) 70%,transparent) 28%,transparent 70%)}
.chest-reveal-spark{position:absolute;left:50%;top:46%;width:9px;height:9px;margin:-4px 0 0 -4px;border-radius:50%;background:radial-gradient(circle,#fff 0%,var(--chest-ray,#ffe9a8) 55%,transparent 72%);pointer-events:none}
.chest-reveal-spark.is-star{width:14px;height:18px;margin:-9px 0 0 -7px;border-radius:0;background:var(--card-face);clip-path:polygon(50% 0,63% 35%,100% 50%,63% 65%,50% 100%,37% 65%,0 50%,37% 35%);filter:drop-shadow(0 0 4px var(--chest-ray,#ffd36b))}
.chest-reveal-fx{position:fixed;inset:0;z-index:44;pointer-events:none;overflow:hidden}
.chest-reveal-fx .chest-reveal-spark{position:fixed}
.chest-reveal.is-still :is(.chest-reveal-body,.chest-reveal-glow,.chest-reveal-seam,.chest-reveal-gem,.chest-reveal-shadow,.chest-reveal-twinkle),.chest-reveal.is-still .chest-reveal-rays:before{animation:none}
@keyframes chest-idle-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes chest-glow-breathe{0%,100%{opacity:1;transform:none}50%{opacity:.72;transform:scale(.95)}}
@keyframes chest-shadow-breathe{0%,100%{transform:none;opacity:1}50%{transform:scale(.9);opacity:.8}}
@keyframes chest-gem-glow{0%,100%{opacity:.1;transform:scale(.88)}50%{opacity:.28;transform:scale(1.02)}}
@keyframes chest-gem-charge{from{opacity:.25;transform:scale(1)}to{opacity:1;transform:scale(1.9)}}
@keyframes chest-seam-flicker{0%,100%{opacity:.18}45%{opacity:.42}60%{opacity:.26}}
@keyframes chest-twinkle{0%,100%{opacity:.15;transform:scale(.6)}50%{opacity:.95;transform:scale(1)}}
/* Anticipation: sinks into a squash, the shake rises in amplitude and frequency. */
@keyframes chest-charge{
 0%{transform:none}12%{transform:translateX(-1px) scale(1.03,.97)}24%{transform:translateX(2px) scale(1.05,.95)}
 36%{transform:translateX(-3px) rotate(-1.5deg) scale(1.07,.93)}46%{transform:translateX(3px) rotate(1.5deg) scale(1.08,.92)}
 56%{transform:translateX(-4px) rotate(-2.5deg) scale(1.1,.9)}64%{transform:translateX(4px) rotate(2.5deg) scale(1.11,.89)}
 72%{transform:translateX(-5px) rotate(-3deg) scale(1.12,.88)}80%{transform:translateX(5px) rotate(3deg) scale(1.13,.87)}
 87%{transform:translateX(-5px) rotate(-3deg) scale(1.14,.86)}94%{transform:translateX(5px) rotate(3deg) scale(1.15,.85)}100%{transform:translateY(2px) scale(1.16,.84)}}
@keyframes chest-rattle{0%,100%{transform:translate(-4px,2px) rotate(-2.5deg) scale(1.16,.84)}50%{transform:translate(4px,2px) rotate(2.5deg) scale(1.16,.84)}}
@keyframes chest-seam-charge{from{opacity:.35;transform:rotate(-1.5deg) scale(.9,.9)}35%{opacity:.75}to{opacity:1;transform:rotate(-1.5deg) scale(1.4,2.2)}}
@keyframes chest-glow-charge{from{opacity:.8;transform:scale(1)}to{opacity:1;transform:scale(1.3)}}
@media(max-height:700px){.chest-reveal-title{font-size:30px}.chest-reveal-stage{width:220px;height:204px}.chest-reveal-body{width:184px;height:184px;margin-left:-92px}
 .chest-reveal-shadow{width:122px;height:16px;margin-left:-61px;bottom:17px}.chest-reveal-dust{margin-left:-74px}.chest-reveal-dust.is-right{margin-left:30px}}
/* The draft from a warden's chest: the open chest stands in the spotlight instead of the hero. */
.skill-draft.chest-draft .skill-draft-chest .chest-trunk{position:absolute;left:50%;top:-34px;width:132px;height:132px;margin-left:-66px;filter:drop-shadow(0 4px 4px #0005)}
.skill-draft.chest-draft .skill-spotlight-rays{background:repeating-conic-gradient(from 8deg,transparent 0deg 5deg,color-mix(in srgb,var(--chest-ray) 60%,transparent) 7deg 16deg,transparent 19deg 30deg);animation-duration:28s}
.skill-draft.chest-draft .skill-spotlight-glow{background:radial-gradient(circle,#fffbe8b0 0%,color-mix(in srgb,var(--chest-ray) 45%,transparent) 30%,color-mix(in srgb,var(--chest-deep) 14%,transparent) 48%,transparent 70%)}
.skill-draft.chest-draft[data-rarity=legendary] .skill-spotlight-glow{opacity:1}
.skill-draft.chest-draft.is-arriving .skill-draft-chest .chest-trunk,.skill-draft.chest-draft.is-arriving .skill-offer{opacity:0}
/* Lead review: one light source. The spotlight waits for the flying chest (whose rays travel with it) and Refresh
   waits for the cards it would refresh. */
.skill-draft.chest-draft.is-arriving .skill-spotlight,.skill-draft.chest-draft.is-dealing .skill-draft-actions{opacity:0}
/* The chest draft closing onto the stage: its still copy above the mounted run UI (story-ui.ts chestDraftExit). */
.chest-draft-exit{position:fixed;inset:0;z-index:44;pointer-events:none;overflow:hidden}
/* The reveal title stays over the draft until the cards rise; the draft's own header then fades in under it. */
.skill-draft.chest-draft.is-titled .skill-draft-header :is(h1,p){opacity:0}
@media(max-height:760px){.skill-draft.chest-draft .skill-draft-chest .chest-trunk{top:-36px;width:100px;height:100px;margin-left:-50px}}
/* The best card's glint after it lands. */
.skill-view .skill-offer.chest-glint:after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(105deg,transparent 30%,#fff9 46%,#fffbe0e6 50%,#fff9 54%,transparent 70%);background-size:260% 100%;background-position:120% 0;animation:chest-card-glint .7s ease-out forwards}
@keyframes chest-card-glint{to{background-position:-30% 0}}
/* AC565 Tower (owner review, build 126): during the fight the Tower panel takes the footer slot, so the battle row docks
   at the same bottom inset as Story and Arena, and the in-progress face is the Arena cream (never dimmed).
   b205 AC877 (owner, build 205: "Przeprojektowałbym ten dół"): the guardian's name and stats moved into the duel HUD;
   the panel is one compact line (the floor chip left, Auto-next right) centred over the battle row. The panel keeps the
   216px slot (AC514: the stage keeps its preparation height, so the fight never jumps the scene at Challenge). */
#online.tower-view.tower-playing #tabs{display:none!important}
#online.tower-view.tower-playing #content{height:216px;min-height:216px;flex:0 0 216px;padding:6px 10px 0}
#online.tower-view .tower-live{justify-content:flex-start;gap:6px;height:100%;padding:0}
.tower-live-line{display:flex;align-items:center;justify-content:space-between;gap:10px;box-sizing:border-box;min-height:56px;margin:auto 0;padding:5px 5px 5px 8px;border:2px solid #8d7152;border-radius:16px;background:linear-gradient(#2d2534,#1b1621);box-shadow:inset 0 1px #ffffff14,0 2px #0f0b1499}
.tower-floor-chip{display:inline-flex;align-items:center;gap:8px;min-width:0;padding:0 6px;color:var(--honey-200,#ffd98a);white-space:nowrap}
.tower-floor-chip>b{font:19px/1 Lucky;letter-spacing:.6px;overflow:hidden;text-overflow:ellipsis}
.tower-floor-chip>.ui-icon{flex:none;width:24px;height:24px}
#online.tower-view .tower-live .tower-auto.is-live{flex:none;margin:0;min-height:44px;gap:9px;padding:0 14px 0 11px}
.tower-auto.is-live>b{font:16px Lucky}
.tower-auto .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#online.tower-view .tower-live>.battle-action-row{margin:0 0 var(--battle-row-inset,10px)}
#online .battle-action-row.is-tower>button.secondary:disabled{--small-top:var(--btn-secondary-top);--small-bottom:var(--btn-secondary-bottom);--small-edge:var(--btn-secondary-edge);--small-lip:var(--btn-secondary-lip);--small-shine:var(--btn-secondary-shine);filter:none;opacity:1;color:var(--cream-50)}

/* AC573 (build 126 feedback, "Ten screen miał być wyższy"): the Story / Chapters / Wizard run stage
   is about 45% of the viewport (Pro 383px, Max 419px; Mini 43% = 349px, Compact 41% = 273px), so the journal keeps
   about 1.5–2 entries on Pro and the bottom row stays docked. The scene painter fills the taller
   canvas from the same atlas (cover crop), never blank sky or ground. The Complete/Defeat summary keeps the
   same stage, so the End of a route and the next route's first travel share one atlas fit (no zoom snap).
   Tower and Arena keep theirs. */
#online.story-mode:is(.journey-view,.story-result) #world{height:clamp(240px,45dvh,440px)}
@media(max-height:830px){#online.story-mode:is(.journey-view,.story-result) #world{height:43dvh}}
@media(max-height:700px){#online.story-mode:is(.journey-view,.story-result) #world{height:clamp(220px,41dvh,290px)}}

/* AC572 (build 126 feedback): the Field Journal reads like a chat log on the dark ground of the bottom
   action bar (#online #2b2b36, Capybara Go journal): cream message cards stay as they are; the heading
   and the sticky Day headers are warm light text on the dark ground (AA: #e9d9b4 on #2b2b36 ≈ 11:1). */
#online.journey-view .story-journal{background:#2b2b36;color:var(--row-face)}
#online.journey-view #feed-heading{border-bottom:1px solid #ffffff1a;background:#2b2b36;color:#cdbb95}
/* The sticky Day header is opaque with a short soft edge below, so a card scrolling under it never
   shows half a line of text through the fade on the dark ground. */
#online.journey-view #feed .day-divider{color:#e9d9b4;background:#2b2b36;box-shadow:0 4px 5px 1px #2b2b36}
#online.journey-view #feed .log-entry,#online.journey-view #feed .log-entry:is(.encounter,.story,.good,.bad,.level,.skill,.lore,.is-rolling){border-color:var(--row-inset);box-shadow:0 2px 0 #00000059}
#online.journey-view #feed{scrollbar-color:#ffffff33 transparent}
/* AC573: the taller stage leaves the journal less room, so the always-on tail under the newest card is
   8px; the AC556 clear space still grows to the tutorial hand while it shows (.has-action-hint). */
#online.journey-view #feed::after{height:8px}

/* AC574 (build 126 feedback, "Nie powinno się nic zaznaczać"): nothing in the app selects text or
   opens the iOS long-press callout (supersedes the September 23 per-control list). Real text fields
   (name, code, e-mail) and the account-ID copy fallback stay selectable. */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,[contenteditable],[contenteditable] *,.account-id-value,.account-id-value *){-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* QA-03 (b127): a large Merge all receipt (up to 24 gear / 18 stone classes) keeps
   Close fully inside the dialog with its normal inset. On short phones the receipt
   takes the safe viewport minus 12px margins (the account/AFK/Book cap) where that
   exceeds the default 90dvh (Compact: 623px instead of 600px). */
#modal:has(>.gemstone-receipt.is-merged){max-height:max(90dvh,calc(100dvh - var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px)) - 24px))}
/* Four or more rows on a short phone: tighter rows so CJK's taller labels fit too. */
@media(max-height:700px){
 #modal>.gemstone-receipt.is-merged:has(>.gear-results-grid>:nth-child(16),>.gemstone-receipt-grid>:nth-child(16)){gap:6px}
 #modal>.gemstone-receipt.is-merged>:is(.gear-results-grid,.gemstone-receipt-grid):has(>:nth-child(16)){row-gap:4px}
}

/* AC589b / AC577 / AC585 (build 127 feedback, lane battle-b128): the run's top row, Capybara Go
   layout. Settings sits at the top left and keeps ONE 44px face in every Story state (supersedes the
   P19 32px playback face, "Wielkość tego przycisku skacze bez sensu"); the Day strip and, during a
   fight, the round pill share one 44px slot beside it (8px gap, same centre line). The strip is a
   persistent node: day and battle swaps slide it up/out and back (story-ui.ts syncStoryTopBar). The
   chapter is the strip's small left label; the floating chapter chip is gone. */
#online.story-mode #story-settings{left:6px;right:auto;width:48px;height:48px}
#online.story-mode #story-settings .settings-face,#online.story-playing #story-settings .settings-face{width:44px;height:44px;border-radius:var(--vs-radius);box-shadow:inset 0 2px 0 #eee9fa,inset 0 -3px 0 #666078,0 3px 0 #171423}
#online.story-mode #story-settings .settings-face img,#online.story-playing #story-settings .settings-face img{width:34px;height:34px}
#run-topbar{position:absolute;z-index:4;top:8px;left:62px;right:8px;height:44px;pointer-events:none}
/* AC589b round 2 (lead review): the row's slot is clipped at the stage top, which is the safe-area top
   (#online.story-mode pads by it): a strip sliding out (and the next one sliding in) passes behind that
   line and is never painted over the status bar / Dynamic Island band. Only the top edge clips. */
#run-topbar{clip-path:inset(-8px -40px -80px -80px)}
#run-topbar[hidden]{display:none}
#run-topbar .run-strip,#run-topbar #timeline{position:absolute;z-index:auto;top:0;left:0;transform:none;box-sizing:border-box;display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;height:44px;margin:0;padding:0 12px 0 11px;border:1px solid #d5b875;border-radius:22px;background:linear-gradient(#142e43f0,#19394fe6);box-shadow:0 2px 0 #0d2238,0 3px 8px #0d223840;overflow:visible;backface-visibility:hidden}
#run-topbar .run-strip.is-leaving{z-index:1}
#run-topbar .route-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;padding:0;font-size:8px;line-height:10px;font-weight:900;letter-spacing:.3px;color:#f4dfae;white-space:nowrap}
#run-topbar .route-label b{font-weight:900}
#run-topbar .run-chapter{display:block;font:12px/13px Lucky,sans-serif;letter-spacing:.2px;color:var(--gold-100);filter:drop-shadow(0 1px #0d2238)}
#run-topbar .run-chapter.is-return{color:#ffd59a}
#run-topbar .days-rail{height:38px;margin-top:2px}
#run-topbar .is-round{gap:9px;padding:0 14px 0 12px}
#run-topbar .is-round .route-label{padding-right:9px;border-right:1px solid #d5b87566}
#online.story-mode #run-topbar .run-round{display:block;margin:0;font:17px/24px Lucky,sans-serif;color:#fff;-webkit-text-stroke:2px var(--ink-navy);paint-order:stroke fill;filter:drop-shadow(0 2px var(--ink-navy));text-align:left;white-space:nowrap}
/* AC595: the scoped rule above wins over the legacy #round-label 8px margin.
   Keep line boxes stable and move only their ink using the loaded font metrics. */
#run-topbar .run-top-ink{display:block;transform-origin:50% 50%}
#run-topbar .run-top-baseline{display:inline-block;width:0;height:0;padding:0;margin:0;border:0;vertical-align:baseline}
#run-topbar .run-round::after{content:attr(data-widest);display:block;height:0;overflow:hidden;visibility:hidden}
/* The encounter (?) moves to the top right of the same row; run effects hang under the row in every state (AC598: story-events-ui.css). */
#online.story-mode #story-overlay .story-event-help{left:auto;right:4px;top:0}
.chapter-run-chip{display:none}

/* AC589c (build 127 feedback, "ustawić wysokość jako min/max połowę ale z minimalną wartością"):
   supersedes AC573's 45/43/41% stage. The Story / Chapters / Wizard run stage is 40% of the
   viewport, never below 250px and never above half of it (Compact 267px, Mini 325px, Pro 341px,
   Max 373px); the journal gains the difference. The atlas fit and actor zoom follow the canvas. */
#online.story-mode:is(.journey-view,.story-result) #world{height:clamp(250px,40dvh,50dvh)}
/* Extend only the scene's top edge behind the clock, without resizing the world. */
#world-top-edge{display:none}
#online.story-mode.journey-view #world-top-edge{display:block;position:absolute;left:0;bottom:100%;width:100%;height:var(--safe-top,env(safe-area-inset-top,0px));pointer-events:none}
/* AC806: a Tower fight hides its HUD in place (AC514 slot); the scene band covers the inset and that slot (height set by paintStoryTopEdge). */
#online.tower-view.tower-playing #world-top-edge{display:block;position:absolute;left:0;bottom:100%;width:100%;height:0;pointer-events:none}

/* AC587 (build 127 feedback, "Usuwamy tą belkę journal"): no FIELD JOURNAL bar; the sticky Day
   headers lead the journal, 4px under the skills bar. */
#online.journey-view #feed-heading{display:none}
#online.journey-view .story-journal #feed{padding-top:4px}
/* AC572 + AC587 (b128 integration): the stuck Day header also covers the feed's 4px top padding, so a
   scrolled card never peeks through above it. */
#online.journey-view .story-journal #feed .day-divider{box-shadow:0 4px 5px 1px #2b2b36,0 -4px 0 1px #2b2b36}
/* Visual polish (layout lane): a short journal sits on the action (oldest entry still on top, the slack above it,
   never a dead gap over the button); once the list scrolls, the edge under the stuck day header fades instead of
   slicing a card (is-scrolled: storyFeedEdge in story-ui.ts). */
#online.journey-view .story-journal #feed{display:flex;flex-direction:column}
#online.journey-view .story-journal #feed>:first-child{margin-top:auto}
#online.journey-view .story-journal #feed.is-scrolled{-webkit-mask-image:linear-gradient(#000 0 var(--journal-head,24px),#0000 var(--journal-head,24px) calc(var(--journal-head,24px) + 8px),#000 calc(var(--journal-head,24px) + 34px));mask-image:linear-gradient(#000 0 var(--journal-head,24px),#0000 var(--journal-head,24px) calc(var(--journal-head,24px) + 8px),#000 calc(var(--journal-head,24px) + 34px))}

/* Visual polish round 2, story lane (2026-10-27). One block so the lane merges without touching others. */
/* The Special trail keeps its facts on the slot and its explanation behind (?). */
.hub-view #story-overlay .story-special-help{position:absolute;top:8px;right:8px;pointer-events:auto}
.route-special-facts,.route-special-facts>span{display:inline-flex;align-items:center;gap:4px}
.route-special-facts{gap:12px}
.route-special-facts img{width:18px;height:18px;object-fit:contain}
/* #51: the first skill-draft page has no previous page; its Back keeps the slot but is not shown. */
#online .batch-draft .skill-draft-actions>.back-arrow.is-first{visibility:hidden}
/* #39: the closed skill chest waits in a fuller warm-gold spotlight (the AC695 warm variant, behind the subject only,
   no rays before it opens: AC640) with a few slow motes rising through it; nothing changes once it opens. */
.chest-reveal:not(.is-open) .chest-reveal-glow{width:400px;height:400px;margin:-200px 0 0 -200px;background:radial-gradient(circle,var(--spotlight-glow-core) 0%,var(--spotlight-glow-mid) 30%,var(--spotlight-glow-edge) 48%,transparent 70%)}
.chest-reveal-stage::before,.chest-reveal-stage::after{content:'';position:absolute;z-index:-1;left:50%;top:54%;width:260px;height:220px;margin:-150px 0 0 -130px;pointer-events:none;background:radial-gradient(circle at 18% 70%,#ffe7a6 0 2px,transparent 3px),radial-gradient(circle at 78% 62%,#fff4d0 0 2.5px,transparent 3.5px),radial-gradient(circle at 34% 30%,#ffd77a 0 1.5px,transparent 2.5px),radial-gradient(circle at 66% 22%,#ffe7a6 0 2px,transparent 3px);opacity:0;animation:r2-chest-motes 4.8s ease-in-out infinite}
.chest-reveal-stage::after{transform:scaleX(-1);animation-delay:-2.4s}
.chest-reveal.is-open .chest-reveal-stage::before,.chest-reveal.is-open .chest-reveal-stage::after{animation:none;opacity:0}
@keyframes r2-chest-motes{0%{opacity:0;translate:0 18px}30%,70%{opacity:.85}100%{opacity:0;translate:0 -26px}}
.chest-reveal.is-still .chest-reveal-stage::before,.chest-reveal.is-still .chest-reveal-stage::after{animation:none;opacity:.6;translate:none}
@media(prefers-reduced-motion:reduce){.chest-reveal-stage::before,.chest-reveal-stage::after{animation:none;opacity:.6}}
/* #79: the EXP amount is set at 10px on every phone instead of 7px (6.5px on Compact).
   Owner 2026-11-19 ("% zycia przeliczony na sercu"): the heart shows the life left as a percentage of max HP, centred on the
   heart art; the well keeps "135/220". */
#stats #hp-percent{left:-2px;width:34px;top:18px;bottom:auto;font-size:10px;line-height:12px;letter-spacing:-.4px;text-align:center;white-space:nowrap;pointer-events:none}
@media(max-width:375px){#stats #hp-percent{left:-3px;width:31px;top:19px;font-size:9px;line-height:11px}}
#stats #xp-value{font-size:10px;font-weight:900;letter-spacing:0}
/* #153: an XP-only reward card is one chip with the EXP star inside. */
#feed .log-entry.is-xp-only p:empty{display:none}
#feed .log-entry.is-xp-only .log-changes{margin-top:0}
#feed .journal-xp .journal-xp-icon{width:20px;height:20px;margin:-3px 5px -3px -4px;object-fit:contain}
/* #149: seven learned skills fit beside the Skills book on 375/393px phones (no gap, 42px slots); from eight on the
   strip keeps its contained horizontal scroll and fades out at the right edge instead of cutting an icon. */
#online.journey-view #skill-belt .learned-skills:has(>.learned:nth-child(7)){gap:0}
#online.journey-view #skill-belt .learned-skills:has(>.learned:nth-child(7))>.learned{width:42px;flex:none}
#online.journey-view #skill-belt .learned-skills:has(>.learned:nth-child(8)){-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 22px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 22px),#0000);padding-right:16px}
/* #1/#30: a short Field Journal still docks on the action, but the slack above it is the journal's own page: a soft
   parchment wash in the free space (shrinks to zero and is gone once the list scrolls), so no dead
   navy band reads as unfinished. The spacer is a flex item, so the cards never move. */
#online.journey-view .story-journal #feed::before{content:'';flex:1 1 0;min-height:0;border-radius:8px;background:linear-gradient(180deg,#ead8ad40,#d2b88318);box-shadow:inset 1px 0 #f6e9cc12,inset -1px 0 #15131a33;opacity:1}
#online.journey-view .story-journal #feed>:first-child{margin-top:0}
/* #225: the chapter card under the plaque is one compact row (Recommended | Your power | First clear) so it no longer
   covers the gate. The route title is already on the selected Chapter slot (and was hidden on short phones). A gate
   preview line or an unmet gate keeps its own row under it. */
/* AC921 (build 226 feedback, owner: "A tu coś się nie mieści, może warto to wydzielić"): the First clear rewards no
   longer share that row as a third, narrow cell (three rewards overflowed it): they get their own plate under the two
   power cells, the label on the left and the rewards beside it on one line, at every phone size and language. */
.story-act-plaque>.chapter-card:has(>.chapter-first){display:grid;grid-template-columns:minmax(0,1fr);row-gap:5px;align-items:stretch;padding:6px 8px}
.story-act-plaque>.chapter-card:has(>.chapter-first)>.chapter-route{display:none}
.story-act-plaque>.chapter-card>.chapter-first{flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center;gap:4px 10px;min-width:0;margin:0;padding:2px 8px;border-radius:9px;background:#0e1d2b8c}
.story-act-plaque>.chapter-card>.chapter-first>small{min-width:0;font:700 10px/1.2 system-ui;color:#d8e2e6;white-space:nowrap}
.story-act-plaque>.chapter-card>.chapter-first>.chapter-loot{flex:none}
.story-act-plaque>.chapter-card:has(>.chapter-first)>.chapter-preview{grid-column:1/-1;margin-top:0}
/* On short phones (Compact) a third row would push the hub panda's legs behind the stars pill: the rewards keep the
   row's third cell, which now hugs them (label over the rewards) while the two power cells share the rest. */
/* Owner 2026-11-21: the same one-row card up to 760px tall (a wide, short screen had the two-row card over the panda's
   head), with the short-phone cell sizes. */
@media(max-height:760px){
 .story-act-plaque>.chapter-card{top:calc(100% + 22px);padding:5px 10px 6px}
 .chapter-card .chapter-power>div{padding:2px 4px}
 .chapter-card .chapter-power .chapter-power-value{font-size:15px}
 .chapter-card .chapter-power .chapter-power-status{min-height:10px;font-size:9px;line-height:10px}
 .story-act-plaque>.chapter-card:has(>.chapter-first){grid-template-columns:minmax(0,1fr) auto;column-gap:6px;padding:5px 7px}
 .story-act-plaque>.chapter-card>.chapter-first{flex-direction:column;gap:2px;padding:3px 6px 4px}
 .story-act-plaque>.chapter-card>.chapter-first>.chapter-loot{gap:5px}
 .story-act-plaque>.chapter-card>.chapter-first .chapter-loot img{width:16px;height:16px}
 .story-act-plaque>.chapter-card>.chapter-first .chapter-loot b{font-size:15px}
}
/* #95: undiscovered creatures share the cream card family instead of a dark striped tile; AC780 (b170) draws the
   creature's silhouette there (`.ui-silhouette`) in place of the old muted "?". */
#modal .collection-enemy.locked{background:linear-gradient(#ece0c5,#dccdab);border-color:#ad9570;color:var(--text-on-cream)}
#modal .collection-enemy.locked small{color:var(--text-on-cream);font-weight:700}
#modal .collection-enemy.locked>div{position:relative}
/* Fallback "?" only for a creature with no art at all (collectionEnemyArt); the old .bestiary-unknown glyph is gone. */
#modal .collection-enemy.locked>div>span[aria-hidden]{position:absolute;inset:0;display:grid;place-items:center;font:26px/1 Lucky,sans-serif;color:#9a8261;filter:drop-shadow(0 1px #fff6e0)}
/* #96: the act reward card: rewards on the left, a found/total bar on the right (no rule line). */
#modal .bestiary-progress{position:relative;display:grid;place-items:center;width:96px;height:26px;overflow:hidden;border:2px solid #8d7650;border-radius:999px;background:#5f4a3340}
#modal .bestiary-progress>i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(#9be07a,#5fb04a)}
#modal .bestiary-progress>b{position:relative;font:15px/1 Lucky,sans-serif;color:#fff;-webkit-text-stroke:2px #3b2f27;paint-order:stroke fill}
/* #156: the claimed act reward tiles' counts are legible (12px Lucky, dark stroke). */
#modal .bestiary-reward .reward-claim-grid.is-compact.bestiary-reward-items .reward-tile-face .reward-tile-count{font:13px/1 Lucky,sans-serif;-webkit-text-stroke:2.5px var(--ink-brown);paint-order:stroke fill}
/* #93/#94: Journal → Story. Four fragment seals above the page (gold numerals for found pages, the current one raised;
   locked wells for missing ones); a found page leads with its own seal, the empty page with a large journal. */
#modal .fragment-seals{display:flex;justify-content:center;gap:10px;margin:14px 0 8px;padding:0;list-style:none}
#modal .fragment-seals>li{display:grid;place-items:center;width:44px;height:44px}
#modal .fragment-seals>li.is-locked{border:2px dashed #b19c77;border-radius:50%;background:#e8dbbd}
#modal .fragment-seals>li.is-locked .event-lock{transform:scale(.8)}
#modal .fragment-seal{display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:2px solid #8a5a1e;border-radius:50%;background:radial-gradient(circle at 40% 35%,#ffe9a3,#e3a83c 70%,#b9781f);box-shadow:inset 0 2px #fff4c8,0 2px 0 #5c3a12;color:#fff;font:17px/1 Lucky,sans-serif;-webkit-text-stroke:2.5px #6b3f0f;paint-order:stroke fill;cursor:pointer}
#modal .fragment-seal.is-current{transform:translateY(-2px);box-shadow:inset 0 2px #fff4c8,0 4px 0 #5c3a12,0 0 0 3px #ffe08a99}
/* Story journal Act I (owner 2026-11-21): eight entries in two rows of four; the current one is unmistakable;
   the card kicker replaces the large emblem; Act II shows only its lock in the act band. */
#modal .fragment-seals{flex-wrap:nowrap;justify-content:flex-start;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;margin:8px 0 4px;padding:6px 24px 8px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent)}
#modal .fragment-seals::-webkit-scrollbar{display:none}
#modal .fragment-seals>li{flex:0 0 auto;scroll-snap-align:center}
#modal .fragment-seal.is-current{background:radial-gradient(circle at 40% 35%,#fff6c9,#f6c24e 70%,#d08a22);box-shadow:inset 0 2px #fff4c8,0 4px 0 #5c3a12,0 0 0 3px #ffd24a}
#modal .lore-page .lore-kicker{font:800 11px/1.2 system-ui;letter-spacing:.08em;text-transform:uppercase;color:#8a6a45;margin-bottom:4px}
#modal .story-act-nav{position:relative;padding:0 80px}
#modal .story-act-locked{position:absolute;right:0;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px dashed #b19c77;border-radius:999px;background:#e8dbbd;font:800 10px/1.2 system-ui;letter-spacing:.06em;text-transform:uppercase;color:#8a6a45}
#modal .story-act-locked .event-lock{transform:scale(.7);margin:-4px}
#modal .lore-page.is-empty{min-height:220px;gap:4px}
#modal .lore-page.is-empty>img{width:96px;height:96px;margin-bottom:10px}
/* #21: the empty Gemstones view leads with its chest: 1.6x, on the warm-gold spotlight glow (behind the subject only,
   no rays: AC640/AC695), the group centred in the free space. */
#online .gemstone-empty>img{box-sizing:content-box;height:160px;max-height:26vh;padding:22px 34px;margin:-22px 0 -14px;background:radial-gradient(closest-side,#ffe7a0b3,#ffcf6a55 45%,#ffb64a14 75%,transparent)}
/* #26: the shared receipt band is a soft vertical gradient with glowing gold edges instead of hard orange rules.
   (The ribbon header belongs to the shared lane's unified modal header; counts keep AC235/AC237 placement.) */
.reward-claim-band{border-block:2px solid #f6b84c;background:radial-gradient(ellipse 55% 75% at 50% 55%,#ffd76a2e,#ffd76a00 70%),linear-gradient(#2a293d,#3a3853 50%,#2a293d);box-shadow:0 -6px 0 var(--panel-night),0 6px 0 var(--panel-night),0 -7px 16px #f2a33a73,0 7px 16px #f2a33a73}
/* #244: a receipt with a single reward makes it the subject: the tile is 1.35x (in layout, so the AC05 Tap hint still
   measures from its real edge) and always keeps its soft halo, centred on the larger face. */
.reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child{width:132px}
#modal .reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child .reward-tile-face{width:124px;height:124px;padding:17px;border-radius:18px}
.reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child .reward-tile-count{font-size:23px;right:7px;bottom:4px}
.reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child::before{top:62px;scale:1.3}
@media(max-height:700px){
 .reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child{width:112px}
 #modal .reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child .reward-tile-face{width:104px;height:104px;padding:14px}
 .reward-claim .reward-claim-grid:not(.is-compact)>.reward-tile:only-child::before{top:52px}
}
/* #105: the server code is set in the game's body font (bold, tabular figures), not a monospace terminal face. */
#modal .server-panel .account-id-value{font:800 15px/1.25 system-ui,-apple-system,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.03em}
/* #111: Training prices are coin chips (red while short) and the path bar is tall enough for its level label and
   milestone ticks. */
#online .training-step>strong.training-price{display:inline-flex;align-items:center;gap:3px;padding:2px 7px 2px 3px;border:1.5px solid #c9ad7b;border-radius:999px;background:#fff6dd;font:800 12px/1 system-ui;color:#3f7a2c;white-space:nowrap}
#online .training-step>strong.training-price img{width:16px;height:16px;object-fit:contain}
#online .training-step>strong.training-price.is-short{color:#b23a2a;border-color:#d9a08f}
#online .training-step.done>strong.training-price{background:none;border-color:transparent;color:#695e4e}
#online .training-progress{position:relative;height:16px;border-radius:9px}
#online .training-progress>.training-tick{position:absolute;top:2px;bottom:2px;width:2px;margin-left:-1px;border-radius:1px;background:#ffffff59;text-decoration:none}
#online .training-progress>.training-tick.is-done{background:#2f5a2259}
#online .training-progress>.training-progress-label{position:absolute;inset:0;display:grid;place-items:center;font:800 11px/1 system-ui;color:#fff;-webkit-text-stroke:2px #2b2430;paint-order:stroke fill;font-variant-numeric:tabular-nums}
/* #186: Training anchors the toast above the level list, clear of the profile header. */
#online.gear-view~#combat-power-change{top:var(--gear-power-y,44%)}
#online.training-view~#combat-power-change{top:var(--training-power-y,calc(var(--safe-top,env(safe-area-inset-top,0px)) + 140px))}
/* #126: the "Lucky! +25%" pill sits on the chest lid, below the scene's centre lantern, instead of covering it. */
.treasure-pop.lucky{bottom:calc(var(--chest)*.68)}
/* #215: the goal line above the mine grid stays readable: it paints over the dig hammer's swing (the fixed dig FX layer
   is z-index 25), so a top-row strike never covers "Uncover all 4 treasure tiles". */
#online .mining-hint{position:relative;z-index:26;border-radius:8px;background:#443443;box-shadow:0 0 0 3px #443443}
/* #237: the Home hero is grounded and lit: a contact shadow under his feet, a soft warm light behind him and a gentle
   periphery vignette on the painted scene (behind every Home control; night keeps its own hero filter). */
/* The vignette sits over the scene's animated art layer (z 0) and under every control (z 1+); its centre is clear. */
.home-scene::before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse 82% 78% at 50% 46%,#0000 56%,#0000003d)}
.home-scene:has([data-time="night"])::before{background:radial-gradient(ellipse 82% 78% at 50% 46%,#0000 56%,#00000052)}
.home-hero::after{content:'';position:absolute;z-index:-2;left:50%;top:52%;width:240%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;background:radial-gradient(closest-side,#fff3c066,#fff3c000);pointer-events:none}
.home-scene:has([data-time="night"]) .home-hero::after{background:radial-gradient(closest-side,#ffe7a833,#ffe7a800)}
/* #177 contact shadow (docs/VISUAL_STYLE.md 13): the shared soft core + falloff in the game ink, centred on the feet
   (--home-feet-x: 59.17% of the box for the red panda, its translateX anchor; 50% for the Giant Panda) with the paws in its middle; width 1.24 x the foot span
   (--home-feet: the paws' share of the box width, measured on frames), squash .2; smaller and fainter in the laugh hops. */
.home-hero{--home-feet:.62;--home-feet-x:59.17%}
.home-hero.is-form{--home-feet:.72;--home-feet-x:50%}
.home-hero::before{content:'';position:absolute;z-index:-1;left:var(--home-feet-x);bottom:1px;width:calc(var(--home-feet) * 124%);aspect-ratio:5;translate:-50% 50%;border-radius:50%;background:radial-gradient(closest-side,rgba(19,38,43,0.46),rgba(19,38,43,0.359) 45%,rgba(19,38,43,0.115) 80%,rgba(19,38,43,0)) center/58% 58% no-repeat,radial-gradient(closest-side,rgba(19,38,43,0.34),rgba(19,38,43,0.265) 45%,rgba(19,38,43,0.085) 80%,rgba(19,38,43,0));pointer-events:none}
.home-hero.is-laughing::before{animation:home-shadow-chuckle var(--laugh-ms,1250ms) linear both}
@keyframes home-shadow-chuckle{0%,17%,34%,51%,100%{scale:1;opacity:1}8%{scale:.84;opacity:.85}25%{scale:.86;opacity:.87}42%{scale:.9;opacity:.9}}
@media (prefers-reduced-motion:reduce){.home-hero.is-laughing::before{animation:none}}
/* #238: the painted scene fades into the dark action panel instead of ending in a hard edge. */
.home-scene::after{content:'';position:absolute;left:0;right:0;bottom:0;z-index:1;height:26px;pointer-events:none;background:linear-gradient(#37333e00,#37333ee6)}
/* #217: an avatar's copies progress ("0/5") is a corner chip at the tile's top right, never across the portrait's chin
   (the painted padlock stays on the bottom edge, AC197). */
#modal .avatar-choice .avatar-copies{left:auto;right:-5px;top:-5px;bottom:auto;transform:none;padding:2px 6px 1px;border:2px solid var(--ink-brown);border-radius:999px;background:var(--cream-250);color:var(--ink-brown);font:12px/1.1 Lucky,system-ui;box-shadow:0 2px 0 #00000040}
/* AC916 (b228): a head avatar this save does not own shows its Gems price on the tile's bottom edge (the plate of the
   copies badge); the tap opens the confirm sheet. The portrait stays in full colour: it is for sale, not locked. */
#modal .avatar-choice.is-priced{overflow:visible}
#modal .avatar-choice .avatar-price{position:absolute;z-index:5;left:50%;bottom:-7px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:4px;padding:2px 8px 1px 6px;border:2px solid var(--ink-brown);border-radius:999px;background:var(--cream-250);color:var(--ink-brown);font:13px/1.1 Lucky,system-ui;white-space:nowrap;box-shadow:0 2px 0 #00000040;pointer-events:none}
#modal .avatar-choice .avatar-price img{width:14px;height:14px;object-fit:contain;border-radius:0}
#modal .avatar-grid:has(.avatar-price){row-gap:12px;padding-bottom:6px}
#modal .avatar-buy .avatar-buy-art{display:block;width:120px;aspect-ratio:1}
#modal .avatar-buy .avatar-buy-art>img{width:100%;height:100%;object-fit:cover;border-radius:var(--vs-radius)}
#modal .avatar-buy .avatar-buy-art>.avatar-framed{width:100%;height:100%}
/* #234: the first weapon reveal: ribbon title, the sword on the cream warm-gold spotlight, a scale-in reveal. */
#modal .first-weapon>.first-weapon-ribbon{width:calc(100% - 68px);margin:2px 0 6px}
#modal .first-weapon>.first-weapon-ribbon h1{font-size:28px}
#modal .first-weapon-display{position:relative;isolation:isolate;overflow:visible;animation:r2-weapon-reveal .42s var(--ease-out) .14s both}
#modal .first-weapon-display>.skill-spotlight{left:50%;top:50%;width:250px;height:250px;margin:-125px 0 0 -125px;z-index:-1}
#modal .first-weapon-display>.skill-spotlight>*{animation-play-state:running}
#modal .first-weapon-display>img{position:relative}
#modal .first-weapon p{text-align:center}
@keyframes r2-weapon-reveal{from{opacity:0;transform:scale(.6)}62%{opacity:1;transform:scale(1.08)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#modal .first-weapon-display{animation:none}}
/* #52: the legacy Wizard draft's "Learn 2 skills" is the commit action, like the batch draft's Learn. */
:is(#online,#modal,#tabs) .secondary[data-action="story.wizardConfirm"]:not(:disabled){--small-top:var(--btn-commit-top);--small-bottom:var(--btn-commit-bottom);--small-edge:var(--btn-commit-edge);--small-lip:var(--btn-commit-lip);--small-shine:var(--btn-commit-shine)}
/* The Journal rules remain reachable by pointer and keyboard, not only assistive descriptions. */
#modal .collections-panel>h1{position:relative;padding-inline:44px}
#modal .collections-panel>h1>.help-button{position:absolute;right:0;top:50%;translate:0 -50%}
/* R2-STORY-END */

/* AC599 follow-up: a busy action keeps its label's accessible name and geometry; the loader replaces
   the visible label. AC624 (build 130 feedback): the only placement of the dots in a button, for Story
   Battle / Next Day / Continue (AC620), Retry safely (and the Moonleaf / Store / event commands it
   retries) and entry Start. AC620's old `left:12px;top:calc(50% - 9px)` outranked this rule's `inset:0`,
   so the ring was centred in the lower half of the face (≈11px low on a 66px Battle button). Now the
   row fills the button's padding box and flexbox centres it; like the label it then moves up half the
   plate's lip (AC631 --face-shift below), so the dots sit on the centre of the FACE, not the label's
   line box; dots are 21% of that box's height (≈19% of the button), gaps 15%. */
:is(#online,#modal,#error) button>.inline-loader{display:none}
:is(#online,#modal,#error) button:is(.is-loading,[aria-busy="true"]):has(>.inline-loader){position:relative}
:is(#online,#modal,#error) button:is(.is-loading,[aria-busy="true"]):has(>.inline-loader)>.button-label{opacity:0}
:is(#online,#modal,#error) button:is(.is-loading,[aria-busy="true"])>.inline-loader{display:flex;position:absolute;inset:0;z-index:1;width:auto;height:auto;margin:0;padding:0;border:0;transform:none;color:inherit;container-type:size}
:is(#online,#modal,#error) button:is(.is-loading,[aria-busy="true"])>.inline-loader>i{width:9px;height:9px;width:21cqh;height:21cqh}
:is(#online,#modal,#error) button:is(.is-loading,[aria-busy="true"])>.inline-loader>i+i{margin-left:6px;margin-left:15cqh}
/* The dots wear the label's ink outline, so they read on every face like the hidden label. */
:is(#online,#modal) button.primary{--busy-ring:var(--ink-navy);--busy-ring-w:2px}
:is(#online,#modal,#error) .secondary{--busy-ring:var(--small-edge,#3f302a);--busy-ring-w:1.5px}

/* AC631 (build 130 feedback, owner: "Znowu w pionie nie wyśrodkowane"; after AC595, AC607, AC612 and
   AC624 each centred one button). ONE vertical centre for every 3D button: the centre of its FACE, the
   visible top surface of the plate (the button itself for .primary, the full-size ::before for
   .secondary) minus the plate's border and the solid lip it paints inside its bottom edge. Plates are
   vertically symmetric in their box, so the face's centre sits exactly half a lip above the box's
   centre; --face-lip is the one lip token (it also draws the lip) and every direct content child (label,
   icon, cost / price row, busy dots; not the corner badges) moves up by half of it. Text is centred by its line box, which for
   Lucky is its cap band within 0.4% of an em (ascent 0.86, descent 0.25, caps 0.62), so no em-based
   lift and no per-screen nudge. A screen that changes a plate's lip sets --face-lip; padding stays
   symmetric (a lip is never compensated with padding). Check: b131-center-audit.mjs. */
:is(#online,#modal,#error) button:is(.primary,.secondary){--face-shift:calc(var(--face-lip,0px) / -2)}
:is(#online,#modal,#error) button:is(.primary,.secondary):not(.fishing-main)>:not(.attention-badge,.skip-rounds,[class*="spark"],[class*="shine"],[class*="glow"]){translate:0 var(--face-shift)}
/* A chest Draw button stacks its label over a price pill: the label's line box has air above its caps, the pill has none
   under it, so the group's ink (cap top to pill bottom) read 0.9px (375px) to 1.5px (393px) low on the face. Like the
   Blip Upgrade face (drone-ui.css), the group shifts 1px more than the lip shift. */
:is(#online,#modal,#error) button.chest-buy:has(>.button-label+.gemstone-price){--face-shift:calc(var(--face-lip,0px) / -2 - 1px)}
/* The Speed / Skip playback faces paint a 2px lip of their own. */
#online #playback button{--face-lip:2px}
/* A label that holds an icon or an icon + number group (Gem 500, Buy 500, Get shards, +5 Blip) is a flex
   row: an atomic inline in a block label sits on the baseline over the line's strut, which adds the
   font's descent under it and lifted the group 2-3px above the face's centre (AC631 Looks Buy). In the
   row every item is centred on one midline; the gap stands in for the collapsed space between copy and
   an icon. Screen rules that set their own display or alignment (Battling dots) still win. */
:is(#online,#modal,#error) button>.button-label:has(>:is(img,svg,picture,canvas,[class*="price"],[class*="cost"],[class*="icon"],[class*="badge"],[class*="art"])){display:flex;align-items:center;justify-content:center;column-gap:.25em}
/* Text sits on its cap band, not its line box: the engine floors a line's baseline to a whole pixel,
   which put labels up to 1.2px above the centre (Battle 27px, Retry 19px). Each run of button copy is
   trimmed to cap height and baseline, then padded back by half the difference on both sides, so the
   box keeps its line height and the capitals sit exactly in its middle. Browsers without text-box
   keep the line box (within about 1px). The Fishing reel (.fishing-main) keeps its own lettering. */
@supports (text-box:trim-both cap alphabetic){
 :is(#online,#modal,#error) button:is(.primary,.secondary):not(.fishing-main)>.button-label:not(:has(>*)),
 :is(#online,#modal,#error) button:is(.primary,.secondary):not(.fishing-main)>:is(.button-label,[class*="-cost"],[class*="-price"])>:is(b,span,small,strong,em):not(:has(*)),
 :is(#online,#modal,#error) button:is(.primary,.secondary):not(.fishing-main)>:is(b,span,small,strong,em):not(.button-label,.inline-loader,.attention-badge,.skip-rounds,:has(*)){text-box:trim-both cap alphabetic;padding-block:calc((1lh - 1cap) / 2)}
 /* R2 inventory README #173: a label over a filled price chip is one ink group. The chip reaches
    its row's edge, so retaining half-leading above the label biases the group's ink downwards.
    Trim the stacked label to its cap band; flex then centres that band + the existing price gap
    + the chip on the shared face. The shared .gem-chest-buy component paints this filled chip above;
    other .gemstone-price callers (Fishing, Enhance, Reroll) are unfilled and keep their leading.
    No local lift. */
 :is(#online,#modal) button.gem-chest-buy:is(.primary,.secondary)>.button-label:not(:has(>*)):has(+.gemstone-price){padding-block:0}
}
/* Build 194 (owner, on a review frame: "są obcięte teksty na btns"): a chest card with the AD slot clips its labels
   (they may wrap, so they hide overflow), and the cap-band trim above then cut the outline's foot and every descender
   ("Losuj 10", "Za darmo") in Chromium: the web game and the Android shell. The iOS-only reset further down already
   gave WebKit the full line box; every engine gets it now, with room for the outline and no change to the face. */
#online .gemstone-draw-actions.has-ad button.gem-chest-buy:is(.primary,.secondary)>.button-label:not(:has(>*)):has(+.gemstone-price){text-box:normal;padding:3px;margin:-3px}

/* AC619: taps on canvas actors and non-button controls share button semantics.
   The fixed viewport owns page scale; text sizing and contained panning stay intact. */
html,body{touch-action:pan-x pan-y}
body :is(button,a,input,select,textarea,label,[role="button"],[data-action],.home-hero){touch-action:manipulation}

/* AC621: the kind leads the whole card, then icon and body share a first line.
   Reward chips remain in the body column; level cards use the same unlabelled row. */
#online.journey-view #feed .log-entry{--journal-line:calc(17px * 1.38);display:grid;grid-template-columns:26px minmax(0,1fr);column-gap:10px;row-gap:3px;align-items:start}
#online.journey-view #feed .log-entry>h3,#online.journey-view #feed .log-entry:is(.good,.bad)>h3{grid-column:1/-1;margin:0}
#online.journey-view #feed .log-entry>.log-icon{margin:calc((var(--journal-line) - 26px)/2) 0 0}
#online.journey-view #feed .log-entry.is-rolling{--journal-line:18px}
#online.journey-view #feed .log-entry.just-revealed>h3{animation:journal-text-in .32s ease-out both}
@media(max-height:700px){#online.journey-view #feed .log-entry{--journal-line:calc(16px * 1.34)}#online.journey-view #feed .log-entry.is-rolling{--journal-line:18px}}

/* AC588 (build 127 feedback, "Skila nie może nachodzić na dół belki"): the skills bar holds every
   face inside it. The bar is 50px (3px bottom rule); the Skills face is 40px plus its 2px drop and
   is centred, so 2.5px of bar stays under the drop; its tap target stays 44px. */
#online.journey-view #skill-belt{height:50px;padding-top:0;padding-bottom:0;align-items:center}
#online.journey-view #skill-belt .book-shortcut{position:relative;height:40px;min-height:40px;padding:1px 2px 2px;gap:2px}
#online.journey-view #skill-belt .book-shortcut::before{content:'';position:absolute;inset:-4px -2px}
#online.journey-view #skill-belt .learned{height:44px}

/* AC589a (build 127 feedback): the Story / Chapters battle intro (story-ui.ts paintBattleIntro drives
   every transform per frame; CSS only lays it out). Two slanted banners clash over the stage's upper
   middle: the hero's cool blue one from his side, the opponent's red one from the other, each with its
   portrait and HP; then the first striker's stamp.
   b132 (owner, build 131: "nie jestem pewien czy te VS z lewej i prawej nie są za blisko", picked concept A;
   supersedes the b131 AC628 single band): Capybara Go-style STAGGERED banners. The hero's banner rides clearly
   higher (--bi-top) and the opponent's one --bi-off lower (0.88 of a banner height), so their bodies never overlap
   (AC628 "po środku na siebie się nakładają" still holds): their parallel slanted inner ends pass each other by
   --bi-pass at the centre line and only the tips cross, with an 8px slanted seam (AC859, build 198; 3px before) over the few rows they share,
   where the spark fires (--bi-spark-y). layoutBattleIntro sizes it per phone (px vars on .battle-intro): the lower
   banner's bottom stays on the b128 band bottom, so the actors' faces stay clear, and the hero's stamp fits above
   his banner under the top row. The CSS values below are only the fallback before that first layout.
   b131 AC625 ("Jak wraca to jest po drugiej stronie…"): a return round (.is-return) mirrors the layout, never the
   text: the hero's banner (still the higher one) on the right, the opponent's lower on the left, the seam
   slanting the other way. */
.battle-intro{position:absolute;z-index:3;inset:0;overflow:hidden;pointer-events:auto;--bi-h:64px;--bi-off:56px;--bi-top:72px;--bi-pass:11px;--bi-spark-y:132px;--bi-skew:-14deg}
.battle-intro.is-reduced{pointer-events:none}
/* AC589a round 3 (lead review): a slight dim. Full dim is 18% at the seam and caps at 28% toward the edges,
   so the ground and actors under the banners keep ≥ 72% of their luminance (Compact ground band 175 → ≥ 125). */
.battle-intro .bi-dim{position:absolute;inset:0;opacity:0;background:radial-gradient(ellipse 80% 70% at 50% 51%,#0a10202e,#0a102047 75%)}
.battle-intro .bi-band{position:absolute;height:var(--bi-h);will-change:transform}
.battle-intro .bi-band.is-hero{top:var(--bi-top);right:calc(50% - var(--bi-pass) / 2);width:calc(50% + var(--bi-pass) / 2 + 46px)}
.battle-intro .bi-band.is-enemy{top:calc(var(--bi-top) + var(--bi-off));left:calc(50% - var(--bi-pass) / 2);width:calc(50% + var(--bi-pass) / 2 + 46px)}
.battle-intro .bi-plate{position:absolute;inset:0;transform:skewX(var(--bi-skew));border-block:2px solid #141b33;box-shadow:inset 0 3px 0 #ffffff38,inset 0 -4px 0 #00000026,0 4px 0 #0b1024a0}
.battle-intro .is-hero .bi-plate{border-right:4px solid #bdf2ff;background:linear-gradient(90deg,#123a8f 0%,#1f62cf 46%,#2f93f0 78%,#5fd0ff 100%);border-radius:0 6px 6px 0}
.battle-intro .is-enemy .bi-plate{border-left:4px solid #ffd0d6;background:linear-gradient(270deg,#7d0f2b 0%,#c0213f 46%,#e63a55 78%,#ff6b7d 100%);border-radius:6px 0 0 6px}
/* Speed streaks inside each plate (static: the band's own travel makes them read as motion). */
.battle-intro .bi-plate::before{content:'';position:absolute;inset:14% 0;background:repeating-linear-gradient(180deg,#ffffff00 0 9px,#ffffff1f 9px 11px,#ffffff00 11px 23px);mask-image:linear-gradient(90deg,#000 0%,#0000 70%)}
.battle-intro .is-enemy .bi-plate::before{mask-image:linear-gradient(270deg,#000 0%,#0000 70%)}
.battle-intro .bi-content{position:absolute;inset:0;display:flex;align-items:center;gap:8px}
/* The portrait sits at the inner end, clear of the slanted edge (tan 14° of half its height) and the 4px rim. */
.battle-intro .bi-content{--bi-inner:calc(var(--bi-h) * .14 + 10px)}
.battle-intro .is-hero .bi-content{justify-content:flex-end;padding-right:var(--bi-inner)}
.battle-intro .is-enemy .bi-content{justify-content:flex-start;padding-left:var(--bi-inner)}
/* b131 AC625: the return round's mirrored layout (portraits stay at the seam, HP outward; text is never flipped). */
.battle-intro.is-return{--bi-skew:14deg}
.battle-intro.is-return .bi-band.is-hero{right:auto;left:calc(50% - var(--bi-pass) / 2)}
.battle-intro.is-return .bi-band.is-enemy{left:auto;right:calc(50% - var(--bi-pass) / 2)}
.battle-intro.is-return .is-hero .bi-plate{border-right:0;border-left:4px solid #bdf2ff;background:linear-gradient(270deg,#123a8f 0%,#1f62cf 46%,#2f93f0 78%,#5fd0ff 100%);border-radius:6px 0 0 6px}
.battle-intro.is-return .is-enemy .bi-plate{border-left:0;border-right:4px solid #ffd0d6;background:linear-gradient(90deg,#7d0f2b 0%,#c0213f 46%,#e63a55 78%,#ff6b7d 100%);border-radius:0 6px 6px 0}
.battle-intro.is-return .is-hero .bi-plate::before{mask-image:linear-gradient(270deg,#000 0%,#0000 70%)}
.battle-intro.is-return .is-enemy .bi-plate::before{mask-image:linear-gradient(90deg,#000 0%,#0000 70%)}
.battle-intro.is-return .is-hero .bi-content{flex-direction:row-reverse;justify-content:flex-end;padding-right:0;padding-left:var(--bi-inner)}
.battle-intro.is-return .is-enemy .bi-content{flex-direction:row-reverse;justify-content:flex-start;padding-left:0;padding-right:var(--bi-inner)}
.battle-intro .bi-portrait{position:relative;flex:none;display:grid;place-items:center;width:calc(var(--bi-h) - 6px);height:calc(var(--bi-h) - 6px);will-change:transform}
.battle-intro .bi-portrait.is-hero .avatar-framed{position:relative;display:block;width:100%;height:100%;border-radius:7%;background:none;filter:drop-shadow(0 3px 0 #141b33)}
.battle-intro .bi-portrait.is-hero .avatar-framed>img{position:absolute;display:block;margin:0;padding:0;border:0;box-shadow:none;background:none}
.battle-intro .bi-portrait.is-hero .avatar-portrait{inset:var(--avatar-inset);width:calc(100% - 2 * var(--avatar-inset));height:calc(100% - 2 * var(--avatar-inset));object-fit:cover;border-radius:4%}
.battle-intro .bi-portrait.is-hero .avatar-framed.is-default .avatar-portrait{object-fit:contain;object-position:50% 85%}
.battle-intro .bi-portrait.is-hero .avatar-frame{inset:0;width:100%;height:100%}
.battle-intro .bi-portrait.is-enemy{box-sizing:border-box;border:3px solid #241526;border-radius:14px;background:radial-gradient(circle at 50% 40%,var(--paper) 0%,#f3dcb4 60%,#d9b98a 100%);box-shadow:inset 0 2px 0 #fff8,inset 0 0 0 2px #e9c5a0,0 3px 0 #1a0d1c;overflow:hidden}
.battle-intro .bi-portrait.is-enemy svg{width:86%;height:86%}
.battle-intro .bi-hp{display:inline-flex;align-items:center;gap:3px;align-self:flex-end;margin-bottom:9px;font:22px/1 Lucky,sans-serif;color:#fff;-webkit-text-stroke:3px #141b33;paint-order:stroke fill;filter:drop-shadow(0 2px #141b33);white-space:nowrap}
.battle-intro .bi-heart{width:24px;height:24px;object-fit:contain;filter:drop-shadow(0 2px 0 #141b33)}
/* b132: the clash fires where the tips cross (--bi-spark-y, the rows the two banners share): a slanted streak along the
   seam, a white-gold burst, a four-point star glint and 12 sparks. */
.battle-intro .bi-seam{position:absolute;left:50%;top:var(--bi-spark-y);width:6px;height:calc(var(--bi-h) * 1.25);border-radius:3px;background:linear-gradient(#fff0,#fff 25%,#fff 75%,#fff0);box-shadow:0 0 12px #fff,0 0 24px #9fe6ff;opacity:0}
.battle-intro .bi-flash{position:absolute;left:50%;top:var(--bi-spark-y);width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,#fff 0%,var(--gold-50) 30%,#ffd76b80 55%,#ffd76b00 72%);opacity:0}
.battle-intro .bi-star{position:absolute;left:50%;top:var(--bi-spark-y);width:84px;height:84px;background:radial-gradient(circle,#fff 0%,#fff 16%,#fff1a0 34%,#ffc93a 58%,#ff9f1a 80%);clip-path:polygon(50% 0,55.5% 44.5%,100% 50%,55.5% 55.5%,50% 100%,44.5% 55.5%,0 50%,44.5% 44.5%);opacity:0}
.battle-intro .bi-sparks{position:absolute;left:50%;top:var(--bi-spark-y);width:0;height:0}
.battle-intro .bi-sparks i{position:absolute;left:-7px;top:-2px;width:14px;height:4px;border-radius:2px;background:linear-gradient(90deg,#fff0,#fff 40%,var(--honey-300));box-shadow:0 0 6px var(--honey-300);opacity:0;transform-origin:50% 50%}
/* AC589a round 2 (lead review): one stamp system for both strikers. The stamp is a child of the striker's
   banner and sits on its top edge (4px overlap), anchored to that banner's outer screen edge: the hero's
   at the left gutter, the opponent's right-aligned at the right gutter, so it never crosses an actor or
   a portrait and leaves with its banner. layoutBattleIntro places it (12px gutter) and fits its pop;
   it scales about its centre. Hero: yellow fill; opponent: orange-red fill; same dark outline. */
.battle-intro .bi-stamp{position:absolute;bottom:calc(100% - 4px);left:0;display:flex;align-items:center;gap:6px;opacity:0;transform-origin:50% 50%;white-space:nowrap;pointer-events:none}
.battle-intro .bi-stamp b{font:30px/1.1 Lucky,sans-serif;color:#ffe45a;-webkit-text-stroke:5px #1b1530;paint-order:stroke fill;filter:drop-shadow(0 3px #1b1530) drop-shadow(0 0 14px #ffcf4a80);letter-spacing:.2px}
.battle-intro .bi-stamp.is-enemy b{color:#ff8f4a;filter:drop-shadow(0 3px #1b1530) drop-shadow(0 0 14px #ff3d3d99)}
.battle-intro .bi-chevrons{display:inline-flex;opacity:0}
.battle-intro .bi-chevrons svg{display:block;width:30px;height:28px;overflow:visible}
.battle-intro .bi-chevrons g{fill:none;stroke-linecap:round;stroke-linejoin:round}
.battle-intro .bi-chev-edge{stroke:#1b1530;stroke-width:8}
.battle-intro .bi-chev-fill{stroke:#ffe45a;stroke-width:4}
.battle-intro .bi-stamp.points-left .bi-chevrons svg{transform:scaleX(-1)}
.battle-intro .bi-stamp.is-enemy .bi-chev-fill{stroke:#ff8f4a}
/* AC589a round 3 (lead review): CJK stamps in a heavy face beside the Lucky Latin ones (Lucky has no CJK, so the
   system fallback was a regular weight). ja: Hiragino Sans W8 with proportional kana (palt); zh-Hans: PingFang SC's
   heaviest cut (Semibold) or a heavier fallback; ko: Apple SD Gothic Neo ExtraBold. Same size, outline and glow. */
.battle-intro .bi-stamp b:lang(ja){font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;font-weight:800;font-feature-settings:"palt"}
.battle-intro .bi-stamp b:lang(zh){font-family:"PingFang SC","Hiragino Sans GB","Noto Sans SC",sans-serif;font-weight:900}
.battle-intro .bi-stamp b:lang(ko){font-family:"Apple SD Gothic Neo","Noto Sans KR",sans-serif;font-weight:800}
@media(max-width:380px){.battle-intro .bi-stamp b{font-size:26px}.battle-intro .bi-hp{font-size:19px}.battle-intro .bi-heart{width:21px;height:21px}}
/* Reduced motion: the stamp text alone, centred on the stage, still. */
.battle-intro.is-reduced .bi-stamp{position:absolute;bottom:auto;top:51%;left:50%!important;transform:translate(-50%,-50%)!important;opacity:1}
.battle-intro.is-reduced .bi-chevrons{opacity:1}

/* AC600: the stationary cell owns its only rim. Moving stone and flying shards
   are rimless, clipped inside it, so squash/shake never paints a second edge. */
.miner-view .dig-grid .tile{box-shadow:0 2px #1b1724}
.miner-view .dig-grid .tile:not(:focus-visible){outline:0}
.miner-view .dig-grid .tile.scan{border-color:#b7e886}
.miner-view .dig-grid .tile.queued:not(.opened){border-color:#ffe2a1;box-shadow:0 0 10px #ffd26688}
.miner-view .dig-grid .tile.is-digging>.stone-face{visibility:hidden}
.miner-dig-fx .miner-dig-rock{inset:2px;border-radius:8px;overflow:hidden}
.miner-dig-fx .miner-dig-cover{border:0;box-shadow:none}
/* AC609: Koi's transparent source margin is 6px at each side of 256px.
   Fill the same frame width as the other choices, without a cream backing. */
:is(#modal,#profile) .avatar-framed[data-frame=golden-koi] .avatar-frame{transform:scale(1.04918)}
/* AC651: every frame aperture stays transparent; the portrait alone supplies its art.
   Keep the selection rim/check, never a painted backing under the frame. */
#modal .avatar-choice:has(.avatar-framed){background:none}
/* AC607/AC612: raise the whole icon/letter group together. Trim the copy to
   its cap band instead of aligning a padded bitmap to Lucky's line box. */
:is(#online,#modal) .button-label>.ui-icon-label{display:flex;align-items:center;justify-content:center;gap:4px;line-height:1}
.ui-icon-copy{display:block;text-box:trim-both cap alphabetic;white-space:nowrap}
.ui-icon-art{display:flex;align-items:center;justify-content:center;flex:none}
.ui-icon-art img{display:block;object-fit:contain}
.ui-icon-art .drone-core-inline{margin:0;vertical-align:initial}
/* Completed finds keep a soft ready glow around the same single rim. */
.miner-view .dig-grid .tile.treasure-ready:after{box-shadow:0 0 22px #ffe487}
.miner-view .dig-grid .treasure-whole{box-shadow:0 0 14px #ffd46acc}
.miner-view .dig-grid .treasure-whole:after{box-shadow:0 0 24px #ffe487}
/* AC695 owner follow-up: the shared celebration uses the exact skill-selection spotlight classes.
   Keep AC640's subject-owned birth and the surface clip; no light on Defeat. */
/* Cream surfaces share a warm-gold palette; geometry, fade and motion stay identical to the dark spotlight. */
.celebration-on-cream{--spotlight-ray:#f0b85a66;--spotlight-glow-core:#ffd27a8c;--spotlight-glow-mid:#ffd27a4d;--spotlight-glow-edge:#f0b85a1f;--spotlight-twinkle:#e7ae46}
.victory-aura[data-lb=on]>.victory-glow,.victory-aura[data-lb=on]>.victory-rays,.defeat-celebration .victory-aura>.victory-glow,.defeat-celebration .victory-aura>.victory-rays,
.reward-hero-spotlight[data-lb=on]>.reward-hero-glow,.reward-hero-spotlight[data-lb=on]>.reward-hero-rays{display:none}
/* In result dialogs the light waits for the portrait's entry (AC640). */
#modal .victory-aura{--lb-blend:normal;--lb-size:190%;--lb-delay:.4s}
.light-burst{position:absolute;left:50%;top:50%;z-index:0;width:var(--lb-size,170%);aspect-ratio:1;translate:-50% -50%;pointer-events:none;mix-blend-mode:var(--lb-blend,normal);opacity:0}
.light-burst.is-born{animation:lb-born .7s var(--ease-out) var(--lb-delay,.32s) both}
.light-burst.is-manual{opacity:1}
/* Scale the reference's 228px-disc twinkles with the subject-sized disc. All paint/motion comes from
   .skill-spotlight-* above (including AC558's shared soft mask). Hide superseded outer decorations. */
.light-burst>.skill-spotlight-star{width:5.702%;height:7.456%}
.light-burst>.skill-spotlight-star:nth-of-type(2){width:4.386%;height:6.140%}
.light-burst>.skill-spotlight-star:nth-of-type(3){width:3.509%;height:4.825%}
.light-burst>.skill-spotlight-star:nth-of-type(4){width:3.947%;height:5.263%}
.victory-aura>.victory-star,.unlock-reveal .reward-claim-stars i,.reward-claim.has-hero .reward-claim-stars i,.reward-hero-star{display:none}
@keyframes lb-born{from{opacity:0;transform:scale(.3)}55%{opacity:1;transform:scale(1.08)}to{opacity:1;transform:none}}
.light-burst.is-still,.light-burst.is-still *,.light-burst.is-still .skill-spotlight-rays::before{animation:none!important}.light-burst.is-still{opacity:1}
@media(prefers-reduced-motion:reduce){.light-burst,.light-burst *{animation:none!important}.light-burst{opacity:1}}
body:has(#modal[open]) #content .light-burst *{animation-play-state:paused}
/* The light never adds scroll or overflow (lead, 2026-10-20): it lives in a clip layer equal to its owner's padding box
   (ui-components.ts uiLbClipFor / uiLightBurstFit), behind the owner's content, sized to fade out before the clip edge. */
.lb-clip{position:absolute;inset:0;overflow:hidden;overflow:clip;pointer-events:none}
.lb-clip.is-layer{z-index:-1;border-radius:inherit}
.lb-clip-owner{isolation:isolate}
.light-burst.is-clipped{z-index:auto}

/* AC640 rays follow their subject. Entry owns opacity/scale; the nested ray layer owns spin.
   Merge b132: every .victory-aura / .reward-hero-spotlight that the shared light burst upgraded (data-lb=on;
   data-lb=none on Defeat) is born by the component itself (--lb-delay / uiLightBurstBorn, after its subject), so
   these host entries apply only to a host the component has not upgraded; the light never grows twice. */
@keyframes ac640-light-in{from{opacity:0;scale:.3}to{opacity:var(--ac640-opacity,1);scale:1}}
.victory-hero>.victory-aura:not([data-lb]),.rankup-celebration .victory-aura:not([data-lb]),.discovery-art:before,.discovery-art>.discovery-rays{animation:ac640-light-in 400ms ease-out both}
.discovery-art>.discovery-rays{animation:ac640-light-in 400ms ease-out both,skill-spotlight-turn 44s linear 400ms infinite}
/* b132 merge: the aura box stays the section's own (it clips, so the draw sheet never scrolls sideways on Compact);
   its rays and glow are centred on the first revealed tile and the entry scales about that tile. */
.draw-reveal .gem-results-aura{transform-origin:var(--ray-x,50%) var(--ray-y,50%);opacity:0}
.draw-reveal .gem-results-aura::before,.draw-reveal .gem-results-aura::after{inset:auto;left:var(--ray-x,50%);top:var(--ray-y,50%);width:var(--ray-size,300px);height:var(--ray-size,300px);translate:-50% -50%}
.draw-reveal .gem-results-aura::after{width:calc(var(--ray-size,300px) * .76);height:calc(var(--ray-size,300px) * .76)}
.draw-reveal:has(.gem-reveal.is-revealed) .gem-results-aura{animation:ac640-light-in 400ms ease-out both;opacity:1}
.chest-reveal:not(.is-open) .chest-reveal-rays{visibility:hidden}
@media(prefers-reduced-motion:reduce){
 .victory-hero>.victory-aura:not([data-lb]),.rankup-celebration .victory-aura:not([data-lb]),.discovery-art:before,.discovery-art>.discovery-rays{animation:none;opacity:1;scale:1}
 .draw-reveal.is-ready .gem-results-aura{animation:none;opacity:1}
}

/* The turn follows the 400 ms birth, independently of its scale/fade. */
.victory-hero .victory-aura:not([data-lb])>.victory-rays,.rankup-celebration .victory-aura:not([data-lb])>.victory-rays{animation-delay:400ms}
.unlock-reveal .victory-aura:not([data-lb])>.victory-rays{animation-delay:880ms}
.draw-reveal .gem-results-aura::before{animation:none}
.draw-reveal:has(.gem-reveal.is-revealed) .gem-results-aura::before{animation:gem-rays 24s linear 400ms infinite}
.reward-claim.has-hero .reward-hero-spotlight:not([data-lb])>.reward-hero-rays::before{animation-delay:calc(1280ms + var(--i,0) * 220ms)}
.chest-reveal-rays:before{animation:none}
.chest-reveal.is-open .chest-reveal-rays:before{animation:skill-spotlight-turn 18s linear 450ms infinite}
@media(prefers-reduced-motion:reduce){.draw-reveal .gem-results-aura::before,.chest-reveal.is-open .chest-reveal-rays:before{animation:none!important}}

.chest-reveal.is-still.is-open .chest-reveal-rays:before{animation:none}
/* AC647: the same reveal remains mounted beneath an independent item detail. */
#modal .gemstone-result-overlay{position:absolute;z-index:20;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:#171020b3;isolation:isolate}
/* Visual polish (bugs lane): the reveal's Free draw / Again row peeked out under the stone's popup through a
   light dim. The popup sheet now sits on the opening reveal's deep blurred scrim, so the row behind recedes. */
#modal .gemstone-result-overlay{background:#100e18e0;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
#modal .gemstone-result-overlay .gemstone-result-detail{display:flex;flex-direction:column;align-items:center;gap:16px;width:min(340px,100%);padding:24px 16px;background:linear-gradient(var(--cream-200),#eed7aa);border:3px solid var(--vs-ink,#211929);border-radius:22px;box-shadow:0 5px #100c1a;max-height:100%;overflow:hidden}
#modal .gemstone-result-overlay .gemstone-result-detail h1{align-self:stretch;font-size:28px;text-align:center;margin:0}
#modal .gemstone-result-overlay .gemstone-detail-art{width:164px;height:164px;margin:0;display:grid;place-items:center;border-radius:18px}
#modal .gemstone-result-overlay .gemstone-detail-art>img{width:140px;height:140px;object-fit:contain}
#modal .gemstone-result-overlay .gemstone-detail-bonus{align-self:center;text-align:center;font:28px/1.2 Lucky,system-ui;color:#3c2947}
#modal .gemstone-result-overlay button{width:100%;margin:0;min-height:48px}
/* AC649: a shared portrait overlay, independent of the chosen frame artwork. */
.avatar-framed.avatar-shiny{isolation:isolate}
.avatar-framed.avatar-shiny::after{content:'';position:absolute;z-index:3;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 2px var(--honey-300),inset 0 0 0 3px #a86d25;pointer-events:none}
.avatar-framed.avatar-shiny::before{content:'';position:absolute;z-index:2;inset:5%;border-radius:inherit;background:linear-gradient(110deg,transparent 30%,#fff9d999 47%,#ffffffc9 50%,transparent 67%) -180% 0/260% 100% no-repeat;pointer-events:none;animation:avatar-owned-shine 4s ease-in-out infinite}
@keyframes avatar-owned-shine{0%,55%{background-position:180% 0}85%,100%{background-position:-180% 0}}
.avatar-choice .avatar-copies{position:absolute;z-index:5;left:50%;bottom:2px;transform:translateX(-50%);padding:2px 6px;border:1px solid #3a2630;border-radius:8px;background:#2d2039;color:#ffe49b;font:12px/1.1 Lucky,system-ui;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.avatar-framed.avatar-shiny::before{animation:none;background-position:45% 0;opacity:.35}}
/* Owner 2026-11-21 ("fajnie jakby się błyszczała"): a shining frame (the Founder frame only; the guild frames never shine, owner 2026-11-21) gets a soft
   light sweep every 5 s, masked to the frame art (`--frame-mask`, set by framedAvatar) so only the frame shines, never
   the portrait. A foreground sheen, not a backing (AC651). None with reduced motion. */
.avatar-frame-shine{isolation:isolate}
.avatar-frame-shine::before{content:'';position:absolute;z-index:3;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 40%,#fff8dccc 50%,transparent 60%) 100% 0/250% 100% no-repeat;-webkit-mask:var(--frame-mask) center/100% 100% no-repeat;mask:var(--frame-mask) center/100% 100% no-repeat;animation:avatar-frame-shine 5s ease-in-out infinite}
@keyframes avatar-frame-shine{0%,60%{background-position:100% 0}95%,100%{background-position:0 0}}
@media(prefers-reduced-motion:reduce){.avatar-frame-shine::before{animation:none;display:none}}

/* AC657: fixed controls for revisiting local batches; all content uses the shared face tokens. */
#online .batch-draft .skill-draft-actions>button{flex:1;min-width:0!important;width:auto;margin:0}
#online .batch-draft .skill-draft-actions>.back-arrow{flex:0 0 54px}
/* b170 AC772 review: Refresh/Learn share the row with the 54px Back slot. Narrow side padding keeps "Odśwież (3)",
   "Refresh (3)" and "새로고침 (3)" on one line at the full 24px face from Compact (375px) up; no font shrink. */
#online .batch-draft .skill-draft-actions>button.secondary{padding-inline:6px}
#online .batch-draft .skill-draft-actions>button.secondary>.button-label{white-space:nowrap}

/* b145 AC693/AC694: names above their own slanted plates; Arena shares the clash painter. */
.battle-intro .bi-name{position:absolute;bottom:calc(100% + 6px);max-width:calc(50vw - 30px);font:18px/1.1 Lucky,sans-serif;color:var(--cream-300);-webkit-text-stroke:3px #1b1530;paint-order:stroke fill;filter:drop-shadow(0 2px #1b1530);white-space:nowrap}
.battle-intro .is-enemy .bi-name{right:58px}
.battle-intro.is-return .is-enemy .bi-name{right:auto;left:58px}
.battle-intro .is-enemy .bi-stamp{bottom:calc(100% + 30px)}
.battle-intro.is-reduced>.bi-name{left:50%;bottom:auto;top:calc(51% + 32px);transform:translateX(-50%);max-width:calc(100% - 24px)}
.battle-intro.is-arena .is-hero .bi-name{left:58px}
/* Visual polish r2 #168/#184/#211 (arena lane): a name never floats over the scenery; it sits on a dark plate
   attached to its banner's top edge (Story, Tower and Arena share the plate component, AC693). */
.battle-intro .bi-band>.bi-name{bottom:calc(100% - 2px);padding:4px 10px 3px;border:2px solid #141b33;border-bottom:0;border-radius:9px 9px 0 0;background:linear-gradient(#2c2542f5,#1b1530f5);font-size:17px;-webkit-text-stroke:2.5px #1b1530;filter:none}
.battle-intro .bi-band.is-enemy>.bi-name{box-shadow:inset 0 2px #ff6b7d66}
.battle-intro .bi-band.is-hero>.bi-name{box-shadow:inset 0 2px #5fd0ff66}
.battle-intro.is-arena .bi-portrait{box-sizing:border-box;border:3px solid #241526;border-radius:var(--vs-radius);background:radial-gradient(circle at 50% 40%,var(--paper),#e4c28d);overflow:hidden;box-shadow:0 3px #1a0d1c}
.battle-intro.is-arena .bi-portrait .arena-avatar{display:block;width:90%;height:94%}
.battle-intro.is-arena .bi-power{font-size:22px}
.battle-intro.is-arena .bi-npc{position:absolute;right:58px;top:5px;font-size:10px}
.battle-intro.is-arena .bi-arena-mark{left:50%;top:calc(var(--bi-top) - 70px);bottom:auto;font:48px/1 Lucky,sans-serif;color:#ffe45a;-webkit-text-stroke:5px #1b1530;paint-order:stroke fill;filter:drop-shadow(0 4px #1b1530);transform-origin:50% 50%}
.battle-intro.is-arena.is-reduced .bi-arena-mark{top:calc(var(--bi-top) - 70px);transform:translateX(-50%)!important}
.battle-intro.is-arena.is-reduced :is(.bi-seam,.bi-flash,.bi-star,.bi-sparks){display:none}
@media(max-width:380px){.battle-intro .bi-name{font-size:16px}.battle-intro.is-arena .bi-power{font-size:19px}}
/* Story motion pass SM5: the clash's boss variant (a boss or miniboss; story-ui.ts BI_BOSS / BI_WAVE). The opponent's
   name takes the stage label's gold and its plate a gold inner edge; a boss arriving as a later wave shows this banner
   alone, over the fight, without taking taps. Motion is the painter's (transform and opacity only). */
.battle-intro.is-boss .bi-band.is-enemy>.bi-name,.battle-intro.is-boss.is-reduced>.bi-name{color:#ffd76a}
.battle-intro.is-boss .bi-band.is-enemy>.bi-name{box-shadow:inset 0 2px #ffd76acc}
.battle-intro.is-boss .is-enemy .bi-plate{border-left-color:#ffd76a}
.battle-intro.is-boss.is-return .is-enemy .bi-plate{border-right-color:#ffd76a}
.battle-intro.is-wave{pointer-events:none}
/* During the VS hold, the plates own the names/stats; the duel vitals return when the intro leaves. */
#online.arena-playing #story-overlay:has(>.battle-intro) .duel-hud{visibility:hidden}

/* Home hides the tab bar during an active run; its actions still need the home-indicator inset. */
html[data-native-platform="android"] .home-view#online:has(#tabs:empty){padding-bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px))}
/* b148 AC705: the Training Path's next-level preview on the stat it changes (numbers only). */
.equipment-stat-row>div.is-next{background:#6f8a4f;border-color:#b7d58c}
.equipment-stat-row .stat-next{font-style:normal;color:#e9ffb8;white-space:nowrap}
/* b148 2× gold weekend: one compact chip above Fast Travel / AFK (×2 and the time left; the rules are behind it). */
.home-actions{position:relative}
.gold-event-chip{position:absolute;z-index:2;left:50%;top:-14px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:2px 10px 2px 4px;border:2px solid #6b3a0e;border-radius:14px;background:linear-gradient(#ffe27a,#f2a531);color:#3b1f0a;box-shadow:0 2px 0 #6b3a0e;font:800 11px/1 system-ui,sans-serif;white-space:nowrap}
.gold-event-chip img{width:20px;height:20px;object-fit:contain}
.gold-event-chip b{font:16px/1 Lucky}
[data-gold-bonus="true"]{position:relative}
[data-gold-bonus="true"]>.gold-bonus-badge{position:absolute;z-index:2;right:2px;top:-9px;display:grid;place-items:center;min-width:31px;height:24px;padding:0 4px;border:2px solid #633711;border-radius:999px;background:linear-gradient(#fff2a8,#efa323);box-shadow:inset 0 1px #fff9,0 2px #5b320d;color:#4a2309;font:16px/1 Lucky;-webkit-text-stroke:0;text-shadow:none;pointer-events:none}
#online .arena-fight>.gold-bonus-badge{top:-16px}
#modal .gold-weekend-card{position:relative;display:grid;justify-items:center;gap:10px;padding-top:12px;text-align:center}
#modal:has(.gold-weekend-card){overflow:visible;isolation:isolate;background:transparent;border-color:transparent;box-shadow:none}
#modal:has(.gold-weekend-card)::before{content:"";position:absolute;inset:-3px;z-index:-1;border:3px solid #bd9a5d;border-radius:23px;background:linear-gradient(var(--cream-200),#e7cda0);pointer-events:none}
#modal .gold-weekend-card header{display:flex;align-items:center;gap:8px;width:100%}
#modal .gold-weekend-card header h1{flex:1;margin:0;text-align:center}
/* AC774: the hero peeks from behind the card (owner-picked art, game/art/gold-event-v2/README.md). The two layers and
   the sparkles share one registered box: its anchor is the head centre (43.827% of the art width) on the card centre
   and the body's straight cut (art row 249 of 273) on the top edge of the card border, which is 15px (#modal border
   and padding) above this section. The body layer is behind the card and runs 4 art rows (2.1px) under the border's
   top edge, hidden by the opaque border, so no subpixel offset leaves a seam; the gripping paw is drawn over it.
   The box has a fixed size, so nothing moves while the art loads (AC768). */
#modal .gold-weekend-panda{position:absolute;top:-15px;left:50%;width:212px;height:calc(212px*273/405);transform:translate(-43.827%,-91.209%);pointer-events:none}
#modal .gold-weekend-panda-back{z-index:-2}
#modal .gold-weekend-panda-paws{z-index:2}
/* Two four-point sparkles at the coin's upper-right rim twinkle in place (scale and opacity, staggered); still under
   reduced motion. */
#modal .gold-weekend-sparkles{z-index:2}
#modal .gold-weekend-sparkles>i{position:absolute;left:87.16%;top:40.11%;width:16px;height:16px;margin:-8px 0 0 -8px;background:radial-gradient(circle,#fffbe6 0,#ffe066 26%,#f5b51f 58%);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);animation:skill-spotlight-twinkle 2.6s ease-in-out infinite}
#modal .gold-weekend-sparkles>i+i{left:91.85%;top:47.8%;width:10px;height:10px;margin:-5px 0 0 -5px;animation-delay:-1.3s}
@media(prefers-reduced-motion:reduce){#modal .gold-weekend-sparkles>i{animation:none;opacity:.9;transform:none}}
#modal .gold-weekend-card>button{width:100%}
/* AC774 (b170): one row per element, nothing overlaps: title, the reward (coin ×2 at the size of a reward tile),
   the shared one-line timer and the CTA. Fixed rows keep the card still while the timer ticks (AC768). */
#modal .gold-weekend-card{grid-template-rows:44px 58px 30px auto;gap:12px;align-items:center}
#modal .gold-weekend-coin{display:flex;align-items:center;justify-content:center;gap:6px;height:54px;box-sizing:border-box;padding:0 16px 0 7px;border:2px solid #c5903e;border-radius:999px;background:linear-gradient(#fff3c6,#f3cb76);box-shadow:inset 0 2px #fff9,0 2px #a47739}
#modal .gold-weekend-coin img{width:40px;height:40px;object-fit:contain}
#modal .gold-weekend-coin b{font:26px/1 Lucky;color:#ffd75e;-webkit-text-stroke:2px #6b3a0e;paint-order:stroke fill}
/* The title centres on the card: the (?) column is mirrored by an empty one. */
#modal .gold-weekend-card header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:4px}
#modal .gold-weekend-card header h1{grid-column:2}
#modal .gold-weekend-timer{min-width:10.5em;justify-content:center}
.moonleaf-week .is-gold-weekend{box-shadow:inset 0 -4px #efa62a}
/* AC730: stack the complete numbers inside the existing Training chip. */
.training-view .equipment-stat-row > div.is-next{display:grid;grid-template-columns:26px max-content;grid-template-rows:10px 22px;gap:0 4px;padding:3px 4px}
.training-view .equipment-stat-row > div.is-next small{grid-column:1;grid-row:1;text-align:center}
.training-view .equipment-stat-row > div.is-next img{grid-column:1;grid-row:2;width:22px;height:22px;justify-self:center}
.training-view .equipment-stat-row > div.is-next b{grid-column:2;grid-row:1 / 3;display:flex;flex-direction:column;font-size:16px;line-height:16px}
.training-view .equipment-stat-row > div.is-next .stat-next{display:block}

/* b161: the profile alert belongs inside the plaque, including its cream rim. */
#profile .profile-avatar-button>.attention-badge{top:4px;right:4px}
/* AC815 (build 184, owner: "Tą górę bym dopracował"): the top bar reads at a glance. Name and the three wallet
   numbers use the game's display lettering (Lucky) a size up, white fill over an ink stroke behind it; the rank line is
   brighter and bold; the portrait grows inside the unchanged 44px bar. Pill faces, icons, targets and the bar stay.
   HUD lettering: the one header outline rule (stroke, no text-shadow), to fold into the shared text-effect token. */
#online #profile :is(.profile-identity>b,.energy-pill .energy-value,.gem-pill>b,.coin-pill>b){font-family:Lucky,system-ui,sans-serif;font-weight:800;color:#fff;-webkit-text-stroke:3px var(--vs-ink-text,#2f2116);paint-order:stroke fill;text-shadow:none;letter-spacing:.2px}
#online #profile .profile-identity>b{font-size:13px;line-height:16px;letter-spacing:0}
#online #profile .profile-rank{display:block;font-size:10px;line-height:13px;font-weight:700;color:#e9d6f0;margin-top:1px;overflow:hidden;text-overflow:ellipsis}
#online #profile :is(.energy-pill .energy-value,.gem-pill>b,.coin-pill>b){font-size:15px;line-height:1;padding-top:1px}
#online #profile .profile-card>.avatar-framed{width:38px;height:38px}
/* Do not fade the shared check/cross along with the paw underneath. */
.treasure-attempts :is(.success,.miss) b>.ui-icon{width:13px;height:13px}
.treasure-attempts :is(.success,.miss) b>.ui-icon>svg{opacity:1}

/* WebKit action lettering keeps its full label boxes (AC743). Since AC816 no runtime stylesheet draws a text-shadow
   (action labels take the outline alone everywhere), so the text-shadow resets below are inert. */
@supports (-webkit-touch-callout:none){
 :is(#online,#modal,#error) button:is(.primary,.secondary)>.button-label{text-shadow:none}
 #modal .home-menu-row>.button-label{white-space:normal;overflow-wrap:anywhere;text-shadow:none;filter:none}
 #online .gemstone-draw-actions.has-ad .button-label{white-space:normal;overflow-wrap:anywhere;text-shadow:none;filter:none}
 /* WebKit trims the cap box to less than the painted glyph and stroke. Give the
    clipped label its full line box and room for the outline without changing the face. */
 #online .gemstone-draw-actions.has-ad button.gem-chest-buy:is(.primary,.secondary)>.button-label:not(:has(>*)):has(+.gemstone-price){text-box:normal;padding:3px;margin:-3px}
}
.gold-reward-badge{position:absolute;right:0;top:0;padding:2px 5px;border:2px solid #69400d;border-radius:999px;background:#ffd974;color:#56340e;font:700 12px/1 system-ui;z-index:2}
/* AC765: reserve the outer corner for the shared bonus badge on the two adventure actions. */
#online :is(.home-actions,.hub-launch) button[data-gold-bonus="true"]>.gold-bonus-badge{position:absolute;right:5px;top:-9px;transform:none}
#online .home-actions button[data-gold-bonus="true"].has-attention>.gold-bonus-badge{right:40px}

/* b175: the race stays outside Training's sole scrolling region. */
.training-race{flex:none;display:grid;gap:5px;padding:7px 10px;border:var(--vs-outline) solid var(--vs-ink);border-radius:var(--vs-radius);background:linear-gradient(var(--card-face),var(--cream-300));box-shadow:0 2px 0 var(--vs-ink);color:var(--vs-ink-text)}
.training-race-head,.training-race-status{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.training-race-status{min-height:24px}
.training-race-head>b{flex:none;font:13px/1.2 Lucky,system-ui}
.training-race-head .title-badge{--badge-h:24px;padding:0 8px}
.training-race-head .title-badge-text{font-size:12px;overflow:visible;text-overflow:clip}
.training-race-progress{position:relative;flex:none;width:96px;height:20px;border:1px solid var(--vs-ink);border-radius:8px;background:var(--ink-plum);overflow:hidden}
.training-race-progress>i{position:absolute;inset:0 auto 0 0;background:var(--rarity-transcendent)}
.training-race-progress>b{position:relative;display:block;text-align:center;font:12px/18px Lucky,system-ui;color:white;-webkit-text-stroke:2px var(--ink-plum);paint-order:stroke fill}
.training-race-holder{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0;font-size:12px;font-weight:700}
.training-race-holder>img{flex:none;width:24px;height:24px;border:1px solid var(--vs-ink);border-radius:6px;object-fit:cover}
.training-race-holder>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#modal .training-intro{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
#modal .training-intro>header{position:relative;width:100%;padding:0 36px;box-sizing:border-box}
#modal .training-intro h1{margin:0}
#modal .training-intro .help-button{position:absolute;right:0;top:0}
#modal .training-intro-art{width:112px;height:112px;object-fit:contain;filter:drop-shadow(0 3px 0 var(--vs-ink))}
#modal .training-intro>p{margin:0;font-size:15px;line-height:1.3}
#modal .training-intro>.title-badge{--badge-h:30px;margin:0 0 8px}
#modal .training-intro .title-badge-text{font-size:16px;overflow:visible}
@media(max-height:730px){.training-race{padding:5px 8px;gap:4px}.training-race-head .title-badge{--badge-h:22px}.training-race-status{min-height:24px}
.training-race-head>b{font-size:13px}#modal .training-intro-art{width:96px;height:96px}}

/* Find Blip launch event: shared rewards and bounded phone layout. */
.find-blip-panel{display:flex;flex-direction:column;gap:12px;align-items:center;width:100%;}
.find-blip-panel header{display:flex;align-items:center;justify-content:center;gap:8px;}
.find-blip-panel h1{margin:0;font-size:26px;}
.find-blip-key-art{width:100%;max-height:180px;aspect-ratio:16/9;object-fit:cover;border:2px solid var(--vs-ink,#28212e);border-radius:12px;}
.find-blip-clock{margin:0;}
.find-blip-rewards{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;max-width:320px;}
.find-blip-rewards .backpack-slot{width:48px;height:48px;flex:0 0 48px;}
.find-blip-title{flex-basis:100%;display:flex;justify-content:center;}
@media(max-height:730px){.find-blip-panel{gap:6px}.find-blip-key-art{max-height:100px}}

#modal .find-blip-panel h1{margin:0;font-size:26px}
#modal .find-blip-clock,#modal .find-blip-status{margin:0}

/* AC900 (owner 2026-11-18: "'find blip' vs 'moonleaf' - inaczej text najezdza. wole wersje z find blip"): every entry
   on Home's seasonal rail uses the Find Blip layout: a 32px icon, the 9px caption tucked 8px under it, wrapping to two
   lines at 46px. A single word longer than that (Polish "Księżycowy") keeps its own width, centred on the entry, and the
   rail's 10px gap keeps it clear of its neighbour's caption. This replaces the b161 Polish 7px Moonleaf caption. */
.home-scene .home-seasonal-rail .hub-shortcut{border:0;background:none;box-shadow:none;overflow:visible}
.home-scene .home-seasonal-rail .hub-shortcut::before{content:none}
.home-scene .home-seasonal-rail .hub-shortcut>img{width:32px;height:32px;flex:none;margin-bottom:-8px;object-fit:contain}
.home-scene .home-seasonal-rail .hub-shortcut small{max-width:46px;min-width:min-content;white-space:normal;font-size:9px;line-height:10px;overflow-wrap:normal;text-align:center;color:#fff;-webkit-text-stroke:2px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}

/* AC791 (b178, "Tę kartę podgląd z rank też trzeba ładniej ułożyć i pokazać"): the Rankings player card is one profile
   plate (hub-panels.ts showRankingDetail). Framed standing portrait beside the name header (standing chip, You/NPC,
   name, title badge, the board's metric as the hero number), the worn gear as one aligned 4-slot well and the
   secondary facts as compact chips. The Arena rival preview keeps the older .rank-detail column. Fits Compact. */
#modal .rank-profile{display:flex;flex-direction:column;gap:9px;text-align:left;color:#3a2d2c}
#modal .rank-profile-plate{display:grid;grid-template-columns:minmax(112px,42%) minmax(0,1fr);gap:10px;align-items:stretch;padding:8px;border:2px solid #c9aa70;border-radius:17px;background:var(--paper);box-shadow:inset 0 2px #fff,0 3px #bca075}
#modal .rank-profile-avatar{position:relative;display:flex;align-items:flex-end;justify-content:center;min-height:146px;border:3px solid #a8875a;border-radius:14px;background:radial-gradient(circle at 50% 40%,#fffaf0,#f3e2bd 60%,#dcc093);box-shadow:inset 0 0 0 2px #fff6dc,inset 0 -12px 18px #b8956030,0 2px #8e6d45;overflow:hidden}
#modal .rank-profile .rank-profile-avatar .rank-character{width:100%;height:150px;margin:0;flex:none}
#modal .rank-profile-id{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}
#modal .rank-profile-tags{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-height:24px}
#modal .rank-profile-place{display:inline-flex;align-items:center;gap:3px;height:24px;padding:0 9px 0 4px;border:2px solid var(--ink-plum-2);border-radius:999px;background:linear-gradient(#f6ecd4,#d9c39a);box-shadow:inset 0 2px #ffffffa0,0 2px var(--ink-plum-2);color:#3a2d2c;font:16px/1 Lucky;white-space:nowrap}
#modal .rank-profile-place .ui-icon{width:17px;height:17px}
#modal .rank-profile-place[data-metal=gold]{background:linear-gradient(#f8e18a,#d9a93a)}
#modal .rank-profile-place[data-metal=silver]{background:linear-gradient(#f4f6f8,#b9c0c8)}
#modal .rank-profile-place[data-metal=bronze]{background:linear-gradient(#f0c39d,#b8784f)}
#modal .rank-profile-you{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;background:#31435a;color:var(--cream-200);font:800 11px/1 system-ui;white-space:nowrap}
#modal .rank-profile .rank-npc{margin:0}
#modal .rank-profile h1{width:100%;margin:0;font:24px/1.15 Lucky;color:#324052;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#modal .rank-profile .title-badge-plate{margin-left:4px;max-width:calc(100% - 8px)}
#modal .rank-profile-score{display:flex;align-items:center;gap:7px;width:100%;margin:auto 0 0;padding:6px 9px;border-radius:12px;background:#292a39;color:var(--cream-200);font-size:inherit}
#modal .rank-profile-score-icon{flex:none;width:26px;height:26px;object-fit:contain}
#modal .rank-profile-score strong{flex:none;font:30px/1 Lucky;color:var(--gold-100)}
#modal .rank-profile-score small{min-width:0;font:700 11px/1.15 system-ui;color:#e4d4b6}
#modal .rank-profile .rank-loadout{width:100%;max-width:none;margin:0;padding:7px 6px 5px;border-radius:14px;background:#7a5b3a14;box-shadow:inset 0 1px 3px #6d4f2a26}
#modal .rank-profile .rank-loadout-slot small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#modal .rank-profile-facts{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:0;padding:0;list-style:none}
#modal .rank-profile-fact{display:inline-flex;align-items:center;gap:4px;min-height:26px;max-width:100%;padding:2px 10px 2px 4px;border:1.5px solid #c9aa70;border-radius:999px;background:#fff8e6;color:#5a4a3c;font:700 12px/1.1 system-ui;white-space:nowrap}
#modal .rank-profile-fact>img{flex:none;width:22px;height:22px;object-fit:contain}
#modal .rank-profile-fact>.ui-icon{flex:none;width:17px;height:17px;margin-left:2px}
#modal .rank-profile-fact>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* AC905 (owner, build 224: "Miecz jest za maly; powinno dac sie podejrzec przedmioty gracza"): the portrait above is
   150px tall (was 136) so the blade at the Equipment size fits the frame (hub-panels.ts RANKING_CARD_PORTRAIT). Each worn
   item of the card is a button that opens its read-only preview. The tile keeps its look; the whole cell (tile and slot
   name, 44px+) is the target. */
#modal .rank-profile .rank-loadout-slot:is(button){appearance:none;min-width:44px;min-height:44px;margin:0;padding:2px 0 0;border:0;border-radius:10px;background:none;box-shadow:none;color:inherit;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
#modal .rank-profile .rank-loadout-slot:is(button):active .eq-slot-icon{transform:translateY(1px) scale(.96)}
@media (prefers-reduced-motion:reduce){#modal .rank-profile .rank-loadout-slot:is(button):active .eq-slot-icon{transform:none}}
/* The preview is the Gear item dialog (gear-ui.css .gear-detail). Its socket fact shows the stone on a small well and
   the stat chip it adds (AC897 stat language). */
#modal .rank-item-detail .gear-detail-art .gear-tile.is-empty{width:88px;height:88px;border-radius:16px;padding:12px}
#modal .rank-item-detail.is-empty .gear-detail-title small{font-size:13px}
#modal .rank-item-socket .gear-plus-line b{color:#d8c6a4}
.rank-item-stone{display:inline-flex;align-items:center;gap:6px;min-height:28px}
.rank-item-well{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:7px;background:radial-gradient(circle at 50% 35%,color-mix(in srgb,var(--gem-color) 45%,#fff3d6),color-mix(in srgb,var(--gem-accent) 55%,#2b1d3c));box-shadow:inset 0 1px #fff8,0 1px 0 #0006}
.rank-item-well>img{width:24px;height:24px;object-fit:contain;filter:drop-shadow(0 1px 0 #2a2032aa)}
.rank-item-stone>.rank-item-chip>img{width:18px;height:18px}
.rank-item-stone>.rank-item-chip>b{font-size:16px}

/* AC792 (b178, "Ładniej 2/2 itp, łamią się"): the one "left in this period" line (ui-components.ts uiLimitCount). The
   label may wrap; the count is a compact chip that never breaks ("3/3", never "3 z / 3"). The sentence is for AT only. */
.ui-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.ui-limit{position:relative;display:inline;font:inherit;color:inherit}
.ui-limit-count{display:inline-block;margin-left:2px;padding:1px 7px;border-radius:999px;background:#5a40301a;box-shadow:inset 0 0 0 1px #5a403033;font:800 1em/1.25 system-ui;font-variant-numeric:tabular-nums;color:inherit;white-space:nowrap;vertical-align:baseline}
.ui-limit.is-empty .ui-limit-count{opacity:.7}
.energy-purchase-details .ui-limit-count{font-size:12.5px;color:#5c4430;background:#fff3d6;box-shadow:inset 0 0 0 1.5px #c9aa70}
.energy-purchase-offer.is-ad .ui-limit-count{background:#e3f0fb;box-shadow:inset 0 0 0 1.5px #8cb7d8;color:#2f4a63}

/* AC794 (b178, "Jak będzie więcej języków niech się przewijają, dajmy też search filtrujący"): the endonym list is the
   Language dialog's only scroll region (title, search, Back/Close fixed; no chaining). Shorter lists fit without
   scrolling; the search field appears from 7 languages (client.ts LANGUAGE_SEARCH_MIN, so today's seven show it) and never autofocuses. */
/* The list bleeds 2px past the panel on each side (room for the faces' outlines inside the scroller). The panel takes
   that bleed into its own padding, so it does not report 2px of horizontal overflow; nothing moves. */
#modal .language-panel:not(.server-panel){padding-inline:2px;margin-inline:-2px}
#modal .language-panel:not(.server-panel) .language-options{max-height:min(52dvh,430px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:2px 2px 6px;margin:0 -2px}
#modal .language-panel .language-options>[hidden]{display:none}
/* b213 AC885: Settings → Graphics picker. The title is centred with the shared (?) at its right (what the setting does
   lives only there); the four choices are the language list's honey faces, which never scroll. */
#modal .graphics-head{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;margin:0 0 10px;padding:0 48px}
#modal .graphics-head>h1{margin:0;font-size:30px;text-align:center}
#modal .graphics-head>.help-button{position:absolute;right:0;top:0}
/* With search the list keeps its height while filtering, so the dialog does not jump under the keyboard. */
#modal .language-panel.has-search .language-options{height:min(52dvh,430px);align-content:start}
/* AC924 (b228, owner: "search jest za blisko i nachodzi"): `#modal label:not(:has(>input[type=checkbox]))` (display:block,
   margin 12px 0) outranked `#modal .language-search`, so the field was never a flex row: the lens sat inline against the
   text with no gap, the input kept its default 20-character width instead of filling the field, and the 10px gap to the
   list was replaced. The selector now outranks that rule. The field uses the dialog field face (2px #a88c65, radius 10,
   paper, the shared focus outline) at the list buttons' size (--tier-dense-h): one control size per box. */
#modal .language-panel label.language-search{display:flex;align-items:center;gap:10px;width:100%;height:var(--tier-dense-h);margin:12px 0;padding:0 14px;border:2px solid #a88c65;border-radius:10px;background:var(--paper);box-shadow:inset 0 2px 3px #6d4f2a26;font-weight:600}
#modal .language-panel label.language-search:focus-within{outline:3px solid #e2a13f;outline-offset:0}
#modal .language-search .ui-icon{flex:none;width:22px;height:22px}
#modal .language-search input{flex:1 1 0;width:0;min-width:0;max-width:none;height:100%;margin:0;padding:0;border:0;border-radius:0;outline:0;background:transparent;color:var(--ink-plum);font:600 16px/1.2 system-ui;text-overflow:ellipsis;-webkit-appearance:none;appearance:none}
#modal .language-search input::placeholder{color:#8b7560;opacity:1}
#modal .language-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
#modal .language-empty{margin:18px 0 0;text-align:center;font:600 14px/1.3 system-ui;color:#6d5c4b}
@media(max-height:730px){#modal .language-panel:not(.server-panel) .language-options{max-height:min(46dvh,320px)}#modal .language-panel.has-search .language-options{height:min(40dvh,280px);max-height:min(40dvh,280px)}}
/* AC924: above an on-screen keyboard that shortens the viewport (Android) the list gives up height, so the dialog itself
   never scrolls and Back/Close keep their place (the list stays the only scroll region). */
@media(max-height:480px){#modal .language-panel.has-search .language-options{height:min(34dvh,280px);max-height:min(34dvh,280px)}}

/* Traditional Chinese uses Taiwan glyph forms in explicit system-font stacks. */
#modal .language-options .secondary:lang(zh-Hant),
.treasure-rarity:lang(zh-Hant),
#modal .forge-stamp:lang(zh-Hant)>*,
.battle-intro .bi-stamp b:lang(zh-Hant){font-family:Lucky,"PingFang TC","Heiti TC","Microsoft JhengHei","Noto Sans TC",sans-serif}

/* Hant copy has no case or tracking; codes and text inputs keep their own style. */
html:lang(zh-Hant) :is(#online,#modal) *:not(input):not(textarea){text-transform:none;letter-spacing:normal}

/* AC797 (build 182 feedback): the Mining Card tile leads the Buried Treasures footer tools (same face as Exchange and
   Gift Pack, the card art over its caption) and opens the Perks card itself. */
.miner-card-nav{width:68px;min-width:44px;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 4px;border:2px solid var(--vs-ink);border-radius:var(--vs-radius);background:#26374be8;box-shadow:0 3px 0 var(--vs-ink);color:var(--shine-100);font:12px/14px Lucky}
.miner-card-nav>img{width:40px;height:28px;object-fit:contain;filter:drop-shadow(0 1px 0 var(--ink-plum-2))}
#online.miner-view .miner-footer-tools>.miner-card-nav{flex:none;width:68px}
/* Auto shares the Blip scan row while the chamber is dug: a fixed-width face, the hammer (padlock while locked) over
   nothing else, one short label; Blip scan keeps the rest of the row. */
#online .mining-actions>.mining-auto-button{flex:0 0 auto;min-width:104px;display:flex;align-items:center;justify-content:center;gap:4px;padding-inline:10px}
#online .mining-actions .mining-auto-icon{width:26px;height:26px;object-fit:contain;flex:none;margin:-4px 0;pointer-events:none;filter:drop-shadow(0 1px 0 #1b263e)}
#online .mining-actions .mining-auto-lock{width:20px;height:22px}
/* The Auto sheet: title, the digs it will spend, the Blip scan switch; Cancel and Start in the footer. */
.miner-auto-sheet{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:min(300px,78vw)}
.miner-auto-sheet h1{margin:0;text-align:center}
.miner-auto-digs{display:flex;align-items:center;justify-content:center;gap:8px;margin:0;font:20px/1.1 Lucky}
.miner-auto-digs img{width:32px;height:32px;object-fit:contain}
.miner-auto-scan{display:flex;align-items:center;gap:10px;min-height:52px;padding:6px 12px;border:2px solid var(--vs-ink);border-radius:14px;background:#f5e3c1;color:#382a36;font:800 16px/1.2 system-ui;cursor:pointer}
.miner-auto-scan>span{flex:1 1 auto;min-width:0}
.miner-auto-scan .miner-auto-drone{width:32px;height:32px;object-fit:contain;flex:none}
.miner-auto-scan.is-off{opacity:.6;cursor:default}
/* INTRO_ONBOARDING §4: the guided first draft. The demo canvas takes no input; idle cards pulse gently in jade. */
.skill-view .skill-offer>.skill-offer-demo{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;pointer-events:none;z-index:2}
.skill-view .skill-offer.intro-pulse{animation:intro-card-pulse 1.8s ease-in-out infinite}
.skill-view .skill-offer.intro-pulse:nth-child(2){animation-delay:.2s}.skill-view .skill-offer.intro-pulse:nth-child(3){animation-delay:.4s}
@keyframes intro-card-pulse{0%,100%{transform:scale(1);filter:none}50%{transform:scale(1.018);filter:drop-shadow(0 0 7px rgba(63,216,186,.75))}}
@media(prefers-reduced-motion:reduce){.skill-view .skill-offer.intro-pulse{animation:none}}
/* Progression onboarding (owner 2026-11-13; docs/workorders/INTRO_ONBOARDING.md §9): one jade-spark chip under the
   hero on Home, framed like the seasonal rail tiles, with the step count lettered like every Home label. The current
   step's one target pulses a soft jade ring: outline only, so no button face, lip, transform or layout changes; reduced
   motion keeps the ring still. */
/* AC838 (build 190): the chip sat centred under the hero, exactly under the Camp radio (.music-widget, right 7px, 280px wide,
   painted later at the same z-index), so new players never saw it. It now floats over the panda's head like a quest
   marker (the hero's own anchor: left 55.18%, bottom 32.62%, its width and height clamps), clear of the radio, the left
   rail and the event rail on every phone size; it bobs gently (still with reduced motion) and waits during the arrival. */
.home-scene .hub-onboard{left:calc(55.18% - clamp(83px,24vw,114px)*.0917);top:auto;bottom:calc(32.62% + clamp(113px,32.6vw,155px) + 2px);translate:-50% 0;z-index:4;width:48px;height:48px;min-height:48px;margin-left:0;animation:onboard-bob 2.4s ease-in-out infinite;padding:2px;gap:0;justify-content:center;background:linear-gradient(#625c71dd,#393344dd);border:1px solid #aaa0b76b;border-radius:9px;box-shadow:inset 0 1px #fff2,0 2px #18142188}
/* AC840 (build 194, owner: "chyba z jakimś podpisem, może nad playerem"): the marker is a pill that names the step
   (spark and count on the left, one short caption) so the player knows what the chip leads to. */
.home-scene .hub-onboard{flex-direction:row;align-items:center;width:auto;max-width:min(200px,52vw);padding:2px 10px 2px 4px;gap:6px}
.hub-onboard .onboard-mark{display:flex;flex-direction:column;align-items:center;flex:none;width:40px}
.hub-onboard .onboard-caption{position:relative;z-index:1;min-width:0;font:13px/1.1 Lucky,system-ui;color:#fff;text-align:left;text-wrap:balance;-webkit-text-stroke:2.5px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}
.hub-onboard .onboard-spark{width:28px;height:28px;margin-bottom:-3px}
.hub-onboard .onboard-spark svg{--ui-icon-fill:#5fd9a6!important}
.home-scene .hub-onboard small{position:relative;z-index:1;font-size:11px;line-height:12px;color:#fff;-webkit-text-stroke:2px var(--vs-ink-text);paint-order:stroke fill;filter:drop-shadow(0 1px var(--vs-ink-text))}
/* AC840 (build 194): the step's target is shown by the Story's pointing hand (hub-panels.ts placeOnboardHand), not by
   an outline; `.onboard-pulse` is only the marker class. The hand sits above every screen layer it points into. */
.onboard-hand{z-index:31}.onboard-hand[hidden],.onboard-hand-ripple[hidden]{display:none}
/* AC867: measures where fixed boxes start inside the hand's parent (an open dialog on the phone). */
.onboard-hand-probe{position:fixed;left:0;top:0;width:0;height:0;visibility:hidden;pointer-events:none}
@keyframes onboard-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.home-scene.is-arriving .hub-onboard{opacity:0;animation:none}
@keyframes onboard-pulse{0%,100%{outline-color:#5fd9a6e6;outline-offset:2px}50%{outline-color:#5fd9a633;outline-offset:5px}}
@media(prefers-reduced-motion:reduce){.home-scene .hub-onboard{animation:none}}
/* AC835 (build 190): the Base arrival. A jade portal (the intro portal's jade) opens where the panda stands, the panda pops
   out on an arc, squashes on landing with a dust puff, and the portal closes with a spark burst. One 1650 ms timeline;
   --arrive-at (negative) keeps it running across Home re-renders. Reduced motion never renders it (hub-panels.ts). */
.home-portal{position:absolute;left:55.18%;bottom:calc(32.62% - 4px);width:clamp(96px,28vw,132px);height:clamp(132px,38vw,180px);translate:-56% 0;pointer-events:none;transform-origin:50% 55%;animation:home-portal-life 1650ms var(--arrive-at,0ms) both}
.home-portal>i{position:absolute;inset:0;border-radius:50%}
.home-portal-glow{inset:-14% -18%!important;background:radial-gradient(closest-side,#8ff3dc99,#3fd8ba44 60%,#3fd8ba00)}
.home-portal-swirl{background:radial-gradient(closest-side,#e4fff7 0 16%,#8ff3dc00 46%),conic-gradient(from 0deg,#3fd8ba,#c4ffe8,#1faf93,#8ff3dc,#3fd8ba,#c4ffe8,#1faf93,#8ff3dc,#3fd8ba);animation:home-portal-spin .9s linear infinite}
.home-portal-rim{box-shadow:inset 0 0 0 3px #e4fff7,inset 0 0 14px 4px #1faf93,0 0 16px 3px #8ff3dccc}
.home-portal-spark{inset:auto!important;left:50%;top:50%;width:7px;height:7px;margin:-3.5px;background:#e4fff7;box-shadow:0 0 8px 2px #8ff3dc;opacity:0;animation:home-portal-spark 1650ms var(--arrive-at,0ms) both}
.home-portal-spark:nth-of-type(4){--sx:-58px;--sy:-46px}.home-portal-spark:nth-of-type(5){--sx:60px;--sy:-38px}.home-portal-spark:nth-of-type(6){--sx:-44px;--sy:30px}.home-portal-spark:nth-of-type(7){--sx:50px;--sy:36px}
@keyframes home-portal-life{0%{opacity:0;transform:scale(.04,.2)}5%{opacity:1;transform:scale(.06,.32)}24%{transform:scale(1.08,.98)}30%{transform:scale(.97,1.02)}36%,64%{transform:scale(1)}70%{transform:scale(1.05,1.02)}90%{opacity:1;transform:scale(.06,.24)}95%,100%{opacity:0;transform:scale(0,.1)}}
@keyframes home-portal-spin{to{rotate:1turn}}
@keyframes home-portal-spark{0%,84%{opacity:0;transform:translate(0,0) scale(.4)}88%{opacity:1;transform:translate(calc(var(--sx)*.35),calc(var(--sy)*.35)) scale(1.2)}100%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.3)}}
.home-scene.is-arriving .home-hero>.home-hero-tap{transform-origin:50% 100%;animation:home-arrive-pop 1650ms var(--arrive-at,0ms) both}
@keyframes home-arrive-pop{0%,27%{opacity:0;transform:translateY(-16%) scale(.18)}30%{opacity:1;transform:translateY(-18%) scale(.3)}47%{transform:translateY(-34%) scale(1.04) rotate(-7deg);animation-timing-function:cubic-bezier(.5,0,.9,.5)}59%{transform:translateY(0) scale(1.15,.84) rotate(0)}67%{transform:translateY(-5%) scale(.94,1.08)}75%{transform:translateY(0) scale(1.03,.97)}83%,100%{opacity:1;transform:none}}
/* b191 merge (AC835 + AC826): the weapon stand stands left of the panda, inside the portal's glow. It stays hidden while the
   portal is open and fades in after the portal closes and the dust settles, so the arrival, the stand and the onboarding
   chip (hidden above) never overlap. */
.home-scene.is-arriving .home-hero>.home-weapon-stand{animation:home-arrive-stand 1650ms var(--arrive-at,0ms) both}
@keyframes home-arrive-stand{0%,90%{opacity:0}100%{opacity:1}}
.home-arrival-puff{position:absolute;left:55.18%;bottom:calc(32.62% - 6px);width:clamp(83px,24vw,114px);height:22px;translate:-59% 0;pointer-events:none}
.home-arrival-puff>i{position:absolute;bottom:0;width:26px;height:16px;border-radius:50%;background:#fff3dc;opacity:0;animation:home-arrival-puff 1650ms var(--arrive-at,0ms) both}
.home-arrival-puff>i:nth-child(1){left:2%;--px:-16px}.home-arrival-puff>i:nth-child(2){left:38%;--px:0px}.home-arrival-puff>i:nth-child(3){right:2%;--px:16px}
@keyframes home-arrival-puff{0%,58%{opacity:0;transform:translate(0,0) scale(.4)}63%{opacity:.85;transform:translate(calc(var(--px)*.4),-2px) scale(1)}86%,100%{opacity:0;transform:translate(var(--px),-8px) scale(1.5)}}
/* AC835: the first-visit tour of the bottom tabs. A dimmed screen with a jade-rimmed spotlight on one tab, and a speech
   bubble from the panda's portrait above it; the spotlight glides to the next tab, the bubble pops on each step. */
.home-tour{position:fixed;inset:0;z-index:60;opacity:0;transition:opacity .22s ease-out;-webkit-tap-highlight-color:transparent}
.home-tour.is-on{opacity:1}.home-tour.is-off{opacity:0;transition-duration:.18s}
.home-tour-hole{position:fixed;border-radius:16px;box-shadow:0 0 0 200vmax #120d1cc2,0 0 0 3px #5fd9a6,0 0 18px 5px #5fd9a680;pointer-events:none;transition:left .34s cubic-bezier(.2,.8,.2,1),top .34s cubic-bezier(.2,.8,.2,1),width .34s cubic-bezier(.2,.8,.2,1),height .34s cubic-bezier(.2,.8,.2,1)}
.home-tour-hole::after{content:'';position:absolute;inset:-3px;border-radius:19px;border:3px solid #5fd9a6;animation:onboard-pulse 1.8s ease-in-out infinite;outline:0}
.home-tour-bubble{position:fixed;box-sizing:border-box;min-height:86px;padding:11px 12px 10px 76px;border:2px solid #372a2e;border-radius:16px;background:linear-gradient(#fffaf0,#f5e5c3);box-shadow:0 4px 0 #a36b33,0 9px 18px #0007;color:#3a2b2b}
.home-tour-bubble.is-step{animation:home-tour-pop .32s cubic-bezier(.34,1.56,.64,1) both}
.home-tour-face{position:absolute;left:9px;top:-16px;width:58px;height:58px;overflow:hidden;border:3px solid #372a2e;border-radius:50%;background:radial-gradient(circle at 50% 40%,#fff3c0,#ffcf6a);box-shadow:0 3px 0 #a36b33}
.home-tour-face>img{display:block;width:100%;height:100%;object-fit:cover}
.home-tour-bubble.is-step .home-tour-face{animation:home-tour-nod .5s .08s ease-out both}
.home-tour-line{margin:0 0 9px;font:700 15px/1.3 system-ui;color:#3a2b2b;text-wrap:pretty}
.home-tour-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px}
/* The step dots sit under the portrait, so the two buttons keep the whole row at every width and language. */
.home-tour-dots{position:absolute;left:9px;bottom:15px;width:58px;display:flex;justify-content:center;gap:5px}
.home-tour-dots>i{display:block;flex:none;width:7px;height:7px;border-radius:50%;background:#cdb894;transition:background .2s,transform .2s}
.home-tour-dots>i.is-on{background:#2fb88c;transform:scale(1.3)}
#online .home-tour .home-tour-btn{flex:none;width:auto;min-width:84px;min-height:var(--tier-compact);margin:0;padding:4px 14px;font-size:16px;line-height:1.05}
.home-tour-tail{position:absolute;bottom:-10px;left:var(--tail-x,50%);width:16px;height:16px;margin-left:-8px;background:#f5e5c3;border-right:2px solid #372a2e;border-bottom:2px solid #372a2e;rotate:45deg}
/* AC906: under the player name the tail points up from the bubble's top edge. */
.home-tour-bubble.is-below .home-tour-tail{top:-10px;bottom:auto;background:#fffaf0;border:0;border-left:2px solid #372a2e;border-top:2px solid #372a2e}
.home-tour-bubble.is-below.is-step{animation-name:home-tour-pop-below}
@keyframes home-tour-pop-below{from{opacity:0;transform:translateY(-10px) scale(.94)}to{opacity:1;transform:none}}
@keyframes home-tour-pop{from{opacity:0;transform:translateY(10px) scale(.94)}to{opacity:1;transform:none}}
@keyframes home-tour-nod{0%{transform:rotate(0)}35%{transform:rotate(-9deg) translateY(-2px)}70%{transform:rotate(5deg)}100%{transform:none}}
.home-tour.is-reduced .home-tour-hole{transition:none}.home-tour.is-reduced .home-tour-hole::after{animation:none}
.home-tour.is-reduced .home-tour-bubble.is-step{animation:home-tour-fade .2s ease-out both}.home-tour.is-reduced .home-tour-face{animation:none!important}
@keyframes home-tour-fade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.home-portal,.home-arrival-puff{display:none}.home-scene.is-arriving .home-hero>.home-hero-tap{animation:none}}

/* KR-ODDS (owner 2026-11-19): odds where paid random items are bought. The per-item column and its header row, the
   rounding note, the public odds page link, the Chances button on each chest card (mirroring the (?) on the title
   band) and on the Store's Gems shelf, and the Store's list of odds views. */
.gemstone-odds>.odds-table.has-each>p,.gemstone-odds>.odds-table.has-each>p:last-child:nth-child(odd){grid-template-columns:18px minmax(0,1fr) auto auto}
.gemstone-odds>.odds-table.has-each>p:nth-child(even){background:none}
.gemstone-odds>.odds-table.has-each>p:nth-child(odd):not(.odds-head){background:var(--row-face)}
.gemstone-odds>.odds-table.has-each>p.odds-head{min-height:0;padding-block:2px;border-top:0;background:none;font:700 11px/1.1 system-ui;color:#6b5646}
.gemstone-odds>.odds-table.has-each>p.odds-head i{visibility:hidden;height:0;border:0;background:none}
.gemstone-odds>.odds-table.has-each>p.odds-head small{max-width:6.5em;text-align:right;overflow-wrap:anywhere}
.gemstone-odds>.odds-table.has-each>p b+b{padding-left:6px}
.gemstone-odds>small.odds-rounded{margin-top:4px}
.odds-page-link{margin:6px 0 0;text-align:center;font:600 14px/1.25 system-ui}
.odds-page-link a{display:inline-block;padding:12px 6px;color:#245a9a;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
#online .gem-chest-card>.chest-odds{position:absolute;top:calc((var(--gem-title-pt) + var(--gem-title-pb) + 1.1 * var(--gem-title-fs)) / 2 - 22px);left:4px;z-index:2;width:auto;min-width:0;margin:0;padding-inline:9px;font-size:15px}
#online .gem-chest-card:has(>.chest-odds)>.gem-chest-title,#online .chest-pair .gem-chest-card:has(>.chest-odds)>.gem-chest-title{padding-inline:76px}
#online .store-gems{position:relative}
#online .store-gems>.store-gems-odds{position:absolute;top:-10px;right:0;width:auto;margin:0;z-index:1}
#online .store-gems:has(>.store-gems-odds){margin-top:8px}#online .store-gems:has(>.store-gems-odds)>.store-gem-list{margin-top:8px}
.odds-hub-list{display:flex;flex-direction:column;gap:8px;margin:12px 0 4px}
#modal button.odds-hub-row{display:grid;grid-template-columns:44px minmax(0,1fr) 20px;align-items:center;gap:10px;width:100%;min-height:58px;margin:0;padding:6px 12px;border:2px solid #9d8260;border-radius:14px;background:var(--cream-300);box-shadow:0 3px #9d8260;color:#413439;font:700 16px/1.2 system-ui;text-align:left;-webkit-text-stroke:0}
#modal button.odds-hub-row img{width:44px;height:44px;object-fit:contain}
#modal .moonleaf-buy-odds,#modal .fishing-buy-odds,#modal .fishing-rods-odds{display:block;width:auto;margin:4px auto 0}
/* AC926 (owner, build 229 feedback; docs/SCREEN_RULES.md → AC926): AFK Rewards. A framed night-camp scene whose
   FRAME is the one storage gauge; the title ribbon rides the frame's top edge, the Full-in countdown its lower rim,
   the (?) the scene's upper-right corner. Below: one amount box (coins and the hourly income) and Collect.
   Every loop is a CSS animation, so the global reduced-motion rule (style.css) stops them all; the rules below are
   the still picture: the frame at its final fill, Zzz and twinkles drawn, no falling coin. */
#modal [data-panel="afk"] .afk-top{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;min-height:0;margin:0;padding:0 0 10px;text-align:center}
#modal [data-panel="afk"] .afk-ribbon{z-index:3;width:max-content;min-width:196px;max-width:calc(100% - 72px);margin:-38px 0 -9px;padding:5px 18px 8px}
#modal [data-panel="afk"] .afk-ribbon h1{margin:0;color:var(--cream-50);font:25px/1.05 Lucky,system-ui;letter-spacing:.02em;text-align:center;white-space:nowrap;-webkit-text-stroke:var(--label-stroke,.14em) var(--ink-brown);paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,.07em) 0 var(--ink-brown))}
.afk-scene-window{position:relative;align-self:stretch;height:150px;border-radius:15px;background:#0f1826}
.afk-scene{position:absolute;inset:8px;overflow:hidden;border-radius:7px;pointer-events:none;background:#1c2a4a url(/art/home-base-night-v1.png) 50% 57%/100% auto no-repeat}
.afk-scene:after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 22px 6px #0b1530b3}
.afk-scene-lantern{position:absolute;left:41%;top:17%;width:120px;height:120px;margin:-60px;border-radius:50%;background:radial-gradient(closest-side,#ffd27acc,#ffb84d55 45%,#ffb84d00);mix-blend-mode:screen;animation:afk-lantern 2.7s ease-in-out infinite alternate}
@keyframes afk-lantern{0%{opacity:.55;transform:scale(.9)}35%{opacity:.85;transform:scale(1.02)}60%{opacity:.6;transform:scale(.95)}100%{opacity:1;transform:scale(1.08)}}
.afk-scene-fireflies>i{position:absolute;width:4px;height:4px;margin:-2px;border-radius:50%;background:#fff6b0;box-shadow:0 0 6px 2px #ffe27ab3;animation:afk-firefly 5.2s ease-in-out infinite;animation-delay:calc(var(--i)*-.83s)}
.afk-scene-fireflies>i:nth-child(1){left:9%;top:38%}
.afk-scene-fireflies>i:nth-child(2){left:18%;top:70%}
.afk-scene-fireflies>i:nth-child(3){left:29%;top:22%}
.afk-scene-fireflies>i:nth-child(4){left:74%;top:18%}
.afk-scene-fireflies>i:nth-child(5){left:86%;top:46%}
.afk-scene-fireflies>i:nth-child(6){left:93%;top:74%}
.afk-scene-fireflies>i:nth-child(7){left:62%;top:9%}
@keyframes afk-firefly{0%,100%{transform:translate(0,0);opacity:.2}25%{transform:translate(7px,-9px);opacity:1}50%{transform:translate(13px,-2px);opacity:.35}75%{transform:translate(5px,6px);opacity:.95}}
/* The hero painting and everything registered to it share one box (212x132.5, 176x110 on Compact). */
.afk-scene :is(.afk-scene-camp,.afk-scene-breath,.afk-scene-zzz,.afk-scene-sparks,.afk-scene-drops){position:absolute;left:50%;bottom:-5px;width:212px;height:132.5px;translate:-50% 0}
.afk-scene :is(.afk-scene-camp,.afk-scene-breath){object-fit:contain}
.afk-scene-camp{filter:drop-shadow(0 5px 5px #06102399)}
.afk-scene-breath{clip-path:ellipse(calc(19.5% + (6 - var(--k))*2.4%) calc(31% + (6 - var(--k))*3.2%) at 48.8% 40.6%);transform-origin:48.8% 72%;animation:afk-breath 3.2s ease-in-out infinite alternate}
@keyframes afk-breath{from{transform:none}to{transform:scale(calc(1 + var(--k)*.003),calc(1 + var(--k)*.0078))}}
.afk-scene-zzz>b{position:absolute;left:70%;top:22%;font:14px/1 Lucky,system-ui;color:var(--cream-50);-webkit-text-stroke:3px var(--ink-brown);paint-order:stroke fill;animation:afk-zzz 3.6s linear infinite backwards}
.afk-scene-zzz>b:nth-child(2){font-size:18px;translate:9px -14px;animation-delay:1.2s}
.afk-scene-zzz>b:nth-child(3){font-size:23px;translate:21px -33px;animation-delay:2.4s}
@keyframes afk-zzz{0%{opacity:0;transform:translate(-5px,9px) scale(.55)}18%,70%{opacity:1}100%{opacity:0;transform:translate(7px,-12px) scale(1.12)}}
.afk-scene-sparks>i{position:absolute;width:13px;height:13px;margin:-6.5px;background:#fffdf0;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);animation:afk-twinkle 2.3s ease-in-out infinite;animation-delay:calc(var(--i)*-.53s)}
.afk-scene-sparks>i:nth-child(1){left:74%;top:38%}
.afk-scene-sparks>i:nth-child(2){left:36%;top:72.6%}
.afk-scene-sparks>i:nth-child(3){left:11%;top:65.6%}
.afk-scene-sparks>i:nth-child(4){left:94%;top:67%}
.afk-scene-sparks>i:nth-child(5){left:83%;top:60%}
@keyframes afk-twinkle{0%,100%{transform:scale(.25) rotate(0);opacity:.15}50%{transform:scale(1.15) rotate(45deg);opacity:1}}
.afk-scene-drops>img{position:absolute;width:22px;height:22px;margin:-11px;object-fit:contain;opacity:0;animation:afk-drop calc(var(--afk-drop,2.2s)*3) linear infinite;animation-delay:calc(var(--i)*var(--afk-drop,2.2s))}
.afk-scene-drops>img:nth-child(1){left:79%;top:52%}
.afk-scene-drops>img:nth-child(2){left:7%;top:76%}
.afk-scene-drops>img:nth-child(3){left:92%;top:77%}
@keyframes afk-drop{0%{opacity:0;transform:translateY(-78px) rotate(-50deg);animation-timing-function:cubic-bezier(.45,0,1,.7)}3%{opacity:1}12%{transform:translateY(0) rotate(0);animation-timing-function:ease-out}14.5%{transform:translateY(-6px) rotate(8deg);animation-timing-function:ease-in}17%{opacity:1;transform:translateY(0) scale(1)}21%,100%{opacity:0;transform:translateY(2px) scale(.6)}}
#modal [data-panel="afk"] .afk-scene-window>.help-button{position:absolute;z-index:2;right:6px;top:6px;transform:none}
/* The frame gauge: one path (afkFrameLayout draws it to the rendered size), eight px wide, in place of a border. It
   fills once after the dialog lands (not again on a return from the help: .is-settled); green, gold when full. */
.afk-frame{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.afk-frame path{fill:none;stroke-linejoin:round}
.afk-frame-drop{stroke:#0b1320;stroke-width:8;translate:0 3px}
.afk-frame-track{stroke:#0f1826;stroke-width:8}
.afk-frame-groove{stroke:#2e4560;stroke-width:4.4}
.afk-frame :is(.afk-frame-fill,.afk-frame-gloss,.afk-frame-glint,.afk-frame-halo,.afk-frame-lead){stroke-linecap:round}
.afk-frame-fill{stroke:#8fcb55;stroke-width:5;animation:afk-frame-fill 1.1s cubic-bezier(.3,.7,.3,1) .25s backwards}
.afk-frame-gloss{stroke:#dcf8a8;stroke-width:1.4;animation:afk-frame-fill 1.1s cubic-bezier(.3,.7,.3,1) .25s backwards}
.afk-frame-halo{stroke:#e6ffb066;stroke-width:13;animation:afk-frame-lead 1.1s cubic-bezier(.3,.7,.3,1) .25s backwards,afk-frame-beat 1.2s ease-in-out 1.4s infinite alternate}
.afk-frame-lead{stroke:#fbffe9;stroke-width:7;animation:afk-frame-lead 1.1s cubic-bezier(.3,.7,.3,1) .25s backwards}
.afk-frame-glint{stroke:#ffffffb3;stroke-width:5;opacity:0;animation:afk-frame-glint 2.8s ease-in-out 1.6s infinite}
.is-full .afk-frame-fill{stroke:#f2b33d}
.is-full .afk-frame-gloss{stroke:#ffeeb5}
.is-full .afk-frame-glint{animation:afk-frame-lap 5.6s linear 1.5s infinite}
.is-settled :is(.afk-frame-fill,.afk-frame-gloss,.afk-frame-lead){animation:none}
.is-settled .afk-frame-halo{animation:afk-frame-beat 1.2s ease-in-out infinite alternate}
.is-settled .afk-frame-glint{animation-delay:.4s}
@keyframes afk-frame-fill{from{stroke-dashoffset:100px}}
@keyframes afk-frame-lead{from{stroke-dashoffset:0}}
@keyframes afk-frame-beat{from{opacity:.45}to{opacity:1}}
@keyframes afk-frame-glint{0%{stroke-dashoffset:0;opacity:0}14%,84%{opacity:1}100%{stroke-dashoffset:calc((var(--afk-fill) - 7)*-1px);opacity:0}}
@keyframes afk-frame-lap{from{stroke-dashoffset:0;opacity:.85}to{stroke-dashoffset:-100px;opacity:.85}}
#modal [data-panel="afk"] .afk-plaque{position:relative;z-index:3;display:flex;justify-content:center;margin-top:-15px}
#modal [data-panel="afk"] .afk-plaque>.ui-timer{box-shadow:inset 0 1px #adc9e84d}
/* One amount box: the coins, and the hourly income beside them, smaller and muted, on one line (afkLootFit steps
   the type down for a very long amount). No arrow form during a gold weekend: the amount is the plain one. */
#modal [data-panel="afk"]>.afk-loot>img{flex:none}
#modal [data-panel="afk"]>.afk-loot>strong{flex:none;font-size:var(--afk-loot-size,29px)}
#modal [data-panel="afk"]>.afk-loot>.afk-loot-rate{flex:none;align-self:center;margin-top:calc(var(--afk-loot-size,29px)*.2);font:calc(var(--afk-loot-size,29px)*.6)/1 Lucky,system-ui;color:#8c6f45;white-space:nowrap}
.afk-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-height:730px){.afk-scene-window{height:122px}.afk-scene :is(.afk-scene-camp,.afk-scene-breath,.afk-scene-zzz,.afk-scene-sparks,.afk-scene-drops){width:176px;height:110px;bottom:-4px}}
/* AC926 (owner: "zmień graficzkę x2 - tak by była przy title w buttonie zaraz za jakby inline text, ale ładnie
   wyróżniony x2", then "nie może być po prostu większa krzywa czcionka czy coś bez tła dodatkowego"): on AFK Collect
   the gold weekend's x2 is lettering, not a badge: the button's own display face right after the label, a step
   larger (1.3em), slanted, gold with the label's dark outline; no plate, border or background. It sits on the
   label's baseline (both are centred on their cap bands, so the larger one is lifted by half the difference),
   never wraps, and the button keeps its height. Other x2 buttons keep the corner badge (.gold-bonus-badge). */
#modal [data-panel="afk"]>.primary.has-gold-x2{gap:7px;flex-wrap:nowrap}
#modal [data-panel="afk"]>.primary.has-gold-x2>.button-label{flex:none;white-space:nowrap}
#modal [data-panel="afk"]>.primary>.gold-x2-mark{flex:none;font-size:1.3em;line-height:1;color:#ffd84d;-webkit-text-stroke:.1em var(--ink-navy);paint-order:stroke fill;text-shadow:none;white-space:nowrap;translate:0 calc(var(--face-lip,6px)/-2 - .115cap);transform:skewX(-12deg);transform-origin:50% 100%;pointer-events:none}

/* Thai (2026-11-21): Thai stacks vowels and tone marks above and below the letter, so it takes no tracking;
   the picker endonym keeps a bold Thai system face in every session. */
#modal .language-options .secondary:lang(th){font-family:Lucky,"Thonburi","Sukhumvit Set","Noto Sans Thai","Leelawadee UI",sans-serif;font-weight:800}
html:lang(th) :is(#online,#modal) *:not(input):not(textarea){letter-spacing:normal}
/* Thai: a vowel and a tone mark can stack above the letter; the Story position tab hides its top 12px under the
   plaque board, so Thai text sits lower in it (the tab keeps its height). */
html:lang(th) .story-act-plaque>.story-act-position{padding-top:12px;padding-bottom:1px}
/* Owner 2026-11-21: five shortcuts (Backpack, Collection, Gemstones, Gear, Training) fit Mini: narrower faces, tighter gap. */
.eq-nav.has-five{gap:6px}
.eq-nav.has-five .eq-nav-item{flex:0 1 76px;min-width:58px}
.eq-view #content:empty{display:none}
/* Boot screen (owner 2026-11-21: "tragedia jak to wygląda"): until the client's first render the page is one
   full-screen scene, never the empty shell frame: the title logo bobbing over a honey glow, a paw-print trail and the
   localized Connecting label (the native loaders' composition on the page's own graphite; both shells cover the page with
   their loader until "ready"). It lives inside #content, so the first render replaces it in the same frame: no fade,
   no leftover node, no layout to settle. The label appears once the client has localized it, so no English text
   flashes in another language; a boot failure shows its message here (.is-failed). Motion is transform/opacity only
   and static under reduced motion. Rule: docs/SCREEN_RULES.md → Boot screen. */
.boot-screen{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 24px) calc(var(--safe-right,env(safe-area-inset-right,0px)) + 24px) calc(var(--safe-bottom,env(safe-area-inset-bottom,0px)) + 24px) calc(var(--safe-left,env(safe-area-inset-left,0px)) + 24px);background:#1b1b23 radial-gradient(ellipse 120% 70% at 50% 40%,#44444f,#1b1b23 78%);color:#fff0cd;text-align:center;overflow:hidden;-webkit-user-select:none;user-select:none}
.boot-art{position:relative;flex:0 1 auto;min-height:90px;width:min(280px,72vw,(100dvh - 190px)*4/3);aspect-ratio:4/3}
.boot-glow{position:absolute;left:50%;top:50%;width:116%;aspect-ratio:1;margin:-58% 0 0 -58%;border-radius:50%;background:radial-gradient(circle closest-side,#ffb24da6,#ff9a3d4d 58%,#ff9a3d00);animation:boot-glow 1.6s ease-in-out infinite alternate}
.boot-logo{position:relative;display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 10px #00000059);animation:boot-bob 1.6s ease-in-out infinite alternate}
.boot-paws{display:flex;flex:none;align-items:center;gap:12px;height:26px;color:#ffa83d}
.boot-paws i{width:18px;height:18px;transform:translateY(4px) rotate(-14deg);opacity:.15;animation:boot-step .55s ease-in-out infinite alternate;background:radial-gradient(ellipse 5.6px 4.6px at 50% 70%,currentColor 0 90%,#0000),radial-gradient(ellipse 2.1px 2.6px at 14% 42%,currentColor 0 86%,#0000),radial-gradient(ellipse 2.2px 2.8px at 36% 18%,currentColor 0 86%,#0000),radial-gradient(ellipse 2.2px 2.8px at 64% 18%,currentColor 0 86%,#0000),radial-gradient(ellipse 2.1px 2.6px at 86% 42%,currentColor 0 86%,#0000)}
.boot-paws i:nth-child(even){transform:translateY(-4px) rotate(14deg)}
.boot-paws i:nth-child(2){animation-delay:.2s}.boot-paws i:nth-child(3){animation-delay:.4s}.boot-paws i:nth-child(4){animation-delay:.6s}.boot-paws i:nth-child(5){animation-delay:.8s}
.boot-label{flex:none;margin:0;max-width:300px;min-height:24px;font:18px/24px Lucky,system-ui,sans-serif;text-wrap:balance;opacity:0;transition:opacity .2s}
.boot-screen.is-localized .boot-label{opacity:1}
.boot-screen.is-failed .boot-paws{display:none}
.boot-screen.is-failed .boot-glow,.boot-screen.is-failed .boot-logo{animation:none}
.boot-screen.is-failed .boot-glow{opacity:.4}
.boot-screen.is-failed .boot-label{font-size:16px;line-height:22px}
@keyframes boot-glow{from{transform:scale(.92);opacity:.6}to{transform:scale(1.06);opacity:.95}}
@keyframes boot-bob{from{transform:translateY(4px)}to{transform:translateY(-7px)}}
@keyframes boot-step{to{opacity:.95}}
@media(prefers-reduced-motion:reduce){.boot-glow,.boot-logo,.boot-paws i{animation:none}.boot-glow{opacity:.8}.boot-paws i{opacity:.6}.boot-label{transition:none}}
/* Owner 2026-11-21: reward chips in Inbox rows are smaller (36px, 25px art). */
.mail-row .mail-reward{width:36px;height:36px;border-radius:8px}
.mail-row .mail-reward img{width:25px;height:25px;margin-top:-5px}
.mail-row .mail-reward b{font-size:11px;-webkit-text-stroke-width:2.2px}

/* Owner 2026-11-21: on Chests the HUD shows the two key counters, so the Energy pill (unused there) steps aside. */
#online #profile:has(.chest-key-pill) .energy-pill{display:none}

/* Owner 2026-11-21: the avatar picker never pushes Close out of the sheet: the grid scrolls inside it. */
#modal .avatar-panel{min-height:0;grid-template-rows:auto auto minmax(0,1fr)}
#modal .avatar-grid{min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:flex-start;padding:2px}
/* Owner 2026-11-21: the Bamboo exchange wallet is the HUD-size chip, like the guild shop wallet. */
.exchange-wallet>.exchange-bamboo{height:26px;padding:0 11px 0 30px;border-width:1px;box-shadow:none}
.exchange-bamboo>img{left:-3px;width:30px;height:30px}
.exchange-bamboo>b{font-size:16px;-webkit-text-stroke-width:2.5px}
/* Journal tabs on one line (owner 2026-11-21: "fade i scroll" also for Story / Skills / Enemies): a long label
   (e.g. Vietnamese "Cốt truyện") never wraps; when the row is wider than the panel it scrolls sideways and its
   edges fade (`is-overflowing` is set by showCollections only then). */
#modal .collection-tabs.collection-tabs{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
#modal .collection-tabs.collection-tabs::-webkit-scrollbar{display:none}
#modal .collection-tabs.collection-tabs>button{flex:1 0 auto;white-space:nowrap;padding-left:10px;padding-right:10px}
#modal .collection-tabs.collection-tabs.is-overflowing{-webkit-mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 18px),transparent);padding-left:14px;padding-right:14px}
