/* Neutral lacquer replaces the former navy interface paint.
   The raster surface owns the fill; readings inside it are not extra panels.
   Faction cloth, map colours, illustrations and stat accents are intentionally untouched. */
:root{
 --neutral-ink:#ece5d7;
 --neutral-muted:#c0baaf;
 --neutral-field:#24231f;
 --neutral-track:#141511;
}
html body :is(#modal,.palace-sheet,.palace-stage,.title-screen,.creation-card){
 --surface:#24231f;--paper:#24231f;--panel:#24231f;
 --ink:var(--neutral-ink);--muted:var(--neutral-muted);
}

/* Existing HUD bounds and frame widths remain unchanged. */
html body :is(.palace-stage,.title-screen,.site-wrap) :is(
 .palace-person,.room-guide,.palace-story,.palace-faction-status,
 .palace-header,.palace-footer,.game-frame-header,.title-shell-header
){
 background:transparent!important;border-image-source:var(--bronze-frame)!important;
 border-image-slice:180 fill!important;box-shadow:none!important;
}
html body :is(.game-frame-header,.title-shell-header){border-image-width:7px!important;border-image-outset:0!important;border-image-repeat:stretch!important}
html body .palace-stage :is(.palace-birth-inline>span,.residence-inline i){background:transparent!important}

