/* Work-ID 20260925-shutdown-world-7b4d
 * SHUTDOWN RPG / ONE REAL PNG-UV SKIN FOR THE GAME.
 * Reuse the independently editable 96px/24px nine-slice source images from
 * ui/login; mesh.json holds the actual UV vertices and triangle indices.
 * Only chrome is painted; map canvas, creature art, mini-map image, HP/EXP/
 * status/type fills, encounter overlays and gameplay logic are untouched.
 * Never set display on a hidden root or erase a PNG before the replacement
 * passes visual acceptance. Background-color is always beneath image fill. */
:root{
  --sd-gold:#efc989;--sd-gold-bright:#ffe0a0;--sd-cream:#f6eee2;
  --sd-secondary:#cbbbad;--sd-ink:#120e15;--sd-panel:#17121a;
  --sd-inset:#100e15;--sd-slot:#201720;--sd-red:#bb273a;
  --sd-red-bright:#fa5762;--sd-outline:rgba(214,150,94,.53);
}
#game{
  color:var(--sd-cream)!important;
  background-color:#09090e!important;
  background-image:url("../main/backdrop.png?v=cabare-uv-1")!important;
  background-size:48px!important;
}
/* Physical source map: frame.png / frame-active.png / slot.png / button.png /
   button-active.png are 96×96 with 24px source bands. 12px border-image-width
   keeps the corners stable on a high-DPI display and stretches only the center. */
