/* Forms (AB25, forms-v1; form-ui.js). The Equipment form tile and the Form dialog
 * (AC95, build 51: no wardrobe lock while transformed). Fixed-fit: the tile sits in the free band above the right slot
 * column; the dialog never scrolls at 375x667 (docs/MOBILE_UI.md). */
.form-tile{position:absolute;right:16px;top:var(--form-tile-top,8px);z-index:2;width:56px;height:56px;padding:0;border-radius:50%;pointer-events:auto;
 display:grid;place-items:center;border:3px solid #927446;background:radial-gradient(circle at 50% 38%,var(--cream-50) 0 45%,#e7d1a2 100%);
 box-shadow:inset 0 1px #fff,0 2px 0 #6d5432,0 4px 8px #3a2a1a40}
.form-tile img{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 1px 1px #3a2a1a55)}
.form-tile.is-locked img{filter:grayscale(1) contrast(.85) brightness(.95);opacity:.8}
.form-tile.is-on{border-color:#f0b43c;box-shadow:inset 0 1px #fff,0 0 0 2px var(--honey-200),0 0 12px 2px #ffc64aa6,0 2px 0 #6d5432}
.form-check{position:absolute;right:-5px;bottom:-3px;width:18px;height:18px;border-radius:50%;background:#3e9c4c;border:2px solid var(--cream-300);box-shadow:0 1px 2px #0004}
.form-check::after{content:'';position:absolute;left:5px;top:2px;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
/* Form dialog (AC29, build 40 feedback): a roomy card. The title row carries the (?),
   the preview stands on a soft glow, stars and state share one line, the two current
   values sit side by side; explanations live in the help sheet, never inline. */
.form-modal{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.form-heading{display:grid;grid-template-columns:var(--tier-compact,44px) minmax(0,1fr) var(--tier-compact,44px);align-items:center;gap:4px;width:100%}
.form-heading h1{grid-column:2;margin:0;min-width:0}
#modal .form-heading h1{margin:0;font-size:clamp(22px,6.6vw,27px);line-height:1.15}
.form-heading .help-button{grid-column:3}
/* AC36: the character switcher. Two plump portrait cards side by side; the active
   one wears the gold ring and glow of the transformed tile, a check and an Active tag.
   Fixed-fit: the portrait height follows the viewport, never the content. */
.form-switcher{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.form-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;margin:0;padding:6px 6px 7px;border-radius:16px;
 border:3px solid #c9ac77;background:linear-gradient(var(--cream-200),#efdcb0);color:#3a2c22;box-shadow:inset 0 1px #fff,0 3px 0 #a58460,0 5px 8px #3a2a1a2e;cursor:pointer;
 transition:transform .14s ease,box-shadow .14s ease}
.form-card:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px #fff,0 1px 0 #a58460}
.form-card.is-active{border-color:#f0b43c;background:radial-gradient(ellipse 70% 60% at 50% 45%,var(--card-face) 0 35%,var(--gold-100) 75%,#f8d684 100%);
 box-shadow:inset 0 1px #fff,0 0 0 2px var(--honey-200),0 0 14px 2px #ffc64a99,0 3px 0 #b07a1c;cursor:default}
.form-card:disabled:not(.is-active){opacity:.6}
.form-card.is-locked canvas{filter:grayscale(1) contrast(.85) brightness(.95);opacity:.75}
.form-card-art{position:relative;display:grid;place-items:center;width:100%}
.form-card canvas{display:block;width:auto;max-width:100%;height:clamp(92px,19vh,150px);aspect-ratio:400/370}
.form-card .form-check{right:-2px;bottom:auto;top:-2px;width:22px;height:22px}
.form-card .form-check::after{left:6px;top:3px;width:5px;height:10px}
.form-card-tag{position:absolute;left:0;top:0;max-width:100%;padding:2px 8px;border-radius:999px;white-space:nowrap;
 font:800 11px/1.2 system-ui,sans-serif;color:#24632f;background:#dcefd2;border:1.5px solid #8fc185}
.form-card-tag.is-locked{position:static;transform:none;color:#6a5a45;background:#efe0bd;border-color:#d3bb8b}
.form-card-name{max-width:100%;font:800 15px/1.15 system-ui,sans-serif;color:#3a2c22;overflow-wrap:anywhere}
.form-card-foot{display:flex;align-items:center;justify-content:center;min-height:19px}
.form-card-stars{display:flex;flex-wrap:nowrap;justify-content:center;gap:1px;font-size:15px;line-height:1}
.form-card-stars i{font-style:normal;color:#c9b99a;filter:drop-shadow(0 1px #fff8)}
.form-card-stars i.on{color:#f2b630;filter:drop-shadow(0 0 3px #ffd36a) drop-shadow(0 1px #7a4e10)}
.form-facts{list-style:none;margin:2px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
.form-facts li{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;padding:8px 6px;border-radius:var(--vs-radius);background:#f4e7c5;border:1.5px solid #c9ac77;box-shadow:inset 0 1px #fff8}
.form-facts small{font:700 11px/1.1 system-ui,sans-serif;color:#7a5a24;text-transform:uppercase;letter-spacing:.04em}
.form-facts b{font-size:15px;line-height:1.15;color:#3a2c22;overflow-wrap:anywhere}
.form-wallet{display:flex;gap:4px 10px;justify-content:center;flex-wrap:wrap;margin:2px 0 0;font:700 12px/1.2 system-ui,sans-serif;color:#3a2c22}
.form-wallet span{display:inline-flex;align-items:center;gap:3px}
.form-wallet img,.form-cost img{width:18px;height:18px;object-fit:contain}
.form-note{font:600 11px/1.25 system-ui,sans-serif;color:#6a5a45;max-width:30em}
/* The (?) sheet. */
.form-help h1{margin:0}
.form-help-list{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:8px;text-align:left;width:100%}
.form-help-list li{position:relative;padding:8px 10px 8px 30px;border-radius:var(--vs-radius);background:#f4e7c5;border:1.5px solid #d6bf8f;font:600 13px/1.35 system-ui,sans-serif;color:#3a2c22}
.form-help-list li::before{content:'';position:absolute;left:10px;top:12px;width:10px;height:10px;border-radius:50%;background:#f2b630;box-shadow:0 0 0 2px var(--cream-300),0 1px 0 3px #a9792633}
.form-actions{width:100%;margin-top:4px}
.form-actions .form-upgrade,.form-actions .form-reset{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.form-cost{display:inline-flex;align-items:center;gap:2px;font:800 11px/1 system-ui,sans-serif;white-space:nowrap}
.form-reset-line{font:800 16px/1.3 system-ui,sans-serif;color:#3a2c22;margin:4px 0}
@media (prefers-reduced-motion:reduce){.form-tile,.form-tile *,.form-card{transition:none!important;animation:none!important}}
/* 375x667 (compact) and browser-chrome phones up to 800px tall: the band between
   the resource bar and Gloves is too short for the full tile, so it shrinks to 46px. */
@media (max-height:800px){.form-tile{--form-tile-top:6px;width:46px;height:46px;right:21px;border-width:2.5px}.form-tile img{width:38px;height:38px}}
/* AC28: the unlock ceremony (showFormCeremony). 2.4 s: the red panda charges up and
   glows (0-36%), a white flash (36-46%), the Giant Panda pops in on rays with sparkles
   (40-75%), then the ATK stat-up and title. Rays keep turning slowly; everything else
   holds its final frame. Reduced motion: the final frame only. */
.form-ceremony{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;--fc:2.4s}
.fc-stage{position:relative;width:min(100%,280px);height:clamp(170px,32vh,250px);display:grid;place-items:center;overflow:visible}
.fc-stage>*{position:absolute}
.fc-glow{inset:6% 8%;border-radius:50%;background:radial-gradient(circle,var(--cream-250) 0 25%,#ffd76a 48%,#ffc84a00 70%);animation:fc-glow var(--fc) ease-out both}
.fc-rays{width:150%;aspect-ratio:1;left:-25%;top:50%;margin-top:-75%;border-radius:50%;
 background:repeating-conic-gradient(from 0deg,#ffd45a 0 9deg,#ffd45a00 9deg 30deg);
 -webkit-mask:radial-gradient(circle,#000 0 22%,#0000 66%);mask:radial-gradient(circle,#000 0 22%,#0000 66%);
 animation:fc-rays-in var(--fc) ease-out both,fc-rays-turn 14s linear 1312ms infinite}
.fc-ring{width:62%;aspect-ratio:1;border-radius:50%;border:4px solid var(--gold-50);box-shadow:0 0 14px #ffd76a;opacity:0;animation:fc-ring var(--fc) ease-out both}
.fc-stage img{bottom:4%;height:86%;width:auto;max-width:100%;object-fit:contain;filter:drop-shadow(0 6px 3px #7a4e1033)}
.fc-from{animation:fc-from var(--fc) ease-in both}
.fc-to{animation:fc-to var(--fc) cubic-bezier(.2,.9,.3,1.2) both;transform-origin:50% 100%}
.fc-flash{inset:-10%;border-radius:50%;background:radial-gradient(circle,#fff 0 35%,#fffbe8cc 52%,#fff0 72%);opacity:0;animation:fc-flash var(--fc) ease-out both}
.fc-spark{left:50%;top:48%;width:30px;height:30px;margin:-15px;background:radial-gradient(circle,#fff 0 18%,#ffe36a 34%,#f5a91c 70%);opacity:0;
 clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);
 animation:fc-spark var(--fc) ease-out both;animation-delay:var(--t,0ms)}
.form-ceremony h1{margin:0;max-width:100%;font-size:clamp(21px,6.4vw,27px);line-height:1.12;text-wrap:balance;animation:fc-rise var(--fc) ease-out both;--at:58%}
.fc-title-part{white-space:nowrap}
.fc-stat{display:inline-flex;align-items:center;gap:8px;margin:0;padding:6px 14px 6px 8px;border-radius:999px;background:linear-gradient(#e9f7df,#cdeabd);border:2px solid #4f9a47;box-shadow:0 2px 0 #2f6b2c,0 0 14px #9be38b88;
 font:800 18px/1 system-ui,sans-serif;color:#1f5a22;animation:fc-stat var(--fc) cubic-bezier(.2,.9,.3,1.3) both}
.fc-arrow{width:24px;height:24px;border-radius:7px;background:#3c9a45;position:relative}
.fc-arrow::before{content:'';position:absolute;left:5px;top:4px;border:7px solid transparent;border-bottom:9px solid #fff;border-top:0}
.fc-arrow::after{content:'';position:absolute;left:9px;top:12px;width:6px;height:7px;background:#fff;border-radius:1px}
@keyframes fc-glow{0%{opacity:0;transform:scale(.5)}30%{opacity:.85;transform:scale(.9)}40%{opacity:1;transform:scale(1.15)}100%{opacity:.75;transform:scale(1)}}
@keyframes fc-rays-in{0%,38%{opacity:0;scale:.3}54.6667%,100%{opacity:.85;scale:1}}
@keyframes fc-rays-turn{to{rotate:360deg}}
@keyframes fc-ring{0%,38%{opacity:0;transform:scale(.4)}44%{opacity:1}70%,100%{opacity:0;transform:scale(1.7)}}
@keyframes fc-from{0%{opacity:1;transform:none;filter:none}10%{transform:translateX(-3px) rotate(-3deg)}16%{transform:translateX(3px) rotate(3deg) scale(1.03)}22%{transform:translateX(-3px) rotate(-3deg) scale(1.05)}28%{transform:translateX(3px) rotate(3deg) scale(1.07)}34%{opacity:1;transform:scale(1.1);filter:brightness(2.4) saturate(.4)}40%,100%{opacity:0;transform:scale(1.12);filter:brightness(3)}}
@keyframes fc-to{0%,38%{opacity:0;transform:scale(.35)}46%{opacity:1;transform:scale(1.18,1.12)}54%{transform:scale(.92,1.06)}62%{transform:scale(1.05,.97)}70%,100%{opacity:1;transform:none}}
@keyframes fc-flash{0%,28%{opacity:0;transform:scale(.4)}38%{opacity:1;transform:scale(1.15)}56%,100%{opacity:0;transform:scale(1.3)}}
@keyframes fc-spark{0%,40%{opacity:0;transform:rotate(var(--a)) translateY(0) scale(.2)}48%{opacity:1}72%{opacity:1;transform:rotate(var(--a)) translateY(calc(-1*var(--d))) scale(var(--s)) rotate(90deg)}86%,100%{opacity:0;transform:rotate(var(--a)) translateY(calc(-1.15*var(--d))) scale(.4) rotate(140deg)}}
@keyframes fc-rise{0%,55%{opacity:0;transform:translateY(10px)}70%,100%{opacity:1;transform:none}}
@keyframes fc-stat{0%,62%{opacity:0;transform:translateY(18px) scale(.7)}74%{opacity:1;transform:translateY(-4px) scale(1.12)}82%,100%{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
 .form-ceremony *,.form-ceremony{animation:none!important}
 .fc-from,.fc-flash,.fc-ring,.fc-spark{display:none}
 .fc-to,.fc-glow,.fc-stat,.form-ceremony h1{opacity:1;transform:none}
 .fc-rays{opacity:.85}
}
@media (max-height:700px){.form-help-list{gap:6px}.form-help-list li{padding:6px 10px 6px 30px;font-size:12.5px;line-height:1.3}.form-help-list li::before{top:10px}}
@media (max-height:700px){.fc-stage{height:clamp(150px,30vh,200px)}.fc-stat{font-size:16px}}
/* AC30: the form stands in for the hero in portraits and on Home; Home breathes about
   the feet (the AB25 form-only breathing exception), still under reduced motion.
   AC80: a defeat shows the form's own sad pose (front-defeat.png), upright and only
   slightly cooled, like the red panda's defeat portrait. */
.defeat-celebration .victory-hero>img.hero-form-portrait{filter:saturate(.85) drop-shadow(0 7px 3px #62637b48)}
.victory-hero>img.hero-form-portrait{width:168px}
.home-hero.is-form .hero-form-still{transform-box:fill-box;transform-origin:50% 100%;animation:form-home-breath 3.2s ease-in-out infinite}
@keyframes form-home-breath{50%{transform:scale(1.018,.982)}}
.is-paused .home-hero.is-form .hero-form-still,.page-hidden .home-hero.is-form .hero-form-still{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.home-hero.is-form .hero-form-still{animation:none}}
#modal .form-help+button.secondary{display:flex;align-items:center;justify-content:center;width:100%}
/* AC43 (build 44): the rare Reset is a small round icon in the title row's left corner,
   the same disc as the (?) on the right (44px target), opening the confirmation sheet. */
.form-heading .form-reset-corner{grid-column:1;grid-row:1;justify-self:start;display:grid;place-items:center;width:var(--tier-compact,44px);height:var(--tier-compact,44px);min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background:none;box-shadow:none}
.form-heading h1{grid-row:1}
.form-heading .help-button{grid-row:1}
.form-reset-disc{box-sizing:border-box;display:grid;place-items:center;width:var(--help-disc,34px);height:var(--help-disc,34px);padding:3px;border:2px solid var(--help-ring,#aea0b9);border-radius:50%;background:var(--help-face,#3e374b);box-shadow:0 2px var(--help-drop,#211e29)}
.form-reset-disc img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.form-reset-corner:disabled{opacity:1}
.form-reset-corner:not(:disabled):active .form-reset-disc{transform:translateY(2px);box-shadow:none}
.form-reset-corner:focus-visible{outline-offset:-3px}
.form-wallet .form-token-art,.form-reset-wallet .form-token-art{width:18px;height:18px;object-fit:contain}
.form-reset-wallet{display:inline-flex;align-items:center;gap:5px;margin:0;font:800 14px/1.2 system-ui,sans-serif;color:#3a2c22}
.form-reset-wallet .form-token-art{width:24px;height:24px}
.form-reset-wallet.is-short{color:#9b4339}
/* AC42 (build 44): Form Shards detail (AC98) → one Panda Chest for 60 shards. One row:
   chest art, name and progress, a plump Exchange with the shard price. */
.form-chest-offer{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;margin-top:4px;padding:8px 10px;border-radius:14px;border:2px solid #c9ac77;background:#f4e7c5;box-shadow:inset 0 1px #fff8;text-align:left}
.form-chest-offer-art img{display:block;width:52px;height:52px;object-fit:contain}
.form-chest-offer-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.form-chest-offer-copy b{font:800 15px/1.15 system-ui,sans-serif;color:#3a2c22}
.form-chest-offer-copy small{font:700 12px/1.2 system-ui,sans-serif;color:#6a5a45}
#modal .form-chest-offer .form-chest-exchange{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:auto;min-width:104px;margin:0;padding:4px 12px}
/* AC42: the Panda Chest picker. The server's choices as plump tiles; the picked one
   wears the gold ring; Open stays disabled until one is picked. Fixed fit, no scroll. */
.form-chest-picker{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.form-chest-picker h1{margin:0}
.form-chest-picker .eyebrow{margin:0}
.form-chest-picker p{margin:0;font:700 14px/1.3 system-ui,sans-serif;color:#4f3e2c}
.form-chest-picker-art{position:relative;display:grid;place-items:center;width:clamp(84px,15vh,112px);aspect-ratio:1}
.form-chest-picker-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 3px #4a311a55)}
.form-chest-picker-art .backpack-count{position:absolute;right:-6px;bottom:2px}
.form-chest-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
.form-chest-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;min-width:0;margin:0;padding:8px 4px 7px;border-radius:16px;
 border:3px solid #c9ac77;background:linear-gradient(var(--cream-200),#efdcb0);color:#3a2c22;box-shadow:inset 0 1px #fff,0 3px 0 #a58460;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease}
.form-chest-choice:active{transform:translateY(2px);box-shadow:inset 0 1px #fff,0 1px 0 #a58460}
.form-chest-choice.is-picked{border-color:#f0b43c;background:radial-gradient(ellipse 70% 60% at 50% 40%,var(--card-face) 0 35%,var(--gold-100) 75%,#f8d684 100%);box-shadow:inset 0 1px #fff,0 0 0 2px var(--honey-200),0 0 12px 2px #ffc64a99,0 3px 0 #b07a1c}
.form-chest-choice.is-picked::after{content:'';position:absolute;right:-5px;top:-5px;width:20px;height:20px;border-radius:50%;background:#3e9c4c;border:2px solid var(--cream-300);box-shadow:0 1px 2px #0004}
.form-chest-choice.is-picked::before{content:'';position:absolute;right:2px;top:-1px;z-index:1;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.form-chest-choice-art{display:grid;place-items:center;width:52px;height:52px}
.form-chest-choice-art img{width:100%;height:100%;object-fit:contain}
.form-chest-choice-art .gear-key-art,.form-chest-choice-art svg{max-width:100%;max-height:100%}
.form-chest-choice b{font:800 16px/1.1 system-ui,sans-serif}
.form-chest-choice small{font:700 11.5px/1.2 system-ui,sans-serif;color:#5c4938;overflow-wrap:anywhere;hyphens:auto}
.form-item-receipt .login-reward img{width:56px;height:56px;object-fit:contain}
@media (prefers-reduced-motion:reduce){.form-chest-choice{transition:none}}
/* AC89 (build 48): the Home hero artwork is a tap target that laughs (role=button, no
   face of its own). AC81 reopened (build 51): no form badge on Home; the Forms entry
   is again only the Equipment form tile. */
.home-hero>.home-hero-tap{display:block;width:100%;height:100%;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline-offset:2px}
.home-hero>.home-hero-tap>svg{pointer-events:none;transform-box:fill-box;transform-origin:50% 100%}
.home-hero.is-laughing>.home-hero-tap>svg{animation:hero-laugh-chuckle var(--laugh-ms,1250ms) linear both}
@keyframes hero-laugh-chuckle{
 0%{transform:none}
 8%{transform:translateY(-7px) rotate(-2.5deg)}
 17%{transform:translateY(0) rotate(0)}
 25%{transform:translateY(-6px) rotate(2.5deg)}
 34%{transform:translateY(0) rotate(0)}
 42%{transform:translateY(-4px) rotate(-1.8deg)}
 51%{transform:translateY(0) rotate(0)}
 62%{transform:rotate(1.2deg)}
 78%{transform:rotate(-.6deg)}
 100%{transform:none}
}
@media (prefers-reduced-motion:reduce){.home-hero.is-laughing>.home-hero-tap>svg{animation:none}}
/* AC53 (build 53): Polish "Wymień" carries an accent above the cap height, so its
   label and price sit 2px lower in the face (shared rule in story-ui.css). */
:lang(pl) #modal .form-chest-exchange{--price-face-cjk:2px}

/* AC255: reuse the collection higher-tier star colour and the existing star glyph. */
.form-card-stars.is-high i.on{color:#ff4f7a;filter:drop-shadow(0 1px #8a1838)}
/* The existing label-over-price rule needs a vertical group on both Form actions. */
#modal button:is(.form-activate,.form-upgrade){display:flex;flex-direction:column}

/* AC339 P3.1: same card box and AC52 shared character scale. Only the frame
   changes: back plate, character, then the lower rim, all pixel-registered. */
.form-card,.form-card.is-active{border-color:transparent;background:none;box-shadow:none}
.form-card:active:not(:disabled){box-shadow:none}
.form-card:disabled:not(.is-active),.form-card.is-locked canvas{opacity:1}
.form-card-art{isolation:isolate}
.form-card-art .form-frame-back,.form-card-art .form-frame-front{position:absolute;left:15%;bottom:0;width:70%;height:auto;aspect-ratio:768/672;object-fit:contain;pointer-events:none}
.form-frame-back{z-index:1}
.form-card canvas{position:relative;z-index:2;clip-path:var(--form-frame-clip)}
.form-frame-front{z-index:3}
.form-card.is-locked :is(canvas,.form-frame-back,.form-frame-front){filter:grayscale(1) contrast(.85) brightness(.8)}
.form-card .form-check,.form-card-tag{z-index:3}

/* AC347 revalidation: one continuous paint over the complete back rim, with
   only the registered lower rim in front. A static normal-width hexagon stroke
   gives 3px of outward glow on every edge; it is never scaled or blurred. */
.form-card.is-active .form-card-art::before{content:none}
.form-card-art .form-frame-glow{position:absolute;left:15%;bottom:0;width:70%;height:auto;aspect-ratio:768/672;overflow:visible;z-index:0;pointer-events:none}
.form-frame-glow polygon{fill:none;stroke:var(--active-top);stroke-width:6px;stroke-linejoin:round}
.form-card .form-check,.form-card-tag{z-index:4}

/* AC348/AC360: Equipment reuses the Forms hexagon; target/action stay, no check. */
.form-tile,.form-tile.is-on{border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
/* AC357: one continuous portrait is free above the frame's widest point.
   The complete 768:672 back rim and lower front rim share the same registration.
   Clip coordinates are mapped into the portrait's square, raised by 12.5%. */
.form-tile .form-entry-frame,.form-tile .form-entry-front{position:absolute;left:0;top:6.25%;width:100%;height:87.5%;object-fit:contain;filter:none;z-index:1}
.form-tile .form-entry-portrait{position:absolute;left:0;top:-12.5%;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px var(--vs-ink));z-index:2;
 clip-path:polygon(0 0,100% 0,100% 62.5%,97.916667% 62.5%,73.958333% 103.90625%,26.041667% 103.90625%,2.083333% 62.5%,0 62.5%)}
.form-tile .form-entry-front{z-index:3}
.form-tile.is-on .form-entry-frame{filter:drop-shadow(0 0 2px var(--active-shine))}
.form-tile.is-locked :is(.form-entry-frame,.form-entry-front,.form-entry-portrait){opacity:1;filter:grayscale(1) contrast(.85) brightness(.8)}
/* Visual polish (bugs lane): the dialog's valid action reads as the action. An enabled Activate / Unlock /
   Upgrade wears the warm ready face (the Collectibles ready action); disabled keeps the grey disabled face
   and Close stays the plain secondary, so the button state always matches the selected form's state. */
#modal button:is(.form-activate,.form-upgrade):not(:disabled){--small-top:#ffc76a;--small-bottom:#f0892c;--small-edge:#3b1f14;--small-lip:#b65a1d;--small-shine:#ffe9b8}

/* b148 AC706: a mixed price shows each part it charges (Shards first, then Bamboo) on the one Upgrade face. */
.form-cost-part{display:inline-flex;align-items:center;gap:2px}
.form-cost.is-mixed{gap:4px}
.form-cost>i{font-style:normal;font-weight:800;opacity:.75}
/* b148 AC708: current → next in the stat boxes (numbers only); the arrow is lighter so the values lead. */
.form-facts b .form-arrow{font-style:normal;color:#8a6a3a;white-space:nowrap}

/* Shard exchange uses the shared Exchange art, quote and 44px quantity controls. */
.form-shard-heading{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:4px;width:100%}
.form-shard-heading h1{min-width:0;margin:0}
.form-shard-heading .help-button{justify-self:end}
.exchange-view [data-offer="panda-shards"] .exchange-card-limit{white-space:normal}
/* Reserve real quota / UTC-date rows inside the existing scrolling catalog. */
.exchange-view .exchange-catalog [data-offer="panda-shards"]{grid-template-rows:36px 62px minmax(48px,auto) 56px}
.exchange-view .exchange-catalog [data-offer="panda-shards"] .exchange-item-info{grid-template-rows:36px 62px minmax(48px,auto)}
@media(max-height:730px){
 .exchange-view .exchange-catalog [data-offer="panda-shards"]{grid-template-rows:34px 54px minmax(48px,auto) 56px}
 .exchange-view .exchange-catalog [data-offer="panda-shards"] .exchange-item-info{grid-template-rows:34px 54px minmax(48px,auto)}
}


/* Visual polish r2 (meta lane). #146: the wallet is a centred row of icon chips (art + number, full name in the
   accessible label) with 16px side margins, not an edge-to-edge sentence. #294: a locked form whose Activate/Unlock
   is enabled wears a green Ready tag. #58: the corner Reset disc draws its arrows in the (?) ink, so the two header
   discs read as one pair; the Active pill is gone and the check badge is the one active marker. */
.form-wallet{gap:8px;margin:4px 16px 0}
.form-wallet>span{gap:5px;min-height:28px;padding:2px 10px 2px 6px;border:1.5px solid #d3bb8b;border-radius:999px;background:#f4e6c6}
.form-wallet>span>b{font:800 14px/1 system-ui,sans-serif;font-variant-numeric:tabular-nums;color:#3a2c22}
.form-wallet>span>img,.form-wallet>span>.form-token-art{width:22px;height:22px}
.form-card-tag.is-ready{position:static;transform:none}
#modal .form-card.is-locked:disabled:has(.form-card-tag.is-ready){filter:none}
.form-reset-disc img{filter:brightness(0) invert(94%) sepia(18%) saturate(420%) hue-rotate(345deg)}
.form-reset-corner:disabled .form-reset-disc img{opacity:.55}
.form-unlock-offer{display:grid;justify-items:center;gap:8px;text-align:center}
.form-unlock-offer .form-card-art{width:180px}
.form-unlock-offer canvas{position:relative;z-index:2;width:180px;height:auto;clip-path:var(--form-frame-clip)}

/* AC826 (build 190): the equipped look stands on a wooden weapon stand at the panda's left, on the deck at his feet.
   The stand shares the portrait's sheet units (240 units = the hero box width), so it scales with the hero. A new
   look hops onto the stand with one glint; reduced motion shows it standing. */
.home-hero>.home-weapon-stand{position:absolute;left:-41%;bottom:-3.07%;width:58.33%;height:103.07%;overflow:visible;pointer-events:none}
.home-weapon-stand .home-stand-weapon{transform-box:fill-box;transform-origin:50% 100%}
.home-weapon-stand.is-fresh .home-stand-weapon{animation:home-stand-equip .95s cubic-bezier(.34,1.56,.64,1) var(--stand-delay,0ms) both}
@keyframes home-stand-equip{0%{opacity:0;transform:translateY(-14%) scale(.92);filter:brightness(1.8)}45%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1.6) drop-shadow(0 0 5px #fff3b0)}100%{filter:none}}
@media (prefers-reduced-motion:reduce){.home-weapon-stand.is-fresh .home-stand-weapon{animation:none}}
