/* Founder pack (V20, founder-ui.js). Motion is transform/opacity only and static
 * under reduced motion; ambient loops pause behind a dialog like the Home scout. */

/* Home: a floating offer on the left under Menu, no panel (offer-bubble style). */
.home-scene .founder-offer{pointer-events:auto;position:absolute;left:3px;top:96px;z-index:3;width:76px;height:98px;margin:0;padding:0;border:0;border-radius:18px;background:transparent;box-shadow:none;color:var(--cream-200);cursor:pointer;-webkit-tap-highlight-color:transparent}
.founder-offer-float{position:absolute;inset:0;pointer-events:none;animation:founder-float 3.4s ease-in-out infinite}
.home-scene .founder-offer:focus-visible{outline:3px solid #ffe29a;outline-offset:2px}
.founder-offer-glow{position:absolute;left:50%;top:36%;width:88px;height:88px;margin:-44px 0 0 -44px;border-radius:50%;background:radial-gradient(circle,#fff0bbee 0,#ffc14a99 30%,#4edacb44 52%,transparent 70%);animation:founder-glow 2.6s ease-in-out infinite;pointer-events:none}
.founder-offer-art{position:absolute;left:0;right:0;top:0;height:70px;pointer-events:none}
.founder-offer-blade{position:absolute;left:0;top:0;width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 2px 2px #1b263e99)}
.founder-offer-blip{position:absolute;right:0;top:16px;width:50px;height:50px;object-fit:contain;filter:drop-shadow(0 3px 3px #1b263eaa)}
.founder-offer-tag{position:absolute;left:50%;top:62px;transform:translateX(-50%);max-width:92px;padding:1px 7px;border-radius:8px;background:linear-gradient(#ffcf5d,#e5902f);border:1.5px solid #1b263e;box-shadow:0 2px #1b263e99;font:13px/1.15 Lucky,system-ui;color:var(--paper);white-space:nowrap;text-shadow:none}
/* Build 42 five-locale gate: the ja tag (ファウンダー, six full-width kana) is set a
   size smaller so the ribbon stays on screen over the edge-hugging offer card. */
:lang(ja) .founder-offer-tag{padding:1px 4px;font-size:11px;letter-spacing:-.02em}
.founder-offer-price{position:absolute;left:50%;top:81px;transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:0 6px 0 3px;border-radius:9px;background:#1b263ecc;font:800 12px/16px system-ui;color:var(--cream-200);white-space:nowrap}
.founder-offer-price img{width:15px;height:15px;object-fit:contain}
.home-scene.is-entering .founder-offer{animation:rail-in-left .38s cubic-bezier(.16,1,.3,1) var(--home-enter-delay,0s) both}
/* Only the ambient loops pause behind a dialog; the entry slide always finishes. */
body:has(#modal[open]) .founder-offer-float,body:has(#modal[open]) .founder-offer-glow{animation-play-state:paused}
@keyframes founder-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes founder-glow{0%,100%{opacity:.7;transform:scale(.94)}50%{opacity:1;transform:scale(1.06)}}

/* Offer dialog and receipt. */
.founder-modal{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.founder-modal h1{margin:0;font:28px/1.05 Lucky,system-ui}
.founder-stage{position:relative;isolation:isolate;width:100%;height:118px;border-radius:18px;overflow:hidden;background:radial-gradient(circle at 50% 60%,#35587a 0,#1c2f47 70%);border:3px solid #c4a268}
.founder-stage-rays{position:absolute;z-index:-1;left:50%;top:56%;width:280px;height:280px;margin:-140px 0 0 -140px;border-radius:50%;background:repeating-conic-gradient(#ffe7a033 0 8deg,transparent 8deg 22deg);-webkit-mask-image:radial-gradient(circle,#000 16%,transparent 64%);mask-image:radial-gradient(circle,#000 16%,transparent 64%)}
.founder-stage-blade{position:absolute;left:calc(50% - 96px);top:10px;width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 4px 5px #0008)}
.founder-stage-blip{position:absolute;left:calc(50% + 4px);top:14px;width:90px;height:90px;object-fit:contain;filter:drop-shadow(0 5px 6px #0008);animation:founder-float 3.2s ease-in-out infinite}
.founder-lead{margin:0;font-size:15px;line-height:1.3}
.founder-items{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:2px 0 0;padding:0;list-style:none}
.founder-item{display:flex;align-items:center;gap:7px;min-width:0;padding:6px;border-radius:13px;background:var(--cream-250);border:2px solid #d8bb83;text-align:left}
.founder-item-art.eq-slot-icon{--tier:var(--rarity-standard);--tier-accent:var(--tier);display:grid;place-items:center;flex:none;width:48px;height:48px;box-sizing:border-box;padding:4px;border-radius:10px;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)}
.founder-item-art img{width:100%;height:100%;object-fit:contain}
.founder-item-copy{display:flex;flex-direction:column;min-width:0;gap:1px}
.founder-item-copy small{font:800 10px/1.1 system-ui;letter-spacing:.6px;text-transform:uppercase;color:#8a5a22}
.founder-item-copy b{font-size:13px;line-height:1.15;color:var(--ink-brown);overflow-wrap:anywhere}
.founder-rules{margin:0;font-size:13px;line-height:1.3;color:#5b4430}
.founder-carry{display:block;font-size:12px;line-height:1.25;color:#6b5238}
.founder-price-line{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 6px;font:24px/1 Lucky,system-ui;color:var(--ink-brown)}
.founder-price-line img{width:26px;height:26px;object-fit:contain}
.founder-missing{flex-basis:100%;font:700 13px/1.2 system-ui;color:#a33b2c}
.founder-buy.is-ready{filter:saturate(1.15)}
.founder-title-item{justify-content:center;text-align:center}
@media(max-height:760px){.founder-modal{gap:4px}.founder-modal .founder-stage{height:72px}.founder-modal .founder-stage-blade,.founder-modal .founder-stage-blip{width:62px;height:62px;top:3px}}
.founder-stage.is-celebrating .founder-stage-rays{animation:skill-spotlight-turn 10s linear infinite}

/* Scout panel: Blip opens the look picker. */
.drone-look-button{position:absolute;left:5%;top:50%;z-index:1;width:92px;height:104px;margin:-54px 0 0;padding:0;border:0;border-radius:16px;background:transparent;box-shadow:none;cursor:pointer}
.drone-look-button .drone-hero-blip{position:absolute;left:4px;top:2px;margin:0}
.drone-look-chip{position:absolute;left:50%;bottom:0;transform:translateX(-50%);max-width:96px;padding:1px 8px;border-radius:8px;background:#1b263ed9;border:1.5px solid #e3c578;font:800 12px/16px system-ui;color:var(--cream-200);white-space:nowrap}
.drone-look-button:focus-visible{outline:3px solid #ffe29a;outline-offset:1px}
.drone-looks{display:flex;flex-direction:column;gap:8px}
.drone-looks h1{margin:0;text-align:center}
/* AC109 (build 52): tiles like the avatar picker; a tap selects, one footer action applies. */
.drone-look-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
/* AC132 (build 56): a cell is the tile plus its own name; the selected name is highlighted.
   keep-all: a name wraps at a word break (ja names carry a zero-width space between
   their words), never inside a word; overflow-wrap still breaks a name that cannot fit. */
.drone-look-cell{flex:0 0 calc((100% - 20px)/3);min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:8px}
.drone-look-name{display:flex;flex-direction:column;align-items:center;gap:1px;min-height:36px;padding:3px 4px;border-radius:10px;text-align:center}
.drone-look-name b{font-size:14px;line-height:1.15;color:#5a4128;word-break:keep-all;overflow-wrap:anywhere}
.drone-look-name small{font-size:12px;line-height:1.15;color:#7a5a36;word-break:keep-all;overflow-wrap:anywhere}
.drone-look-cell.is-selected .drone-look-name{background:#f6d887;box-shadow:inset 0 0 0 2px #d49a2c}
.drone-look-cell.is-selected .drone-look-name b{color:var(--ink-brown)}
#modal .drone-look-choice{position:relative;display:grid;place-items:center;width:100%;box-sizing:border-box;aspect-ratio:1;min-width:44px;min-height:44px;margin:0;padding:6px;border:2px solid #b39b78;border-radius:14px;background:radial-gradient(circle at 50% 42%,#3b5d80 0,#1c2f47 80%);box-shadow:0 2px #af95604d;cursor:pointer;-webkit-tap-highlight-color:transparent}
#modal .drone-look-choice .drone-look-art{width:86%;height:86%;object-fit:contain;pointer-events:none}
#modal .drone-look-choice.is-selected{border-color:#d49a2c;box-shadow:0 0 0 3px #f2c75c,0 2px #af95604d}
#modal .drone-look-choice:active{scale:.95}
#modal .drone-look-choice.is-locked>:not(.avatar-lock){filter:grayscale(.75) brightness(.78)}
#modal .drone-look-choice .avatar-check{top:auto;right:4px;bottom:4px}
.drone-looks-note{text-align:center;color:#6b5238}

@media(prefers-reduced-motion:reduce){
 .founder-offer-float,.home-scene.is-entering .founder-offer,.founder-offer-glow,.founder-stage-blip,.founder-stage.is-celebrating .founder-stage-rays{animation:none}
}
/* AC24 (build 42): the title is one short word in every locale (Vanguard /
   Prekursor / 先驱 / 先駆者 / 선구자), so the half-width offer card shows it on a
   larger plate with full-size type, its wings and round gem undistorted. */
.founder-title-item .founder-item-copy{align-items:center;max-width:100%}
.founder-title-item .title-badge[data-rarity=founder]{--badge-h:30px}
.founder-title-item .title-badge[data-rarity=founder] .title-badge-text{font-size:15px}
/* AC108 (build 52): the pack receipt's shared Rewards ribbon (story-ui.css
   .reward-claim-ribbon) sits inside the card with even space above and below:
   its tails hang 10px under it, and the lead starts 12px under the tails, as far
   as the ribbon sits under the art stage. */
#modal .founder-modal>.pack-receipt-ribbon{--rb-out:24px;width:calc(100% - 68px);max-width:none;margin:6px 0 10px;padding:5px 16px 7px}
#modal .founder-modal>.pack-receipt-ribbon h1{font-size:27px}
/* AC109: Close | action, the action wider so "Founder pack" stays on one line at Mini. */
#modal:has(.drone-looks)>.equipment-actions{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}

/* b128: one compact Blip row leaves the two portal previews fully visible. */
.looks-heading{display:flex;align-items:center;justify-content:center;gap:8px}
.has-portals .drone-look-grid:has(>.drone-look-cell:nth-child(4)){gap:8px}
.has-portals .drone-look-grid:has(>.drone-look-cell:nth-child(4)) .drone-look-cell{flex-basis:calc((100% - 24px)/4)}
.has-portals .drone-look-name{padding-inline:0}
.portal-looks{display:flex;flex-direction:column;gap:8px}
.portal-looks h2{margin:0;text-align:center;font:22px/1.2 Lucky,system-ui;color:#5a4128}
.portal-look-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.portal-look-cell{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
#modal .portal-look-choice{position:relative;display:grid;place-items:center;width:100%;max-width:120px;aspect-ratio:1;box-sizing:border-box;min-height:44px;padding:4px;border:2px solid #b39b78;border-radius:14px;background:radial-gradient(circle at 50% 42%,#3b5d80,#1c2f47 80%);box-shadow:0 2px #af95604d}
#modal .portal-look-choice:disabled{filter:none}
#modal .is-equipped .portal-look-choice{border-color:#d49a2c}
.portal-preview{display:block;width:100%;aspect-ratio:1;min-width:0}
#modal .portal-look-choice .avatar-check{right:4px;bottom:4px;top:auto}
.portal-look-name{display:flex;align-items:center;justify-content:center;min-height:34px;font-size:14px;line-height:17px;color:#5a4128;text-align:center;max-width:100%;overflow-wrap:normal}
.portal-look-state{display:grid;place-items:center;min-height:44px;color:#6b5238;font-size:13px}
/* The equipped portal reads like the equipped Blip name pill, at the Buy button's height so both rows line up. */
.portal-look-cell.is-equipped .portal-look-state{align-self:center;min-width:100px;padding-inline:14px;border-radius:var(--vs-radius);background:#f6d887;box-shadow:inset 0 0 0 2px #d49a2c;color:var(--ink-brown);font-size:14px;font-weight:700}
.portal-price{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.portal-price img{width:24px;height:24px;object-fit:contain}
#modal .portal-buy{min-width:100px;min-height:44px}
.portal-buy .button-label{display:flex;align-items:center;justify-content:center;gap:8px}
.portal-confirm{display:flex;flex-direction:column;align-items:center;gap:12px}
.portal-confirm h1{margin:0;text-align:center}
.portal-confirm .portal-preview{width:140px;border-radius:14px;background:#1c2f47}
@media(max-height:760px){#modal .portal-look-choice{max-width:90px}.has-portals .drone-look-name{gap:0;padding:2px;min-height:34px}.has-portals .drone-look-name b{font-size:12px}.has-portals .drone-look-name small{font-size:11px}.has-portals,.portal-looks{gap:6px}.portal-look-cell{gap:6px}}
/* Visual polish r2 (story #66): the selected, already equipped look needs no footer action; Close takes the row. */
#modal .equipment-actions>button.drone-look-activate.is-equipped{display:none}
#modal .equipment-actions:has(>.drone-look-activate.is-equipped)>button{grid-column:1/-1;flex:1 1 100%}
/* Five looks use two compact rows so localized names keep whole words. */
#modal .drone-look-grid:has(>.drone-look-cell:nth-child(5)){gap:8px}
#modal .drone-look-grid:has(>.drone-look-cell:nth-child(5)) .drone-look-cell{flex-basis:calc((100% - 16px)/3);align-items:center}
#modal .drone-look-grid:has(>.drone-look-cell:nth-child(5)) .drone-look-choice{width:50px}
#modal .drone-look-grid:has(>.drone-look-cell:nth-child(5)) .drone-look-name{align-self:stretch}

/* AC795 starter offer: the first bubble under Menu; Founder and Tester move one slot down. */
.home-scene .starter-offer{top:96px}
.starter-offer .founder-offer-tag{background:linear-gradient(#ff8aa1,#d93d63);text-shadow:none}
.starter-offer .founder-offer-glow{background:radial-gradient(circle,#fff0bbee 0,#ffc14aaa 32%,#ff6f8b55 54%,transparent 72%)}
.starter-offer .starter-offer-charm{position:absolute;left:2px;top:6px;width:44px;height:44px;transform:rotate(-8deg);box-shadow:0 2px 3px #1b263e88,inset 0 1px #fffb}
.starter-offer .starter-offer-blade{left:auto;right:-2px;top:8px;width:50px;height:50px;transform:rotate(12deg)}
.home-scene:has(.starter-offer) .founder-offer:not(.starter-offer){top:204px}
.home-scene:has(.starter-offer) .tester-offer.has-founder{top:312px}
/* Three pack bubbles: every bubble takes the compact 80px face so the Perks rail still fits. */
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer{height:80px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer:not(.starter-offer){top:180px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .tester-offer.has-founder{top:264px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-art{height:52px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-blade{width:44px;height:44px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-blip{width:40px;height:40px;top:8px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .starter-offer-charm{width:38px;height:38px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-tag{top:46px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-price{top:63px}
.home-scene:has(.starter-offer+.founder-offer+.tester-offer) .home-perks-rail{top:350px}
/* Compact (Home scene ~370px tall): 68px faces from just under Menu, so Perks stays above the bottom boxes. */
@media(max-height:750px){
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer{height:68px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .starter-offer{top:78px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer:not(.starter-offer){top:148px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .tester-offer.has-founder{top:218px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-art{height:40px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-blade{width:38px;height:38px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-blip{width:34px;height:34px;top:6px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .starter-offer-charm{width:32px;height:32px;top:4px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-glow{width:66px;height:66px;margin:-33px 0 0 -33px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-tag{top:35px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .founder-offer-price{top:52px}
 .home-scene:has(.starter-offer+.founder-offer+.tester-offer) .home-perks-rail{top:290px}
}

/* Dialog: the value stamp sits on the title row; the stage shows the Charm beside the blade. */
.starter-heading{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:44px}
.starter-heading h1{padding:0 46px}
.starter-heading .help-button{position:absolute;top:0;right:0;width:44px;height:44px;min-height:44px;margin:0}
/* Build 194 (owner: "znajdź lepsze miejsce na discount badge"): the stamp no longer sits in the stage's corner over the
   art. It is a ribbon centred on the stage's bottom edge, half on the stage and half on the card, between the art and
   the item tiles; the art is centred again. The wrap holds it because the stage clips its own content. */
.starter-stage-wrap{position:relative;width:100%}
.starter-stage-wrap:has(.starter-value)+.store-checkout-items{margin-top:26px}
.starter-stage-wrap:has(.starter-value) .starter-stage-charm{top:8px}
.starter-stage-wrap:has(.starter-value) .starter-stage-blade{top:2px}
.starter-value{position:absolute;left:50%;bottom:-19px;translate:-50% 0;z-index:2;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:4px 7px 5px;border:2px solid var(--vs-ink,#241925);border-radius:10px;background:linear-gradient(#ff6f8b,#e0385c);box-shadow:inset 0 2px #ffb3c2,0 3px 0 var(--vs-ink,#241925);rotate:-2deg;text-align:center;pointer-events:none}
.starter-value b{font:20px/1.05 Lucky,system-ui;letter-spacing:0;color:#ffe14a;white-space:nowrap;-webkit-text-stroke:3px var(--vs-ink,#241925);paint-order:stroke fill;filter:drop-shadow(0 2px var(--vs-ink,#241925))}
.starter-value small{font:10px/1.05 Lucky,system-ui;color:#fff;white-space:nowrap;-webkit-text-stroke:2px var(--vs-ink,#241925);paint-order:stroke fill}
.starter-stage{border-color:#e0a64a;background:radial-gradient(circle at 50% 60%,#6a3f7a 0,#2a2148 72%)}
.starter-stage .starter-stage-charm{position:absolute;left:calc(50% - 72px);top:16px;width:84px;height:84px;border-radius:16px;padding:8px;transform:rotate(-6deg);box-shadow:0 0 18px #ffc14acc,0 5px 8px #0008,inset 0 1px #fffb}
.starter-stage .starter-stage-blade{left:calc(50% + 22px);top:8px;transform:rotate(10deg)}
/* AC847 (build 194): the offer card shows what you get as the checkout sheet's side-by-side tiles (store-ui.css). */
.starter-modal .store-checkout-items{margin-top:8px}
.starter-help p{margin:0 0 8px}
@media(max-height:760px){.starter-modal .starter-stage{height:84px}.starter-stage .starter-stage-charm{width:60px;height:60px;top:10px;left:calc(50% - 50px)}.starter-modal .starter-stage-blade{width:66px;height:66px;top:6px}}

/* AC918 (build 227): a windowed Home offer shows the time left under its price, as the shared one-line timer (AC774)
   at bubble scale. The bubble grows by the timer's row and the Perks rail (and a test realm's Tester bubble) moves
   down with it. Normal players see one windowed bubble; the App Review save gets both bubbles without timers. */
.home-scene .founder-offer.has-timer{height:116px}
.founder-offer .founder-offer-timer.ui-timer{position:absolute;left:50%;top:99px;transform:translateX(-50%);gap:3px;max-width:none;padding:0 5px 0 3px;border-width:1.5px;font:800 11px/14px system-ui;letter-spacing:-.01em}
.founder-offer .founder-offer-timer.ui-timer:before{width:10px;height:10px;border-width:1.5px;background-size:1.5px 4px,3px 1.5px}
.home-scene:has(.founder-offer.has-timer) .home-perks-rail{top:calc(114px + var(--pack-offers,0) * 108px)}
.home-scene:has(.founder-offer.has-timer) .tester-offer.has-founder{top:222px}
.founder-modal>.founder-dialog-timer{align-self:center;flex:none}
:is(:lang(ja),:lang(ko),:lang(zh)) .founder-offer .founder-offer-timer.ui-timer{gap:2px;padding:0 4px 0 2px;font-size:10px;letter-spacing:-.03em}