#game :is(.premium-topbar,.premium-statusbar,.premium-world-column),
#game .premium-left-rail > :is(.trainer-card,.party-panel),
#game .premium-right-rail > :is(.premium-panel,.chat-panel){
  border:12px solid transparent!important;
  border-image:url("../login/frame.png?v=cabare-uv-1") 24 fill / 12px / 0 stretch!important;
  border-radius:0!important;
  background-color:var(--sd-panel)!important;
  box-shadow:0 6px 22px #0009!important;
}
#game .premium-world-column{
  min-width:0;min-height:0;overflow:hidden;
  border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important;
}
#game .premium-topbar{
  flex-shrink:0;min-height:72px;
  border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important;
  border-bottom-width:12px!important;
}
#game .premium-statusbar{
  flex-shrink:0;min-height:30px;padding:3px 18px!important;
  color:#dfc7b0!important;
  border-image-source:url("../login/frame.png?v=cabare-uv-1")!important;
}
#game .premium-statusbar .status-notice b{color:#41d684!important}
#game .premium-world-layout{
  min-height:0;overflow:hidden;gap:12px;
  background-color:transparent!important;
}
#game .premium-left-rail,#game .premium-right-rail{
  min-width:0;min-height:0;gap:10px;
}
#game .premium-left-rail > .party-panel{min-height:0}
#game .premium-left-rail > .trainer-card{flex:0 0 auto}
#game .hud-brand{display:flex;align-items:center;min-width:0;gap:10px}
#game .hud-brand .emblem{
  flex:0 0 38px;width:38px!important;height:38px!important;
  border:0!important;border-radius:0!important;
  background: url("../login/crest.png?v=2") center/contain no-repeat!important;
  filter:drop-shadow(0 0 5px #a32939a8)!important;
}
#game .hud-brand .emblem::after{display:none!important}
#game .hud-brand>div{
  color:var(--sd-gold)!important;
  font-weight:800!important;letter-spacing:.015em!important;
  text-shadow:1px 1px 0 #000!important;
}
#game .hud-brand b{color:#ff626c!important}
#game .hud-brand small{color:#e4c9ab!important;font-size:max(12px,.62rem)!important;letter-spacing:.08em!important}
#game :is(.premium-panel-heading,.premium-location-bar,.premium-chat-panel .chat-header){
  border:8px solid transparent!important;
  border-image:url("../login/frame-active.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:#24151e!important;
  background-image:none!important;
  border-radius:0!important;
  box-shadow:none!important;
}
#game :is(.premium-panel-heading>strong,.chat-title,.premium-location-bar h2){
  color:var(--sd-gold-bright)!important;font-weight:700!important;
  text-shadow:1px 1px 0 #000!important;
}
#game :is(.premium-panel-heading .premium-heading-icon,.hud-coordinate-icon){
  color:var(--sd-gold)!important;filter:none!important;
}
#game .premium-panel-heading>span:last-child:not(.hud-online-badge),
#game .premium-location-bar .eyebrow,#game .trainer-role,
#game .hud-minimap-label,#game .chat-caption{
  color:var(--sd-secondary)!important;
}
#game .hud-global-nav{min-width:0;min-height:0;align-items:center}
#game .hud-global-nav>.hud-nav-item{
  min-width:0;min-height:42px;
  border:8px solid transparent!important;
  border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:#1a1420!important;
  box-shadow:none!important;color:#e7d5c1!important;
}
#game .hud-global-nav>.hud-nav-item:is(:hover:not(:disabled),.active,[aria-selected="true"]),
#game .hud-global-nav>.hud-nav-item:focus-visible{
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
  background-color:#57202c!important;color:#fff1d6!important;
}
#game .hud-global-nav>.hud-nav-item[aria-pressed="true"]{
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
}
#game .hud-nav-item .hud-nav-icon{color:var(--sd-gold)!important}
#game .hud-global-nav>#hud-grass-search[aria-pressed="true"] .hud-nav-icon{color:#71eaa0!important}
#game .hud-global-nav>.hud-nav-item>span:last-child{
  color:inherit!important;font-weight:700!important;font-size:max(12px,.66rem)!important;
  text-shadow:none!important;
}
#game .world-presence,#game .account-head{
  color:var(--sd-secondary)!important;
}
#game .world-presence .pill{
  border:6px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 6px / 0 stretch!important;
  background-color:var(--sd-inset)!important;color:var(--sd-gold)!important;
}
#game .account-head #trainer-name{color:var(--sd-cream)!important}
#game :is(.account-head .quiet,.hud-panel-action,.hud-wide-command,.premium-atlas-button,.toolbar-actions .icon-button,
  .hud-minimap-tools button,.hud-chat-send,.chat-header .icon-button,.chat-scroll button){
  border:8px solid transparent!important;
  border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:#221720!important;
  box-shadow:none!important;color:var(--sd-gold)!important;
}
#game :is(.account-head .quiet,.hud-panel-action,.hud-wide-command,.premium-atlas-button,.toolbar-actions .icon-button,
  .hud-minimap-tools button,.hud-chat-send,.chat-header .icon-button,.chat-scroll button):is(:hover:not(:disabled),:focus-visible),