/* A record's child cards use a quieter material than its enclosing window. */
html body :is(#modal,.palace-stage,.palace-sheet) :is(
 .register-path,.register-person,.register-hall-card,.register-hall-empty,
 .dossier-hero,.dossier-skill,.detail-data-card,.faction-detail-grid article,
 .retainer-decision,.candidate-skills,.recruitment-review-candidate
){
 background:transparent!important;border-image-source:var(--group-frame)!important;
 border-image-slice:180 fill!important;box-shadow:none!important;
}
html body :is(#modal,.palace-stage,.palace-sheet) :is(
 .growth-graph,.retainer-ability-change,.result-skill-card,.retainer-report-skills>div,
 .hall-stat,.candidate-stat,.candidate-abilities>div,.dossier-stats>div
){
 background:transparent!important;border-image-source:var(--value-frame)!important;
 border-image-slice:180 fill!important;box-shadow:none!important;
}
/* Later result rules have ID-level specificity; retain their layout, replace only paint. */
html body :is(#modal,.palace-stage) .result-reading :is(.growth-graph,.result-skill-card){background:transparent!important;border-image-source:var(--value-frame)!important}
html body :is(#modal,.palace-stage) .result-reading .report-distinctions>div{background:transparent!important;border-image-source:var(--group-frame)!important}

/* Text, receipts and explanatory rows sit directly on the containing lacquer. */
html body :is(#modal,.palace-stage,.palace-sheet) :is(
 .life-record-cause,.life-record-facts>div,.annual-record-list article,.room-report-summary li,
 .personnel-review-record,.relationship-meter,.command-authority-effects>span,
 .patronage-strip,.relationship-panel,.command-authority-panel,.court-career-panel,
 .personnel-review,.career-transfer,.experience-panel,.faction-court,
 .promotion-all,.promotion-all>summary,.promotion-offices>div,.promotion-check,
 .career-requirements,.career-requirements>div,.choice-requirement,.choice-detail-intro,
 .growth-report,.fixed-report,.experience-report,.choice-report-heading,
 .political-chance,.patronage-choice,.world-strip,.origin-trait,
 .guide-goal-tabs,.guide-choice-preview,.guide-requirements>div,
 .candidate-birth,.candidate-identity,.candidate-description,.retainer-report-relations>div,
 .life-record-actions,.register-record-actions,.register-hall-stats,
 .hall-tools>div,.register-mastery
){background:transparent!important;box-shadow:none!important}
html body :is(#modal,.palace-stage,.palace-sheet) .growth-graph header strong::before{background:transparent!important}

/* Controls retain a single neutral, filled asset rather than a coloured CSS mat. */
html body :is(#modal,.palace-stage,.palace-sheet,.title-screen,.site-wrap) :is(
 .palace-subnav button,.palace-utility button,.palace-pages button,
 .palace-year-finish,.palace-confirm,.report-full,.report-battle-replay,
 .companion-result-tabs button,.companion-result-controls button,.annual-inline-pages button,
 .register-detail button,.register-record-actions button,.register-honors-open,
 .register-hall-footer button,.life-record-actions button,.life-record-actions a,
 .hall-tabs button,.hall-filters button,.honor-field-filters button,
 .candidate-actions button,.retainer-report-pager button,.window-docked-actions button,
 .palace-header button:not([data-palace-menu="settings"]),
 .game-frame-header>button:last-child
){background:transparent!important;border-image-source:var(--value-frame)!important;border-image-slice:180 fill!important;box-shadow:none!important}
html body :is(#modal,.palace-stage,.palace-sheet) :is(
 .palace-subnav,.palace-utility,.choice-subtabs,.companion-result-tabs
) button[aria-pressed="true"]{background:transparent!important;color:#f1d9a6!important}
html body :is(#modal,.palace-sheet,.title-screen,.creation-card) :is(input:not([type="range"]):not([type="checkbox"]),select){
 background:var(--neutral-field)!important;color:var(--neutral-ink)!important;box-shadow:none!important;
}
html body :is(#modal,.palace-sheet,.title-screen,.creation-card) select option{background:var(--neutral-field);color:var(--neutral-ink)}

/* The title and setup retain their artwork and geometry, with the same material language. */
html body :is(#title-screen,.title-screen) :is(.main-menu,.menu-settings-panel){
 background:transparent!important;border-image-source:var(--window-frame)!important;
 border-image-slice:180 fill!important;border-image-width:18px!important;box-shadow:none!important;
}
html body :is(#title-screen,.title-screen) .main-menu-options button,
html body :is(#title-screen,.title-screen) .menu-settings-panel button,
html body :is(#title-screen,.title-screen) .title-enter-prompt{
 background:transparent!important;border-image-source:var(--value-frame)!important;
 border-image-slice:180 fill!important;border-image-width:7px!important;box-shadow:none!important;
}
html body :is(#title-screen,.title-screen) :is(.title-seal,.menu-glyph){background:transparent!important;box-shadow:none!important}
html body :is(#title-screen,.title-screen) .menu-settings-panel .bgm-player{background:transparent!important}
html body :is(#title-screen,.title-screen) .title-content::before{background:radial-gradient(ellipse,#171714a8,transparent 72%)!important}
html body :is(#main-menu,#menu-settings-panel)>h2[tabindex="-1"]:focus{outline:none!important}
html body .creation-card{
 --creation-ink:var(--neutral-ink);--creation-muted:var(--neutral-muted);--creation-field:var(--neutral-field);
 background:transparent!important;border-image-source:var(--window-frame)!important;
 border-image-slice:180 fill!important;box-shadow:none!important;
}
html body .creation-card :is(.creation-form,.creation-portrait,.portrait-setup,.birth-customization,.creation-effects,.creation-fate,.creation-effects #setup-preview,.creation-fate>div,.creation-effects>.text-button,#setup-preview){background:transparent!important;box-shadow:none!important}
html body .creation-card #home-portrait-preview{background:transparent!important;box-shadow:none!important}
html body .creation-card .creation-portrait::before,
html body .creation-card .creation-portrait::after{background:none!important;border:0!important;border-image:none!important;box-shadow:none!important}
html body .creation-card :is(.portrait-setup .text-button,.setup-randomize,.creation-start,.primary,.birth-choice-card){
 background:transparent!important;border-image-source:var(--value-frame)!important;
 border-image-slice:180 fill!important;border-image-width:7px!important;box-shadow:none!important;color:var(--neutral-ink)!important;
}
html body .creation-card .birth-choice-seal{background:transparent!important}
html body :is(#modal,.palace-sheet) :is(.birth-option,.birth-option-random,.birth-option-effect){background:transparent!important;border-image-source:var(--group-frame)!important;border-image-slice:180 fill!important;color:var(--neutral-ink)!important;box-shadow:none!important}

/* Neutral troughs make the unchanged ability colours readable. */
html body :is(#modal,.palace-stage,.palace-sheet) :is(.growth-graph-track,.retainer-ability-track,.register-path progress){background:var(--neutral-track)!important}
html body .register-path progress::-webkit-progress-bar{background:var(--neutral-track)!important}
html body :is(#modal,.palace-stage,.palace-sheet) .growth-graph-before{background:color-mix(in srgb,var(--growth-color) 45%,#23241f)!important}
html body :is(#modal,.palace-stage,.palace-sheet) .retainer-ability-track>span{background:color-mix(in srgb,var(--retainer-stat) 50%,#23241f)!important}

/* Shared progression controls and the image caption use the same warm black. */
html body :is(#modal,.palace-stage) .palace-footer button.primary,
html body .city-experience .city-outside-toggle{
 background:transparent!important;border-image:var(--value-frame) 180 fill / 7px / 0 stretch!important;
 box-shadow:none!important;color:var(--neutral-ink)!important;
}
html body :is(#modal,.palace-stage) .annual-hero{background:#191915!important}
html body :is(#modal,.palace-stage) .annual-hero figcaption{background:linear-gradient(transparent,#131410f2 65%)!important}
/* Reward cards share the fixed growth-card material and proportions. */
:root{--icon-medallion:url('assets/ui-window-lacquer-1029.webp')}
/* The house entry already owns its illustration; do not nest a facility sign in it. */
html body .city-experience[data-estate] .city-home .city-home-plaque{
 background:none!important;border:0!important;border-image:none!important;
 outline:none!important;box-shadow:none!important;padding:4px 6px!important;
 width:auto!important;max-width:100%!important;box-sizing:border-box!important;
 text-align:center!important;align-items:center!important;gap:4px!important;
}
html body .city-home .city-home-plaque::before,
html body .city-home .city-home-plaque::after{content:none!important;display:none!important}
html body .city-home .city-home-plaque :is(strong,small){white-space:nowrap!important}
/* Card labels and detail controls use colour/weight rather than text underlines.
   Progress tracks are separate elements and retain their gauge rendering. */
html body :is(#modal,.palace-sheet,.palace-stage,.creation-card,.main-menu),
html body :is(#modal,.palace-sheet,.palace-stage,.creation-card,.main-menu) *{
 text-decoration:none!important;
}
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div{
 flex:0 0 220px!important;width:220px!important;max-width:220px!important;height:146px!important;min-height:146px!important;max-height:146px!important;
 flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;padding:16px!important;gap:12px!important;
 border:2px solid transparent!important;border-image:var(--value-frame) 180 fill / 6px / 0 stretch!important;background:transparent!important;position:relative!important;overflow:hidden!important;
}
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div>span{font-size:18px!important;color:#e4d9bd!important;z-index:1}
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div>b{font-size:36px!important;text-align:left!important;z-index:1}
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div:after{content:attr(data-reward-seal)!important;display:block!important;position:absolute!important;right:10px!important;bottom:6px!important;font-size:78px!important;line-height:1!important;color:#b5a37b!important;opacity:.15!important;pointer-events:none!important}
@media(max-width:700px) and (orientation:portrait){
 html body :is(#modal,.palace-stage) .result-reading .report-rewards>div{flex-basis:calc((100% - 8px)/2)!important;width:calc((100% - 8px)/2)!important;max-width:180px!important;height:132px!important;min-height:132px!important;max-height:132px!important;padding:10px!important;gap:7px!important}
 html body :is(#modal,.palace-stage) .result-reading .report-rewards>div>span{font-size:15px!important}
 html body :is(#modal,.palace-stage) .result-reading .report-rewards>div>b{font-size:32px!important}
}
@media(max-width:700px) and (max-height:680px) and (orientation:portrait){html body :is(#modal,.palace-stage) .result-reading .report-rewards>div{height:100px!important;min-height:100px!important;max-height:100px!important;padding:7px!important}}
html.landscape-desktop body :is(#modal,.palace-stage) .result-reading .report-rewards>div{flex-basis:190px!important;width:190px!important;max-width:190px!important;height:110px!important;min-height:110px!important;max-height:110px!important;padding:10px!important}
/* Numeric receipts expose the recorded before/after values, not only the delta. */
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div.has-reward-gauge{display:grid!important;grid-template-columns:1fr auto!important;grid-template-rows:auto 1fr 8px!important;gap:8px!important;align-items:center!important}
html body :is(#modal,.palace-stage) .result-reading .report-rewards>div.has-reward-gauge>b{font-size:24px!important}
.reward-gauge-values{grid-column:1/-1;display:flex;align-items:baseline;gap:8px;position:relative;z-index:1}
.reward-gauge-values>span{font-size:16px;color:#c9c1b1}.reward-gauge-values>strong{font-size:36px;color:#f5ecda}
.reward-gauge-track{grid-column:1/-1;height:8px;width:100%;position:relative;background:#11120f;overflow:hidden}
.reward-gauge-track>span{position:absolute;height:100%;top:0}.reward-gauge-base{background:#a99e80}.reward-gauge-delta{background:#f1dc9b}.is-loss .reward-gauge-delta{background:#dc8b7c}
html body :is(#modal,.palace-stage) .annual-reward-grid>div{display:grid!important;grid-template-columns:1fr auto!important;grid-template-rows:auto 1fr 6px!important;border:2px solid transparent!important;border-image:var(--value-frame) 180 fill / 6px!important;height:100px!important;min-height:100px!important;padding:10px!important;gap:5px!important}
html body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-values>strong{font-size:28px!important}
html body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-track{height:6px!important}
@media(max-width:700px) and (orientation:portrait){
 html body :is(#modal,.palace-stage) .annual-reward-grid>div{height:86px!important;min-height:86px!important;padding:6px!important;gap:4px!important}
 html body :is(#modal,.palace-stage) .annual-reward-grid b{font-size:20px!important}
 html body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-values{gap:3px!important}
 html body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-values>strong{font-size:24px!important}
 html body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-values>span{font-size:11px!important}
 .reward-gauge-values>strong{font-size:30px}
}
@media(max-width:700px) and (max-height:680px) and (orientation:portrait){html body :is(#modal,.palace-stage) .annual-reward-grid>div{height:72px!important;min-height:72px!important;padding:4px!important}}
html.landscape-desktop body :is(#modal,.palace-stage) .annual-reward-grid>div{height:76px!important;min-height:76px!important;padding:5px!important;gap:3px!important}
html.landscape-desktop body :is(#modal,.palace-stage) .annual-reward-grid .reward-gauge-values>strong{font-size:24px!important}
/* Candidate cost receipts use the same three-row gauge layout as growth cards. */
html body .palace-stage .room-action-report.has-candidate .report-rewards>.has-reward-gauge{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:32px 40px 8px!important;align-content:center!important;align-items:center!important;justify-items:start!important;padding:12px 16px!important;gap:6px 8px!important;box-sizing:border-box!important}
html body .palace-stage .room-action-report.has-candidate .report-rewards>.has-reward-gauge>span{font-size:17px!important;line-height:22px!important;min-height:0!important;margin:0!important;white-space:nowrap}
html body .palace-stage .room-action-report.has-candidate .report-rewards>.has-reward-gauge>b{font-size:28px!important;line-height:32px!important;margin:0!important}
html body .palace-stage .room-action-report.has-candidate .reward-gauge-values{grid-column:1/-1!important;line-height:40px!important;gap:7px!important;margin:0!important;align-items:baseline!important}
html body .palace-stage .room-action-report.has-candidate .reward-gauge-values>strong{font-size:34px!important;line-height:40px!important}
html body .palace-stage .room-action-report.has-candidate .reward-gauge-values>span{font-size:15px!important;line-height:20px!important}
html body .palace-stage .room-action-report.has-candidate .reward-gauge-track{grid-column:1/-1!important;width:100%!important;height:8px!important;min-height:8px!important}
