
/* style.css */

:root{color-scheme:dark;--bg:#101113;--panel:#191b1e;--line:#2a2d31;--text:#f2f3ee;--muted:#95999f;--lime:#c8ff69;--r0:#b7bcc6;--r1:#79b7ff;--r2:#bc91ff;--r3:#ffd16d;--r4:#ff7eac}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:'DM Sans','Noto Sans KR',sans-serif;font-size:16px}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--lime);outline-offset:5px}button{border:0;background:none}a{color:inherit;text-decoration:none}header{height:96px;border-bottom:1px solid var(--line);padding:0 5%;display:flex;align-items:center;justify-content:space-between;gap:25px}.logo{font-size:25px;font-weight:900;display:flex;align-items:center;gap:9px;white-space:nowrap}.brand-icon{color:var(--lime);font-size:42px;line-height:1}.beta{font-size:10px;letter-spacing:1px;font-weight:600;border:1px solid #464a4e;border-radius:4px;padding:3px 5px;color:#a8abb0;margin-left:5px}nav{display:flex;gap:38px;height:100%;align-items:center}nav button{height:100%;font-size:14px;color:var(--muted);position:relative}nav button.active{color:var(--text)}nav button.active:after{content:'';position:absolute;bottom:0;height:2px;background:var(--lime);left:0;right:0}#nav-count{display:inline-flex;background:#2a2d30;border-radius:5px;min-width:22px;justify-content:center;padding:2px 4px;margin-left:5px;font-size:12px}.icon-btn{font-size:20px}.icon-btn span{font-size:11px;color:var(--muted);padding-left:5px}main{min-height:calc(100vh - 181px);max-width:1400px;padding:48px 5% 56px;margin:auto}.eyebrow{font-size:12px;letter-spacing:2px;color:var(--lime);font-weight:600}.home-layout{display:grid;grid-template-columns:minmax(0,1fr) 305px;gap:54px}.intro{display:flex;align-items:center;gap:10px;margin-bottom:15px}.today-tag{padding:5px 8px;border:1px solid #34383c;color:#a8acb0;font-size:11px;letter-spacing:1px;border-radius:4px}h1{font-size:38px;letter-spacing:-1.5px;font-weight:700;margin:0 0 12px;line-height:1.35}.sub{color:var(--muted);font-size:14px;line-height:1.8;margin:0}.pack-stage{height:405px;display:flex;align-items:center;justify-content:center;position:relative;background:radial-gradient(ellipse at 50% 55%,#292e26 0,transparent 61%);overflow:hidden}.orbit{position:absolute;border:1px solid #33392e;width:420px;height:150px;border-radius:50%;transform:rotate(-22deg);opacity:.5}.orbit.two{width:350px;height:300px;transform:rotate(35deg);opacity:.25}.pack{position:relative;z-index:1;width:254px;height:340px;border-radius:4px;border:1px solid #ddd;background:linear-gradient(110deg,#8a9396,#e4e8df 28%,#a4aaab 50%,#edf0e9 72%,#979fa1);color:#191c19;box-shadow:14px 24px 50px #0008;transform:rotate(-8deg);display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;animation:float 5s ease-in-out infinite;user-select:none;-webkit-user-select:none;touch-action:none}.pack small{font-size:10px;letter-spacing:5px}.pack strong{font-size:32px;letter-spacing:-1px}.pack .symbol{font-size:90px;line-height:1.5}.pack .pack-foot{position:absolute;bottom:25px;font-size:9px;letter-spacing:3px}.pack:before,.pack:after{content:'';position:absolute;left:0;right:0;height:15px;background:repeating-linear-gradient(90deg,#69716a66 0 1px,transparent 1px 4px)}.pack:before{top:3px}.pack:after{bottom:3px}.pack.art{border:0;background:transparent;box-shadow:none;width:380px;height:380px;transform:none;mix-blend-mode:lighten}.pack.art:before,.pack.art:after{display:none}.pack img{width:100%;height:100%;object-fit:contain;pointer-events:none}.stage-note{position:absolute;right:10px;bottom:35px;font-size:11px;line-height:1.8;color:#727773;letter-spacing:1px}.open-area{max-width:360px;margin:6px auto 0;text-align:center}.primary{background:var(--lime);color:#171b11;border-radius:9px;font-size:15px;font-weight:700;width:100%;padding:18px 24px;position:relative;overflow:hidden}.hold{touch-action:none;user-select:none;-webkit-user-select:none}.hold:before{content:'';position:absolute;inset:0;background:#93d331;transform:scaleX(var(--hold,0));transform-origin:left}.hold span{position:relative}.help{font-size:12px;color:#82868c;margin-top:13px}.small-line{display:flex;justify-content:center;gap:18px;font-size:12px;color:#a4a8ae;margin-top:20px}.small-line span+span{border-left:1px solid #393c40;padding-left:18px}.sidebar{padding-top:8px}.section-head{font-size:14px;display:flex;align-items:center;justify-content:space-between;margin:0 0 19px;font-weight:600}.section-head span{color:#6e747b;font-size:11px;letter-spacing:1px}.progress-panel{border:1px solid var(--line);border-radius:12px;padding:23px;margin-bottom:26px;background:linear-gradient(140deg,#1d2021,#17191b)}.large-count{font-size:36px;letter-spacing:-1px;margin:13px 0}.large-count small{font-size:14px;color:#858b92;margin-left:5px;letter-spacing:0}.track{height:5px;background:#363a3c;border-radius:10px;overflow:hidden}.track div{height:100%;background:var(--lime)}.progress-label{display:flex;justify-content:space-between;font-size:12px;color:#939aa0;margin:12px 0 20px}.text-link{font-size:13px;padding:0;width:100%;text-align:left;color:#dae1d1}.text-link span{float:right}.odds{border-bottom:1px solid var(--line);padding-bottom:24px;margin-bottom:25px}.rarity-row{display:flex;align-items:center;gap:9px;margin:14px 0;font-size:13px}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:var(--rarity)}.rarity-row .percent{margin-left:auto;color:#b0b4ba;font-family:'DM Sans',sans-serif}.guarantee{font-size:12px;color:#8e949a;line-height:1.8;margin:18px 0 0}.mini-pick{display:flex;gap:15px;align-items:center}.pick-art{width:67px;height:83px;background:radial-gradient(circle,#3f304f,#232029);border:1px solid #61477a;border-radius:8px;display:grid;place-items:center;font-size:34px}.mini-pick b{font-size:14px}.mini-pick p{font-size:12px;color:#9a9ba6;line-height:1.7;margin:5px 0}.guide{margin-top:42px;padding-top:24px;border-top:1px solid var(--line);display:flex;gap:24px;justify-content:space-between}.guide-item{display:flex;gap:13px;font-size:12px;align-items:center;color:#93989f}.guide-item b{font-size:14px;color:#d0d4d8;font-weight:500;display:block;margin-bottom:4px}.step{font-size:12px;border:1px solid #3a3e42;padding:8px 10px;border-radius:50%;color:#b7bec2}footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;padding:28px 5%;font-size:12px;color:#777f86}footer a,footer button{font:inherit;line-height:inherit;padding:0}.collection-top{display:flex;justify-content:space-between;align-items:end;margin-bottom:32px}.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:25px 0}.filters button,.filters select,.filters input{background:#1b1e21;border:1px solid #34383d;border-radius:7px;padding:9px 13px;font-size:13px;color:#b6bbc0}.filters button.selected{background:var(--lime);color:#202517;border-color:var(--lime)}.filters input{max-width:180px}.check{font-size:13px;color:#a9afb5;display:flex;gap:6px;align-items:center}.check input{accent-color:var(--lime)}.grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:17px}.card{--rarity:var(--r0);background:linear-gradient(145deg,color-mix(in srgb,var(--rarity) 13%,#181b20),#181a1e);border:1px solid color-mix(in srgb,var(--rarity) 40%,#20232a);border-radius:12px;padding:15px;text-align:left;position:relative;overflow:hidden;transition:transform .25s;min-width:0}.card:hover{transform:translateY(-5px)}.card-meta{display:flex;justify-content:space-between;font-size:10px;color:var(--rarity);letter-spacing:1px}.card-art{height:135px;display:grid;place-items:center;font-size:72px;filter:drop-shadow(0 12px 20px #0006)}.card-name{font-size:16px;font-weight:600}.card-category{font-size:11px;color:#8f959d;margin-top:6px}.card.locked{border-color:#292d33;background:#17191d}.locked .card-art{filter:grayscale(1);opacity:.15}.locked .card-name{color:#6c747c}.count-badge{position:absolute;right:12px;bottom:13px;font-size:10px;color:var(--lime)}.empty{padding:70px 20px;text-align:center;color:var(--muted)}.reveal-wrap{text-align:center;padding:0 0 20px}.reveal-wrap h1{font-size:28px}.reveal-stage{height:420px;display:grid;place-items:center;perspective:1100px}.reveal-card{width:255px;height:355px;padding:21px;box-shadow:0 0 65px color-mix(in srgb,var(--rarity) 17%,transparent);animation:arrive .45s ease;touch-action:manipulation}.reveal-card .card-art{height:190px;font-size:95px}.reveal-card .card-name{font-size:23px}.card-desc{font-size:12px;line-height:1.8;color:#b0b5bf;margin:10px 0 0}.back{display:flex;flex-direction:column;align-items:center;justify-content:center;background:repeating-linear-gradient(45deg,#242931 0 1px,#171c22 1px 12px);box-shadow:6px 6px 0 #242932,12px 12px 0 #181c23}.back .back-symbol{font-size:82px;color:var(--rarity)}.back p{font-size:12px;letter-spacing:4px;color:var(--rarity)}.reveal-card.shimmer:after{content:'';pointer-events:none;position:absolute;inset:-50%;background:linear-gradient(110deg,transparent 30%,#ffffff16 45%,#d2a5ff15 50%,transparent 65%);transform:rotate(20deg)}.tray{display:flex;gap:8px;justify-content:center;min-height:45px;margin-top:20px;flex-wrap:wrap}.chip{width:39px;height:45px;display:grid;place-items:center;background:#22262b;border:1px solid var(--rarity);border-radius:6px;font-size:22px}.pending{border-color:#30353b;color:#616870;font-size:12px}.timer{font-size:64px;letter-spacing:3px;font-variant-numeric:tabular-nums;margin:25px 0}.opened{height:405px;display:flex;flex-direction:column;align-items:center;justify-content:center}.opened .seal{font-size:40px;color:var(--lime)}.results-stats{display:flex;gap:32px;border-bottom:1px solid var(--line);padding:20px 0 28px;margin-bottom:28px;color:#9ba2a9;font-size:14px}.results-stats strong{color:var(--text);margin-left:10px}.result-actions{max-width:300px;margin:35px auto 0}dialog{background:#191c21;color:var(--text);border:1px solid #3c434b;border-radius:16px;padding:40px;max-width:min(460px,90vw)}dialog::backdrop{background:#000b;backdrop-filter:blur(8px)}.close{position:absolute;top:10px;right:14px;font-size:26px;color:#aaa}dialog .card{width:270px;max-width:100%}dialog .card-art{height:200px;font-size:110px}dialog h2{font-size:23px}dialog p{font-size:14px;line-height:1.9;color:#b4bbc2}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:14px 22px;background:#d3ff8d;color:#182015;border-radius:9px;opacity:0;pointer-events:none;z-index:20;font-size:14px}.particle{position:fixed;width:6px;height:9px;background:var(--rarity,#d7ec9c);top:48%;left:50%;pointer-events:none;z-index:10;animation:burst 1s ease-out forwards}.shaking{animation:shake .08s infinite!important}.tear{animation:tear .55s forwards!important}.flash{animation:flash .6s}.exit{animation:fly .25s forwards!important}@keyframes float{50%{translate:0 -12px;rotate:2deg}}@keyframes shake{50%{translate:3px -2px;rotate:1deg}}@keyframes tear{to{opacity:0;transform:translateY(-100px) rotate(18deg) scale(1.1)}}@keyframes flash{20%{background:#525f3d}}@keyframes arrive{from{opacity:0;transform:rotateY(-90deg) scale(.9)}}@keyframes fly{to{transform:translateY(-300px) rotate(15deg);opacity:0}}@keyframes burst{to{transform:translate(var(--x),var(--y)) rotate(270deg);opacity:0}}@media(min-width:1450px){main{padding-top:60px}.pack-stage{height:455px}.opened{height:455px}}@media(max-width:900px){.home-layout{gap:30px;grid-template-columns:minmax(0,1fr) 255px}.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.guide{gap:15px}.guide-item{gap:7px}.guide-item b{font-size:12px}}@media(max-width:680px){header{height:76px;padding:0 5%;gap:10px}.logo{font-size:20px}.brand-icon{font-size:31px}.beta{display:none}nav{gap:17px}nav button{font-size:12px}.icon-btn span{display:none}main{padding-top:30px}h1{font-size:30px}.home-layout{display:flex;flex-direction:column;gap:35px}.pack-stage{height:360px}.pack.art{width:350px;height:350px}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sidebar .discover{display:none}.progress-panel{padding:18px;margin:0}.odds{border:0;margin:0;padding:0}.rarity-row{margin:11px 0}.guarantee{font-size:11px}.guide{margin-top:30px;gap:12px}.guide-item{display:block;font-size:10px}.guide-item .step{display:none}.guide-item b{font-size:12px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.card-art{height:130px}.collection-top{display:block}.collection-top .sub{margin-top:10px}.filters{gap:7px}.filters button{padding:8px 10px}.results-stats{gap:15px;font-size:12px;flex-wrap:wrap}.timer{font-size:48px}footer{flex-wrap:wrap;line-height:1.6;font-size:10px;gap:10px}footer span:nth-child(2){display:none}.stage-note{font-size:10px;right:0;bottom:10px}.section-head{font-size:12px}.section-head span{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition:none!important}}
.account-btn{font-size:13px;white-space:nowrap;border:1px solid #3a4146;border-radius:7px;padding:8px 13px;margin-left:auto}#auth-form label{display:block;font-size:14px;margin:18px 0}#auth-form input{display:block;width:100%;padding:12px;margin-top:8px;border:1px solid #434b53;border-radius:7px;background:#101318;color:#fff}#auth-error{color:var(--lime);min-height:20px;font-size:13px}button:disabled{cursor:wait;opacity:.55}@media(max-width:680px){.account-btn{font-size:11px;padding:7px 8px}header{gap:8px}nav{gap:10px}.logo{font-size:18px}.brand-icon{font-size:25px}}
.google-auth{position:relative;width:100%;margin-top:24px;min-height:48px;padding:13px 42px;border:1px solid #747775;border-radius:4px;background:#fff;color:#1f1f1f;font-family:Roboto,"Noto Sans KR",sans-serif;font-size:14px;font-weight:500;line-height:20px;display:flex;align-items:center;justify-content:center}.google-auth:hover{background:#f8f9fa}.google-mark{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:20px;height:20px;object-fit:contain}.auth-divider{display:flex;align-items:center;gap:12px;margin:22px 0 2px;color:#7f858d;font-size:12px}.auth-divider:before,.auth-divider:after{content:'';height:1px;flex:1;background:#343940}.auth-divider span{white-space:nowrap}
.card-art,.chip{position:relative;overflow:hidden}.card-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#181b20;border-radius:8px}.art-fallback{display:grid;place-items:center;width:100%;height:100%}.chip .card-image{border-radius:4px}.card-art .card-image{padding:4px}

/* Both foil layers keep the same full-size image coordinates throughout the tear. */
.pack.art{overflow:visible;padding:0;animation:none;isolation:isolate}
.pack.art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.pack-tear{display:none;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;clip-path:var(--top-cut)}
.pack-tear img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.pack.tearing>img,.pack.resealing>img,.pack.ripped>img{clip-path:var(--body-cut)}
.pack.tearing>img{transform:translateY(calc(var(--tear-ease,0)*2px)) rotate(calc(var(--tear-ease,0)*-.35deg));filter:brightness(calc(1 + var(--tear,0)*.1))}
.pack.tearing .pack-tear,.pack.resealing .pack-tear,.pack.committed .pack-tear,.pack.ripped .pack-tear{display:block;transform:rotate(calc(var(--tear-ease,0)*1.2deg));transform-origin:var(--tear-front,24%) 17%;filter:brightness(calc(1 + var(--tear,0)*.14)) drop-shadow(0 2px 1px #0009)}
.pack.tearing{transform:translateY(calc(var(--tear-ease,0)*2px)) rotate(var(--tear-wobble,0deg))}
.pack-stage{--tear:0;transition:background .18s ease}
.pack-stage:after{content:'';position:absolute;inset:10% 18%;border-radius:50%;background:radial-gradient(circle,#c8ff6924,transparent 66%);opacity:calc(var(--tear)*.75);transform:scale(calc(.72 + var(--tear)*.28));pointer-events:none}
.pack.committed .pack-tear{animation:foil-snap .46s cubic-bezier(.18,.75,.32,1) forwards}
.pack.committed>img{clip-path:var(--body-cut);animation:foil-rebound .42s cubic-bezier(.2,.8,.2,1) both}
.pack.ripped>img{animation:foil-body .62s cubic-bezier(.4,0,1,1) forwards}
.pack.ripped .pack-tear{animation:foil-top-finish .18s linear forwards}
.pack-opening{animation:pack-flash .7s ease-out}
@keyframes foil-snap{0%{opacity:1;transform:rotate(1.2deg)}35%{transform:translate(-5px,-20px) rotate(5deg)}100%{opacity:0;transform:translate(38px,-112px) rotate(-21deg)}}
@keyframes foil-rebound{0%{transform:translateY(2px) scaleY(1)}45%{transform:translateY(-4px) scaleY(1.015)}100%{transform:translateY(7px) scaleY(.99)}}
@keyframes foil-top-finish{to{opacity:0}}
@keyframes foil-body{0%{opacity:1;transform:translateY(7px) scaleY(.99)}100%{opacity:0;transform:translateY(56px) scale(.96)}}
@keyframes pack-flash{0%{filter:brightness(1)}20%{filter:brightness(1.35)}100%{filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.pack.tearing .pack-tear{transform:translateY(calc(var(--tear,0)*-5px))}.pack.committed .pack-tear,.pack.committed>img,.pack.ripped .pack-tear,.pack.ripped>img,.pack-opening{animation-duration:.01ms}}
dialog .reveal-card{width:255px;max-width:255px;height:355px;padding:21px}
dialog .reveal-card .card-art{height:190px;font-size:95px}
dialog .reveal-card .card-desc{font-size:12px;line-height:1.8;margin:10px 0 0}
.card-detail-count{text-align:center;margin:14px 0 0!important;font-size:12px!important;color:var(--muted)!important}

.filters select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27%3E%3Cpath d=%27m1 1 4 4 4-4%27 fill=%27none%27 stroke=%27%23b6bbc0%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:10px 6px}

.brand-icon svg{display:block;width:1em;height:1em}

.hold-label{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}.hold-label svg{display:block;width:20px;height:20px;flex:none}

.back-symbol{display:block;width:56px;height:56px}.back-symbol svg{display:block;width:100%;height:100%}

/* Email authentication: login, signup and confirmation states. */
dialog:has(.auth-view){width:420px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:36px 32px;overflow-y:auto}
.auth-view h2{margin:0 0 12px;font-size:23px;line-height:1.45;letter-spacing:-.6px;outline:none}
.auth-view .auth-intro{margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.auth-view #auth-form label{margin:20px 0;font-size:13px}
.auth-view #auth-form input{font-size:16px;min-height:46px}
.auth-field-hint{display:block;margin-top:8px;color:var(--muted);font-size:12px;line-height:1.6}
.auth-view #auth-error{min-height:0;margin:0;color:#ffb4ab;font-size:12px;line-height:1.7}
.auth-view #auth-error:not(:empty){margin:0 0 16px}
.auth-view .primary{min-height:48px;padding:14px 16px;font-size:14px}
.auth-view .auth-switch-row{margin:24px 0 0;text-align:center;font-size:12px;color:var(--muted)}
.auth-switch-row .text-link{display:inline;width:auto;margin-left:6px;font-size:13px;color:var(--text);text-decoration:underline;text-underline-offset:4px}
.auth-view .auth-switch{display:block;margin:22px 0 0;text-align:center;color:var(--muted)}
.auth-mail-icon{display:grid;place-items:center;width:48px;height:48px;margin-bottom:24px;border-radius:14px;background:#c8ff6912;color:var(--lime)}
.auth-mail-icon svg{width:26px;height:26px}
.auth-view .auth-email{margin:16px 0 20px;padding:14px 16px;border-radius:8px;background:#101318;color:var(--text);font-size:14px;overflow-wrap:anywhere}
.auth-view .auth-next{margin:0 0 12px;font-size:13px;line-height:1.9}
.auth-view .auth-hint{margin:0 0 26px;color:var(--muted);font-size:12px;line-height:1.7}
@media(max-width:420px){dialog:has(.auth-view){padding:32px 24px}.auth-view h2{font-size:21px}}

/* Reserve space for the home advertising placeholder. */
.home-ad{grid-column:1 / -1}.home-ad-slot{width:250px;height:250px;margin:0 auto}
@media(max-width:680px){.home-ad{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.home-ad-slot{width:min(320px,100%);height:100px}}

.result-actions::before{content:'';position:fixed;inset:auto 0 0;height:calc(88px + env(safe-area-inset-bottom,0px));z-index:18;background:linear-gradient(transparent,var(--bg) 28%);pointer-events:none}
.result-actions>.primary[data-view="collection"]{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:19;width:min(420px,calc(100vw - 32px));min-height:52px;margin:0}
main:has(>.result-actions){padding-bottom:calc(128px + env(safe-area-inset-bottom,0px))}

/* Collection: optional filters above the search, ownership and sort controls. */
.collection-tools{display:grid;grid-template-columns:minmax(180px,400px) minmax(0,1fr);align-items:center;gap:6px 24px;margin:24px 0 12px}
.collection-search-actions{min-width:0}
.collection-search-actions>input{width:100%;min-width:0;height:44px;padding:11px 14px;border:1px solid var(--line);border-radius:7px;background:#1c1c1c;color:var(--text);font-size:13px}
.collection-toolbar-options{display:flex;align-items:center;justify-content:flex-end;gap:24px;min-width:0}
.collection-owned-switch{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px;flex:none;cursor:pointer;font-size:12px;color:var(--muted);white-space:nowrap}
.collection-owned-switch>input{position:absolute;left:0;top:0;width:34px;height:100%;margin:0;opacity:0;cursor:pointer}
.collection-switch-track{position:relative;display:block;width:32px;height:18px;flex:none;border:1px solid #505050;border-radius:20px;background:#252525}
.collection-switch-track::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#95999f;transition:transform .15s,background-color .15s}
.collection-owned-switch>input:checked+.collection-switch-track{background:#353535;border-color:#95999f}
.collection-owned-switch>input:checked+.collection-switch-track::after{transform:translateX(14px);background:var(--lime)}
.collection-owned-switch:has(input:checked){color:var(--text)}
.collection-owned-switch>input:focus-visible+.collection-switch-track{outline:2px solid var(--lime);outline-offset:4px}
.collection-sort{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;white-space:nowrap}
.collection-sort select{appearance:none;width:auto;min-width:0;height:44px;padding:0 30px 0 10px;border:1px solid var(--line);border-radius:7px;background:#1c1c1c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23b6bbc0' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;color:var(--text);font-size:12px;cursor:pointer}
.collection-detail-row{grid-column:1/-1;display:flex;align-items:flex-start;gap:16px;min-width:0;margin-bottom:12px}
.collection-advanced{flex:1;min-width:0}
.collection-advanced>summary{display:flex;align-items:center;gap:7px;width:fit-content;min-height:44px;list-style:none;cursor:pointer;font-size:11px;font-weight:600;color:var(--muted)}
.collection-advanced>summary::-webkit-details-marker{display:none}
.collection-advanced>summary svg{width:14px;height:14px;transition:transform .15s}
.collection-advanced[open]>summary{color:var(--text)}
.collection-advanced[open]>summary svg{transform:rotate(180deg)}
.collection-filter-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:1px solid #505050;border-radius:9px;color:var(--lime);font-size:10px}
.collection-filter-count[hidden],.collection-reset[hidden]{display:none}
.collection-detail-filters{display:block;margin:0 0 8px}
.collection-detail-row>.collection-reset{flex:none;min-height:44px;padding:0 4px;border:0;background:none;color:var(--muted);font-size:11px;cursor:pointer}
.collection-detail-row>.collection-reset:hover{color:var(--text)}
.collection-search-actions>input:focus-visible,.collection-reset:focus-visible,.collection-advanced>summary:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
@media(max-width:800px){.collection-tools{grid-template-columns:minmax(0,1fr);gap:4px;margin-top:20px}.collection-toolbar-options{justify-content:space-between;gap:8px}.collection-owned-switch{font-size:11px}.collection-sort{gap:6px}.collection-sort select{height:36px;font-size:11px}.collection-detail-row{margin-top:0}}

/* Optional native rewarded ads: same layout on home and pack results. */
.rewarded-pack-actions{display:flex;flex-direction:column;gap:8px;flex:1 1 100%;width:100%;margin-top:16px}
.rewarded-pack-button{min-height:48px;white-space:normal;text-wrap:balance}
.rewarded-pack-description{margin:0;color:var(--muted);font-size:12px;line-height:1.6;text-align:center}
.result-actions:has(.rewarded-pack-actions){flex-wrap:wrap}

.result-actions:has(.rewarded-pack-actions){position:fixed;inset:auto 0 0;z-index:19;width:auto;max-width:none;margin:0;display:flex;flex-direction:column;gap:10px;align-items:stretch;padding:12px max(16px,calc((100vw - 560px)/2)) calc(12px + env(safe-area-inset-bottom,0px));background:#1c1c1c;border-top:1px solid var(--line)}
.result-actions:has(.rewarded-pack-actions)::before{display:none}
.result-actions:has(.rewarded-pack-actions)>.primary[data-view="collection"]{position:static;transform:none;width:100%;min-height:36px;margin:0;padding:8px;background:transparent;border:1px solid var(--line);color:var(--text);font-size:13px;order:2}
.result-actions>.rewarded-pack-actions{margin-top:0;order:1}
.result-actions:has(.rewarded-pack-actions)>.text-link{order:3}
main:has(>.result-actions .rewarded-pack-actions){padding-bottom:calc(var(--rewarded-pack-dock-height,200px) + 48px)}

.game-settings{display:grid;gap:0}.game-setting{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-bottom:1px solid #ffffff18}.game-setting>span{display:grid;gap:6px}.game-setting strong{font-size:14px;font-weight:500}.game-setting small{color:#a1a1aa;font-size:12px}.game-setting input{appearance:none;flex:none;width:42px;height:24px;border:1px solid #777;border-radius:20px;background:#333;position:relative;cursor:pointer}.game-setting input:before{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;background:#eee;border-radius:50%;transition:transform .15s}.game-setting input:checked{background:#d8e9ab;border-color:#d8e9ab}.game-setting input:checked:before{background:#252525;transform:translateX(18px)}.game-setting input:focus-visible{outline:2px solid #eee;outline-offset:4px}#sound{display:flex;align-items:center;justify-content:center}#sound>svg{display:block;flex:none}

/* Keep header controls on the same row on narrow phones. */
@media(max-width:360px){body>header{gap:4px}header .logo{font-size:18px;gap:4px}header .account-btn{padding-inline:5px}header #sound{padding-inline:3px}}

@media(max-width:680px){#toast{font-size:12px;line-height:1.5;padding:10px 16px}}
#toast{width:max-content;max-width:calc(100vw - 24px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* cards.css */
/* Card V3 — full-bleed collectible cards. Foil and glare exist only in detail view. */
:root{--r5:#f2efff;--r6:#b5e99f}
@property --spin{syntax:"<angle>";inherits:false;initial-value:0deg}
@property --spin2{syntax:"<angle>";inherits:false;initial-value:0deg}
.card-v3{--card-radius:8.208955cqi;--px:35%;--py:25%;--pos:30%;--rx:0deg;--ry:0deg;--o:0;--foil-angle:120deg;--hue:0deg;--ac:#c9cdd6;--ac-2:#6a6f7a;--bleed:transparent;--neb-1:#787e8c59;--neb-2:#464a5466;--f1:#ffffff59;--f2:#fff3;--f3:#ffffff4d;--f4:#ffffff38;--idle:.16;--peak:.7;--bright:1.15;--sat:1.3;--grain:1.35;--g-idle:.25;--g-peak:.6;container-type:inline-size;position:relative;display:block;width:100%;max-width:268px;aspect-ratio:5/7;padding:0;border:0;border-radius:8.209% / 5.863%;background:none;overflow:visible;text-align:left;perspective:800px;isolation:isolate}
.grid .card-v3{max-width:none}.card-v3:hover{transform:translateY(-5px)}
.card-v3 .card__tilt{position:absolute;inset:0;display:block;border-radius:var(--card-radius);transform:rotateX(var(--rx)) rotateY(var(--ry));transform-style:preserve-3d;will-change:transform;transition:transform .22s ease;box-shadow:0 1px 1px #0009,0 10px 20px -8px #000b,0 30px 60px -20px #000e,0 0 60px -20px var(--bleed)}
.card-v3 .card__face{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:6%;border-radius:var(--card-radius);overflow:hidden;background:#0a0b10;color:#fff;text-align:left}
.card-v3 .card__face::before{content:"";position:absolute;inset:0;z-index:6;padding:1px;border-radius:var(--card-radius);pointer-events:none;background:linear-gradient(160deg,var(--ac),#ffffff59 30%,var(--ac-2) 60%,var(--ac));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}
.card-v3 .card__art{position:absolute;inset:0;z-index:0;display:grid;place-items:center;overflow:hidden;font-size:38cqi;filter:none;background:radial-gradient(1px 1px at 18% 22%,#ffffffe6 50%,transparent 51%),radial-gradient(1px 1px at 72% 14%,#ffffffb3 50%,transparent 51%),radial-gradient(1.5px 1.5px at 84% 46%,#ffffffd9 50%,transparent 51%),radial-gradient(1px 1px at 36% 58%,#fff9 50%,transparent 51%),radial-gradient(1px 1px at 10% 70%,#ffffff80 50%,transparent 51%),radial-gradient(70% 45% at 70% 30%,var(--neb-1),transparent 70%),radial-gradient(80% 50% at 20% 75%,var(--neb-2),transparent 70%),linear-gradient(180deg,#0b0d18,#05060c)}
.card-v3 .card__art::after{content:"";position:absolute;inset:0;z-index:2;background:linear-gradient(180deg,#00000073 0%,transparent 28%),linear-gradient(0deg,#05060af5 0%,#05060abf 30%,transparent 58%);pointer-events:none}
.card-v3 .card__art .card-image{position:absolute;inset:0;display:block;width:100%;height:100%;padding:0;border-radius:0;background:transparent;object-fit:cover;z-index:1}.card-v3 .card__art .art-fallback{position:absolute;inset:0;display:grid;place-items:center;z-index:0;filter:drop-shadow(0 16px 20px #000a)}
.card-v3 .card__top{position:relative;z-index:3;display:flex;align-items:center;justify-content:flex-start;gap:clamp(3px,1.8cqi,5px)}.card-v3 .card-chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border:1px solid #ffffff24;border-radius:999px;background:#ffffff14;color:#fff;font:600 clamp(6px,3.7cqi,10px)/1 'DM Sans',sans-serif;letter-spacing:.14em;white-space:nowrap;backdrop-filter:blur(12px) saturate(1.3);-webkit-backdrop-filter:blur(12px) saturate(1.3)}
.card-v3 .card-chip--rarity{color:var(--ac);border-color:color-mix(in srgb,var(--ac) 45%,transparent)}.card-v3 .card-chip--rarity::before{content:"";width:5px;height:5px;flex:none;border-radius:50%;background:var(--ac);box-shadow:0 0 8px var(--ac)}.card-v3 .card-chip--type{font-family:'Noto Sans KR',sans-serif;font-size:clamp(7px,4cqi,11px);letter-spacing:.02em;overflow:hidden;text-overflow:ellipsis}
.card-v3 .card__bottom{position:relative;z-index:3;display:flex;flex-direction:column}.card-v3 .card__title{display:block;max-width:100%;margin:0;color:#fff;--card-title-size:clamp(16px,12.5cqi,34px);font:900 min(calc(var(--card-title-size) - 2px),max(16px,calc(var(--card-title-size) - 4px)))/1 'Noto Sans KR',sans-serif;letter-spacing:-.045em;text-shadow:0 2px 12px #0008;white-space:nowrap;overflow:hidden}.card-v3 .card__title-text{display:inline-block;max-width:none;white-space:nowrap}.card-v3 .card__title.is-overflowing .card__title-text{animation:card-title-flow var(--title-duration,8s) ease-in-out infinite;transform:translateX(0)}@keyframes card-title-flow{0%,14%{transform:translateX(0)}44%,64%{transform:translateX(calc(0px - var(--title-travel,0px)))}94%,100%{transform:translateX(0)}}
.card-v3 .card__meta{display:flex;align-items:center;gap:8px;margin-top:5%;border:0;padding:0;color:#ffffffb3;font:500 clamp(6px,3.8cqi,10px)/1 'DM Sans',sans-serif;letter-spacing:.06em;font-variant-numeric:tabular-nums}.card-v3 .card__panel{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:4%;padding-top:4%;border-top:1px solid #ffffff24}.card-v3 .card__panel>span:first-child{display:block;min-width:0}
.card-v3 .card__sub{display:block;margin:0 0 4px;color:var(--ac);font:700 clamp(6px,3.6cqi,9.5px)/1 'Noto Sans KR',sans-serif;letter-spacing:.02em}.card-v3 .card__desc{display:-webkit-box;margin:0;color:#fffffff0;font:500 clamp(7px,4.5cqi,12px)/1.42 'Noto Sans KR',sans-serif;letter-spacing:-.01em;word-break:keep-all;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.card-v3 .card__mark{display:grid;place-items:center;width:clamp(10px,7cqi,18px);height:clamp(10px,7cqi,18px);flex:none;color:var(--ac);filter:drop-shadow(0 0 6px color-mix(in srgb,var(--ac) 60%,transparent))}
.card-v3 .count-badge,.card-v3 .card-status-badge{position:absolute;z-index:8;right:8%;padding:3px 7px;border:1px solid color-mix(in srgb,var(--ac) 55%,transparent);border-radius:999px;background:#080a0cdd;color:#fff;font-size:clamp(7px,3.3cqi,10px);line-height:1.2;backdrop-filter:blur(8px)}.card-v3 .card__top .count-badge{position:static;flex:none;align-self:center;margin-left:0}.card-v3 .card-status-badge{top:calc(12% + 6px);color:var(--ac)}
.card-v3[data-rarity="common"]{--ac:#c9cdd6;--ac-2:#6a6f7a;--bleed:transparent;--neb-1:#787e8c59;--neb-2:#464a5466;--f1:#ffffff59;--f2:#fff3;--f3:#ffffff4d;--f4:#ffffff38}.card-v3[data-rarity="rare"]{--ac:#6fb8ff;--ac-2:#1b56b8;--bleed:#3c8cff66;--neb-1:#3278ff73;--neb-2:#143ca073;--f1:#70cdffb3;--f2:#96aaff73;--f3:#ff96e666;--f4:#78e6ff8c}.card-v3[data-rarity="epic"]{--ac:#c48bff;--ac-2:#5a1fb8;--bleed:#9650ff66;--neb-1:#9650ff73;--neb-2:#46149680;--f1:#ffdb70b3;--f2:#b45aff8c;--f3:#8432ff8c;--f4:#ffa07880}.card-v3[data-rarity="legendary"]{--ac:#f3d27a;--ac-2:#9a6b12;--bleed:#f0be5066;--neb-1:#f0aa3c73;--neb-2:#78460f80;--f1:#ffeb96cc;--f2:#ffaa5a8c;--f3:#ff825a8c;--f4:#fff5c8a6}.card-v3[data-rarity="mythic"]{--ac:#ff7ec0;--ac-2:#7fb8ff;--bleed:#ff5aaa73;--neb-1:#ff50aa80;--neb-2:#5a78ff80;--f1:#ff6ebf;--f2:#ffdb70a6;--f3:#78ffc899;--f4:#78aaffb3}
.card-v3[data-rarity="mythic"] .card__face::before{background:conic-gradient(from var(--spin),#ff5fae,#ffd66b,#7fffd0,#7fb8ff,#c88cff,#ff5fae);opacity:1}.card-v3.card--interactive[data-rarity="mythic"] .card__face::before{animation:card-rim-spin 6s linear infinite}@keyframes card-rim-spin{to{--spin:360deg}}
.card-v3[data-rarity="mutation"]{--ac:#b5e99f;--ac-2:#8064b7;--bleed:#91d87859;--neb-1:#5ebc9e80;--neb-2:#7256a880;--f1:#bdffa999;--f2:#b398e680;--f3:#78dcc199;--f4:#d6f3a780}
.card-v3[data-rarity="mutation"] .card__face{background:linear-gradient(145deg,#14221e,#0c1014 56%,#1d1625)}
.card-v3[data-rarity="mutation"] .card__face::before{background:linear-gradient(132deg,#c5ffa8,#5d987c 30%,#8a6bb6 55%,#b5e99f 78%,#536e67);opacity:1}
.card-v3[data-rarity="mutation"] .card-chip--rarity{border-style:dashed;background:#17241bbd;letter-spacing:.11em}
.card-v3[data-rarity="mutation"] .card__mark{transform:rotate(22deg)}
.card-v3[data-rarity="transcendent"]{--ac:#f6f3ff;--ac-2:#cbbcff;--bleed:#d2c8ff8c;--neb-1:#b4c8ff80;--neb-2:#ffc8f073;--f1:#ffffffd9;--f2:#cbbcffb3;--f3:#ffd6f0b3;--f4:#bfe8ffb3;--sat:1.45;--bright:1.2;--grain:1.45}
.card-v3[data-rarity="transcendent"] .card__face{background:linear-gradient(145deg,#171720,#08090e 58%,#16131d)}
.card-v3[data-rarity="transcendent"] .card__face::before{background:conic-gradient(from var(--spin),#fff,#cbbcff,#fff 30%,#ffd6f0 45%,#fff 60%,#bfe8ff 75%,#fff);opacity:1;box-shadow:inset 0 0 14px #ffffff20}
.card-v3[data-rarity="transcendent"] .card__face::after{content:"";position:absolute;inset:2.612cqi;z-index:6;padding:1px;border-radius:5.97cqi;pointer-events:none;background:conic-gradient(from var(--spin2),#ff5faae6,#ffd76ee6,#6effd2e6,#6eaae6e6,#c878ffe6,#ff5faae6);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.52}
.card-v3.card--interactive[data-rarity="transcendent"] .card__face::before{animation:card-rim-spin 9s linear infinite}.card-v3.card--interactive[data-rarity="transcendent"] .card__face::after{animation:card-inner-spin 6s linear infinite reverse}@keyframes card-inner-spin{to{--spin2:360deg}}
/* Clip the gradient on the moving text itself so long transcendent names remain visible. */
.card-v3[data-rarity="transcendent"] .card__title{color:#fff;text-shadow:none}
.card-v3[data-rarity="transcendent"] .card__title-text{background:linear-gradient(100deg,#fff,#cbbcff 25%,#fff 45%,#ffd6f0 60%,#fff 80%,#bfe8ff);background-size:200% 100%;background-position:var(--pos) 0;-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 2px 10px #0009)}
.card-v3[data-rarity="transcendent"] .card-chip--rarity{background:#ffffff24;border-color:#ffffff66;letter-spacing:.09em}.card-v3[data-rarity="transcendent"] .card__tilt{box-shadow:0 1px 1px #0009,0 10px 20px -8px #000b,0 30px 60px -20px #000e,0 0 70px -18px #dcd2ffb3}
.card-v3[data-rarity="locked"]{--ac:#6f747d;--ac-2:#343840;--neb-1:#5a5e6838;--neb-2:#282b3173;filter:none}.card-v3.locked .card__art{filter:grayscale(1)}.card-v3.locked .card__art .art-fallback{opacity:.2}.card-v3.locked .card__bottom{opacity:.58}
/* These layers are emitted only for the clicked detail card. */
.card-v3 .card__foil{position:absolute;inset:0;z-index:4;border-radius:var(--card-radius);pointer-events:none;background:linear-gradient(var(--foil-angle),var(--f1),var(--f2) 28%,var(--f3) 52%,var(--f4) 74%,var(--f1)),url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 -.2'/></filter><rect width='160' height='160' fill='%23fff'/><rect width='160' height='160' filter='url(%23g)' fill='%23000'/></svg>");background-size:260% 260%,160px 160px;background-position:var(--pos) 50%,0 0;background-blend-mode:multiply;-webkit-mask:radial-gradient(70% 55% at var(--px) var(--py),#000,rgba(0,0,0,.55) 40%,transparent 100%);mask:radial-gradient(70% 55% at var(--px) var(--py),#000,rgba(0,0,0,.55) 40%,transparent 100%);mix-blend-mode:screen;filter:hue-rotate(var(--hue)) saturate(var(--sat)) brightness(var(--bright)) contrast(var(--grain));opacity:calc(var(--idle) + var(--o) * (var(--peak) - var(--idle)));transition:opacity .5s}
.card-v3[data-rarity="transcendent"] .card__foil{background:linear-gradient(var(--foil-angle),var(--f1),var(--f2) 30%,var(--f3) 55%,var(--f4) 80%,var(--f1)),repeating-linear-gradient(calc(var(--foil-angle) - 90deg),#ff5faa 0 2px,#ffd76e 2px 4px,#6effd2 4px 6px,#6eAAff 6px 8px,#c878ff 8px 10px),url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 -.55'/></filter><rect width='120' height='120' fill='%23fff'/><rect width='120' height='120' filter='url(%23g)' fill='%23000'/></svg>");background-size:260% 260%,auto,120px 120px;background-position:var(--pos) 50%,0 0,0 0;background-blend-mode:screen,multiply;mix-blend-mode:screen}
.card-v3 .card__glare{position:absolute;inset:0;z-index:5;border-radius:var(--card-radius);pointer-events:none;background:radial-gradient(85% 70% at var(--px) var(--py),#ffffff8c,#ffffff14 45%,#00000040 100%);mix-blend-mode:soft-light;opacity:calc(var(--g-idle) + var(--o) * (var(--g-peak) - var(--g-idle)));transition:opacity .5s}
.reveal-stage{height:415px}.card-v3.reveal-card,dialog .card-v3.reveal-card{width:268px;max-width:min(100%,268px);height:auto;padding:0;aspect-ratio:5/7;animation:arrive .45s ease;touch-action:manipulation}dialog:has(.card-v3){width:368px;max-width:calc(100vw - 24px);padding:38px 24px 20px;background:#101318}dialog:has(.card-v3) #modal-body{display:flex;flex-direction:column;align-items:center}.card-detail-count{text-align:center;margin:14px 0 0!important;font-size:12px!important;color:var(--muted)!important}
@media(max-width:680px){.card-v3 .card-chip{height:20px;padding:0 7px}.reveal-stage{height:385px}.card-v3.reveal-card,dialog .card-v3.reveal-card{width:248px;max-width:248px}}@media(max-width:400px){.reveal-stage{height:360px}.card-v3.reveal-card,dialog .card-v3.reveal-card{width:228px;max-width:228px}}@media(prefers-reduced-motion:reduce){.card-v3 .card__tilt,.card-v3 .card__foil,.card-v3 .card__glare{transition:none}.card-v3.card--interactive[data-rarity="mythic"] .card__face::before,.card-v3.card--interactive[data-rarity="transcendent"] .card__face::before,.card-v3.card--interactive[data-rarity="transcendent"] .card__face::after,.card-v3 .card__title.is-overflowing .card__title-text{animation:none}}
.collection-sentinel{height:1px;margin-top:32px;text-align:center;color:var(--muted);font-size:11px;overflow:visible}
.card-v3.card--remembered .card__tilt{filter:grayscale(1);box-shadow:0 1px 1px #0009,0 10px 20px -8px #000b}
.card-v3.card--remembered .card-status-badge{color:#d8dbe0;border-color:#8a909766;background:#17191dee}
.collection-history-note{margin:0 0 22px;color:var(--muted);font-size:12px;line-height:1.7;word-break:keep-all}

.card-v3 .card__mark svg{display:block;width:100%;height:100%}.card-v3 .card__art .locked-symbol{display:block;width:min(30cqi,72px);aspect-ratio:1}.card-v3 .card__art .locked-symbol svg{display:block;width:100%;height:100%}

/* Compact lists use color dots. Large cards use the same entries as symbols. */
.card-v3{container-name:collectible-card}
.card-v3 .card__heading{display:flex;flex-direction:column;align-items:stretch;gap:clamp(3px,2cqi,5px);min-width:0}
.card-v3 .card__identity{display:block;flex:auto;width:100%;min-width:0}
.card-v3 .card__identity .card__meta{margin-top:4.4cqi}
.card-v3 .card__affinities{--affinity-size:clamp(2px,4.3cqi,6px);display:flex;flex-wrap:wrap;gap:clamp(1px,2.1cqi,3px);flex:none;align-content:start;justify-content:flex-start;align-self:stretch;max-width:100%}
.card-v3 .card__affinity{flex:none;display:grid;place-items:center;width:var(--affinity-size);height:var(--affinity-size);border-radius:50%;background:var(--affinity-color);color:var(--affinity-color)}
.card-v3 .card__affinity svg{display:none;width:62%;height:62%}
.card-v3 .card-status-badge{left:8%;right:auto}
/* Compact descriptions keep two lines and give less space to the logo gap. */
@container collectible-card (max-width:219px){
 .card-v3 .card__panel{gap:4px}
}
@container collectible-card (min-width:220px){
 .card-v3 .card__affinities{--affinity-size:20px;gap:4px}
 .card-v3 .card__affinity{border:1px solid currentColor;background:#171113e6;box-shadow:0 2px 7px #0005}
 .card-v3 .card__affinity svg{display:block}
}
/* A clicked detail remains symbolic even in a short or narrow viewport. */
.card-v3.reveal-card .card__affinities,.card-v3.card-export .card__affinities{--affinity-size:min(20px,8cqi);gap:min(4px,1.6cqi)}
.card-v3.reveal-card .card__affinity,.card-v3.card-export .card__affinity{border:1px solid currentColor;background:#171113e6;box-shadow:0 2px 7px #0005}
.card-v3.reveal-card .card__affinity svg,.card-v3.card-export .card__affinity svg{display:block}
.card-v3 .card__affinities{cursor:help;pointer-events:auto}
.card-affinity-tooltip{position:fixed;inset:auto;margin:0;z-index:2147483647;width:max-content;max-width:calc(100vw - 16px);padding:9px 12px;border:1px solid #59616b;border-radius:9px;background:#24282ef5;color:#fff;box-shadow:0 6px 22px #0007;font:500 12px/1.5 'Noto Sans KR',sans-serif;overflow-wrap:anywhere;pointer-events:none}
.card-affinity-tooltip[hidden]{display:none}
.card-affinity-tooltip::backdrop{background:transparent;pointer-events:none}

/* Both opening screens use the same back and the front face's radius. */
.card-back .card__face{align-items:center;justify-content:center;gap:14px;background:radial-gradient(ellipse at 40% 25%,#59616c33,transparent 65%),repeating-linear-gradient(135deg,#a5aab509 0 1px,transparent 1px 13px),#13171e;color:#c1c6cf;text-align:center}
.card-back .card__face::before,.pack-reveal .card-back .card__face::before{padding:1px;background:#8b939c75;animation:none!important;opacity:1}
.card-back .card__face::after{content:"";position:absolute;inset:4%;border:1px solid #aab1bd26;border-radius:5.97cqi;pointer-events:none}
.card-back .back-symbol{display:block;flex:none;width:22%;height:auto;aspect-ratio:1;color:#b7bcc6;filter:drop-shadow(0 0 12px #b7bcc62b)}.card-back .back-symbol svg{display:block;width:100%;height:100%}
.card-back .back-title{font-size:clamp(9px,4cqi,12px);letter-spacing:4px;line-height:1.4}.card-back .card-meta{font-size:clamp(8px,3.3cqi,10px);letter-spacing:.04em;color:#7d8591}.card-back:hover{transform:none}

/* Shared rarity light chip: 1 common → 7 mutation. No visible rarity text. */
.card-v3 .card-chip--rarity{--rarity-halo:0px;--rarity-aura:0px;--rarity-core:.18;--rarity-shine:.75;position:relative;--spark-size:clamp(8px,4.6cqi,14px);width:clamp(26px,12cqi,36px);min-width:0;gap:0;height:clamp(16px,9cqi,25px);padding:0;isolation:isolate;letter-spacing:0;overflow:visible;flex:none;border-color:color-mix(in srgb,var(--ac) 42%,transparent);background:color-mix(in srgb,var(--ac) 7%,#0b0d16cc);box-shadow:0 0 var(--rarity-aura) color-mix(in srgb,var(--ac) 30%,transparent)}
.card-v3 .card-chip--rarity::before{content:none;display:none}
.card-v3 .card__rarity-light{position:absolute;display:block;left:50%;top:50%;width:var(--spark-size);height:var(--spark-size);margin:0;flex:none;overflow:visible;z-index:1;transform:translate(-50%,-50%) translate(calc(var(--spark-x,0) * var(--spark-size)),calc(var(--spark-y,0) * var(--spark-size)));opacity:var(--rarity-shine);filter:drop-shadow(0 0 var(--rarity-halo) var(--ac))}
.card-v3 .rarity-light-rays{stroke:#080b14e6;stroke-width:1.2;stroke-linejoin:round;paint-order:stroke fill}
.card-v3 .rarity-light-core{opacity:var(--rarity-core)}
.card-v3[data-rarity="rare"] .card-chip--rarity{--rarity-halo:1px;--rarity-aura:3px;--rarity-core:.32;--rarity-shine:.85}
.card-v3[data-rarity="epic"] .card-chip--rarity{--rarity-halo:1.8px;--rarity-aura:5px;--rarity-core:.48;--rarity-shine:.94}
.card-v3[data-rarity="legendary"] .card-chip--rarity{--rarity-halo:2.6px;--rarity-aura:8px;--rarity-core:.68;--rarity-shine:1}
.card-v3[data-rarity="mythic"] .card-chip--rarity{--rarity-halo:3.3px;--rarity-aura:11px;--rarity-core:.83;--rarity-shine:1;background:linear-gradient(110deg,#ff7ec022,#7fb8ff20)}
.card-v3[data-rarity="transcendent"] .card-chip--rarity{--rarity-halo:4.2px;--rarity-aura:15px;--rarity-core:1;--rarity-shine:1;background:linear-gradient(110deg,#ffffff26,#cbbcff20,#ffd6f020);border-color:#f6f3ff99}
.card-v3[data-rarity="transcendent"] .card__rarity-light{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #d8c8ff)}
.card-v3[data-rarity="mutation"] .card-chip--rarity{--rarity-halo:0px;--rarity-aura:0px;--rarity-core:.4;--rarity-shine:.9;color:#668348;background:radial-gradient(ellipse at 45% 80%,#243817,#091005 80%);border-color:#45613199;border-style:dashed;box-shadow:inset 0 0 7px #020501,0 -2px 8px #263d1b66}
.card-v3[data-rarity="mutation"] .card-chip--rarity::after{content:"";position:absolute;z-index:0;inset:-5px -2px -2px;border-radius:50%;background:radial-gradient(ellipse at 20% 75%,#3b58256b,transparent 58%),radial-gradient(ellipse at 60% 30%,#42632b8c,transparent 62%),radial-gradient(ellipse at 85% 60%,#1c2e13b3,transparent 60%);filter:blur(2.5px);animation:mutation-chip-mist 4.8s ease-in-out infinite alternate;pointer-events:none}
.card-v3[data-rarity="mutation"] .card__rarity-light{filter:drop-shadow(0 0 1.5px #304c21);opacity:.82}
.card-v3[data-rarity="mutation"] .rarity-light-rays{stroke:#061003}
.card-v3[data-rarity="mutation"] .rarity-light-core{fill:#101e08;opacity:.8}
@keyframes mutation-chip-mist{from{opacity:.6;transform:translateY(1px) skewX(-7deg)}to{opacity:.9;transform:translateY(-3px) skewX(8deg)}}
.card-v3[data-rarity="locked"] .card__rarity-light{opacity:.45;filter:none}
.card-v3[data-rarity="locked"] .rarity-light-rays{fill:none;stroke:currentColor;stroke-width:1.5}
.card-v3[data-rarity="locked"] .rarity-light-core{opacity:0}

/* All grades fit the common-sized chip; their light shapes overlap in a small cluster. */
.card-v3 .card__rarity-light:nth-child(1){--spark-x:-.45;--spark-y:0}
.card-v3 .card__rarity-light:nth-child(2){--spark-x:-.22;--spark-y:-.16}
.card-v3 .card__rarity-light:nth-child(3){--spark-x:0;--spark-y:.15}
.card-v3 .card__rarity-light:nth-child(4){--spark-x:.23;--spark-y:-.17}
.card-v3 .card__rarity-light:nth-child(5){--spark-x:.45;--spark-y:.04}
.card-v3 .card__rarity-light:nth-child(6){--spark-x:.12;--spark-y:.21}
.card-v3 .card__rarity-light:nth-child(7){--spark-x:-.12;--spark-y:-.22}
.card-v3 .card-chip--rarity[data-light-count="0"] .card__rarity-light,
.card-v3 .card-chip--rarity[data-light-count="1"] .card__rarity-light{--spark-x:0;--spark-y:0}
.card-v3 .card-chip--rarity[data-light-count="2"] .card__rarity-light:nth-child(1){--spark-x:-.24;--spark-y:0}
.card-v3 .card-chip--rarity[data-light-count="2"] .card__rarity-light:nth-child(2){--spark-x:.24;--spark-y:0}
.card-v3 .card-chip--rarity[data-light-count="3"] .card__rarity-light:nth-child(1){--spark-x:-.3;--spark-y:.11}
.card-v3 .card-chip--rarity[data-light-count="3"] .card__rarity-light:nth-child(2){--spark-x:0;--spark-y:-.18}
.card-v3 .card-chip--rarity[data-light-count="3"] .card__rarity-light:nth-child(3){--spark-x:.3;--spark-y:.11}
.card-v3 .card-chip--rarity[data-light-count="4"] .card__rarity-light:nth-child(1){--spark-x:-.34;--spark-y:-.12}
.card-v3 .card-chip--rarity[data-light-count="4"] .card__rarity-light:nth-child(2){--spark-x:-.12;--spark-y:.14}
.card-v3 .card-chip--rarity[data-light-count="4"] .card__rarity-light:nth-child(3){--spark-x:.12;--spark-y:-.14}
.card-v3 .card-chip--rarity[data-light-count="4"] .card__rarity-light:nth-child(4){--spark-x:.34;--spark-y:.12}
@media(prefers-reduced-motion:reduce){.card-v3[data-rarity="mutation"] .card-chip--rarity::after{animation:none}}

/* Grade and owned quantity stay upper left; permanent level uses the upper-right slot. */
.card-v3 .card__top-left{display:flex;min-width:0}
.card-v3 .card__top-row{display:flex;align-items:center;min-width:0}
.card-v3 .card__top .card-chip--type{max-width:35%;min-width:0;flex:0 1 auto;margin-left:auto}

/* Keep the overlapping grade lights in their standard chip. */
.card-v3 .card__top-left{--rarity-chip-width:clamp(26px,12cqi,36px)}
.card-v3 .card__top .card-chip--rarity{width:var(--rarity-chip-width);box-sizing:border-box}

/* Soften both clipped edges only when a name overflows its available width. */
.card-v3 .card__title.is-overflowing{--title-fade:clamp(6px,4cqi,12px);-webkit-mask-image:linear-gradient(to right,transparent,#000 var(--title-fade),#000 calc(100% - var(--title-fade)),transparent);mask-image:linear-gradient(to right,transparent,#000 var(--title-fade),#000 calc(100% - var(--title-fade)),transparent)}

/* Share chip height with the upper-right level; its glow follows level alone. */
.card-v3 .card__top{--card-chip-height:clamp(16px,9cqi,25px)}
.card-v3 .card__top-row{gap:clamp(3px,1.8cqi,5px)}
.card-v3 .card__top-row .card-level-badge{position:absolute;right:0;top:0}
.card-v3 .card__top .card-chip--rarity{height:var(--card-chip-height)}
.card-v3 .card-level-badge{--level-color:#c9cdd6;--level-glow:3px;position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:none;box-sizing:border-box;width:var(--card-chip-height);height:var(--card-chip-height);aspect-ratio:1;border:1px solid color-mix(in srgb,var(--level-color) 65%,transparent);border-radius:50%;background:color-mix(in srgb,var(--level-color) 12%,#080b13);color:var(--level-color);box-shadow:0 0 var(--level-glow) color-mix(in srgb,var(--level-color) 55%,transparent),inset 0 0 4px color-mix(in srgb,var(--level-color) 14%,transparent);font:900 calc(var(--card-chip-height) * .6)/1 'DM Sans',sans-serif;letter-spacing:-.03em;font-variant-numeric:tabular-nums;text-align:center}
.card-v3 .card-level-badge b{position:relative;z-index:1;font-weight:900}
.card-v3 .card-level-badge[data-level-glow="epic"]{--level-color:#c48bff;--level-glow:7px}
.card-v3 .card-level-badge[data-level-glow="legendary"]{--level-color:#f3d27a;--level-glow:10px}
.card-v3 .card-level-badge[data-level-glow="mythic"]{--level-color:#ff7ec0;--level-glow:13px}
.card-v3 .card-level-badge[data-level-glow="transcendent"]{border:1.5px solid transparent;color:#fff;background:linear-gradient(#161321,#161321) padding-box,conic-gradient(#ff7ec0,#ffd76e,#6effd2,#6eaaff,#c48bff,#ff7ec0) border-box;box-shadow:0 -2px 8px #ff7ec055,3px 1px 9px #ffd76e44,-3px 2px 9px #6eaaff66}
.card-v3 .card-level-badge[data-level-glow="transcendent"]::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background:conic-gradient(#ff7ec0,#ffd76e,#6effd2,#6eaaff,#c48bff,#ff7ec0);filter:blur(5px);opacity:.35;pointer-events:none}

@container collectible-card (max-width:90px){
 .card-v3 .card__top-left{--rarity-chip-width:clamp(14px,24cqi,22px)}
 .card-v3 .card__top{--card-chip-height:clamp(11px,19cqi,16px);gap:clamp(1px,2cqi,2px)}
 .card-v3 .card__top-row{gap:clamp(1px,2cqi,2px)}
 .card-v3 .card__top .card-chip--rarity{--spark-size:clamp(5px,10cqi,9px);height:var(--card-chip-height);padding:0}
}

/* trading.css */
.trade-page{max-width:1160px;margin:0 auto}.trade-intro{margin-bottom:28px}.trade-intro h1{margin-top:10px}.trade-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);margin-bottom:28px}.trade-tabs{height:auto;gap:28px;overflow:auto}.trade-tabs button{height:52px;flex:none;white-space:nowrap;color:var(--muted);font-size:14px}.trade-tabs button[aria-current=page]{color:var(--text);border-bottom:2px solid var(--lime)}.trade-refresh{flex:none;color:var(--muted);font-size:12px;padding:10px 0}.trade-section-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 0 20px}.trade-section-head h2,.trade-panel h2{font-size:18px;margin:0}.trade-section-head>span,.trade-panel h2 small{font-size:12px;font-weight:400;color:var(--muted)}.trade-panel,.trade-listing{border:1px solid var(--line);border-radius:16px;padding:22px;background:var(--panel);min-width:0}.trade-market-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.trade-listing-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-bottom:18px}.trade-listing-top strong{font-size:13px;color:var(--text)}.trade-status{white-space:nowrap;padding:5px 8px;background:#ffffff08;border-radius:5px}.trade-status.is-open{color:var(--lime);background:#c8ff690a}.trade-listing-body{display:flex;align-items:center;gap:22px}.trade-preview{width:116px;flex:none}.trade-preview .card{width:100%;max-width:none}.trade-listing-info{flex:1;min-width:0}.trade-listing-info>small{font-size:11px}.trade-listing-info h3{font-size:19px;line-height:1.4;margin:8px 0;overflow-wrap:anywhere}.trade-listing-info p{font-size:13px;color:#bdc1c6;line-height:1.7;margin:0 0 15px;overflow-wrap:anywhere;white-space:pre-wrap}.trade-offer-count{display:block;font-size:11px;color:var(--muted);margin-bottom:12px}.trade-my-offer{display:block;font-size:11px;color:var(--lime);margin-bottom:10px}.trade-secondary{border:1px solid #3c4147;border-radius:8px;padding:11px 15px;font-size:12px;color:#d5d9dd;line-height:1.4}.trade-secondary:hover:not(:disabled){background:#ffffff08;border-color:#66715e}.trade-secondary:disabled{cursor:default;opacity:.35}.trade-panel .primary{margin-top:18px;font-size:14px;padding:15px 18px}.trade-pagination{display:flex;justify-content:center;align-items:center;gap:24px;margin:28px 0 0}.trade-pagination>span{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.trade-empty{text-align:center;padding:36px 14px;color:var(--muted);font-size:13px;line-height:1.8;grid-column:1/-1}.trade-empty .primary{max-width:260px}.trade-empty p{margin:0 0 18px}.trade-compose{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;align-items:start}.trade-picker h2{margin-bottom:10px}.trade-picker-list{display:flex;flex-direction:column;gap:8px;max-height:510px;overflow:auto;overscroll-behavior:contain}.trade-picker-list .combine-option{padding:9px 10px;min-height:73px}.trade-picker-list .combine-option-text small{white-space:normal;line-height:1.5}.trade-pick-check{color:var(--muted);font-size:17px;padding:8px;min-width:32px;min-height:36px}.is-selected .trade-pick-check{color:var(--lime)}.trade-compose-summary{position:sticky;top:24px}.trade-selected{margin:20px 0;display:flex;flex-direction:column;gap:10px}.trade-card-summary{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;padding:8px 0;color:var(--text)}.trade-card-summary>span:last-child{display:flex;flex-direction:column;gap:6px;min-width:0}.trade-card-summary strong{font-size:13px;overflow-wrap:anywhere;line-height:1.5}.trade-card-summary small{font-size:11px;color:var(--muted)}.trade-card-summary .combine-art{width:44px;height:48px}.trade-bundle{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:6px 16px}.trade-hint{font-size:12px;line-height:1.8;color:var(--muted);margin:14px 0}.trade-notice{padding:14px 16px;border-radius:9px;background:#ffffff06;color:#bec5b5;font-size:12px;line-height:1.8;margin:18px 0}.trade-note-label{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:10px}.trade-note-label span{font-size:11px;color:var(--muted)}#trade-note{resize:vertical;min-height:92px;width:100%;font:inherit;font-size:14px;color:var(--text);background:#101318;border:1px solid #3b4148;border-radius:8px;padding:12px;line-height:1.7}.trade-mine-tabs{display:flex;gap:8px;margin:0 0 24px}.trade-mine-tabs button{border-radius:8px;padding:10px 15px;font-size:12px;color:var(--muted);background:#1b1e21}.trade-mine-tabs button[aria-pressed=true]{background:#33383d;color:var(--text)}.trade-back{display:block;font-size:13px;color:var(--muted);padding:0;margin:0 0 20px}.trade-back:hover{color:var(--text)}.trade-offer-list{display:flex;flex-direction:column;gap:16px}.trade-actions{display:flex;gap:10px;margin-top:18px}.trade-offer{padding:20px 0;border-top:1px solid var(--line)}.trade-offer:first-of-type{border-top:0}.trade-offer:last-child{padding-bottom:0}.trade-offer .primary{width:auto;min-width:180px}.trade-page>.trade-listing{margin-bottom:24px}.trade-page>.trade-listing .trade-secondary{display:none}.trade-delete{display:block;margin:24px auto;color:#b9a1a1;font-size:12px;text-decoration:underline;text-underline-offset:4px}.trade-confirm h3{font-size:13px;color:var(--muted);margin:20px 0 8px}.trade-confirm .primary{margin:20px 0 0}.trade-confirm .trade-back{width:100%;text-align:center;margin:20px 0 0}.trade-card-detail{display:grid;place-items:center}.trade-card-detail .card{width:255px}.trade-page button:focus-visible,#trade-note:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
@media(min-width:681px) and (max-width:1150px){header{height:auto;min-height:96px;flex-wrap:wrap;padding-top:18px;padding-bottom:0}header nav{order:3;width:100%;height:48px;gap:26px;overflow-x:auto}header nav button{white-space:nowrap;flex:none}}
@media(max-width:850px){.trade-compose{grid-template-columns:1fr}.trade-compose-summary{position:static}.trade-picker-list{max-height:310px}.trade-market-grid{grid-template-columns:1fr}.trade-preview{width:100px}.trade-compose-summary .trade-selected{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}}
@media(max-width:500px){.trade-toolbar{gap:10px;margin-bottom:22px}.trade-tabs{gap:17px}.trade-tabs button{font-size:12px}.trade-refresh{font-size:11px}.trade-panel,.trade-listing{padding:17px}.trade-listing-body{gap:16px}.trade-preview{width:92px}.trade-listing-info h3{font-size:17px}.trade-listing-info p{font-size:12px}.trade-listing-top{font-size:10px;gap:6px}.trade-section-head h2{font-size:17px}.trade-picker .combine-stepper{grid-template-columns:28px 24px 28px}.trade-picker .combine-art{width:38px;height:45px}.trade-picker .combine-option-main{gap:8px}.trade-picker .combine-option-text strong{font-size:12px}.trade-picker .combine-option-text small{font-size:10px}.trade-offer .primary{width:100%}.trade-picker .combine-tools input{font-size:16px}.trade-tabs{justify-content:flex-start}.trade-confirm .trade-bundle{grid-template-columns:1fr}}

.trade-exchange-cards{display:grid;grid-template-columns:auto minmax(0,1fr);gap:28px}.trade-card-label{font-size:12px;font-weight:600;color:var(--muted);margin:0 0 14px}.trade-target{padding-right:28px;border-right:1px solid var(--line)}.trade-proposed{min-width:0}.trade-proposed-list{display:flex;gap:14px;overflow-x:auto;margin-top:-10px;padding:10px 3px 8px;scrollbar-width:thin}.trade-offered-card{flex:none}.trade-card-quantity{display:block;text-align:center;font-size:11px;color:var(--muted);margin-top:10px}.trade-sent-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.trade-sent-meta .trade-hint{margin:0}.trade-sent-meta .trade-status{font-size:11px}.trade-sent-offer .trade-actions{margin-top:16px}
@media(max-width:500px){.trade-exchange-cards{gap:16px}.trade-target{padding-right:16px}.trade-proposed-list{gap:10px}.trade-sent-meta{gap:8px 12px}}

.trade-sent-offer{position:relative}.trade-sent-status{position:absolute;top:22px;right:22px;font-size:11px}.trade-sent-offer .trade-proposed .trade-card-label{padding-right:85px}
@media(max-width:500px){.trade-sent-status{top:17px;right:17px}.trade-exchange-cards{grid-template-columns:minmax(0,1fr);gap:20px}.trade-target{padding:0 0 20px;border-right:0;border-bottom:1px solid var(--line)}.trade-target .trade-preview{width:180px;max-width:100%}.trade-sent-offer .trade-proposed .trade-card-label{padding-right:0}.trade-proposed-list{padding-bottom:10px}}

.trade-picker-list .combine-option{flex:0 0 auto;min-height:0;align-items:center}
.trade-picker-list .combine-option .combine-card-preview{width:116px}
.trade-picker-list .combine-option-main{align-self:center}
.trade-compose-summary .trade-selected-card{width:100%}
@media(max-width:500px){.trade-picker-list .combine-option .combine-card-preview{width:108px}}

@media(max-width:500px){.trade-picker-list .combine-option{position:relative}.trade-picker-list .combine-option-main{padding-right:32px}.trade-picker-list .trade-pick-check{position:absolute;top:12px;right:12px;z-index:1;margin:0}}

/* Public marketplace conversation */
.market-chat-room{max-width:860px;padding:0;overflow:hidden}.market-chat-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}.market-chat-live{display:flex;align-items:center;gap:9px;color:var(--text)}.market-chat-live i{width:6px;height:6px;border-radius:50%;background:var(--lime)}.market-chat-list{list-style:none;margin:0;padding:8px 24px;height:380px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.market-chat-message{display:grid;grid-template-columns:128px minmax(0,1fr);gap:22px;padding:17px 0;border-bottom:1px solid #ffffff09;font-size:14px;line-height:1.7;overflow-wrap:anywhere}.market-chat-message:last-child{border-bottom:0}.market-chat-message strong{font-size:12px;font-weight:600;color:var(--muted)}.market-chat-message p{margin:0;white-space:pre-wrap;color:var(--text)}.market-chat-empty{padding:110px 0;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}.market-chat-form{padding:22px 24px;border-top:1px solid var(--line)}.market-chat-form label{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:12px;color:var(--text)}.market-chat-form label span{color:var(--muted);font-variant-numeric:tabular-nums;font-size:11px}.market-chat-form textarea{width:100%;min-height:90px;resize:vertical;background:#101318;border:1px solid #3b4148;border-radius:8px;padding:12px 14px;color:var(--text);font:inherit;font-size:14px;line-height:1.7}.market-chat-form textarea:focus-visible{outline:2px solid var(--lime);outline-offset:3px}.market-chat-compose-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}.market-chat-compose-footer>span{font-size:11px;color:var(--muted)}.market-chat-compose-footer .primary{width:auto;font-size:12px;padding:12px 18px;margin:0;flex:none}.market-chat-compose-footer .primary:disabled{opacity:.4;cursor:default}.market-chat-status{margin:12px 24px;color:#e2b6a7;font-size:12px;line-height:1.6}.market-chat-latest{margin:8px 24px 16px;font-size:11px;padding:8px 12px}.market-chat-latest[hidden]{display:none}
@media(max-width:500px){.market-chat-head{padding:16px}.market-chat-list{padding:4px 16px;height:340px}.market-chat-message{grid-template-columns:minmax(0,1fr);gap:3px;padding:14px 0;font-size:13px}.market-chat-message strong{font-size:11px}.market-chat-form{padding:18px 16px}.market-chat-form textarea{font-size:16px}.market-chat-compose-footer{align-items:flex-end}.market-chat-compose-footer>span{max-width:130px;line-height:1.6}.market-chat-compose-footer .primary{padding:12px}.market-chat-status{margin:12px 16px}.market-chat-latest{margin-left:16px}}

#market-chat-input::placeholder{font-size:12px}
@media(max-width:500px){.market-chat-compose-footer{flex-direction:column;align-items:flex-start;gap:10px}.market-chat-compose-footer>span{max-width:none;white-space:nowrap}.market-chat-compose-footer .primary{align-self:flex-end}}
.trade-section-controls{display:flex;align-items:center;gap:12px;flex:none}.trade-section-controls>span{font-size:12px;color:var(--muted);white-space:nowrap}.trade-status-filter{width:148px;min-height:40px;padding-block:9px;border:1px solid #303638;border-radius:8px;background-color:#16191b;color:var(--text);font:inherit;font-size:12px;cursor:pointer}.trade-status-filter:focus-visible{outline:2px solid var(--lime);outline-offset:2px}.trade-status-filter:disabled{opacity:.5;cursor:default}@media(max-width:500px){.trade-section-controls{gap:10px}.trade-status-filter{width:140px}}

/* hall.css */
@media (min-width: 681px) and (max-width: 980px) {
  header { gap: 14px; }
  nav { gap: 18px; }
}

.hall-page { max-width: 820px; margin: 0 auto; }
.hall-intro { text-align: center; margin: 8px 0 36px; }
.hall-intro .eyebrow { margin: 0 0 12px; }
.hall-feature { min-height: 470px; padding: 32px 24px 38px; border: 1px solid #343b3d; border-radius: 18px; text-align: center; background: radial-gradient(ellipse at 50% 48%, #273428 0, #1a1f1e 45%, #16191b 100%); }
.hall-kicker { display: block; color: var(--lime); letter-spacing: 2px; font-size: 11px; font-weight: 700; }
.hall-user { margin: 20px 0 3px; font-size: 26px; letter-spacing: -.5px; }
.hall-rarity { margin: 0 0 24px; color: var(--rarity); font-size: 13px; font-weight: 700; }
.hall-hero-card { display: flex; justify-content: center; }
.hall-hero-card .card-v3 { width: 268px; max-width: 100%; cursor: pointer; }
.hall-page .card-v3:hover { transform: none; }
.hall-page .count-badge { display: none; }
.hall-rule { margin: 19px 0 0; color: #929b98; font-size: 11px; line-height: 1.8; }
.hall-detail-owner { margin: 0 0 18px; text-align: center; color: var(--lime) !important; font-size: 13px !important; }
.hall-detail-hint { max-width: 270px; margin: 18px auto 0; text-align: center; font-size: 12px !important; }
dialog .hall-detail-card { touch-action: none; }
#modal { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.hall-empty { display: grid; place-items: center; min-height: 330px; color: #b8c0b8; font-size: 14px; }
.hall-timeline { margin-top: 70px; }
.hall-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #39403e; }
.hall-list-heading .eyebrow { margin: 0 0 7px; }
.hall-list-heading h2 { margin: 0; font-size: 22px; }
.hall-list-heading > span { color: var(--muted); font-size: 12px; }
.hall-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(130px, 1.4fr) 68px; align-items: center; gap: 18px; min-height: 104px; padding: 14px 16px; border-bottom: 1px solid #2b3031; }
.hall-row-user { color: #c6cdc6; font-size: 13px; overflow-wrap: anywhere; }
.hall-row-name { font-size: 15px; font-weight: 600; }
.hall-thumb { width: 62px; height: 87px; overflow: hidden; pointer-events: none; }
.hall-thumb .card-v3 { width: 62px; min-width: 62px; height: 87px; padding: 3px; border-radius: 5px; box-shadow: none; }
.hall-thumb .card__face { border-radius: 3px; }
.hall-thumb .card__art { inset: 2px; border-radius: 2px; font-size: 30px; }
.hall-thumb .card__top, .hall-thumb .card__bottom, .hall-thumb .card-status-badge { display: none; }
.hall-thumb .card-image { object-fit: cover; }
.hall-list-empty { padding: 40px 16px; color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 680px) {
  header { height: auto; min-height: 96px; flex-wrap: wrap; padding-top: 10px; gap: 5px 10px; }
  header nav { order: 3; flex-basis: 100%; width: 100%; height: 38px; justify-content: center; gap: clamp(13px, 5vw, 28px); }
  header nav button { height: 38px; white-space: nowrap; }
  .hall-intro { margin-top: 3px; }
  .hall-intro .sub { max-width: 320px; margin: auto; }
  .hall-feature { min-height: 440px; padding: 26px 16px; }
  .hall-timeline { margin-top: 52px; }
  .hall-row { grid-template-columns: minmax(65px, 1fr) minmax(90px, 1.4fr) 56px; gap: 9px; min-height: 88px; padding: 11px 3px; }
  .hall-row-user { font-size: 12px; }
  .hall-row-name { font-size: 13px; }
  .hall-thumb { width: 52px; height: 73px; }
  .hall-thumb .card-v3 { width: 52px; min-width: 52px; height: 73px; }
}

.hall-origin{margin:-15px 0 20px;color:#9ca6a0;font-size:12px}
.hall-row-name small{color:#9ca6a0;font-size:11px;font-weight:400;white-space:nowrap}

.hall-card-reveal .hall-reveal-close{width:min(100%,320px);min-height:48px;padding:12px 24px}
.hall-card-reveal .pack-reveal-help{overflow-wrap:anywhere}

.card-detail-reveal .pack-reveal-top>span{flex:none;white-space:nowrap}
.card-detail-reveal .pack-reveal-top [data-save-card]{flex:none;width:auto;margin-left:auto;white-space:nowrap}
@media(max-width:380px){.card-detail-reveal .pack-reveal-top{gap:10px}}

/* Scenario ladder shares the main app's dark gray panels and controls. */
.hall-tabs{display:flex;gap:8px;justify-content:center;margin-top:24px}
.hall-tabs button{border:1px solid var(--line);border-radius:9px;background:var(--panel);padding:9px 15px;color:var(--muted);font:inherit;font-size:13px;cursor:pointer}
.hall-tabs button[aria-current=page]{border-color:var(--lime);color:var(--lime);font-weight:600}
.hall-rank-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:22px}
.hall-rank-summary>div{padding:18px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
.hall-rank-summary small,.hall-rank-summary strong,.hall-rank-summary span{display:block}
.hall-rank-summary small{font-size:11px;color:var(--muted)}
.hall-rank-summary strong{font-size:19px;margin:5px 0;overflow-wrap:anywhere}
.hall-rank-summary span{font-size:12px;color:var(--muted)}
.hall-rank-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.hall-rank-table{width:100%;border-collapse:collapse;min-width:620px}
.hall-rank-table th,.hall-rank-table td{text-align:left;padding:14px 12px;border-bottom:1px solid var(--line);font-size:13px;vertical-align:middle}
.hall-rank-table thead th{font-size:11px;color:var(--muted);background:#202327;font-weight:500}
.hall-rank-table tbody th{font-weight:600;overflow-wrap:anywhere}
.hall-rank-table tbody th>span{display:block;margin-top:5px;color:var(--muted);font-size:11px;font-weight:400;line-height:1.6}
.hall-rank-table tbody th>.hall-rank-mobile-progress{display:none}
.hall-rank-table tbody th small{color:var(--lime);font-size:10px;margin-left:4px}
.hall-rank-table tbody tr:last-child>*{border-bottom:0}
.hall-rank-table .hall-rank-me{background:#24272b}
.hall-rank-place{display:flex;align-items:center;gap:9px;white-space:nowrap;font-variant-numeric:tabular-nums;min-width:68px}
.hall-rank-medal{display:block;flex:none;width:30px;height:38px;filter:drop-shadow(0 3px 4px #0005)}
.hall-rank-table .hall-rank-collection{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.hall-rank-table .hall-rank-profile-cell{width:56px;padding-left:0;padding-right:6px;text-align:center}
.hall-rank-profile-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:8px;background:none;color:var(--muted);cursor:pointer}
.hall-rank-profile-button svg{width:20px;height:20px}
.hall-rank-profile-button:hover{border-color:var(--line);background:#25282c;color:var(--lime)}
.hall-rank-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.hall-rank-pages{display:flex;justify-content:center;align-items:center;gap:20px;margin:22px 0}
.hall-rank-pages button{min-height:40px;padding:9px 16px;border:1px solid #3c4147;border-radius:8px;background:var(--panel);color:var(--text);font-size:12px;cursor:pointer}
.hall-rank-pages button:hover:not(:disabled){background:#25282c}
.hall-rank-pages button:disabled{opacity:.4;cursor:not-allowed}
.hall-rank-pages span,.hall-rank-note{font-size:12px;color:var(--muted)}
.hall-rank-empty{text-align:center;padding:35px;color:var(--muted)}
.hall-rank-note{text-align:center;line-height:1.8}
.hall-ranking button:focus-visible,.hall-collector-profile button:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
dialog:has(.hall-collector-profile){width:880px;max-width:calc(100vw - 32px);padding:32px;background:var(--panel);border-color:var(--line)}
.hall-collector-profile{width:100%;min-width:0}
.hall-collector-profile>.eyebrow{margin:0 0 12px;color:var(--lime);font-size:11px;letter-spacing:2px}
.hall-collector-profile>h2{margin:0;font-size:25px;line-height:1.5;overflow-wrap:anywhere;letter-spacing:-.6px}
.hall-collector-profile>.hall-collector-title{margin:8px 0 0;color:var(--lime);font-size:13px;line-height:1.7}
.hall-collector-layout{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);gap:32px;align-items:start;margin-top:26px}
.hall-collector-layout--summary{grid-template-columns:1fr}
.hall-collector-poster .profile-poster-placeholder{min-height:0}
.hall-collector-records{display:grid;grid-template-columns:1fr;gap:20px;padding-bottom:22px;border-bottom:1px solid var(--line)}
.hall-collector-records small{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}
.hall-collector-records strong{font-size:16px;font-weight:600;line-height:1.6;overflow-wrap:anywhere}
.hall-collector-collection{padding-top:22px}
.hall-collector-collection>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hall-collector-collection h3{font-size:13px;margin:0}
.hall-collector-collection>div:first-child>span{font-size:12px;color:var(--muted)}
.hall-collector-collection>strong{display:block;font-size:30px;margin-top:14px;font-variant-numeric:tabular-nums}
.hall-collector-collection>strong>small{font-size:13px;font-weight:400;color:var(--muted)}
.hall-collector-progress{height:5px;border-radius:4px;background:var(--line);overflow:hidden;margin:12px 0 20px}
.hall-collector-progress i{display:block;height:100%;background:var(--lime)}
.hall-collector-rarities{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px}
.hall-collector-rarities>span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;min-width:0}
.hall-collector-rarities i{flex:none;width:6px;height:6px;border-radius:50%}
.hall-collector-rarities b{margin-left:auto;font-weight:500;color:var(--text);white-space:nowrap}
.hall-collector-note{margin:26px 0 0;color:var(--muted);font-size:11px;text-align:center}
@media(max-width:680px){
 .hall-rank-summary{grid-template-columns:1fr}
 .hall-rank-table{min-width:0;table-layout:fixed}
 .hall-rank-table th,.hall-rank-table td{padding:12px 8px;font-size:12px}
 .hall-rank-table tr>*:first-child{width:56px}
 .hall-rank-place{min-width:0;flex-direction:column;gap:4px}
 .hall-rank-medal{width:26px;height:33px}
 .hall-rank-table .hall-rank-clear{display:none}
 .hall-rank-table tbody th>.hall-rank-mobile-progress{display:block;font-size:10px}
 .hall-rank-table .hall-rank-collection{width:72px;font-size:11px}
 .hall-rank-table .hall-rank-profile-cell{width:48px;padding-right:4px}
 dialog:has(.hall-collector-profile){padding:28px 20px}
 .hall-collector-layout{grid-template-columns:1fr;gap:24px}
 .hall-collector-card{width:100%;max-width:360px;margin:auto}
 .hall-collector-profile>h2{font-size:22px;padding-right:16px}
 .hall-collector-records{grid-template-columns:80px minmax(0,1fr);gap:16px}
 .hall-collector-records strong{font-size:14px}
}


/* The same animated canvases used by card opening, contained behind the hero. */
.hall-feature{position:relative;isolation:isolate;overflow:hidden}
.hall-feature--card{background:#0a0911;border-color:color-mix(in srgb,var(--reveal-color,#747884) 32%,#242730)}
.hall-feature--card>.pack-reveal-bg,.hall-feature--card>.pack-reveal-fg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.hall-feature--card>.pack-reveal-bg{filter:brightness(var(--bg-brightness,1))}
.hall-feature--card>.pack-reveal-fg{z-index:1}
.hall-feature--card>:not(canvas){position:relative;z-index:2}
.hall-feature--card .hall-kicker,.hall-feature--card .hall-user,.hall-feature--card .hall-rarity,.hall-feature--card .hall-origin,.hall-feature--card .hall-rule{text-shadow:0 1px 8px #000,0 0 20px #000}

.hall-feature--card::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#0a0911db 0, #0a091180 115px,transparent 215px,transparent 80%,#0a0911b3 100%)}

/* Battle ladder: rank medals, tier art/name, nickname, record and win rate. */
.hall-tabs{flex-wrap:wrap}
.battle-rank-table{min-width:0;table-layout:fixed}
.battle-rank-table .hall-rank-place{min-width:0;gap:6px}
.battle-rank-table th:first-child{width:90px}
.battle-rank-table th:nth-child(2){width:100px}
.battle-rank-table th:nth-child(3){width:150px}
.battle-rank-table th:nth-child(5){width:160px}
.battle-rank-table th:nth-child(6){width:80px}
.battle-rank-emblem{display:grid;place-items:center;width:68px;height:64px;margin:auto}
.battle-rank-emblem svg{display:block;width:100%;height:100%}
.battle-rank-tier-fallback{font-size:10px;color:var(--muted);text-align:center;line-height:1.5}
.battle-rank-record span{display:inline-block;white-space:nowrap}
.battle-rank-winrate{font-variant-numeric:tabular-nums;color:var(--lime)}
@media(max-width:680px){.hall-tabs button{padding:9px 11px;font-size:12px}.battle-rank-table th,.battle-rank-table td{padding:10px 4px;font-size:11px}.battle-rank-table th:first-child{width:34px}.battle-rank-table th:nth-child(2){width:42px}.battle-rank-table th:nth-child(3){width:56px}.battle-rank-table th:nth-child(5){width:42px}.battle-rank-table th:nth-child(6){width:52px}.battle-rank-table .hall-rank-place{gap:4px}.battle-rank-table .hall-rank-place>span{font-size:10px}.battle-rank-table .hall-rank-medal{width:22px;height:28px}.battle-rank-tier-name{overflow-wrap:anywhere;line-height:1.6}.battle-rank-emblem{width:34px;height:42px}.battle-rank-record span{font-size:10px}.battle-rank-winrate{font-size:10px!important}.battle-ranking .hall-rank-summary strong{font-size:16px}}

/* card-creation.css */
#admin-card-nav[hidden],.creation-recipe[hidden],.creation-more[hidden],.creation-success[hidden]{display:none!important}
.creation-page{max-width:880px;margin:0 auto}.creation-page .eyebrow{margin:0 0 10px}.creation-page>.sub{margin-bottom:30px}.creation-page form{border:1px solid var(--line);background:#181b1d;border-radius:16px;padding:28px}.creation-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.creation-grid label,.creation-search-label{display:block;font-size:13px;font-weight:600;color:#cbd1d0}.creation-grid input,.creation-grid select,.creation-grid textarea,.creation-search-label input{display:block;width:100%;margin-top:9px;border:1px solid #3a4245;border-radius:8px;background:#101315;color:var(--text);padding:12px 13px;outline:none}.creation-grid textarea{resize:vertical;font:inherit}.creation-grid input:focus,.creation-grid select:focus,.creation-grid textarea:focus,.creation-search-label input:focus{border-color:var(--lime)}.creation-wide{grid-column:1/-1}.creation-optional{color:#858d8e;font-weight:400}.creation-translation{margin:24px 0;border-top:1px solid var(--line);padding-top:20px}.creation-translation summary{cursor:pointer;font-size:14px}.creation-translation .creation-grid{margin-top:20px}.creation-recipe{border-top:1px solid var(--line);padding-top:25px;margin-top:26px}.creation-recipe-head{display:flex;justify-content:space-between;gap:15px;align-items:start}.creation-recipe h2{font-size:18px;margin:0 0 6px}.creation-recipe-head p{color:var(--muted);font-size:12px;margin:0}.creation-recipe-head strong{font-size:13px;color:var(--lime);white-space:nowrap}.creation-selected{display:flex;gap:8px;flex-wrap:wrap;min-height:55px;margin:18px 0}.creation-chip{border:1px solid #677559;border-radius:20px;background:#273021;padding:7px 10px;font-size:12px}.creation-chip span{margin-left:4px;color:var(--lime)}.creation-search-label input{font-weight:400}.creation-results{max-height:340px;overflow:auto;border:1px solid #343c3e;border-radius:9px;margin-top:10px}.creation-result{display:flex;align-items:center;text-align:left;gap:12px;width:100%;border-bottom:1px solid #293031;padding:9px 13px}.creation-result:last-child{border-bottom:0}.creation-result:hover{background:#273126}.creation-result>span:nth-child(2){min-width:0}.creation-result strong{display:block;font-size:13px}.creation-result small{display:block;color:#939c9e;font-size:11px;margin-top:2px}.creation-emoji{font-size:22px;width:30px;text-align:center}.creation-add{margin-left:auto;color:var(--lime);font-size:11px;white-space:nowrap}.creation-empty{font-size:12px;color:var(--muted);padding:10px}.creation-more{color:var(--lime);font-size:12px;padding:10px}.creation-status{min-height:22px;color:var(--lime);font-size:13px;margin:22px 0 10px}.creation-submit{max-width:260px}.creation-success{border:1px solid #536b43;background:#202c1e;border-radius:10px;padding:18px;margin-top:20px}.creation-success strong{color:var(--lime)}.creation-success p{font-size:13px;margin:7px 0 0;color:#bac9b4}@media(max-width:680px){header nav{justify-content:flex-start;overflow-x:auto;gap:18px;scrollbar-width:none}header nav::-webkit-scrollbar{display:none}.creation-page form{padding:17px}.creation-grid{grid-template-columns:1fr;gap:16px}.creation-wide{grid-column:auto}.creation-submit{max-width:none}}
.card-form-fields{border:0;padding:0;margin:0;min-width:0}.card-form-fields:disabled{opacity:.65}.card-affinities{margin-top:26px}.card-affinities fieldset{border:0;border-top:1px solid var(--line);padding:20px 0 6px;margin:16px 0 0;min-width:0}.card-affinities legend{padding-right:12px;font-size:16px;font-weight:700}.card-affinities legend span{font-size:11px;color:var(--lime);margin-left:5px}.card-affinities fieldset>p{font-size:12px;color:var(--muted);margin:0 0 14px;line-height:1.6}.affinity-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.affinity-option{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #3a4245;border-radius:10px;background:#111618;cursor:pointer}.affinity-option:has(input:checked){border-color:var(--lime);background:#232e20}.affinity-option input{accent-color:var(--lime);width:17px;height:17px;flex-shrink:0;margin:2px 0 0}.affinity-option b{display:block;font-size:13px}.affinity-option small{display:block;font-size:11px;font-weight:400;line-height:1.6;color:#9ca6a4;margin-top:5px}.affinity-option:focus-within{outline:2px solid var(--lime);outline-offset:2px}.card-review-note{padding:16px;border:1px solid #796a3c;background:#2b271b;border-radius:10px;margin:20px 0}.card-review-note strong{font-size:14px;color:#edd69b}.card-review-note p{font-size:12px;line-height:1.7;color:#c6bc9d}.card-review-note label{display:flex;align-items:center;gap:8px;font-size:12px}.card-review-note input,.card-review-filter input{accent-color:var(--lime)}.card-form-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.card-form-actions .primary{width:auto;min-width:180px}.card-edit-heading h2{margin:0 0 10px;font-size:24px}.card-edit-heading p{color:var(--muted);font-size:13px;line-height:1.7}.card-edit-filters{display:grid;grid-template-columns:1fr 160px;gap:14px;margin:24px 0 12px}.card-edit-filters>label{font-size:12px;color:#bec7c4}.card-edit-filters input[type=search],.card-edit-filters select{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid #3a4245;background:#111618;color:var(--text);border-radius:8px}.card-review-filter{grid-column:1/-1;display:flex;align-items:center;gap:7px}.card-edit-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:330px;overflow:auto;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}.card-edit-results .selected{background:#293923;box-shadow:inset 3px 0 var(--lime)}.card-edit-placeholder{padding:35px;text-align:center;border:1px dashed #414a42;border-radius:12px;color:var(--muted);font-size:13px}.card-edit-page .creation-page{max-width:none;border-top:1px solid var(--line);padding-top:28px}.card-edit-page .creation-page h1{font-size:26px;margin:8px 0}.card-recipe-summary{font-size:12px;line-height:1.8;color:#c6d0c6}.card-form-fields [hidden],#affinity-retry[hidden],#card-edit-more[hidden],#creation-existing-recipes[hidden]{display:none!important}.admin-tabs{flex-wrap:wrap}.card-form-actions button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:680px){.affinity-options,.card-edit-results{grid-template-columns:1fr}.card-edit-filters{grid-template-columns:1fr 120px}.card-form-actions{align-items:stretch;flex-direction:column}.card-form-actions button{width:100%}.card-edit-page .creation-page form{padding:17px}}
.card-recipe-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}.card-recipe-row .card-recipe-summary{margin:0;overflow-wrap:anywhere}.card-recipe-row button{flex:none;font-size:12px}.card-recipe-row button[aria-pressed="true"]{border-color:var(--lime);color:var(--lime)}#creation-recipe-cancel{margin-top:12px}@media(max-width:680px){.card-recipe-row{align-items:flex-start;flex-direction:column}}
.card-image-upload{border:1px solid var(--line);border-radius:12px;padding:16px;display:grid;gap:12px}.card-image-upload h2{font-size:16px;margin:0}.card-image-upload p{margin:0}.card-upload-preview{display:block;width:160px;max-width:100%;max-height:224px;object-fit:contain;border-radius:8px;background:#202124}.card-image-upload button{justify-self:start}.card-image-upload input[type=file]{max-width:100%;box-sizing:border-box}

.card-recipe-management{border:1px solid var(--line);border-radius:12px;padding:18px;margin:22px 0}.card-recipe-management summary{cursor:pointer;font-size:18px;font-weight:700}.card-recipe-management summary span{font-size:12px;color:var(--muted);margin-left:10px}.card-recipe-management fieldset{border:0;padding:0;margin:16px 0}.card-recipe-toggle{display:flex;align-items:center;gap:8px}.card-recipe-toggle input{width:auto}.card-recipe-management .card-recipe-row{align-items:center;gap:12px}.card-recipe-management .card-recipe-row>div{min-width:0;overflow-wrap:anywhere}.card-recipe-management .card-form-actions{margin-top:16px}

/* bottom-sheet.css */
:root{--mobile-sheet-bg:#1c1c1c}
/* Shared sheet surface and touch handle; screen-specific content stays in its own CSS. */
@media(max-width:800px){
 .bottom-sheet-surface,.bottom-sheet-surface>header,.bottom-sheet-surface>footer{background:var(--mobile-sheet-bg,#1c1c1c)}
 .bottom-sheet-handle{display:flex;align-items:center;justify-content:center;width:100%;height:24px;padding:0;border:0;background:var(--mobile-sheet-bg,#1c1c1c);touch-action:none;cursor:ns-resize}
 .bottom-sheet-handle>span{display:block;width:36px;height:4px;border-radius:4px;background:#666}
}

@media(max-width:780px){
 .bottom-sheet-dock.bottom-sheet-surface{position:fixed;inset:auto 12px calc(8px + var(--bottom-sheet-viewport-bottom,0px));z-index:90;display:flex;flex-direction:column;max-height:calc(var(--bottom-sheet-viewport-height,100dvh)*.82);border:1px solid #454545;border-radius:16px;box-shadow:0 -6px 24px #0004;background:var(--mobile-sheet-bg,#1c1c1c)}
 .bottom-sheet-dock:not(.is-expanded) [data-bottom-sheet-details],.bottom-sheet-dock [data-bottom-sheet-details][hidden]{display:none}
 .bottom-sheet-dock [data-bottom-sheet-details]{min-height:0;overflow-y:auto;overscroll-behavior:contain}
}

@media(max-width:800px){.bottom-sheet-handle:focus-visible{outline-offset:-3px;border-radius:10px}}

/* combination.css */
.combine-page{max-width:1160px;margin:0 auto}.combine-intro{margin-bottom:32px}.combine-intro h1{margin:8px 0 12px}.combine-rule{max-width:800px;margin:18px 0 0;padding-left:14px;border-left:2px solid var(--lime);color:var(--muted);font-size:13px;line-height:1.7}.combine-layout{display:grid;grid-template-columns:minmax(0,1fr) 325px;gap:24px;align-items:start}.combine-inventory,.combine-workbench,.combine-result,.combine-login{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px}.combine-workbench{position:sticky;top:22px}.combine-heading{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin-bottom:18px}.combine-heading h2{font-size:19px;margin:0}.combine-heading h2 small,.combine-heading>span{font-size:12px;color:var(--muted);font-weight:400}.combine-heading>strong{color:var(--lime);font-size:14px}.combine-tools{display:flex;gap:8px;margin-bottom:14px}.combine-tools input,.combine-tools select{min-width:0;background:#111315;border:1px solid #35393c;border-radius:9px;color:var(--text);padding:10px 12px;font-size:13px}.combine-tools input{flex:1}.combine-tools select{width:130px}.combine-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:none;overflow:visible;padding-right:4px}.combine-option{display:flex;align-items:center;gap:11px;width:100%;min-height:77px;text-align:left;border:1px solid #35383b;border-radius:12px;background:#131518;padding:10px}.combine-option:hover{border-color:var(--rarity);background:#1c2021}.combine-option-main{display:flex;align-items:center;gap:11px;min-width:0;flex:1;text-align:left}.combine-option-main:disabled{opacity:.52;cursor:not-allowed}.combine-option-add{flex:none;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:9px;background:#2b2e32;color:#d8dbde;font-size:22px;font-weight:300;line-height:1}.combine-option-add:hover:not(:disabled){background:#3a3e43}.combine-option-add:disabled{opacity:.35;cursor:not-allowed}.combine-stepper{flex:none;display:grid;grid-template-columns:34px 28px 34px;align-items:center;height:36px;overflow:hidden;border-radius:9px;background:#2b2e32;color:#d8dbde}.combine-stepper button{height:100%;display:grid;place-items:center;color:inherit;font-size:18px;font-weight:400;line-height:1}.combine-stepper button:hover:not(:disabled){background:#3a3e43}.combine-stepper button:disabled{opacity:.28;cursor:not-allowed}.combine-stepper span{text-align:center;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}.combine-option.is-selected{border-color:color-mix(in srgb,var(--rarity) 70%,#35383b)}.combine-art{display:flex;align-items:center;justify-content:center;position:relative;width:50px;height:54px;flex:none;overflow:hidden;border-radius:7px;background:#23282a;font-size:24px}.combine-art .card-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.combine-art .art-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.combine-option-text{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.combine-option-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.combine-option-text small{color:var(--muted);font-size:11px}.combine-selected-list{display:flex;flex-direction:column;gap:8px;min-height:92px}.combine-selected{width:100%;text-align:left;background:transparent;color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid color-mix(in srgb,var(--rarity) 38%,#2c2f32);border-radius:9px;font-size:13px}.combine-selected small{color:var(--rarity)}.combine-selected b{display:grid;place-items:center;width:18px;height:18px;flex:none;border-radius:50%;background:#ffffff14;color:var(--muted);font-size:15px;line-height:1;font-weight:400}.combine-selected:hover{border-color:var(--rarity);background:#1c2021}.combine-placeholder,.combine-no-cards{color:var(--muted);font-size:13px;line-height:1.6}.combine-outcome{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:18px;padding-top:18px;font-size:13px}.combine-outcome span{color:var(--muted)}.combine-outcome strong{color:var(--lime)}.combine-warning{margin:17px 0;color:var(--muted);font-size:12px;line-height:1.5}.combine-submit{width:100%}.combine-submit:disabled{opacity:.45;cursor:not-allowed}.combine-result{margin-top:24px;text-align:center}.combine-result h2{margin:5px 0 22px}.combine-result-card{max-width:268px;margin:0 auto 18px}.combine-result-card .card{margin:auto}.combine-result>p:last-child{color:var(--muted)}.combine-login{text-align:center}.combine-login p{color:var(--muted)}.combine-login .primary{margin-top:10px}@media(max-width:780px){.combine-layout{grid-template-columns:1fr}.combine-workbench{position:static;min-width:0}.combine-list{max-height:none}}@media(max-width:680px){header{height:auto;min-height:76px;flex-wrap:wrap;padding-top:12px;padding-bottom:0}header nav{order:3;width:100%;height:44px;gap:18px;justify-content:flex-start;overflow-x:auto}header nav button{flex:none;white-space:nowrap}}@media(max-width:500px){.combine-inventory,.combine-workbench,.combine-result,.combine-login{padding:16px}.combine-list{grid-template-columns:1fr}.combine-tools select{width:110px}.combine-intro{margin-bottom:22px}}
.combine-more{display:block;width:100%;margin-top:13px;padding:10px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:12px}.combine-more:hover{color:var(--text);border-color:var(--lime)}
.combine-odds{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}.combine-odds h3{font-size:14px;margin:0 0 12px}.combine-odds-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0;font-size:13px}.combine-odds-row span{display:flex;align-items:center;gap:8px}.combine-odds-row .dot{width:8px;height:8px;flex:none;border-radius:50%;background:var(--rarity)}.combine-odds-row strong{color:var(--rarity);font-variant-numeric:tabular-nums}.combine-odds-note{color:var(--muted);font-size:11px;line-height:1.5;margin:9px 0 0}

@media(max-width:780px){
 .combine-page{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
 .combine-layout{gap:16px}
 .combine-inventory{position:static;min-width:0}
 .combine-inventory .combine-list{max-height:none;overflow:visible;padding-right:0;overscroll-behavior:auto}
 .combine-selected-list{flex-direction:row;align-items:center;min-height:52px;overflow-x:auto;gap:8px;padding:4px 2px 10px;overscroll-behavior-x:contain}
 .combine-selected{flex:0 0 auto;width:auto;max-width:min(75vw,260px);min-height:44px}
 .combine-selected>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .combine-selected>b{flex:none}
 .combine-placeholder{margin:0}
}

@media(max-width:1100px){.combine-list{grid-template-columns:1fr}}

/* Inventory items display the complete card while keeping their existing controls. */
.combine-option .combine-card-preview{display:block;width:116px;flex:none;pointer-events:none}
.combine-option .combine-card-preview .card{width:100%;max-width:none}
.combine-option-main{align-self:stretch}
.combine-list,.trade-picker-list{padding-top:8px}
@media(max-width:500px){.combine-option .combine-card-preview{width:108px}.combine-option{flex-wrap:wrap}.combine-option-main{flex-basis:100%}.combine-option-add,.combine-stepper{margin-left:auto}}

/* Align the text and arrow gutters in card picker and creation dropdowns. */
.combine-tools select,.creation-grid select,.recipe-control-fields select,.trade-status-filter{
 appearance:none;
 padding-left:12px;
 padding-right:34px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23b6bbc0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat;
 background-position:right 12px center;
 background-size:10px 6px;
}

.combine-inventory>.combine-odds-note{margin-bottom:8px}

.combine-filter-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.combine-duplicates{display:inline-flex;align-items:center;gap:8px;min-width:0;color:var(--text);font-size:12px;cursor:pointer}
.combine-duplicates input{appearance:none;position:relative;flex:none;width:36px;height:22px;margin:0;border:1px solid #555b60;border-radius:999px;background:#353a3e;cursor:pointer}
.combine-duplicates input::before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#d8dcdf;transition:transform .15s ease}
.combine-duplicates input:checked{border-color:var(--lime);background:var(--lime)}
.combine-duplicates input:checked::before{background:#171b11;transform:translateX(14px)}
.combine-bulk-add{flex:none;min-height:36px;padding:7px 11px;border:1px solid var(--lime);border-radius:8px;color:var(--lime);font-size:12px;font-weight:700}
.combine-bulk-add:hover:not(:disabled){background:#c8ff691a}
.combine-bulk-add:disabled{opacity:.4;cursor:not-allowed}

/* Match the underlined subnavigation used by adventure and trading. */
.combine-tabs{display:flex;gap:28px;align-items:center;margin:0 0 24px;border-bottom:1px solid var(--line)}
.combine-tabs button{flex:none;min-height:48px;padding:14px 2px;border-bottom:2px solid transparent;color:var(--muted);font-size:14px;white-space:nowrap}
.combine-tabs button:hover{color:var(--text)}
.combine-tabs button[aria-current=page]{border-bottom-color:var(--lime);color:var(--lime)}
.combine-tabs button:focus-visible{outline:2px solid var(--lime);outline-offset:2px}

.recipe-book-page{max-width:none;padding-bottom:0}
.recipe-book-header{display:flex;align-items:center;justify-content:space-between;gap:32px;margin-bottom:24px}
.recipe-book-header .eyebrow{font-size:10px;letter-spacing:2.1px;margin:0 0 10px;color:#a3af94}
.recipe-book-header h1{font-size:36px;margin:0 0 10px;letter-spacing:-1.5px}
.recipe-title-dot{color:var(--lime);margin-left:3px}
.recipe-book-header .sub{font-size:14px;color:#8b9399}
.recipe-book-progress{width:180px;flex:none;padding-left:24px;border-left:1px solid var(--line);font-size:11px;color:#8b9399}
.recipe-book-progress>div{display:flex;align-items:baseline;gap:7px;margin:5px 0 11px;font-variant-numeric:tabular-nums}
.recipe-book-progress strong{font:500 32px/1.2 'DM Sans',sans-serif;color:#ecf1e6;letter-spacing:-1px}
.recipe-book-progress>div>span{font-size:14px;color:#71787f}
.recipe-progress-track{display:block;height:3px;background:#2c3032;overflow:hidden;border-radius:3px}
.recipe-progress-track i{display:block;height:100%;min-width:0;background:var(--lime);border-radius:3px}
.recipe-book-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 17px}
.recipe-control-fields{display:flex;align-items:center;gap:8px;min-width:0;width:min(100%,440px)}
.recipe-control-fields select{flex:none;width:146px;min-height:40px;border:1px solid #303638;border-radius:8px;background-color:#16191b;color:var(--text);font:inherit;font-size:12px;cursor:pointer}
.recipe-control-fields select:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
.recipe-search{display:flex;align-items:center;gap:9px;max-width:260px;min-width:180px;flex:1;padding:9px 12px;border:1px solid #303638;border-radius:8px;background:#16191b;color:#737d84}
.recipe-control-fields .recipe-search{min-width:0;max-width:none}
.recipe-search svg{width:17px;height:17px;flex:none}
.recipe-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--text);font-family:inherit;font-size:12px;line-height:20px}
.recipe-search input::placeholder{color:#788187}
.recipe-search:focus-within{border-color:#a4cd73;box-shadow:0 0 0 2px #c8ff6910}
/* Each recipe stays visible as a compact material-to-result equation. */
.recipe-results-heading{font-size:12px;color:#969fa4}
.recipe-results-heading strong{font:500 12px 'DM Sans',sans-serif;color:#dee5d7;margin-left:5px}
.recipe-list{display:flex;flex-direction:column;gap:32px;padding-top:8px}
.recipe-list--virtual{display:block;position:relative;overflow-anchor:none}
.recipe-list--virtual>.recipe-entry{position:absolute;left:0;right:0}
.recipe-material-float{position:fixed;z-index:210;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px));border:1px solid #454545;border-radius:18px;background:#1c1c1c;box-shadow:0 -8px 36px #0007;overflow:auto;overscroll-behavior:auto;outline:none}
.recipe-material-float>.recipe-entry{position:static}
.recipe-material-float--enter{animation:recipe-float-rise .22s cubic-bezier(.22,1,.36,1) both}
@keyframes recipe-float-rise{from{transform:translateY(calc(100% + 16px));opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.recipe-material-float--enter{animation:none}}
.recipe-entry{--recipe-card-width:144px;--recipe-result-width:144px;--recipe-tray-padding:12px;min-width:0;padding:0}
.recipe-entry-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:14px;margin-bottom:15px;color:#647078;font:500 10px/1.2 'DM Sans',sans-serif;letter-spacing:1px}
.recipe-equation{display:grid;grid-template-columns:minmax(0,1fr) 32px calc(var(--recipe-result-width) + var(--recipe-tray-padding) * 2);gap:18px;align-items:center;min-width:0}
.recipe-materials,.recipe-output{padding:var(--recipe-tray-padding);background:#1b1e20;border-radius:calc(var(--recipe-card-width) * .07 + var(--recipe-tray-padding))}
.recipe-materials{display:flex;align-items:center;gap:8px;min-width:0}
.recipe-card-slot{position:relative;display:block;min-width:0;flex:0 1 var(--recipe-card-width);width:var(--recipe-card-width);height:calc(var(--recipe-card-width) * 1.4)}
.recipe-materials>.recipe-card-slot:last-child{flex:none}
.recipe-output .recipe-card-slot{width:var(--recipe-result-width);height:calc(var(--recipe-result-width) * 1.4)}
.recipe-card-slot .card-v3{width:var(--recipe-card-width);max-width:none;transition:translate .16s ease;cursor:pointer}
.recipe-output .card-v3{width:var(--recipe-result-width)}
.recipe-card-slot .card-v3:hover{transform:none}
.recipe-card-slot:focus-within{z-index:5}
.recipe-card-slot:focus-within .card-v3{translate:0 -7px}
.recipe-card-slot .card-v3:focus-visible{outline:2px solid var(--lime);outline-offset:3px}

@media(hover:hover){.recipe-card-slot:hover{z-index:6}.recipe-card-slot:hover .card-v3{translate:0 -7px}}
.recipe-card-slot .card__tilt{box-shadow:0 3px 8px #0008;will-change:auto}
.recipe-card-slot .card__face{padding:8%;border-radius:7cqi}
.recipe-card-slot .card__panel,.recipe-card-slot .card__meta{display:none}
.recipe-card-slot .card__bottom{min-height:31px;justify-content:flex-end}
.recipe-card-slot .card__title{--card-title-size:13px;font-weight:700;line-height:1.25;letter-spacing:-.035em;white-space:normal;overflow:hidden}
.recipe-card-slot .card__title-text{display:-webkit-box;max-width:100%;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;animation:none!important;transform:none!important}
.recipe-card-slot .card__art{font-size:46cqi}
.recipe-card-slot .locked .card__bottom{opacity:.6}
.recipe-rarity-symbol{display:block;flex:none;width:14px;height:14px;color:var(--ac)}
.recipe-rarity-symbol svg{display:block;width:100%;height:100%}
.recipe-card-slot .card-chip--type{height:17px;max-width:calc(100% - 20px);margin-left:auto;padding:0 5px;border-color:#ffffff1a;background:#ffffff0c;color:#b9bec5;font-size:9px;font-weight:500;letter-spacing:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.recipe-direction{display:grid;place-items:center;color:#b8af91}.recipe-direction svg{display:block;width:32px;height:24px}
.recipe-pagination{display:flex;align-items:center;flex-direction:column;gap:12px;margin:32px auto 0}
.recipe-pagination button{display:flex;justify-content:center;align-items:center;gap:35px;min-width:250px;padding:14px 24px;border:1px solid #343c40;border-radius:9px;color:#c9d1d2;font-size:13px}
.recipe-pagination button:hover{border-color:#879970;color:#d8f3b7}
.recipe-pagination button span{color:#9cb885;font-size:18px;line-height:1}
.recipe-pagination>span{font-size:11px;color:#667179;font-variant-numeric:tabular-nums}
.recipe-book-note{display:flex;justify-content:center;align-items:center;gap:9px;margin:30px 0 0;color:#68747a;font-size:11px;line-height:1.7;text-align:center}
.recipe-book-note svg{flex:none;width:18px;height:18px}
.recipe-status{padding:70px 20px;text-align:center;color:var(--muted)}
.recipe-status-symbol{display:block;width:40px;margin:0 auto 22px;color:#849572}
.recipe-status h2{font-size:18px;font-weight:500;margin:0 0 10px;color:#cbd2d2}
.recipe-status p{font-size:13px;line-height:1.8;margin:0}
.recipe-status button{margin-top:24px;padding:10px 18px;border:1px solid #6d8458;border-radius:8px;color:#c8e7a6;font-size:12px}
.recipe-missing-card{display:grid;place-items:center;aspect-ratio:5/7;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:10px}
@media(min-width:1450px){main:has(.recipe-book-page){padding-top:24px}}
@media(max-width:1040px){.recipe-entry{--recipe-card-width:128px;--recipe-result-width:128px}}
@media(max-width:900px){.recipe-book-progress{width:150px}.recipe-search{max-width:260px}}
@media(max-width:680px){
 .combine-tabs{gap:24px;margin-bottom:22px}.combine-tabs button{min-height:44px;padding:12px 2px;font-size:13px}
 .recipe-book-header{align-items:center;gap:16px;margin-bottom:24px}.recipe-book-header .eyebrow{font-size:8px;letter-spacing:1.25px;margin-bottom:8px}.recipe-book-header h1{font-size:30px;margin-bottom:8px}.recipe-book-header .sub{font-size:11px;line-height:1.7;word-break:keep-all}
 .recipe-book-progress{width:94px;padding-left:15px;font-size:9px}.recipe-book-progress strong{font-size:25px}.recipe-book-progress>div{margin:5px 0 8px;gap:4px}.recipe-book-progress>div>span{font-size:11px}
 .recipe-book-controls{align-items:stretch;flex-direction:column;gap:11px;margin-bottom:15px}
 .recipe-control-fields select{width:126px}
 .recipe-search{max-width:none;min-width:0;padding:8px 11px}.recipe-search input{font-size:12px}
 .recipe-results-heading{font-size:11px}
 .recipe-entry{--recipe-card-width:96px;--recipe-result-width:100px;--recipe-tray-padding:6px;padding:0}.recipe-entry-heading{margin-bottom:12px}
 .recipe-equation{grid-template-columns:minmax(0,1fr) 24px calc(var(--recipe-result-width) + var(--recipe-tray-padding) * 2);gap:6px}.recipe-direction svg{width:24px;height:24px}
 .recipe-materials{gap:5px}
 .recipe-card-slot .card-chip--type{height:14px;padding:0 4px;font-size:8px}

 .recipe-card-slot .card__title{--card-title-size:11.5px}.recipe-rarity-symbol{width:12px;height:12px}

 .recipe-pagination{margin-top:30px}.recipe-book-note{font-size:10px;align-items:flex-start;text-align:left;margin-top:28px}
}
@media(max-width:360px){.recipe-entry{--recipe-card-width:84px;--recipe-result-width:88px}.recipe-control-fields select{width:112px}}

.recipe-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}
.recipe-confirm-actions button{min-height:48px;padding:12px 18px;border-radius:9px;font-size:14px;font-weight:600}
.recipe-confirm-actions button:not(.primary){background:#292d32;color:#c6ccd0}

.recipe-sort-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin:0 0 20px}
.recipe-priority-switch{display:inline-flex;align-items:center;gap:7px;min-height:32px;color:var(--text);font-size:11px;cursor:pointer;white-space:nowrap}
.recipe-priority-switch input{appearance:none;position:relative;flex:none;width:30px;height:18px;margin:0;border:1px solid #555b60;border-radius:999px;background:#292c30;cursor:pointer}
.recipe-priority-switch input::before{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#95999f;transition:transform .15s ease}
.recipe-priority-switch input:checked{border-color:var(--lime)}
.recipe-priority-switch input:checked::before{background:var(--lime);transform:translateX(12px)}
.recipe-priority-switch input:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.recipe-priority-switch input::before{transition:none}}
@media(max-width:360px){.recipe-sort-actions{column-gap:12px}}

/* Separate the banner from the combination controls on every screen size. */
/* Keep the reserved banner outside the card-management workbench panel. */
.combine-sidebar{position:sticky;top:22px;min-width:0}
.combine-sidebar>.combine-workbench{position:static}
.combination-ad{margin-top:24px}
.combination-ad-slot{width:250px;height:250px;margin:0 auto}
@media(max-width:780px){
 .combine-sidebar{position:static}
 .combination-ad-slot{width:min(320px,100%);height:100px}
}

.combine-filter-actions{flex-wrap:wrap}
.combine-filter-actions .combine-duplicates{min-height:36px}
.combine-filter-actions .combine-bulk-add{margin-left:auto}
.combine-filter-note{margin:0 0 14px;color:var(--muted);font-size:12px;line-height:1.6}
.combine-filter-status{grid-column:1/-1;margin:0;padding:18px 4px;color:var(--muted);font-size:13px;line-height:1.6}
.combine-filter-status p{margin:0 0 12px}
.combine-duplicates input:focus-visible{outline:2px solid var(--lime);outline-offset:3px}

/* Compact recipe confirmation, scoped to this dialog only. */
dialog:has(.recipe-confirm-view){width:min(360px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:20px;border:1px solid #454545;border-radius:14px;background:#1c1c1c;text-align:left;overflow-y:auto}
dialog:has(.recipe-confirm-view)>.close{top:8px;right:8px;width:28px;height:28px;font-size:20px}
.recipe-confirm-view h2{font-size:16px;line-height:1.5;margin:0;padding-right:24px}
.recipe-confirm-view .recipe-confirm-eyebrow{font-size:10px;color:var(--muted);margin:0 0 5px}
.recipe-confirm-view .recipe-confirm-description{font-size:11px;line-height:1.6;color:var(--muted);margin:8px 0 16px}
.recipe-quantity-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.recipe-quantity-row label{font-size:11px;line-height:1.5}
.recipe-quantity-row label small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.recipe-quantity-control{display:flex;align-items:center;gap:3px;flex:none}
.recipe-quantity-control button{width:28px;height:32px;padding:0;border:1px solid var(--line);border-radius:6px;color:var(--text);font-size:14px}
.recipe-quantity-control #recipe-quick-max{width:34px;margin-left:3px;font-size:10px}
.recipe-quantity-control input{width:40px;height:32px;min-width:0;padding:4px 2px;border:1px solid #505050;border-radius:6px;background:#1c1c1c;color:var(--text);font-size:14px;text-align:center;appearance:textfield;-moz-appearance:textfield}
.recipe-quantity-control input::-webkit-inner-spin-button,.recipe-quantity-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.recipe-confirm-view #recipe-quick-summary{font-size:10px;color:var(--muted);margin:10px 0 0;line-height:1.5}
.recipe-confirm-view #recipe-quick-status{font-size:11px;line-height:1.6;color:#e9ae9c;margin:8px 0 0}
.recipe-confirm-view #recipe-quick-status:empty{display:none}
.recipe-confirm-view .recipe-confirm-actions{gap:7px;margin-top:16px}
.recipe-confirm-view .recipe-confirm-actions button,.recipe-quick-complete>.primary{min-height:38px;padding:9px 8px;border-radius:7px;font-size:12px;line-height:18px;font-weight:500}
.recipe-confirm-view .recipe-confirm-actions button:not(.primary){background:#1c1c1c;border:1px solid #454545;color:var(--text)}
.recipe-confirm-view button:disabled,.recipe-confirm-view input:disabled{opacity:.45;cursor:not-allowed}
.recipe-quick-complete .recipe-quick-result-card{width:100px;margin:14px auto 10px}
.recipe-quick-result-card .card{width:100%;pointer-events:none}

.recipe-quick-complete>p{font-size:12px;line-height:1.6;margin:10px 0 16px;text-align:center}
.recipe-quick-complete .recipe-quick-refresh-note{font-size:10px;color:var(--muted)}
.recipe-quick-resume{margin:0 0 16px;font-size:11px}
.recipe-quick-resume button{padding:7px 10px;border:1px solid #505050;border-radius:6px;color:var(--lime)}

/* The mobile workbench is one non-modal shared bottom sheet. */
.combine-workbench>.bottom-sheet-handle,.combine-sheet-toggle{display:none}
@media(max-width:780px){
 .combine-page:not(.recipe-book-page){padding-bottom:calc(var(--bottom-sheet-reserved-height,140px) + 16px)}
 .combine-workbench.bottom-sheet-dock{position:fixed;padding:0 14px calc(12px + env(safe-area-inset-bottom,0px))}
 .combine-workbench>.bottom-sheet-handle{display:flex;flex:none;margin:0;min-height:24px;border-radius:16px 16px 0 0}
 .combine-sheet-summary{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;margin-bottom:8px;background:var(--mobile-sheet-bg,#1c1c1c)}
 .combine-sheet-summary .combine-heading{gap:8px;margin:0;min-width:0}
 .combine-sheet-summary h2{font-size:13px;white-space:nowrap}
 .combine-sheet-summary strong{font-size:12px;white-space:nowrap}
 .combine-sheet-toggle{display:flex;align-items:center;gap:5px;padding:6px 0;font-size:10px;color:var(--muted);white-space:nowrap;background:var(--mobile-sheet-bg,#1c1c1c)}
 .combine-sheet-toggle svg{width:14px;height:14px;color:var(--lime)}
 .combine-workbench.is-expanded .combine-sheet-toggle svg{rotate:180deg}
 .combine-sheet-details{min-height:0;overflow-y:auto;overscroll-behavior:contain;background:var(--mobile-sheet-bg,#1c1c1c)}
 .combine-sheet-details:not([hidden]){padding-bottom:12px}
 .combine-sheet-details[hidden]{display:none}
 .combine-sheet-details .combine-selected-list{flex-wrap:wrap;overflow:visible;min-height:0;padding:0;gap:6px}
 .combine-sheet-details .combine-selected{min-height:36px;font-size:11px;background:var(--mobile-sheet-bg,#1c1c1c);border-color:#454545}
 .combine-sheet-details .combine-selected:hover{background:var(--mobile-sheet-bg,#1c1c1c)}
 .combine-sheet-details .combine-odds{margin-top:12px;padding-top:12px}
 .combine-sheet-details .combine-odds h3{font-size:12px;margin-bottom:6px}
 .combine-sheet-details .combine-odds-row{padding:4px 0;font-size:12px}
 .combine-submit-bar{position:static;flex:none;padding:0;border:0;box-shadow:none;background:var(--mobile-sheet-bg,#1c1c1c)}
 .combine-submit-bar .combine-submit{min-height:44px;padding:11px 12px;margin:0;font-size:13px}
}
@media(max-width:359px){.combine-workbench{left:8px;right:8px;padding-left:10px;padding-right:10px}.combine-sheet-summary{gap:6px}.combine-sheet-toggle{font-size:9px;gap:3px}}

/* Three full rows retain their card sizes; further cards scroll within the inventory. */
.combine-inventory .combine-list{max-height:var(--management-list-height,780px);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin;align-content:start;grid-auto-rows:max-content;padding-bottom:4px}
.combine-submit-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.combine-submit-bar>button{width:100%;min-width:0;min-height:44px;margin:0;padding:11px 12px;font-size:13px;line-height:20px;border-radius:10px}
.combine-submit-bar>.combine-bulk-toggle,.combine-submit-bar>.combine-bulk-toggle:hover:not(:disabled){background:#1c1c1c;border:1px solid #494949;color:#f2f3ee;font-weight:600}
.combine-submit-bar>.combine-bulk-toggle[aria-pressed=true]{border-color:var(--lime)}

/* combination-effect.css */
dialog.combine-fx{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:radial-gradient(ellipse at 50% 43%,#293128,#101113 70%);color:var(--text)}
.combine-fx::backdrop{background:#101113}
.combine-fx-stage{position:absolute;inset:0;overflow:hidden}
.combine-fx-cards{position:absolute;inset:0}
.combine-fx-card{position:absolute;left:50%;top:50%;width:clamp(90px,20vw,165px);aspect-ratio:5/7;margin-left:calc(clamp(90px,20vw,165px)/-2);margin-top:calc(clamp(90px,20vw,165px)*-.7)}
.combine-fx-card>.card-v3{width:100%;max-width:none;height:100%;pointer-events:none}
.combine-fx-white{position:absolute;inset:0;background:#fff;border-radius:8.209% / 5.863%;opacity:0;box-shadow:0 0 45px #ffffffb0;pointer-events:none}
.combine-fx-circle{position:absolute;left:50%;top:50%;width:min(65vw,52vh);aspect-ratio:1;translate:-50% -50%;border:1px dashed #c8ff6959;border-radius:50%;box-shadow:0 0 70px #c8ff690d}
.combine-fx-flash{position:absolute;inset:0;background:#fff;opacity:0;z-index:3;pointer-events:none}
.combine-fx-spark{position:absolute;left:50%;top:50%;width:4px;height:7px;background:var(--fx-color);box-shadow:0 0 9px #fff;border-radius:50%;opacity:0;pointer-events:none}
.combine-fx-caption{position:absolute;bottom:70px;left:16px;right:16px;text-align:center;font-size:clamp(14px,3vw,21px);font-weight:700;line-height:1.6;overflow-wrap:anywhere}
.combine-fx-skip{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;translate:-50% 0;padding:10px 24px;border:1px solid #ffffff50;border-radius:24px;background:#191b1e;color:var(--text);font-size:13px;white-space:nowrap}
.pack-reveal--combination .combine-fx-skip{position:static;translate:none;min-width:96px}
.pack-reveal--combination .pack-reveal-top{justify-content:center}
.pack-reveal--combination .pack-reveal-bottom{padding-bottom:max(20px,env(safe-area-inset-bottom))}

/* decomposition.css */
.decompose-page .combine-option.is-ineligible{opacity:.58}
.decompose-page .combine-option.is-ineligible:hover{border-color:#35383b;background:#131518}
.decompose-page .combine-selected-list{min-height:50px}
.decompose-outcome{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px;padding:16px 0;border-top:1px solid var(--line);font-size:13px}
.decompose-outcome span{color:var(--muted)}
.decompose-outcome strong{font-size:17px;color:var(--lime);font-variant-numeric:tabular-nums}
.decompose-page .combine-odds{margin-top:0}
.decompose-page .combine-odds>.combine-odds-note{margin:0 0 10px}
.decompose-odds-group{border-top:1px solid var(--line)}
.decompose-odds-group summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 2px;font-weight:700;font-size:13px;list-style:none}
.decompose-odds-group summary::-webkit-details-marker{display:none}
.decompose-odds-group summary::after{content:'⌄';color:var(--muted);margin-left:3px;transition:transform .2s}
.decompose-odds-group[open] summary::after{transform:rotate(180deg)}
.decompose-odds-group summary small{margin-left:auto;color:var(--muted);font-size:11px;font-weight:400;white-space:nowrap}
.decompose-odds-list{max-height:270px;overflow:auto;padding:0 2px 9px}
.decompose-odds-row{display:flex;justify-content:space-between;gap:8px;padding:7px 0;border-top:1px solid #ffffff0d;font-size:11px;line-height:1.35}
.decompose-odds-row span{color:var(--text)}
.decompose-odds-row strong{color:var(--lime);white-space:nowrap;font-variant-numeric:tabular-nums}
.decompose-reward-odds{border:1px solid var(--line);border-radius:12px;margin:10px 0;background:#131518;overflow:hidden}
.decompose-reward-odds summary{display:flex;align-items:center;gap:10px;padding:14px 12px;cursor:pointer;list-style:none}
.decompose-reward-odds summary::-webkit-details-marker{display:none}
.decompose-reward-odds summary::after{content:'⌄';color:var(--muted)}
.decompose-reward-odds[open] summary::after{transform:rotate(180deg)}
.decompose-reward-icon{display:grid;place-items:center;flex:none;width:30px;height:42px;border:1px solid var(--rarity);border-radius:5px;background:color-mix(in srgb,var(--rarity) 9%,#131518);color:var(--rarity);font-size:21px;rotate:-6deg}
.decompose-reward-label,.decompose-reward-chance{display:flex;flex-direction:column;gap:5px}
.decompose-reward-label strong{font-size:13px;color:var(--rarity)}
.decompose-reward-label small,.decompose-reward-chance small{font-size:10px;color:var(--muted)}
.decompose-reward-chance{margin-left:auto;text-align:right;white-space:nowrap}
.decompose-reward-chance strong{font-size:16px;font-variant-numeric:tabular-nums;color:var(--lime)}
.decompose-reward-odds .decompose-odds-list{padding:0 12px 10px}
.decompose-reward-footnote{margin-top:14px!important;font-size:11px!important;line-height:1.6}
.decompose-result-summary{margin:0 0 22px;color:var(--muted)}
.decompose-result-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:15px;max-height:none;overflow:visible;text-align:left}
.decompose-result-item{min-width:0;padding:8px;border:1px solid var(--line);border-radius:12px;background:#17191c}
.decompose-result-item>.card{display:block;width:100%;max-width:none;margin:0}
.decompose-result-item>span:last-child{display:block;padding:8px 2px 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.decompose-result-item small{color:var(--lime)}
.decompose-missing-card{display:grid;place-items:center;aspect-ratio:5/7;color:var(--muted);font-size:11px;text-align:center}
dialog.decompose-fx{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#26312c,#101113 72%);color:var(--text)}
.decompose-fx::backdrop{background:#101113}
.decompose-fx-stage{position:absolute;inset:0;overflow:hidden}
.decompose-fx-orbit{position:absolute;left:50%;top:50%;width:min(72vw,48vh);aspect-ratio:1;translate:-50% -50%;border:1px dashed color-mix(in srgb,var(--fx-color) 50%,transparent);border-radius:50%;box-shadow:0 0 90px color-mix(in srgb,var(--fx-color) 15%,transparent)}
.decompose-fx-source,.decompose-fx-fragments,.decompose-fx-output{position:absolute;left:50%;top:50%;aspect-ratio:5/7}
.decompose-fx-source,.decompose-fx-fragments{width:clamp(154px,27vw,210px);margin-left:calc(clamp(154px,27vw,210px)/-2);margin-top:calc(clamp(154px,27vw,210px)*-.7)}
.decompose-fx-output{width:var(--output-width,100px);margin-left:calc(var(--output-width,100px)/-2);margin-top:calc(var(--output-width,100px)*-.7)}
.decompose-fx-source>.card,.decompose-fx-output>.card,.decompose-fx-fragment>.card{display:block;width:100%;max-width:none;height:100%;pointer-events:none}
.decompose-fx-glass{position:absolute;inset:0;z-index:2;width:100%;height:100%;overflow:visible;opacity:0;pointer-events:none;filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px var(--fx-color))}
.decompose-fx-glass path{fill:none;stroke:#f8ffff;stroke-width:.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;vector-effect:non-scaling-stroke}
.decompose-fx-glass .decompose-fx-hairline{stroke-width:.4;opacity:.8}
.decompose-fx-glass circle{fill:#fff;filter:drop-shadow(0 0 7px #fff)}
.decompose-fx-fragments{pointer-events:none}
.decompose-fx-fragment{position:absolute;inset:0;will-change:transform,opacity;filter:drop-shadow(0 0 2px #fff)}
.decompose-fx-output{opacity:0}
.decompose-fx-output .card__tilt{box-shadow:0 3px 8px #0007;will-change:auto}
.decompose-fx-output .card__face{gap:6cqi}
.decompose-fx-output .back-title{font-size:4cqi;letter-spacing:.8cqi}
.decompose-fx-output .card-meta{display:none}
.decompose-fx-caption{position:absolute;left:16px;right:16px;bottom:76px;text-align:center;font-size:clamp(14px,3vw,20px);font-weight:700;line-height:1.5}
.decompose-fx-skip{position:absolute;left:50%;bottom:max(20px,env(safe-area-inset-bottom));translate:-50% 0;padding:10px 24px;border:1px solid #ffffff50;border-radius:24px;background:#191b1e;color:var(--text);font-size:13px;white-space:nowrap}
@media(max-width:500px){.decompose-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The shared sheet owns mobile scrolling; odds do not create nested scroll areas. */
@media(max-width:780px){
 .decompose-page .decompose-selected-list{min-height:0}
 .decompose-page .decompose-outcome{margin-top:12px;padding:12px 0;font-size:12px}
 .decompose-page .decompose-outcome strong{font-size:15px}
 .decompose-page .decompose-reward-odds,.decompose-page .decompose-reward-odds>summary,.decompose-page .decompose-reward-icon{background:var(--mobile-sheet-bg,#1c1c1c)}
 .decompose-page .decompose-reward-odds{border-color:#454545}
 .decompose-page .decompose-reward-odds>summary{padding:10px;gap:8px}
 .decompose-page .decompose-reward-label strong{font-size:12px}
 .decompose-page .decompose-reward-chance strong{font-size:14px}
 .decompose-page .decompose-odds-list{max-height:none;overflow:visible}
}

/* Bound mobile compositing while preserving the cracked-card presentation. */
.decompose-fx--compact .decompose-fx-glass,.decompose-fx--compact .decompose-fx-glass circle,.decompose-fx--compact .decompose-fx-fragment{filter:none}
.decompose-fx--compact .decompose-fx-fragment .card__tilt{box-shadow:none}
.decompose-fx .card.reveal-card{animation:none}
.decompose-fx--compact .card__tilt{transform:none;transform-style:flat;will-change:auto}
dialog.decompose-fx .decompose-fx-output>.card.reveal-card{width:100%;max-width:none;height:100%}

/* pack-reveal-effect.css */
/* Pack reveal scene. The collectible card's content and layout remain in cards.css. */
html.pack-reveal-open,html.pack-reveal-open body{overflow:hidden}
html.pack-reveal-open #toast{z-index:40}
.pack-reveal{--reveal-color:#b4bac6;--reveal-deep:#3f4450;--reveal-light:#e6e9ef;--reveal-glow:0px;position:fixed;inset:0;z-index:30;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;height:100dvh;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);overflow:hidden;isolation:isolate;background:#0a0911;color:#f2f3ee}
.pack-reveal-bg,.pack-reveal-fg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.pack-reveal-bg{z-index:0;filter:brightness(var(--bg-brightness,1))}.pack-reveal-fg{z-index:4}
.pack-reveal-top{position:relative;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:8px max(20px,env(safe-area-inset-right,0px)) 8px max(20px,env(safe-area-inset-left,0px));color:#b6b7c2;font-size:12px}
.pack-reveal-top>span{display:flex;align-items:baseline;gap:12px}.pack-reveal-top strong{color:#f1f2f6;letter-spacing:.04em;font-size:14px}.pack-reveal-progress{font-variant-numeric:tabular-nums;letter-spacing:.12em}
.pack-reveal-close{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:50%;background:#ffffff0b;color:#d7d9df;font-size:24px;font-weight:300;line-height:1}.pack-reveal-close:hover{background:#ffffff19}
.pack-reveal-stage{position:relative;z-index:2;min-width:0;min-height:0;perspective:1100px;touch-action:manipulation}
.pack-reveal-position{position:absolute;left:50%;top:50%;width:268px;height:375.2px;max-width:84%;transform:translate(-50%,-50%);transform-style:preserve-3d;will-change:transform}
.pack-reveal-motion{position:relative;width:100%;height:100%;transform:translate(var(--reveal-gx,0px),var(--reveal-gy,0px));transform-style:preserve-3d}
.pack-reveal .card.reveal-card{position:relative;z-index:1;display:block;width:100%;max-width:none;height:100%;padding:0;margin:0;aspect-ratio:5/7;animation:none;transform:none;box-shadow:none;touch-action:manipulation}
.pack-reveal .card.reveal-card:hover{transform:none}.pack-reveal .card.reveal-card:focus-visible{outline:2px solid #ffffffb3;outline-offset:10px}
.pack-reveal .card-v3{--idle:.1;--peak:.3;--g-idle:.08;--g-peak:.22}
.pack-reveal .card__tilt{transition:none;box-shadow:0 24px 55px #0009,0 0 var(--reveal-glow) color-mix(in srgb,var(--reveal-color) 35%,transparent)}
.pack-reveal .card__face::before{padding:1.5px;background:conic-gradient(from var(--spin),var(--ac-2),var(--reveal-light) 28deg,var(--ac) 60deg,var(--ac-2) 110deg,var(--ac-2) 180deg,var(--reveal-light) 208deg,var(--ac) 240deg,var(--ac-2) 290deg,var(--ac-2));animation:card-rim-spin 7s linear infinite!important;opacity:1}
.pack-reveal[data-theme="common"] .card__face::before{animation-duration:10s!important}
.pack-reveal[data-theme="epic"] .card__face::before{animation-duration:5s!important}
.pack-reveal[data-theme="legendary"] .card-v3{--idle:.12;--peak:.34;--g-idle:.09;--g-peak:.24}
.pack-reveal[data-theme="legendary"] .card__face::before{padding:clamp(1.5px,.65cqi,2px);background:conic-gradient(from var(--spin),#8c6019,#ffdf83 24deg,#fff8dc 44deg,#c89129 75deg,#7c5214 140deg,#ffe19b 192deg,#fff9df 220deg,#bd8420 265deg,#8c6019);animation-duration:3.6s!important}
.pack-reveal[data-theme="mythic"] .card-v3{--idle:.15;--peak:.4;--g-idle:.1;--g-peak:.26}
.pack-reveal[data-theme="mythic"] .card__face::before{padding:clamp(1.5px,.75cqi,2.3px);background:conic-gradient(from var(--spin),#ff6f9c,#fff 25deg,#ffb86b 70deg,#ff6f9c 120deg,#b86bff 170deg,#ffd1e0 210deg,#ff6f9c 250deg,#ffb86b 300deg,#ff6f9c);animation-duration:3.8s!important}
.pack-reveal[data-theme="transcendent"] .card-v3{--idle:.18;--peak:.46;--g-idle:.12;--g-peak:.3}
.pack-reveal[data-theme="transcendent"] .card__face::before{padding:clamp(1.6px,.8cqi,2.5px);animation-duration:6s!important;background:conic-gradient(from var(--spin),#ff68b9,#ffbd69 40deg,#fff7bc 72deg,#79ffd4 116deg,#77dbff 158deg,#fff 180deg,#9196ff 225deg,#dd85ff 268deg,#ff89be 306deg,#fff 330deg,#ff68b9)}
.pack-reveal[data-theme="mutation"] .card__face::before{padding:clamp(1.6px,.8cqi,2.5px);background:conic-gradient(from var(--spin),#193522 0 18deg,#b5e99f 18deg 40deg,#193522 40deg 100deg,#b398e6 100deg 120deg,#193522 120deg 200deg,#b5e99f 200deg 220deg,#193522 220deg 300deg,#b398e6 300deg 315deg,#193522 315deg);animation-timing-function:steps(28)!important;animation-duration:4s!important}
.pack-reveal[data-theme="mutation"] .card__foil::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,#0005 0 1px,transparent 1px 4px);opacity:.2}
.pack-reveal-ghost-back,.pack-reveal-ghost-front{display:none;position:absolute;inset:0;border-radius:8.209% / 5.863%;pointer-events:none}
.pack-reveal[data-theme="mutation"] .pack-reveal-ghost-back{display:block;z-index:0;background:#9959e857;box-shadow:0 0 24px #9655ef55}
.pack-reveal[data-theme="mutation"] .pack-reveal-ghost-front{display:block;z-index:3;background:linear-gradient(#b77cff70,#a8e69630);mix-blend-mode:screen;opacity:0}
.pack-reveal .back{display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:14px;border:1px solid #8b939c75;border-radius:8.209% / 5.863%;background:radial-gradient(ellipse at 40% 25%,#59616c33,transparent 65%),repeating-linear-gradient(135deg,#a5aab509 0 1px,transparent 1px 13px),#13171e;box-shadow:0 25px 60px #0008!important;color:#c1c6cf;overflow:hidden}
.pack-reveal .back::before{content:"";position:absolute;inset:4%;border:1px solid #aab1bd26;border-radius:6% / 4.3%;pointer-events:none}
.pack-reveal .back-symbol{width:22%;height:auto;aspect-ratio:1;color:#b7bcc6;filter:drop-shadow(0 0 12px #b7bcc62b)}
.pack-reveal .back p{margin:0;font-size:clamp(9px,2.8vw,12px);letter-spacing:4px;color:#c1c6cf}.pack-reveal .back .card-meta{font-size:10px;letter-spacing:.04em;color:#7d8591}
.pack-reveal-info{position:relative;z-index:5;align-self:end;text-align:center;width:min(100%,540px);margin:0 auto;padding:10px 24px 8px;pointer-events:none}
.pack-reveal-info::before{content:"";position:absolute;inset:-25px -20px -20px;z-index:-1;background:radial-gradient(ellipse,#0a0911b8,transparent 72%)}
.pack-reveal-rarity{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 7px;font-size:12px;font-weight:700;color:var(--reveal-color);letter-spacing:.08em}.pack-reveal-rarity i{width:5px;height:5px;border-radius:50%;background:currentColor;box-shadow:0 0 9px currentColor}
.pack-reveal-name{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin:0 0 10px;font-size:clamp(20px,4.8vw,28px);font-weight:700;line-height:1.35;letter-spacing:-.04em;word-break:keep-all;text-shadow:0 2px 20px #0009}
.pack-reveal-help{margin:0;color:#b1b2bf;font-size:12px;line-height:1.6}
.pack-reveal-bottom{position:relative;z-index:5;display:flex;align-items:center;justify-content:center;min-height:56px;padding:12px 24px 20px}
.pack-reveal-tray{display:flex;justify-content:center;gap:7px;margin:0;padding:0;list-style:none}
.pack-reveal-step{display:block;width:20px;height:4px;border-radius:4px;background:#ffffff1a}.pack-reveal-step.is-complete{background:var(--step-color,#b7bcc6);opacity:.6}.pack-reveal-step.is-current{background:var(--reveal-color);box-shadow:0 0 9px color-mix(in srgb,var(--reveal-color) 35%,transparent)}
@media(min-width:900px){.pack-reveal-top{padding-left:36px;padding-right:36px}.pack-reveal-bottom{min-height:72px}.pack-reveal-info{padding-bottom:12px}.pack-reveal-step{width:26px}}
@media(max-height:520px) and (min-width:560px){.pack-reveal{grid-template-columns:minmax(0,1fr) minmax(180px,32%);grid-template-rows:52px minmax(0,1fr) 48px}.pack-reveal-top{grid-column:1/-1;min-height:52px;padding-top:4px;padding-bottom:4px}.pack-reveal-stage{grid-column:1;grid-row:2/4}.pack-reveal-info{grid-column:2;grid-row:2;align-self:center;padding:8px 24px 8px 0}.pack-reveal-bottom{grid-column:2;grid-row:3;min-height:0;padding:8px 24px 14px 0}.pack-reveal-tray{gap:4px}.pack-reveal-step{width:13px}.pack-reveal-name{font-size:22px}}
@media(prefers-reduced-motion:reduce){.pack-reveal .card__face::before,.pack-reveal .card__face::after{animation:none!important}.pack-reveal .card__tilt{transform:none!important}.pack-reveal-motion{transform:none}.pack-reveal-ghost-back,.pack-reveal-ghost-front{display:none!important}}

/* Mutation colors are local to the reveal; other rarities retain their original presentation. */
[data-mutation-stage] .card-v3{--ac:var(--mutation-color);--ac-2:var(--mutation-secondary)}
[data-mutation-stage] .card-v3[data-rarity="mutation"] .card__tilt{box-shadow:0 24px 55px #0009,0 0 var(--reveal-glow,40px) color-mix(in srgb,var(--mutation-color) 42%,transparent)}
[data-mutation-stage] .card-v3[data-rarity="mutation"] .card__face::before{background:conic-gradient(from var(--spin),var(--mutation-color),var(--mutation-light) 32deg,var(--mutation-secondary) 75deg,var(--mutation-deep) 150deg,var(--mutation-color) 210deg,var(--mutation-light) 242deg,var(--mutation-secondary) 285deg,var(--mutation-color))}
[data-mutation-stage] .card-v3[data-rarity="mutation"] .card-chip--rarity::after{background:radial-gradient(ellipse at 20% 75%,color-mix(in srgb,var(--mutation-color) 28%,transparent),transparent 58%),radial-gradient(ellipse at 60% 30%,color-mix(in srgb,var(--mutation-secondary) 32%,transparent),transparent 62%)}
[data-mutation-stage] .pack-reveal-ghost-back{background:color-mix(in srgb,var(--mutation-secondary) 34%,transparent);box-shadow:0 0 24px color-mix(in srgb,var(--mutation-secondary) 34%,transparent)}
[data-mutation-stage] .pack-reveal-ghost-front{background:linear-gradient(color-mix(in srgb,var(--mutation-secondary) 40%,transparent),color-mix(in srgb,var(--mutation-color) 20%,transparent))}
[data-mutation-style="elemental"] .pack-reveal-ghost-back,[data-mutation-style="elemental"] .pack-reveal-ghost-front{display:none!important}
[data-mutation-style="elemental"] .card-v3[data-rarity="mutation"] .card__face::before{animation-timing-function:linear!important;animation-duration:9s!important}
[data-mutation-style="elemental"] .card__foil::after{opacity:0}
.mutation-reveal-light{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;mix-blend-mode:screen}
.hall-feature .mutation-reveal-light{z-index:0}

/* reveal-anticipation.css */
.reveal-charge{position:absolute;inset:0;z-index:4;overflow:hidden;pointer-events:none;isolation:isolate}
.reveal-charge-veil{position:absolute;inset:0;background:#030408}
.reveal-charge-core{position:absolute;left:var(--charge-x);top:var(--charge-y);translate:-50% -50%;width:calc(var(--charge-height)*1.45);height:calc(var(--charge-height)*1.45);background:radial-gradient(circle,transparent 25%,color-mix(in srgb,var(--charge-color) 45%,transparent) 48%,transparent 72%);mix-blend-mode:screen}
.reveal-charge-outline{position:absolute;left:var(--charge-x);top:var(--charge-y);translate:-50% -50%;width:var(--charge-width);height:var(--charge-height);border:1px solid var(--charge-color);border-radius:8.209% / 5.863%;box-shadow:0 0 22px color-mix(in srgb,var(--charge-color) 70%,transparent),0 0 65px color-mix(in srgb,var(--charge-color) 35%,transparent)}
.reveal-charge-wave{position:absolute;left:var(--charge-x);top:var(--charge-y);translate:-50% -50%;display:block;width:120px;height:120px;border:2px solid var(--charge-color);border-radius:50%;box-shadow:0 0 18px color-mix(in srgb,var(--charge-color) 55%,transparent),inset 0 0 10px color-mix(in srgb,var(--charge-color) 35%,transparent)}
.reveal-charge[data-rarity="5"] .reveal-charge-wave{border-color:#fff7;box-shadow:0 -3px 18px #ff77cbb3,3px 0 18px #ffe774aa,0 3px 18px #77ffd5b3,-3px 0 18px #8d8bffbf}
.reveal-charge[data-rarity="6"] .reveal-charge-wave{border-color:#aeffbcaa;box-shadow:0 0 22px #99ff9777,inset 0 0 18px #bd86ff88}
@media(prefers-reduced-motion:reduce){.reveal-charge{display:none}}

/* card-download.css */
.card-save-button{display:block;width:100%;max-width:268px;margin:16px auto 0;padding:13px 18px;border:0;border-radius:12px;background:#e8eaed;color:#202329;font:600 14px/1.4 "Noto Sans KR",sans-serif;cursor:pointer}
.card-save-button:hover{background:#fff}
.card-save-button:disabled{opacity:.6;cursor:wait}
.card-save-button:focus-visible{outline:2px solid var(--accent,#c7ed80);outline-offset:4px}
.card-export-stage{position:fixed;left:-10000px;top:0;width:268px;height:375.2px;pointer-events:none}
.card-export-stage .card-export{display:block!important;width:268px!important;height:375.2px!important;max-width:none!important;margin:0!important;perspective:none!important;transform:none!important;animation:none!important;border-radius:22px!important;overflow:hidden!important}
.card-export-stage .card-export *,.card-export-stage .card-export *::before,.card-export-stage .card-export *::after{animation:none!important;transition:none!important}
.card-export-stage .card__tilt{transform:none!important;box-shadow:none!important}
.card-export-stage .card__title-text{transform:none!important}

.card-export-effect{position:fixed!important;left:-10000px!important;top:0!important;right:auto!important;bottom:auto!important;display:block!important;padding:0!important;pointer-events:none!important}
.card-export-effect .pack-reveal-stage{position:absolute;inset:0;width:100%;height:100%}
.card-export-actions{display:flex;align-items:center;justify-content:center;gap:14px}
.card-detail-reveal .pack-reveal-top .card-export-actions{margin-left:auto;gap:12px}
.card-detail-reveal .pack-reveal-top .card-export-actions button{width:auto;margin:0;flex:none;white-space:nowrap;font-size:12px}
.card-export-actions button:disabled{opacity:.45;cursor:wait}
#modal .card-export-actions .card-save-button{flex:1}
@media(max-width:380px){.card-detail-reveal .pack-reveal-top{gap:8px;padding-left:14px;padding-right:14px}.card-detail-reveal .pack-reveal-top .card-export-actions{gap:8px}.card-detail-reveal .pack-reveal-top strong{font-size:13px}}

/* profile.css */
.profile-page{max-width:1120px;margin:0 auto}.profile-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:34px}.profile-heading h1{margin:10px 0}.profile-heading .sub{margin:0}.profile-heading>.text-link{white-space:nowrap;font-size:13px}.profile-layout{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:64px;align-items:start}.profile-poster{aspect-ratio:54/83;overflow:hidden;border-radius:18px;border:1px solid #32363a;background:#101113;box-shadow:0 22px 70px #0003}.profile-poster>img{display:block;width:100%;height:auto}.profile-poster-placeholder{display:flex;height:100%;min-height:360px;flex-direction:column;align-items:center;justify-content:space-between;padding:8%;text-align:center;background:radial-gradient(ellipse at center,#c8ff6910,transparent 65%)}.profile-poster-placeholder>span{font-size:11px;letter-spacing:2px;color:#929aa0}.profile-poster-placeholder>strong{font-size:24px;overflow-wrap:anywhere}.profile-poster-placeholder>div{width:45%;color:var(--lime);margin:16% 0}.profile-poster-placeholder b{font-size:34px}.profile-poster-placeholder small{font-size:16px;color:var(--muted)}.profile-poster-placeholder p{font-size:11px;color:var(--muted);line-height:1.6}.profile-share-actions{display:flex;gap:10px;margin-top:18px}.profile-share-actions>button{flex:1;border:1px solid #43494e;border-radius:10px;padding:13px 9px;font-size:13px;white-space:nowrap}.profile-share-actions>.primary{border-color:transparent}.profile-export-status{text-align:center;color:var(--muted);font-size:11px;min-height:18px;margin-top:12px}.profile-export-status .text-link{display:inline;font-size:11px}.profile-section{padding:0 0 30px;margin-bottom:30px;border-bottom:1px solid #30353a}.profile-section h2{font-size:18px;font-weight:600;margin:0 0 24px}.profile-section label,.profile-card-label{display:block;font-size:12px;color:#bcc2c7;margin:0 0 10px}.profile-section input{display:block;width:100%;border:1px solid #3b4248;border-radius:9px;padding:13px 14px;background:#15171a;color:#f4f5f4;font:inherit;font-size:15px}.profile-section input:focus{outline:1px solid var(--lime);border-color:var(--lime)}.profile-hint{font-size:11px;color:var(--muted);margin:9px 0 22px;line-height:1.7}.profile-featured-choice{display:flex;align-items:center;gap:15px;width:100%;padding:12px;border:1px solid #3b4248;border-radius:11px;text-align:left;background:#15171a}.profile-featured-choice>span:nth-child(2){flex:1;min-width:0}.profile-featured-choice strong{display:block;font-size:14px;line-height:1.7;overflow-wrap:anywhere}.profile-featured-choice small{display:block;font-size:11px;color:var(--muted);margin-top:3px}.profile-featured-choice>b{margin-right:6px;color:#acb4bb;font-size:22px;font-weight:400}.profile-featured-thumb{position:relative;display:grid;place-items:center;overflow:hidden;flex:none;width:50px;height:70px;border-radius:6px;background:#22272c;font-size:28px;color:var(--lime)}.profile-featured-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.profile-featured-thumb>svg{width:32px}.profile-remove-card{font-size:11px;margin:10px 0 0 auto}.profile-error{font-size:12px;color:#ffc79a;line-height:1.7;min-height:0;margin:14px 0}.profile-error:empty{display:none}#profile-save{width:100%;font-size:13px;padding:13px;margin-top:20px;border-radius:9px}#profile-save-note{margin-bottom:0;min-height:18px}.profile-section-title{display:flex;justify-content:space-between;align-items:center}.profile-section-title h2{margin-bottom:14px}.profile-section-title>span{font-size:14px;color:var(--lime)}.profile-collection-count{font:500 44px/1.3 'DM Sans',sans-serif;letter-spacing:-1px;margin-bottom:18px}.profile-collection-count small{font-size:20px;color:var(--muted);letter-spacing:0}.profile-progress{height:5px;overflow:hidden;border-radius:5px;background:#2c3236}.profile-progress i{display:block;height:100%;background:var(--lime);border-radius:inherit}.profile-rarities{display:grid;grid-template-columns:1fr 1fr;gap:12px 30px}.profile-rarities>span{display:flex;gap:8px;align-items:center;font-size:12px;color:#adb5bc}.profile-rarities i{width:6px;height:6px;border-radius:50%}.profile-rarities b{margin-left:auto;color:#e8e9e7;font-weight:500}.profile-account{font-size:12px;color:var(--muted)}.profile-account>span{overflow-wrap:anywhere}.profile-account>div{display:flex;gap:24px;margin-top:16px}.profile-account .text-link{font-size:12px}#modal:has(.profile-picker){width:min(820px,94vw);max-width:820px}.profile-picker h2{font-size:23px;margin-bottom:10px}.profile-picker>p:not(.eyebrow){font-size:12px;color:var(--muted)}.profile-picker-filters{display:flex;gap:10px;margin:24px 0 12px}.profile-picker-filters input,.profile-picker-filters select{min-width:0;padding:11px;border:1px solid #41484f;border-radius:7px;color:#eef0ee;background:#14171a;font:inherit;font-size:13px}.profile-picker-filters input{flex:1}.profile-picker-count{font-size:11px;color:var(--muted)}.profile-picker-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;max-height:52vh;overflow:auto;padding:4px}.profile-picker-card .count-badge{display:none}.profile-picker-card:focus-visible{outline:2px solid var(--lime);outline-offset:2px}.profile-picker-pagination{display:flex;justify-content:center;align-items:center;gap:25px;margin-top:22px;font-size:12px}.profile-picker-pagination button{padding:8px}.profile-picker-empty{grid-column:1/-1;color:var(--muted);padding:30px 0}.profile-page button:focus-visible{outline:2px solid var(--lime);outline-offset:4px}@media(max-width:850px){.profile-layout{gap:30px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.profile-picker-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:620px){.profile-heading{align-items:flex-start;margin-bottom:25px}.profile-heading>.text-link{font-size:11px;margin-top:14px}.profile-heading .sub{font-size:12px}.profile-layout{display:flex;flex-direction:column;gap:34px}.profile-showcase{width:100%;max-width:400px;margin:auto}.profile-details{width:100%}.profile-poster{border-radius:14px}.profile-section{padding-bottom:24px;margin-bottom:24px}.profile-section input{font-size:16px}.profile-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.profile-picker-filters{gap:7px}.profile-picker-filters input{font-size:16px}.profile-picker-filters select{max-width:105px}.profile-picker h2{font-size:20px}}
.profile-heading>div{flex:1;min-width:0}.profile-heading>.text-link{flex:none;width:auto}

.profile-scenario-stats{display:grid;gap:8px}.profile-scenario-stats p{margin:0;padding:10px 12px;background:#1c2423;border:1px solid #323e39;border-radius:8px;overflow-wrap:anywhere}.profile-scenario-stats small,.profile-scenario-stats strong{display:block}.profile-scenario-stats small{font-size:11px;color:var(--muted);margin-bottom:3px}.profile-scenario-stats strong{font-size:13px;font-weight:600}.profile-scenario details{margin-top:18px;border-top:1px solid #303b38;padding-top:14px}.profile-scenario summary{cursor:pointer;font-size:13px;color:#d7e5d1}.profile-scenario ul{list-style:none;margin:12px 0 0;padding:0}.profile-scenario li{display:flex;justify-content:space-between;gap:14px;padding:8px 0;font-size:12px;border-bottom:1px solid #ffffff12}.profile-scenario li span{overflow-wrap:anywhere}.profile-scenario li strong{white-space:nowrap;color:#d2e5b0}.profile-scenario h3{font-size:14px;margin:22px 0 5px}.profile-scenario-titles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profile-scenario-title{display:block;text-align:left;background:#1d2a29;border:1px solid #526459;border-radius:8px;padding:10px;color:#e9eeea;overflow-wrap:anywhere}.profile-scenario-title.selected{border-color:var(--lime);background:#35422e}.profile-scenario-title strong,.profile-scenario-title small{display:block}.profile-scenario-title strong{font-size:12px}.profile-scenario-title small{font-size:10px;color:#afbdb0;margin-top:4px}.profile-scenario-title:disabled{opacity:.55}.profile-scenario-title.selected:disabled{opacity:1}
@media(max-width:620px){.profile-scenario-titles{grid-template-columns:1fr}}

.profile-title-field{margin-top:24px}.profile-title-picker{position:relative}.profile-title-picker>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;width:100%;padding:13px 14px;border:1px solid #3b4248;border-radius:9px;background:#15171a;color:#f4f5f4}.profile-title-picker>summary::-webkit-details-marker{display:none}.profile-title-picker>summary>span{flex:1;min-width:0}.profile-title-picker>summary strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere;line-height:1.7}.profile-title-picker>summary small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.profile-title-picker>summary>b{font-size:20px;font-weight:400;color:#acb4bb;transition:transform .15s}.profile-title-picker[open]>summary{border-color:var(--lime)}.profile-title-picker[open]>summary>b{transform:rotate(180deg)}.profile-title-picker>summary[aria-disabled="true"]{opacity:.55;cursor:default}.profile-title-picker>summary:focus-visible{outline:2px solid var(--lime);outline-offset:4px}.profile-title-menu{position:absolute;z-index:5;top:calc(100% + 8px);left:0;right:0;max-height:320px;overflow:auto;padding:10px;border:1px solid #414b45;border-radius:11px;background:#151a18;box-shadow:0 18px 45px #0008;overscroll-behavior:contain}.profile-title-menu .profile-scenario-title:not(:disabled):hover{border-color:var(--lime)}

/* bonus-admin.css */
#admin-nav[hidden]{display:none!important}
.pack-actions{display:grid;grid-template-columns:minmax(0,4fr) repeat(2,minmax(68px,1fr));gap:8px;align-items:stretch}.pack-actions>.primary{min-width:0}.pack-actions>.bonus-draw{display:flex;align-items:center;justify-content:center;gap:5px;padding:18px 6px;font-variant-numeric:tabular-nums}.bonus-draw svg{width:19px;height:19px;flex:none}.bonus-draw span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bonus-draw:disabled{opacity:.52;cursor:not-allowed}.opened .seal svg{width:44px;height:44px;display:block}.bonus-result-grid{grid-template-columns:minmax(0,268px);justify-content:center}.result-actions>.text-link{margin-top:18px;text-align:center}
.admin-page,.admin-heading{max-width:980px;margin:0 auto}.admin-heading .eyebrow{margin-top:0}.admin-tabs{display:flex;gap:10px;margin:25px 0 28px;border-bottom:1px solid var(--line);padding-bottom:15px}.admin-tabs button{font-size:14px;border-radius:8px;padding:11px 20px;color:var(--muted)}.admin-tabs button.selected{background:var(--lime);color:#172010;font-weight:700}.admin-search{margin-top:18px}.admin-search label,.admin-tool label{display:block;font-size:13px;color:#b9c1b8;margin-bottom:9px}.admin-search>div{display:flex;gap:8px}.admin-search input,.admin-tool input{min-width:0;width:100%;background:#141719;border:1px solid #414a42;border-radius:8px;padding:12px;color:var(--text)}.admin-secondary{border:1px solid #52604c;border-radius:8px;padding:12px 18px;font-size:14px;white-space:nowrap;background:#232a20}.admin-secondary:hover{background:#303b29}.admin-user-list{display:grid;gap:7px;margin-top:12px;max-height:210px;overflow:auto}.admin-user-list button{display:flex;flex-direction:column;gap:5px;text-align:left;padding:11px;border:1px solid var(--line);border-radius:8px;min-width:0}.admin-user-list button.selected{border-color:var(--lime);background:#242e1d}.admin-user-list strong{font-size:13px;overflow-wrap:anywhere}.admin-user-list span{font-size:11px;color:var(--muted)}.admin-notice{color:var(--lime);font-size:13px;line-height:1.8;min-height:24px;overflow-wrap:anywhere}.admin-selected{overflow-wrap:anywhere;color:var(--lime)}.admin-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-tool{border:1px solid var(--line);border-radius:12px;background:#191d1a;padding:20px;min-width:0}.admin-tool h3{margin:0 0 16px;font-size:16px}.admin-tool>p{font-size:13px;line-height:1.8}.admin-balance strong{font-size:26px;color:var(--lime);margin-right:6px;overflow-wrap:anywhere}.admin-hint{font-size:12px!important;color:var(--muted);line-height:1.8}.admin-tool>.admin-secondary{width:100%;margin-top:12px}.admin-action-row{display:flex;gap:8px;margin-top:14px}.admin-action-row>*{flex:1;min-width:0;width:auto}.admin-action-row .primary{padding:12px 18px}.admin-tool input{font-variant-numeric:tabular-nums}.admin-bulk-submit{margin-top:14px;padding:12px}.admin-heading+.creation-page{max-width:980px}.admin-heading+.creation-page>h1{font-size:26px}#admin-confirm-status{color:var(--lime)}
@media(max-width:680px){.admin-tools{grid-template-columns:1fr}.admin-search>div{gap:8px}.admin-secondary{padding:12px}.admin-tabs{margin:20px 0}.admin-heading+.creation-page>h1{font-size:23px}}

.pack-reveal-bottom{flex-direction:column;gap:12px}.reveal-all{max-width:280px;padding:12px 20px}.reveal-all:disabled,.bonus-batch-buttons button:disabled{opacity:.4;cursor:not-allowed}.bonus-selection{text-align:center}.bonus-selection .reveal-stage{height:420px}
.bonus-batch-actions{display:flex;align-items:center;justify-content:center;gap:18px;max-width:460px;margin:28px auto 0;padding:12px 0}.bonus-batch-buttons{display:flex;gap:8px}.bonus-batch-buttons .primary{width:auto;padding:11px 14px;font-size:13px;white-space:nowrap}.bonus-remaining{display:flex;align-items:center;gap:7px;min-width:0;font-variant-numeric:tabular-nums;color:var(--lime);font-size:15px}.bonus-remaining>svg{display:block;width:24px;height:24px;flex:none}.bonus-remaining>span{max-width:100px;overflow:hidden;text-overflow:ellipsis}.bonus-return{text-align:center;margin-top:16px}.bonus-selection .bonus-batch-actions{margin-top:0}
@media(max-width:680px){.bonus-selection .reveal-stage{height:390px}.bonus-batch-actions{gap:12px}.bonus-batch-buttons{gap:6px}.bonus-batch-buttons .primary{padding:10px 12px}}@media(max-width:380px){.bonus-batch-actions{gap:10px}.bonus-batch-buttons .primary{padding:10px 9px}.bonus-remaining{font-size:13px;gap:4px}.bonus-remaining>svg{width:20px;height:20px}}

/* Six batch sizes stay within the screen on phones and result pages. */
.bonus-batch-actions{max-width:620px;align-items:center}
.bonus-batch-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:1;min-width:0}
.bonus-batch-buttons .primary{font-size:14px;padding:11px 12px}
.pack-reveal-tray{flex-wrap:wrap;max-width:min(90vw,720px);max-height:44px;overflow:auto;flex-shrink:0}
@media(max-width:380px){.bonus-batch-actions{gap:10px}.bonus-batch-buttons .primary{padding:10px 6px}.bonus-remaining>span{max-width:58px}}

.skill-draw-links{display:flex;justify-content:center;gap:24px}.skill-draw-links .bonus-return{width:auto;margin:0;font-size:12px}.skill-draw-odds{margin-top:16px;padding:16px}.skill-draw-odds-note{font-size:12px;color:var(--muted);line-height:1.8}

/* The official bazaar author is fixed by the admin-only posting RPC. */
.market-chat-operator-name,.market-chat-message strong.market-chat-operator-name{font-weight:800;color:var(--text)}
.admin-market-chat{grid-column:1/-1}
.admin-market-chat label{display:flex;justify-content:space-between;gap:12px}
.admin-market-chat label span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.admin-market-chat textarea{display:block;width:100%;min-height:120px;resize:vertical;background:#141719;border:1px solid #414a42;border-radius:8px;padding:12px;color:var(--text);font:inherit;font-size:14px;line-height:1.7}
.admin-market-chat textarea:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.admin-market-chat-status{font-size:12px;line-height:1.8;color:var(--lime);overflow-wrap:anywhere}
.admin-market-chat .primary{display:block;width:auto;margin:14px 0 0 auto;padding:12px 18px;font-size:13px}
@media(max-width:680px){.admin-market-chat textarea{font-size:16px}}

.admin-market-delete{margin-top:28px;padding-top:20px;border-top:1px solid #5554}.admin-market-delete-list{max-height:480px;overflow:auto;margin:12px 0}.admin-market-delete-row{display:flex!important;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid #5553}.admin-market-delete-row input{width:18px!important;flex:0 0 18px;margin-top:3px}.admin-market-delete-row>span{min-width:0}.admin-market-delete-row small{display:block;opacity:.7;margin:4px 0}.admin-market-delete-message{display:block;white-space:pre-wrap;overflow-wrap:anywhere}

/* quests.css */
.quest-page{max-width:980px;margin:auto}.quest-heading{display:flex;justify-content:space-between;align-items:center;gap:24px}.quest-wallet{padding:20px 24px;background:linear-gradient(145deg,#293022,#181c17);border:1px solid #485936;border-radius:16px;display:flex;flex-direction:column;gap:7px;min-width:200px}.quest-wallet span{font-size:12px;color:var(--muted)}.quest-wallet strong{font-size:32px;color:var(--lime);font-variant-numeric:tabular-nums}.quest-wallet small{font-size:16px}.quest-tabs{display:flex;gap:10px;margin:32px 0 22px}.quest-tabs button{border:1px solid var(--line);border-radius:30px;padding:12px 20px;background:var(--panel);font-size:14px;display:flex;gap:16px;align-items:center}.quest-tabs button span{font-size:12px;opacity:.65}.quest-tabs button.selected{background:var(--lime);color:#171b11;border-color:var(--lime)}.quest-summary{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px;font-size:14px}.quest-summary p{color:var(--muted);font-size:12px;margin:8px 0}.quest-summary>span{color:var(--lime);white-space:nowrap}.quest-list{display:grid;gap:12px}.quest-card{display:flex;gap:18px;padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:16px}.quest-check{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#ffffff08;color:var(--muted);flex:none}.quest-card-body{flex:1;min-width:0}.quest-card-title{display:flex;justify-content:space-between;gap:12px;align-items:center}.quest-card h2{font-size:17px;margin:0}.quest-card p{color:var(--muted);font-size:13px;margin:9px 0 16px}.quest-reward{color:var(--lime);font-size:16px;font-weight:700;white-space:nowrap}.quest-progress{display:flex;align-items:center;gap:16px}.quest-progress progress{display:block;appearance:none;border:0;border-radius:8px;height:6px;flex:1;width:100%;background:#343831;overflow:hidden}.quest-progress progress::-webkit-progress-bar{background:#343831}.quest-progress progress::-webkit-progress-value{background:var(--lime);border-radius:8px}.quest-progress progress::-moz-progress-bar{background:var(--lime);border-radius:8px}.quest-progress span{font-size:12px;color:var(--muted);white-space:nowrap;min-width:56px;text-align:right}.quest-card-status{margin-top:12px;font-size:11px;color:var(--muted)}.quest-card.complete{border-color:#465a32;background:linear-gradient(125deg,#222b1d,var(--panel))}.quest-card.complete .quest-check{color:#182012;background:var(--lime);animation:quest-complete .4s ease-out}.quest-card.complete .quest-card-status{color:var(--lime)}.quest-guide{padding:18px 0 12px;color:var(--muted);font-size:12px;line-height:1.8}.quest-guide p{margin:4px 0}.quest-return{max-width:280px;display:block;margin:16px auto 0}.quest-empty{padding:32px;text-align:center;color:var(--muted)}.quest-empty .text-link{text-align:center}.quest-login{text-align:center;padding:50px 0}.quest-login .primary{max-width:260px;margin-top:28px}@keyframes quest-complete{from{transform:scale(.75);opacity:.5}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.quest-card.complete .quest-check{animation:none}}@media(max-width:680px){.quest-heading{display:block}.quest-wallet{margin-top:22px;min-width:0}.quest-tabs{gap:8px}.quest-tabs button{flex:1;justify-content:center;gap:8px;padding:12px 8px}.quest-card{padding:18px 14px;gap:12px}.quest-card h2{font-size:15px}.quest-check{width:30px;height:30px}.quest-summary{align-items:flex-start}.quest-summary>span{font-size:12px}}

.achievement-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-top:28px}.achievement-tabs button{padding:14px 4px;background:none;border:0;border-bottom:2px solid transparent;color:var(--muted);font-size:16px}.achievement-tabs button[aria-pressed="true"]{color:var(--lime);border-bottom-color:var(--lime)}.achievement-placeholder{padding:70px 20px;text-align:center;color:var(--muted)}.achievement-placeholder h2{color:var(--text);font-size:22px}.quest-login .achievement-tabs{justify-content:center}
.achievement-summary{margin-top:28px}.achievement-groups{display:grid;gap:30px}.achievement-group-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.achievement-group-heading h2{font-size:19px;margin:0}.achievement-group-heading span{font-size:12px;color:var(--muted)}.achievement-group .quest-card h3{font-size:17px;margin:0}.achievement-group details{margin-top:12px;border:1px solid var(--line);border-radius:14px;padding:0 16px}.achievement-group summary{padding:16px 0;font-size:13px;color:var(--muted);cursor:pointer}.achievement-group details .quest-list{padding-bottom:16px}.achievement-group details .quest-card{padding:16px}.achievement-group summary:focus-visible{outline:2px solid var(--lime);outline-offset:4px}@media(max-width:680px){.achievement-group .quest-card h3{font-size:15px}.achievement-group details{padding:0 10px}.achievement-summary{flex-wrap:wrap}.achievement-group-heading h2{font-size:17px}}

.achievement-group summary{display:flex;align-items:center;justify-content:space-between;gap:16px;list-style:none;transition:color .18s ease}.achievement-group summary::-webkit-details-marker{display:none}.achievement-group summary::marker{content:""}.achievement-group summary::after{content:"";width:8px;height:8px;margin-right:5px;flex:none;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .2s ease}.achievement-group summary:hover,.achievement-group details[open]>summary{color:var(--text)}.achievement-group details[open]>summary::after{transform:translateY(2px) rotate(225deg)}@media(prefers-reduced-motion:reduce){.achievement-group summary,.achievement-group summary::after{transition:none}}

.scenario-achievement-summary{margin:-4px 0 22px;color:var(--muted);font-size:13px;line-height:1.7}.scenario-achievement-tracks{display:grid;gap:26px}.achievement-track-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.achievement-track-heading h3{margin:0;font-size:16px}.achievement-track-heading span{font-size:12px;color:var(--muted);white-space:nowrap}.achievement-track-description{margin:7px 0 13px;color:var(--muted);font-size:12px;line-height:1.7}.scenario-achievement-track+.scenario-achievement-track{padding-top:24px;border-top:1px solid var(--line)}

/* adventure.css */
.adventure-page{max-width:1060px;margin:auto}.adventure-tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin:30px 0 24px}.adventure-tabs button{font-size:14px;padding:14px 2px;color:var(--muted);border-bottom:2px solid transparent}.adventure-tabs button[aria-current]{color:var(--lime);border-color:var(--lime)}.adventure-tabs button:disabled{cursor:default;opacity:.5}.adventure-tabs small{font-size:10px;margin-left:5px}.mini-daily{display:flex;justify-content:space-between;gap:16px;color:var(--muted);font-size:13px;margin:20px 0}.mini-daily strong{color:var(--lime);margin-left:8px}.mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.mini-game-tile{display:flex;flex-direction:column;align-items:flex-start;padding:26px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,#20251e,#171a1e)}.mini-tile-icon{display:grid;place-items:center;width:58px;height:58px;border:1px solid #c8ff692a;border-radius:16px;font-size:30px;color:var(--lime);background:#c8ff6907;margin-bottom:24px}.mini-tag{font-size:11px;color:var(--lime);letter-spacing:.07em}.mini-game-tile h2{font-size:20px;margin:12px 0}.mini-game-tile p{font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 24px;flex:1}.mini-secondary{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:14px 18px;border:1px solid #424b39;border-radius:12px;background:#ffffff04;font-size:14px}.mini-secondary:hover{background:#c8ff6910}.mini-play{max-width:660px;margin:24px auto;border:1px solid var(--line);border-radius:24px;padding:28px;background:radial-gradient(ellipse at top,#29302377,transparent 65%),var(--panel);text-align:center}.mini-play-heading{display:flex;justify-content:space-between;gap:20px;font-size:14px}.mini-play-heading span:last-child{color:var(--lime)}.mini-stage-track{display:flex;gap:7px;margin:18px 0 28px}.mini-stage-track i{height:4px;flex:1;border-radius:3px;background:#333830}.mini-stage-track .lit{background:var(--lime)}.mini-play>.primary,.mini-result-actions{max-width:380px;margin:20px auto}.mini-play>.primary{display:block;width:100%}.mini-play p{font-size:13px;color:var(--muted);line-height:1.8}.mini-stage-symbol{font-size:64px;min-height:100px;display:grid;place-items:center;color:var(--lime);overflow-wrap:anywhere;letter-spacing:5px}.mini-target{font-size:64px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--lime);margin:24px}.mini-target small{font-size:15px;color:var(--muted);display:block;font-weight:400;margin-top:10px}.mini-timer-orbit{width:180px;height:180px;border:2px solid #c8ff6940;border-radius:50%;display:grid;place-items:center;margin:24px auto;box-shadow:0 0 60px #c8ff690b inset;font-size:24px}.mini-duel{display:flex;justify-content:space-around;align-items:center;padding:24px 0}.mini-duel>div{display:flex;flex-direction:column;gap:18px}.mini-duel span{font-size:13px;color:var(--muted)}.mini-duel strong{font-size:60px}.mini-duel>b{color:#5b6652;font-size:20px}.mini-role{color:var(--lime)!important}.mini-choices{display:flex;justify-content:center;gap:12px;margin:24px 0}.mini-choice{padding:22px 12px;min-width:90px;flex:1;border:1px solid #46513a;border-radius:16px;background:#101510;color:var(--text);font-size:21px}.mini-choice:hover:not(:disabled){border-color:var(--lime);background:#293021}.mini-directions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}.mini-score{display:flex;justify-content:center;gap:30px;font-size:13px;margin:24px 0;color:var(--muted)}.mini-score b{font-size:23px;display:block;color:var(--text);margin-top:10px}.mini-feedback{min-height:24px}.mini-victory{font-size:76px;color:var(--lime);margin:20px}.mini-victory.muted{color:var(--muted)}.mini-play h2{font-size:26px}.mini-prize{font-size:19px!important;color:var(--lime)!important}.mini-result-actions{display:grid;gap:12px}.mini-risk{border-top:1px solid var(--line);padding-top:20px}.mini-help,.mini-rewards{border-top:1px solid var(--line);text-align:left;margin-top:28px;padding-top:20px}.mini-help summary,.mini-rewards summary{font-size:13px;color:var(--muted);cursor:pointer}.mini-rewards{padding:20px;border:1px solid var(--line);border-radius:16px;margin-top:30px}.mini-rewards>div{margin:20px 0}.mini-rewards>div p{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:12px 0}.mini-rewards p{font-size:12px;line-height:1.8;color:var(--muted)}.mini-rewards b{color:var(--lime);white-space:nowrap}.mini-reward-cards{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin:30px 0}.mini-reward-cards article{display:flex;flex-direction:column;gap:10px;width:140px;min-height:170px;border:1px solid var(--reward-color,var(--line));border-radius:14px;padding:16px;background:#11151a}.mini-reward-cards article>span{font-size:40px}.mini-reward-cards small{color:var(--reward-color);font-size:10px}.mini-reward-cards strong{font-size:14px}.mini-empty{padding:50px;color:var(--muted);text-align:center;grid-column:1/-1}.mini-error,.mini-limit{padding:18px;border:1px solid #77633f;border-radius:12px;font-size:13px;line-height:1.8;margin:20px 0}.mini-error button{margin-top:12px}.mini-board{position:relative;width:100%;max-width:440px;aspect-ratio:1;margin:24px auto;overflow:hidden;border:8px solid #645a43;border-radius:12px;background-color:#b99b68;background-image:linear-gradient(#51442d25 1px,transparent 1px),linear-gradient(90deg,#51442d25 1px,transparent 1px);background-size:10% 10%;touch-action:manipulation;box-shadow:inset 0 0 24px #33281355}.mini-stone{position:absolute;transform:translate(-50%,-50%);width:10%;height:10%;border-radius:50%;background:radial-gradient(circle at 35% 25%,#eeffbc,#9dc34d 70%);box-shadow:1px 3px 4px #0007;z-index:2;border:2px solid #53682c;transition:left .5s ease-out,top .5s ease-out}.mini-stone.cpu{background:radial-gradient(circle at 35% 25%,#fff,#c8c9cb 70%);border-color:#a5a7a9;opacity:1;cursor:default}.mini-stone.chosen{outline:3px solid #2d473b;outline-offset:3px}.mini-aim{position:absolute;transform-origin:left center;border-top:2px dashed #163a2a;pointer-events:none;z-index:1}.mini-aim:after{content:'';position:absolute;right:0;top:-5px;width:7px;height:7px;border-right:2px solid #163a2a;border-top:2px solid #163a2a;transform:rotate(45deg)}.mini-sliders{display:grid;grid-template-columns:1fr 1fr;gap:22px;text-align:left}.mini-sliders label,.mini-lock-slider{font-size:13px;color:var(--muted)}.mini-sliders output,.mini-lock-slider output{float:right;color:var(--lime)}.mini-sliders input,.mini-lock-slider input{width:100%;display:block;margin:18px 0;accent-color:var(--lime)}.mini-pond{height:240px;border:1px solid #315b59;border-radius:20px;background:linear-gradient(#1c303a,#123b42);position:relative;overflow:hidden;margin:25px 0}.mini-water{position:absolute;inset:45% 0 0;background:repeating-radial-gradient(ellipse at 50% 0,transparent 0 16px,#4caaaa18 17px 19px,transparent 20px 40px)}.mini-float{position:absolute;top:30%;left:calc(50% - 15px);font-size:45px;color:#ff7770;animation:mini-bob 2s ease-in-out infinite}.mini-float.biting{animation:mini-bite .2s ease-in-out infinite;color:var(--lime)}.mini-pond strong{position:absolute;bottom:22px;left:0;width:100%;font-size:16px}.mini-meter{height:22px;background:#343943;border-radius:12px;position:relative;margin:24px 10px;overflow:hidden}.mini-safe{position:absolute;top:0;bottom:0;background:#80a840}.mini-meter i{position:absolute;width:5px;height:100%;background:#fff;top:0;transform:translateX(-50%)}.mini-lock{position:relative;width:210px;height:220px;margin:30px auto}.mini-lock-shackle{position:absolute;width:110px;height:100px;left:50px;top:0;border:18px solid #777d7c;border-bottom:0;border-radius:60px 60px 0 0}.mini-lock-body{position:absolute;top:72px;width:210px;height:145px;border-radius:18px;background:linear-gradient(135deg,#b19b67,#746244);box-shadow:inset 0 0 0 3px #e6cd8c33,0 10px 20px #0004;display:grid;place-items:center}.mini-lock-cylinder{width:76px;height:76px;border:7px solid #b8a77b;border-radius:50%;background:#242723;display:grid;place-items:center;color:#090a09;font-size:45px;transition:transform .3s ease}.mini-lock-pick{position:absolute;bottom:65px;left:101px;height:118px;width:7px;background:linear-gradient(90deg,#747d80,#c3ccce,#7e8587);border-radius:3px;transform-origin:center bottom;pointer-events:none}.mini-lock-slider{display:block;text-align:left;max-width:400px;margin:auto}.mini-admin form>label{display:flex;align-items:center;gap:16px;border:1px solid var(--line);border-radius:12px;padding:18px;margin:10px 0;cursor:pointer}.mini-admin input[type=checkbox]{width:20px;height:20px;accent-color:var(--lime)}.mini-admin label span{display:flex;flex-direction:column;gap:6px}.mini-admin small{color:var(--muted)}.mini-admin .primary{margin-top:20px}.mini-admin>p{font-size:13px;line-height:1.8;color:var(--muted)}@keyframes mini-bob{50%{transform:translateY(10px)}}@keyframes mini-bite{50%{transform:translateY(20px)}}@media(max-width:850px){.mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.mini-grid{grid-template-columns:1fr}.mini-game-tile{padding:22px}.mini-daily{flex-direction:column;gap:8px}.mini-play{padding:18px 14px;border-radius:18px}.mini-choice{min-width:0;font-size:18px;padding:20px 10px}.mini-target{font-size:54px}.mini-score{gap:20px}.mini-sliders{gap:16px}.mini-rewards>div p{font-size:11px}.mini-board{border-width:5px}}@media(prefers-reduced-motion:reduce){.mini-float,.mini-float.biting{animation:none}.mini-lock-cylinder,.mini-stone{transition:none}}

header nav{gap:clamp(12px,2vw,28px);min-width:0}header nav button{white-space:nowrap}.admin-tabs{flex-wrap:wrap}@media(min-width:681px) and (max-width:1250px){header{flex-wrap:wrap;height:auto;min-height:96px;padding-top:14px;padding-bottom:14px}header nav{order:3;width:100%;height:42px;overflow-x:auto;justify-content:flex-start;flex-shrink:0}}

/* Clear actions, move feedback, and direct game controls. */
.mini-play .mini-secondary{justify-content:center;min-height:48px;font-weight:600}.mini-play>.mini-secondary{max-width:380px;margin:16px auto}.mini-danger{border-color:#80534f;background:#d9807310;color:#edb8ae}.mini-danger:hover:not(:disabled){background:#d9807322;border-color:#d98073}.mini-abandon{margin-top:30px!important}.mini-play button:disabled{cursor:default;opacity:.5}.mini-play button:focus-visible{outline:3px solid var(--lime);outline-offset:4px}.mini-feedback-reveal{padding:18px;border:1px solid #718759;border-radius:14px;background:#c8ff6910;font-size:17px!important;font-weight:600;color:var(--text)!important;animation:mini-feedback-in .25s ease-out}.mini-feedback-reveal.success{color:var(--lime)!important}.mini-outcome{margin:18px 0 8px;font-size:24px;font-weight:800;letter-spacing:.08em}.mini-outcome.won{color:var(--lime)}.mini-outcome.lost{color:#edb8ae}.mini-timer-orbit{font-size:32px;font-variant-numeric:tabular-nums;white-space:nowrap}.mini-revealed-number{color:var(--lime)!important;font-size:18px!important}
.mini-directions{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,64px);max-width:350px;gap:8px;margin:24px auto}.mini-directions .mini-choice{font-size:16px;padding:10px 4px;min-width:0}.mini-directions [data-mini-choice="0"]{grid-area:1/2}.mini-directions [data-mini-choice="1"]{grid-area:2/3}.mini-directions [data-mini-choice="2"]{grid-area:3/2}.mini-directions [data-mini-choice="3"]{grid-area:2/1}.mini-direction-center{grid-area:2/2;display:grid;place-items:center;font-size:25px;color:#647454}.mini-cham-arena{display:flex;justify-content:center;align-items:center;gap:28px;border:1px solid #43533a;background:radial-gradient(ellipse at bottom,#50683735,transparent);border-radius:20px;padding:22px 12px}.mini-cham-person{display:flex;align-items:center;flex-direction:column;gap:12px;min-width:80px}.mini-cham-person>span{font-size:12px;color:var(--muted)}.mini-cham-person>strong{font-size:27px;height:34px;color:var(--lime)}.mini-cham-face{width:70px;height:74px;border-radius:30px;background:#cfdfaa;position:relative;box-shadow:0 5px 0 #778857}.cpu .mini-cham-face{background:#d2c7b4;box-shadow:0 5px 0 #8b806c}.mini-cham-face i{position:absolute;left:22px;top:25px;width:6px;height:9px;border-radius:50%;background:#253020;transform:translate(var(--look-x),var(--look-y));transition:transform .2s}.mini-cham-face i+i{left:43px}.mini-cham-face b{position:absolute;left:29px;top:46px;width:13px;height:5px;border-bottom:2px solid #536443;border-radius:50%;transform:translate(var(--look-x),var(--look-y))}.mini-cham-vs{font-size:12px;color:#a2b38c;letter-spacing:.1em;white-space:nowrap}
.mini-board{touch-action:none;user-select:none}.mini-stone{transition:none;touch-action:none}.mini-stone.mine{cursor:grab}.mini-board.aiming .mini-stone.chosen{cursor:grabbing;box-shadow:0 0 0 8px #c8ff693a,1px 3px 4px #0007}.mini-board .mini-stone:disabled{opacity:1}.mini-board.replaying .mini-aim{display:none}.mini-board.replaying .mini-stone.chosen{outline:none}.mini-board-caption{min-height:24px;color:var(--lime)!important}.mini-aim{border-top-width:3px}.mini-board.aiming .mini-aim{border-top-style:solid;filter:drop-shadow(0 1px 2px #fff8)}
.mini-pond{height:270px}.mini-pond.reeling{touch-action:none;user-select:none}.mini-rod{position:absolute;width:140px;height:5px;background:#c3a475;top:36px;right:-30px;transform:rotate(-30deg);border-radius:4px;box-shadow:0 2px 2px #0005}.mini-fishing-line{position:absolute;top:65px;left:50%;width:1px;height:72px;background:#ffffff75;transform-origin:top;transform:rotate(-22deg)}.mini-pond:not(.reeling) .mini-fishing-line{height:40px}.mini-pond.reeling .mini-float{display:none}.mini-pond strong{font-size:14px;bottom:18px;padding:0 12px;box-sizing:border-box;line-height:1.6}.mini-fish-direction{position:absolute;top:15px;left:14px;font-size:12px;color:#b7e4df;padding:8px 10px;border:1px solid #ffffff20;border-radius:20px;background:#102d37aa}.mini-swimming-fish{position:absolute;width:76px;height:42px;left:45%;top:39%;transform:scaleX(var(--fish-facing,1));transform-origin:center;filter:drop-shadow(0 7px 5px #0003)}.mini-swimming-fish>i{position:absolute;inset:0;border-radius:50%;background:linear-gradient(#ebd98b,#d89844);border:1px solid #f6e3a3}.mini-swimming-fish>b{position:absolute;left:-20px;top:6px;width:27px;height:30px;background:#dbad5f;clip-path:polygon(0 0,100% 50%,0 100%)}.mini-swimming-fish>span{position:absolute;right:13px;top:11px;width:7px;height:7px;border-radius:50%;background:#142831;box-shadow:0 0 0 3px #fff9}.mini-swimming-fish:after{content:'';position:absolute;left:30px;bottom:-7px;width:18px;height:19px;background:#c58439;clip-path:polygon(0 0,100% 0,30% 100%)}.mini-catch-progress{height:6px;border-radius:6px;background:#304142;overflow:hidden;margin:16px 0}.mini-catch-progress span{height:100%;display:block;background:#7ce1c3;transition:width .4s}.mini-pond.pulled .mini-swimming-fish{animation:mini-fish-pull .6s ease-out}.mini-pond.strained{animation:mini-strain .4s ease-in-out}.mini-pond.caught .mini-swimming-fish{animation:mini-fish-caught 1.3s ease-in-out forwards}.mini-pond.escaped .mini-swimming-fish{animation:mini-fish-escape 1s ease-in forwards}.mini-pond.caught .mini-fishing-line{height:35px;transition:height .8s}.mini-pond.escaped .mini-fishing-line{opacity:.2}.mini-choices [data-mini-pull]{font-size:15px;padding:18px 8px}
.mini-lock-pick{transition:transform .4s ease-in-out}.mini-lock-shackle{transition:transform .65s cubic-bezier(.2,.7,.2,1);transform-origin:90% 80%}.mini-lock.opened .mini-lock-shackle{transform:translateY(-28px) rotate(-18deg);border-color:#b9caae}.mini-lock.opened .mini-lock-body{box-shadow:inset 0 0 0 3px #e6cd8c66,0 0 45px #c8ff6926}.mini-lock.jammed .mini-lock-cylinder{box-shadow:0 0 0 3px #efb18033}
@keyframes mini-feedback-in{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes mini-fish-pull{50%{margin-top:-25px;margin-left:10px}}@keyframes mini-strain{25%,75%{box-shadow:inset 0 0 35px #ee9c6955}50%{box-shadow:inset 0 0 10px #ee9c6900}}@keyframes mini-fish-caught{35%{top:10%}70%{top:5%;left:55%}100%{top:14%;left:55%;filter:drop-shadow(0 0 18px #c8ff69aa)}}@keyframes mini-fish-escape{to{top:65%;opacity:0;margin-left:80px}}
@media(max-width:520px){.mini-cham-arena{gap:14px}.mini-cham-vs{font-size:10px}.mini-directions{grid-template-rows:repeat(3,58px)}.mini-feedback-reveal{font-size:15px!important}.mini-pond{height:240px}.mini-pond strong{font-size:12px}.mini-choices [data-mini-pull]{font-size:13px}}
@media(prefers-reduced-motion:reduce){.mini-feedback-reveal,.mini-pond.pulled .mini-swimming-fish,.mini-pond.strained,.mini-pond.caught .mini-swimming-fish,.mini-pond.escaped .mini-swimming-fish{animation:none}.mini-lock-pick,.mini-lock-shackle,.mini-cham-face i,.mini-catch-progress span{transition:none}.mini-pond.caught .mini-swimming-fish{top:14%}.mini-pond.escaped .mini-swimming-fish{opacity:0}}

.mini-ranking{border:1px solid var(--line);border-radius:20px;padding:26px;background:var(--panel)}.mini-rank-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.mini-rank-heading h2{margin:0;font-size:22px}.mini-rank-heading p,.mini-rank-rules{color:var(--muted);font-size:12px;line-height:1.9}.mini-rank-heading .mini-secondary{width:auto;white-space:nowrap}.mini-rank-games{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}.mini-rank-games button{border:1px solid var(--line);padding:11px 14px;border-radius:30px;font-size:12px;color:var(--muted);background:#ffffff04}.mini-rank-games button[aria-pressed=true]{border-color:var(--lime);color:var(--lime);background:#c8ff6912}.mini-my-rank{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:20px;border:1px solid #c8ff6930;border-radius:14px;background:#c8ff6908;font-size:13px;margin:24px 0}.mini-my-rank>span{color:var(--muted)}.mini-my-rank strong{color:var(--lime);font-size:17px}.mini-rank-table-wrap{overflow-x:auto}.mini-rank-table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}.mini-rank-table caption{text-align:left;color:var(--muted);font-size:12px;padding:12px 0}.mini-rank-table td,.mini-rank-table th{padding:17px 12px;border-bottom:1px solid var(--line)}.mini-rank-table thead th{font-size:12px;color:var(--muted);font-weight:400;white-space:nowrap}.mini-rank-table tbody th{font-weight:500;overflow-wrap:anywhere;max-width:260px}.mini-rank-table td:first-child{width:60px}.mini-rank-table td:nth-child(n+3){white-space:nowrap;font-variant-numeric:tabular-nums}.mini-rank-number{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:10px;color:var(--muted)}.mini-rank-number.medalist{background:#c8ff6915;color:var(--lime);font-weight:700}.mini-rank-table .my-rank{background:#c8ff6908}.mini-rank-me{display:inline-block;margin-left:8px;background:var(--lime);color:#243014;border-radius:5px;padding:2px 5px;font-size:10px;vertical-align:middle}.mini-rank-empty{text-align:center;padding:48px 12px!important;color:var(--muted)}.mini-rank-rules{margin-top:24px}.mini-ranking button:focus-visible{outline:2px solid var(--lime);outline-offset:3px}@media(max-width:600px){.mini-ranking{padding:18px 12px}.mini-rank-heading{align-items:flex-start}.mini-rank-heading h2{font-size:19px}.mini-rank-heading .mini-secondary{padding:11px;font-size:12px}.mini-rank-table{font-size:12px}.mini-rank-table td,.mini-rank-table th{padding:12px 6px}.mini-rank-table td:first-child{width:36px}.mini-my-rank{gap:10px;padding:16px}.mini-my-rank strong{font-size:14px}}

.mini-fishing-stages{display:flex;justify-content:center;gap:14px;align-items:center;font-size:12px;color:var(--muted);margin:20px 0}.mini-fishing-stages .current{padding:7px 12px;border:1px solid #c8ff6966;border-radius:20px;color:var(--lime);background:#c8ff6910}.mini-fishing-stages i{font-style:normal;color:#526362}.mini-pond.mini-fishing-v2{height:340px;background:linear-gradient(#203b4b 0%,#17464e 45%,#1a5556 80%,#304a38 100%)}.mini-distance{position:absolute;left:16px;top:14px;text-align:left;font-size:11px;color:#c1d9dc;z-index:3}.mini-distance strong{position:static;display:block;width:auto;padding:2px 0;font-size:27px;color:#e2fff2;font-variant-numeric:tabular-nums}.mini-distance small{display:block;font-size:10px;color:#9ebcbd}.mini-fish-cue{position:absolute;top:18px;right:14px;max-width:55%;padding:9px 12px;border:1px solid #abd9ce40;border-radius:12px;background:#0b2a34b3;font-size:13px;color:#e4f9f0;z-index:3}.mini-fishing-v2 .mini-swimming-fish{transform:scaleX(var(--fish-facing,1)) scale(var(--fish-scale,1));transition:filter .15s}.mini-fishing-v2 .mini-swimming-fish.jumping{filter:drop-shadow(0 20px 5px #001d3666)}.mini-fishing-v2 .mini-water{inset:30% 0 0}.mini-shore{position:absolute;bottom:-16px;left:-5%;width:110%;height:56px;border-radius:50% 50% 0 0;background:#49623c55;border-top:2px solid #a8c38920}.mini-fishing-v2 .mini-fishing-line{height:120px;left:62%;transform:rotate(20deg);opacity:.5}.mini-fishing-v2>strong{bottom:14px;background:#12343acc;padding:8px 12px}.mini-fishing-v2.catch{border-color:#b8e867}.mini-fishing-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:22px 0}.mini-fishing-buttons .mini-choice{font-size:15px;min-width:0;padding:20px 8px;touch-action:manipulation}.mini-fishing-buttons [data-mini-pull="0"]{border-color:#699493;background:#21403d}.mini-reaction-time{height:5px;overflow:hidden;border-radius:4px;background:#293a3e;margin-top:20px}.mini-reaction-time i{height:100%;display:block;background:#94d4c0;width:100%}.mini-fishing-v2.has-fish .mini-float{display:none}@media(max-width:520px){.mini-pond.mini-fishing-v2{height:310px}.mini-fishing-buttons{gap:6px}.mini-fishing-buttons .mini-choice{font-size:12px;padding:18px 4px}.mini-fish-cue{font-size:11px;right:10px;max-width:51%;padding:8px}.mini-distance{left:12px}.mini-distance strong{font-size:23px}}
.mini-fishing-v2.fight{touch-action:manipulation;user-select:none;cursor:pointer}.mini-fishing-v2.fight:after{content:'';position:absolute;inset:35% 0 50px;pointer-events:none;background:linear-gradient(90deg,transparent calc(33.333% - 1px),#bbebd916 33.333%,transparent calc(33.333% + 1px),transparent calc(66.666% - 1px),#bbebd916 66.666%,transparent calc(66.666% + 1px))}
.mini-result-ranking{margin-top:32px;padding-top:24px;border-top:1px solid var(--line);text-align:left}.mini-result-ranking .mini-rank-heading h2{font-size:18px}.mini-result-ranking .mini-rank-heading>span{font-size:11px;color:var(--muted);white-space:nowrap}.mini-result-ranking .mini-my-rank{margin:16px 0}.mini-rank-more{margin-top:16px}.mini-rank-more summary{cursor:pointer;color:var(--muted);font-size:12px;padding:12px 0}.mini-result-ranking>.mini-secondary{max-width:260px;margin:auto}

.adventure-tabs{overflow-x:auto}.adventure-tabs button{flex:none;white-space:nowrap}@media(max-width:680px){.adventure-tabs{gap:16px}.adventure-tabs button{font-size:13px}}

/* Sichuan: an empty outer row/column on every side exposes the legal outside lane.
   The 136 tile indices are unchanged in portrait and transposed landscape. */
.sichuan-play.sichuan-playing{max-width:1060px}.sichuan-note{max-width:600px;margin:20px auto}.sichuan-load{min-height:22px}.sichuan-toolbar{margin-top:8px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 4px;border-bottom:1px solid var(--line);text-align:left;background:var(--panel)}.sichuan-toolbar small{display:block;font-size:13px;color:var(--muted);margin-bottom:5px}.sichuan-toolbar strong{font-size:23px;font-variant-numeric:tabular-nums;color:var(--lime)}.sichuan-toolbar strong span{font-size:13px;color:var(--muted)}.sichuan-toolbar .urgent{color:#ffad8b}.mini-play .sichuan-hint{width:auto;flex:none;white-space:nowrap;padding:8px 12px;min-height:0;font-size:12px;font-weight:400;gap:6px}.sichuan-hint span{margin-left:0;font-weight:400}.sichuan-status{font-size:13px;line-height:1.8;min-height:36px;color:var(--muted);padding:12px 0}.sichuan-scroll{max-height:min(72dvh,800px);overflow:auto;overscroll-behavior:contain;border-radius:14px;background:#121916}.sichuan-board{position:relative;display:grid;grid-template-columns:repeat(19,minmax(0,1fr));grid-template-rows:repeat(10,minmax(0,1fr));gap:4px;padding:12px;min-width:0}.sichuan-tile{grid-row:calc(var(--wide-row) + 1);grid-column:calc(var(--wide-col) + 1);position:relative;aspect-ratio:5/6;min-width:0;border:1px solid var(--tile-color);border-radius:6px;background:linear-gradient(145deg,#293c34,#1b2923);box-shadow:0 2px 0 #080f0b;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;touch-action:manipulation;user-select:none;padding:2px;cursor:pointer}.sichuan-tile.removed{visibility:hidden;pointer-events:none}.sichuan-picture{display:grid;place-items:center;width:100%;min-height:0;flex:1;overflow:hidden;border-radius:3px;font-size:clamp(17px,2.7vw,29px);line-height:1;text-align:center}.sichuan-picture img{display:block;width:100%;height:100%;object-fit:cover;min-height:0;max-height:54px}.sichuan-tile.selected{outline:2px solid var(--lime);outline-offset:0;background:#475a2d;transform:translateY(-1px)}.sichuan-tile.hinted{outline:2px solid #f5d380;outline-offset:0;background:#605431}.sichuan-tile:focus-visible{outline:3px solid #fff;outline-offset:1px;z-index:1}.sichuan-path{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;overflow:visible}.sichuan-path polyline{fill:none;stroke:var(--lime);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 5px #c8ff69)}.sichuan-play .sichuan-selected{font-size:12px;min-height:20px;color:var(--muted);margin:12px 0}.sichuan-reward-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:420px;overflow:auto;margin:24px 0;text-align:left}.sichuan-reward-list article{display:flex;align-items:center;gap:9px;padding:11px;background:#ffffff05;border:1px solid var(--line);border-radius:8px;min-width:0}.sichuan-reward-list article>span{font-size:22px}.sichuan-reward-list article>div{min-width:0;flex:1}.sichuan-reward-list small{display:block;font-size:10px;color:var(--muted)}.sichuan-reward-list strong{display:block;font-size:12px;overflow-wrap:anywhere}.sichuan-reward-list b{font-size:12px;color:var(--lime)}
@media(max-width:700px){.sichuan-play.sichuan-playing{padding:18px 14px;width:calc(100vw - 12px);max-width:none;margin-left:calc(50% - 50vw + 6px);margin-right:0}.sichuan-playing .sichuan-scroll{margin-left:-10px;margin-right:-10px}.sichuan-board{grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(19,minmax(0,1fr));gap:2px;padding:8px}.sichuan-tile{grid-row:calc(var(--row) + 1);grid-column:calc(var(--col) + 1);border-radius:5px;aspect-ratio:1/1.14}.sichuan-picture{font-size:clamp(18px,6vw,25px)}.sichuan-toolbar{gap:8px;padding:14px 0}.sichuan-status{min-height:34px}.sichuan-reward-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

.sichuan-playing [data-mini-action="abandon"]{font-size:12px}

/* 1 to 50: a stable five-column grid, sized for fast touch input. */
.to50-play{max-width:620px}.to50-intro{padding:20px 0 8px}.to50-symbol{font-size:clamp(52px,10vw,76px);font-weight:800;letter-spacing:-4px;font-variant-numeric:tabular-nums}.to50-symbol span{color:var(--lime);padding:0 12px;font-weight:400}.to50-note{font-size:12px;color:var(--muted)}.to50-hud{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:12px;margin:24px 0 18px;text-align:left}.to50-hud>div{display:flex;flex-direction:column;gap:6px}.to50-hud small,.to50-result-time small{color:var(--muted);font-size:12px}.to50-hud strong{font-size:30px;letter-spacing:-1px;font-variant-numeric:tabular-nums}.to50-hud strong span{font-size:13px;color:var(--muted);font-weight:500;letter-spacing:0}.to50-hud>div:first-child strong{color:var(--lime)}.to50-stage{position:relative}.to50-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.to50-cell{aspect-ratio:1;min-width:0;min-height:44px;padding:0;border:1px solid #ffffff20;border-radius:12px;background:#ffffff08;color:var(--text);font-size:clamp(22px,5.5vw,32px);font-weight:700;font-variant-numeric:tabular-nums;touch-action:manipulation;user-select:none;-webkit-tap-highlight-color:transparent;transition:background .12s,border-color .12s}.to50-cell:not(:disabled):active{background:#c8ff6920;border-color:var(--lime)}.to50-cell.cleared{visibility:hidden}.to50-board.concealed .to50-cell{color:transparent;pointer-events:none}.to50-cell:disabled{opacity:1}.to50-cell.wrong{background:#d9807326;border-color:#d98073;animation:to50-wrong .2s ease}.to50-cell:focus-visible{outline:2px solid var(--lime);outline-offset:2px}.to50-countdown{position:absolute;inset:0;display:grid;place-items:center;font-size:80px;font-weight:800;background:#101113ba;backdrop-filter:blur(5px);border-radius:12px}.to50-countdown[hidden]{display:none}.to50-status{font-size:13px;min-height:20px;margin:16px 0;color:var(--muted)}.to50-hud .urgent{color:#d98073}.to50-result-time{display:flex;flex-direction:column;gap:10px;margin:22px 0}.to50-result-time strong{font-size:clamp(46px,12vw,72px);font-weight:700;letter-spacing:-3px;font-variant-numeric:tabular-nums;color:var(--lime)}@keyframes to50-wrong{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}@media(max-width:480px){.to50-board{gap:6px}.to50-cell{border-radius:9px}.to50-hud{gap:8px}.to50-hud strong{font-size:26px}.to50-intro .mini-score{gap:12px}.to50-play .mini-score b{font-size:17px}}@media(prefers-reduced-motion:reduce){.to50-cell{transition:none}.to50-cell.wrong{animation:none}}

/* exploration.css */
.exploration-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start}.exploration-main{min-width:0}.exploration-panel{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:24px}.exploration-panel+.exploration-panel{margin-top:16px}.exploration-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.exploration-heading h2{margin:0;font-size:17px;letter-spacing:-.4px}.exploration-heading small{color:var(--muted);font-size:12px}.exploration-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:24px}.exploration-mode{text-align:left;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:20px;position:relative}.exploration-mode[aria-pressed=true]{border-color:var(--lime);background:#c8ff6907}.exploration-mode .mode-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);margin-bottom:16px}.exploration-mode .mode-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--line);border-radius:10px;color:var(--lime)}.mode-icon svg{width:21px;height:21px}.mode-radio{width:16px;height:16px;border:1px solid #5a6068;border-radius:50%}.exploration-mode[aria-pressed=true] .mode-radio{border:5px solid var(--lime)}.exploration-mode strong{font-size:16px;font-weight:600}.exploration-mode p{font-size:12px;color:var(--muted);line-height:1.8;margin:8px 0 0;word-break:keep-all}.exploration-mode:disabled{cursor:default;opacity:1}.exploration-mode:disabled:not([aria-pressed=true]){opacity:.45}.exploration-slots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.exploration-slot{min-width:0;position:relative}.exploration-slot .card-v3{max-width:none}.exploration-slot .card__top{flex-wrap:wrap;gap:4px}.exploration-slot .card-chip{max-width:100%;padding-inline:4px}.exploration-slot .card-chip--type{flex-shrink:0}.exploration-slot .card-v3:hover{transform:none}.exploration-slot .card-status-badge{display:none}.exploration-slot .slot-power{display:block;font-size:11px;color:var(--muted);margin-top:10px;line-height:1.6}.slot-power b{color:var(--text);font-weight:600}.empty-exploration-slot{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;width:100%;aspect-ratio:5/7;border:1px dashed #444a50;border-radius:10px;background:#121416;color:var(--muted)}.empty-exploration-slot span{font-size:23px;font-weight:300}.empty-exploration-slot small{font-size:10px}.empty-exploration-slot:hover{border-color:var(--lime);color:var(--lime)}.exploration-team-actions{display:flex;justify-content:space-between;gap:12px;margin-top:22px;font-size:12px}.exploration-team-actions button{padding:5px 0;color:var(--muted)}.exploration-team-actions button:first-child{color:var(--lime)}.exploration-note{margin:18px 0 0;color:var(--muted);font-size:12px;line-height:1.8;word-break:keep-all}.exploration-summary .summary-kicker{font-size:12px;color:var(--muted);margin:0 0 6px}.exploration-summary .summary-value{font-size:38px;font-weight:600;letter-spacing:-1px;margin:0;font-variant-numeric:tabular-nums}.summary-value span{font-size:15px;font-weight:400;letter-spacing:0;margin-left:6px;color:var(--muted)}.exploration-summary .summary-power{margin:12px 0 24px;color:var(--muted);font-size:12px}.summary-power b{color:var(--text)}.exploration-facts{margin:0 0 22px;padding-top:18px;border-top:1px solid var(--line)}.exploration-facts div{display:flex;justify-content:space-between;gap:12px;margin:12px 0;font-size:12px}.exploration-facts dt{color:var(--muted)}.exploration-facts dd{margin:0;text-align:right}.exploration-summary .primary{padding:15px 10px;font-size:13px}.exploration-summary .primary:disabled{opacity:.4;cursor:default}.exploration-summary .summary-help{font-size:11px;color:var(--muted);line-height:1.8;margin:12px 0 0;word-break:keep-all}.exploration-guide{margin-top:24px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.exploration-guide summary{cursor:pointer;padding:18px 0;color:var(--text)}.exploration-guide p{margin:0 0 10px;line-height:1.9}.exploration-status{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:var(--lime);border:1px solid #c8ff6938;border-radius:20px;padding:6px 10px;background:#c8ff6908}.exploration-status i{width:5px;height:5px;border-radius:50%;background:var(--lime)}.exploration-journey{margin:18px 0 26px;padding:22px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.journey-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;font-size:12px;color:var(--muted)}.journey-copy strong{font-size:25px;color:var(--text);font-variant-numeric:tabular-nums}.journey-progress{height:5px;border-radius:5px;background:#34383c;overflow:hidden}.journey-progress i{height:100%;display:block;background:var(--lime)}.journey-endpoints{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-top:12px}.exploration-return{width:100%;font-size:12px;padding:12px;color:var(--muted);border:1px solid var(--line);border-radius:8px;margin-top:10px}.exploration-complete{padding:8px 0 18px}.exploration-complete h3{font-size:24px;margin:16px 0 8px}.exploration-complete p{color:var(--muted);font-size:12px;line-height:1.8}.exploration-reward-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.exploration-reward-grid .card-v3{max-width:none}.exploration-reward-grid .card__panel{display:none}.exploration-reward-caption{font-size:12px;color:var(--muted);line-height:1.8}dialog.exploration-modal{width:min(1240px,calc(100vw - 64px));max-width:1240px;height:min(860px,calc(100dvh - 64px));max-height:calc(100dvh - 64px);padding:28px}dialog.exploration-modal[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}.exploration-modal .close{position:static}.exploration-modal-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.exploration-modal-heading h2{margin:0;font-size:20px}.exploration-modal-heading p{font-size:12px;margin:4px 0 0}.exploration-picker-filters{display:flex;gap:8px;margin-bottom:18px}.exploration-picker-filters input,.exploration-picker-filters select{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);padding:11px;font-size:12px}.exploration-picker-filters input{flex:1}.exploration-picker-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;min-height:0;align-content:start;overflow-y:auto;padding:4px 4px 14px}.exploration-picker-item{min-width:0;position:relative}.exploration-picker-item .card-v3{width:100%;max-width:none}.exploration-picker-item.selected .card-v3{outline:2px solid var(--lime);outline-offset:2px}.exploration-picker-item.selected:after{content:'✓';position:absolute;right:8px;top:8px;z-index:10;display:grid;place-items:center;width:23px;height:23px;background:var(--lime);color:var(--bg);border-radius:50%;pointer-events:none;font-size:13px}.exploration-picker-item .card-status-badge{display:none}.exploration-picker-item p{font-size:11px;color:var(--muted);margin:10px 0 0;line-height:1.6}.exploration-picker-item p b{color:var(--text)}.exploration-picker-item.unavailable .card-v3{filter:grayscale(1);opacity:.45;cursor:default;transform:none}.exploration-picker-item.unavailable p{color:#e3ac80}.exploration-picker-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;border-top:1px solid var(--line);margin-top:15px;padding-top:18px;font-size:12px;color:var(--muted)}.exploration-picker-footer .primary{width:auto;padding:12px 24px;font-size:12px}.exploration-confirm{width:440px;max-width:94vw;padding:28px}.exploration-confirm h2{margin:0 0 12px;font-size:21px}.exploration-confirm p{font-size:13px;line-height:1.9}.exploration-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.exploration-confirm-actions button{border:1px solid var(--line);border-radius:8px;padding:13px;font-size:12px}.exploration-confirm-actions .primary{border-color:var(--lime)}.exploration-empty{grid-column:1 / -1;text-align:center;color:var(--muted);padding:35px 10px;font-size:13px}
@media(max-width:960px){.exploration-layout{grid-template-columns:minmax(0,1fr) 260px;gap:18px}.exploration-panel{padding:20px}.exploration-slots{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}}
@media(max-width:680px){.exploration-layout{grid-template-columns:1fr;gap:18px}.exploration-modes{gap:10px;margin-bottom:18px}.exploration-mode{padding:16px 14px}.exploration-mode strong{font-size:14px}.exploration-mode p{font-size:11px}.exploration-panel{padding:18px}.exploration-heading{margin-bottom:18px}.exploration-heading h2{font-size:15px}.exploration-slots{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.exploration-summary .summary-value{font-size:34px}.exploration-summary .summary-power{margin-bottom:18px}dialog.exploration-modal{padding:18px;width:min(368px,94vw);max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 32px)}.exploration-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-height:55dvh}.exploration-picker-filters{flex-wrap:wrap}.exploration-picker-filters input{flex-basis:100%}.exploration-picker-filters select{flex:1}.exploration-picker-footer{font-size:11px}.exploration-picker-footer .primary{padding:12px 18px}.journey-copy strong{font-size:23px}.journey-endpoints{font-size:10px}.exploration-reward-grid{gap:10px}.exploration-reward-grid .card__title{--card-title-size:12cqi}.exploration-reward-grid .card-chip--type{display:none}}

/* Reward receipt: keep the existing card/detail style and lime accent. */
.exploration-facts time{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.journey-endpoints{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.journey-endpoints>span{display:grid;gap:5px}.journey-endpoints>span:last-child{text-align:right}.journey-endpoints time{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
dialog.exploration-reward-dialog{width:min(640px,calc(100vw - 32px));max-width:640px;max-height:calc(100dvh - 32px);padding:36px 32px 28px;background:#101318;text-align:center;overflow-x:hidden;overflow-y:auto;isolation:isolate}.exploration-reward-dialog::backdrop{background:#000c;backdrop-filter:blur(8px)}.exploration-reward-dialog .exploration-reward-close{z-index:3}.exploration-reward-dialog>.eyebrow{position:relative;margin:20px 0 12px;font-size:10px;letter-spacing:2px}.exploration-reward-dialog h2{position:relative;font-size:25px;letter-spacing:-.7px;margin:0 0 16px}.exploration-reward-dialog #exploration-reward-description{position:relative;font-size:13px;color:var(--muted);line-height:1.8;margin:12px 0 22px}.exploration-reward-dialog .exploration-reward-amount{position:relative;color:var(--lime);font:700 60px/1.2 'DM Sans',sans-serif;letter-spacing:-2px;margin:0;font-variant-numeric:tabular-nums}.exploration-reward-amount>span{font-size:25px;letter-spacing:0;margin-left:7px}.exploration-reward-emblem{position:relative;display:grid;place-items:center;width:72px;height:72px;margin:4px auto 0;border-radius:50%;border:1px solid #c8ff6966;background:#c8ff690c;color:var(--lime);box-shadow:0 0 42px #c8ff6920;animation:exploration-reward-arrive .55s ease-out both}.exploration-reward-emblem svg{width:35px;height:35px}.exploration-reward-emblem::after{content:'';position:absolute;inset:-12px;border:1px solid #c8ff694d;border-radius:50%;animation:exploration-reward-ring 1.6s ease-out both}.exploration-reward-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}.exploration-reward-particle{position:absolute;left:50%;top:30%;width:5px;height:9px;border-radius:1px;background:var(--color);opacity:0;animation:exploration-reward-burst 1.8s var(--delay) cubic-bezier(.1,.7,.3,1) both}.exploration-reward-particle.star{width:9px;height:9px;clip-path:polygon(50% 0,62% 36%,100% 50%,62% 64%,50% 100%,38% 64%,0 50%,38% 36%)}.exploration-reward-cards{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:460px;margin:20px auto}.exploration-reward-cards .card-v3{width:100%;max-width:none;opacity:1;cursor:default}.exploration-reward-cards .card-v3:hover{transform:none}.exploration-reward-dialog .exploration-reward-footnote{position:relative;font-size:11px;color:var(--muted);line-height:1.8;margin:10px 0 20px}.exploration-reward-dialog .exploration-reward-next{position:relative;padding:12px;border:1px solid #c8ff6926;border-radius:8px;background:#c8ff6905;font-size:12px;color:var(--muted);margin:18px 0}.exploration-reward-dialog .exploration-reward-dismiss{width:min(100%,300px);margin:4px auto 0;padding:14px;font-size:13px}
@keyframes exploration-reward-arrive{from{transform:scale(.75);opacity:0}to{transform:scale(1);opacity:1}}@keyframes exploration-reward-ring{from{transform:scale(.8);opacity:.8}to{transform:scale(1.6);opacity:0}}@keyframes exploration-reward-burst{0%{transform:translate(0,0) rotate(0);opacity:0}10%{opacity:1}70%{opacity:.9}100%{transform:translate(var(--tx),var(--ty)) rotate(var(--turn));opacity:0}}
@media(max-width:960px){.journey-endpoints{grid-template-columns:1fr;gap:10px}.journey-endpoints>span:last-child{text-align:left}}
@media(max-width:680px){dialog.exploration-reward-dialog{padding:28px 20px 22px}.exploration-reward-dialog h2{font-size:21px}.exploration-reward-dialog .exploration-reward-amount{font-size:48px}.exploration-reward-cards{gap:9px}.exploration-reward-cards .card__top{flex-wrap:wrap;gap:3px}.exploration-reward-cards .card-chip{max-width:100%;padding-inline:4px}.exploration-reward-cards .card__panel{display:none}}
@media(prefers-reduced-motion:reduce){.exploration-reward-confetti,.exploration-reward-emblem::after{display:none}.exploration-reward-emblem{animation:none}}

/* Every discovery is rendered; each list shows at most three rows. */
.exploration-reward-grid,.exploration-reward-cards{max-height:var(--reward-three-rows);min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;padding:4px;scrollbar-gutter:stable;overscroll-behavior:contain}
.exploration-reward-grid:focus-visible,.exploration-reward-cards:focus-visible{outline:2px solid var(--lime);outline-offset:4px}
.exploration-reward-grid .card-v3{opacity:1;cursor:default}.exploration-reward-grid .card-v3:hover{transform:none}
dialog.exploration-reward-dialog[open]{display:flex;flex-direction:column;align-items:center}
.exploration-reward-dialog>:not(.exploration-reward-confetti):not(.exploration-reward-cards){flex-shrink:0}
.exploration-reward-dialog .exploration-reward-cards{width:100%;flex:0 1 auto;min-height:0}

/* Keep scrolling inside open dialogs; fade only while more cards remain below. */
dialog.exploration-modal,dialog.exploration-confirm,dialog.exploration-reward-dialog{overscroll-behavior:contain}
.exploration-picker-grid{overscroll-behavior:contain;scrollbar-gutter:stable}
.exploration-list-has-more{-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - 36px),transparent 100%);mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - 36px),transparent 100%)}

.exploration-list-has-above{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 36px,#000 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 36px,#000 100%)}
.exploration-list-has-above.exploration-list-has-more{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 36px,#000 calc(100% - 36px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 36px,#000 calc(100% - 36px),transparent 100%)}

/* Match label and chevron insets across exploration dropdowns. */
.exploration-picker-filters select{appearance:none;-webkit-appearance:none;padding-left:14px;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27%3E%3Cpath d=%27m1 1 4 4 4-4%27 fill=%27none%27 stroke=%27%23b6bbc0%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:10px 6px}

.exploration-picker-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.exploration-picker-auto{border:1px solid var(--line);border-radius:9px;padding:12px 18px;font-size:12px;color:var(--text);white-space:nowrap}
.exploration-picker-auto:hover{border-color:var(--lime);color:var(--lime)}
@media(max-width:680px){.exploration-picker-footer{flex-wrap:wrap;gap:12px}.exploration-picker-actions{width:100%}.exploration-picker-actions>button{flex:1}.exploration-picker-actions .primary,.exploration-picker-auto{padding:12px 16px}}

.exploration-picker-actions>button{height:44px;line-height:18px}

.exploration-power-bonus{color:var(--lime);font-weight:500;white-space:nowrap}

.exploration-request-error{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;border:1px solid #e3ac8038;background:#e3ac8008;padding:14px 16px;border-radius:10px;color:#e3ac80;font-size:12px;line-height:1.8}.exploration-request-error button{color:var(--lime);white-space:nowrap}

/* Keep virtual rows stable and prevent the browser from anchoring recycled cards. */
.exploration-picker-grid{overflow-anchor:none;scroll-behavior:auto}.exploration-picker-spacer{grid-column:1 / -1;pointer-events:none}.exploration-picker-item p{min-height:3.2em;max-height:3.2em;overflow:hidden}

/* dungeon.css */
.dungeon-submenu{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 28px}
.dungeon-submenu button{border:1px solid var(--line);border-radius:9px;padding:11px 17px;color:var(--muted);font-size:13px}
.dungeon-submenu button[aria-current]{color:var(--lime);border-color:#a3c26770;background:#c8ff690a}
.dungeon-page button:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.dungeon-help h2{font-size:21px;line-height:1.4;margin:0 0 14px;letter-spacing:-.5px}
.dungeon-help h2 small{font-size:12px;font-weight:400;color:var(--muted);margin-left:6px}
.dungeon-help-intro,.dungeon-help-footnote,.dungeon-coming p{font-size:13px;line-height:1.9;color:var(--muted)}
.dungeon-preparing{font-size:12px;line-height:1.7;color:var(--muted);border-left:2px solid var(--line);padding:8px 13px;margin:20px 0 32px}
.dungeon-help>section+section{margin-top:34px}
.dungeon-help-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dungeon-help-item{display:flex;align-items:flex-start;gap:15px;min-width:0;padding:20px;border:1px solid var(--line);background:var(--panel);border-radius:13px}
.dungeon-help-symbol{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:50%;color:var(--affinity-color);border:1px solid currentColor;background:#171113e6}
.dungeon-help-symbol svg{width:22px;height:22px}
.dungeon-help-item h3{font-size:15px;line-height:1.4;margin:0 0 7px;font-weight:600}
.dungeon-help-item p{font-size:13px;line-height:1.8;margin:0;color:var(--muted);word-break:keep-all;overflow-wrap:anywhere}
.dungeon-help-footnote{margin:26px 0 0}
.dungeon-coming{text-align:center;padding:48px 20px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.dungeon-coming h2{font-size:24px;margin:0 0 14px}
.dungeon-coming .mini-secondary{max-width:280px;margin:24px auto 0;justify-content:center}
.dungeon-frame{display:block;width:100%;height:900px;min-height:640px;border:0;border-radius:18px;background:var(--bg)}
.dungeon-frame.dungeon-frame--reward-fullscreen{position:fixed;inset:0;z-index:1000;width:100vw;height:100dvh!important;min-height:0;border-radius:0}
html.dungeon-reward-fullscreen,html.dungeon-reward-fullscreen body{overflow:hidden}
@media(max-width:620px){.dungeon-help-grid{grid-template-columns:1fr}.dungeon-help-item{padding:17px}.dungeon-help h2{font-size:19px}}

.invasion-notice-badge,.raid-notice-badge,.exploration-notice-badge,.trade-notice-badge{display:inline-grid;place-items:center;width:17px;height:17px;margin-left:5px;vertical-align:middle;border-radius:50%;background:var(--lime);color:#101113;font-size:12px;font-weight:900;line-height:1;flex-shrink:0}.invasion-notice-badge[hidden],.raid-notice-badge[hidden],.exploration-notice-badge[hidden],.trade-notice-badge[hidden]{display:none}

.scenario-frame-shell{position:relative;background:#101113;border-radius:18px}

/* admin-images.css */
.image-admin-intro h2{margin:0 0 8px;font-size:24px}.image-admin-intro p,.image-generate-bar p{color:var(--muted);font-size:13px;line-height:1.7}.image-settings{border:1px solid var(--line);padding:16px;border-radius:12px;margin:22px 0}.image-settings summary{cursor:pointer;font-weight:700}.image-settings summary span{font-size:12px;font-weight:400;color:var(--muted);margin-left:12px}.image-settings form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.image-settings label{display:grid;gap:8px;font-size:13px}.image-settings input{min-width:0;width:100%;box-sizing:border-box;background:#121711;color:var(--text);border:1px solid #414a42;border-radius:8px;padding:12px}.image-settings [role=status]{grid-column:1/-1;margin:0;font-size:13px}.image-settings form button{justify-self:start}.image-filter-chips{display:flex;flex-wrap:wrap;gap:8px}.image-filter-chips button{border:1px solid var(--line);border-radius:24px;padding:9px 16px;font-size:13px}.image-filter-chips button.selected{background:var(--lime);color:#172014;border-color:var(--lime)}.image-filter-chips span{font-size:11px;opacity:.75;margin-left:6px}.image-selection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 15px;font-size:13px}.image-selection-toolbar>div{display:flex;gap:7px;flex-wrap:wrap}.image-selection-toolbar button{font-size:12px;padding:9px 12px}.image-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.image-card-option{display:flex;gap:10px;align-items:center;border:1px solid var(--line);padding:14px 12px;border-radius:10px;cursor:pointer;background:#191d1a;min-width:0}.image-card-option.selected{border-color:var(--lime);background:#242e1d}.image-card-option input{accent-color:var(--lime);flex-shrink:0}.image-card-emoji{font-size:27px}.image-card-option strong{display:block;font-size:14px;overflow-wrap:anywhere}.image-card-option small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.image-empty{grid-column:1/-1;padding:36px 12px;text-align:center;color:var(--muted);font-size:14px}.image-more{display:block;margin:18px auto}.image-generate-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;margin:12px 0 24px;border-bottom:1px solid var(--line)}.image-generate-bar .primary{width:auto;min-width:180px;padding:15px 22px}.image-admin button:disabled{opacity:.4;cursor:not-allowed}.image-job{border:1px solid var(--line);border-radius:12px;padding:20px}.image-job h3{margin:0 0 18px}.image-job-heading{display:flex;justify-content:space-between;gap:12px;font-size:13px}.image-job progress{width:100%;height:10px;margin-top:14px;accent-color:var(--lime)}.image-job-items{max-height:300px;overflow:auto;margin:14px 0;display:grid;gap:10px}.image-job-items>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:10px;font-size:12px}.image-job-items>div>span:first-child{flex:1;min-width:140px}.image-job-completed{color:var(--lime)}.image-job-failed{color:#ffb6a5}.image-job-items a{color:var(--lime)}@media(max-width:680px){.image-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.image-settings form{grid-template-columns:1fr}.image-selection-toolbar{align-items:flex-start;flex-direction:column}.image-generate-bar{flex-direction:column;align-items:stretch}.image-generate-bar p{margin:0}.image-job-heading{flex-direction:column}.image-card-emoji{display:none}.admin-tabs{flex-wrap:wrap}.image-card-option{padding:12px 8px}}

.image-mode-tabs{margin:20px 0}.image-card-search{display:grid;gap:8px;margin-top:20px;font-size:13px}.image-card-search input,.image-card-search select{width:100%;box-sizing:border-box;border:1px solid #41464c;border-radius:8px;padding:12px;background:#17191c;color:var(--text);font:inherit}.image-card-thumb{width:42px;height:59px;object-fit:cover;border-radius:5px;flex:none}.image-regeneration-preview{display:flex;align-items:center;gap:22px;margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:12px;background:#191b1e}.image-regeneration-preview>img{width:140px;aspect-ratio:5/7;object-fit:cover;border-radius:9px}.image-regeneration-preview small,.image-regeneration-preview strong{display:block}.image-regeneration-preview small{color:var(--muted);font-size:12px;margin-bottom:8px}.image-regeneration-preview strong{font-size:16px}.image-regeneration-preview p{color:var(--muted);font-size:13px;line-height:1.7}@media(max-width:680px){.image-card-search input,.image-card-search select{font-size:16px}.image-regeneration-preview{gap:15px;padding:14px}.image-regeneration-preview>img{width:100px}.image-regeneration-preview strong{font-size:14px}}

.image-generation-options{border:1px solid var(--line);border-radius:12px;padding:20px;margin:20px 0;min-width:0}.image-generation-options label{display:grid;gap:9px;margin-bottom:18px;font-size:13px}.image-generation-options select,.image-generation-options textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid #41464c;border-radius:8px;padding:12px;color:var(--text);background:#17191c;font:inherit;line-height:1.7}.image-generation-options textarea{resize:vertical}.image-generation-options:disabled{opacity:.6}@media(max-width:680px){.image-generation-options{padding:14px}.image-generation-options select,.image-generation-options textarea{font-size:16px}}

.image-target-tabs{margin-bottom:16px}.image-target-tabs button{font-weight:700}.image-generation-options textarea{overflow-wrap:anywhere}

.image-prompt-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.image-prompt-actions button{max-width:100%;white-space:normal;text-align:left}.image-prompt-actions .admin-secondary,.image-prompt-actions .admin-secondary:hover,.image-prompt-actions .admin-secondary:active{background:#1c1c1c}

/* Booster covers use opaque full-bleed artwork, independent of the old foil emblems. */
.image-pack-guidance{padding:18px;margin:20px 0;border:1px solid var(--line);border-radius:12px;background:#1c1c1c}.image-pack-guidance p{color:var(--muted);font-size:13px;line-height:1.7;margin:8px 0 0}.image-pack-detail{border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0;background:#1c1c1c}.image-pack-detail summary{cursor:pointer;font-size:13px;line-height:1.6}.image-pack-detail-body{display:flex;gap:24px;margin-top:18px;align-items:flex-start}.image-pack-detail-body>div>small{display:block;font-size:11px;color:var(--muted);margin-top:10px}.image-pack-wrapper{position:relative;width:150px;aspect-ratio:5/8;overflow:hidden;border-radius:4px;background:#aaa;box-shadow:3px 8px 16px #0005}.image-pack-wrapper>img{position:absolute;width:100%;height:100%;inset:0;object-fit:cover}.image-pack-wrapper:before,.image-pack-wrapper:after{content:'';position:absolute;left:0;right:0;height:12px;z-index:2;background:repeating-linear-gradient(90deg,#bcbcbc90 0 2px,#edededb0 2px 4px);box-shadow:0 1px 3px #0005}.image-pack-wrapper:before{top:0}.image-pack-wrapper:after{bottom:0}.image-pack-wrapper>span{position:absolute;bottom:24px;left:0;right:0;text-align:center;font-size:14px;font-weight:800;color:white;text-shadow:0 2px 7px #000,0 1px 3px #000;background:linear-gradient(transparent,#0008);padding:12px 8px 4px}.image-pack-reference-panel{flex:1;min-width:0}.image-pack-reference-panel>strong{font-size:12px}.image-pack-references{display:grid;grid-template-columns:repeat(4,minmax(0,90px));gap:10px;margin:12px 0}.image-pack-references figure{margin:0;min-width:0}.image-pack-references img{width:100%;aspect-ratio:5/7;object-fit:cover;border-radius:5px}.image-pack-references figcaption{font-size:11px;line-height:1.5;margin-top:5px;overflow-wrap:anywhere;color:var(--muted)}.image-pack-prompt{font-size:12px;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap;color:var(--muted)}
.image-admin .image-settings input,.image-admin .image-card-option,.image-admin .image-filter-chips button,.image-admin .image-card-option.selected,.image-admin .image-filter-chips button.selected{background:#1c1c1c}.image-admin .image-filter-chips button.selected{color:var(--lime);border-color:var(--lime)}
@media(max-width:680px){.image-pack-detail-body{flex-direction:column;gap:18px}.image-pack-wrapper{width:130px}.image-pack-reference-panel{width:100%}.image-pack-references{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.image-pack-detail{padding:12px}.image-card-option{flex-wrap:wrap}.image-card-option>span:last-child{flex:1;min-width:60px}}

/* admin-monitor.css */
.monitor-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:24px 0}.monitor-summary>div,.monitor-panel{border:1px solid var(--border,#333);border-radius:14px;background:var(--surface,#18191c);padding:22px}.monitor-summary strong{font-size:18px}.monitor-summary p,.monitor-panel p{line-height:1.7;color:var(--muted,#a7a8af)}.monitor-panel{margin-top:20px}.monitor-panel h2{font-size:20px;margin:0 0 12px}.monitor-actions{margin-bottom:16px}.monitor-alerts article{border-left:3px solid #e2ad5b;padding:8px 14px;margin:12px 0;background:#e2ad5b0a}.monitor-alerts p{margin:4px 0}.monitor-table{overflow:auto}.monitor-table table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap;font-size:14px}.monitor-table td,.monitor-table th{border-bottom:1px solid #ffffff16;padding:12px 10px}.monitor-table small{display:block;color:#969aa3;margin-top:5px}.monitor-usage{margin-top:20px}.monitor-admin form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}.monitor-admin label{display:grid;gap:8px;flex:1;min-width:180px}.monitor-admin input{border:1px solid #464951;border-radius:8px;background:#101113;color:#eee;padding:12px;min-width:0;width:100%;box-sizing:border-box}.monitor-admin summary{cursor:pointer}.monitor-admin button{min-height:42px}.monitor-admin .admin-notice:empty{display:none}

/* reveal-all.css */
.all-reveal{position:fixed;inset:0;z-index:30;display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100dvh;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 45%,#1b192c 0%,#0a0911 70%);color:#f2f3ee}
.all-reveal-stage{position:relative;min-width:0;min-height:0;z-index:2}
.all-reveal-space{position:absolute;inset:14px max(16px,env(safe-area-inset-right,0px)) 20px max(16px,env(safe-area-inset-left,0px));display:grid;place-items:center}
.all-reveal-grid{display:flex;flex-direction:column;align-items:center;gap:var(--overview-gap);width:100%;min-width:0}
.all-reveal-row{display:flex;justify-content:center;gap:var(--overview-gap)}
.all-reveal-slot{position:relative;flex:none;width:var(--overview-card-width);aspect-ratio:5/7;visibility:hidden;perspective:1000px}
.all-reveal-slot.is-visible{visibility:visible}
.all-reveal-flight,.all-reveal-turn{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.all-reveal-turn{transform:rotateY(0deg)}.is-revealed .all-reveal-turn{transform:rotateY(180deg)}
.all-reveal-front,.all-reveal-back{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d}
.all-reveal-front{transform:rotateY(180deg)}
.all-reveal .card-v3{width:100%;height:100%;max-width:none;margin:0;animation:none;transform:none;pointer-events:none}
.all-reveal .card__tilt{transition:none;box-shadow:0 8px 22px #0008;will-change:auto}
.all-reveal .card__top{gap:2cqi}.all-reveal .card-chip{height:9cqi;padding:0 3cqi;font-size:3.7cqi;gap:1.7cqi}.all-reveal .card-chip::before{width:1.8cqi;height:1.8cqi}.all-reveal .card-chip--type{font-size:3.8cqi}
.all-reveal .card__title{--card-title-size:12.5cqi}.all-reveal .card__meta{font-size:3.8cqi;gap:3cqi}.all-reveal .card__panel{gap:4cqi}.all-reveal .card__sub{font-size:3.6cqi;margin-bottom:1.5cqi}.all-reveal .card__desc{font-size:4.2cqi}.all-reveal .card__mark{width:13cqi;height:13cqi;flex:none}
.all-reveal .count-badge{display:none}
.all-reveal .card-back .card__face{gap:5cqi}.all-reveal .back-title{font-size:3.8cqi;letter-spacing:1.2cqi}.all-reveal .card-back .card-meta{font-size:3.5cqi}
.all-reveal-slot.is-special .all-reveal-front .card__tilt{box-shadow:0 8px 22px #0008,0 0 20px color-mix(in srgb,var(--impact-color) 35%,transparent)}
.all-reveal-actions{position:relative;z-index:6;display:flex;align-items:center;justify-content:center;min-height:88px;padding:14px 24px 24px}
.all-reveal-actions .primary{width:min(100%,320px);min-height:48px;padding:12px 24px}
.all-reveal-actions [hidden]{display:none}
.all-reveal-flash{position:absolute;inset:0;z-index:3;opacity:0;pointer-events:none;background:radial-gradient(circle at var(--impact-x,50%) var(--impact-y,50%),var(--impact-color),transparent 75%)}
.all-reveal-flash.is-prismatic{background:radial-gradient(circle at var(--impact-x,50%) var(--impact-y,50%),#fff,#f0b1ff 16%,#88e7ff 36%,transparent 75%)}
.all-reveal-ring{position:absolute;z-index:3;width:clamp(100px,18vw,230px);aspect-ratio:1;border:1px solid var(--impact-color);border-radius:50%;box-shadow:0 0 24px color-mix(in srgb,var(--impact-color) 35%,transparent);opacity:0;pointer-events:none}
.all-reveal-ring.is-prismatic{border-color:#e9ddff;box-shadow:0 0 24px #da98ff88,inset 0 0 20px #83eaff44}
.all-reveal-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(min-width:900px){.all-reveal-space{left:40px;right:40px}}
@media(max-height:520px){.all-reveal .pack-reveal-top{min-height:44px;padding-top:6px;padding-bottom:6px}.all-reveal-space{top:6px;bottom:8px}.all-reveal-actions{min-height:66px;padding:8px 20px 10px}.all-reveal-actions .primary{min-height:42px;padding:9px 24px}}
@media(prefers-reduced-motion:reduce){.all-reveal-ring,.all-reveal-flash{display:none}}

/* Keep the optional reveal-all action visually quiet. */
.pack-reveal #reveal-all{background:#292c30;color:#b7bbc1;box-shadow:none}
.pack-reveal #reveal-all:hover{background:#34383d;color:#d0d3d7}
.pack-reveal #reveal-all:focus-visible{outline-color:#95999f}

.all-reveal-skip{min-height:48px;padding:12px 24px;border:1px solid #ffffff30;border-radius:8px;background:#292c30;color:#d0d3d7;font-size:14px;cursor:pointer}
.all-reveal-skip:hover{background:#34383d}
.all-reveal-skip:focus-visible{outline:2px solid var(--lime);outline-offset:4px}
.all-reveal.is-large .all-reveal-stage{overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.all-reveal.is-large .all-reveal-space{position:relative;inset:auto;min-height:100%;padding:14px max(16px,env(safe-area-inset-right,0px)) 20px max(16px,env(safe-area-inset-left,0px));align-items:start}
@media(min-width:900px){.all-reveal.is-large .all-reveal-space{padding-left:40px;padding-right:40px}}

/* mailbox.css */
header .mailbox-nav{margin-left:auto;display:flex;align-items:center;gap:6px}header .mailbox-nav+#account{margin-left:0}#mailbox-badge{background:var(--lime);color:#15200c;border-radius:20px;padding:2px 6px;font-size:10px}#mailbox-badge[hidden]{display:none}.mail-page{max-width:900px;margin:auto}.mail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.mail-heading h1,.mail-heading h2{margin:0}.mail-heading .eyebrow{margin-top:0}.mail-heading .sub{line-height:1.7}.mail-summary,.mail-meta,.mail-preview{color:var(--muted);font-size:12px}.mail-summary strong{color:var(--lime)}.mail-list{display:grid;gap:10px}.mail-row{display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:left;width:100%;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.mail-row:hover{border-color:#647848}.mail-row.unread{border-left:3px solid var(--lime)}.mail-row-main{display:grid;gap:10px;min-width:0}.mail-row strong{font-size:16px;overflow-wrap:anywhere}.mail-row strong i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--lime);margin-right:8px;vertical-align:middle}.mail-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-tag{flex:none;border:1px solid #4d6036;background:#26301e;color:var(--lime);padding:6px 9px;border-radius:20px;font-size:11px}.mail-tag.claimed{color:var(--muted);border-color:var(--line);background:transparent}.mail-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:28px 0;font-size:13px}.mail-back{color:var(--muted);padding:0;margin:0 0 20px;font-size:13px}.mail-detail{padding:32px;background:var(--panel);border:1px solid var(--line);border-radius:16px}.mail-detail h2{overflow-wrap:anywhere}.mail-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:14px;color:#c1c7bd}.mail-detail>.mail-body{margin:30px 0}.mail-gift{border-top:1px solid var(--line);padding-top:20px}.mail-gift h3{font-size:15px}.mail-gift .primary{padding:14px 24px}.mail-attachments{list-style:none;padding:0;display:grid;gap:8px;max-height:320px;overflow:auto}.mail-attachments li{display:flex;justify-content:space-between;gap:15px;align-items:center;background:#121710;border:1px solid #333e2d;border-radius:8px;padding:12px;font-size:13px}.mail-attachments li>span{min-width:0;overflow-wrap:anywhere}.mail-attachments strong{flex:none;color:var(--lime)}.mail-attachments small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.mail-error{color:#ffc08e;padding:14px;background:#30231b;border-radius:8px;font-size:13px}.mail-admin-entry{grid-column:1/-1;display:flex;align-items:center;gap:20px;justify-content:space-between}.mail-admin-entry h3{margin:0}.mail-admin-entry>.admin-secondary{width:auto;margin:0}.mail-compose-page{max-width:980px}.mail-compose-page fieldset{border:0;padding:0;margin:0;min-width:0}.mail-compose-section{padding:24px;border:1px solid var(--line);border-radius:12px;margin-bottom:18px;background:var(--panel)}.mail-compose-section h3{margin:0 0 22px;font-size:16px}.mail-compose-section h3 small{font-size:11px;color:var(--muted);font-weight:400;margin-left:8px}.mail-compose-section label{display:block;font-size:13px;color:#c1c7bd;margin:16px 0 8px}.mail-compose-section input:not([type=radio]),.mail-compose-section textarea{display:block;width:100%;min-width:0;border:1px solid #414a42;background:#111512;color:var(--text);border-radius:8px;padding:12px;font:inherit;font-size:14px}.mail-compose-section textarea{resize:vertical}.mail-compose-section textarea:focus-visible{outline:2px solid var(--lime)}.mail-audience{display:flex;gap:24px}.mail-audience label{margin:0}.mail-audience input{accent-color:var(--lime)}.mail-search{display:flex;gap:8px;margin-top:20px}.mail-selected{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.mail-selected button{max-width:100%;overflow-wrap:anywhere;border:1px solid #596c40;background:#24321a;color:var(--lime);padding:8px 12px;font-size:12px;border-radius:20px}.mail-all-note{padding:14px;background:#2b2e1b;border:1px solid #63673d;color:#dce6aa;font-size:13px;border-radius:8px;line-height:1.8}.mail-number-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.mail-number-fields label{margin:0}.mail-number-fields input{margin-top:10px}.mail-card-results{max-height:240px;overflow:auto;display:grid;gap:5px;margin:8px 0}.mail-card-results button{display:flex;align-items:center;gap:12px;text-align:left;padding:12px;background:#20251d;border-radius:6px;font-size:13px}.mail-card-results small{color:var(--muted);margin-left:auto}.mail-card-selected>div{display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);padding:10px 0;font-size:13px}.mail-card-selected>div>span:first-child{flex:1}.mail-card-selected input{width:80px!important}.mail-card-selected button{font-size:22px;padding:8px}.mail-compose-page fieldset>.primary{padding:16px 28px}.mail-history{margin-top:44px;border-top:1px solid var(--line);padding-top:24px}.mail-history details{padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.mail-history summary{cursor:pointer;font-size:14px;line-height:1.7}.mail-history summary span{display:block;margin-top:6px;font-size:11px;color:var(--muted)}.mail-pending{padding:20px;border:1px solid #b39455;border-radius:10px;margin-bottom:20px;font-size:13px;line-height:1.8}.mail-confirm-body,.mail-recipient-preview{max-height:180px;overflow:auto}.mail-page button:disabled,.mail-compose-page button:disabled{cursor:not-allowed}
@media(max-width:680px){.mail-heading{align-items:flex-start}.mail-heading .admin-secondary{padding:9px;font-size:12px}.mail-row{padding:16px 12px;gap:8px;align-items:flex-start}.mail-row strong{font-size:14px}.mail-meta{font-size:10px}.mail-tag{font-size:10px;padding:5px}.mail-detail{padding:22px 16px}.mail-compose-section{padding:18px 14px}.mail-number-fields{grid-template-columns:1fr;gap:16px}.mail-admin-entry{display:block}.mail-admin-entry>.admin-secondary{width:100%;margin-top:10px}.mailbox-nav{font-size:10px;padding:7px 6px}.mail-heading h1{font-size:28px}}
header nav button{flex:none}header .mailbox-nav,header #account,header #sound{flex:none}
@media(min-width:1401px){header nav{flex:1;overflow-x:auto}}
@media(max-width:1400px){header{flex-wrap:wrap;height:auto;min-height:96px;padding-top:14px;padding-bottom:0}header nav{order:3;width:100%;height:44px;flex-basis:100%;overflow-x:auto;justify-content:flex-start;flex-shrink:0}}
.mail-compose-section select{display:block;width:100%;margin-top:10px;background:#111512;color:var(--text);border:1px solid #414a42;border-radius:8px;padding:12px;font:inherit}.mail-attachments .mail-card-action{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:15px;width:100%;padding:4px 0}.mail-card-action>span{min-width:0;overflow-wrap:anywhere}.mail-card-action:hover{color:var(--lime)}

.mail-raid-rewards h4{margin:22px 0 10px;font-size:13px;color:var(--muted)}

/* Raid mail uses the existing settlement rows and decomposition rarity backs. */
.mail-raid-rewards .settlement-reward{display:flex;align-items:center;gap:14px;padding:14px 12px;margin:10px 0;border:1px solid var(--line);border-radius:12px;background:#131518}
.mail-raid-rewards .settlement-icon{display:grid;place-items:center;flex:none;width:30px;height:42px;border:1px solid var(--rarity);border-radius:5px;background:color-mix(in srgb,var(--rarity) 9%,#131518);color:var(--rarity);font-size:21px;rotate:-6deg}
.mail-raid-rewards .settlement-label{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.mail-raid-rewards .settlement-label strong{font-size:13px;color:var(--rarity);overflow-wrap:anywhere}
.mail-raid-rewards .settlement-label small{font-size:10px;color:var(--muted);line-height:1.6}
.mail-raid-rewards .settlement-quantity{flex:none;font-size:22px;color:var(--lime);white-space:nowrap;font-variant-numeric:tabular-nums}
.mail-raid-rewards .settlement-quantity small{font-size:11px;margin-left:3px}
.mail-raid-rewards .mail-card-thumbnail{width:112px;flex:none;margin:0}
.mail-raid-rewards .mail-card-thumbnail .count-badge{display:none}
.mail-raid-rewards .mail-card-thumbnail .card-chip{height:clamp(12px,9cqi,24px);padding:0 4%;gap:3px}
.mail-raid-rewards .mail-card-thumbnail .card-chip--rarity::before{width:3px;height:3px}
@media(max-width:680px){.mail-raid-rewards .settlement-reward{gap:10px;padding:12px 10px}.mail-raid-rewards .mail-card-thumbnail{width:88px}.mail-raid-rewards .settlement-quantity{font-size:19px}.mail-raid-rewards .settlement-label strong{font-size:12px}}

/* Same grid, heading and action layout as the raid reward screen, with the original simultaneous card flip. */
.mail-raid-opening{max-width:1100px;margin:auto;padding:18px 0 0;min-height:70dvh}
.mail-raid-opening .raid-reward-heading{text-align:center;margin-bottom:36px}
.mail-raid-opening h1{font-size:clamp(28px,4vw,40px);margin:12px 0}
.mail-raid-opening .raid-reward-heading>p:not(.eyebrow){font-size:13px;color:var(--muted);line-height:1.8}
.mail-raid-opening .raid-reward-summary{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 24px;margin-top:22px;font-size:12px;color:var(--muted)}
.mail-raid-opening .raid-reward-summary strong{margin-left:8px;color:var(--lime);font-size:16px}
.mail-raid-opening .raid-reward-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:20px;max-width:100%;margin:auto}
.mail-raid-opening .raid-reward-slot{width:100%;max-width:240px;aspect-ratio:5/7;justify-self:center}
.mail-raid-opening .card-v3{width:100%;height:100%;max-width:none;margin:0;animation:none;transform:none;pointer-events:none}
.mail-raid-opening .card__tilt{transition:none;will-change:auto;box-shadow:0 8px 22px #0008}
.mail-raid-opening .count-badge{display:none}
.mail-raid-opening .card-chip{height:clamp(12px,9cqi,24px);padding:0 4%;gap:3px}
.mail-raid-opening .card-chip--rarity::before{width:3px;height:3px}
.mail-raid-opening .raid-reward-actions{position:sticky;bottom:0;z-index:6;display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:32px;padding:22px 16px;background:linear-gradient(transparent,var(--bg) 20%)}
.mail-raid-opening .raid-reward-actions p{font-size:12px;color:var(--muted);text-align:center}
.mail-raid-opening .raid-reward-actions .primary{width:240px;max-width:75%;min-height:48px;padding:12px 24px}
.mail-raid-opening .raid-reward-points-only{text-align:center;padding:70px 20px;color:var(--muted)}
@media(max-width:760px){.mail-raid-opening .raid-reward-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mail-raid-opening .raid-reward-heading{margin-bottom:24px}.mail-raid-opening{padding-top:4px}.mail-raid-opening .raid-reward-actions{padding-left:0;padding-right:0}}

.mail-raid-opening .raid-reward-slot{perspective:1000px}
.mail-raid-opening .raid-reward-turn{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .72s cubic-bezier(.2,.65,.25,1)}
.mail-raid-opening.is-revealed .raid-reward-turn{transform:rotateY(180deg)}
.mail-raid-opening .raid-reward-front,.mail-raid-opening .raid-reward-back{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.mail-raid-opening .raid-reward-front{transform:rotateY(180deg)}
.mail-raid-opening .raid-reward-back .card__face{align-items:center;justify-content:center;gap:7%;background:radial-gradient(ellipse at 40% 25%,#59616c33,transparent 65%),repeating-linear-gradient(135deg,#a5aab509 0 1px,transparent 1px 13px),#13171e;color:#c1c6cf}
.mail-raid-opening .raid-reward-back .card__face::before{background:linear-gradient(145deg,#b7bcc6,#555c68 65%,#b7bcc6);opacity:.65}
.mail-raid-opening .raid-reward-back svg{width:28%;height:auto;filter:drop-shadow(0 0 12px #b7bcc62b)}
.mail-raid-opening .raid-reward-back .card__face>span{font-size:clamp(5px,3cqi,11px);letter-spacing:.25em}
.mail-raid-opening .raid-reward-back small{font-size:12px;letter-spacing:.15em;color:var(--muted)}
@media(prefers-reduced-motion:reduce){.mail-raid-opening .raid-reward-turn{transition:none}}

.mail-body a{color:var(--lime);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.mail-body a:hover{text-decoration-thickness:2px}.mail-body a:focus-visible{outline:2px solid var(--lime);outline-offset:3px;border-radius:2px}

/* Ticket rewards share the compact reward rows, with a legible key. */
.raid-ticket-icon{rotate:0deg}.raid-ticket-icon svg{width:85%;height:85%}.raid-ticket-summary{display:inline-flex;align-items:center;gap:4px}.raid-ticket-summary>svg{width:18px;height:18px;flex:none;color:var(--lime)}

.mail-content-action{margin-top:24px}

.mail-growth-label{display:flex;align-items:center;gap:10px}.mail-growth-icon{width:28px;height:35px;flex:none;color:var(--accent,#b7ce89)}

/* invasion.css */
.invasion-collection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:22px}.invasion-collection-grid article{padding:18px;border:1px solid #414343;border-radius:12px}.invasion-collection-grid button{margin:6px}.invasion-prize{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:14px 0}.invasion-collectible{position:relative;width:170px;aspect-ratio:5/7;overflow:hidden;border:2px solid #a4bcd2;border-radius:14px;background:radial-gradient(ellipse,#626e87,#11151c);display:flex;flex-direction:column;justify-content:end;padding:14px;color:white;box-shadow:0 0 25px #9aaad315}.invasion-collectible img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.invasion-collectible:after{content:'';position:absolute;inset:45% 0 0;background:linear-gradient(transparent,#0c1025ed)}.invasion-collectible strong,.invasion-collectible small{position:relative;z-index:1}.invasion-collectible small{font-size:8px;letter-spacing:1.5px}.invasion-collectible strong{font-size:16px;margin-top:5px}.invasion-title-reward{width:100%;max-width:420px;margin:10px 0}.invasion-title-art{display:block;width:100%;height:auto}.invasion-title-reward>small{display:block;text-align:center;font-size:11px;color:var(--muted);margin-top:2px}.invasion-title-fallback{display:block;text-align:center;color:var(--text);font-size:13px}.invasion-prize>div:last-child{min-width:0;max-width:100%;flex:1 1 220px}.invasion-profile-note{font-size:12px;color:#b2c1d2}
.invasion-collectible .card__title{display:block;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;line-height:1.4}.invasion-collectible .card__title-text{display:inline-block;max-width:none;white-space:nowrap}.invasion-collectible .card__title.is-overflowing .card__title-text{animation:card-title-flow var(--title-duration,8s) ease-in-out infinite}@media(prefers-reduced-motion:reduce){.invasion-collectible .card__title{ text-overflow:ellipsis}.invasion-collectible .card__title.is-overflowing .card__title-text{animation:none}}

.invasion-contribution-attachment{margin-top:14px}.invasion-contribution-icon{display:inline-grid;place-items:center;flex:none;width:28px;height:35px;color:var(--lime);font-size:23px;font-weight:800}.invasion-contribution-icon svg{display:block;width:28px;height:35px}.invasion-contribution-icon .mail-growth-icon{color:var(--lime)}

/* page-ui.css */
/* Shared menu introduction, based on card combination and decomposition. */
.page-intro{margin:0 0 32px;text-align:left;min-width:0}
.page-intro>.eyebrow{margin:12px 0;font-size:12px;letter-spacing:2px;font-weight:600;color:var(--lime)}
.page-intro>h1{font-size:38px;font-weight:700;line-height:1.35;letter-spacing:-1.5px;margin:8px 0 12px;overflow-wrap:anywhere}
.page-intro>.page-intro-description{max-width:800px;margin:18px 0 0;padding-left:14px;border-left:2px solid var(--lime);color:var(--muted);font-size:13px;line-height:1.7}
.page-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:32px}
.page-heading-row>.page-intro{flex:1;margin-bottom:0}
.page-heading-row>button{flex:none;width:auto;margin-top:16px;white-space:nowrap;font-size:12px}
.collection-summary{margin-bottom:18px}
#app .hall-intro{margin:0;text-align:left}
#app .quest-login{padding-top:0;text-align:left}
#app .admin-heading{max-width:none}
.card-edit-detail-heading{margin:24px 0 20px}.card-edit-detail-heading h2{font-size:20px;margin:8px 0}
.recipe-book-stats{margin-bottom:24px}
.recipe-book-stats>.recipe-book-progress{width:100%;max-width:440px;padding:14px 16px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs){display:flex;justify-content:flex-start;align-items:center;gap:28px;height:auto;margin:0 0 24px;padding:0;border:0;border-bottom:1px solid var(--line);overflow-x:auto}
#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs)>button{flex:none;height:auto;min-height:48px;padding:14px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--muted);font-size:14px;font-weight:400;line-height:1.4;white-space:nowrap}
#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs)>button:is([aria-current="page"],[aria-pressed="true"],.selected){color:var(--lime);border-bottom-color:var(--lime);background:none}
#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs)>button:hover:not(:disabled):not([aria-current="page"]):not([aria-pressed="true"]):not(.selected){color:var(--text)}
#app .trade-toolbar{margin-bottom:24px;border-bottom:1px solid var(--line)}
#app .trade-toolbar>.trade-tabs{margin:0;border-bottom:0}
@media(max-width:680px){.page-intro{margin-bottom:22px}.page-intro>h1{font-size:30px}.page-heading-row{gap:12px;margin-bottom:22px}.page-heading-row>button{font-size:11px;margin-top:12px}.page-intro>.page-intro-description{overflow-wrap:anywhere}#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs){gap:24px;margin-bottom:22px}#app :is(.combine-tabs,.achievement-tabs,.adventure-tabs,.trade-tabs,.hall-tabs,.admin-tabs)>button{min-height:44px;padding:12px 2px;font-size:13px}#app .trade-toolbar>.trade-tabs{margin:0}.recipe-book-stats{margin-bottom:22px}}

/* encounter-reservations.css */
html:has(#encounter-reservation[open]){overflow:hidden;overscroll-behavior:none}
dialog.encounter-reservation{box-sizing:border-box;width:min(340px,calc(100vw - 40px));max-width:340px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #414141;border-radius:18px;background:#1c1c1c;color:#f2f3ee;overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 90px #0009}
.encounter-reservation::backdrop{background:#000b;backdrop-filter:blur(5px)}
.reservation-art{aspect-ratio:2/1;margin:24px 20px 0;overflow:hidden;background:none;display:grid;place-items:center;mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent),linear-gradient(0deg,transparent,#000 28%,#000 85%,transparent);mask-composite:intersect}
.reservation-art img{display:block;width:100%;height:100%;object-fit:cover}
.reservation-art svg{display:block;width:100%;height:100%}
.reservation-content{padding:14px 20px 20px;text-align:center}
.reservation-eyebrow{margin:0 0 8px;color:#c8ef9b;font-size:10px;font-weight:700;letter-spacing:.12em}
.reservation-content h2{margin:0;font-size:20px;line-height:1.35;overflow-wrap:anywhere}
.reservation-countdown{display:flex;flex-direction:column;gap:6px;margin:16px 0 8px}
.reservation-countdown span{font-size:10px;color:#95999f}
.reservation-countdown strong{color:#f2f3ee;font-size:28px;font-weight:600;letter-spacing:.04em;font-variant-numeric:tabular-nums;line-height:1.2}
.reservation-date{margin:0;color:#95999f;font-size:10px;line-height:1.6}
.reservation-actions{display:flex;gap:8px;margin-top:18px}
.reservation-actions button{flex:1;min-width:0;min-height:40px;padding:9px 8px;border:1px solid #484848;border-radius:9px;background:#1c1c1c;color:#f2f3ee;font-size:11px}
.reservation-actions button.primary{background:#c8ef9b;border-color:#c8ef9b;color:#1c1c1c}
.encounter-reservation button:focus-visible{outline:2px solid #c8ef9b;outline-offset:3px}
@media(max-width:360px){.reservation-content h2{font-size:18px}.reservation-countdown strong{font-size:25px}}

/* theme-collections.css */
/* Recipe layout, tray sizes, cards and responsive overlap come from combination.css. */
.theme-name{margin:0;font:500 13px/1.4 'Noto Sans KR',sans-serif;letter-spacing:0;color:#c8d0d3}
.theme-status{font:400 11px/1.4 'Noto Sans KR',sans-serif;letter-spacing:0;color:var(--muted)}
.theme-status.ready{color:var(--lime)}.theme-status.earned{color:#d7bd83}
.theme-entry .achievement-card{width:var(--recipe-result-width)}
.theme-row-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:18px}.theme-progress{display:flex;align-items:center;gap:14px;font-size:11px;color:#96a094}.theme-progress progress{width:128px;height:3px;border:none;appearance:none;background:#323931;border-radius:5px;overflow:hidden}.theme-progress progress::-webkit-progress-bar{background:#323931}.theme-progress progress::-webkit-progress-value{background:#bcdb9d}.theme-progress progress::-moz-progress-bar{background:#bcdb9d}.theme-progress b{color:#dfebd2;font-weight:500}.theme-actions{display:flex;gap:12px;align-items:center}.theme-actions .primary{width:auto;font-size:12px;padding:11px 20px;border-radius:7px;min-width:133px}.theme-actions .primary:disabled{background:#272d25;color:#879080;opacity:1}.theme-actions .secondary{font-size:11px;color:#959f94}
/* Achievement rewards use the existing card-v3 frame, with artwork only. */
.achievement-card.card-v3{max-width:none}
.achievement-card .card__art::after{content:none}
.sample-controls{margin-top:44px;border:1px dashed #384234;border-radius:10px;padding:18px 20px;background:#19201855}.sample-controls summary{cursor:pointer;font-size:12px;color:#a3b195}.sample-controls p{color:#7f8b81;font-size:11px;line-height:1.8;margin:10px 0 14px}.sample-controls .sample-states{display:flex;gap:8px;flex-wrap:wrap}.sample-states button{border:1px solid #424c3c;border-radius:6px;padding:9px 12px;font-size:11px;color:#b9c8ac}.sample-states button:hover{background:#293421}.sample-inventory{display:flex;gap:14px;flex-wrap:wrap;margin-top:17px}.sample-inventory label{font-size:11px;display:flex;align-items:center;gap:6px;color:#aeb8aa}.sample-inventory input{accent-color:var(--lime)}
.theme-empty{border:1px dashed #353d37;border-radius:12px;padding:55px 24px;text-align:center}.theme-empty h2{font-size:18px;margin-top:0}.theme-empty p{font-size:13px;line-height:1.9;color:var(--muted)}.theme-empty button{margin-top:12px;color:var(--lime);font-size:12px}
.achievement-shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,230px));gap:28px;margin-top:28px}.shelf-item{min-width:0}.shelf-item h2{font-size:15px;margin:17px 0 7px}.shelf-item p{font-size:11px;color:var(--muted);line-height:1.8;margin:0}.shelf-item .secondary{margin-top:12px;font-size:12px;color:var(--lime);padding:0}.collection-note{font-size:12px;color:#a0a999;line-height:1.9}.equipped-summary{border:1px solid #414836;border-radius:9px;background:#1b2117;padding:17px 20px;font-size:12px;color:#c3d6af;display:flex;justify-content:space-between;align-items:center;gap:12px}.equipped-summary button{font-size:11px;color:#a4b695}
/* Admin editor: existing submenu style, searchable multi-select, live reward. */
.theme-admin-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:26px 0 22px}.theme-admin-toolbar p{margin:0;font-size:12px;color:var(--muted)}.theme-admin-toolbar .primary{width:auto;font-size:12px;padding:12px 17px}.theme-admin-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}.theme-admin-list{border:1px solid #30373a;border-radius:10px;overflow:hidden}.theme-admin-list button{display:block;text-align:left;width:100%;padding:18px;font-size:13px;border-bottom:1px solid #30373a}.theme-admin-list button:last-child{border:0}.theme-admin-list button.selected{background:#252d20;box-shadow:inset 2px 0 var(--lime)}.theme-admin-list small{display:block;font-size:11px;color:#8e9888;margin-top:8px}.theme-admin-editor{border:1px solid #333b3d;border-radius:12px;padding:26px;background:#191d1f;min-width:0}.theme-admin-editor h2{font-size:18px;margin:0 0 26px;letter-spacing:-.5px}.theme-admin-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:28px;align-items:start}.form-field{display:block;margin-bottom:24px}.form-field>span,.picker-label{display:block;font-size:12px;font-weight:500;color:#ccd4ca;margin-bottom:10px}.form-field input:not([type=file]):not([type=checkbox]),.form-field select,.picker-filters input,.picker-filters select{width:100%;min-width:0;border:1px solid #384244;background:#131819;border-radius:7px;color:#e6eae4;padding:11px 12px;font-size:12px;line-height:1.5}.form-field small,.theme-admin-help{display:block;font-size:11px;color:#929c94;line-height:1.8;margin-top:8px}.form-field select{height:42px}.theme-admin-live{position:sticky;top:20px}.theme-admin-live>p{font-size:10px;color:#93a086;margin:0 0 12px}.theme-admin-live>small{display:block;text-align:center;color:#879180;font-size:10px;line-height:1.8;margin-top:12px}.image-upload{position:relative;display:block;padding:18px 14px;border:1px dashed #546347;border-radius:9px;background:#222a1d;text-align:center;cursor:pointer}.image-upload strong{font-size:12px;color:#c5d7b2;display:block;font-weight:500}.image-upload input{display:block;width:100%;font-size:11px;margin-top:12px;color:#9ca992}.upload-name{overflow-wrap:anywhere}.theme-admin-picker{margin-top:2px;border-top:1px solid #333b38;padding-top:22px}.picker-label{display:flex;justify-content:space-between;gap:10px}.picker-label small{font-weight:400;color:#8a9980}.selected-cards{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:16px;min-height:28px}.selected-cards button{display:flex;gap:8px;align-items:center;border:1px solid #46513c;background:#273020;border-radius:6px;padding:7px 10px;font-size:11px;color:#c3d6ae}.selected-cards p{font-size:11px;color:#8c9587;margin:0}.picker-filters{display:grid;grid-template-columns:minmax(0,1fr) 105px 105px;gap:8px}.picker-count{font-size:10px;color:#8b958e;margin:12px 0}.picker-results{max-height:310px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #313936;border-radius:8px}.picker-results button{display:flex;width:100%;align-items:center;gap:10px;text-align:left;padding:10px 12px;border-bottom:1px solid #2b332e;font-size:12px}.picker-results button:last-child{border-bottom:0}.picker-results button:hover{background:#252e22}.picker-results button[aria-pressed=true]{background:#252f20}.picker-results .picker-emoji{font-size:21px;width:28px;text-align:center}.picker-results button>span:nth-child(2){flex:1}.picker-results small{display:block;color:#8e9989;font-size:10px;margin-top:4px}.picker-results button>b{font-size:17px;color:#bad89d;font-weight:400}.picker-results>p{font-size:12px;color:var(--muted);padding:15px}.picker-more{display:block;margin:12px auto 0;color:#b5c4a7;font-size:11px}.theme-admin-save-bar{display:flex;gap:12px;align-items:center;margin-top:25px;padding-top:22px;border-top:1px solid #343b36}.theme-admin-save-bar .primary{width:auto;font-size:12px;padding:12px 22px}.theme-admin-save-bar .secondary{font-size:12px;color:#9ca594}.form-status{font-size:12px;line-height:1.7;color:#ffb4a0;margin:10px 0 0}
#theme-dialog{width:440px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);border:1px solid var(--line);border-radius:18px;padding:34px 28px 25px;background:var(--panel);color:var(--text);overflow-y:auto}#theme-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.dialog-close{position:absolute;right:12px;top:10px;font-size:23px;color:var(--muted);width:30px;height:30px}#dialog-content{--theme-reward-width:230px;text-align:center}#dialog-content h2{font-size:22px;letter-spacing:-.7px;margin:9px 0 7px}#dialog-content .dialog-intro{font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 22px}#dialog-content .achievement-card{max-width:252px;margin:20px auto 24px}#dialog-content>.card-v3{max-width:var(--theme-reward-width);margin:22px auto}#dialog-content .dialog-intro:has(+.achievement-card){margin-bottom:14px}#dialog-content .dialog-intro+.achievement-card{margin-top:14px}#dialog-content .primary{font-size:13px;padding:14px 18px;margin-top:10px}#dialog-content .secondary{font-size:12px;color:var(--muted);margin-top:17px}#dialog-content .theme-reward-title{margin:22px 0 8px}#dialog-content .theme-reward-title h3{font-size:13px;font-weight:500;color:var(--muted);margin:0}#dialog-content .theme-reward-title canvas{display:block;width:100%;max-width:var(--theme-reward-width);height:auto;margin:0 auto}#dialog-content .equipped-preview{margin:22px 0 8px;padding:22px;border:1px solid #4d543e;border-radius:10px;background:linear-gradient(135deg,#283020,#171d16)}.equipped-preview small{font-size:11px;color:#a6b38e}.equipped-preview strong{display:block;margin-top:10px;font-size:22px;letter-spacing:-1px;color:#eee4c8}
#theme-toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);z-index:20;max-width:calc(100vw - 32px);padding:14px 22px;border:1px solid #596648;border-radius:10px;background:#24301e;box-shadow:0 8px 35px #0007;color:#e1edcf;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}#theme-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1050px){.theme-admin-layout{grid-template-columns:180px minmax(0,1fr)}.theme-admin-editor-layout{grid-template-columns:minmax(0,1fr) 155px;gap:20px}.theme-admin-editor{padding:20px}.picker-filters{grid-template-columns:1fr 1fr}.picker-filters input{grid-column:1/-1}}
@media(max-width:760px){.preview-user{display:none}.theme-admin-layout{grid-template-columns:1fr}.theme-admin-list{display:flex;overflow:auto}.theme-admin-list button{min-width:170px;border:0}.theme-admin-list button.selected{box-shadow:inset 0 -2px var(--lime)}.theme-admin-editor-layout{grid-template-columns:minmax(0,1fr) 165px}}
@media(max-width:680px){.theme-status{font-size:10px}.material-state,.reward-caption{font-size:9px}.theme-row-footer{align-items:start;gap:12px}.theme-progress{gap:9px;flex-wrap:wrap;max-width:145px;line-height:1.7}.theme-progress progress{width:105px}.theme-actions{gap:8px;flex-direction:column;align-items:end}.theme-actions .primary{font-size:11px;padding:10px 14px;min-width:116px}.theme-actions .secondary{font-size:10px}.sample-controls{margin-top:30px;padding:15px}.sample-inventory{gap:12px}.sample-controls p{font-size:10px}.theme-admin-editor-layout{display:flex;flex-direction:column}.theme-admin-editor-fields{width:100%}.theme-admin-live{position:static;width:155px;margin:0 auto 8px;order:-1}.theme-admin-live>p{font-size:10px;text-align:center}.theme-admin-live>small{display:none}.theme-admin-editor{padding:18px}.theme-admin-toolbar p{font-size:11px}.theme-admin-editor h2{font-size:16px;margin-bottom:22px}.theme-admin-toolbar .primary{font-size:11px}.achievement-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.shelf-item h2{font-size:13px}.shelf-item p{font-size:10px}.equipped-summary{font-size:11px;padding:15px}.preview-banner>span{max-width:260px}}
@media(prefers-reduced-motion:reduce){.achievement-card,#theme-toast{transition:none}}

.theme-publish>span{display:flex;align-items:center;gap:8px}.theme-publish input[type=checkbox]{width:16px;height:16px;accent-color:var(--lime);margin:0}.picker-more[hidden]{display:none}.theme-admin-help{font-size:11px;line-height:1.8;color:#929c94}

.theme-background-preview{position:relative;aspect-ratio:54/83;width:100%;overflow:hidden;border:1px solid #384244;border-radius:12px;background:#101113}.theme-background-preview>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.theme-background-card-area{position:absolute;inset:16.27% 12.963%;bottom:16.27%;display:grid;place-items:center;border:1px dashed #abb4b8;border-radius:8%;background:#101113bf;color:#bfc6c9;font-size:10px;text-align:center}

/* login-ui.css */
/* One guest entry pattern across feature pages, with a compact form for public lists. */
.login-prompt{display:flex;flex-direction:column;align-items:center;gap:20px;width:100%;margin:0 0 24px;padding:40px 24px;border:1px solid var(--line);border-radius:16px;background:var(--panel);text-align:center}
.login-brand{display:grid;place-items:center;flex:none;width:48px;height:48px;border:1px solid #c8ff6924;border-radius:14px;background:#c8ff690c;color:var(--lime)}
.login-brand svg{display:block;width:30px;height:30px}
.login-prompt .login-prompt-copy h2{margin:0 0 8px;color:var(--text);font-size:20px;font-weight:600;line-height:1.5;letter-spacing:-.5px}
.login-prompt .login-prompt-copy p{max-width:480px;margin:0;color:var(--muted);font-size:13px;line-height:1.8;overflow-wrap:anywhere}
#app .login-start-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:260px;max-width:100%;min-height:48px;margin:0;padding:14px 20px;border:0;border-radius:8px;background:var(--lime);color:#171c11;font-size:14px;font-weight:700;line-height:1.4;text-align:center}
#app .login-start-button:hover:not(:disabled){background:#d8ff91}
#app .login-start-button:focus-visible{outline:2px solid var(--lime);outline-offset:4px}
.login-prompt--compact{flex-direction:row;gap:20px;padding:24px;text-align:left}
.login-prompt--compact .login-prompt-copy{flex:1;min-width:0}
.login-prompt--compact .login-prompt-copy h2{font-size:16px}
.auth-view>.login-brand{margin-bottom:20px}
@media(max-width:680px){.login-prompt{gap:20px;padding:32px 20px;margin-bottom:22px}.login-prompt .login-prompt-copy h2{font-size:18px}.login-prompt--compact{flex-direction:column;text-align:center}.login-prompt--compact .login-prompt-copy h2{font-size:18px}#app .login-prompt--compact .login-start-button{width:260px}}

/* banner-placeholders.css */
/* Reserved banners stay outside the working area and never cover controls. */
.ad-placeholder{display:flex;align-items:center;justify-content:center;padding:20px;border:1px dashed var(--line);border-radius:12px;background:rgba(255,255,255,.02);color:var(--muted);text-align:center;font-size:13px;line-height:1.8}
.ad-placeholder span{max-width:190px}
main.has-banner-rail{min-height:max(calc(100vh - 181px),var(--page-banner-min-height))}
.page-banner-rail{position:absolute;width:250px;display:grid;gap:20px}
.page-banner-rail .ad-placeholder{width:250px;height:250px}
.page-banner-bottom{display:flex;justify-content:center;clear:both;margin-top:32px;padding-top:24px;border-top:1px solid var(--line)}
.page-banner-bottom .ad-placeholder{width:min(320px,100%);height:100px}
.page-banner-rail[hidden],.page-banner-bottom[hidden]{display:none}
@media(max-width:680px){.ad-placeholder span{max-width:none}}
/* Compact list pages leave a real right-hand lane for two desktop banners. */
@media(min-width:1024px){
 #app>:is(.quest-page,.mail-page,.hall-page){
  max-width:min(820px,calc(90vw - 282px));
  margin-left:max(0px,calc((100% - 1102px)/2));
  margin-right:0;
 }
}

/* standard-filter.css */
/* standard filter: 1x4 desktop, 2x2 mobile, compact bottom dock after scrolling. */
:root{--standard-filter-bg:#1c1c1c}
.standard-filter{position:relative;z-index:10;height:56px;margin:0;pointer-events:none}
.standard-filter-anchor{height:1px;margin-top:25px;margin-bottom:-1px;pointer-events:none}
.standard-filter__controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:1000px;padding:4px 0;background:var(--bg);pointer-events:auto}
.standard-filter .standard-filter__trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;min-height:48px;padding:5px 14px;border:1px solid #34383d;border-radius:10px;background:var(--standard-filter-bg);color:var(--muted);text-align:left;font:inherit;font-size:11px;font-weight:600;line-height:1.35;cursor:pointer}
.standard-filter .standard-filter__trigger.is-filtered{border-color:#8b8b8b;background:var(--standard-filter-bg)}
.standard-filter__trigger.is-filtered .standard-filter__value{color:var(--text)}
.standard-filter__trigger.is-filtered .standard-filter__chevron{color:var(--lime)}
.standard-filter__current{display:flex;flex-direction:column;gap:4px;min-width:0}
.standard-filter__kind{color:var(--muted);font-size:10px;font-weight:400;line-height:1.4}
.standard-filter__value{display:flex;align-items:center;gap:7px;min-width:0;color:var(--muted);font-size:11px;font-weight:600;line-height:1.35}
.standard-filter__value>span:last-child{display:block;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.standard-filter__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:14px;height:14px;color:var(--filter-icon)}
.standard-filter__icon svg{display:block;width:100%;height:100%}
.standard-filter__chevron{flex:none;width:14px;height:14px;color:var(--muted)}
.standard-filter__trigger:focus-visible,.standard-filter__option:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
dialog.standard-filter-dialog{width:460px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:28px 20px 20px;overflow-y:auto;background:var(--standard-filter-bg);border-color:#454545}
.standard-filter-dialog>#modal-body,.standard-filter__popup,.standard-filter__popup .standard-filter__header{background:var(--standard-filter-bg)}
.standard-filter__popup h2{margin:6px 0 0;font-size:19px;font-weight:600;line-height:1.4}
.standard-filter__popup .eyebrow{font-size:10px;margin:0;color:var(--lime)}
.standard-filter__popup .standard-filter__hint{margin:10px 0 18px;font-size:10px;line-height:1.55;color:var(--muted)}
.standard-filter__options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.standard-filter__option{display:flex;align-items:center;gap:8px;min-width:0;min-height:48px;padding:11px 12px;border:1px solid #34383d;border-radius:9px;background:var(--standard-filter-bg);color:var(--muted);text-align:left;font:inherit;font-size:11px;font-weight:600;line-height:1.35;cursor:pointer}
.standard-filter__option.selected{border-color:#8b8b8b;background:var(--standard-filter-bg);color:var(--text)}
.standard-filter__option:disabled{opacity:.4;cursor:not-allowed}
.standard-filter__option-label{display:flex;align-items:center;gap:7px;min-width:0;flex:1}
.standard-filter__option-label>span:last-child{display:flex;flex-direction:column;gap:4px;line-height:14px;word-break:keep-all;overflow-wrap:anywhere}
.standard-filter__option small{color:var(--muted);font-size:9px;font-weight:400;line-height:1.55;white-space:nowrap}
.standard-filter__check{width:14px;height:14px;flex:none;color:var(--lime)}
.standard-filter__option:not(.selected) .standard-filter__icon,.standard-filter__trigger:not(.is-filtered) .standard-filter__icon{opacity:.65}
.standard-filter.is-stuck .standard-filter__controls{position:fixed;left:var(--standard-filter-left);bottom:0;width:var(--standard-filter-width);padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 14px -12px #000d}
.standard-filter.is-stuck .standard-filter__kind{display:none}
.standard-filter.is-stuck .standard-filter__current{gap:0}
.standard-filter.is-stuck .standard-filter__trigger{min-height:44px;padding:8px 14px}
.standard-filter-results{padding-bottom:calc(60px + env(safe-area-inset-bottom,0px))}
@media(max-width:680px){.standard-filter{height:112px}.standard-filter__controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}dialog.standard-filter-dialog{padding:28px 16px 16px}.standard-filter-results{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}}

/* Keep the sheet header and close button visible while choices scroll. */
.standard-filter__popup .standard-filter__header{display:block;position:relative;height:auto;padding:0;border:0}
.standard-filter__grip{display:none}
dialog.standard-filter-dialog>.close{display:grid;place-items:center;width:44px;height:44px;top:4px;right:8px;padding:0;z-index:1}
@media(max-width:680px){
 dialog.standard-filter-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:85dvh;margin:0;border-radius:20px 20px 0 0;padding:0 20px calc(20px + env(safe-area-inset-bottom,0px));overflow:hidden;transform:translateY(var(--standard-filter-drag,0px))}
 dialog.standard-filter-dialog[open]{animation:standard-filter-sheet-in .22s ease-out}
 dialog.standard-filter-dialog>#modal-body{min-height:0}
 .standard-filter__popup{display:flex;flex-direction:column;max-height:calc(85dvh - 22px - env(safe-area-inset-bottom,0px))}
 .standard-filter__popup .standard-filter__header{flex:none;padding:34px 38px 0 0;touch-action:none;user-select:none}
 .standard-filter__grip{display:block;position:absolute;top:12px;left:calc(50% - 18px);width:36px;height:4px;border-radius:10px;background:#626970}
 .standard-filter__popup .standard-filter__hint{flex:none}
 .standard-filter__options{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:3px;margin:-3px;-webkit-overflow-scrolling:touch}
 dialog.standard-filter-dialog>.close{top:22px;right:12px}
}
@keyframes standard-filter-sheet-in{from{transform:translateY(100%)}to{transform:translateY(0)}}

/* Keep every interaction state on the same opaque surface; emphasize borders and text. */
.standard-filter .standard-filter__trigger:hover,.standard-filter .standard-filter__trigger:active,.standard-filter .standard-filter__trigger:focus-visible,dialog.standard-filter-dialog .standard-filter__option:hover,dialog.standard-filter-dialog .standard-filter__option:active,dialog.standard-filter-dialog .standard-filter__option:focus-visible{background:var(--standard-filter-bg)}
.standard-filter__trigger,.standard-filter__option{-webkit-tap-highlight-color:transparent}

/* dungeon-play/scenario/formation-filter.css */
/* Preparation uses three standard filter fields in normal flow, without a second bottom dock. */
.formation-standard-filter{height:auto;margin:0 0 18px;--lime:var(--accent,#c8ff69)}
.formation-standard-filter .standard-filter__controls{grid-template-columns:repeat(3,minmax(0,1fr))}
.formation-standard-filter .standard-filter__trigger{border-color:#454545}
.formation-standard-filter .standard-filter__trigger.is-filtered{border-color:#8b8b8b}
dialog.formation-filter-dialog{position:fixed;inset:var(--formation-filter-top,16px) 0 auto;margin:0 auto;max-height:var(--formation-filter-max-height,85dvh);border:1px solid #454545;border-radius:16px;background:var(--standard-filter-bg);color:var(--text);box-shadow:0 24px 80px #0008;--lime:var(--accent,#c8ff69)}
dialog.formation-filter-dialog::backdrop{background:#08090bc9;backdrop-filter:blur(5px)}
dialog.formation-filter-dialog>.close{position:absolute;border:0;background:transparent;color:#bcbcbc;border-radius:0}
dialog.formation-filter-dialog>.close svg{display:block;width:16px;height:16px;pointer-events:none}
.formation-filter-dialog .standard-filter__option{border-color:#454545}
.formation-filter-dialog .standard-filter__option.selected{border-color:#8b8b8b}
.formation-filter-dialog .standard-filter__grip{background:#696969}
@media(max-width:680px){
 .formation-standard-filter .standard-filter__trigger{gap:5px;padding-inline:8px}
 .formation-standard-filter .standard-filter__value{gap:5px}
 .formation-standard-filter .standard-filter__chevron{width:12px;height:12px}
 dialog.formation-filter-dialog{inset:auto 0 var(--formation-filter-bottom,0px);margin:0;border-radius:20px 20px 0 0}
 .formation-filter-dialog .standard-filter__popup{max-height:calc(var(--formation-filter-max-height,85dvh) - 20px - env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){dialog.formation-filter-dialog[open]{animation:none}}

/* A host page may have a tall global header; popup headers keep their content height. */
.formation-filter-dialog .standard-filter__header{height:auto;min-height:0}

/* card-growth.css */
/* Collection balance and growth inside the existing card detail scene. */
.collection-heading-row{position:relative;margin-bottom:32px}.collection-heading-row>.page-intro{margin-bottom:0}.collection-heading-row:has(.collection-growth-balance) h1{padding-right:230px}.collection-growth-balance{position:absolute;right:0;top:8px;min-width:192px;padding:14px 18px;border:1px solid #c8ff692b;border-radius:12px;background:#c8ff6905}.collection-growth-balance>span{display:flex;align-items:center;gap:7px;color:#a6af9b;font-size:12px}.collection-growth-balance svg{width:17px;height:17px;color:var(--lime)}.collection-growth-balance strong{display:block;margin-top:7px;font-size:25px;font-variant-numeric:tabular-nums;color:var(--lime);letter-spacing:-.6px}
.card-detail-reveal .card-detail-actions{flex-direction:row;gap:12px}.card-detail-reveal .card-detail-actions>button{width:160px;min-height:48px;padding:12px 20px;border-radius:9px;font-size:14px}.card-detail-reveal .card-detail-actions .card-growth-trigger{border:1px solid #c8ff6970;background:#c8ff690b;color:var(--lime)}.card-detail-reveal .card-growth-trigger:hover,.card-detail-reveal .card-growth-trigger[aria-expanded=true]{background:#c8ff6920;border-color:var(--lime)}
.card-detail-growth[hidden]{display:none}.card-detail-growth{position:relative;z-index:6;min-width:0;border:1px solid #ffffff20;border-radius:18px;background:#13151bee;box-shadow:0 16px 64px #0005;padding:26px;backdrop-filter:blur(20px);color:#f2f3ee;align-self:center;overflow:auto;max-height:100%;scrollbar-width:thin}.growth-detail-heading{display:flex;align-items:center;gap:12px}.growth-mark{display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid #c8ff6930;background:#c8ff690b;border-radius:12px;color:var(--lime)}.growth-mark svg{width:24px;height:24px}.growth-detail-heading p{margin:0 0 4px;font-size:11px;color:#9ea6a0}.card-detail-growth h2{font-size:23px;line-height:1.2;margin:0;letter-spacing:-.6px}.card-detail-growth h2:focus{outline:none}.growth-card-caption{font-size:13px;margin:16px 0 24px;line-height:1.5;color:#e0e4de;overflow-wrap:anywhere}.growth-card-caption span{color:#9ca09b;font-size:12px}.growth-level{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#a2a69f}.growth-level strong{font-size:20px;color:#f2f3ee;font-variant-numeric:tabular-nums}.growth-level i,.growth-power i{margin:0 8px;font-style:normal;font-size:16px;color:#666f67}.growth-level em{font-style:normal;color:var(--lime)}.growth-level-track{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;list-style:none;padding:0;margin:16px 0 24px}.growth-level-track li{position:relative;height:6px;background:#ffffff10;border-radius:3px}.growth-level-track li.reached{background:#c8ff6966}.growth-level-track li.current{background:var(--lime);box-shadow:0 0 12px #c8ff6930}.growth-level-track span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.growth-power{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #ffffff12;padding-top:21px;font-size:13px;color:#b2b8ae}.growth-power>div{display:flex;align-items:center}.growth-power strong{font-size:29px;color:#f2f3ee;letter-spacing:-.8px;font-variant-numeric:tabular-nums}.growth-power .growth-next{color:var(--lime)}.growth-power b{margin-left:9px;padding:4px 6px;border-radius:5px;background:#c8ff6910;color:var(--lime);font-size:11px}.growth-rules{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:19px 0 22px}.growth-rules>div{border-left:2px solid #ffffff13;padding-left:10px}.growth-rules dt{font-size:11px;color:#90988e;margin-bottom:6px}.growth-rules dd{margin:0;color:#dfe4da;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.growth-points{border:1px solid #ffffff10;background:#ffffff03;border-radius:10px;padding:13px 14px}.growth-points>div{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#9ca596;line-height:1.5}.growth-points>div+div{margin-top:10px;color:#d8ddd4;font-size:12px}.growth-points b,.growth-points strong{font-size:13px;font-variant-numeric:tabular-nums;color:#e4e9de}.growth-points>p{margin:11px 0 0;padding-top:10px;border-top:1px solid #ffffff10;font-size:11px;line-height:1.5;color:#8f9988;text-align:right}.growth-points>p b{font-size:11px;color:#aebfa1}.card-detail-growth .growth-submit{width:100%;margin-top:18px;min-height:48px;padding:12px;border-radius:9px;font-size:14px}.growth-submit:disabled{opacity:.45;cursor:default}.growth-save-note{margin:12px 0 0;color:#7e877a;text-align:center;font-size:11px;line-height:1.6}.growth-pending-note{font-size:12px;line-height:1.5;color:#becfae}.growth-retry{margin-top:14px;color:var(--lime);font-size:13px}.growth-empty p{font-size:13px;line-height:1.6;color:#aeb8a4}
@media(min-width:761px){.card-detail-reveal.growth-visible{grid-template-columns:minmax(0,1fr) 352px;grid-template-rows:auto minmax(180px,1fr) max-content max-content;column-gap:64px;padding-left:max(32px,calc((100vw - 1080px)/2));padding-right:max(32px,calc((100vw - 1080px)/2))}.growth-visible .pack-reveal-top{grid-column:1/-1;grid-row:1}.growth-visible .pack-reveal-stage{grid-column:1;grid-row:2}.growth-visible .pack-reveal-info{grid-column:1;grid-row:3}.growth-visible .pack-reveal-bottom{grid-column:1/-1;grid-row:4}.growth-visible .card-detail-growth{grid-column:2;grid-row:2/4;margin:16px 0;max-height:calc(100% - 32px)}}
@media(max-width:760px){.collection-heading-row{margin-bottom:22px}.collection-heading-row:has(.collection-growth-balance) h1{padding-right:142px}.collection-growth-balance{min-width:0;width:124px;padding:11px 12px;top:6px}.collection-growth-balance>span{font-size:10px;gap:4px}.collection-growth-balance svg{width:14px;height:14px}.collection-growth-balance strong{font-size:21px;margin-top:6px}.card-detail-reveal .card-detail-actions{padding:12px 20px max(16px,env(safe-area-inset-bottom));gap:10px}.card-detail-reveal .card-detail-actions>button{width:144px;max-width:144px;min-width:0;flex:1;font-size:13px}.card-detail-reveal.growth-visible{grid-template-columns:minmax(0,1fr);grid-template-rows:52px minmax(110px,1fr) max-content max-content;overflow-y:auto}.growth-visible .pack-reveal-top{grid-column:1;grid-row:1;min-height:52px}.growth-visible .pack-reveal-stage{grid-column:1;grid-row:2}.growth-visible .pack-reveal-info{display:none}.growth-visible .card-detail-growth{grid-column:1;grid-row:3;margin:0 14px;padding:18px 20px;border-radius:14px;max-height:none}.growth-visible .pack-reveal-bottom{grid-column:1;grid-row:4}.growth-visible .growth-detail-heading p{display:none}.growth-visible .growth-mark{width:32px;height:32px;border-radius:9px}.growth-visible .growth-mark svg{width:20px;height:20px}.growth-visible h2{font-size:20px}.growth-visible .growth-card-caption{margin:10px 0 16px;font-size:12px}.growth-visible .growth-level strong{font-size:18px}.growth-visible .growth-level-track{margin:12px 0 16px}.growth-visible .growth-power{padding-top:14px}.growth-visible .growth-power strong{font-size:25px}.growth-visible .growth-rules{margin:14px 0 16px}.growth-visible .growth-points{padding:10px 12px}.growth-visible .growth-submit{margin-top:14px;min-height:44px}.growth-visible .growth-save-note{margin-top:9px;font-size:10px}}
@media(max-height:640px){.card-detail-reveal.growth-visible{overflow-y:auto}.card-detail-growth{align-self:start;margin-top:12px}.growth-visible .growth-save-note{margin-bottom:0}}

.growth-copy-picker{margin:22px 0;padding:0;border:0;display:flex;gap:8px;flex-wrap:wrap}.growth-copy-picker legend{font-size:12px;color:#a2a69f;margin-bottom:10px}.growth-copy-picker button{padding:9px 12px;border:1px solid #ffffff20;border-radius:8px;color:#b2b8ae;font-size:12px;background:transparent}.growth-copy-picker button[aria-pressed="true"]{border-color:var(--lime);color:var(--lime);background:#c8ff6910}.growth-points{margin-top:22px}.growth-points .growth-point-change{display:flex;justify-content:flex-end;align-items:center;gap:10px;font-size:15px}.growth-point-change i{font-style:normal;color:#70796b}.growth-points .growth-point-change strong,.growth-points .growth-point-change b{font-size:15px}.growth-points .growth-point-change strong{color:var(--lime)}

.trade-copy-choice{display:block;font-size:12px;margin:16px 0;color:#a2a69f}.trade-copy-choice select{display:block;width:100%;margin-top:8px;padding:12px;border-radius:8px;border:1px solid #ffffff26;background:#151820;color:#eef0e9}

.growth-detail-heading{margin-bottom:20px}.growth-copy-picker{max-height:112px;overflow-y:auto}

/* card-locks.css */
.card-detail-reveal .card-lock-toggle{position:relative;flex:none;width:34px;height:34px;display:grid;place-items:center;padding:6px;border:1px solid #ffffff40;border-radius:50%;background:#171a20dc;color:#dde0e5;z-index:20;cursor:pointer;box-shadow:0 2px 10px #0003}.card-detail-reveal .pack-reveal-top>span{align-items:center}.card-detail-reveal .card-lock-toggle svg{width:20px;height:20px}.card-detail-reveal .card-lock-toggle[aria-pressed="true"]{color:var(--lime,#c8ff69);border-color:currentColor}.card-detail-reveal .card-lock-toggle:disabled{opacity:.55;cursor:wait}.card-detail-reveal .card-lock-toggle:focus-visible{outline:2px solid var(--lime,#c8ff69);outline-offset:3px}.card-lock-error{font-size:12px;color:#eaa99e;max-width:350px;margin:6px auto 0}.card-lock-error:empty{display:none}.recipe-entry{scroll-margin-top:100px}.recipe-entry:focus{outline:2px solid var(--lime,#c8ff69);outline-offset:4px}

/* tower-play/style.css */
.tower-root{--mobile-sheet-bg:#1c1c1c;--gold:#dfc58d;--accent:var(--lime,#c8ff69);font-family:'DM Sans','Noto Sans KR',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;line-height:1.8;min-width:0;padding-bottom:var(--bottom-sheet-reserved-height,0px)}
.tower-root *{box-sizing:border-box}.tower-root .icon,.tower-dialog .icon{width:18px;height:18px;vertical-align:middle;flex:none}.tower-root button{font-family:inherit;line-height:1.4;cursor:pointer}.tower-root button:disabled{opacity:.4;cursor:not-allowed}.tower-root button:focus-visible,.tower-root input:focus-visible,.tower-dialog button:focus-visible{outline:2px solid var(--accent,#c8ff69);outline-offset:4px}.tower-root h2,.tower-root h3,.tower-root p{margin:0}.tower-root h3{font-size:14px;font-weight:600}.tower-root .tower-kicker,.tower-dialog .tower-kicker{font-size:9px;letter-spacing:1.8px;color:var(--gold,#dfc58d);font-weight:600;line-height:1.6;margin:0 0 10px}.tower-primary,.tower-secondary{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:13px 20px;border:1px solid var(--line,#2a2d31);border-radius:8px;min-height:44px;font-size:12px;font-weight:600;color:var(--text,#f2f3ee);background:#1c1c1c}.tower-primary{background:var(--accent,#c8ff69);color:#101113;border-color:var(--accent,#c8ff69)}.tower-primary:hover:not(:disabled){filter:brightness(1.08)}.tower-secondary:hover:not(:disabled){border-color:#777}.tower-text{border:0;background:none;color:var(--muted);font-size:11px;padding:8px}.tower-panel{border:1px solid var(--line);border-radius:12px;padding:24px;background:var(--panel);min-width:0}.tower-note{font-size:11px;color:var(--muted);line-height:1.8}.tower-preview-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px;padding:10px 14px;border:1px dashed #48463e;border-radius:8px;font-size:11px;color:var(--gold)}.tower-preview-bar>span{display:flex;align-items:center;gap:7px}.tower-preview-bar i{height:5px;width:5px;background:var(--gold);border-radius:50%}.tower-preview-bar small{font-size:10px;color:var(--muted);padding-left:7px;border-left:1px solid var(--line)}.tower-preview-bar>div{display:flex;gap:6px}.tower-preview-bar button{padding:5px 8px;font-size:10px;color:var(--muted);background:#1c1c1c;border:1px solid var(--line);border-radius:4px}.tower-hero{position:relative;display:grid;grid-template-columns:1.1fr 1fr;min-height:410px;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--panel)}.tower-hero-copy{position:relative;z-index:1;padding:45px 0 40px 42px}.tower-hero-copy h2{font-size:clamp(30px,3.3vw,46px);line-height:1.35;letter-spacing:-1.8px;font-weight:600;margin-bottom:18px}.tower-hero-copy>p:not(.tower-kicker){font-size:12px;color:var(--muted);line-height:1.9}.tower-hero-tags{display:flex;gap:16px;font-size:10px;color:#c5c7ca;margin:23px 0 26px}.tower-hero-tags>span{display:flex;align-items:center;gap:7px}.tower-hero-tags .icon{width:15px;height:15px;color:var(--gold)}.tower-hero-copy>.tower-primary{min-width:260px}.tower-hero-copy>small{display:block;font-size:10px;color:var(--muted);margin-top:12px}.tower-drawing{position:relative;align-self:stretch;min-height:380px;overflow:hidden;background:radial-gradient(ellipse at 55% 50%,#b2a48310,transparent 68%)}.tower-drawing:after{content:'';position:absolute;inset:auto 0 0;height:75px;background:linear-gradient(transparent,#191b1e);z-index:9}.tower-moon{position:absolute;width:200px;height:200px;left:50%;top:30px;transform:translateX(-50%);border-radius:50%;background:#ded0a409;border:1px solid #a5997820;box-shadow:0 0 0 22px #ded0a403,0 0 0 65px #ded0a403}.tower-storey{position:absolute;bottom:calc(37px + var(--level)*45px);left:50%;transform:translateX(-50%);width:calc(150px - var(--level)*8px);height:47px;border:1px solid #8c806452;background:linear-gradient(90deg,#23252a,#2b2b2b 50%,#1f2125);display:flex;gap:17px;justify-content:center;align-items:center;z-index:calc(8 - var(--level));box-shadow:0 7px 0 -4px #121315,0 -5px 0 -3px #a3977845}.tower-storey:before{content:'';position:absolute;inset:-10px -7px auto;height:11px;background:repeating-linear-gradient(90deg,#4b473b 0 10px,#181a1e 10px 19px);border-bottom:2px solid #786c4b50}.tower-storey i{width:7px;height:16px;border-radius:7px 7px 0 0;background:#dec28925;box-shadow:0 0 10px #e3d29d0b;border:1px solid #7a70574f}.tower-storey:nth-last-of-type(3) i{background:#c8ff6940}.tower-door{position:absolute;left:50%;bottom:33px;transform:translateX(-50%);width:31px;height:45px;background:#111215;border:2px solid #c0a46d60;border-radius:20px 20px 0 0;z-index:10;box-shadow:inset 0 0 16px #d5bd7c15}.tower-stairs{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:200px;height:36px;background:repeating-linear-gradient(0deg,#6d65522b 0 2px,#16181d 2px 9px);clip-path:polygon(35% 0,65% 0,100% 100%,0 100%);z-index:10}.tower-drawing>span{position:absolute;bottom:15px;right:25px;writing-mode:vertical-rl;letter-spacing:4px;font-size:8px;color:#807865}.tower-lobby-bottom{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.tower-lobby-bottom h3{font-size:18px;letter-spacing:-.5px;margin-bottom:22px}.tower-rewards{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.tower-reward{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:7px;background:#141619;padding:13px 14px;font-size:11px;min-width:150px}.tower-reward>.icon{color:var(--gold);width:18px;height:18px}.tower-reward>b{margin-left:auto;font-size:16px;font-weight:500;color:var(--accent)}.tower-lobby-bottom .tower-note{margin-top:19px}.tower-how ol{list-style:none;padding:0;margin:0;counter-reset:how;display:grid;gap:15px}.tower-how li{display:grid;grid-template-columns:24px 1fr;gap:4px 12px;counter-increment:how}.tower-how li:before{content:'0'counter(how);grid-row:1 / 3;color:var(--gold);font-size:10px;padding-top:2px}.tower-how b{font-size:12px;font-weight:500}.tower-how li>span{font-size:11px;color:var(--muted);line-height:1.6}.tower-preview-note{margin-top:18px!important;color:var(--muted);font-size:10px;line-height:1.8}
.tower-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.tower-section-head h2{font-size:24px;letter-spacing:-.8px}.tower-section-head p{color:var(--muted);font-size:11px;margin-top:8px}.tower-section-head>span{font-size:10px;color:var(--muted)}.tower-picked{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:24px 0}.tower-picked>button{display:grid;justify-items:center;gap:8px;padding:14px 4px;background:var(--panel);border:1px solid var(--line);border-radius:9px;color:var(--text);min-width:0}.tower-picked>button>span{font-size:30px}.tower-picked b{font-size:11px;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.tower-picked small{font-size:9px;color:var(--muted)}.tower-picker-tools{display:flex;gap:8px;margin:22px 0}.tower-picker-tools label{flex:1;min-width:0}.tower-picker-tools input{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font:inherit;font-size:14px}.tower-picker-tools button{font-size:11px;white-space:nowrap}.tower-picker-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}.tower-pick{min-width:0;background:none;border:1px solid transparent;border-radius:10px;padding:5px;color:var(--text);text-align:left}.tower-pick.selected{border-color:var(--accent)}.tower-pick .card-v3{width:100%;max-width:none}.tower-pick-meta{display:flex;justify-content:space-between;gap:3px;font-size:9px;padding:12px 1px}.tower-pick-meta>span:last-child{color:var(--muted)}.tower-pick.selected .tower-pick-meta>span:last-child{color:var(--accent)}.tower-formation-footer{position:sticky;bottom:0;z-index:4;background:#1c1c1c;border:1px solid var(--line);border-radius:10px;padding:14px 18px;margin-top:24px;display:flex;align-items:center;justify-content:space-between;gap:12px}.tower-formation-footer>span{font-size:12px;color:var(--muted)}.tower-formation-footer b{margin-left:8px;color:var(--accent)}.tower-empty{text-align:center;padding:50px;color:var(--muted)}
.tower-run-heading{display:flex;justify-content:space-between;align-items:center;margin:25px 0 22px;gap:12px}.tower-run-heading h2{font-size:38px;line-height:1.2;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-1px}.tower-run-heading h2>span{font-size:20px;margin-left:5px}.tower-run-heading h2>small{font-size:12px;font-weight:400;letter-spacing:0;color:var(--muted);margin-left:12px}.tower-run-meta{display:flex;align-items:center;gap:16px}.tower-run-meta>span{color:var(--muted);font-size:11px}.tower-run-meta button{font-size:11px}.tower-run-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:24px;align-items:start}.tower-path{padding:22px 18px;position:sticky;top:20px}.tower-path h3{margin:0 0 24px;font-size:14px}.tower-floor-path{display:grid;gap:0}.tower-floor-path>div{display:flex;align-items:center;gap:13px;position:relative;height:45px;color:#73777f;font-size:11px}.tower-floor-path>div:not(:last-child):after{content:'';position:absolute;width:1px;left:13px;height:18px;bottom:-6px;background:var(--line)}.tower-floor-path i{display:grid;place-items:center;font-style:normal;width:27px;height:27px;border:1px solid var(--line);border-radius:50%;font-size:9px;background:var(--panel)}.tower-floor-path .icon{width:14px;height:14px}.tower-floor-path small{display:block;font-size:8px;margin-top:4px}.tower-floor-path .current{color:var(--accent)}.tower-floor-path .current>i{border-color:var(--accent);box-shadow:0 0 0 4px #c8ff6907}.tower-floor-path .current>b{margin-left:auto;font-size:7px;letter-spacing:1px}.tower-floor-path .done{color:#bfc4bc}.tower-floor-path>.boss{color:var(--gold)}.tower-floor-path>.boss i{border-color:#dfc58d60;border-radius:6px}.tower-path-foot{border-top:1px solid var(--line);margin-top:20px;padding-top:16px;display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.tower-path-foot b{color:var(--gold);font-weight:500}.tower-battle-main{min-width:0}.tower-battlefield{margin-bottom:20px}.tower-battlefield>.tower-section-head h3{font-size:12px;font-weight:400;color:#b3b6bc}.tower-enemies{display:grid;grid-template-columns:repeat(var(--enemy-count),minmax(0,1fr));gap:12px}.tower-monster{border:1px solid var(--line);border-radius:11px;background:var(--panel);color:var(--text);padding:13px;min-width:0;overflow:hidden;text-align:left;position:relative;transition:border-color .15s,opacity .15s}.tower-monster.selected{border-color:var(--accent)}.tower-monster.boss{border-color:#8b7450}.tower-monster.boss.selected{border-color:var(--accent)}.tower-enemy-top{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:8px;color:var(--muted)}.tower-enemy-top>span{letter-spacing:1px}.tower-enemy-top i{font-style:normal;font-size:9px;color:var(--muted)}.tower-monster.selected .tower-enemy-top i{color:var(--accent)}.tower-monster.boss .tower-enemy-top>span{color:var(--gold)}.tower-monster-art{height:auto;aspect-ratio:1.42;width:100%;margin:9px auto 0;background-image:var(--monster-sheet,url('/tower-play/assets/bestiary-safe.webp'));background-size:400% 200%;background-position:var(--sprite-x) var(--sprite-y);background-repeat:no-repeat;/* preserve square atlas sampling */aspect-ratio:1}.tower-monster h3{font-size:13px;margin:2px 0 14px;line-height:1.5;letter-spacing:-.2px}.tower-enemy-hp>span{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);gap:6px}.tower-enemy-hp b{color:#d9d7cf;font-size:10px;font-weight:500;font-variant-numeric:tabular-nums}.tower-track{height:4px;background:#2a2d31;overflow:hidden;border-radius:4px;margin-top:8px}.tower-track>i{display:block;height:100%;background:var(--accent);transition:width .2s}.tower-monster .tower-track>i{background:#b7ac91}.tower-monster.boss .tower-track>i{background:#dfb97d}.tower-enemy-affinity{display:flex;justify-content:space-between;align-items:center;gap:5px;margin:12px 0;color:var(--muted);font-size:9px}.tower-enemy-affinity>span:first-child{display:flex;align-items:center;gap:5px}.tower-enemy-affinity .icon{width:13px;height:13px;color:var(--gold)}.tower-intent{display:flex;align-items:center;gap:6px;background:#141619;border:1px solid var(--line);border-radius:5px;padding:9px 10px;font-size:10px;color:#b6bec9}.tower-intent .icon{height:13px;width:13px}.tower-intent>b{margin-left:auto;font-weight:500}.tower-intent.attack{color:#e5a799}.tower-monster.defeated{filter:grayscale(1);opacity:.35}.tower-field-note{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:10px;margin-top:13px!important;line-height:1.7}.tower-field-note .icon{width:14px;height:14px}.tower-team{padding:20px;margin-top:20px}.tower-team-status{display:flex;align-items:center;gap:25px;padding-bottom:20px;margin-bottom:18px;border-bottom:1px solid var(--line)}.tower-team-status>div{flex:1;position:relative}.tower-team-status>div>span{font-size:10px;color:var(--muted)}.tower-team-status strong{float:right;font-size:17px;line-height:1;font-weight:500}.tower-team-status strong small{font-size:10px;color:var(--muted)}.tower-team-status .tower-track{margin-top:12px}.tower-shield{display:flex;align-items:center;gap:6px;font-size:10px;color:#b7bdc8}.tower-shield b{font-weight:500;font-size:14px;margin-left:3px}.tower-team .tower-section-head{margin-bottom:14px}.tower-team .tower-section-head h3{font-size:11px}.tower-team .tower-section-head>span{font-size:9px}.tower-hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.tower-hand-card{background:none;border:1px solid transparent;border-radius:8px;padding:3px;color:var(--text);min-width:0;text-align:left}.tower-hand-card.selected{border-color:var(--accent)}.tower-hand-card .card-v3{width:100%;max-width:none;border-radius:6px;pointer-events:none}.tower-hand-card .card__desc,.tower-hand-card .card__panel{display:none}.tower-hand-card .card__bottom{padding-bottom:8px}.tower-hand-meta{display:grid;justify-items:center;gap:7px;padding:10px 0 5px}.tower-hand-meta>b{font-size:8px;font-weight:400;color:var(--muted)}.tower-energy{display:inline-flex;gap:3px}.tower-energy>i{width:5px;height:9px;transform:skew(-12deg);border:1px solid #666a6e;border-radius:1px}.tower-energy>i.full{background:var(--accent);border-color:var(--accent)}
.tower-command{background:#1c1c1c;border:1px solid var(--line);border-radius:10px;padding:20px;margin-top:16px}.tower-command .bottom-sheet-handle{display:none}.tower-command-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px;background:#1c1c1c}.tower-command-summary>span{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.tower-command-summary b{font-size:12px}.tower-command-summary small{color:var(--muted);font-size:10px}.tower-command-summary>.tower-text{display:none}.tower-action-list{display:flex;gap:8px;flex-wrap:wrap}.tower-action-list>button{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 13px;border:1px solid #3c3e40;border-radius:6px;background:#1c1c1c;color:var(--muted);font-size:11px}.tower-action-list .icon{width:15px;height:15px}.tower-action-list>button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}.tower-action-description{font-size:10px;line-height:1.8;color:var(--muted);margin-top:12px!important}.tower-command-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:16px;margin-top:16px;background:#1c1c1c}.tower-command-footer>span{display:grid;gap:5px;min-width:0}.tower-command-footer small{font-size:9px;color:var(--muted)}.tower-command-footer b{font-size:11px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.tower-command-footer .tower-primary{min-width:165px;font-size:12px}.tower-ledger{display:flex;flex-wrap:wrap;gap:10px 22px;font-size:10px;color:var(--muted);padding:20px 0;border-bottom:1px solid var(--line)}.tower-ledger b{color:var(--text);font-weight:500;margin-left:7px}.tower-combat-log{padding:18px 0;font-size:10px;color:var(--muted);line-height:1.9}.tower-combat-log summary{cursor:pointer}.tower-combat-log ol{padding-left:18px;margin-bottom:0}.tower-result{text-align:center;padding:35px 20px}.tower-result-symbol{display:grid;place-items:center;margin:0 auto 18px;width:50px;height:50px;border:1px solid #dfc58d66;border-radius:50%;color:var(--gold)}.tower-result-symbol .icon{width:25px;height:25px}.tower-result h2{font-size:25px;letter-spacing:-.8px;margin:12px 0}.tower-result>p:not(.tower-kicker){font-size:11px;color:var(--muted);line-height:1.9}.tower-result .tower-rewards{justify-content:center;margin:24px 0}.tower-result>.tower-primary{margin-top:20px;min-width:230px}.tower-result>small{display:block;font-size:9px;color:var(--muted);margin-top:14px}.tower-dialog{background:#1c1c1c;border:1px solid #3c3e40;color:#f2f3ee;border-radius:14px;padding:28px;max-width:calc(100vw - 32px);width:420px;max-height:calc(100dvh - 32px);overflow:auto}.tower-dialog::backdrop{background:#000a}.tower-dialog h2{font-size:22px;letter-spacing:-.5px;margin:0 0 18px}.tower-dialog p{font-size:12px;line-height:2;color:#a4a7ad;margin:0 0 20px}.tower-dialog>div{display:flex;justify-content:flex-end;gap:8px}.tower-dialog>button{width:100%}.tower-root .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:1250px){.tower-monster-art{max-width:205px}.tower-enemies:has(> :nth-child(3)) .tower-monster-art{max-width:190px}}
@media(max-width:1000px){.tower-run-layout{grid-template-columns:145px minmax(0,1fr);gap:16px}.tower-path{padding:20px 12px}.tower-floor-path>div{gap:8px}.tower-floor-path .current>b{display:none}.tower-monster{padding:10px}.tower-enemy-top>span{font-size:7px;letter-spacing:.5px}.tower-hero-copy{padding-left:30px}.tower-hero-tags{gap:10px}.tower-picker-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:780px){.tower-run-layout{display:block}.tower-path{display:none}.tower-hero{grid-template-columns:1fr 150px;min-height:340px}.tower-hero-copy{padding:30px 0 30px 24px}.tower-hero-copy h2{font-size:31px}.tower-hero-copy>.tower-primary{min-width:0;padding:12px 14px;font-size:11px}.tower-hero-tags{flex-direction:column;gap:9px;margin:18px 0}.tower-drawing{min-height:300px;transform:scale(.9);transform-origin:70% 80%;margin-left:-30px}.tower-lobby-bottom{grid-template-columns:1fr}.tower-panel{padding:20px}.tower-picked{gap:6px}.tower-picked b{font-size:9px}.tower-picked small{font-size:8px}.tower-command{position:fixed;z-index:20;left:0;right:0;bottom:0;width:100%;margin:0;border-radius:16px 16px 0 0;padding:0 20px calc(14px + env(safe-area-inset-bottom,0px));max-height:78dvh;display:flex;flex-direction:column;box-shadow:0 -12px 35px #0004;background:#1c1c1c}.tower-command .bottom-sheet-handle{display:flex;align-items:center;justify-content:center;min-height:24px;padding:0;border:0;background:#1c1c1c;touch-action:none;flex:none}.tower-command .bottom-sheet-handle>span{width:34px;height:3px;background:#66696b;border-radius:3px}.tower-command-summary{margin:0;min-height:30px}.tower-command-summary>.tower-text{display:flex;align-items:center;gap:4px;font-size:10px;flex:none}.tower-command-summary .icon{width:13px;height:13px}.tower-command-summary b{font-size:11px}.tower-command-summary>span{gap:9px}.tower-command-summary small{font-size:9px}.tower-command [data-bottom-sheet-details]{overflow:auto;padding-top:14px;min-height:0;background:#1c1c1c}.tower-command-footer{padding-top:10px;margin-top:10px;flex:none}.tower-command-footer .tower-primary{min-height:42px;min-width:145px}.tower-team{padding:15px}.tower-hand{gap:5px}.tower-hand-card{padding:2px}.tower-hand-meta>b{font-size:7px}.tower-energy{gap:2px}.tower-energy>i{width:4px;height:8px}.tower-hand-meta{gap:5px;padding:8px 0 3px}.tower-monster-art{max-width:190px}.tower-formation-footer{bottom:8px}.tower-run-heading{margin-top:22px}.tower-run-heading h2{font-size:32px}.tower-run-meta{gap:8px}.tower-run-meta .tower-secondary{padding:9px 10px;min-height:36px}.tower-root{padding-bottom:calc(var(--bottom-sheet-reserved-height,0px) + 10px)}}
@media(max-width:520px){.tower-preview-bar{align-items:flex-start;padding:10px;gap:8px}.tower-preview-bar>span{flex-wrap:wrap;font-size:10px;max-width:160px}.tower-preview-bar small{border:0;padding:0;width:100%;font-size:8px}.tower-preview-bar>div{flex-direction:column;align-items:stretch}.tower-preview-bar button{font-size:8px;padding:4px 7px}.tower-hero{grid-template-columns:1fr 90px;min-height:330px}.tower-hero-copy{padding:27px 0 27px 20px}.tower-hero-copy h2{font-size:28px;letter-spacing:-1px}.tower-hero-copy>p:not(.tower-kicker){font-size:10px}.tower-hero-copy .tower-kicker{font-size:7px;letter-spacing:1.3px}.tower-hero-copy>small{font-size:8px}.tower-hero-tags{font-size:9px}.tower-drawing{opacity:.65;transform:scale(.66);transform-origin:35% 80%;overflow:visible;margin-left:-20px;pointer-events:none}.tower-lobby-bottom h3{font-size:16px}.tower-rewards{gap:8px}.tower-reward{min-width:0;flex:1;padding:12px 10px;font-size:9px;gap:6px}.tower-reward .icon{width:15px;height:15px}.tower-reward>b{font-size:14px}.tower-lobby-bottom .tower-note{font-size:10px}.tower-section-head h2{font-size:20px}.tower-section-head>button{padding:10px;font-size:10px}.tower-picked{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tower-picked>button{padding:12px 4px}.tower-picked>button>span{font-size:24px}.tower-picked b{font-size:10px}.tower-picker-tools{flex-wrap:wrap}.tower-picker-tools label{flex-basis:100%}.tower-picker-tools button{flex:1}.tower-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.tower-pick-meta{font-size:8px;flex-wrap:wrap}.tower-formation-footer{padding:12px}.tower-formation-footer .tower-primary{padding:12px;font-size:11px}.tower-formation-footer>span{font-size:10px}.tower-run-heading h2>small{display:block;margin:8px 0 0;font-size:10px}.tower-run-heading{align-items:center}.tower-run-meta{gap:4px}.tower-run-meta>span{font-size:9px}.tower-run-meta .tower-text{font-size:9px;padding:6px}.tower-run-meta .tower-secondary{font-size:9px;padding:8px}.tower-enemies{gap:8px}.tower-monster{padding:10px}.tower-monster h3{font-size:11px;margin:2px 0 10px}.tower-enemy-top{font-size:7px;flex-wrap:wrap;gap:6px}.tower-enemy-top>i{font-size:8px}.tower-enemy-hp>span{font-size:8px;flex-wrap:wrap}.tower-enemy-hp b{font-size:9px}.tower-enemy-affinity{font-size:8px;flex-wrap:wrap;margin:9px 0}.tower-intent{padding:8px 6px;font-size:9px;gap:4px}.tower-intent .icon{width:11px;height:11px}.tower-enemies:has(> :nth-child(3)) .tower-monster{padding:8px 6px}.tower-enemies:has(> :nth-child(3)) .tower-enemy-top>span{font-size:6px;letter-spacing:0}.tower-enemies:has(> :nth-child(3)) .tower-monster h3{font-size:10px;min-height:30px}.tower-enemies:has(> :nth-child(3)) .tower-enemy-affinity>span:last-child{display:none}.tower-enemies:has(> :nth-child(3)) .tower-intent{font-size:8px;padding:7px 3px}.tower-battlefield>.tower-section-head h3{font-size:10px}.tower-battlefield>.tower-section-head>span{font-size:9px;flex:none}.tower-field-note{font-size:9px;align-items:flex-start}.tower-team .tower-section-head>span{font-size:8px}.tower-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tower-hand-card .card-v3{aspect-ratio:1.2;height:auto}.tower-hand-card .card__face{aspect-ratio:1.2}.tower-hand-card .card__art{font-size:30px;bottom:20%}.tower-hand-card .card__bottom{padding:5px}.tower-hand-card .card__title{font-size:9px}.tower-hand-card .card__meta,.tower-hand-card .card-affinities,.tower-hand-card .card__rarity{display:none}.tower-hand-meta{display:flex;justify-content:space-between;padding:7px 3px 3px}.tower-hand-meta>b{font-size:8px}.tower-hand-meta .tower-energy>i{width:5px;height:9px}.tower-team-status{gap:15px}.tower-shield{font-size:9px}.tower-command{padding-left:16px;padding-right:16px}.tower-command-footer .tower-primary{min-width:130px;font-size:11px;padding:11px}.tower-command-summary small{display:none}.tower-command-footer b{max-width:150px;font-size:10px}.tower-action-list{gap:7px}.tower-action-list>button{padding:10px;font-size:10px;flex:1;min-width:67px}.tower-ledger{gap:8px 13px;font-size:9px}.tower-ledger>span:first-child{width:100%}.tower-result{padding:30px 15px}.tower-result h2{font-size:21px}.tower-result .tower-rewards{gap:7px}.tower-result .tower-boss-reward{flex-basis:100%}.tower-result>.tower-primary{min-width:0;width:100%}.tower-preview-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){.tower-root *{transition:none!important;scroll-behavior:auto!important}}

/* Fade cell edges to keep neighboring atlas silhouettes outside the combat card. */
.tower-monster-art{mask-image:linear-gradient(to bottom,transparent,#000 6%,#000 88%,transparent 98%)}

/* Match scenario/coop: stability and shield share one normalized progress bar. */
.tower-stability-meter{display:flex}
.tower-stability-meter>i{flex:none;border-radius:0}
.tower-root .tower-stability-meter>i.tower-shield-fill{background:#8acaff}
.tower-root .tower-shield-value{display:inline-block;color:#8acaff;font-style:normal;font-size:12px;font-weight:600;white-space:nowrap;margin-left:5px}
.tower-enemy-hp .tower-shield-value{font-size:inherit;margin-left:3px}
@media(max-width:520px){.tower-root .tower-team-status .tower-shield-value{font-size:10px}}

.tower-root .tower-result-actions>button{font-size:12px}

/* Keep result actions separated on both stacked and inline layouts. */
.tower-result-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin-top:20px}
.tower-result-actions>.tower-primary{min-width:230px}
.tower-root .tower-intent{padding-inline:12px;min-width:0}
.tower-intent>.icon,.tower-intent>b{flex-shrink:0}
.tower-intent>span{min-width:0;overflow-wrap:anywhere}
.tower-intent>b{white-space:nowrap}
.tower-guide-dialog h2{font-size:20px;margin-bottom:18px}
.tower-guide-steps{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.tower-guide-steps>li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:center}
.tower-guide-art{width:72px;height:78px;display:grid;place-items:center;border:1px solid #353535;border-radius:10px;background:#1c1c1c}
.tower-guide-art>svg{width:66px;height:66px}
.tower-guide-art .tower-monster-art{width:68px;margin:0}
.tower-guide-dialog .tower-guide-reward>.icon{width:44px;height:44px;color:#dfc58d}
.tower-guide-steps h3{font-size:12px;line-height:1.5;font-weight:600;margin:0 0 5px}
.tower-guide-dialog .tower-guide-steps p{font-size:11px;line-height:1.7;margin:0}
.tower-guide-dialog .tower-guide-foot{font-size:10px;line-height:1.8;margin:20px 0 18px;color:#95999f}
.tower-guide-dialog>.tower-primary{font-size:12px;min-height:44px}
@media(max-width:520px){
 .tower-result-actions{flex-direction:column;align-items:stretch}
 .tower-result-actions>.tower-primary{min-width:0}
 .tower-result-actions>button{width:100%}
 .tower-root .tower-intent,.tower-root .tower-enemies:has(> :nth-child(3)) .tower-intent{padding-inline:8px}
 .tower-run-meta{flex-wrap:wrap;justify-content:flex-end}
 .tower-run-meta>.tower-secondary{white-space:nowrap}
 .tower-guide-dialog{padding:20px}
 .tower-guide-steps>li{grid-template-columns:66px minmax(0,1fr);gap:12px}
 .tower-guide-art{width:66px;height:74px}
 .tower-guide-art .tower-monster-art{width:62px}
}

/* Emphasize tower entry and floor progression without changing button sizes. */
.tower-root .tower-primary:is([data-tower="formation"],[data-tower="resume"],[data-tower="start"],[data-tower="next"]){font-weight:700}

/* Actual settlement receipt uses the shared collection card face. */
.tower-claimed-summary{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0;color:#95999f;font-size:12px}.tower-claimed-summary b{color:#f2f3ee}.tower-awarded-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,160px));gap:18px 12px;margin:20px 0}.tower-awarded-card{min-width:0}.tower-awarded-card>.card{width:100%;display:block}.tower-awarded-card>p{font-size:11px;line-height:1.6;color:#95999f;margin:8px 0 0}.tower-receipt{margin-top:24px}@media(max-width:520px){.tower-awarded-cards{grid-template-columns:repeat(2,minmax(0,1fr));max-width:340px;gap:16px 10px}}

/* tower-play/formation-presets.css */
/* Shared by scenario and tower formation management, including iOS WebKit. */
dialog.formation-presets-dialog[open]{display:grid;grid-template-areas:"handle" "heading" "body" "footer";grid-template-rows:auto auto minmax(0,1fr) auto}
.formation-presets-dialog>.preset-sheet-handle{grid-area:handle}
.formation-presets-dialog>.preset-dialog-heading{grid-area:heading}
.formation-presets-dialog>.preset-dialog-scroll{grid-area:body;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.formation-presets-dialog>.preset-dialog-footer{grid-area:footer;max-height:none;overflow:visible;flex:none}
.formation-presets-dialog .preset-dialog-controls{margin-top:16px;padding-top:12px;border-top:1px solid #ffffff0e;background:var(--mobile-sheet-bg,#1c1c1c)}
.formation-presets-dialog .preset-dialog-controls .preset-slot-grid{margin-bottom:0}
.formation-presets-dialog .preset-dialog-controls .preset-message:not(:empty){margin:0 0 10px;font-size:11px}
.formation-presets-dialog .preset-dialog-controls .preset-confirm{margin:0 0 10px;border:0;outline:0;box-shadow:none;border-radius:0;padding:0}
.formation-presets-dialog .preset-primary-action,.formation-presets-dialog .preset-primary-action .preset-save{width:100%}

/* Scenario preset presentation, extracted from dungeon-play/scenario/style.css. */
.formation-presets{margin:0 0 26px;min-width:0}
.preset-toolbar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.preset-toolbar-heading>div{display:flex;align-items:center;gap:10px}
.preset-toolbar-heading h2{font-size:14px;font-weight:600;line-height:1.5;margin:0}
.preset-toolbar-heading span{color:#95999f;font-size:11px}
.preset-manage{border:1px solid #454545;border-radius:7px;background:#1c1c1c;color:#eee;padding:8px 12px;font:inherit;font-size:11px;cursor:pointer}
.preset-manage span{color:inherit;margin-left:7px}
.preset-rail{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px;min-width:0}
.preset-chip{display:flex;align-items:center;gap:7px;min-width:0;min-height:44px;padding:10px 9px;border:1px dashed #414141;border-radius:8px;background:#1c1c1c;color:#95999f;cursor:pointer;text-align:left;font:inherit}
.preset-chip.is-saved{border-style:solid;border-color:#565656;color:#f2f3ee}
.preset-number{font-size:10px;color:#95999f;font-variant-numeric:tabular-nums}
.preset-chip-name{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.preset-dot{width:4px;height:4px;flex:none;border-radius:50%;background:var(--accent);margin-left:auto}
.preset-chip[aria-pressed=true]{border-style:solid;border-color:var(--accent)}
.preset-chip[aria-pressed=true] .preset-number{color:var(--accent)}
.preset-toolbar-error{font-size:12px;color:#c6c6c6}
.preset-toolbar-error button{border:0;background:transparent;color:var(--accent);font:inherit;cursor:pointer}
.formation-presets button:focus-visible,.formation-presets-dialog button:focus-visible{outline:2px solid var(--accent,#c9dd8a);outline-offset:3px}
.formation-presets button:disabled,.formation-presets-dialog button:disabled{opacity:.4;cursor:default}
dialog.formation-presets-dialog{box-sizing:border-box;position:fixed;inset:var(--preset-top,16px) 0 auto;margin:0 auto;padding:0;width:min(640px,calc(100% - 24px));max-width:640px;max-height:var(--preset-max-height,85dvh);border:1px solid #454545;border-radius:18px;background:#1c1c1c;color:#f2f3ee;overflow:hidden;box-shadow:0 24px 100px #0009;font:14px/1.5 system-ui,-apple-system,sans-serif}
dialog.formation-presets-dialog[open]{display:flex;flex-direction:column}
.formation-presets-dialog::backdrop{background:#08090bd4;backdrop-filter:blur(5px)}
.formation-presets-dialog *{box-sizing:border-box}
.preset-dialog-heading{display:flex;align-items:center;justify-content:space-between;flex:none;padding:20px 22px 16px;border-bottom:1px solid #353535;background:#1c1c1c}
.preset-dialog-heading p{font-size:10px;color:#95999f;margin:0 0 4px}
.preset-dialog-heading h2{font-size:20px;font-weight:600;letter-spacing:-.5px;margin:0}
.preset-close{width:36px;height:36px;border:1px solid #454545;border-radius:50%;background:#1c1c1c;color:#ddd;font-size:25px;line-height:1;cursor:pointer}
.preset-dialog-scroll{padding:16px 22px 22px;overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;background:#1c1c1c}
.preset-intro{font-size:12px;color:#a7a7a7;margin:0 0 16px}
.preset-slot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-bottom:22px}
.preset-slot-grid [data-preset-edit]{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:10px;border:1px solid #454545;border-radius:8px;background:#1c1c1c;color:#95999f;font:inherit;cursor:pointer}
.preset-slot-grid [data-preset-edit] span{font-size:10px}
.preset-slot-grid [data-preset-edit] b{max-width:100%;font-size:11px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preset-slot-grid [data-preset-edit][aria-pressed=true]{border-color:var(--accent);color:#f2f3ee}
.preset-slot-grid [data-preset-edit][aria-pressed=true] span{color:var(--accent)}
.preset-editor{border-top:1px solid #383838;padding-top:16px}
.preset-editor-label{display:flex;justify-content:space-between;color:#95999f;font-size:11px;margin-bottom:14px}
.preset-editor-label>span:first-child{color:#ddd}
.preset-name-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:7px}
.preset-name-label small{font-size:10px;color:#95999f}
.preset-name-input{display:block;width:100%;min-height:44px;border:1px solid #505050;border-radius:8px;background:#1c1c1c;color:#f2f3ee;padding:10px 12px;font:inherit;font-size:14px}
.preset-name-input:focus{outline:1px solid var(--accent);border-color:var(--accent)}
.preset-card-preview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:16px 0;padding:8px 1px 7px}
.preset-card-preview figure{min-width:0;margin:0;position:relative}
.preset-card-preview .card{width:100%;margin:0}
.preset-card-preview figcaption{font-size:10px;text-align:center;color:#e9ae9c;margin-top:4px}
.preset-card-preview>p{grid-column:1/-1;font-size:12px;color:#95999f;text-align:center;padding:20px 8px;margin:0;border:1px dashed #414141;border-radius:8px}
.preset-message{font-size:12px;color:#cbd0c1;margin:0;min-height:0}
.preset-message:not(:empty){margin:10px 0}
.preset-editor-actions{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-top:14px}
.preset-editor-actions button,.preset-confirm button{min-height:38px;border:1px solid #505050;border-radius:8px;background:#1c1c1c;color:#e3e3e3;padding:8px 12px;font:inherit;font-size:12px;cursor:pointer}
.preset-editor-actions [data-preset-delete]{color:#c2aaa4}
.preset-save{display:block;width:100%;min-height:44px;margin-top:10px;border:1px solid var(--accent);border-radius:8px;background:var(--accent);color:#1c1c1c;font:inherit;font-weight:600;font-size:13px;cursor:pointer}
.preset-save-hint{font-size:11px;color:#95999f;margin:8px 0 0;text-align:center}
.preset-confirm{padding:12px;border:1px solid #656565;border-radius:8px;margin:12px 0}
.preset-confirm[hidden]{display:none}
.preset-confirm p{font-size:12px;margin:0 0 10px}
.preset-confirm>div{display:flex;gap:8px}
.preset-confirm [data-preset-confirm]{border-color:var(--accent);color:var(--accent)}
@media(max-width:1100px){.preset-rail{display:flex;overflow-x:auto;scrollbar-width:thin;padding:2px 2px 8px;scroll-snap-type:x proximity}
.preset-chip{flex:0 0 116px;scroll-snap-align:start}
.formation-presets{margin-bottom:20px}}
@media(max-width:680px){dialog.formation-presets-dialog{inset:auto 0 var(--preset-bottom,0px);width:100%;max-width:100%;margin:0;border-radius:20px 20px 0 0}
.preset-dialog-heading{padding:16px 18px 12px}
.preset-dialog-heading h2{font-size:18px}
.preset-dialog-scroll{padding:14px 18px calc(18px + env(safe-area-inset-bottom,0px))}
.preset-slot-grid{gap:5px;margin-bottom:16px}
.preset-slot-grid [data-preset-edit]{padding:8px 6px}
.preset-slot-grid [data-preset-edit] b{font-size:10px}
.preset-intro{font-size:11px}
.preset-card-preview{grid-template-columns:repeat(6,minmax(76px,1fr));gap:7px;overflow-x:auto;padding:8px 1px 7px;scrollbar-width:thin}
.preset-chip{flex-basis:110px}
.preset-toolbar-heading h2{font-size:13px}}
.preset-load-status{margin:-10px 0 20px;font-size:12px;line-height:1.7;color:#d6d9d0}
.formation-presets-button{min-height:32px;padding:5px 6px;border:1px solid #505050;border-radius:7px;background:#1c1c1c;color:#ddd;font:inherit;font-size:10px;white-space:nowrap;cursor:pointer}
.preset-card-preview.is-empty{display:block;min-width:0;max-width:100%;padding:0;overflow:visible}
.preset-card-preview.is-empty>p{width:100%;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.formation-presets-accordion{display:none}
@media(max-width:800px){.formation-presets-accordion>summary{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 16px;list-style:none;background:var(--mobile-sheet-bg);color:#e5e5e5;font-size:12px;cursor:pointer;user-select:none}
.formation-presets-accordion>summary::-webkit-details-marker{display:none}
.formation-presets-accordion>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.formation-presets-accordion>summary .preset-dock-count{margin-left:auto;color:#95999f;font-size:10px}
.formation-presets-accordion>summary svg{width:14px;height:14px;color:#95999f;flex:none}
.formation-presets-accordion[open]>summary svg{rotate:180deg}
.formation-presets-dock-body{max-height:140px;overflow-y:auto;overscroll-behavior:contain;padding:0 16px 12px;background:var(--mobile-sheet-bg);scrollbar-width:thin}
.formation-presets-accordion .formation-presets{margin:0}
.formation-presets-accordion .preset-toolbar-heading{display:none}
.formation-presets-accordion .preset-toolbar-heading>div{display:none}
.formation-presets-accordion .preset-manage{min-height:32px;padding:6px 10px;font-size:10px}
.formation-presets-accordion .preset-rail{padding-bottom:5px}
.formation-presets-accordion .preset-toolbar-error{margin:0;font-size:11px}}
dialog.formation-presets-dialog,.preset-dialog-heading,.preset-dialog-scroll,.preset-dialog-footer{background:var(--mobile-sheet-bg,#1c1c1c)}
.preset-sheet-handle{display:none}
.preset-dialog-heading{padding:18px 20px 14px;border-bottom:1px solid #ffffff0e;gap:12px}
.preset-dialog-heading h2{font-size:17px;line-height:1.5;font-weight:600;margin:0}
.preset-dialog-heading p{font-size:11px;line-height:1.6;color:var(--muted);margin:4px 0 0}
.preset-close{flex:none;width:36px;height:36px;border-radius:8px;font-size:24px}
.preset-dialog-scroll{padding:16px 20px;flex:1 1 auto;overflow-x:hidden}
.preset-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.preset-section-heading h3{font-size:10px;font-weight:500;margin:0;color:var(--text)}
.preset-section-heading>span{font-size:10px;color:var(--muted)}
.preset-slot-grid{position:relative;margin-bottom:16px}
.preset-slot-grid [data-preset-edit]{min-height:48px;border-radius:8px}
.preset-editor{border-top:1px solid #ffffff0e;padding-top:14px}
.preset-editor-label{font-size:10px;margin-bottom:12px}
.preset-name-label{font-size:11px}
.preset-name-input{font-size:14px;border-radius:8px}
.preset-dialog-footer{flex:0 0 auto;padding:12px 20px 16px;border-top:1px solid #ffffff0e;min-height:0;max-height:55%;overflow-y:auto;overscroll-behavior:contain}
.preset-dialog-footer .preset-editor-actions{margin-top:0;gap:7px}
.preset-dialog-footer .preset-editor-actions button{min-height:38px;padding:9px 10px;font-size:11px}
.preset-dialog-footer .preset-save{margin-top:8px;font-size:12px;border-radius:10px}
.preset-dialog-footer .preset-save-hint{font-size:10px;line-height:1.6;margin:6px 0 0}
.preset-dialog-footer .preset-message:not(:empty){margin:0 0 10px;font-size:11px}
.preset-dialog-footer .preset-confirm{margin:0 0 10px}
@media(max-width:800px){dialog.formation-presets-dialog{inset:auto 0 calc(var(--preset-bottom,0px) + 8px);width:calc(100% - 24px);max-width:640px;margin:0 auto;border-radius:18px;max-height:var(--preset-max-height,85dvh)}
.preset-sheet-handle{display:flex;justify-content:center;align-items:center;flex:none;width:100%;height:28px;min-height:28px;padding:8px 0;border:0;border-radius:18px 18px 0 0;background:var(--mobile-sheet-bg);touch-action:none;user-select:none;cursor:grab}
.preset-sheet-handle>span{width:40px;height:4px;border-radius:999px;background:#707070;pointer-events:none}
.formation-presets-dialog .preset-sheet-handle:focus-visible{outline-offset:-4px}
.preset-dialog-heading{padding:4px 16px 12px;border-bottom:1px solid #ffffff0e}
.preset-dialog-heading h2{font-size:16px}
.preset-dialog-heading p{font-size:10px}
.preset-dialog-scroll{padding:14px 16px}
.preset-slot-grid{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;scroll-snap-type:x proximity;padding:2px 2px 8px}
.preset-slot-grid [data-preset-edit]{flex:0 0 112px;gap:5px;padding:9px 10px;scroll-snap-align:center}
.preset-slot-grid [data-preset-edit] b{font-size:11px;font-weight:500}
.preset-card-preview{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible;margin:12px 0 0;padding:8px 1px}
.preset-card-preview.is-empty{margin-top:12px}
.preset-dialog-footer{padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px))}}
.preset-slot-grid [data-preset-edit],.preset-chip{background:var(--bg);border-color:var(--line)}
.preset-chip.is-saved{border-color:var(--line)}
.preset-slot-grid [data-preset-edit][aria-pressed=true],.preset-chip[aria-pressed=true]{background:#ffffff08;border-color:#8b8b8b}
.preset-confirm [data-preset-confirm].primary{background:var(--accent);border-color:var(--accent);color:#1c1c1c;font-weight:600}
.preset-editor{border-top:0;padding-top:0}
.preset-selected-name{font-size:14px;font-weight:500;line-height:1.6;overflow-wrap:anywhere;margin:0 0 10px;color:var(--text)}
.preset-name-row{display:flex;gap:6px;align-items:center;min-width:0}
.preset-name-row input{min-width:0;flex:1}
.preset-name-row button{display:flex;align-items:center;justify-content:center;width:36px;height:40px;flex:none;padding:8px;border:1px solid #505050;border-radius:8px;background:var(--mobile-sheet-bg);color:#ddd}
.preset-name-row [data-preset-rename-save]{color:var(--accent)}
.preset-name-row svg{width:18px;height:18px}
.preset-footer-slots{min-width:0}
.preset-dialog-footer .preset-slot-grid{margin-bottom:8px}
.preset-primary-action .preset-save{margin-top:0}
.preset-slot-card{position:relative;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--bg);overflow:hidden}
.preset-slot-card[data-selected=true]{background:#ffffff08;border-color:#8b8b8b}
.preset-slot-grid .preset-slot-card>[data-preset-edit]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;min-height:54px;padding:4px 8px 8px;border:0;border-radius:0;background:transparent;color:var(--muted);text-align:left}
.preset-slot-grid .preset-slot-card>[data-preset-edit][aria-pressed=true]{background:transparent;border:0;color:var(--text)}
.preset-slot-card>[data-preset-edit]>span{display:flex;align-items:center;min-height:20px;font-size:10px}
.preset-slot-card>[data-preset-edit]>b{max-width:100%;font-size:11px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.preset-card-icons{display:flex;gap:1px;position:absolute;top:2px;right:2px}
.preset-card-icons button{display:flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;min-height:24px;margin:0;padding:6px;border:0;border-radius:5px;background:transparent;color:var(--muted);cursor:pointer}
.preset-card-icons button:hover,.preset-card-icons button:focus-visible{color:var(--text)}
.preset-card-icons svg{width:12px;height:12px;pointer-events:none}
@media(max-width:800px){.preset-slot-card{flex:0 0 112px;scroll-snap-align:center}
.preset-slot-grid .preset-slot-card>[data-preset-edit]{flex:none}
.preset-dialog-footer .preset-slot-grid{padding-bottom:8px}}
.formation-presets-dialog .preset-name-input:focus,.formation-presets-dialog .preset-name-input:focus-visible{outline:none;box-shadow:none;border-color:var(--accent)}
.preset-dialog-footer .preset-confirm{border:0;outline:0;box-shadow:none;border-radius:0;padding:0}
.preset-confirm.is-renaming .preset-name-label{font-size:10px;margin-bottom:5px}
.preset-confirm.is-renaming .preset-name-label small{font-size:9px}
.preset-confirm.is-renaming .preset-name-row{gap:4px}
.preset-confirm.is-renaming .preset-name-input{height:34px;min-height:34px;padding:6px 9px;border-radius:6px;font-size:14px}
.preset-confirm.is-renaming .preset-name-row button{width:30px;height:34px;min-height:34px;padding:7px;border:0;border-radius:6px;background:transparent}
.preset-confirm.is-renaming .preset-name-row button:hover{background:#ffffff08}
.preset-confirm.is-renaming .preset-name-row svg{width:14px;height:14px}
.preset-editor>.preset-card-preview:first-child{margin-top:0}
.preset-confirm:not(.is-renaming)>p{display:flex;align-items:center;gap:3px;min-width:0;margin:0 0 5px;font-size:10px;line-height:15px;white-space:nowrap}
.preset-delete-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
.preset-confirm:not(.is-renaming)>p>span:last-child{flex:none}
.preset-confirm:not(.is-renaming)>div{gap:6px}
.preset-confirm:not(.is-renaming) button{height:34px;min-height:34px;padding:6px 10px;border-radius:6px;font-size:11px;line-height:16px}
dialog.formation-presets-dialog{--accent:var(--lime,#c8ff69);--mobile-sheet-bg:#1c1c1c}header.preset-dialog-heading{position:static;width:auto;max-width:none;margin:0;height:auto;min-height:0;z-index:auto;flex-wrap:nowrap} .tower-root .formation-presets{margin-top:24px}.tower-root .preset-toolbar-heading h2{font-size:14px}.tower-preset-notice{margin:12px 0!important;color:var(--accent);font-size:11px;line-height:1.8}
/* The main app has a flex site footer; the shared preset footer stacks its sections. */
footer.preset-dialog-footer{display:block;width:100%;max-width:none;margin:0}.formation-presets-dialog .preset-primary-action{width:100%}.formation-presets-dialog .preset-primary-action .preset-save{width:100%}

/* tower-play/mobile.css */
/* Match the scenario's fixed formation dock and its three-column card inventory. */
.tower-formation-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start;margin-top:24px}.tower-inventory{min-width:0}.tower-inventory .tower-picker-tools{margin:0 0 14px;align-items:center;flex-wrap:nowrap}.tower-picker-tools>span{color:var(--muted);font-size:10px;white-space:nowrap}.tower-inventory .tower-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tower-more{width:100%;margin-top:16px}.tower-formation-dock{position:sticky;top:20px;border:1px solid var(--line);border-radius:14px;background:var(--mobile-sheet-bg);overflow:hidden;min-width:0;display:flex;flex-direction:column}.tower-formation-dock>.bottom-sheet-handle{display:none}.tower-formation-dock [data-bottom-sheet-details]{padding:20px;background:var(--mobile-sheet-bg)}.tower-formation-dock .tower-section-head{margin-bottom:14px}.tower-formation-dock .tower-section-head h3{font-size:12px}.tower-formation-dock .tower-section-head>span{font-size:9px}.tower-formation-dock .tower-picked{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:9px}.tower-formation-dock .tower-picked>button{display:block;padding:0;border:0;background:none;min-width:0;position:relative}.tower-formation-dock .tower-picked>button:disabled{opacity:1}.tower-picked .card-v3{display:block;width:100%;max-width:none;pointer-events:none}.tower-picked .card__panel{display:none}.tower-picked .card__bottom{padding-bottom:8px}.tower-empty-slot{display:grid;place-content:center;gap:8px;aspect-ratio:5/7;width:100%;border:1px dashed #555;border-radius:8px;color:var(--muted);font-size:22px;background:var(--mobile-sheet-bg)}.tower-empty-slot small{font-size:10px}.tower-formation-summary{padding:16px 18px;background:var(--mobile-sheet-bg);border-top:1px solid #ffffff10;flex:none}.tower-formation-summary-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.tower-selection-toggle{display:flex;align-items:center;gap:10px;min-height:40px;padding:0;border:0;background:var(--mobile-sheet-bg);text-align:left;color:var(--muted);font-size:11px}.tower-selection-toggle strong{color:var(--text);font-weight:600;font-size:17px;margin-left:5px}.tower-selection-toggle small{color:var(--muted);font-size:10px;font-weight:400}.tower-selection-toggle>span:last-child{display:none}.tower-formation-quick{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}.tower-formation-quick button{border:1px solid #505050;border-radius:7px;padding:7px 8px;font-size:10px;color:var(--text);background:var(--mobile-sheet-bg);min-height:34px}.tower-formation-power{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 14px;font-size:10px;color:var(--muted)}.tower-formation-power b{color:var(--accent);font-size:13px;font-weight:500;margin-left:7px}.tower-formation-power small{font-size:9px}.tower-formation-summary>.tower-primary{width:100%;min-height:46px}.tower-saved-formations{min-width:0;padding:16px 18px 0;background:var(--mobile-sheet-bg);flex:none}.tower-saved-formations>summary{display:none}.tower-saved-body .formation-presets{margin:0!important}.tower-saved-body .preset-rail{display:flex;overflow:auto;gap:6px;padding-bottom:8px;scrollbar-width:thin}.tower-saved-body .preset-chip{flex:0 0 110px;min-height:40px}.tower-saved-body .preset-toolbar-heading{margin-bottom:10px}.tower-saved-body .preset-toolbar-heading h2{font-size:12px}.tower-saved-body .preset-manage{display:none}.tower-combat-hand{margin-bottom:18px}.tower-combat-hand>.tower-section-head{margin-bottom:10px}.tower-combat-hand h3{font-size:12px}.tower-combat-hand .tower-section-head>span{font-size:9px}.tower-root [data-bottom-sheet-details][hidden]{display:none!important}

.tower-root:where([data-tower-mobile]){padding-bottom:calc(var(--bottom-sheet-reserved-height,0px) + 20px)}
.tower-root:where([data-tower-mobile]) .tower-preview-bar{padding:8px 10px;align-items:center;margin-bottom:18px;gap:8px}
.tower-root:where([data-tower-mobile]) .tower-preview-bar>span{flex:none;max-width:none;white-space:nowrap;font-size:9px}
.tower-root:where([data-tower-mobile]) .tower-preview-bar small{display:none}
.tower-root:where([data-tower-mobile]) .tower-preview-bar>div{flex-direction:row;gap:5px;overflow-x:auto;scrollbar-width:none}
.tower-root:where([data-tower-mobile]) .tower-preview-bar button{min-height:28px;font-size:8px;padding:4px 6px;white-space:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-formation>.tower-section-head{align-items:center;margin-bottom:16px}
:where(.tower-root[data-tower-mobile]) .tower-formation>.tower-section-head h2{font-size:20px;line-height:1.5}
:where(.tower-root[data-tower-mobile]) .tower-formation>.tower-section-head .tower-kicker{display:none}
:where(.tower-root[data-tower-mobile]) .tower-formation>.tower-section-head p{font-size:10px;line-height:1.7;margin-top:5px}
:where(.tower-root[data-tower-mobile]) .tower-formation>.tower-section-head>button{min-height:40px;padding:9px 10px;font-size:10px;white-space:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-formation-layout{display:block;margin-top:0}
:where(.tower-root[data-tower-mobile]) .tower-picker-tools input{font-size:14px;min-height:44px}
:where(.tower-root[data-tower-mobile]) #tower-inventory-scroll{max-height:min(var(--tower-inventory-height,560px),max(230px,calc(100dvh - 270px)));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px 2px 8px;scroll-padding:8px}
:where(.tower-root[data-tower-mobile]) .tower-inventory .tower-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:where(.tower-root[data-tower-mobile]) .tower-pick{padding:3px}
:where(.tower-root[data-tower-mobile]) .tower-pick-meta{font-size:9px;min-height:32px;padding:10px 1px;gap:3px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock.bottom-sheet-surface,:where(.tower-root[data-tower-mobile]) .tower-command.bottom-sheet-surface{position:fixed;inset:auto 12px calc(8px + var(--bottom-sheet-viewport-bottom,0px));z-index:90;width:auto;max-height:calc(var(--bottom-sheet-viewport-height,100dvh)*.82);margin:0;padding:0;display:flex;flex-direction:column;border:1px solid #454545;border-radius:16px;box-shadow:0 -6px 24px #0004;background:var(--mobile-sheet-bg);overflow:hidden}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock>.bottom-sheet-handle,:where(.tower-root[data-tower-mobile]) .tower-command>.bottom-sheet-handle{display:flex;flex:none;min-height:26px;height:26px;background:var(--mobile-sheet-bg)}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .bottom-sheet-handle>span,:where(.tower-root[data-tower-mobile]) .tower-command .bottom-sheet-handle>span{display:block;width:36px;height:4px;background:#707070;border-radius:999px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock [data-bottom-sheet-details],:where(.tower-root[data-tower-mobile]) .tower-command [data-bottom-sheet-details]{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;background:var(--mobile-sheet-bg)}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock [data-bottom-sheet-details]{padding:12px 16px 14px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-picked{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-picked .card-v3{max-width:115px;margin:auto}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-empty-slot{max-height:150px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-section-head{margin-bottom:10px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-section-head h3{font-size:11px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock .tower-section-head>span{font-size:8px}
:where(.tower-root[data-tower-mobile]) .tower-formation-summary{padding:8px 16px calc(12px + env(safe-area-inset-bottom,0px))}
:where(.tower-root[data-tower-mobile]) .tower-selection-toggle{min-height:36px;flex:none;font-size:10px}
:where(.tower-root[data-tower-mobile]) .tower-selection-toggle>span:last-child{display:block;color:var(--muted);font-size:16px}
:where(.tower-root[data-tower-mobile]) .tower-formation-dock.is-expanded .tower-selection-toggle>span:last-child{transform:rotate(180deg)}
:where(.tower-root[data-tower-mobile]) .tower-formation-quick{gap:4px;flex-wrap:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-formation-quick button{font-size:9px;padding:6px;min-height:34px;white-space:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-formation-power{margin:3px 0 9px;font-size:9px}
:where(.tower-root[data-tower-mobile]) .tower-formation-power small{font-size:8px}
:where(.tower-root[data-tower-mobile]) .tower-formation-summary>.tower-primary{min-height:44px;font-size:12px;padding:11px}
:where(.tower-root[data-tower-mobile]) .tower-saved-formations{padding:0;flex:0 0 auto;max-height:145px;overflow:hidden}
:where(.tower-root[data-tower-mobile]) .tower-saved-formations>summary{display:flex;align-items:center;gap:8px;list-style:none;padding:7px 16px;min-height:34px;cursor:pointer;background:var(--mobile-sheet-bg);color:var(--text);font-size:11px}
:where(.tower-root[data-tower-mobile]) .tower-saved-formations>summary::-webkit-details-marker{display:none}
:where(.tower-root[data-tower-mobile]) .tower-saved-formations .preset-dock-count{margin-left:auto;color:var(--muted);font-size:9px}
:where(.tower-root[data-tower-mobile]) .tower-saved-formations[open]>summary>span:last-child{transform:rotate(180deg)}
:where(.tower-root[data-tower-mobile]) .tower-saved-body{padding:0 16px 8px;max-height:90px;overflow:auto;overscroll-behavior:contain;background:var(--mobile-sheet-bg)}
:where(.tower-root[data-tower-mobile]) .tower-saved-body .preset-toolbar-heading{display:none}
:where(.tower-root[data-tower-mobile]) .tower-saved-body .preset-chip{font-size:10px;min-height:38px}
:where(.tower-root[data-tower-mobile]) .tower-run-heading{margin:16px 0 18px}
:where(.tower-root[data-tower-mobile]) .tower-run-heading h2{font-size:30px}
:where(.tower-root[data-tower-mobile]) .tower-run-heading h2>small{display:inline;margin-left:9px;font-size:10px}
:where(.tower-root[data-tower-mobile]) .tower-run-heading .tower-kicker{font-size:8px;margin-bottom:6px}
:where(.tower-root[data-tower-mobile]) .tower-run-heading .tower-text,:where(.tower-root[data-tower-mobile]) .tower-run-heading .tower-secondary{min-height:40px}
:where(.tower-root[data-tower-mobile]) .tower-run-layout{display:block}
:where(.tower-root[data-tower-mobile]) .tower-path{display:none}
:where(.tower-root[data-tower-mobile]) .tower-monster-art{max-width:135px}
:where(.tower-root[data-tower-mobile]) .tower-team:has(.tower-team-status:last-child){padding:14px 16px;margin-top:16px}
:where(.tower-root[data-tower-mobile]) .tower-team-status:last-child{margin-bottom:0;padding-bottom:0;border-bottom:0}
:where(.tower-root[data-tower-mobile]) .tower-command-summary{margin:0;padding:0 16px;min-height:38px;flex:none;background:var(--mobile-sheet-bg)}
:where(.tower-root[data-tower-mobile]) .tower-command-summary>span{gap:8px;min-width:0;flex-wrap:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-command-summary b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:where(.tower-root[data-tower-mobile]) .tower-command-summary>.tower-text{display:flex;align-items:center;gap:5px;min-height:38px;padding:7px 0 7px 8px;font-size:10px;white-space:nowrap}
:where(.tower-root[data-tower-mobile]) .tower-command-summary small{display:none}
:where(.tower-root[data-tower-mobile]) .tower-command [data-bottom-sheet-details]{padding:12px 16px 0}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card{padding:3px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card-v3{height:82px;aspect-ratio:auto}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__face{aspect-ratio:auto}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__art{font-size:30px;inset:8px 0 19px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__bottom{padding:5px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__title{font-size:10px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__meta,:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-card .card__affinities{display:none}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-meta{display:flex;align-items:center;justify-content:space-between;padding:7px 2px 3px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-hand-meta>b{font-size:8px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-energy>i{width:5px;height:9px}
:where(.tower-root[data-tower-mobile]) .tower-combat-hand{margin-bottom:14px}
:where(.tower-root[data-tower-mobile]) .tower-combat-hand h3{font-size:11px}
:where(.tower-root[data-tower-mobile]) .tower-combat-hand .tower-section-head>span{font-size:8px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-action-list{gap:6px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-action-list>button{min-height:42px;font-size:11px;flex:1;min-width:65px;padding:10px 8px}
:where(.tower-root[data-tower-mobile]) .tower-command .tower-action-description{font-size:10px;margin:10px 0 12px!important}
:where(.tower-root[data-tower-mobile]) .tower-command-footer{margin:8px 16px 0;padding:10px 0 calc(12px + env(safe-area-inset-bottom,0px));background:var(--mobile-sheet-bg);flex:none;gap:10px}
:where(.tower-root[data-tower-mobile]) .tower-command-footer>span{flex:1;min-width:0}
:where(.tower-root[data-tower-mobile]) .tower-command-footer b{max-width:none;font-size:10px}
:where(.tower-root[data-tower-mobile]) .tower-command-footer .tower-primary{min-width:130px;min-height:44px;font-size:12px;padding:10px 12px}

@media(max-width:360px){.tower-formation-summary,.tower-formation-dock [data-bottom-sheet-details]{padding-left:12px;padding-right:12px}.tower-formation-quick button{padding:6px 5px;font-size:8px}.tower-selection-toggle{font-size:9px;gap:5px}.tower-selection-toggle strong{font-size:15px}.tower-formation-summary-top{gap:5px}.tower-formation-dock .tower-picked .card-v3{max-width:95px}.tower-command-footer .tower-primary{min-width:114px;font-size:11px}}
@media(max-height:560px) and (max-width:800px){.tower-command .tower-hand-card .card-v3{height:68px}.tower-command .tower-hand-card .card__art{font-size:25px}.tower-formation-dock .tower-picked .card-v3{max-width:78px}.tower-formation-dock .tower-section-head{display:none}.tower-formation-dock [data-bottom-sheet-details]{padding-top:8px}.tower-command [data-bottom-sheet-details]{padding-top:8px}}
/* Combat cards stay in the document; only the action controls float. */
.tower-command.tower-inline-command{position:static;inset:auto;display:block;width:auto;max-height:none;margin:16px 0 0;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel);overflow:visible;box-shadow:none}.tower-inline-command .tower-combat-hand{margin-bottom:0}.tower-inline-command .tower-action-description{margin:12px 0!important}.tower-fixed-actions{background:#1c1c1c;border:1px solid var(--line);border-radius:10px;padding:16px;margin-top:16px}.tower-fixed-actions .tower-command-summary{margin-bottom:14px}.tower-fixed-actions .tower-command-footer{margin-left:0;margin-right:0}

.tower-root:where([data-tower-mobile])[data-tower-screen="battle"]{padding-bottom:calc(var(--tower-action-bar-height,0px) + 28px)}
:where(.tower-root[data-tower-mobile]) .tower-command.tower-inline-command{padding:15px;margin-top:16px;border-radius:12px;background:var(--panel)}
:where(.tower-root[data-tower-mobile]) .tower-inline-command>.tower-action-description{display:none}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions{position:fixed;inset:auto 12px calc(8px + var(--tower-action-viewport-bottom,0px));z-index:90;margin:0;padding:10px 16px 0;border:1px solid #454545;border-radius:12px;background:#1c1c1c;box-shadow:0 -5px 24px #0004}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions .tower-command-summary{min-height:26px;padding:0;margin:0 0 8px;background:#1c1c1c}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions .tower-command-summary>span{gap:9px}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions .tower-action-list{gap:6px}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions .tower-action-list>button{min-height:40px;padding:9px 8px;font-size:11px}
:where(.tower-root[data-tower-mobile]) .tower-fixed-actions .tower-command-footer{margin:10px 0 0;padding:9px 0 calc(10px + env(safe-area-inset-bottom,0px));background:#1c1c1c}
:where(.tower-root[data-tower-mobile]) .tower-inline-command .tower-hand{grid-template-columns:repeat(3,minmax(0,1fr))}
:where(.tower-root[data-tower-mobile]) .tower-inline-command .tower-hand-card .card-v3{height:90px}


/* Battle hand uses the scenario component; no compact card-height overrides. */
.tower-scenario-combat{margin-top:27px;min-width:0}.tower-scenario-combat>.tower-section-head{margin-bottom:14px;align-items:baseline}.tower-scenario-combat>.tower-section-head h3{font-size:12px;font-weight:500}.tower-scenario-combat>.tower-section-head>span{font-size:9px;color:var(--muted)}.tower-direct-hint{margin:14px 0 0!important;font-size:10px;line-height:1.8;color:var(--muted)}.tower-direct-hint b{font-weight:500;color:var(--text)}
@media(max-width:480px){.tower-scenario-combat>.tower-section-head{align-items:flex-start;flex-direction:column;gap:6px}.tower-scenario-combat>.tower-section-head h3{font-size:13px}.tower-direct-hint{font-size:9px}}

.tower-root .tower-balance-note{display:flex;flex-wrap:wrap;gap:3px 14px;margin:-8px 0 20px;font-size:11px;line-height:1.8;color:var(--muted)}
.tower-balance-note b{color:var(--text);font-weight:500}

.tower-enemy-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:12px 0 0;padding:9px 0;border-bottom:1px solid var(--line);border-top:1px solid var(--line);text-align:center}
.tower-enemy-stats>div{min-width:0}
.tower-enemy-stats dt{font-size:9px;line-height:1.5;color:var(--muted);font-weight:400}
.tower-enemy-stats dd{margin:3px 0 0;font-size:12px;line-height:1.4;font-weight:500;font-variant-numeric:tabular-nums}
.tower-root .tower-balance-totals{margin:-13px 0 20px;color:var(--muted);font-size:10px;line-height:1.7}
@media(max-width:520px){.tower-enemy-stats{gap:2px;margin-top:9px;padding:7px 0}.tower-enemy-stats dt{font-size:8px}.tower-enemy-stats dd{font-size:10px}}

/* Use the scenario formation's full-width inventory, unpadded card buttons and spacing. */
.tower-formation-layout{display:block}

.tower-root #tower-inventory-scroll{height:var(--tower-inventory-height,540px);max-height:none;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding:4px}
.tower-root .tower-inventory .tower-picker-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:22px 16px;align-content:start}
.tower-root .tower-pick{width:100%;padding:0;border:0;border-radius:12px}
.tower-root .tower-pick.selected{border:0}
.tower-root .tower-pick.selected .card-v3{outline:2px solid var(--accent);outline-offset:3px}
.tower-root .tower-pick-meta{min-height:0;flex-wrap:wrap;gap:6px;padding:12px 2px 0;font-size:10px}
.tower-root .tower-pick-meta span{overflow-wrap:anywhere}



.tower-root:not([data-tower-formation-size="wide"]) .tower-inventory .tower-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.tower-root[data-tower-formation-size="tablet"] .tower-inventory .tower-picker-grid{gap:22px 14px}
.tower-root[data-tower-formation-size="phone"] .tower-inventory .tower-picker-grid{gap:18px 8px}
.tower-root[data-tower-formation-size="phone"] .tower-pick-meta{gap:3px;padding:7px 2px 0;font-size:9px}
.tower-formation-dock{margin-top:24px}
.tower-root .tower-formation-dock .tower-picked{gap:16px;grid-template-columns:repeat(6,minmax(0,1fr))}
.tower-root .tower-formation-dock .tower-picked .card-v3{max-width:none}
.tower-root .tower-formation-dock .tower-empty-slot{max-height:none}
@media(min-width:801px){
 .tower-formation-dock{position:static}
 .tower-formation-dock [data-bottom-sheet-details]{padding:24px}
}

.tower-root:where([data-tower-mobile]) .tower-formation-dock .tower-picked{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tower-root:where([data-tower-mobile]) .tower-formation-dock [data-bottom-sheet-details]{padding:4px 18px 18px}
.tower-root:where([data-tower-mobile]) .tower-formation-dock .tower-picked .card-v3{max-width:none}

@media(max-width:359px){.tower-root .tower-formation-dock [data-bottom-sheet-details]{padding-inline:12px}}

/* dungeon-play/scenario/combat-hand.css */
/* Generated from the scenario hand styles in their original cascade order. */
.scenario-card{padding:0;border:0;background:none;color:var(--text);text-align:left;width:100%;min-width:0;border-radius:12px}
.collectible-face{display:block;position:relative;border-radius:12px}
.scenario-card .card-v3{max-width:none;pointer-events:none;transition:transform .15s}
.scenario-card:hover:not(:disabled) .card-v3{transform:translateY(-4px)}
.scenario-card.selected .collectible-face{outline:2px solid var(--accent);outline-offset:3px}
.card-check{position:absolute;right:8px;top:8px;width:23px;height:23px;display:grid;place-items:center;z-index:8;background:#17191ce8;border:1px solid #666b74;border-radius:50%;font-size:14px}
.scenario-card.selected .card-check{background:var(--accent);border-color:var(--accent);color:#101113}
.card-caption{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:12px 2px 0;font-size:10px;color:var(--muted);flex-wrap:wrap}
.card-caption b{font-weight:500;color:var(--text)}
.hand-section{margin-top:30px}
.hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.hand .card-caption{font-size:10px;display:grid;gap:4px}
.hand .card-check{right:5px;top:5px;width:19px;height:19px;font-size:11px}
.hand .section-heading small{font-size:10px}
@media(max-width:1100px){.hand{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.hand{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:520px){.card-caption{font-size:12px;padding-top:14px}
.hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px}
.hand .card-caption{font-size:10px}
.hand .card__desc{display:none}}
.scenario-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 16px}
.scenario-hand .scenario-card{align-self:start}
.scenario-hand .collectible-face{border-radius:12px}
.scenario-hand .card-v3{aspect-ratio:5/7}
.scenario-hand .scenario-card.selected .collectible-face{outline-offset:4px}
.scenario-hand .card-caption{padding:10px 5px 0;font-size:11px}
.hand-section{margin-top:32px}
@media(max-width:800px){.scenario-hand{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.scenario-hand{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
.scenario-hand .card-caption{font-size:11px}}
.scenario-hand>div{min-width:0}
.scenario-hand .card-caption{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.scenario-hand .hand-focus{display:flex;align-items:center;justify-content:space-between;gap:5px;color:var(--muted);font-size:10px;line-height:1.5}
.scenario-hand .focus-dots{display:flex;gap:4px;flex:none}
.scenario-hand .focus-dots i{width:5px;height:5px;border-radius:50%;background:#41464e}
.scenario-hand .focus-dots i.lit{background:var(--accent)}
.scenario-hand .hand-power{display:block;color:var(--accent);font-size:12px;font-weight:500;line-height:1.6}
.scenario-hand .scenario-card:disabled .hand-power{color:var(--muted)}
@media(max-width:520px){.scenario-hand .hand-power{font-size:11px}}
.hand-section>.action-submit{width:100%;margin-top:12px}
.scenario-hand{grid-template-columns:repeat(6,minmax(0,165px));gap:18px 12px}
@media(max-width:1100px){.scenario-hand{grid-template-columns:repeat(4,minmax(0,165px))}}
@media(max-width:680px){.scenario-hand{grid-template-columns:repeat(3,minmax(0,165px))}}
@media(max-width:520px){.scenario-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 8px}
.scenario-hand .card-caption{padding:7px 2px 0;font-size:9px}
.scenario-hand .hand-focus{gap:2px;font-size:9px}
.scenario-hand .focus-dots{gap:2px}
.scenario-hand .focus-dots i{width:4px;height:4px}
.scenario-hand .hand-power{font-size:10px}}
.card-action-slot{min-height:46px;margin-top:12px}
.card-action-dock>.button{display:block;width:100%;margin:0}
.card-action-dock.is-docked{position:fixed;z-index:100;bottom:calc(var(--card-action-bottom,0px) + 12px + env(safe-area-inset-bottom,0px));padding:12px;border:1px solid var(--line);border-radius:12px;background:#191b1e;box-shadow:0 8px 32px #0008}
@media(max-width:520px){.card-action-dock.is-docked{padding:10px;bottom:calc(var(--card-action-bottom,0px) + 8px + env(safe-area-inset-bottom,0px))}}
.card-popup-actions .ability-power[data-power-change]{white-space:nowrap;font-variant-numeric:tabular-nums}
.card-popup-actions .ability-power[data-power-change="positive"]{color:#8ed4ef}
.card-popup-actions .ability-power[data-power-change="negative"]{color:#f29b8f}
@media(max-width:360px){.card-popup-actions>li>button:has(.ability-power[data-power-change]){padding-inline:3px;gap:2px}
.card-popup-actions>li>button:has(.ability-power[data-power-change]) .direct-ability{gap:2px}
.card-popup-actions>li>button:has(.ability-power[data-power-change]) .direct-ability .icon{width:14px;height:14px}
.card-popup-actions .ability-power[data-power-change]{font-size:11px}}
.hand-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:27px 0 14px}
.hand-heading h3{font-size:12px;font-weight:500;margin:0;color:#d2d8c5}
.hand-heading>span{font-size:9px;color:#8b9c7d}
.scenario-combat-hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.hand-card{border:1px solid #4a5a40;border-radius:8px;background:#1e2b20;padding:14px 5px 12px;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;position:relative}
.hand-card:hover:not(:disabled){border-color:#8c9d70}
.hand-card.selected{border-color:#d5bd7f;background:#3a3d2777;box-shadow:0 0 0 1px #d5bd7f33}
.hand-card:disabled{opacity:.43}
.hand-portrait{font-size:30px}
.hand-card strong{font-size:10px;font-weight:500;line-height:1.5;word-break:keep-all}
.hand-card small{font-size:8px;line-height:1.6;color:#a1b08e;min-height:26px;word-break:keep-all}
.hand-card em{font-size:8px;font-style:normal;color:#a0aa97;line-height:1.5}
@media(max-width:1100px){.scenario-combat-hand{grid-template-columns:repeat(3,minmax(0,1fr))}
.hand-card small{min-height:13px}
.hand-card{padding:12px 7px}
.hand-heading{align-items:flex-start;flex-direction:column;gap:6px}}
@media(max-width:480px){.hand-heading>span{line-height:1.6}
.hand-card{padding:12px 5px;gap:7px}
.hand-card small{font-size:8px;min-height:26px}
.hand-portrait{font-size:26px}
.scenario-combat-hand{gap:7px}}
.hand-heading h3{color:var(--text);font-size:14px}
.hand-heading>span{color:var(--muted)}
.scenario-combat-hand{grid-template-columns:repeat(6,minmax(0,165px));justify-content:center;gap:18px 12px}
.hand-card{display:flex;align-items:stretch;gap:0;padding:0;border:0;border-radius:0;background:none;text-align:left;color:var(--text);align-self:start;opacity:1}
.hand-card:hover:not(:disabled){background:none;border:0}
.hand-card.selected{background:none;border:0;box-shadow:none}
.hand-card .card-v3{max-width:none;transform:none}
.hand-card .card__tilt{box-shadow:0 8px 20px #0007}
.hand-card .card__face{outline:1px solid transparent;outline-offset:3px}
.hand-card.selected .card__face{outline:2px solid var(--accent)}
.hand-card .card-v3 .card__title{--card-title-size:clamp(10px,11cqi,22px);font-weight:900;line-height:1.2}
.hand-card .card-v3 .card__sub{font-size:clamp(6px,5cqi,10px);line-height:1.65;white-space:normal;word-break:keep-all}
.hand-card .card-v3 .card__desc{font-size:clamp(6px,4.4cqi,9px);color:#ffffff80}
.hand-caption{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:12px 2px 0}
.hand-card:disabled{opacity:.43}
.hand-card:disabled .card-power,.hand-card:disabled .card-power b{color:var(--muted)}
.hand-card em{margin-top:8px;color:var(--muted);font-size:9px;min-height:14px;text-align:center}
.hand-card:focus-visible{outline:2px solid var(--accent);outline-offset:6px;border-radius:12px}
@media(max-width:1100px){.scenario-combat-hand{grid-template-columns:repeat(3,minmax(0,165px));gap:18px 14px}}
@media(max-width:800px){.scenario-combat-hand{grid-template-columns:repeat(3,minmax(0,165px))}}
@media(max-width:480px){.hand-heading h3{font-size:13px}
.scenario-combat-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:17px 9px}
.hand-caption{padding-top:10px;gap:4px}
.hand-card em{font-size:8px}}
.scenario-combat-hand>div{min-width:0}
.scenario-combat-hand .scenario-card{width:100%;align-self:start}
.scenario-combat-hand .card-caption{font-family:inherit}
.scenario-combat-hand .hand-focus{font-size:10px}
.scenario-combat-hand .hand-power{font-size:12px}
.scenario-combat-hand .card-v3{max-width:none}
@media(max-width:480px){.scenario-combat-hand .hand-focus{font-size:9px}
.scenario-combat-hand .hand-power{font-size:11px}}
.card-affinity-bar{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-height:22px;margin-top:6px}
.hand-attribute{display:inline-flex;align-items:center;flex:none;padding-right:6px;border-right:1px solid var(--line-strong);color:var(--attribute-color)}
.hand-attribute .icon{display:block;width:16px;height:16px;flex:none}
.inactive-traits{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:3px;min-width:0}
.inactive-trait{display:inline-flex;flex:none;opacity:.45;color:#939aa3}
.inactive-trait .icon{display:block;width:14px;height:14px;flex:none}
.card-direct-actions .direct-ability,.card-direct-hint .direct-ability{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;color:var(--text)}
.direct-ability .icon{display:block;width:18px;height:18px;flex:none;color:var(--gold)}
.card-direct-actions .direct-ability strong{font-size:10px;white-space:nowrap}
.card-direct-hint .direct-ability b{color:var(--text);font-size:11px;white-space:nowrap}
.direct-ability .ability-power{font-style:normal;color:var(--accent);font-size:12px;margin-left:2px}
.card-direct-actions .ability-power{color:var(--accent);font-size:12px;flex:none}
@media(max-width:480px){.card-affinity-bar{min-height:20px;margin-top:5px;gap:5px}
.hand-attribute{padding-right:5px}
.hand-attribute .icon{width:13px;height:13px}
.inactive-traits{gap:2px}
.inactive-trait .icon{width:12px;height:12px}
.card-direct-actions .direct-ability strong{font-size:11px}
.card-direct-hint .direct-ability b{font-size:10px}
.direct-ability .icon{width:18px;height:18px}}
.card-action-frame{position:relative;min-width:0}
.card-action-popup{position:absolute;inset:0 0 auto;aspect-ratio:5/7;z-index:15;display:block;border:1px solid #c8ff6980;border-radius:8.209% / 5.863%;background:#080b10df;box-shadow:inset 0 0 28px #0006}
.card-popup-close{position:absolute;top:6px;right:6px;z-index:2;display:grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #555d68;border-radius:5px;background:#23272de8;color:var(--text)}
.card-popup-close:hover{border-color:var(--accent)}
.card-popup-close .icon{width:13px;height:13px;display:block}
.card-popup-actions{position:absolute;inset:34px 10px 10px;display:flex;flex-direction:column;justify-content:flex-start;gap:6px;margin:0;padding:0;list-style:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none}
.card-popup-actions>li{flex:none;min-width:0}
.card-popup-actions>li>button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:44px;padding:10px 9px;border:1px solid #454b53;border-radius:8px;background:#262a2ff5;color:var(--text)}
.card-popup-actions>li>button:not(:disabled):hover{border-color:#77818e;background:#343a42}
.card-popup-actions .direct-ability{display:inline-flex;align-items:center;gap:5px;min-width:0;color:var(--text)}
.card-popup-actions .direct-ability .icon{width:20px;height:20px;color:#b5beca;flex:none;display:block}
.card-popup-actions strong{font-size:12px;font-weight:500;white-space:nowrap}
.card-popup-actions .ability-power{color:#e1e5eb;font-size:14px;flex:none}
.available-trait{display:inline-flex;flex:none;color:#c1c8d1}
.available-trait .icon{display:block;width:14px;height:14px;flex:none}
@media(max-width:480px){.card-popup-close{top:4px;right:4px;width:22px;height:22px;border-radius:5px}
.card-popup-close .icon{width:12px;height:12px}
.card-popup-actions{inset:30px 5px 4px;gap:4px}
.card-popup-actions>li>button{min-height:36px;padding:7px 6px;gap:3px;border-radius:6px}
.card-popup-actions .direct-ability{gap:3px}
.card-popup-actions .direct-ability .icon{width:16px;height:16px}
.card-popup-actions strong{font-size:10px}
.card-popup-actions .ability-power{font-size:12px}
.available-trait .icon{width:12px;height:12px}}
.card-popup-actions>li>button:disabled{opacity:.4;cursor:not-allowed}
.card-popup-supply-row{border-top:1px solid #555d6855;padding-top:6px}
.card-popup-actions .card-popup-supply{background:#22262bf5;border-color:#454b53}
.card-popup-actions .card-popup-supply:not(:disabled):hover{border-color:#77818e;background:#343a42}
@media(max-width:480px){.card-popup-supply-row{padding-top:4px}}
@media(max-width:360px){.card-affinity-bar{gap:4px}
.hand-attribute{padding-right:4px}
.hand-attribute .icon{width:12px;height:12px}
.inactive-trait .icon,.available-trait .icon{width:10px;height:10px}}
.card-popup-actions{--popup-fade-size:20px;--popup-top-fade:#000;--popup-bottom-fade:#000;-webkit-mask-image:linear-gradient(to bottom,var(--popup-top-fade) 0,#000 var(--popup-fade-size),#000 calc(100% - var(--popup-fade-size)),var(--popup-bottom-fade) 100%);mask-image:linear-gradient(to bottom,var(--popup-top-fade) 0,#000 var(--popup-fade-size),#000 calc(100% - var(--popup-fade-size)),var(--popup-bottom-fade) 100%)}
.card-popup-actions::-webkit-scrollbar{display:none;width:0;height:0}
.card-popup-actions.has-previous-items{--popup-top-fade:transparent}
.card-popup-actions.has-next-items{--popup-bottom-fade:transparent}
@media(max-width:480px){.card-popup-actions{--popup-fade-size:14px}}
.supply-picker .scenario-card{padding:0;background:transparent;border:0;border-radius:0;color:var(--text)}
.supply-picker .scenario-card:disabled{opacity:.35}
.supply-picker .card-caption{color:var(--text)}
.event-stage .hand-section>[data-execute-event]:only-child{margin-top:0}
.v2-event-hand .hand-power{display:none}
#encounter-view[data-encounter-kind="battle"] .hand-heading{margin-top:18px;margin-bottom:12px}

/* tower-play/scenario-standard.css */
/* Scenario is the visual reference. See docs/design-system/scenario-standard.md.
   The host already supplies its outer page gutter. These are the scenario iframe's
   inner gutters, applied once to the whole tower screen rather than only its cards. */
.tower-root{--bg:#101113;--panel:#191b1e;--line:#2a2d31;--text:#f2f3ee;--muted:#95999f;--accent:#c8ff69}
.tower-content{padding:48px 36px 80px;min-width:0}
.tower-root[data-tower-formation-size="compact"] .tower-content{padding:32px 24px 60px}
.tower-root[data-tower-formation-size="tablet"] .tower-content{padding:28px 18px 52px}
.tower-root[data-tower-formation-size="phone"] .tower-content{padding:26px 12px 48px}
.tower-root .tower-kicker{font-size:10px;letter-spacing:.2em;line-height:1.6;margin-bottom:14px}
.tower-root .tower-panel{border-radius:14px;padding:24px}
.tower-root .tower-primary,.tower-root .tower-secondary{padding:12px 18px;font-size:14px;font-weight:600;line-height:1.4;border-radius:8px;min-height:44px}
.tower-root .tower-secondary{background:var(--panel,#191b1e)}
.tower-root .tower-secondary:hover:not(:disabled){border-color:#69715e}
.tower-root .tower-primary:hover:not(:disabled){background:#daff9c;filter:none}
.tower-root .tower-primary:is([data-tower="formation"],[data-tower="resume"],[data-tower="start"],[data-tower="next"]){font-weight:700}
.tower-root .tower-text{font-size:12px;padding:8px 0}
.tower-root .tower-note{font-size:11px;line-height:1.8}

/* Lobby: the same title, prose, panel and primary-action hierarchy as scenario. */
.tower-hero{border-radius:14px;grid-template-columns:1.1fr 1fr}
.tower-root .tower-hero-copy{padding:32px 0 32px 24px;min-width:0}
.tower-root .tower-hero-copy h2{font-size:var(--tower-heading-size,37px);line-height:1.24;letter-spacing:-.045em;font-weight:600;margin-bottom:18px}
.tower-root .tower-hero-copy>p:not(.tower-kicker){font-size:14px;line-height:1.8}
.tower-root .tower-hero-tags{font-size:11px;line-height:1.6;gap:14px;margin:24px 0}
.tower-root .tower-hero-copy>small{font-size:11px;line-height:1.8;margin-top:12px}
.tower-root .tower-lobby-bottom{gap:20px;margin-top:20px}
.tower-root .tower-lobby-bottom h3{font-size:21px;line-height:1.5;letter-spacing:-.035em;margin-bottom:14px}
.tower-root .tower-how b{font-size:14px;font-weight:600;line-height:1.5}
.tower-root .tower-how li>span{font-size:11px;line-height:1.8}
.tower-root .tower-how li:before{font-size:10px}
.tower-root .tower-reward{font-size:11px;line-height:1.5;border-radius:8px;background:#101113}
.tower-root .tower-preview-note{font-size:11px;line-height:1.8}

/* Formation: align heading, search and card list on a single content edge. */
.tower-formation>.tower-section-head{align-items:flex-start;gap:30px;margin-bottom:28px}
.tower-formation>.tower-section-head>div{min-width:0}
.tower-root .tower-formation>.tower-section-head h2{font-size:var(--tower-heading-size,37px);font-weight:700;line-height:1.24;letter-spacing:-.045em;word-break:keep-all;margin-bottom:18px}
.tower-root .tower-formation>.tower-section-head p:not(.tower-kicker){font-size:14px;line-height:1.8;margin:0}
.tower-root .tower-formation>.tower-section-head>.tower-secondary{font-size:11px;min-height:0;padding:8px 12px;white-space:nowrap}
.tower-root .tower-inventory .tower-picker-tools{margin-bottom:18px}
.tower-root .tower-pick .card-v3{pointer-events:none}
.tower-root .tower-picker-tools input{font-family:inherit;font-size:14px;line-height:1.4;padding:12px 16px;min-height:44px}
.tower-root .tower-formation-dock{border-radius:14px}
.tower-root .tower-selection-toggle{font-size:12px;line-height:18px;color:#e5e5e5;gap:6px}
.tower-root .tower-selection-toggle strong{font-size:16px;font-weight:600;color:var(--accent)}
.tower-root .tower-selection-toggle small{font-size:11px;font-weight:400;color:#a6a6a6}
.tower-root .tower-formation-quick{gap:6px}
.tower-root .tower-formation-quick button{min-height:32px;padding:5px 8px;border-radius:7px;background:#2c2c2c;border-color:#505050;color:#d5d5d5;font-size:10px;font-weight:400;line-height:1.4}
.tower-root .tower-formation-quick button:hover:not(:disabled){background:#353535;border-color:#686868}
.tower-root .tower-formation-power{font-size:10px;line-height:1.5}
.tower-root .tower-formation-power b{font-size:10px;font-weight:600}
.tower-root .tower-formation-power small{font-size:10px}
.tower-root .tower-formation-summary>.tower-primary{min-height:44px;padding:11px 12px;border-radius:10px;font-size:13px}
.tower-root .tower-formation-dock .tower-section-head h3{font-size:16px;font-weight:600;line-height:1.5}
.tower-root .tower-formation-dock .tower-section-head>span{font-size:11px;line-height:1.7}

/* Battle keeps its scenario hand component and content-specific enemy layout. */
.tower-root .tower-run-heading{margin:0 0 28px}
.tower-root .tower-run-heading h2{font-size:var(--tower-heading-size,37px);font-weight:600;line-height:1.24;letter-spacing:-.045em}
.tower-root .tower-run-heading h2>span{font-size:21px}
.tower-root .tower-run-heading h2>small{font-size:12px;line-height:1.8}
.tower-root .tower-run-meta>.tower-secondary{min-height:36px;padding:8px 12px;font-size:11px}
.tower-root .tower-battlefield>.tower-section-head h3,.tower-root .tower-scenario-combat>.tower-section-head h3{font-size:14px;font-weight:600;line-height:1.5}
.tower-root .tower-section-head>span{font-size:11px;line-height:1.6}
.tower-root .tower-field-note,.tower-root .tower-direct-hint,.tower-root .tower-ledger,.tower-root .tower-combat-log{font-size:11px;line-height:1.8}
.tower-root .tower-team-status>div>span{font-size:11px}
.tower-root .tower-result{padding:32px 24px}
.tower-root .tower-result+.tower-team .tower-team-status{margin-bottom:0;padding-bottom:0;border-bottom:0}
.tower-root .tower-result h2{font-size:21px;font-weight:600;line-height:1.5;letter-spacing:-.035em;margin:14px 0}
.tower-root .tower-result>p:not(.tower-kicker){font-size:12px;line-height:1.8}
.tower-root .tower-result>small{font-size:11px;line-height:1.8}
/* Existing user-confirmed result action size and emphasis. */
.tower-root .tower-result-actions>button{font-size:12px}

/* Scenario preset floating-popup theme: neutral surface, restrained typography,
   a scrollable body, and consistent header/footer separation. */
.tower-dialog{font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,'Noto Sans KR',sans-serif;color:#f2f3ee;background:#1c1c1c;border:1px solid #454545;border-radius:18px;padding:0;width:480px;max-width:calc(100vw - 24px);max-height:82dvh;overflow:hidden;box-shadow:0 24px 100px #0009}
.tower-dialog[open]{display:flex;flex-direction:column}
.tower-dialog::backdrop{background:#08090bd4;backdrop-filter:blur(5px)}
.tower-dialog>.tower-dialog-heading{height:auto;min-height:0;display:block;flex:none;padding:18px 20px 14px;border-bottom:1px solid #ffffff0e}
.tower-dialog .tower-dialog-heading h2{margin:0;font-size:17px;font-weight:600;line-height:1.5;letter-spacing:-.5px}
.tower-dialog>.tower-dialog-body{display:block;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 20px}
.tower-dialog .tower-dialog-body p{font-size:12px;line-height:1.8;color:#95999f;margin:0 0 18px}
.tower-dialog .tower-dialog-body>p:last-child{margin-bottom:0}
.tower-dialog .tower-dialog-body>.tower-rewards{margin-bottom:18px}
.tower-dialog>.tower-dialog-footer{display:block;flex:none;padding:12px 20px 16px;border-top:1px solid #ffffff0e;background:#1c1c1c}
.tower-dialog-footer>div{display:flex;justify-content:flex-end;gap:8px}
.tower-dialog-footer>button{width:100%}
.tower-dialog-footer .tower-primary,.tower-dialog-footer .tower-secondary{font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;min-height:44px;padding:11px 12px;border-radius:10px}
.tower-dialog-footer .tower-secondary{background:#1c1c1c;border-color:#505050;color:#d5d5d5}
.tower-dialog .tower-guide-steps p{font-size:11px;line-height:1.7;margin:0}
.tower-dialog .tower-guide-foot{font-size:10px;line-height:1.8;margin:20px 0 0}

.tower-root[data-tower-formation-size="tablet"] .tower-formation>.tower-section-head{gap:18px}
.tower-root[data-tower-formation-size="tablet"] .tower-formation>.tower-section-head p:not(.tower-kicker){font-size:12px}
.tower-root[data-tower-formation-size="phone"] .tower-formation>.tower-section-head{gap:10px;margin-bottom:23px}
.tower-root[data-tower-formation-size="phone"] .tower-formation>.tower-section-head h2{font-size:29px}
.tower-root[data-tower-formation-size="phone"] .tower-formation>.tower-section-head .tower-kicker{display:block;font-size:8px}
.tower-root[data-tower-formation-size="phone"] .tower-formation>.tower-section-head p:not(.tower-kicker){font-size:11px;line-height:1.8}
.tower-root[data-tower-formation-size="phone"] .tower-formation>.tower-section-head>.tower-secondary{padding:8px;font-size:10px}
.tower-root[data-tower-formation-size="phone"] .tower-hero-copy>p:not(.tower-kicker){font-size:11px;line-height:1.8}


.tower-root:where([data-tower-mobile]) .tower-panel{padding:20px 16px}
.tower-root:where([data-tower-mobile]) .tower-hero{grid-template-columns:1fr;min-height:0}
.tower-root:where([data-tower-mobile]) .tower-hero-copy{padding:24px 20px}
.tower-root:where([data-tower-mobile]) .tower-hero-copy h2{font-size:29px}
.tower-root:where([data-tower-mobile]) .tower-hero-copy .tower-kicker{font-size:8px;letter-spacing:.2em}
.tower-root:where([data-tower-mobile]) .tower-hero-copy>small{font-size:10px}
.tower-root:where([data-tower-mobile]) .tower-hero-tags{font-size:10px;gap:10px;margin:20px 0}
.tower-root:where([data-tower-mobile]) .tower-hero-copy>.tower-primary{width:100%;font-size:13px;min-height:44px;border-radius:10px}
.tower-root:where([data-tower-mobile]) .tower-drawing{position:absolute;right:-10px;bottom:0;width:160px;height:100%;min-height:0;opacity:.16;transform:scale(.9);transform-origin:bottom right;pointer-events:none;margin:0}
.tower-root:where([data-tower-mobile]) .tower-lobby-bottom h3{font-size:21px}
.tower-root:where([data-tower-mobile]) .tower-formation-dock.bottom-sheet-surface{left:calc(var(--tower-frame-left,0px) + 12px);right:calc(var(--tower-frame-right,0px) + 12px);border-radius:18px;box-shadow:0 -8px 36px #0007}
.tower-root:where([data-tower-mobile]) .tower-formation-dock>.bottom-sheet-handle{height:28px;min-height:28px}
.tower-root:where([data-tower-mobile]) .tower-formation-dock .bottom-sheet-handle>span{width:40px;height:4px;background:#666666}
.tower-root:where([data-tower-mobile]) .tower-formation-dock .tower-section-head{gap:8px;flex-wrap:wrap}
.tower-root:where([data-tower-mobile]) .tower-formation-dock .tower-section-head h3{font-size:16px}
.tower-root:where([data-tower-mobile]) .tower-formation-dock .tower-section-head>span{font-size:10px}
.tower-root:where([data-tower-mobile]) .tower-formation-summary{padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid transparent}
.tower-root:where([data-tower-mobile]) .tower-formation-dock.is-expanded .tower-formation-summary{border-top-color:#ffffff0e}
.tower-root:where([data-tower-mobile]) .tower-selection-toggle{min-height:32px;gap:6px;font-size:12px}
.tower-root:where([data-tower-mobile]) .tower-selection-toggle strong{font-size:16px;margin-left:0}
.tower-root:where([data-tower-mobile]) .tower-selection-toggle>span:first-child{display:flex;align-items:baseline;gap:6px}
.tower-root:where([data-tower-mobile]) .tower-selection-toggle>span:last-child{font-size:14px}
.tower-root:where([data-tower-mobile]) .tower-formation-quick{gap:6px}
.tower-root:where([data-tower-mobile]) .tower-formation-quick button{font-size:10px;padding:5px 8px}
.tower-root:where([data-tower-mobile]) .tower-formation-power{margin:6px 0 10px}
.tower-root:where([data-tower-mobile]) .tower-saved-formations{max-height:190px}
.tower-root:where([data-tower-mobile]) .tower-saved-formations>summary{padding:10px 16px;min-height:40px;font-size:12px}
.tower-root:where([data-tower-mobile]) .tower-saved-formations .preset-dock-count{font-size:10px}
.tower-root:where([data-tower-mobile]) .tower-saved-body{padding-bottom:12px;max-height:140px}
.tower-root:where([data-tower-mobile]) .tower-run-heading{gap:10px;margin:0 0 23px;align-items:flex-start}
.tower-root:where([data-tower-mobile]) .tower-run-heading h2{font-size:29px}
.tower-root:where([data-tower-mobile]) .tower-run-heading .tower-kicker{font-size:8px}
.tower-root:where([data-tower-mobile]) .tower-run-heading h2>small{font-size:11px;display:block;margin:8px 0 0}
.tower-root:where([data-tower-mobile]) .tower-run-meta{gap:6px}
.tower-root:where([data-tower-mobile]) .tower-run-meta>span{font-size:10px}
.tower-root:where([data-tower-mobile]) .tower-run-meta>.tower-secondary{font-size:9px;padding:8px;min-height:36px}
.tower-root:where([data-tower-mobile]) .tower-battlefield>.tower-section-head{align-items:flex-start;gap:8px}
.tower-root:where([data-tower-mobile]) .tower-battlefield>.tower-section-head h3{font-size:12px;line-height:1.7}
.tower-root:where([data-tower-mobile]) .tower-battlefield>.tower-section-head>span{font-size:10px;white-space:nowrap}
.tower-root:where([data-tower-mobile]) .tower-scenario-combat>.tower-section-head h3{font-size:13px}
.tower-root:where([data-tower-mobile]) .tower-scenario-combat>.tower-section-head>span{font-size:10px}
.tower-root:where([data-tower-mobile]) .tower-result{padding:24px 16px}
.tower-dialog:where([data-tower-mobile]){max-height:82dvh}
.tower-dialog:where([data-tower-mobile])>.tower-dialog-heading{padding:16px 16px 12px}
.tower-dialog:where([data-tower-mobile]) .tower-dialog-heading h2{font-size:16px}
.tower-dialog:where([data-tower-mobile])>.tower-dialog-body{padding:14px 16px}
.tower-dialog:where([data-tower-mobile])>.tower-dialog-footer{padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px))}
.tower-dialog:where([data-tower-mobile]) .tower-guide-steps>li{grid-template-columns:66px minmax(0,1fr);gap:12px}

@media(max-width:430px){
 .tower-root .tower-formation-summary-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
 .tower-root .tower-formation-quick{gap:4px}
 .tower-root .tower-formation-quick button{padding-inline:6px}
}
@media(max-width:359px){
 .tower-root .tower-formation-summary{padding-inline:12px}
 .tower-root .tower-formation-quick{gap:3px}
 .tower-root .tower-formation-quick button{font-size:9px;padding-inline:5px}
}

/* card-support.css */
.card-support-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);margin:auto;padding:20px;border:1px solid #454545;border-radius:20px;background:#1c1c1c;color:#f2f3ee;box-shadow:0 24px 80px #0009;overflow:auto;color-scheme:dark}.card-support-dialog::backdrop{background:#000b}.card-support-dialog [hidden]{display:none!important}.card-support-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#1c1c1c}.card-support-dialog h2{margin:0;font-size:19px}.card-support-dialog button,.support-entry-button{font:inherit;font-size:12px;border:1px solid #505050;border-radius:9px;background:#1c1c1c;color:#f2f3ee;min-height:38px;padding:8px 12px;cursor:pointer}.card-support-dialog button:disabled{opacity:.45;cursor:default}.card-support-dialog button.primary{background:#d4f66b;border-color:#d4f66b;color:#151515;font-weight:700}.card-support-dialog button:focus-visible,.support-entry-button:focus-visible{outline:2px solid #d4f66b;outline-offset:3px}.support-usage,.support-list-status{font-size:11px;line-height:1.7;color:#a4a4a4;overflow-wrap:anywhere}.support-list{height:min(430px,52dvh);overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable}.support-row{height:86px;box-sizing:border-box;border-bottom:1px solid #383838;display:flex;align-items:center;gap:12px;padding:10px 0}.support-row>div{flex:1;min-width:0}.support-row strong,.support-row span,.support-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.support-row strong{font-size:11px;color:#aaa;font-weight:400}.support-row span{font-size:14px;margin:3px 0}.support-row small{font-size:11px;color:#aaa}.support-row b{color:#f2f3ee}.support-row button{flex-shrink:0}.support-sentinel{height:1px}.card-support-dialog.is-detail{width:min(380px,calc(100vw - 24px))}.support-owner{margin:14px 0 10px;text-align:center;font-size:12px;color:#aaa}.support-card-face{width:min(260px,100%);margin:0 auto;container-type:inline-size}.support-card-face>.card{width:100%;margin:0;aspect-ratio:5/7;display:block}.support-card-stats{display:flex;justify-content:center;gap:20px;font-size:12px;margin:16px 0}.support-card-stats b{color:#d4f66b}.support-detail-error{color:#f3aaaa;font-size:12px}.support-detail footer{display:flex;gap:8px;background:#1c1c1c;position:sticky;bottom:-20px;padding:8px 0 4px}.support-detail footer button{flex:1}.support-profile-card{margin-top:22px}.support-profile-card h3{font-size:13px;margin:0 0 10px}.support-profile-summary{font-size:12px;line-height:1.7;color:#aaa}.support-profile-actions{display:flex;gap:8px;align-items:center}.support-formation-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0;font-size:11px;color:#aaa}.support-badge{display:block;position:absolute;left:4px;top:4px;z-index:2;padding:3px 6px;background:#1c1c1c;border:1px solid #d4f66b;border-radius:6px;color:#d4f66b;font-size:10px}.support-formation-row strong{color:#f2f3ee}.support-entry-button{font-size:11px;font-weight:600}.support-row [data-support-view]{font-size:11px}@media(max-width:359px){.card-support-dialog{padding:16px}.support-card-face{width:min(230px,100%)}}

.support-fee-note{text-align:center;font-size:10px;line-height:1.6;color:#aaa;margin:0 0 8px}

.tower-picked>button{position:relative}.tower-picked>button>.support-badge,.team-slot>.support-badge{position:absolute;display:inline-flex;align-items:center;left:4px;top:4px;right:auto;bottom:auto;width:auto;height:auto;padding:3px 5px;margin:0;font-family:inherit;font-size:10px;font-weight:600;line-height:1.2;border:1px solid #d4f66b;border-radius:5px;background:#1c1c1c;color:#d4f66b;z-index:2}

/* Scenario formation cards and the floating preset dialog palette/type scale. */
dialog.support-card-picker{width:1044px;max-width:calc(100vw - 24px);height:min(900px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:24px;border:1px solid #454545;border-radius:18px;background:var(--mobile-sheet-bg,#1c1c1c);overflow:hidden;color:var(--text);box-shadow:0 24px 100px #0009;font:14px/1.5 system-ui,-apple-system,sans-serif;--accent:#c8ff69}
.support-card-picker[open]{display:flex;flex-direction:column;gap:12px}
.support-card-picker>.close{display:grid;place-items:center;top:8px;right:8px;width:44px;height:44px;padding:0;border:0;border-radius:0;background:transparent;z-index:11;color:#bcbcbc}
.support-card-picker>.close svg{display:block;width:16px;height:16px;pointer-events:none}
.support-picker-heading{flex:none;margin:-24px -24px 0;padding:18px 64px 14px 20px;border-bottom:1px solid #ffffff0e;background:var(--mobile-sheet-bg,#1c1c1c)}
.support-picker-heading h2{margin:0;font-size:17px;font-weight:600;line-height:1.5;letter-spacing:-.5px}
.support-card-picker .standard-filter{flex:none;height:auto;margin:0}
.support-card-picker .standard-filter__controls{grid-template-columns:repeat(3,minmax(0,1fr));background:#1c1c1c}
.support-card-picker .standard-filter__trigger{border-color:#454545}
.support-picker-search{display:flex;flex:none;gap:10px;align-items:center}
.support-picker-search input{width:100%;min-width:0;height:44px;border:1px solid #505050;border-radius:8px;background:var(--mobile-sheet-bg,#1c1c1c);color:var(--text);padding:10px 12px;font:inherit;font-size:14px;line-height:20px}
.support-picker-search button{flex:none;min-height:38px;padding:9px 10px;border:1px solid #505050;border-radius:8px;background:var(--mobile-sheet-bg,#1c1c1c);color:#e3e3e3;font:inherit;font-size:11px;line-height:1.5}
.support-picker-scroller{min-height:80px;flex:1;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-width:thin;scrollbar-gutter:stable;padding:4px;outline-offset:2px}
.support-picker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:22px 16px;align-content:start}
.support-picker-grid .scenario-card{padding:0;border:0;background:none;color:var(--text);text-align:left;width:100%;min-width:0;border-radius:12px}
.support-picker-grid .collectible-face{display:block;position:relative;border-radius:12px}
.support-picker-grid .card-v3{width:100%;max-width:none;margin:0;pointer-events:none;transition:transform .15s}
.support-picker-grid .card__tilt{will-change:auto}
.support-picker-grid .scenario-card:hover:not(:disabled) .card-v3{transform:translateY(-4px)}
.support-picker-grid .scenario-card.selected .collectible-face{outline:2px solid #8b8b8b;outline-offset:3px}
.support-picker-grid .card-caption{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:12px 2px 0;font-size:10px;line-height:1.4;color:var(--muted);flex-wrap:wrap}
.support-picker-grid .card-caption b{font-weight:500;color:var(--text)}
.support-picker-spacer{grid-column:1/-1;margin-bottom:calc(-1 * var(--support-picker-gap,22px));pointer-events:none}
.support-picker-footer{display:flex;flex:none;flex-direction:column;gap:8px;margin:0 -24px -24px;padding:12px 20px 16px;border:0;border-top:1px solid #ffffff0e;background:var(--mobile-sheet-bg,#1c1c1c);text-align:left;font:inherit;color:inherit}
.support-picker-footer>.primary{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--accent);border-radius:10px;background:var(--accent);color:#1c1c1c;font:inherit;font-size:12px;font-weight:600;line-height:1.5}
.support-picker-footer>.primary:disabled{opacity:.4;cursor:default}
.support-picker-footer>.primary:not(:disabled):hover{background:var(--accent);border-color:var(--accent)}
.support-card-picker::backdrop{background:#08090bd4;backdrop-filter:blur(5px)}
.support-picker-search input:focus,.support-picker-search input:focus-visible{outline:none;box-shadow:none;border-color:var(--accent)}
.support-card-picker button:focus-visible,.support-picker-scroller:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.support-card-picker .support-picker-error{margin:0;font-size:11px;line-height:1.5;color:#f3aaaa}
.support-picker-error:empty{display:none}
.support-card-picker .support-picker-empty{grid-column:1/-1;margin:20px 0;font-size:12px;text-align:center;color:var(--muted)}
@media(max-width:800px){.support-picker-grid{gap:22px 14px}.support-picker-heading h2{font-size:16px}}
@media(max-width:680px){dialog.support-card-picker{padding:18px 12px 12px}.support-picker-heading{margin:-18px -12px 0;padding:16px 56px 12px 16px}.support-picker-heading h2{font-size:16px}.support-picker-footer{margin:0 -12px -12px;padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px))}.support-card-picker .standard-filter__trigger{gap:5px;padding-inline:8px}.support-card-picker .standard-filter__value{gap:5px}.support-card-picker .standard-filter__chevron{width:12px;height:12px}}
@media(max-width:520px){.support-picker-grid{gap:18px 8px}.support-picker-grid .card-caption{gap:3px;padding:7px 2px 0;font-size:9px}.support-picker-grid .card-caption span{overflow-wrap:anywhere}}
/* In a selection list, tapping the card always selects it, including its symbols. */
.support-picker-grid .collectible-face,.support-picker-grid .collectible-face *{pointer-events:none}

.support-earnings{margin-top:20px;padding-top:16px;border-top:1px solid #ffffff0e}
.support-earnings-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.support-earnings h3{margin:0;font-size:12px;font-weight:600}.support-earnings-heading>span{font-size:9px;color:var(--muted)}
.support-earnings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}
.support-earnings-grid>div{min-width:0;padding:12px 10px;border:1px solid #34383d;border-radius:9px;background:#1c1c1c}
.support-earnings-grid dt{font-size:10px;color:var(--muted);white-space:nowrap}.support-earnings-grid dd{display:flex;align-items:baseline;gap:3px;margin:9px 0 5px;font-size:20px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}.support-earnings-grid dd small{font-size:10px;font-weight:400;color:var(--muted)}
.support-earnings-grid>div>span{font-size:9px;color:var(--muted)}.support-earnings-grid>div:last-child dd{color:var(--lime)}
.support-earnings>.profile-hint{font-size:10px;line-height:1.7;margin:12px 0 0}.support-earnings-last{font-size:10px;color:var(--muted);line-height:1.7;margin:8px 0 0}
@media(max-width:359px){.support-earnings-grid{gap:5px}.support-earnings-grid>div{padding:10px 7px}.support-earnings-grid dt{font-size:9px}.support-earnings-grid dd{font-size:18px}.support-earnings-heading>span{font-size:8px}}

.support-profile-guide{margin-top:8px}
.support-profile-guide>summary{cursor:pointer;padding:8px 0;font-size:11px;line-height:1.5;color:var(--muted)}
.support-profile-guide>summary:focus-visible{outline:2px solid var(--lime);outline-offset:3px;border-radius:4px}
.support-profile-guide>.profile-hint{margin:4px 0 0;font-size:11px;line-height:1.7}

/* Search, filters and cards share one scroll row; keep the actual setting action visible. */
.support-card-picker[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.support-card-picker .support-picker-scroller{min-height:0;overflow-y:auto}
.support-picker-content{display:grid;gap:12px;min-width:0;align-content:start}
.support-card-picker>.support-picker-footer{min-height:0}

/* pack-shop.css */
#pack-shop-nav{margin-left:auto}#pack-shop-nav+#mailbox-nav{margin-left:0}#pack-shop-frame{color-scheme:dark}main:has(>#pack-shop-frame[data-mode="shop"]){padding:0;max-width:1400px}.pack-shop-nav{font-size:12px}@media(max-width:680px){.pack-shop-nav{font-size:11px;padding:7px 8px}}

/* ui/components.css */
/* UI source of truth. Component styles consume only mm-* tokens; legacy names stay intact. */
.mm-scope{
 --mm-bg:#101113;--mm-panel:#191b1e;--mm-sheet:#1c1c1c;--mm-text:#f2f3ee;--mm-muted:#95999f;--mm-line:#2a2d31;--mm-border:#454545;--mm-accent:#c8ff69;--mm-on-accent:#101113;--mm-danger:#eea49d;--mm-warning:#e3c284;--mm-success:#b5d7ae;
 --mm-font:'DM Sans','Noto Sans KR',-apple-system,BlinkMacSystemFont,sans-serif;
 --mm-text-small:10px;--mm-text-base:12px;--mm-text-emphasis:14px;
 --mm-control-sm:32px;--mm-control-md:40px;--mm-control-lg:44px;
 --mm-radius:8px;--mm-panel-radius:14px;--mm-dialog-radius:18px;--mm-space:4px;
 --r0:#b7bcc6;--r1:#79b7ff;--r2:#bc91ff;--r3:#ffd16d;--r4:#ff7eac;--r5:#e9e0ff;--r6:#b5e99f;
 --standard-filter-bg:#1c1c1c;--mobile-sheet-bg:#1c1c1c;
 --text:var(--mm-text);--muted:var(--mm-muted);--lime:var(--mm-accent);--accent:var(--mm-accent);--line:var(--mm-line);--panel:var(--mm-panel);
 font-family:var(--mm-font);font-size:var(--mm-text-base);line-height:1.6;color:var(--mm-text);color-scheme:dark;
}

.mm-scope,.mm-scope *{box-sizing:border-box}.mm-scope [hidden]{display:none!important}.mm-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.mm-icon{display:block;flex:none;width:18px;height:18px}.mm-icon[data-size=xs]{width:12px;height:12px}.mm-icon[data-size=sm]{width:16px;height:16px}.mm-icon[data-size=lg]{width:24px;height:24px}
.mm-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:var(--mm-control-md);padding:10px 16px;border:1px solid var(--mm-border);border-radius:var(--mm-radius);background:var(--mm-sheet);color:var(--mm-text);font:600 var(--mm-text-base)/18px var(--mm-font);text-decoration:none;cursor:pointer;vertical-align:middle;max-width:100%}
.mm-button[data-size=sm]{min-height:var(--mm-control-sm);padding:6px 12px;font-size:var(--mm-text-base);gap:5px}.mm-button[data-size=lg]{min-height:var(--mm-control-lg);padding:11px 20px;line-height:20px;font-size:var(--mm-text-emphasis)}.mm-button[data-icon-only]{padding:10px;aspect-ratio:1}.mm-button[data-size=sm][data-icon-only]{padding:7px}.mm-button[data-block]{display:flex;width:100%}.mm-button[data-variant=primary]{background:var(--mm-accent);border-color:var(--mm-accent);color:var(--mm-on-accent)}.mm-button[data-variant=ghost]{background:transparent;border-color:transparent}.mm-button[data-variant=danger]{color:var(--mm-danger)}
.mm-button:not(:disabled):hover{border-color:#777}.mm-button[data-variant=primary]:not(:disabled):hover{background:#daff9c;border-color:#daff9c}.mm-button:disabled,.mm-chip:disabled{opacity:.4;cursor:not-allowed}.mm-scope :is(.mm-button,.mm-chip,.mm-input,.mm-select,.mm-choice input,.mm-tabs button,.mm-card,.mm-accordion summary):focus-visible{outline:2px solid var(--mm-accent);outline-offset:3px}
.mm-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.mm-spin{display:inline-flex;animation:mm-spin 1s linear infinite}@keyframes mm-spin{to{transform:rotate(360deg)}}
.mm-badge{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 7px;border:1px solid var(--mm-border);border-radius:5px;color:var(--mm-muted);font-size:var(--mm-text-small);line-height:1.5;vertical-align:middle}.mm-badge[data-size=md]{padding:5px 9px;font-size:var(--mm-text-base)}.mm-badge b{font-weight:600;font-variant-numeric:tabular-nums}.mm-badge[data-tone=accent]{color:var(--mm-accent)}.mm-badge[data-tone=success]{color:var(--mm-success)}.mm-badge[data-tone=warning]{color:var(--mm-warning)}.mm-badge[data-tone=danger]{color:var(--mm-danger)}
.mm-chip{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;padding:7px 10px;border:1px solid var(--mm-border);border-radius:8px;background:var(--mm-sheet);color:var(--mm-muted);font:400 var(--mm-text-base)/1.5 var(--mm-font);cursor:pointer}.mm-chip[aria-pressed=true]{color:var(--mm-text);border-color:#929292}.mm-chip[aria-pressed=true] .mm-icon{color:var(--mm-accent)}.mm-chip small{font-size:var(--mm-text-small)}.mm-chip:hover:not(:disabled){border-color:#777;background:var(--mm-sheet)}
.mm-input,.mm-select{display:block;width:100%;min-width:0;max-width:100%;min-height:var(--mm-control-md);padding:10px 12px;border:1px solid var(--mm-border);border-radius:8px;background:var(--mm-sheet);color:var(--mm-text);font:400 var(--mm-text-base)/1.5 var(--mm-font)}.mm-input[data-size=sm],.mm-select[data-size=sm]{min-height:var(--mm-control-sm);padding:6px 10px;font-size:var(--mm-text-base)}.mm-input[data-size=lg],.mm-select[data-size=lg]{min-height:var(--mm-control-lg);padding:10px 14px;font-size:var(--mm-text-emphasis)}.mm-input::placeholder{color:var(--mm-muted)}.mm-input:disabled,.mm-select:disabled{opacity:.4;cursor:not-allowed}.mm-input[readonly]{color:var(--mm-muted)}.mm-input[aria-invalid=true],.mm-select[aria-invalid=true]{border-color:var(--mm-danger)}.mm-textarea{min-height:112px;resize:vertical}
.mm-select-wrap{display:block;position:relative;min-width:0}.mm-select{appearance:none;padding-right:38px!important}.mm-select-wrap>.mm-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--mm-muted);pointer-events:none}
.mm-field{display:grid;gap:7px;min-width:0}.mm-field>label{font-size:var(--mm-text-base);font-weight:500}.mm-help,.mm-error{margin:0;font-size:var(--mm-text-base);line-height:1.7;overflow-wrap:anywhere}.mm-help{color:var(--mm-muted)}.mm-error,.mm-required{color:var(--mm-danger)}
.mm-search{display:flex;align-items:center;position:relative;min-width:0}.mm-search>.mm-icon{position:absolute;left:12px;color:var(--mm-muted);pointer-events:none}.mm-search>.mm-input{padding-left:36px;padding-right:40px}.mm-search>.mm-button{position:absolute;right:5px}.mm-search input::-webkit-search-cancel-button{appearance:none}
.mm-choice{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:44px;cursor:pointer}.mm-choice>span{display:grid;gap:3px;min-width:0}.mm-choice strong{font-size:var(--mm-text-base);font-weight:500}.mm-choice small{font-size:var(--mm-text-base);color:var(--mm-muted)}.mm-choice input{flex:none;accent-color:var(--mm-accent);width:18px;height:18px;margin:0;cursor:pointer}.mm-choice input:disabled{opacity:.4;cursor:not-allowed}.mm-choice[data-kind=switch] input{appearance:none;width:42px;height:24px;border:1px solid #777;border-radius:20px;background:#333;position:relative}.mm-choice[data-kind=switch] input:before{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;background:#eee;border-radius:50%;transition:transform .15s}.mm-choice[data-kind=switch] input:checked{background:var(--mm-accent);border-color:var(--mm-accent)}.mm-choice[data-kind=switch] input:checked:before{background:#252525;transform:translateX(18px)}
.mm-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:28px;min-width:0}.mm-heading>div:first-child{min-width:0}.mm-heading h1,.mm-heading h2,.mm-heading h3{margin:0;overflow-wrap:anywhere}.mm-heading h1{font-size:var(--mm-text-emphasis);line-height:1.24;letter-spacing:-.045em}.mm-heading h2{font-size:var(--mm-text-emphasis);line-height:1.4;letter-spacing:-.03em}.mm-heading h3{font-size:var(--mm-text-emphasis);line-height:1.5}.mm-eyebrow{margin:0 0 8px;font-size:var(--mm-text-small);font-weight:600;letter-spacing:.2em;color:var(--mm-muted)}.mm-description{margin:12px 0 0;font-size:var(--mm-text-emphasis);line-height:1.8;color:var(--mm-muted);white-space:pre-line;overflow-wrap:anywhere}
.mm-panel{min-width:0;border:1px solid var(--mm-line);border-radius:var(--mm-panel-radius);background:var(--mm-panel);overflow:hidden}.mm-panel[data-surface=sheet]{background:var(--mm-sheet);border-color:var(--mm-border)}.mm-panel[data-surface=plain]{background:none;border:0;border-radius:0}.mm-panel-head,.mm-panel-body{padding:20px 24px}.mm-panel-head{padding-bottom:0}.mm-panel-head h2{margin:0 0 4px;font-size:var(--mm-text-emphasis);font-weight:600}.mm-panel-footer{padding:14px 24px;border-top:1px solid var(--mm-line)}.mm-panel[data-surface=sheet] :is(.mm-panel-head,.mm-panel-body,.mm-panel-footer){background:var(--mm-sheet)}
.mm-action-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}.mm-action-bar[data-stack]{flex-direction:column;align-items:stretch}.mm-action-bar>div{min-width:0}.mm-accordion{border-bottom:1px solid var(--mm-line)}.mm-accordion>summary{display:flex;align-items:center;gap:10px;list-style:none;padding:14px 0;cursor:pointer;font-size:var(--mm-text-base)}.mm-accordion>summary::-webkit-details-marker{display:none}.mm-accordion>summary>small{color:var(--mm-muted);margin-left:auto;font-size:var(--mm-text-small)}.mm-accordion>summary>.mm-icon{margin-left:auto;color:var(--mm-muted)}.mm-accordion>summary>small+.mm-icon{margin-left:0}.mm-accordion[open]>summary>.mm-icon{transform:rotate(180deg)}.mm-accordion>div{padding:0 0 16px}
.mm-tabs{display:flex;align-items:stretch;gap:28px;overflow-x:auto;border-bottom:1px solid var(--mm-line);scrollbar-width:thin}.mm-tabs>button{flex:none;display:flex;align-items:center;gap:6px;padding:10px 2px;min-height:40px;border:0;border-bottom:2px solid transparent;background:none;color:var(--mm-muted);font:400 var(--mm-text-base)/18px var(--mm-font);white-space:nowrap;cursor:pointer}.mm-tabs>button[aria-selected=true]{color:var(--mm-accent);border-bottom-color:var(--mm-accent)}.mm-tabs>button:disabled{opacity:.4;cursor:not-allowed}.mm-tabs small{font-size:var(--mm-text-small)}.mm-tabs[data-size=sm]{gap:18px}.mm-tabs[data-size=sm]>button{min-height:32px;padding:6px 1px;font-size:var(--mm-text-base)}.mm-tabs-group>[role=tabpanel]{padding-top:18px}
.mm-feedback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:36px 16px;text-align:center;color:var(--mm-muted)}.mm-feedback strong{font-size:var(--mm-text-emphasis);font-weight:500;color:var(--mm-text)}.mm-feedback p{margin:0;font-size:var(--mm-text-base);line-height:1.7}.mm-feedback[data-state=error]>.mm-icon,.mm-feedback[data-state=error]>span{color:var(--mm-danger)}.mm-feedback[data-compact]{padding:16px 8px;gap:7px}.mm-feedback[data-compact] strong{font-size:var(--mm-text-base)}
.mm-progress{display:grid;gap:9px}.mm-progress>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:var(--mm-text-base)}.mm-progress b{font-variant-numeric:tabular-nums;font-weight:600}.mm-progress small{font-size:var(--mm-text-small);font-weight:400;color:var(--mm-muted)}.mm-track{height:5px;background:#ffffff12;border-radius:6px;overflow:hidden}.mm-track i{display:block;height:100%;border-radius:inherit;background:var(--mm-accent);transition:width .2s}.mm-progress[data-tone=neutral] i{background:#a2a6ad}.mm-progress[data-tone=danger] i{background:var(--mm-danger)}.mm-stat{display:grid;gap:6px;min-width:0}.mm-stat>span{font-size:var(--mm-text-base);color:var(--mm-muted)}.mm-stat strong{font-size:var(--mm-text-emphasis);font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3}.mm-stat strong small{font-size:var(--mm-text-base);font-weight:400;margin-left:5px;color:var(--mm-muted)}.mm-stat p{font-size:var(--mm-text-small);margin:0;color:var(--mm-muted)}.mm-stat[data-tone=accent] strong{color:var(--mm-accent)}.mm-stat[data-tone=danger] strong{color:var(--mm-danger)}
.mm-reward{display:flex;align-items:center;gap:10px;min-height:42px;font-size:var(--mm-text-base);border-bottom:1px solid var(--mm-line);padding:9px 0}.mm-reward>.mm-icon{color:var(--mm-muted)}.mm-reward>strong{margin-left:auto;font-size:var(--mm-text-emphasis);font-variant-numeric:tabular-nums}.mm-reward-list{display:grid}.mm-reward-list>.mm-reward:last-child{border-bottom:0}
.mm-table-wrap{overflow-x:auto;max-width:100%;min-width:0}.mm-table{border-collapse:collapse;width:100%;font-size:var(--mm-text-base);line-height:1.6;text-align:left}.mm-table :is(th,td){padding:14px 12px;border-bottom:1px solid var(--mm-line);white-space:normal;overflow-wrap:anywhere}.mm-table thead th{font-size:var(--mm-text-small);color:var(--mm-muted);font-weight:500;white-space:nowrap}.mm-table tbody th{font-weight:400}.mm-table [data-me] :is(th,td){color:var(--mm-accent)}.mm-table .mm-numeric{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.mm-table[data-compact] :is(th,td){padding:9px 8px;font-size:var(--mm-text-base)}
.mm-dialog{padding:0;width:min(640px,calc(100vw - 24px));max-width:none;max-height:85dvh;border:1px solid var(--mm-border);border-radius:var(--mm-dialog-radius);background:var(--mm-sheet);box-shadow:0 24px 100px #0009;overflow:auto;overscroll-behavior:contain}.mm-dialog::backdrop{background:#08090bd4;backdrop-filter:blur(5px)}.mm-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px 14px;background:var(--mm-sheet);border-bottom:1px solid #ffffff0e}.mm-dialog-head h2{margin:0;font:600 var(--mm-text-emphasis)/1.5 var(--mm-font);letter-spacing:-.5px}.mm-dialog-body{padding:16px 20px;background:var(--mm-sheet)}.mm-dialog-description{margin:0;padding:14px 20px 0;font-size:var(--mm-text-base);color:var(--mm-muted);background:var(--mm-sheet)}.mm-dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;background:var(--mm-sheet);border-top:1px solid #ffffff0e}.mm-dialog-error{padding:8px 20px}.mm-dialog-footer .mm-button{min-height:var(--mm-control-lg)}.mm-toast{position:fixed;bottom:calc(24px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:150;padding:12px 18px;width:max-content;max-width:calc(100vw - 24px);background:var(--mm-sheet);color:var(--mm-text);border:1px solid var(--mm-border);border-radius:9px;box-shadow:0 8px 30px #0007;font-size:var(--mm-text-base)}.mm-toast[data-tone=accent]{color:var(--mm-accent)}.mm-toast[data-tone=danger]{color:var(--mm-danger)}
.mm-filter.standard-filter{max-width:100%;height:auto}.mm-filter .standard-filter__controls{display:flex;flex-wrap:wrap;gap:6px;background:transparent}.mm-filter-dialog .mm-dialog-head{justify-content:flex-end;border:0;padding:6px 12px 0}.mm-filter-dialog .mm-dialog-body{padding:0}.mm-filter-dialog .standard-filter__header{background:#1c1c1c}.mm-filter-dialog .standard-filter__popup{background:#1c1c1c}
.mm-sheet-root{position:relative}.mm-sheet{position:fixed;z-index:110;left:50%;bottom:8px;transform:translateX(-50%);width:min(560px,calc(100vw - 24px));max-height:82dvh;border:1px solid var(--mm-border);border-radius:18px;background:var(--mm-sheet);box-shadow:0 -8px 36px #0007;overflow:hidden}.mm-sheet-handle{display:flex;align-items:center;justify-content:center;height:28px;width:100%;padding:0;border:0;background:var(--mm-sheet);touch-action:none}.mm-sheet-handle>span:first-child{width:40px;height:4px;border-radius:4px;background:#707070}.mm-sheet-summary{display:flex;align-items:center;justify-content:space-between;padding:4px 16px 12px;background:var(--mm-sheet)}.mm-sheet-summary strong{font-size:var(--mm-text-emphasis);font-weight:600}.mm-sheet-body{padding:14px 16px;max-height:50dvh;overflow-y:auto;background:var(--mm-sheet)}.mm-sheet-footer{display:grid;gap:12px;padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #ffffff0e;background:var(--mm-sheet)}
.mm-card{position:relative;display:block;width:100%;min-width:0;max-width:100%;margin:0;padding:0;background:none;border:0;color:var(--mm-text);text-align:left;font:inherit}.mm-card[type=button]{cursor:pointer}.mm-card:disabled{opacity:.4;cursor:not-allowed}.mm-card-face{position:relative;display:block}.mm-card .card-v3{width:100%;max-width:none;padding:0;height:auto;aspect-ratio:5/7;border:0;background:none}.mm-card .card__tilt{transform:none!important}.mm-card .card__face{outline:1px solid transparent;outline-offset:3px}.mm-card[aria-pressed=true] .card__face{outline:2px solid var(--mm-accent)}.mm-card-check{display:grid;place-items:center;position:absolute;right:7px;bottom:7px;width:22px;height:22px;background:#151719e8;border:1px solid #707070;border-radius:50%;color:var(--mm-text)}.mm-card[aria-pressed=true] .mm-card-check{background:var(--mm-accent);border-color:var(--mm-accent);color:var(--mm-on-accent)}.mm-card-badge{position:absolute;left:8px;top:8px;padding:3px 6px;font-size:var(--mm-text-small);background:#101113e8;border:1px solid #777;border-radius:4px}.mm-card-caption{display:block;padding:9px 2px 0;font-size:var(--mm-text-small);color:var(--mm-muted)}.mm-card[data-locked] :is(.card-level-badge,.card__affinities){display:none}.mm-card[data-locked] .card__art{opacity:.3;filter:grayscale(1)}
.mm-slots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;min-width:0}.mm-slot-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;aspect-ratio:5/7;border:1px dashed var(--mm-border);border-radius:12px;color:var(--mm-muted)}.mm-slot-empty b{font-size:var(--mm-text-emphasis);font-weight:400}.mm-slot-empty small{font-size:var(--mm-text-small)}.mm-picker-tools{display:grid;grid-template-columns:1fr;gap:12px}.mm-picker-summary{display:flex;align-items:center;gap:12px;padding:12px 0;font-size:var(--mm-text-base);color:var(--mm-muted)}.mm-picker-summary strong{margin-left:auto;font-weight:500;color:var(--mm-text)}.mm-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 16px;padding:5px;max-height:520px;overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable;overscroll-behavior:contain}.mm-picker-grid .mm-feedback{grid-column:1/-1}.mm-picker-selected{padding-top:20px;margin-top:18px;border-top:1px solid var(--mm-line)}
@media(max-width:800px){.mm-dialog{border-radius:18px}.mm-dialog-head h2{font-size:var(--mm-text-emphasis)}.mm-slots{grid-template-columns:repeat(3,minmax(0,1fr))}.mm-sheet.bottom-sheet-dock{left:12px;right:12px;transform:none;width:auto}.mm-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 8px;max-height:460px}}
@media(max-width:520px){.mm-heading{flex-wrap:wrap;gap:12px;margin-bottom:23px}.mm-heading h1{font-size:var(--mm-text-emphasis)}.mm-eyebrow{font-size:var(--mm-text-small)}.mm-description{font-size:var(--mm-text-base)}.mm-panel-head,.mm-panel-body{padding:16px}.mm-panel-head{padding-bottom:0}.mm-panel-footer{padding:12px 16px}.mm-action-bar{flex-wrap:wrap}.mm-dialog-head{padding:14px 16px 12px}.mm-dialog-body{padding:14px 16px}.mm-dialog-footer{padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px))}.mm-dialog-footer>.mm-button{flex:1}.mm-choice{gap:12px}.mm-reward{gap:7px}.mm-reward .mm-badge{font-size:var(--mm-text-small)}.mm-tabs{gap:20px}.mm-tabs>button{font-size:var(--mm-text-base)}}
@media(prefers-reduced-motion:reduce){.mm-spin{animation:none}.mm-track i,.mm-choice input:before{transition:none}}

/* Size changes control density; emphasis is explicit and consistent across screens. */
.mm-button[data-icon-only]{width:var(--mm-control-md);min-height:var(--mm-control-md);padding:8px}.mm-button[data-size=sm][data-icon-only]{width:var(--mm-control-sm);min-height:var(--mm-control-sm);padding:6px}.mm-button[data-size=lg][data-icon-only]{width:var(--mm-control-lg);min-height:var(--mm-control-lg);padding:10px}
.mm-field>label{font-size:var(--mm-text-base)}.mm-help,.mm-choice small,.mm-stat>span,.mm-stat strong small,.mm-dialog-description,.mm-picker-summary{font-size:var(--mm-text-small)}.mm-description{font-size:var(--mm-text-base)}.mm-heading :is(h1,h2,h3){font-size:var(--mm-text-emphasis);line-height:1.5;letter-spacing:0}.mm-heading h1{font-weight:700}.mm-heading :is(h2,h3){font-weight:600}.mm-heading{margin-bottom:24px}.mm-button{gap:8px}.mm-button[data-size=sm]{gap:4px}

/* Optional compact density for short management forms; existing screens keep their own sizes. */
.mm-scope[data-density=compact]{--mm-text-small:10px;--mm-text-base:11px;--mm-text-emphasis:13px;--mm-control-sm:28px;--mm-control-md:32px;--mm-control-lg:36px}
.mm-dialog[data-dialog-size=sm]{width:min(340px,calc(100vw - 32px))}
.mm-dialog[data-dialog-size=md]{width:min(400px,calc(100vw - 32px))}
.mm-dialog[data-dialog-size=lg]{width:min(520px,calc(100vw - 32px))}
.mm-dialog[data-density=compact]{border-radius:12px}
.mm-scope[data-density=compact] .mm-button{padding:7px 10px;font-weight:500;line-height:16px}
.mm-scope[data-density=compact] .mm-button[data-size=sm]{padding:5px 8px}
.mm-scope[data-density=compact] .mm-button[data-icon-only]{padding:6px;width:var(--mm-control-md);min-height:var(--mm-control-md)}
.mm-scope[data-density=compact] .mm-button[data-size=sm][data-icon-only]{padding:5px;width:var(--mm-control-sm);min-height:var(--mm-control-sm)}
.mm-scope[data-density=compact] :is(.mm-input,.mm-select){padding:7px 10px}
.mm-scope[data-density=compact] .mm-textarea{min-height:80px}
.mm-scope[data-density=compact] .mm-field{gap:6px}
.mm-scope[data-density=compact] .mm-choice{min-height:36px;gap:12px}
.mm-scope[data-density=compact] .mm-choice input{width:15px;height:15px}
.mm-scope[data-density=compact] .mm-choice[data-kind=switch] input{width:34px;height:20px}
.mm-scope[data-density=compact] .mm-choice[data-kind=switch] input:before{width:14px;height:14px;left:2px;top:2px}
.mm-scope[data-density=compact] .mm-choice[data-kind=switch] input:checked:before{transform:translateX(14px)}
.mm-dialog[data-density=compact] .mm-dialog-head{gap:10px;padding:10px 14px 8px}
.mm-dialog[data-density=compact] .mm-dialog-body{padding:12px 14px 14px}
.mm-dialog[data-density=compact] .mm-dialog-description{padding:10px 14px 0}
.mm-dialog[data-density=compact] .mm-dialog-footer{padding:10px 14px 12px}
.mm-scope[data-density=compact] :is(.mm-panel-head,.mm-panel-body){padding:12px 14px}
.mm-scope[data-density=compact] .mm-panel-head{padding-bottom:0}

/* Scroll only dialog content, including when the visual viewport shrinks for a keyboard. */
.mm-dialog[open]:not(.standard-filter-dialog){display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;grid-template-areas:"heading" "description" "body" "error" "footer";overflow:hidden}
.mm-dialog>.mm-dialog-head{grid-area:heading}
.mm-dialog>.mm-dialog-description{grid-area:description}
.mm-dialog>.mm-dialog-body{grid-area:body;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.mm-dialog-content{display:flow-root;min-width:0;align-self:start}
.mm-dialog>.mm-dialog-error{grid-area:error}
.mm-dialog>.mm-dialog-footer{grid-area:footer;flex:none}

/* account-safety.css */
/* Account-specific layout; shared compact components own size, type and control states. */
.account-dialog-content{display:grid;gap:12px;min-width:0}
.account-dialog .mm-dialog-body{display:grid;gap:12px}
.account-dialog-content>p:not(.mm-help){margin:0;color:inherit;font:inherit;line-height:1.8}
.account-dialog form{display:grid;gap:12px}
.account-policy-links{display:flex;gap:4px;flex-wrap:wrap}
.account-policy-frame{width:100%;height:min(60dvh,560px);border:0;background:var(--mm-sheet)}
.account-settings{display:grid;gap:8px;padding-top:14px;border-top:1px solid var(--mm-line)}
.account-settings h3{font-size:var(--mm-text-small);font-weight:500;color:var(--mm-muted);margin:0}
.account-settings h3:not(:first-child){margin-top:8px}
.account-menu{display:grid}
.account-menu .mm-button{justify-content:space-between;text-align:left;border-radius:0;border-width:0;border-bottom:1px solid #ffffff0a;padding-left:0;padding-right:0}
.account-menu .mm-icon{width:13px;height:13px;color:var(--mm-muted)}
.account-settings .account-policy-links{margin-left:-8px;margin-right:-8px}
.account-contact{padding-top:4px;overflow-wrap:anywhere}
.account-contact a:hover{text-decoration:underline;text-underline-offset:3px}
.account-preferences{display:grid;gap:4px}
.account-preferences .mm-choice{padding:6px 0}
.account-preferences .mm-choice small{max-width:235px;font-weight:400}

.account-dialog .mm-dialog-content{display:grid;gap:12px}
.account-dialog>.mm-dialog-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.account-dialog>.mm-dialog-footer>.mm-button{width:100%}

/* Optional ad consent: one local summary, independent scopes and explicit select-all. */
.ad-consent-dialog .mm-dialog-content{gap:12px}
.ad-consent-dialog .ad-consent-reward{margin:0;color:var(--mm-accent);font-weight:600}
.ad-consent-dialog .ad-consent-intro{margin:0;font:inherit;line-height:1.7}
.ad-consent-dialog .ad-consent-all{padding-bottom:8px;border-bottom:1px solid var(--mm-line)}
.ad-consent-dialog .ad-consent-all .mm-choice{min-height:40px}
.ad-consent-dialog .ad-consent-items{display:grid;gap:2px;min-width:0}
.ad-consent-dialog .ad-consent-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px}
.ad-consent-dialog .ad-consent-row .mm-choice{min-width:0;gap:8px}
.ad-consent-dialog .ad-consent-row .mm-choice strong{overflow-wrap:anywhere}
.ad-consent-dialog .ad-consent-row>.mm-button{min-height:36px;padding:6px 8px;color:var(--mm-muted)}
.ad-consent-dialog .ad-consent-label{font:inherit;overflow-wrap:anywhere}
.ad-consent-dialog .ad-consent-detail{padding:8px 0 12px;min-width:0;border-bottom:1px solid var(--mm-line)}
.ad-consent-dialog .ad-consent-detail p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
.ad-consent-dialog .ad-consent-version{font-variant-numeric:tabular-nums}

.account-block-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-block-row span{overflow-wrap:anywhere;min-width:0}
.account-block-row .mm-button{flex:none}
[data-report-list]{max-width:760px}
.account-report{margin:12px 0;overflow-wrap:anywhere}
.account-report .mm-panel-body{display:grid;gap:10px}
.account-report blockquote,.account-report p{margin:0;font:inherit}
[data-safety-message]{cursor:pointer}
[data-safety-message]:focus-visible{outline:2px solid var(--lime,#c8ff69);outline-offset:-2px}
.apple-auth{width:100%;min-height:44px;border-radius:8px;background:#fff;color:#000;font:500 14px system-ui;border:1px solid #000;cursor:pointer;margin-top:10px}

/* native-navigation.css */
/* The native navigation overlays the WebView; the host maintains content insets. */
html[data-native-navigation="1"] body>header{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px;min-height:60px;height:auto;padding:12px 5%;border-bottom:1px solid var(--line)}
html[data-native-navigation="1"] body>header .logo{font-size:20px;gap:0;margin:0;white-space:nowrap}
html[data-native-navigation="1"] body>header .logo .brand-icon,
html[data-native-navigation="1"] body>header .logo .beta,
html[data-native-navigation="1"] body>header #pack-shop-nav,
html[data-native-navigation="1"] body>header #sound,
html[data-native-navigation="1"] body>header nav>button:not(#admin-nav){display:none!important}
/* Keep the existing authorized administrator entry; never expose a new admin action. */
html[data-native-navigation="1"] body>header nav{display:contents}
html[data-native-navigation="1"] body>header #admin-nav{font-size:10px;min-height:36px;padding:0 6px}
html[data-native-navigation="1"] body>header :is(#account,#mailbox-nav){position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;margin:0;padding:0;border:1px solid #34383c;border-radius:12px;font-size:0;gap:0}
html[data-native-navigation="1"] body>header #mailbox-nav{margin-left:auto!important}
html[data-native-navigation="1"] body>header :is(#account,#mailbox-nav)::before{content:'';display:block;width:20px;height:20px;background:#c4c8cc;mask:var(--native-header-icon) center/contain no-repeat;-webkit-mask:var(--native-header-icon) center/contain no-repeat}
html[data-native-navigation="1"] body>header #mailbox-nav{--native-header-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E")}
html[data-native-navigation="1"] body>header #account{--native-header-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E")}
html[data-native-navigation="1"] body>header #mailbox-badge:not([hidden]){position:absolute;right:-4px;top:-4px;display:grid;place-items:center;min-width:16px;height:16px;margin:0;padding:0 3px;border-radius:8px;background:var(--lime);color:#101113;font-size:9px;line-height:1}