#game .premium-atlas-button[aria-pressed="true"]{
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
  background-color:#55212b!important;color:#fff0ce!important;
}
#game .hud-chat-send{color:#fff!important}
#game .trainer-identity-copy h2,#game #passport-name{
  color:#ffefcb!important;text-shadow:1px 1px 0 #000!important;
}
#game :is(.trainer-stats>div,.party-card,.hud-mission-row,.hud-missions-list,.chat-messages,.chat-log,
  .hud-minimap,.hud-minimap-label,.hud-minimap-tools,.chat-whisper-row){
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-inset)!important;
  box-shadow:none!important;
}
#game .party-card.lead,#game .hud-mission-row.complete{
  border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important;
  background-color:#39212a!important;
}
#game .party-card .party-icon{image-rendering:pixelated!important}
#game :is(.trainer-stats>div,.party-card,.hud-mission-row) :is(strong,.party-name){
  color:#f3e5cc!important;
}
#game .trainer-stats>div:first-child strong{color:var(--sd-gold-bright)!important}
#game .hud-minimap-stage,#game .hud-minimap-stage img{
  background:transparent!important;border-image:none!important;
}
#game .hud-minimap-marker{background-color:#f83c53!important}
#game .hud-minimap-label{color:var(--sd-gold)!important}
#game .premium-key-dock{
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:#141016!important;color:#eddfcd!important;border-radius:0!important;
}
#game .premium-key-dock :is(kbd,.key-cluster){color:#f7e5c9!important;border-color:#815b42!important;background-color:#241b20!important}
#game .premium-chat-panel .chat-tabs{border-bottom:1px solid #5b3940!important}
#game .premium-chat-panel .chat-tabs button{
  border:6px solid transparent!important;
  border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 6px / 0 stretch!important;
  background-color:var(--sd-slot)!important;color:#e4d3bd!important;border-radius:0!important;
}
#game .premium-chat-panel .chat-tabs button.selected{
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
  background-color:#5b222e!important;color:#fff0d6!important;
}
#game .premium-chat-panel form{background-color:#161118!important;border-top:1px solid #694135!important}
#game .premium-chat-panel #chat-input{color:#f5e9da!important;background-color:transparent!important;border-image:none!important}
#game .premium-chat-panel #chat-input::placeholder{color:#bfaea5!important}
#game :is(.area-radar,.repel-hud,.sky-widget,.map-loading,.map-source){
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-inset)!important;
  color:#f4e4cf!important;
}
#game .sky-widget:is(:hover,:focus-visible){border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important}
#game :is(.field-talk,.field-talk-message,.field-talk-option){ /* story text must retain its original pale-paper contrast */ }
#game #viewport,#game #world-canvas,#game #hud-minimap-image{
  /* Never paint the actual map/canvas or atlas texture with the HUD skin. */
  border-image:none!important;filter:none!important;
}
/* GAME WINDOWS: fixed authored footprint for every modal view, not content-driven
   width. The body is the internal scroller; short dialogs use their own SMALL
   fixed footprint. This does not affect the dedicated battle's fixed 1120x800. */
