/* A physical lacquered board, with bronze joinery instead of thin gold outlines.
   The skin owns its one continuous interior. Child copy stays unframed. */
:root{
 --window-frame:url('assets/ui-window-lacquer-1029.webp');
 --bronze-frame:url('assets/ui-window-lacquer-1029.webp');
 --group-frame:url('assets/ui-window-bronze-charcoal-1029.webp');
 --value-frame:url('assets/ui-value-charcoal-1029.webp');
}
html body :is(#modal,.palace-sheet,.conquest-target-dialog,.castle-city-sheet){
 border:12px solid transparent!important;
 border-image:var(--window-frame) 180 fill / 32px / 0 stretch!important;
 background:transparent!important;box-shadow:none!important;outline:none!important;border-radius:0!important;
 --window-copy:#e3e0d8;--window-muted:#b7b9b6;--window-title:#e6cc9d;
 color:var(--window-copy)!important;
}
/* Fixed-size scene containers keep the illustration; their frame is painted once. */
html body :is(#modal,.palace-stage).is-room-result .palace-desk:has(.room-action-report,.room-annual-report),
html body :is(#modal,.palace-stage) :is(.palace-card-deck.room-register-deck,.room-life-record){
 border-image:var(--window-frame) 180 fill / 28px / 0 stretch!important;
 background:transparent!important;box-shadow:none!important;outline:none!important;
}
html body :is(#modal,.palace-stage) .room-register-deck>.room-register{border:0!important;border-image:none!important;background:transparent!important;box-shadow:none!important;padding:8px!important}
html body :is(#modal,.palace-sheet) :is(.modal-top,.palace-sheet>header){
 min-height:74px!important;padding-block:15px!important;gap:18px!important;
}
html body :is(#modal,.palace-sheet) :is(.modal-top h2,.palace-sheet>header h2){
 font-size:24px!important;letter-spacing:.045em!important;color:#e6cc9d!important;font-weight:800!important;
}
html body :is(#modal,.palace-sheet) :is(.close-modal,.palace-sheet>header>button){
 border-image:var(--window-frame) 180 fill / 10px / 0 stretch!important;
 color:#c4c3ba!important;min-width:68px!important;
}
html body :is(#modal,.palace-sheet) :is(.person-detail-tabs,.guide-goal-tabs){gap:8px!important}
html body :is(#modal,.palace-sheet) :is(.person-detail-tabs,.guide-goal-tabs) button{
 border:2px solid transparent!important;border-image:none!important;background:none!important;
 color:#abaea9!important;font-weight:500!important;text-decoration:none!important;
}
html body :is(#modal,.palace-sheet) :is(.person-detail-tabs,.guide-goal-tabs) button[aria-pressed=true]{
 border-image:var(--window-frame) 180 fill / 13px / 0 stretch!important;
 color:#f4dfb5!important;font-weight:800!important;text-decoration:none!important;
}
html body :is(#modal,.palace-sheet) :is(.window-docked-actions button,.palace-confirm,button.primary,.crew-management .crew-actions button){
 border-image:var(--window-frame) 180 fill / 13px / 0 stretch!important;
 color:#f4dfb5!important;background:transparent!important;
}
html body :is(#modal,.palace-sheet) :is(.guide-recommendation,.guide-remaining>button,.personnel-review-role){
 border-image:var(--window-frame) 180 fill / 10px / 0 stretch!important;
 padding:16px 18px!important;margin:8px 0!important;
}
html body :is(#modal,.palace-sheet) :is(.crew-slot>button,.crew-picker>header>button,.crew-candidate){
 border-image:var(--window-frame) 180 fill / 10px / 0 stretch!important;
}
html body :is(#modal,.palace-sheet) .text-button{color:#d5b887!important}
html body :is(#modal,.palace-stage) .result-reading :is(.companion-result-controls button,.report-battle-replay),
html body :is(#modal,.palace-stage) .annual-inline-pages :is(button,.report-full){
 border:2px solid transparent!important;border-image:var(--window-frame) 180 fill / 9px / 0 stretch!important;
 background:transparent!important;color:#e6cc9d!important;
}
html body :is(#modal,.palace-sheet) :is(.eyebrow,.dossier-kicker,.faction-detail-panel>header>span){color:#b7b9b6!important}
html body :is(#modal,.palace-sheet) :is(.char-name,.crew-slot-copy strong,.crew-candidate strong,.dossier-hero h3){color:#f3e6ca!important}
html body :is(#modal,.palace-sheet)::backdrop{background:#070a0dba;backdrop-filter:blur(4px)}
@media(max-width:700px){
 html body :is(#modal,.palace-sheet,.conquest-target-dialog,.castle-city-sheet){border-width:8px!important;border-image-width:24px!important}
 html body :is(#modal,.palace-sheet) :is(.modal-top,.palace-sheet>header){min-height:66px!important;padding-block:10px!important;gap:12px!important}
 html body :is(#modal,.palace-sheet) :is(.modal-top h2,.palace-sheet>header h2){font-size:21px!important;letter-spacing:.025em!important}
 html body :is(#modal,.palace-sheet) :is(.person-detail-tabs,.guide-goal-tabs){gap:4px!important}
 html body :is(#modal,.palace-sheet) :is(.person-detail-tabs,.guide-goal-tabs) button[aria-pressed=true]{border-image-width:10px!important}
 html body :is(#modal,.palace-stage).is-room-result .palace-desk:has(.room-action-report,.room-annual-report),
 html body :is(#modal,.palace-stage) :is(.palace-card-deck.room-register-deck,.room-life-record){border-image-width:19px!important}
}
