/* Level editor: compact decisions and steady navigation, scoped away from creation. */
#modal.level-change-editor:not(.character-editor){max-width:720px}
#modal.advancement-editor{max-width:960px}
.advancement-editor .advancement-choice-deck{min-height:0!important;grid-auto-rows:100px!important;gap:10px!important}
.advancement-editor .advancement-tile,.advancement-editor .advancement-option{height:100px!important;min-height:100px!important;max-height:100px!important}
.advancement-editor .advancement-option p{font-size:12px;line-height:1.3}
.advancement-editor .editor-page>h3{display:none}
.advancement-editor .editor-page>.editor-help{margin:0 0 10px;line-height:1.45}
.advancement-editor .advancement-detail-slots{min-height:0!important}
@media(max-width:600px){
 #modal.advancement-editor .modal-head{padding:13px 14px}
 #modal.advancement-editor .modal-head h2{font-size:17px}
 .advancement-editor #dialog-form>.editor-hero{padding:8px 10px;margin-bottom:8px}
 .advancement-editor .editor-hero h3{font-size:14px!important;margin:3px 0 0!important}
 .advancement-editor .editor-hero small{font-size:10px}
 .advancement-editor .builder-domain-marks{display:none}
 .advancement-editor .editor-tabs{margin:8px 0!important}
 .advancement-editor .editor-tabs button{min-height:40px;font-size:12px!important;padding:6px 3px!important}
 .advancement-editor .advancement-choice-deck{grid-auto-rows:104px!important;gap:8px!important}
 .advancement-editor .advancement-tile,.advancement-editor .advancement-option{height:104px!important;min-height:104px!important;max-height:104px!important}
 .advancement-editor .advancement-option h3{font-size:11px!important;line-height:1.3}
 .advancement-editor .advancement-option p{font-size:11px!important;line-height:1.25}
 .advancement-editor .advancement-budget{padding:8px 10px;margin-bottom:0}
 .advancement-editor .advancement-journey{gap:6px}
}

@media(max-width:600px){
 .advancement-editor #dialog-form>.editor-hero{display:none}
 .advancement-editor [data-editor-page="cards"]>.editor-help{font-size:12px}
 .advancement-editor .card-pick-slots{grid-template-columns:1fr!important;gap:6px!important}
 .advancement-editor .card-pick-slots>button{min-height:44px!important;padding:6px 9px!important;display:flex!important;align-items:center;justify-content:space-between;gap:12px}
 .advancement-editor .card-pick-slots>button small{font-size:10px;max-width:45%;text-align:left}
 .advancement-editor .card-pick-slots>button strong{font-size:12px;line-height:1.3;text-align:right}
 .advancement-editor .card-browse-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
 .advancement-editor .card-browse-filters input{grid-column:1/-1}
 .advancement-editor .card-browse-filters :is(input,select){min-width:0;padding:7px!important;font-size:12px!important;min-height:36px}
}

.advancement-editor .card-browse-filters[hidden],.advancement-editor .owned-card-tools[hidden],.advancement-editor .card-result-count[hidden]{display:none!important}
.advancement-editor .advancement-domain-deck{grid-template-columns:repeat(auto-fit,minmax(260px,350px))!important;justify-content:center}
@media(max-width:600px){
 .advancement-editor .card-pick-slots{display:grid!important}
 .advancement-editor .card-pick-slots>button{width:100%;min-width:0!important}
 .advancement-editor .advancement-domain-deck{grid-template-columns:minmax(0,1fr)!important}
}