#modal[data-view]{
  --shutdown-window-width:1050px;--shutdown-window-height:764px;
  box-sizing:border-box!important;
  width:min(var(--shutdown-window-width),calc(100vw - 32px))!important;
  height:min(var(--shutdown-window-height),calc(100dvh - 32px))!important;
  min-width:0!important;min-height:0!important;
  max-width:none!important;max-height:none!important;
  overflow:hidden!important;
  border:12px solid transparent!important;
  border-image:url("../login/frame-active.png?v=cabare-uv-1") 24 fill / 12px / 0 stretch!important;
  border-radius:0!important;
  background-color:var(--sd-panel)!important;
  box-shadow:0 18px 55px #000c!important;
}
/* Standalone confirmation/utility views are deliberately fixed small windows. */
#modal[data-view="invite"],#modal[data-view="repel"],#modal[data-view="inspect"],
#modal[data-view="item-action"],#modal[data-view="trainer-result"]{
  --shutdown-window-width:630px;--shutdown-window-height:470px;
}
#modal[data-view]>.modal-header{
  flex:0 0 auto;min-width:0;min-height:64px;
  border:8px solid transparent!important;
  border-image:url("../login/frame-active.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;
  background-color:#291820!important;background-image:none!important;
  box-shadow:none!important;
}
#modal[data-view] .modal-header .eyebrow{
  color:var(--sd-gold)!important;font-size:max(12px,.7rem)!important;
}
#modal[data-view] #modal-title{
  color:#fff1d8!important;text-shadow:1px 1px 0 #000!important;
  font-weight:700!important;letter-spacing:0!important;
}
#modal[data-view] #modal-close,
#audio-dialog #audio-close{
  flex:0 0 36px;width:36px;height:36px;padding:0!important;
  border:8px solid transparent!important;
  border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-slot)!important;
  color:var(--sd-gold-bright)!important;
}
#modal[data-view] #modal-close:hover,#audio-dialog #audio-close:hover{
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
}
#modal[data-view] #modal-body{
  flex:1 1 auto;min-width:0;min-height:0;
  overflow:auto!important;overscroll-behavior:contain;
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-inset)!important;
}
#modal[data-view] :is(.main-menu-list,.main-menu-preview,.bag-list-panel,.bag-detail,
  .collection-card,.dex-card,.goal-card,.journal-summary>div,.storage-panel,
  .storage-detail,.pc-box,.relearn-textbox,.friends-head,.forecast-row,.forecast-card,
  .gm-section,.skins-preview,.skin-card,.guide-card,.town-map-info){
  border:8px solid transparent!important;
  border-image:url("../login/frame.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:#1b151d!important;
  box-shadow:none!important;
}
#modal[data-view] :is(.main-menu-entry,.main-menu-mon,.main-menu-item,.bag-list-item,
  .bag-pocket,.storage-slot,.pc-slot,.goal-reward,.journal-summary>div,
  .badge-card,.gm-list-row,.gm-log-row,.friend-row,.forecast-day,
  .dex-row,.info-move-row,.shop-row,.mart-row){
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:#18131b!important;
}
#modal[data-view] :is(.main-menu-entry,.bag-pocket,.bag-list-item,.storage-slot,
  .pc-slot,.badge-card,.skin-card):is(.selected,[aria-selected="true"],[aria-pressed="true"]){
  border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important;
  background-color:#40202d!important;
}
#modal[data-view] :is(.main-menu-entry,.bag-pocket,.storage-slot,.pc-slot,.skin-card):hover:not(:disabled){
  border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important;
}
#modal[data-view] :is(.main-menu-preview-head,.main-menu-fact,.main-menu-team,
  .main-menu-items,.main-menu-foot,.bag-list-heading,.section-heading,
  .dex-heading,.storage-heading,.info-section-heading,.forecast-head){
  color:var(--sd-gold-bright)!important;
}
#modal[data-view] :is(.main-menu-preview strong,.bag-detail h3,.dex-card strong,
  .collection-card strong,.storage-detail strong,.goal-card strong){
  color:#f6e9cf!important;
}
#modal[data-view] :is(.modal-actions button,.main-menu-entry,.main-menu-foot button,
  .bag-detail-actions button,.bag-modes button,.bag-pockets button,.storage-tabs button,
  .town-map-tabs button,.forecast-tabs button,.relearn-button,.pc-tool,
  .gm-tabs button,.friends-actions button){
  border:8px solid transparent!important;
  border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:var(--sd-slot)!important;border-radius:0!important;
  color:#ead6bd!important;box-shadow:none!important;
}
#modal[data-view] :is(.modal-actions button,.main-menu-entry,.main-menu-foot button,
  .bag-detail-actions button,.bag-modes button,.bag-pockets button,.storage-tabs button,
  .town-map-tabs button,.forecast-tabs button,.relearn-button,.pc-tool,
  .gm-tabs button,.friends-actions button):is(:hover:not(:disabled),:focus-visible,.selected,[aria-selected="true"]){
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
  background-color:#54222e!important;color:#fff0d1!important;
}
#modal[data-view] :is(.modal-actions button.primary,.bag-detail-actions button.primary,
  .main-menu-entry.selected,.pc-tool.selected){
  border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
  color:#fff5e4!important;
}
#modal[data-view] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),select,textarea),
#audio-dialog :is(select,input:not([type="checkbox"]):not([type="radio"]):not([type="range"])){
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  border-radius:0!important;background-color:#120f16!important;
  color:#f8e9d7!important;caret-color:#f8c28a!important;
}
#modal[data-view] :is(input,select,textarea):focus-visible,
#audio-dialog :is(input,select,textarea):focus-visible{
  outline:2px solid #ffdf9d!important;outline-offset:2px!important;
}
#modal[data-view] :is(.type-chip,.info-type,.info-type-code,.hp-fill,.xp-fill,.goal-track>div,
  .skins-progress>span,.weather-icon,.forecast-icon,.badge-symbol,
  .town-map-hit,.town-map-icon,.town-map-cell,.town-map-label,.party-icon,
  .pokemon-sprite,.item-icon,.dex-sprite,.trainer-avatar){
  /* Semantic sprites, map coordinates and progress colors retain their source. */
  box-shadow:none;
}
/* Independently floating settings/connection surfaces. */
#audio-dialog{
  box-sizing:border-box!important;
  width:min(660px,calc(100vw - 32px))!important;
  height:min(740px,calc(100dvh - 32px))!important;
  min-height:0!important;min-width:0!important;
  max-width:none!important;max-height:none!important;
  border:12px solid transparent!important;
  border-image:url("../login/frame-active.png?v=cabare-uv-1") 24 fill / 12px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-panel)!important;
}
#audio-dialog>.modal-header{
  flex:0 0 auto;min-height:70px;
  border:8px solid transparent!important;
  border-image:url("../login/frame-active.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:#291820!important;color:#f5e4d1!important;
}
#audio-dialog #audio-title{color:var(--sd-gold-bright)!important}
#audio-dialog .audio-body{
  flex:1 1 auto;min-width:0;min-height:0;overflow:auto!important;
  border:8px solid transparent!important;
  border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:var(--sd-inset)!important;
}
#audio-dialog :is(.audio-slider,.audio-status-row,.audio-options){
  background-color:#1c1620!important;color:#f0ddc7!important;
}
#audio-dialog #audio-enable{
  border:8px solid transparent!important;
  border-image:url("../login/button-active.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:#61202e!important;color:#fff2d7!important;
}
#context-menu,.toast-stack>.toast,#disconnect-overlay .disconnect-card{
  border:10px solid transparent!important;
  border-image:url("../login/frame.png?v=cabare-uv-1") 24 fill / 10px / 0 stretch!important;
  border-radius:0!important;background-color:var(--sd-panel)!important;
  color:var(--sd-cream)!important;
}
#context-menu button{
  color:var(--sd-cream)!important;
}
#context-menu button:hover,#context-menu button:focus-visible{
  background-color:#57212f!important;color:#ffe1a4!important;
}
.toast-stack>.toast.warn{color:var(--sd-gold-bright)!important}
.toast-stack>.toast.error{border-image-source:url("../login/frame-active.png?v=cabare-uv-1")!important}
#disconnect-overlay .disconnect-card .eyebrow{color:var(--sd-gold)!important}
#disconnect-overlay .disconnect-card button{
  border:8px solid transparent!important;
  border-image:url("../login/button-active.png?v=cabare-uv-1") 24 fill / 8px / 0 stretch!important;
  background-color:#692230!important;color:#fff2de!important;
}
/* Battle retains its specialized physical art and geometry. Only share theme
   tokens/text values here; never skin the battle stage or source sprites. */
#battle-dialog.battle-window-solid{
  --battle-gold:#efc989;--battle-foreground:#f6eee2;
}
#battle-dialog.battle-window-solid .battle-head .eyebrow{color:#efc989!important}
#battle-dialog.battle-window-solid .battle-head h2{color:#fff1d9!important}
/* Keep all stateful hide semantics from the app; no display:* !important
   on #game, #login, #disconnect-overlay, or #context-menu. */
@media (max-width:850px){
  #game .premium-topbar{min-height:60px}
  #game .hud-brand .emblem{width:31px!important;height:31px!important;flex-basis:31px}
  #modal[data-view],#audio-dialog{
    width:calc(100vw - 12px)!important;
    height:calc(100dvh - 12px)!important;
  }
  #game .premium-left-rail,#game .premium-right-rail{gap:6px}
}
@media (max-height:560px){
  #modal[data-view],#audio-dialog{
    height:calc(100dvh - 12px)!important;
  }
}
@media (prefers-reduced-motion:reduce){
  #game .hud-nav-item,#modal[data-view] button,#audio-dialog button{transition:none!important}
}
