/* Bloodfang ImageGen artwork; native DOM owns every label, hit target and action. */
:root{--gold:#c9a46b;--gold-light:#f3dbae;--text:#eee2cd;--muted:#b8b1a2;--line:#c296534d;--red:#891b20}
.menu-scenery{position:fixed;inset:0;z-index:0;pointer-events:none;transform:scale(1.18);transform-origin:50% 100%;background:#11100f url(./assets/menu-forged-v3/citadel.webp) center/cover no-repeat}
.menu-scenery:before,.menu-scenery:after{content:"";position:absolute;top:10%;width:45px;height:86px;background:#d0ae6b;opacity:.78;display:none;mask:url(./assets/characters-v1/emblem.png) center/contain no-repeat;mask-mode:luminance;filter:drop-shadow(0 2px 3px #000)}
.menu-scenery:before{left:9%}.menu-scenery:after{right:8.5%}
#character-preview.scene-canvas{z-index:1}.entry-backdrop{z-index:2;background:radial-gradient(ellipse at 47% 45%,transparent 20%,#08040347 100%),linear-gradient(0deg,#080605d9,transparent 26%)}#character-app{z-index:3}.entry-header{z-index:5}
body[data-view=entry] .entry-backdrop{background:linear-gradient(90deg,#080605ed,#100a076e 37%,transparent 70%),linear-gradient(0deg,#090605c9,transparent 30%)}
.entry-header{height:82px;background:linear-gradient(180deg,#0a0807ed,#15110dd9 80%,#24180de0);border-bottom:2px solid #8e66394f;box-shadow:0 3px 20px #0009,inset 0 -1px #dfa85d25}.entry-brand{font-size:26px;color:#f4d3a0;text-shadow:0 2px 4px #000,0 0 22px #d58c3829}.entry-brand .brand-mark{width:30px;height:47px}.entry-brand small{color:#c59d64}.citadel-link,.account-button{color:#c6b99f}.account-button{background:#1a130c80!important;border-color:#976b3e70!important}
h1,h2,h3{color:#f0ddbb;text-shadow:0 2px 3px #000c}.eyebrow{color:#d3ad73}.screen-hint{color:#d0c4ad;text-shadow:0 2px 5px #000}.workbench-heading h1{font-size:36px}.workbench{height:calc(100dvh - 82px)}
/* Four exact atlas components, stretched using nine-slice only; no painted text. */
.right-panel,.auth-card{position:relative;background:none;border:solid transparent;border-width:52px 27px 29px;border-image:url(./assets/menu-forged-v3/panel.webp) 174 102 115 102 fill / 52px 27px 29px / 0 stretch;padding:8px 12px 11px;box-shadow:0 15px 35px #0008;overflow:visible;max-height:none}
.right-panel:before,.auth-card:before{content:"";position:absolute;left:calc(50% - 10px);top:-42px;width:20px;height:31px;background:#e3bd86;mask:url(./assets/characters-v1/emblem.png) center/contain no-repeat;mask-mode:luminance;pointer-events:none}
.right-panel .character-identity{padding-bottom:15px;margin-bottom:13px}.right-panel .character-identity h2{font-size:34px}.right-panel .character-identity .eyebrow{font-size:9px}.right-panel .rank{font-size:9px}.right-panel p{color:#c9bea9;font-size:12px}.summary-list{gap:10px;font-size:11px}.summary-list dt{color:#b09f85}.summary-list dd{color:#eadcc1}.right-panel .eyebrow{color:#cda66d}.right-panel h2{font-size:28px}
.right-panel{align-self:start;max-height:100%;overflow:auto;scrollbar-color:#98713f #17120e}
:is(.entry-menu,.detail-actions,.flow-actions,.auth-card,.dialog-actions)>button:not(.character-card):not(.new-slot),.category-button{position:relative;isolation:isolate;border:0;background:none;box-shadow:none;color:#eedec2;text-shadow:0 2px 2px #000;padding:13px 31px;min-height:53px;transition:filter .16s,transform .16s}
:is(.entry-menu,.detail-actions,.flow-actions,.auth-card,.dialog-actions)>button:not(.character-card):not(.new-slot):before,.category-button:before{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:none;border:solid transparent;border-width:15px 31px;border-image:url(./assets/menu-forged-v3/secondary.webp) 62 132 62 132 fill / 15px 31px / 0 stretch;width:auto;height:auto}
:is(.entry-menu,.detail-actions,.flow-actions,.auth-card,.dialog-actions)>button.primary:not(.character-card):not(.new-slot):before{border-image-source:url(./assets/menu-forged-v3/primary.webp);border-image-slice:65 136 65 136 fill}
:is(.entry-menu,.detail-actions,.flow-actions,.auth-card,.dialog-actions)>button:hover:not(:disabled),.category-button:hover:not(:disabled){background:none;color:#fff3d9;filter:brightness(1.2)}
button.primary{font-weight:700;letter-spacing:.035em;color:#ffe6b3}.entry-menu button{min-height:64px;font-family:Georgia,serif;font-size:17px;letter-spacing:.015em}.entry-menu button.primary{min-height:69px}.entry-menu .primary span:last-child{color:#eec28c}.detail-actions button{padding:13px 24px;font-size:11px;min-height:49px;text-align:center}.detail-actions button:before{border-image-width:13px 24px}.flow-actions .primary{min-width:245px;min-height:61px;font:700 16px Georgia,serif;letter-spacing:.02em}.flow-actions{border-color:#a77c4655;background:linear-gradient(0deg,#100a06ad,transparent);padding-top:14px}.flow-actions>.primary:after{content:"";position:absolute;inset:5px 34px;pointer-events:none;box-shadow:0 0 24px #a8251728}
.category-button{font-size:12px;padding:13px 27px;min-height:63px;gap:9px}.category-button svg{color:#d7c29e;width:24px}.category-button[aria-pressed=true]{background:none;color:#fff0cb;filter:brightness(1.16)}.category-button[aria-pressed=true]:before{top:0;bottom:0;left:0;right:0;width:auto;height:auto;border-image-source:url(./assets/menu-forged-v3/primary.webp);border-image-slice:65 136 65 136 fill;background:none}
.character-card,.new-slot{background:none;border:solid transparent;border-width:10px 12px;border-image:url(./assets/menu-forged-v3/card.webp) 43 51 43 51 fill / 10px 12px / 0 stretch;padding:3px 5px;min-height:111px;box-shadow:0 5px 15px #0008}.character-card[aria-pressed=true]{border-color:transparent;background:none;filter:brightness(1.15);box-shadow:0 0 0 1px #d3a6579e,0 0 19px #b4752630}.character-card img{border:1px solid #b5925666}.character-card strong{font:18px Georgia,serif;color:#f6dfb2}.character-card small{color:#c4b79e}.new-slot{color:#d0b88f;border-style:solid}.plus{color:#e2b979}.character-card:hover:not(:disabled),.new-slot:hover:not(:disabled){background:none;filter:brightness(1.2)}
.preview-toolbar button{background:#17120dde;border-color:#96723f70;color:#e4cfaa;box-shadow:inset 0 1px #c7a27322}.preview-caption,.entry-model-note{color:#d4b88c;text-shadow:0 2px 5px #000,0 0 12px #000}.state-badge{color:#c6aa7a;text-shadow:0 2px 4px #000}.option-tile{background:#231c148c;border-color:#b38a4b55;color:#ead6b4}.option-tile[aria-pressed=true]{background:#541d15a3;border-color:#d0a05a;box-shadow:inset 0 0 15px #b65b1b22}.lock-option{color:#d9c39d;border-color:#b8945b66}.category-note{color:#bcaa8c!important}.creator-tools button{background:#211a11c9;border-color:#a37a4c60}.flow-notice{z-index:8}
body[data-view=selection] .workbench,body[data-view=manage] .workbench{grid-template-columns:minmax(0,1fr) 330px}.entry-story{color:#d3c6af}.entry-note{color:#b7a68b}.entry-content h1{color:#f0d4a2;text-shadow:0 3px 3px #000,0 0 35px #e4933926}.entry-content{padding-top:clamp(55px,11dvh,110px)}
@media(min-width:701px) and (max-width:1150px){.workbench{grid-template-columns:160px minmax(210px,1fr) 285px;gap:12px}body[data-view=selection] .workbench,body[data-view=manage] .workbench{grid-template-columns:minmax(0,1fr) 285px}.right-panel{padding:5px 5px 8px}.right-panel .character-identity h2{font-size:28px}.category-button{padding:12px 24px;font-size:10px}.detail-actions button{font-size:10px}.menu-scenery:before,.menu-scenery:after{display:none}}
@media(min-width:701px) and (max-width:820px){.workbench{grid-template-columns:108px minmax(180px,1fr) 245px;padding:18px 16px;gap:10px}.category-button{flex-direction:column;min-height:77px;font-size:9px;padding:9px 19px}.right-panel{border-image-width:46px 22px 25px;border-width:46px 22px 25px}.right-panel:before{top:-37px;height:27px}.entry-brand{font-size:21px}}
@media(max-width:700px){
 .menu-scenery{background-image:url(./assets/menu-forged-v3/citadel-mobile.webp);background-position:50% 45%}.menu-scenery:before,.menu-scenery:after{display:none}.entry-header{height:68px;padding:9px 14px}.entry-brand{font-size:16px;gap:8px}.entry-brand .brand-mark{width:23px;height:36px}.entry-brand small{font-size:7px}.entry-content{padding-top:28px}.entry-menu button,.entry-menu button.primary{min-height:59px;font-size:15px;padding:12px 32px}.entry-menu{margin-top:276px}
 .workbench,.workbench:where([hidden=false]){height:auto;padding-bottom:112px}.workbench-heading h1{font-size:28px}.right-panel{align-self:stretch;width:100%;max-height:none;padding:8px 10px 12px;border-width:48px 25px 28px;border-image-width:48px 25px 28px}.right-panel:before{top:-39px;height:28px}.right-panel .character-identity h2{font-size:34px}.right-panel p{font-size:12px}.auth-card{padding:6px 8px 12px}.auth-card h1{font-size:29px}
 .flow-actions,body[data-view=selection] .flow-actions,body[data-view=manage] .flow-actions{z-index:7;padding:9px 12px max(9px,env(safe-area-inset-bottom));background:linear-gradient(180deg,#17100ef0,#080605fc);min-height:78px;gap:7px}.flow-actions .primary{min-width:140px;min-height:59px;font-size:13px;padding:12px 23px}.flow-actions>button:not(.primary){max-width:94px;padding:11px 20px;font-size:10px}.flow-actions>.secondary-actions>button{font-size:10px;padding:8px 10px}.state-badge{display:none}.category-button{width:86px;min-height:67px;min-width:86px;flex-direction:column;gap:4px;padding:7px 15px;font-size:9px}.category-button:before,.category-button[aria-pressed=true]:before{inset:0;border-image-width:12px 16px}.category-button svg{width:24px;height:25px}.category-button[aria-pressed=true]:before{height:auto;width:auto}
 .character-card,body[data-view=selection] .character-card{width:188px;min-height:92px;padding:1px 2px;border-image-width:8px 10px;border-width:8px 10px;gap:8px}.character-card strong{font-size:15px;max-width:102px}.character-card small{font-size:9px}.new-slot,body[data-view=selection] .new-slot{min-height:92px;width:144px;min-width:144px}.preview-toolbar button{min-height:44px}.summary-list{font-size:11px}.option-tile{min-height:84px}.screen-hint{color:#d3c6ae}
}
@media(min-width:701px) and (max-height:650px){.entry-header{height:60px}.workbench,body[data-view=selection] .workbench{height:calc(100dvh - 60px)}.flow-actions .primary{min-height:51px;font-size:14px}.right-panel .character-identity{padding-bottom:10px;margin-bottom:10px}.right-panel .character-identity h2{font-size:27px}}

/* Pass 1: desktop is a fitted game screen, not a scrolling web document. */
@media(min-width:701px){
 html:has(body:is([data-view=selection],[data-view=create],[data-view=confirm],[data-view=manage])){height:100%;overflow:hidden}
 body:is([data-view=selection],[data-view=create],[data-view=confirm],[data-view=manage]){height:100dvh;overflow:hidden}
 :root{--menu-header-height:70px}.entry-header{height:var(--menu-header-height)}
 .workbench{height:calc(100dvh - var(--menu-header-height));min-height:0;max-width:none;padding:16px 28px 12px;gap:12px;grid-template-columns:180px minmax(0,1fr) 350px;grid-template-rows:44px minmax(0,1fr) 64px}
 .workbench-heading{min-height:0}.workbench-heading h1{font-size:32px}.left-panel,.preview-panel,.preview-stage,.right-panel{min-height:0}.left-panel{overflow:visible}.right-panel{max-height:100%;overflow:visible}.flow-actions{min-height:0;padding-top:8px}.flow-actions .primary{min-height:54px;font-size:15px}
 body[data-view=selection] .workbench,body[data-view=manage] .workbench{height:calc(100dvh - var(--menu-header-height));min-height:0;grid-template-columns:minmax(0,1fr) 330px;grid-template-rows:44px minmax(0,1fr) 100px 64px}
 body[data-view=selection] .roster{display:grid;grid-template-columns:repeat(var(--roster-columns,4),minmax(0,220px));width:100%;min-width:0;gap:10px}
 body[data-view=selection] .character-card,body[data-view=selection] .new-slot{width:auto;min-width:0;min-height:92px;height:92px}.character-card img{height:67px;width:55px}.character-card strong{font-size:16px;max-width:100%}.character-card small{font-size:9px}
 body[data-view=selection][data-roster=empty] .workbench{grid-template-rows:44px minmax(0,1fr) 64px}
 body[data-view=selection][data-roster=empty] .left-panel{display:none}
 body[data-view=selection][data-roster=empty] .flow-actions{grid-row:3}
 .name-field{margin-top:18px}.name-help{margin:12px 0!important;line-height:1.55}.name-ready{font-size:11px!important;color:#d6bd91!important;border-top:1px solid #9c77434d;padding-top:15px;margin-top:14px!important}
 .first-steps{list-style:none;margin:19px 0 5px;padding:0;display:grid;gap:15px}.first-steps li{display:flex;align-items:center;gap:13px;font-size:12px;color:#e4ceaa}.first-steps svg{height:30px;width:30px;color:#d5b174}
}
@media(min-width:701px) and (max-height:740px){
 :root{--menu-header-height:60px}.workbench{padding:10px 22px 8px;gap:8px;grid-template-columns:155px minmax(0,1fr) 320px;grid-template-rows:38px minmax(0,1fr) 58px}.workbench-heading h1{font-size:28px}.workbench-heading .eyebrow{font-size:8px;margin-bottom:4px}.screen-hint{font-size:10px}.category-button{min-height:51px;font-size:11px;padding:10px 26px}.category-list{gap:5px}.preview-toolbar{padding-top:4px}.preview-caption{margin-top:4px}
 body[data-view=selection] .workbench{grid-template-rows:38px minmax(0,1fr) 86px 58px}body[data-view=selection] .character-card,body[data-view=selection] .new-slot{height:82px;min-height:82px}.character-card img{height:56px;width:46px}.character-card strong{font-size:15px}.character-card small{margin-top:3px;font-size:8px}
 body[data-view=selection][data-roster=empty] .workbench{grid-template-rows:38px minmax(0,1fr) 58px}.flow-actions .primary{min-height:50px;font-size:14px}.flow-actions button{min-height:46px}.right-panel{border-width:42px 23px 25px;border-image-width:42px 23px 25px;padding:5px 10px 8px}.right-panel h2{font-size:26px}.right-panel p{font-size:11px}.right-panel .eyebrow{font-size:8px;margin-bottom:6px}
}
@media(min-width:701px) and (max-width:1000px){.workbench{grid-template-columns:108px minmax(0,1fr) 280px;padding-left:16px;padding-right:16px}.category-button{flex-direction:column;padding:7px 17px;gap:3px;min-height:61px;font-size:9px}.category-button svg{height:23px;width:23px}.category-button .chevron{display:none}body[data-view=selection] .workbench,body[data-view=manage] .workbench{grid-template-columns:minmax(0,1fr) 280px}}


/* Pass 2: actual atlas coverage and keyboard/pointer states, including utility actions. */
:is(.secondary-actions,.name-input-row)>button,.right-panel>button{position:relative;isolation:isolate;border:0;background:none;box-shadow:none;color:#edd6b3;min-height:46px;text-shadow:0 2px 2px #000}
:is(.secondary-actions,.name-input-row)>button:before,.right-panel>button:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border:solid transparent;border-width:13px 23px;border-image:url(./assets/menu-forged-v3/secondary.webp) 62 132 62 132 fill / 13px 23px / 0 stretch}
.right-panel>button.primary:before,.right-panel>button.danger:before{border-image-source:url(./assets/menu-forged-v3/primary.webp);border-image-slice:65 136 65 136 fill}
:is(.secondary-actions,.name-input-row)>button:hover:not(:disabled),.right-panel>button:hover:not(:disabled){background:none;filter:brightness(1.18)}
.secondary-actions>button{padding:10px 25px;font-size:12px}.name-input-row>button{width:48px;padding:8px;font-size:23px}.name-input-row>button:before{border-image-width:11px 12px}
.name-input-row input{min-width:0;font-size:19px;letter-spacing:.035em;background:#15110ded;border-color:#b28a506e;box-shadow:inset 0 2px 8px #0008}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:2px solid #ffe4a6;outline-offset:3px}button.primary:disabled{filter:saturate(.3)}
.first-steps{list-style:none;margin:17px 0 4px;padding:0;display:grid;gap:14px}.first-steps li{display:flex;align-items:center;gap:12px;font-size:12px;color:#e4ceaa}.first-steps svg{height:29px;width:29px;color:#d5b174}

/* Pass 3: a category contains a compact choice set, never a long form. */
.right-panel>.eyebrow{margin:0 0 6px}.right-panel h2{margin:0}.inline-error:empty{display:none}
.appearance-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 15px;margin:17px 0}.appearance-summary>div{min-width:0;padding-bottom:7px;border-bottom:1px solid #9d773735}.appearance-summary dt{font-size:9px;color:#b69b74;line-height:1.35}.appearance-summary dd{margin:3px 0 0;font-size:12px;color:#f2dfbc;line-height:1.35;overflow-wrap:anywhere}
.creator-tools{display:flex;align-items:center;gap:6px;margin-top:11px;position:relative;flex-wrap:nowrap}.creator-tools>button{font-size:10px;min-height:34px;padding:6px 9px}.creator-more{margin-left:auto;position:relative;pointer-events:auto}.creator-more summary{cursor:pointer;list-style:none;color:#d4bb90;font-size:10px;padding:7px 8px;border:1px solid #96744166;background:#1c160dd9;min-height:34px;display:flex;align-items:center;white-space:nowrap}.creator-more summary::-webkit-details-marker{display:none}.creator-more-menu{position:absolute;right:0;bottom:calc(100% + 6px);z-index:10;width:165px;display:grid;gap:5px;padding:9px;background:#17100efa;border:1px solid #aa7c44;box-shadow:0 6px 20px #0009}.creator-more-menu button{font-size:11px;min-height:36px;padding:7px 10px;text-align:left;background:#2b2016;border-color:#97734755}
@media(min-width:701px){
 .option-group,.option-group:first-of-type{margin-top:13px}.option-heading{margin-bottom:6px;min-height:24px}.option-heading h3{font-size:10px}.lock-option{min-height:24px;font-size:9px;padding:2px 6px}
 .option-grid{grid-template-columns:repeat(var(--option-count,3),minmax(0,1fr));gap:6px}.option-tile{min-height:66px;padding:7px 4px;gap:5px;font-size:10px}.option-tile svg{width:30px;height:28px}.color-options .option-tile{min-height:59px;font-size:9px}.color-swatch{height:28px;width:28px;border-width:2px}
 .right-panel .category-note{margin:11px 0 0;font-size:10px;line-height:1.45;color:#bfa98a}.right-panel .character-identity h2{font-size:31px}.right-panel p{margin:11px 0 14px}
}
@media(min-width:701px) and (max-height:740px){
 .option-group,.option-group:first-of-type{margin-top:9px}.option-heading{min-height:21px;margin-bottom:4px}.option-heading h3{font-size:9px}.lock-option{min-height:21px;font-size:8px;padding:1px 5px}.option-tile{min-height:54px;padding:5px 3px;gap:4px;font-size:9px}.option-tile svg{height:25px;width:27px}.color-options .option-tile{min-height:50px;font-size:9px}.color-swatch{width:24px;height:24px}
 .right-panel .category-note{margin-top:8px;font-size:9px;line-height:1.4}.creator-tools{margin-top:8px;gap:5px}.creator-tools>button,.creator-more summary{font-size:9px;min-height:30px;padding:5px 7px}.appearance-summary{gap:7px 12px;margin:12px 0}.appearance-summary>div{padding-bottom:5px}.appearance-summary dt{font-size:8px}.appearance-summary dd{font-size:11px;margin-top:2px}.right-panel p{margin:9px 0 11px}.right-panel>.eyebrow{margin:0 0 5px}
}
@media(max-width:700px){.creator-tools{gap:7px;flex-wrap:wrap}.creator-tools>button,.creator-more summary{min-height:44px;font-size:10px;padding:8px 10px}.creator-more-menu button{min-height:44px}.appearance-summary{gap:10px 16px}.appearance-summary dt{font-size:10px}.appearance-summary dd{font-size:13px}}

/* Pass 5: long owned names and small desktop heights are real supported states. */
.character-card>span{min-width:0;flex:1}.character-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:701px){body[data-view=manage] .workbench{grid-template-rows:44px minmax(0,1fr) 64px}body[data-view=manage] .left-panel{display:none}body[data-view=manage] .flow-actions{grid-row:3}}
@media(min-width:701px) and (max-height:740px){
 body[data-view=selection] .right-panel .character-identity{padding-bottom:6px;margin-bottom:6px}.right-panel .character-identity h2{font-size:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}.character-identity>.eyebrow{display:none}.character-identity .rank{font-size:8px;margin-top:5px;line-height:1.4}.character-identity+p{display:none}
 .right-panel .summary-list{font-size:10px;gap:5px 9px;margin:9px 0;line-height:1.4}.detail-actions{gap:6px}.detail-actions button{min-height:44px;font-size:10px;padding:10px 23px}
 body[data-view=manage] .workbench{grid-template-rows:38px minmax(0,1fr) 58px}
}
@media(min-width:701px) and (max-height:620px){
 :root{--menu-header-height:56px}.workbench{padding:8px 20px;gap:6px;grid-template-rows:34px minmax(0,1fr) 54px}.workbench-heading h1{font-size:26px}.flow-actions .primary{min-height:46px;font-size:13px}.flow-actions>button,.flow-actions .secondary-actions>button{min-height:44px;padding-top:8px;padding-bottom:8px}
 body[data-view=selection] .workbench{grid-template-rows:34px minmax(0,1fr) 74px 54px}body[data-view=selection] .character-card,body[data-view=selection] .new-slot{height:70px;min-height:70px}.character-card img{height:47px;width:39px}.character-card strong{font-size:14px}.character-card small{font-size:8px;margin-top:2px}
 body[data-view=selection][data-roster=empty] .workbench,body[data-view=manage] .workbench{grid-template-rows:34px minmax(0,1fr) 54px}.first-steps{gap:10px;margin-top:12px}.first-steps svg{height:24px;width:24px}.first-steps li{font-size:11px}.right-panel h2{font-size:24px}
}
@media(min-width:701px){.flow-actions>button.primary:not(.character-card):not(.new-slot){min-height:54px;height:54px;padding-top:10px;padding-bottom:10px}}
@media(min-width:701px) and (max-height:740px){.detail-actions>button:not(.character-card):not(.new-slot){min-height:44px;padding:8px 23px}.flow-actions>button.primary:not(.character-card):not(.new-slot){min-height:48px;height:48px}}
@media(min-width:701px) and (max-height:620px){.flow-actions>button.primary:not(.character-card):not(.new-slot){min-height:44px;height:44px;padding-top:8px;padding-bottom:8px}}