.advancement-editor .pick-change{font-size:11px;font-weight:400;margin-left:8px;text-decoration:underline;text-underline-offset:3px}
.advancement-editor .advancement-journey{margin-bottom:8px}
.advancement-editor .journey-levels button{min-width:36px;min-height:36px;border-radius:6px}
.advancement-editor .journey-levels button[aria-current="step"]{border-color:#b89b56;background:#b89b5622;color:#e5c975}
html[data-theme="paper"] .advancement-editor .journey-levels button[aria-current="step"]{color:#e5c975}
.advancement-editor .advancement-fields{margin-top:8px}

.advancement-editor #dialog-form>.editor-hero{display:none}
.advancement-editor .journey-levels:has(>button:only-child){display:none}
.advancement-editor .advancement-option .selection-foot{padding-right:36px}
html[data-theme="paper"] .advancement-editor .card-pick-slots small{color:#e5c975}
@media(max-width:600px){
 .advancement-editor .advancement-domain-deck .domain-card{height:420px!important;min-height:420px!important;max-height:420px!important}
 .advancement-editor .advancement-domain-deck .card-crown{height:148px;min-height:148px;flex-basis:148px}
}

html[data-theme="paper"] .advancement-editor .card-pick-slots{background:transparent}
/* The creation page is the shared character editor. */
.build-level-bar{display:flex;align-items:center;gap:20px;margin:16px 0 20px;padding:12px 16px;background:#1c2836;border:1px solid #73879c66;border-radius:8px;color:#d7e1ea}
.build-level-bar label{display:flex;align-items:center;gap:12px;font-weight:600}
.build-level-bar select{min-width:115px;min-height:44px}
.build-level-bar p{margin:0;font-size:13px;color:#b9c7d7}
.wizard:has(#unified-advancement){grid-template-columns:minmax(0,1fr)}
.wizard:has(#unified-advancement)>.summary{display:none}
#unified-advancement{max-width:1000px;margin:auto}
#unified-advancement .editor-page{height:auto;max-height:none;overflow:visible;padding:12px 0}
#unified-advancement .unified-level-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
#unified-advancement .unified-level-tabs button{min-height:44px}
#unified-advancement .unified-level-tabs [aria-current="step"]{border-color:#e1bf76;background:#3d3a2e;color:#ffe6a7}
#unified-advancement .editor-tabs{display:flex;gap:8px;margin-bottom:10px}
#unified-advancement .editor-tabs button{flex:1;min-height:44px}
#unified-advancement .editor-tabs [aria-selected="true"]{border-color:#e1bf76;color:#ffe6a7}
#unified-advancement .advancement-choice-deck{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:760px){.build-level-bar{gap:10px;padding:10px}.build-level-bar p{font-size:12px}#unified-advancement .advancement-choice-deck{grid-template-columns:repeat(2,minmax(0,1fr))}}
.unified-change-summary{padding:18px;border:1px solid #8c9cac55;border-radius:8px;background:#1b2634;margin-bottom:16px}
.unified-change-summary h3{font-size:16px;margin:0 0 12px}
.unified-change-summary p{font-size:13px;line-height:1.5}
.unified-change-summary .growth-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
.unified-change-summary .growth-stat{padding:12px}
.remembered-levels{color:#e5c77e}
@media(max-width:600px){.unified-change-summary .growth-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.unified-change-summary{padding:12px}}
@media(max-width:760px){body:has(.wizard) .steps:has(button:nth-child(8)) button:nth-child(5){grid-column:auto/span 2}}
html[data-theme="paper"] .unified-change-summary .growth-stat small{color:#5d5549}
.wizard>section>p,.wizard .creation-card-intro p{font-size:15px;line-height:1.5}

/* Shared editor corrections: stable choice footers and compact, aligned navigation. */
#unified-advancement .unified-level-tabs,.card-browse-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
#unified-advancement .unified-level-tabs button,.card-browse-levels button{min-width:0}
.advancement-editor .advancement-domain-deck{display:flex!important;justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;gap:16px;min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.advancement-editor .advancement-domain-deck>.domain-card{flex:0 0 min(350px,100%);scroll-snap-align:start}
.advancement-card-paging{display:flex!important;justify-content:space-between;align-items:center}
.wizard .grid:has(>[data-wizard-card]){display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:16px;justify-content:flex-start}
.wizard [data-wizard-card]{flex:0 0 min(320px,100%);scroll-snap-align:start}
.wizard .creation-card-paging{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}
.creation-card-paging button{width:44px;height:44px;padding:0;font-size:26px;color:#e1c783;background:#243243}
.creation-card-paging span{font-size:12px;color:#b9c6d5}
.wizard .grid:has(>[data-wizard-card]),.advancement-editor .advancement-domain-deck{scroll-snap-type:none!important;padding:6px 6px 12px;scroll-padding:6px;box-sizing:border-box;cursor:grab}
.wizard .card-dragging,.advancement-editor .card-dragging{cursor:grabbing;user-select:none;scroll-behavior:auto!important}
.wizard .creation-gold .gold-denomination>div{grid-template-columns:repeat(3,28px);gap:5px}
.wizard .creation-gold .gold-denomination:last-of-type>div{grid-template-columns:36px}
.wizard .creation-gold .gold-mark{width:28px;height:28px}
.wizard .creation-gold .gold-denomination:last-of-type .gold-mark{width:36px;height:36px}
.creation-calling-setup{margin:16px 0}
.advancement-editor .advancement-option .selection-foot{height:28px;min-height:28px;box-sizing:border-box;white-space:nowrap;padding:6px 38px 6px 8px!important;line-height:16px}
.advancement-editor .advancement-remove{bottom:2px;right:4px;width:26px;height:24px;min-height:24px;padding:3px}
.advancement-editor .card-browse-filters{grid-template-columns:2fr 1fr!important}
.advancement-editor .card-browse-filters select[hidden]{display:none!important}
.card-browse-levels{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.card-browse-levels button{font-size:12px;min-height:36px;padding:6px 10px}
.card-browse-levels [aria-pressed="true"]{border-color:#e1bf76;background:#3d3a2e;color:#ffe6a7}
@media(max-width:760px){
 body:has(.wizard) .steps button{font-size:10px!important;padding:6px 2px!important;white-space:nowrap}
 #unified-advancement .unified-level-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:10px}
 #unified-advancement .unified-level-tabs button{font-size:11px;min-width:0;min-height:34px;padding:6px 2px;margin:0}
 #unified-advancement>h2{font-size:18px;margin-bottom:10px}
 #unified-advancement .editor-tabs{margin:4px 0}
 #unified-advancement .editor-tabs button{min-height:36px;font-size:11px!important}
 #unified-advancement .editor-page{padding:8px 0}
 #unified-advancement .editor-page>.editor-help{font-size:11px;margin-bottom:6px}
 #unified-advancement .advancement-choice-deck{grid-auto-rows:88px!important;gap:11px!important;width:calc(100% - 12px);justify-self:center;margin-inline:auto}
 #unified-advancement .advancement-tile,#unified-advancement .advancement-option{height:88px!important;min-height:88px!important;max-height:88px!important}
 #unified-advancement .advancement-option{padding-top:7px;row-gap:1px;grid-template-columns:20px minmax(0,1fr);column-gap:5px}
 #unified-advancement .advancement-option h3{font-size:10px!important;line-height:1.2}
 #unified-advancement .advancement-option p,#unified-advancement .advancement-option small{font-size:10px!important}
 #unified-advancement .advancement-option .advancement-total{font-size:11px}
 #unified-advancement .advancement-option>.icon{width:20px;height:20px}
 .card-browse-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
 .card-browse-levels button{font-size:11px;padding:6px 2px;min-height:34px}
 .wizard .creation-gold .gold-track{gap:12px;padding:10px;flex-wrap:wrap}
 .wizard .creation-gold .gold-denomination{gap:6px}
 .wizard .creation-gold .gold-denomination>div{grid-template-columns:repeat(3,24px);gap:4px}
 .wizard .creation-gold .gold-mark{width:24px;height:24px;min-width:24px;min-height:24px}
 .wizard .creation-gold .gold-denomination:last-of-type>div{grid-template-columns:32px}
 .wizard .creation-gold .gold-denomination:last-of-type .gold-mark{width:32px;height:32px}
}
