/* Moonleaf's own portrait shell; no global button or scene overrides. */
#online.moonleaf-view{background:#12343e url('/art/moonleaf-v1/background.png') center/cover}
#online.moonleaf-view #content{padding:8px 14px 0;overflow:hidden}
#online.moonleaf-view #tabs{background:linear-gradient(transparent,#10282bde);border:0}
.moonleaf-screen{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px;color:var(--cream-300)}
.moonleaf-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;filter:drop-shadow(0 2px 3px #082d30)}
.moonleaf-heading .eyebrow{color:#bceac9;font:700 10px/1.3 system-ui;letter-spacing:1.2px}
#online.moonleaf-view .moonleaf-heading h1{font:32px/1.05 Lucky;margin:2px 0 4px;color:#ffebaf}
.moonleaf-heading small{font:700 12px/1.2 system-ui;color:#f8df9c}
/* AC124 (build 55, ASC ACH6U6Hq8eZ_puljBSLnbhE): the tickets and seals boxes are
   exactly 50/50: two equal grid columns, as wide as the longer box needs (the
   grid's max-content), centred, and halved equally when the row is narrower. */
.moonleaf-wallet{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:10px;flex:none;align-self:center;width:max-content;max-width:100%}
.moonleaf-wallet>span{display:grid;grid-template-columns:32px auto;column-gap:5px;min-width:0;padding:5px 10px 5px 5px;border:1px solid #b59a66;border-radius:14px;background:#102b31e8}
.moonleaf-wallet img{grid-row:1/3;width:30px;height:32px;object-fit:contain;align-self:center}
.moonleaf-wallet b{font:20px/1 Lucky;color:#ffecb3}
.moonleaf-wallet small{font:10px/1.2 system-ui;color:#d3dac5}
.moonleaf-wheel-space{flex:1;min-height:125px;display:grid;place-items:center;container-type:size;isolation:isolate}
.moonleaf-wheel{position:relative;width:min(100cqw,100cqh,385px);aspect-ratio:1;filter:drop-shadow(0 7px 7px #06151fc0)}
/* The disc turns through the individual `rotate` property (showMoonleafDraw
   animates only that). Prize art is radial: each sector has a fixed
   --moonleaf-sector-angle (its top faces the rim) and moves with its wedge, so
   nothing spins on its own axis (owner G04, build 21). */
.moonleaf-disc{position:absolute;inset:15%;border-radius:50%;overflow:hidden;background:conic-gradient(from -22.5deg,var(--gold-50) 0deg 44deg,#57452d 44deg 45deg,#b8e3c8 45deg 89deg,#57452d 89deg 90deg,var(--gold-50) 90deg 134deg,#57452d 134deg 135deg,#b8e3c8 135deg 179deg,#57452d 179deg 180deg,var(--gold-50) 180deg 224deg,#57452d 224deg 225deg,#b8e3c8 225deg 269deg,#57452d 269deg 270deg,var(--gold-50) 270deg 314deg,#57452d 314deg 315deg,#edb64c 315deg 359deg,#57452d 359deg 360deg);rotate:var(--moonleaf-turn,0deg);will-change:rotate}
.moonleaf-rim{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
/* Sectors carry prize art only; amounts appear in the receipt and Odds (owner,
   2026-09-25). A square box whose centre is the sector centre, so the landed
   prize's art (single icon or pile) centres exactly under the pointer tip. */
.moonleaf-sector{position:absolute;width:20%;aspect-ratio:1;translate:-50% -50%;rotate:var(--moonleaf-sector-angle,0deg)}
.moonleaf-sector>img{position:absolute;left:5%;top:5%;width:90%;height:90%;object-fit:contain;filter:drop-shadow(0 1px 0 #fff9) drop-shadow(0 2px 2px #3c2f1f55)}
.moonleaf-sector.is-pile>img{width:66%;height:66%}
.moonleaf-sector.is-pile>img:nth-child(1){left:17%;top:0}
.moonleaf-sector.is-pile>img:nth-child(2){left:-4%;top:34%}
.moonleaf-sector.is-pile>img:nth-child(3){left:38%;top:34%}
.moonleaf-sector>img.moonleaf-sector-seal{left:auto;top:auto;right:-16%;bottom:-12%;width:46%;height:46%;padding:2px;border:2px solid #d9ad50;border-radius:50%;background:#174543;filter:drop-shadow(0 1px 1px #3c2f1f88)}
/* I09: the hub's gold ring is a circular progressbar of Luck toward the pity
   guarantee. The border paints a conic fill up to --moonleaf-luck (registered so
   it interpolates) over a dark groove; fillMoonleafHub() animates it. */
@property --moonleaf-luck{syntax:'<percentage>';inherits:false;initial-value:0%}
.moonleaf-hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:23%;aspect-ratio:1;box-sizing:content-box;border:5px solid transparent;outline:3px solid #3c3326;border-radius:50%;background:radial-gradient(circle at 40% 24%,#42786b,#113c3d) padding-box,conic-gradient(#e9b440 0,var(--honey-200) var(--moonleaf-luck,0%),#4b3f28 0) border-box;transition:--moonleaf-luck .9s cubic-bezier(.3,.7,.2,1);display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:inset 0 0 0 2px #6f6542;color:#fff1a9}
.moonleaf-hub b{font:clamp(21px,8cqh,34px)/1 Lucky}
.moonleaf-hub span{font:700 11px/1.1 system-ui}
/* pointer.png's tip/axis sits at x=99 of its 256px canvas, not at its centre. The
   image fills the box width (contain, width-limited), so place that x on the wheel
   centre: the landed prize then sits exactly under the tip (owner N5, 2026-09-25). */
.moonleaf-pointer{position:absolute;z-index:3;left:calc(50% - 24% * 99 / 256);top:-3%;width:24%;height:28%;object-fit:contain;filter:drop-shadow(0 2px 1px #1119);pointer-events:none}
.moonleaf-wheel.is-spinning .moonleaf-rim{filter:drop-shadow(0 0 7px #f2d67588)}
.moonleaf-luck{flex:none;text-align:center;padding:0 6px;filter:drop-shadow(0 2px #12353a)}
/* Build 49 gate (pl at 375x812): an inline <b> inherits the 23px strut of its
   block, so a two-line luck goal took 46px and pushed the tools 3px past the
   fixed-height screen. As a block it keeps its own 1.2 line height. */
.moonleaf-luck>b{display:block;font:700 12px/1.2 system-ui}
/* AC125 (build 55, ASC AG8DtyDgDzBhIxnyV7SZjgo): more air between the luck goal
   and its bar (was 4px). */
.moonleaf-luck-meter{display:flex;align-items:center;gap:7px;margin-top:8px}
.moonleaf-luck-meter small{flex:none;font:700 11px/1 system-ui;color:#ffe68a}
.moonleaf-luck-track{flex:1;height:7px;border:1px solid #c4b16d;background:#092b30;border-radius:8px;overflow:hidden}
.moonleaf-luck-track i{height:100%;display:block;background:linear-gradient(90deg,#a7cf77,#ffe68a)}
.moonleaf-skin-preview{display:grid;grid-template-columns:45px minmax(0,1fr) auto;align-items:center;gap:7px;flex:none;min-height:64px;width:100%;padding:5px 10px;border:2px solid #ba9f59;border-radius:15px;background:linear-gradient(120deg,#143b40f0,#28605ad9);color:var(--gold-50);text-align:left;box-shadow:inset 0 1px #fff4,0 3px #102827}
.moonleaf-saber{display:grid;place-items:center;position:relative}
.moonleaf-saber:before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse,#e5d27b66,transparent 70%)}
.moonleaf-saber img{height:49px;width:40px;object-fit:contain;transform:rotate(24deg);position:relative}
.moonleaf-skin-preview strong{display:block;font:21px/1 Lucky}
.moonleaf-skin-preview small{display:block;font:12px/1.2 system-ui;color:#d3e3bc;margin-top:5px}
.moonleaf-skin-preview>b{font:15px/1 Lucky;color:var(--honey-200)}
.moonleaf-controls{flex:none}
.moonleaf-spin-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.moonleaf-screen .moonleaf-spin-buttons .secondary{height:auto;min-height:64px;margin:3px 0 5px;padding:6px 5px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;text-align:center;font-size:24px}
.moonleaf-cost{display:flex;align-items:center;justify-content:center;gap:2px;font:700 12px/1 system-ui;color:#493e2b;text-shadow:none;-webkit-text-stroke:0}
.moonleaf-cost img{width:22px;height:18px;object-fit:contain}
.moonleaf-spin-note{display:block;text-align:center;font:11px/1.25 system-ui;color:#e4e9cd;margin:5px 0 0}
.moonleaf-tools{display:grid;grid-template-columns:1fr 1fr;gap:4px;flex:none;align-items:center}
.moonleaf-tools>button,.moonleaf-tools>label{position:relative;min-height:44px;border:0;border-radius:10px;background:#102d32a8;color:#fce9c4;padding:5px 3px;text-align:center;font:700 11px/1.15 system-ui;display:flex;align-items:center;justify-content:center;gap:3px}
.moonleaf-tools>button>img{width:26px;height:26px;object-fit:contain}
.moonleaf-tools input{flex:none;accent-color:#c6d99b;width:18px;height:18px;margin:0}
/* Only Moonleaf's own dialogs (a moonleaf-* root, which modal() inserts as a
   direct child): Events keeps its own 16px shell. The shared .paired-pager
   (Events, Moonleaf guide and calendar) lives in story-ui.css. */
#modal:has(>[class^="moonleaf-"]){width:min(420px,calc(100vw - 24px));padding:18px;overflow:hidden}
/* AC460: wheel results are the shared reward claim receipt (story-ui.css). A Moon
   Blessing prize keeps its seal marker on the art's lower right, on the reward
   tile and in its read-only item detail. */
#modal :is(.reward-tile-face,.backpack-detail-art)>img.moonleaf-reward-seal{position:absolute;top:46%;right:7%;width:30%;height:30%;box-sizing:border-box;padding:1px;border:1.5px solid #d9ad50;border-radius:50%;background:#174543;filter:drop-shadow(0 1px 1px #3c2f1f88)}
.moonleaf-exchange{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px}
.moonleaf-exchange h1{margin:0;font:28px/1.1 Lucky}
.moonleaf-exchange p{font:14px/1.4 system-ui;margin:0}
.moonleaf-exchange>small{font:12px/1.3 system-ui;color:#53645a}
.moonleaf-weapon-stage{position:relative;width:100%;height:180px;display:grid;place-items:center;isolation:isolate}
.moonleaf-weapon-stage:before{content:'';position:absolute;inset:0;z-index:-1;background:repeating-conic-gradient(from 0deg,#dcc46a55 0deg 12deg,transparent 12deg 30deg);mask-image:radial-gradient(ellipse,#0003,transparent 70%);animation:skill-spotlight-turn 28s linear infinite}
.moonleaf-weapon-stage img{height:160px;width:120px;object-fit:contain;transform:rotate(22deg);filter:drop-shadow(0 4px 5px #6b794c66)}
.moonleaf-exchange.is-earned .moonleaf-weapon-stage img{animation:moonleaf-reveal .65s cubic-bezier(.18,.85,.2,1.2) both}
.moonleaf-exchange-cost{display:flex;align-items:center;gap:8px;padding:8px 14px;background:var(--row-inset);border-radius:13px;font-size:16px}
.moonleaf-exchange-cost img{width:30px;height:30px;object-fit:contain}
#modal .moonleaf-exchange .secondary{width:100%;margin:4px 0 0;min-height:56px}
.moonleaf-tickets h1,.moonleaf-odds h1,.moonleaf-help h1,.moonleaf-calendar h1{font:28px/1.1 Lucky;margin:0 0 12px}
.moonleaf-tickets article{display:flex;align-items:center;gap:10px;padding:12px 0}
.moonleaf-tickets article>img{width:58px;height:64px;object-fit:contain;flex:none}
.moonleaf-tickets h2{font:22px/1.1 Lucky;margin:0 0 7px}
.moonleaf-tickets p,.moonleaf-help p,.moonleaf-odds p,.moonleaf-calendar p{font:14px/1.45 system-ui;margin:0 0 10px}
.moonleaf-tickets small{display:block;font:12px/1.4 system-ui}
.moonleaf-tickets>.secondary{width:100%}
/* The next-gift timer appears only once today's gift is taken (never beside an
   active claim), 8px under the button. */
.moonleaf-tickets>#moonleaf-gift-clock{margin-top:8px}
.moonleaf-tickets-closed{text-align:center}.moonleaf-tickets-closed>img{display:block;width:90px;height:105px;object-fit:contain;margin:14px auto}
.moonleaf-tickets>article:last-child{border-top:1px solid #bbaa7e;margin-top:12px}
.moonleaf-odds-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;gap:7px;margin:14px 0}
.moonleaf-odds-grid article{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 2px;background:var(--row-inset);border-radius:10px;text-align:center}
.moonleaf-odds-grid img{height:36px;width:36px;object-fit:contain}
.moonleaf-odds-grid strong{font:18px/1.1 Lucky}
.moonleaf-odds-grid small{font:10px/1.2 system-ui}
.moonleaf-odds-grid b{font:700 14px/1.2 system-ui;color:#365c47;margin-top:auto}
/* K08: every odds cell has one height; the grand duplicate rule sits below the grid. */
.moonleaf-odds-grid .moonleaf-odds-mark{font-size:.75em;line-height:0;margin-left:1px;color:#8a6420}
.moonleaf-odds>p.moonleaf-odds-footnote{margin:-6px 0 10px;font:12px/1.4 system-ui;color:#6b5634}
.moonleaf-calendar>.secondary,.moonleaf-help>.secondary{width:100%;margin:6px 0 0}
.moonleaf-calendar header{height:75px;display:flex;align-items:center;gap:14px;background:linear-gradient(90deg,#185651,#3e7460);border-radius:var(--vs-radius);padding:10px;color:var(--gold-50);margin-bottom:10px}
.moonleaf-calendar header>img{width:46px;height:61px;object-fit:contain}
.moonleaf-calendar header h1{margin:0}
.moonleaf-week{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin:12px 0 5px}
.moonleaf-week span{display:flex;flex-direction:column;align-items:center;padding:5px 1px;background:#dbbf8d;border-radius:5px;color:#4b4130}
.moonleaf-week small{font:10px/1.4 system-ui}
.moonleaf-week b{font:20px/1.2 Lucky}
.moonleaf-week .today{background:#386e5c;color:var(--shine-100)}
/* Visual polish r2 (finding 13): today is the gold cell with an ink outline; days already past are dimmed. */
.moonleaf-week span.today{background:linear-gradient(#ffe7a0,#f2bd52);color:#4b3214;box-shadow:inset 0 0 0 2px var(--vs-ink-text),0 2px #8a5a1e}
.moonleaf-week span.is-past{opacity:.5}
/* F02: a week's edition is the shared Events card (same art, tag and height), with
   no note paragraph or Play button. The pager keeps clear of the card's 4px lip
   (F05: faces never touch). */
/* G20: the grand sector / tiles show the Moonleaf Saber (or a Crest). */
.moonleaf-grand-saber{position:relative;display:block;flex:none}
.moonleaf-grand-saber>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:rotate(22deg);filter:drop-shadow(0 1px 0 #fff9) drop-shadow(0 2px 2px #3c2f1f66)}
/* On the wheel the blade lies along the sector's radial axis (tip to the rim). */
.moonleaf-sector.is-grand>.moonleaf-grand-saber{position:absolute;inset:8%}
.moonleaf-sector.is-grand>.moonleaf-grand-saber>img{transform:none}
.moonleaf-odds-grid article>.moonleaf-grand-saber{width:36px;height:36px}
.moonleaf-odds-grid .is-grand{background:#ffe5a0;box-shadow:inset 0 0 0 2px #d9ad50}
.moonleaf-crest-exchange{display:grid;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #c9ad7a}
.moonleaf-crest-balance{display:flex;align-items:center;justify-content:center;gap:8px;font:700 14px/1.2 system-ui}
.moonleaf-crest-balance img{width:30px;height:30px;object-fit:contain}
.moonleaf-crest-offers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#modal .moonleaf-crest-offers>button{min-width:0;min-height:48px;margin:0;padding:4px 2px;flex-direction:column;gap:2px;font-size:13px}
#modal .moonleaf-crest-offers>button img{width:22px;height:22px;object-fit:contain}
#modal .events-panel.moonleaf-calendar-event{margin:0;padding:0}
/* G03: the card sits straight in this panel (not the .event-pages grid), so it
   must span the whole Mon-Sun week row instead of shrinking to its content. */
#modal .moonleaf-calendar-event>.event-card{width:100%;box-sizing:border-box}
/* AC330: a bounded stack of 3–4 one-line Calendar entries, with 48px tap faces.
   This overrides only Calendar cards; Events and its paging geometry stay intact. */
#modal .events-panel.moonleaf-calendar-event{display:grid;gap:6px}
#modal .events-panel.moonleaf-calendar-event>.calendar-event-row{grid-template-columns:30px minmax(0,1fr) 22px;min-height:48px;margin:0;padding:5px 8px;gap:7px;border-width:2px;border-radius:var(--vs-radius);box-shadow:inset 0 2px #ffffff44,0 3px #4b3b38}
#modal .events-panel.moonleaf-calendar-event>.calendar-event-row>b{font:20px/1.2 Lucky;white-space:nowrap}
#modal .events-panel .calendar-event-row .calendar-event-art{display:grid;place-items:center;width:30px;height:30px}
#modal .events-panel .calendar-event-row .calendar-event-art img{position:static;grid-row:auto;width:28px;height:28px;object-fit:contain}
#modal .calendar-event-row .calendar-event-edge{display:grid;place-items:center;font:28px/1 Lucky;color:#ffda86}
#modal .calendar-event-row .calendar-event-edge .event-lock{position:static;width:14px;height:17px}
#modal .moonleaf-calendar>.paired-pager{margin-top:10px}
#modal .events-panel .event-moonleaf{background:linear-gradient(90deg,#173e46ee,#285955ba),url('/art/moonleaf-v1/background.png') center 25%/cover;border-color:#a1864e}
/* Event inventory stays on one screen even when all three item types are owned. */
/* I10: Get tickets = Gem exchange + three daily tasks (one screen, no scroll). */
/* AC297: the priced Buy action carries the total once. */
.moonleaf-buy-confirm .moonleaf-buy-summary{display:flex;align-items:center;justify-content:center;gap:14px;margin:8px 0 12px}
.moonleaf-buy-confirm .exchange-detail-art{width:64px;height:70px;margin:0;flex:none}
.moonleaf-buy-confirm .exchange-detail-art img{width:100%;height:100%;object-fit:contain}
.moonleaf-buy-confirm .exchange-detail-limit{margin:0;font-size:15px;text-align:left}
.moonleaf-buy-confirm .moonleaf-buy-wallet{display:flex;align-items:center;justify-content:center;gap:6px;margin:12px 0 0;font:600 14px/1.3 system-ui;color:#65543e}
.moonleaf-buy-wallet>img{width:24px;height:24px;object-fit:contain}
/* Visual polish v1: a balance short of the total reads red (bold), like other unaffordable costs. */
.moonleaf-buy-confirm .moonleaf-buy-wallet.is-short{color:#b3261e;font-weight:800}
.moonleaf-tickets.is-shop h1{margin-bottom:6px}
.moonleaf-tickets .moonleaf-ticket-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #bbaa7e}
.moonleaf-tickets .moonleaf-ticket-row>img{width:44px;height:48px}
.moonleaf-tickets .moonleaf-ticket-row h2{font-size:20px;margin:0 0 3px}
/* N04: the face is a centred flex box, so a lone Claim/Claimed label sits in the
   optical middle of the button (it was top-aligned in a block face).
   AC459 (build 105 feedback, owner 2026-10-13: "Czy da radę ujednolicić te
   przyciski? Jak lepiej pokazać buy by był w jednej lini a nie 2"): every Get
   tickets action (Free tickets, Welcome gift, Buy and the daily task Go / Claim /
   Claimed) is one compact button: the shared 32px face and a 16px one-line label in
   a stationary 108x44 target. This supersedes T02's 48px source faces and AC446's
   88px task width on this sheet only. Buy carries its unit Gem price on the label's
   line (icon 7px from the amount, AC53), so no row action grows. */
#modal .moonleaf-tickets.is-shop .secondary.moonleaf-sheet-action{box-sizing:border-box;flex:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;width:108px;min-width:108px;max-width:108px;height:44px;min-height:44px;max-height:44px;margin:0;padding:4px 6px;line-height:1.05;text-align:center}
#modal .moonleaf-tickets.is-shop .secondary.moonleaf-sheet-action .button-label{font-size:16px;white-space:nowrap}
.moonleaf-sheet-price{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;transform:translateY(-1px)}
.moonleaf-sheet-price img{width:18px;height:18px;object-fit:contain}
.moonleaf-sheet-price b{font:inherit}
/* The price shrinks with the label on press, like the compact face (AC150). */
:is(#online,#modal) .secondary.button-compact>.moonleaf-sheet-price{transition:scale var(--tap-t,.12s ease-out)}
:is(#online,#modal) .secondary.button-compact:not(:disabled):is(:active,.is-pressed)>.moonleaf-sheet-price{scale:.94}
@media(prefers-reduced-motion:reduce){:is(#online,#modal) .secondary.button-compact>.moonleaf-sheet-price{transition:none}}
/* P02 (build 27): the quantity is chosen in the purchase confirm (Bamboo Exchange
   layout, .exchange-offer-detail); the row's Buy shows the unit price. The
   confirm's actions are the grey Back arrow and Buy with the total. */
#modal:has(.moonleaf-buy-confirm)>.equipment-actions{grid-template-columns:84px minmax(0,1fr);align-items:start}
#modal:has(.moonleaf-buy-confirm)>.equipment-actions .back-arrow{display:grid;place-items:center;height:var(--tier-full-h);min-height: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:has(.moonleaf-buy-confirm)>.equipment-actions .back-arrow svg{width:52px;height:36px;overflow:visible}
#modal:has(.moonleaf-buy-confirm)>.equipment-actions [data-action="moonleaf.buy"]{display:flex;align-items:center;justify-content:center;gap:8px}
/* Visual polish v1: the confirm's price numeral is lettered like its label (display font, cream fill on the
   face's own ink), not a dark system-font number on the plate. */
#modal:has(.moonleaf-buy-confirm)>.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;filter:drop-shadow(0 var(--label-drop) var(--small-edge))}
#modal:has(.moonleaf-buy-confirm)>.equipment-actions .moonleaf-cost img{width:24px;height:24px}
#modal .moonleaf-buy-confirm .exchange-detail-art img{width:70px;height:76px}
.moonleaf-tickets .moonleaf-task-heading{font-size:20px;margin:12px 0 2px}
.moonleaf-task-list{list-style:none;margin:0;padding:0}
.moonleaf-task{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:7px 0}
.moonleaf-task+.moonleaf-task{border-top:1px solid #d7c69c}
.moonleaf-task strong{display:block;font:700 14px/1.25 system-ui}
.moonleaf-task-meter{display:block;height:7px;margin:5px 0 3px;border:1px solid #b09b6d;border-radius:8px;background:#e8dcc0;overflow:hidden}
.moonleaf-task-meter i{display:block;height:100%;background:linear-gradient(90deg,#8fbf62,#e6c95a)}
.moonleaf-task small{display:flex;align-items:center;gap:3px;font:12px/1.2 system-ui;color:#53645a}
.moonleaf-task small img{width:18px;height:18px;object-fit:contain;margin-left:2px}
.moonleaf-task.is-claimed strong{color:#6b705f}
.moonleaf-tickets .moonleaf-shop-note{margin-top:8px;color:#53645a}
/* Short phones: a new player's panel (welcome row + exchange + tasks) still fits. */
/* N05: a new player's first day adds the Welcome row to the Free ticket row, so
   that panel uses the short-phone rhythm on every height (no scroll). */
.moonleaf-tickets.is-shop.has-welcome h1{font-size:24px;margin-bottom:0}.moonleaf-tickets.has-welcome .moonleaf-ticket-row{padding:4px 0}.moonleaf-tickets.has-welcome .moonleaf-ticket-row h2{font-size:18px;margin-bottom:1px}.moonleaf-tickets.has-welcome .moonleaf-task-heading{font-size:18px;margin-top:6px}.moonleaf-tickets.has-welcome .moonleaf-task{padding:4px 0}.moonleaf-tickets.has-welcome .moonleaf-task-meter{margin:3px 0 2px}.moonleaf-tickets.has-welcome .moonleaf-shop-note{margin-top:4px}
/* Compact stress height on that one-time day: the decorative row tickets give
   their column to the copy (fewer wrapped lines), and lines that a control or
   title already says are dropped (free-row copy, the price shown on Buy, and the
   task footnote, which Rules repeats). */
@media(max-height:730px){.moonleaf-tickets.has-welcome .moonleaf-shop-note,.moonleaf-tickets.has-welcome .moonleaf-free-row small,.moonleaf-tickets.has-welcome .moonleaf-ticket-row>img{display:none}.moonleaf-tickets.has-welcome .moonleaf-ticket-row{grid-template-columns:minmax(0,1fr) auto}}
@media(max-height:730px){.moonleaf-tickets.is-shop h1{font-size:24px;margin-bottom:0}.moonleaf-tickets .moonleaf-ticket-row{padding:4px 0}.moonleaf-tickets .moonleaf-ticket-row h2{font-size:18px;margin-bottom:1px}.moonleaf-tickets .moonleaf-task-heading{font-size:18px;margin-top:6px}.moonleaf-task{padding:4px 0}.moonleaf-task-meter{margin:3px 0 2px}.moonleaf-tickets .moonleaf-shop-note{margin-top:4px}}
@keyframes moonleaf-reveal{from{transform:translateY(15px) rotate(8deg) scale(.8);opacity:0}to{transform:rotate(22deg);opacity:1}}
@media(max-height:730px){.moonleaf-screen{gap:4px}#online.moonleaf-view #content{padding:4px 10px 0}#online.moonleaf-view .moonleaf-heading h1{font-size:28px}.moonleaf-heading .eyebrow{display:none}.moonleaf-wallet>span{padding-top:2px;padding-bottom:2px}.moonleaf-skin-preview{min-height:55px;padding:3px 8px}.moonleaf-saber img{height:43px}.moonleaf-screen .moonleaf-spin-buttons .secondary{min-height:60px}.moonleaf-weapon-stage{height:132px}.moonleaf-weapon-stage img{height:122px}.moonleaf-tickets article{padding:7px 0}.moonleaf-tickets>article:last-child{margin-top:6px}.moonleaf-calendar header{height:62px}.moonleaf-exchange{gap:6px}}
@media(prefers-reduced-motion:reduce){.moonleaf-hub{transition:none}.moonleaf-weapon-stage:before,.moonleaf-exchange.is-earned .moonleaf-weapon-stage img{animation:none}.moonleaf-disc{will-change:auto}}
/* Compact phone with browser chrome: reserve wheel space, not tiny actions. */
@media(max-height:600px){
 .moonleaf-screen{gap:3px}
 #online.moonleaf-view .moonleaf-heading h1{font-size:24px;margin:0 0 2px}
 .moonleaf-heading small{font-size:10px}
 .moonleaf-wallet img{width:24px;height:26px}
 .moonleaf-wallet>span{grid-template-columns:24px auto;padding:2px 8px 2px 4px}
 .moonleaf-wallet b{font-size:16px}.moonleaf-wallet small{font-size:9px}
 .moonleaf-skin-preview{min-height:44px;grid-template-columns:35px minmax(0,1fr) auto;padding:3px 8px}
 .moonleaf-saber img{height:34px;width:30px}.moonleaf-skin-preview strong{font-size:18px}
 .moonleaf-skin-preview small{font-size:11px;margin-top:3px}
 .moonleaf-spin-note{display:none}
 .moonleaf-luck>b{font-size:11px}.moonleaf-luck-meter{margin-top:5px}
}
/* T01 (build 29): the Get tickets "!" read as faint over the leafy backdrop. On
   this host it is a larger, fully opaque badge with a dark halo, stacked above
   the tools row and the wheel art; the button face behind it is opaque too.
   It still stands mostly above the button (P01): only its foot overlaps. */
.moonleaf-tools{position:relative;z-index:4}
.moonleaf-tools>button[data-action="moonleaf-tickets"]{background:#0f2b30f2;box-shadow:inset 0 0 0 1px #c9b07a66}
.moonleaf-tools .attention-badge.attention-top{z-index:6;top:-16px;left:6px;width:18px;height:18px;border-width:2px;border-radius:6px;font-size:14px;opacity:1;mix-blend-mode:normal;filter:none;box-shadow:inset 0 1.5px #ffb8b8,0 0 0 2px var(--cream-250),0 2px 0 2px #3a0d12,0 0 7px 3px #071a1ecc}
/* T02 (build 29): Get tickets as cards. A header with the ticket wallet, one
   card per source (Free ticket, Welcome gift, Gem exchange) and one Daily tasks
   card with thick progress bars and reward chips. Every action is the same
   108px small button (fits "Odebrano"); a claimed one keeps a green done face. One screen, no scroll. */
.moonleaf-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 4px}
.moonleaf-tickets.is-shop .moonleaf-sheet-head h1{margin:0;min-width:0}
.moonleaf-sheet-wallet{display:flex;align-items:center;gap:4px;flex:none;padding:3px 10px 3px 5px;border:1.5px solid #b59a66;border-radius:999px;background:#163c41;color:#ffecb3;box-shadow:inset 0 1px #ffffff22}
.moonleaf-sheet-wallet img{width:24px;height:24px;object-fit:contain}
.moonleaf-sheet-wallet b{font:18px/1 Lucky}
.moonleaf-sheet-card{margin-top:8px;padding:8px 10px;border:1.5px solid #d3bd8a;border-radius:14px;background:var(--cream-50);box-shadow:inset 0 1px #fff,0 2px 0 #dcc795}
.moonleaf-tickets .moonleaf-ticket-row.moonleaf-sheet-card{padding:8px 10px;border-bottom:1.5px solid #d3bd8a}
.moonleaf-tickets .moonleaf-ticket-row.moonleaf-sheet-card>img,.moonleaf-sheet-icon{width:44px;height:44px}
.moonleaf-sheet-icon{display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 40% 30%,#f5ecff,#dccdf2);box-shadow:inset 0 0 0 1.5px #b9a2dc}
.moonleaf-sheet-icon img{width:30px;height:30px;object-fit:contain}
.moonleaf-tickets .moonleaf-ticket-row h2{font-size:19px;color:#283543}
.moonleaf-tickets .moonleaf-ticket-row small{color:#53645a}
.moonleaf-tickets .moonleaf-shop-left{font-weight:700;color:#6a5a3a}
.moonleaf-free-row:not(.is-claimed){border-color:#d2a94a;background:linear-gradient(var(--cream-250),#fbe9b4)}
.moonleaf-free-row.is-claimed{background:#f6f2e4}
.moonleaf-task-card{padding:6px 10px 8px}
.moonleaf-tickets .moonleaf-task-card .moonleaf-task-heading{display:flex;align-items:center;gap:6px;margin:0 0 2px;font-size:19px;color:#283543}
.moonleaf-task-heading img{width:24px;height:24px;object-fit:contain}
.moonleaf-task-card .moonleaf-task{padding:6px 0}
.moonleaf-task-card .moonleaf-task+.moonleaf-task{border-top:1px dashed #d3bd8a}
.moonleaf-task-card .moonleaf-task-meter{height:10px;margin:5px 0 3px;border:1.5px solid #b09b6d;border-radius:6px;background:#eadfc2;box-shadow:inset 0 1.5px 2px #7a603333}
.moonleaf-task-card .moonleaf-task-meter i{border-radius:4px;background:linear-gradient(#ffe39a,#e2b441);box-shadow:inset 0 1px #fff7}
.moonleaf-task.is-ready .moonleaf-task-meter i{background:linear-gradient(#b8e38a,#78b04a)}
.moonleaf-task.is-claimed .moonleaf-task-meter i{background:linear-gradient(#d6dcc4,#b1bb98)}
.moonleaf-task-card .moonleaf-task small{justify-content:space-between;gap:6px}
.moonleaf-task-count{font-weight:800;color:#3f4c42}
.moonleaf-task-reward{display:inline-flex;align-items:center;gap:1px;padding:0 6px 0 2px;border-radius:999px;background:#f1e3bb;font-weight:800;color:#5e4a2a}
.moonleaf-task-card .moonleaf-task small .moonleaf-task-reward img{width:18px;height:18px;margin:0}
.moonleaf-task.is-claimed strong,.moonleaf-task.is-claimed .moonleaf-task-count{color:#7b7f6d}
.moonleaf-tickets .moonleaf-task-card .moonleaf-shop-note{margin-top:4px;padding-top:5px;border-top:1px solid var(--row-inset);font-size:11px}
#modal .moonleaf-tickets .secondary.is-done{opacity:1;--small-top:#e4edcb;--small-bottom:#c2d39a;--small-lip:#8ea561;--small-edge:#4b5e2a;color:#fbfff0}
.moonleaf-tickets.has-welcome .moonleaf-sheet-card{margin-top:5px;padding-top:4px;padding-bottom:4px}
@media(max-height:730px){.moonleaf-sheet-card{margin-top:5px}.moonleaf-tickets .moonleaf-ticket-row.moonleaf-sheet-card{padding:4px 8px}.moonleaf-task-card{padding:3px 8px 5px}.moonleaf-task-card .moonleaf-task{padding:3px 0}.moonleaf-tickets .moonleaf-task-card .moonleaf-task-heading{font-size:17px}.moonleaf-tickets.has-welcome .moonleaf-sheet-icon{display:none}}
/* T03 (build 29): the owned saber's level in full words above two equal,
   single-line buttons (Equip | Buy again with its seal price). */
.moonleaf-exchange .moonleaf-level-note{display:block;margin:2px 0 0;font:800 15px/1.2 system-ui;color:#8a5516}
.moonleaf-level-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin-top:2px}
#modal .moonleaf-exchange .moonleaf-level-actions .secondary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:100%;min-width:0;margin:0;padding:4px 6px;white-space:nowrap}
#modal .moonleaf-level-actions .button-label{white-space:nowrap}
.moonleaf-level-actions .moonleaf-cost img{width:18px;height:18px}
@media(max-width:419px){.moonleaf-tickets .moonleaf-ticket-row.moonleaf-sheet-card{grid-template-columns:36px minmax(0,1fr) auto;gap:8px}.moonleaf-tickets .moonleaf-ticket-row.moonleaf-sheet-card>img,.moonleaf-sheet-icon{width:36px;height:36px}.moonleaf-sheet-icon img{width:25px;height:25px}.moonleaf-tickets .moonleaf-ticket-row h2{font-size:17px}}
/* Compact stress height on the one-time welcome day: the cards drop their icons
   so the copy keeps the column (after the Mini rule above, which sets three). */
@media(max-height:730px){.moonleaf-tickets.has-welcome .moonleaf-ticket-row.moonleaf-sheet-card{grid-template-columns:minmax(0,1fr) auto}.moonleaf-tickets.has-welcome .moonleaf-ticket-row.moonleaf-sheet-card>img{display:none}}
/* AC53 (build 53): the Spin price (ticket icon, small amount, no chip) centres in
   the face (shared rule in story-ui.css, gate PRICE_FACE). */
#modal .moonleaf-tickets.is-shop button:has(>.moonleaf-cost){--price-face-pad:7px}
:is(:lang(ja),:lang(ko),:lang(zh-Hans),:lang(zh-Hant)) #online .moonleaf-screen .moonleaf-spin-buttons .secondary{--price-face-cjk:1px}

/* AC174: compact, unframed skip control immediately below the wheel. */
.moonleaf-skip-control{align-self:center;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;flex:none;background:none;border:0;font:700 11px/1.2 system-ui;color:var(--cream-300)}
.moonleaf-skip-control input{width:18px;height:18px;margin:0;accent-color:#c6d99b}
/* Centre these sheets inside the usable area, including unequal iOS insets. */
#modal:has(.moonleaf-exchange-list-sheet,.moonleaf-tickets.is-shop){translate:0 calc((var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px))) / 2)}
.moonleaf-seal-exchange{display:flex;flex-direction:column;gap:8px;text-align:center}
.moonleaf-seal-exchange h1{margin:0;font:28px/1.1 Lucky}
.moonleaf-seal-exchange>.moonleaf-crest-balance{justify-content:center}
.moonleaf-seal-offer{display:grid;grid-template-columns:44px minmax(0,1fr) 92px;gap:8px;align-items:center;padding:6px 8px;border:1px solid #b49b6d;border-radius:var(--vs-radius);background:var(--row-face);text-align:left}
.moonleaf-seal-item img{width:40px;height:40px;object-fit:contain}
.moonleaf-seal-offer>b{font:700 14px/1.2 system-ui;color:#483729}
#modal .moonleaf-seal-price{min-height:44px;margin:0;padding:5px 8px;white-space:nowrap}
#modal .moonleaf-seal-price .button-label{display:flex;align-items:center;justify-content:center;gap:6px}
.moonleaf-seal-price img{width:22px;height:22px;object-fit:contain}

.moonleaf-wheel-space{position:relative}
.moonleaf-wheel-space .moonleaf-wheel{width:min(100cqw,100cqh,385px)}
.moonleaf-wheel-space .moonleaf-skip-control{position:absolute;bottom:0;right:0;margin:0}
/* The 150-Gem quote uses the Gem icon's narrow opaque inset. */
#modal .moonleaf-tickets.is-shop .moonleaf-cost{column-gap:7px!important}
#modal:has(.moonleaf-buy-confirm)>.equipment-actions .moonleaf-cost{column-gap:7px!important}

/* AC387: source rows use the Daily tasks section anatomy, without per-row art. */
.moonleaf-tickets .moonleaf-sources-card .moonleaf-ticket-row{grid-template-columns:minmax(0,1fr) auto;padding:6px 0;border:0;background:none;box-shadow:none}
.moonleaf-tickets .moonleaf-sources-card .moonleaf-ticket-row+.moonleaf-ticket-row{border-top:1px dashed #d3bd8a}
.moonleaf-tickets .moonleaf-sources-card .moonleaf-ticket-row h2{margin:0 0 2px;font:700 14px/1.25 system-ui}
.moonleaf-tickets .moonleaf-sources-card .moonleaf-ticket-row small{display:block;font:12px/1.2 system-ui}
@media(max-height:730px){.moonleaf-tickets .moonleaf-sources-card .moonleaf-ticket-row{padding:3px 0}.moonleaf-tickets.has-welcome .moonleaf-sources-card .moonleaf-free-row small{display:block}}

/* AC353: the complete exchange list mirrors the shared neutral Fishing Market rows.
   Only this bounded list scrolls; title, wallets and Close remain stationary. */
#modal:has(.moonleaf-exchange-list-sheet){display:flex;flex-direction:column;overflow:visible;max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 20px)}
.moonleaf-exchange-list-sheet{display:flex;flex-direction:column;min-height:0;gap:8px;max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 140px)}
.moonleaf-exchange-list-sheet>h1{flex:none;margin:0;font:28px/1.1 Lucky;text-align:center}
/* Visual polish r2 (finding 200): the wallets are side-by-side HUD-style chips (icon + number). */
.moonleaf-exchange-wallet{flex:none;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px}
.moonleaf-exchange-wallet>span{display:inline-flex;align-items:center;gap:5px;min-height:32px;box-sizing:border-box;padding:3px 11px 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}
.moonleaf-exchange-wallet img{width:24px;height:24px;object-fit:contain}
.moonleaf-exchange-list{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:8px;padding:2px 4px 8px;scrollbar-width:thin;background:#bd9f7a;border-radius:10px}
.moonleaf-exchange-row{flex:none;display:grid;grid-template-columns:48px minmax(0,1fr) 96px;align-items:center;gap:8px;min-height:64px;padding:6px 8px;border:2px solid var(--vs-ink);border-radius:8px;background:var(--row-face);box-shadow:0 var(--vs-drop-y) 0 var(--vs-ink);color:var(--text-on-cream);text-align:left}
#modal .moonleaf-exchange-row>.backpack-slot{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;margin:0}
/* Fixed art box: tall weapon looks never overflow the 48px tile (grid percentages are indefinite). */
.moonleaf-exchange-row>.backpack-slot img{width:38px;height:38px;max-width:none;object-fit:contain}
/* A pointer-opened sheet focuses its list without painting a ring; keyboard focus stays visible. */
:root:not([data-input-modality=keyboard]) #modal .moonleaf-exchange-list:focus{outline:none}
:root[data-input-modality=keyboard] #modal .moonleaf-exchange-list:focus-visible{outline:2px solid #b67939;outline-offset:2px}
.moonleaf-exchange-row>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.moonleaf-exchange-row>div>b{font:16px/1.15 Lucky}
.moonleaf-exchange-row small{font:12px/1.25 system-ui}
#modal .moonleaf-exchange-row>button:not(.backpack-slot){width:96px;min-width:96px;min-height:44px;margin:0;padding:4px 8px}
#modal .moonleaf-exchange-row>.bestiary-reward-status{font:16px/1.1 Lucky;white-space:normal;text-align:center}
/* Visual polish r2 (finding 127): Claimed / Max is a flat green done plate with the price
   button's box (96x44, same radius), so the right column stays aligned. */
#modal .moonleaf-exchange-row>.bestiary-reward-status{display:flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;width:96px;min-height:44px;margin:0;padding:4px 6px;border:2px solid var(--btn-done-edge);border-radius:var(--vs-radius);background:linear-gradient(var(--btn-done-top),var(--btn-done-bottom));color:var(--cream-50);-webkit-text-stroke:2px var(--btn-done-edge);paint-order:stroke fill;font-size:15px}
#modal .moonleaf-exchange-row>.bestiary-reward-status>.ui-icon{width:18px;height:18px;flex:none;-webkit-text-stroke:0}

/* AC353: retain the complete closed-festival reason on one line below its row. */
.moonleaf-exchange-row:has(.moonleaf-saber-closed)>div{display:contents}
.moonleaf-exchange-row:has(.moonleaf-saber-closed)>div>b{grid-column:2;grid-row:1}
.moonleaf-exchange-row:has(.moonleaf-saber-closed)>.backpack-slot{grid-column:1;grid-row:1}
.moonleaf-exchange-row:has(.moonleaf-saber-closed)>button:not(.backpack-slot){grid-column:3;grid-row:1}
.moonleaf-exchange-row .moonleaf-saber-closed{grid-column:1/-1;grid-row:2;margin:0 -4px;white-space:normal;font:12px/1.25 system-ui}
.moonleaf-exchange-row .moonleaf-saber-closed:lang(ja){font-size:11px}
@media(max-width:380px){.moonleaf-exchange-row .moonleaf-saber-closed{font-size:11px}}
/* Explicit containing block for the tall saber in receipts and their item info.
   It scales with regular/compact tiles without changing shared reward art. */
.moonleaf-saber-receipt-art{position:absolute;inset:10%;display:block}
#modal .moonleaf-saber-receipt-art img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}

/* Owner AC435: compact corner wallets, a larger wheel and opposite-Back tools. */
#online.moonleaf-view .moonleaf-screen>.moonleaf-wallet{align-self:flex-end;width:176px;max-width:100%;gap:6px;height:36px;flex:none}
#online.moonleaf-view .moonleaf-wallet>span{grid-template-columns:26px minmax(0,1fr);align-items:center;padding:3px 6px;border:2px solid var(--vs-ink);border-radius:14px;box-shadow:0 2px 0 var(--vs-ink);column-gap:4px}
#online.moonleaf-view .moonleaf-wallet img{grid-row:1;width:26px;height:28px}
#online.moonleaf-view .moonleaf-wallet b{font:18px/24px Lucky;text-align:center}
#online.moonleaf-view .moonleaf-wallet small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#online.moonleaf-view .moonleaf-heading .eyebrow{display:none}
/* Size the visible rim, not its transparent 1254px canvas. Keep the disc, hub
   and pointer in their original coordinate system and enlarge them together.
   The rim's opaque bounds are x=60..1195, y=15..1155. */
#online.moonleaf-view .moonleaf-wheel-space .moonleaf-wheel{width:min(100cqw,calc(100cqh - 28px),430px);translate:0 -10px}
.moonleaf-wheel-art{position:absolute;left:calc(-100% * 60 / 1135);top:calc(-100% * 15 / 1135);width:calc(100% * 1254 / 1135);aspect-ratio:1}
@media(min-height:731px){#online.moonleaf-view .moonleaf-wheel-space .moonleaf-wheel{width:min(100cqw,calc(100cqh - 40px),430px);translate:0 -16px}}
#online.moonleaf-view .moonleaf-chances{position:absolute;bottom:0;left:0;width:auto;min-width:112px;margin:0;z-index:4}
#online.moonleaf-view .moonleaf-wheel-space .moonleaf-skip-control{height:44px;max-width:52%;font-size:11px}
#online.moonleaf-view #tabs{display:flex;align-items:center;justify-content:space-between;gap:8px}
#online.moonleaf-view #tabs .moonleaf-tools{display:flex;justify-content:flex-end;gap:8px;margin-left:auto}
#online.moonleaf-view #tabs .moonleaf-tools>button{flex:none;width:68px;height:48px;min-width:44px;min-height:44px;display:flex;flex-direction:column;gap:0;background:#102d32e8;border:2px solid var(--vs-ink);border-radius:var(--vs-radius);font:12px/14px Lucky;box-shadow:0 3px 0 var(--vs-ink)}
#online.moonleaf-view #tabs .moonleaf-tools>button>img{height:28px;width:32px;object-fit:contain;margin-bottom:-2px}
/* Draw milestones settle on the server; these squares open item details. */
.moonleaf-draw-track{flex:none;padding:7px 9px;border:2px solid var(--vs-ink);border-radius:14px;background:#16343ce8;box-shadow:0 3px 0 var(--vs-ink)}
.moonleaf-draw-track>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;font:13px/16px Lucky}
.moonleaf-draw-progress{height:6px;border:1px solid #78684d;border-radius:6px;background:#0b2328;overflow:hidden;margin-bottom:6px}
.moonleaf-draw-progress>i{display:block;height:100%;background:linear-gradient(90deg,#9dc773,var(--honey-200))}
.moonleaf-draw-goals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 58px;gap:4px;align-items:center}
.moonleaf-draw-goal{display:flex;flex-direction:column;align-items:center;gap:3px}
.moonleaf-draw-goal>.backpack-slot{width:44px;height:44px;min-width:44px;min-height:44px;aspect-ratio:1;margin:0}
.moonleaf-draw-goal>small{font:12px/14px Lucky}
/* AC477 (build 109): a ready tile is the shared claimable tile (item-badges.css) and trades
   its goal number for a green Claim pill drawn inside the tile, so a tap on the pill claims;
   the pill sits 2px clear of the tile's hard drop and the column reserves it (67px instead
   of 61px), so the track grows 6px and the wheel above gives way. */
.moonleaf-draw-goal.is-ready{padding-bottom:23px}
.moonleaf-draw-claim{position:absolute;left:50%;top:calc(100% + 9px);z-index:2;box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-width:42px;height:16px;padding:0 6px;border:1.5px solid var(--vs-ink,#241925);border-radius:8px;background:linear-gradient(#c9f27a,#78c53a);box-shadow:inset 0 1.5px #ecffc4,inset 0 -2px #4e8a22;color:#fff;font:11px/1 Lucky,system-ui,sans-serif;-webkit-text-stroke:2.5px #24400f;paint-order:stroke fill;white-space:nowrap;transform:translateX(-50%)}
.moonleaf-draw-goal.is-claimed>small{color:#b8e796}
.moonleaf-track-exchange{width:58px;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px;border:2px solid var(--vs-ink);border-radius:var(--vs-radius);background:#244c49;color:var(--shine-100);font:12px/14px Lucky;box-shadow:0 2px 0 var(--vs-ink)}
.moonleaf-track-exchange>img{width:34px;height:32px;object-fit:contain}
.moonleaf-draw-goal>.backpack-slot[data-tier="legendary"]{background:linear-gradient(var(--rarity-legendary),var(--rarity-legendary-accent))}

/* AC446's 88x44 task target is superseded on this sheet by AC459's shared 108x44
   compact action (moonleaf-sheet-action, above). */

/* AC530: one flapper, pivoted at the gem's top mount: art (99,24) of 256, the
   square image centred in a 24%x28% box, so y=(2%+24/256*24%)/28%=15.2%. */
.moonleaf-pointer{transform-origin:38.67% 15.2%;will-change:transform}
.moonleaf-landed-wedge{position:absolute;inset:0;border-radius:50%;pointer-events:none;background:conic-gradient(from -22.5deg,#fff6b5 0deg 45deg,transparent 45deg);mask:radial-gradient(circle,transparent 57%,#000 60%);opacity:0}

/* AC629 (build 130 feedback): the one status line of an Exchange list that cannot trade right now. */
.moonleaf-exchange-note{flex:none;display:block;margin:-2px 0 0;text-align:center;font:600 12px/1.25 system-ui;color:#7a4a2c}
/* AC630 (build 130 feedback): the bulk exchange sheet shares the Get tickets confirmation layout
   (.moonleaf-buy-confirm); the item is the shared 64px item tile, the slider sits under the stepper. */
#modal .moonleaf-exchange-qty .exchange-detail-art{display:grid;place-items:center;width:64px;height:64px}
#modal .moonleaf-exchange-qty .exchange-detail-art .backpack-slot{width:64px;height:64px}
/* Fixed art box (grid percentages are indefinite): tall weapon looks stay inside the tile, like the list rows. */
#modal .moonleaf-exchange-qty .exchange-detail-art .backpack-slot img{width:48px;height:48px;max-width:none;object-fit:contain}
#modal .moonleaf-exchange-qty .moonleaf-buy-wallet{margin-top:2px}
#modal:has(.moonleaf-exchange-qty)>.equipment-actions [data-action="moonleaf.exchange"]{display:flex;align-items:center;justify-content:center;gap:8px}
#modal:has(.moonleaf-exchange-qty)>.equipment-actions .moonleaf-cost b{font:inherit}
/* Visual polish r2 (finding 129): the quantity sheet stacks the item tile over its limit chip. */
#modal .moonleaf-exchange-qty .moonleaf-buy-summary{flex-direction:column;align-items:center;gap:8px}
#modal .moonleaf-exchange-qty .moonleaf-buy-summary>.exchange-detail-limit{margin:0;padding:3px 12px;border:1.5px solid #c9a46a;border-radius:999px;background:#f3e2bd;color:#5a4128;font:800 13px/1.2 system-ui;white-space:nowrap}

/* Visual polish r2 (meta lane). #132: the grand-prize saber fills its gold wedge (~1.4x) over a soft static gold glow,
   with a dark ink edge so it reads on the orange (AC640: a glow only behind its subject, never spinning on its own).
   #128: the guide pages by three dots between two round arrow faces; Close stays the full-width footer. */
.moonleaf-sector.is-grand::before{content:'';position:absolute;inset:-4%;border-radius:50%;background:radial-gradient(circle,#fff3b8e6 0,#ffd75a99 38%,#ffd75a00 70%);pointer-events:none}
.moonleaf-sector.is-grand>.moonleaf-grand-saber{inset:-9%}
.moonleaf-sector.is-grand>.moonleaf-grand-saber>img{filter:drop-shadow(0 0 1px #3b2410) drop-shadow(0 0 1px #3b2410) drop-shadow(0 2px 2px #3c2f1f88)}
.moonleaf-help-pager{display:flex;align-items:center;justify-content:center;gap:18px;margin:4px 0 2px}
#modal .moonleaf-help-pager>.moonleaf-help-arrow{flex:none;display:grid;place-items:center;width:52px;min-width:52px;height:52px;min-height:52px;margin:0;padding:0}
#modal .moonleaf-help-pager>.moonleaf-help-arrow:before{inset:0;border-radius:50%}
.moonleaf-help-arrow .ui-icon{width:26px;height:26px}
.help-dots{display:flex;align-items:center;gap:8px}
.help-dots>i{width:10px;height:10px;border-radius:50%;background:#d5c39c;box-shadow:inset 0 1px 1px #7a5a3055}
.help-dots>i.is-on{width:12px;height:12px;background:#c0561c;box-shadow:0 0 0 2px #ffd9a0}
/* AC767: each row shares the header's seven local-day columns. */
#modal .calendar-event-track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;min-width:0}
#modal .calendar-event-track>.calendar-event-row{grid-column:var(--event-start) / span var(--event-span);width:100%;min-width:0;box-sizing:border-box;grid-template-columns:30px minmax(0,1fr) 22px;min-height:48px;margin:0;padding:5px 8px;gap:7px;border-width:2px;border-radius:var(--vs-radius);box-shadow:inset 0 2px #ffffff44,0 3px #4b3b38}
#modal .calendar-event-track>.calendar-event-row>b{font:20px/1.2 Lucky;white-space:nowrap}
#modal .calendar-event-track.is-compact>.calendar-event-row{display:flex;justify-content:center;gap:4px;padding:4px 2px}
#modal .calendar-event-track.is-compact>.calendar-event-row>b,#modal .calendar-event-track.is-compact>.calendar-event-row>.calendar-event-edge{display:none}
#modal .calendar-event-track.continues-before>.calendar-event-row{border-left-style:dashed}
#modal .calendar-event-track.continues-after>.calendar-event-row{border-right-style:dashed}
#modal .calendar-event-track .calendar-short{display:none}
#modal .calendar-event-track.is-compact .calendar-short{display:block;font:16px/1.1 Lucky;white-space:normal;overflow-wrap:normal}
#modal .calendar-event-track.is-compact .calendar-event-art{width:24px;height:24px;flex:none}
#modal .calendar-event-track.is-compact .calendar-event-art img{width:24px;height:24px}

#modal .calendar-event-track.is-single .calendar-short{display:block;overflow-wrap:anywhere}
#modal .calendar-event-track.is-single .calendar-event-row:has(.calendar-short)>.calendar-event-art{display:none}

/* The gold icon and multiplier fit two days; its full name opens on tap. */
#modal .calendar-event-track.is-compact>.event-gold>.calendar-short{display:none}
#modal .calendar-event-track.is-compact:not(.is-single)>.event-gold::after{content:"×2";font:16px/1 Lucky}
#modal .calendar-event-track.is-single>.event-gold:has(.calendar-short)>.calendar-event-art{display:grid}
#modal .calendar-event-track.is-single>.calendar-event-row{padding-inline:0}
