/* Parchment interiors, charcoal chrome and illustrated woodland frames. */
:root {
  --ink: #272722;
  --border: #aa8245;
  --gold: #f2ce7e;
  --text: #fff2d0;
  --muted: #ccc9b4;
  --hud-surface: linear-gradient(145deg, #373831, #242622 75%);
  --hud-frame: inset 0 0 0 2px #20221d, inset 0 0 0 3px #e4bf7055, 0 4px 12px #0007;
  --paper: #ecd8ad;
  --paper-ink: #322d22;
  --paper-muted: #66583e;
  --paper-surface: linear-gradient(115deg, #fff5dd55, #caa16520), #ecd8ad;
}

#game dialog {
  background: var(--hud-surface);
  color: var(--text);
  border: 2px solid #ba9457;
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px #f8e7bf, inset 0 0 0 4px #a5804c, 0 20px 70px #0009;
  scrollbar-color: #a5804c #e6cfa0;
}
#game dialog::backdrop { background: #19241d77; backdrop-filter: blur(4px); }
#game dialog.rpg-window {
  border: 14px solid transparent;
  border-image: url('/games/main/assets/ui/theme-v1/panel-frame.png') 155 / 14px stretch;
  border-radius: 8px;
  background: var(--paper-surface);
  color: var(--paper-ink);
  box-shadow: 0 18px 65px #0008;
}
#game .rpg-window .window-heading,
#game dialog .dialog-heading,
#game .shop-header {
  background: linear-gradient(110deg, #3d3d34, #292b26);
  border-color: #ac884d;
  color: #fff0c3;
  box-shadow: inset 0 1px #f7dba34d, inset 0 -2px #171b17;
}
#game .window-heading h2 { color: #ffe9ad; font-weight: 600; letter-spacing: 0; }
#game .window-subtitle { color: #eadcba; border-color: #bc9857; }
#game .window-sigil { color: #f3d083; }
#game .rpg-window .window-sigil {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  font-size: 0;
  background: url('/games/main/assets/ui/menu-medallions-v1/menu-atlas.webp') 3.503854% 11.574074% / 511.239193% 255.619597% no-repeat;
}
#game #skills-dialog .window-sigil { background-size: 508.309456% 254.154728%; background-position: 34.456140% 11.431227%; }
#game #bag-dialog .window-sigil { background-size: 509.770115% 254.885057%; background-position: 65.497896% 11.502783%; }
#game .window-nav { background: #30312a; border-color: #aa8245; padding-bottom: 8px; }
#game dialog button {
  background: linear-gradient(#49493f, #2d3029);
  color: #fff0ca;
  border: 1px solid #a38958;
  border-radius: 4px;
  box-shadow: inset 0 1px #ffebbd33, inset 0 -2px #171b1766, 0 2px 3px #40301a22;
  letter-spacing: 0;
}
#game dialog button:hover:not(:disabled) {
  background: linear-gradient(#62614b, #3d4335);
  border-color: #d5ae61;
}
#game dialog button:is([aria-selected=true], [aria-pressed=true], [aria-current=true]),
#game dialog .gold-button {
  background: linear-gradient(#ffe5a0, #e8ba59 52%, #d29e3d);
  border-color: #a6742d;
  color: #332b17;
  box-shadow: inset 0 0 0 2px #fff1bf88, inset 0 -3px #ba843844, 0 0 0 1px #f8df9a;
  font-weight: 600;
}
#game dialog .gold-button:hover:not(:disabled) { background: linear-gradient(#fff0bc, #f0c96d, #dfac49); }
#game dialog button:disabled { opacity: .5; }
#game .window-panel,
#game .map-legend,
#game .map-area {
  background: linear-gradient(120deg, #fff4d650, #ddc29733);
  border: 1px solid #b7945c88;
  box-shadow: inset 0 0 0 3px #d4b57d33, inset 0 0 14px #a4782a12;
  color: var(--paper-ink);
}
#game .window-panel h3 { color: #3b3324; font-weight: 600; border-color: #b7945c66; letter-spacing: 0; }
#game .window-muted,
#game .skill-hint,
#game .attribute-row small,
#game .shop-row small { color: var(--paper-muted); }
#game .window-data-row,
#game .attribute-row { border-color: #b18e5540; color: #55462f; }
#game .window-data-row strong,
#game .attribute-row strong,
#game .attribute-row > span,
#game .window-resource > strong,
#game .window-resource > span { color: #332b20; }
#game .pending-value { color: #2d6b3b; }
#game .window-footer { background: #35362d; color: #f2d59a; border-color: #ab874d; }
#game .window-footer small { color: #d5c7a6; }
#game .window-footer .window-muted { color: #d5c7a6; }
#game .points-badge {
  color: #5d431e;
  background: linear-gradient(#f9e9be, #dfbf81);
  border-color: #b38b4b;
  box-shadow: inset 0 1px #fff5d9;
}
#game .window-meter { border-color: #91784c; background: #383a33; box-shadow: inset 0 2px 4px #0009; }
#game .window-meter i { box-shadow: inset 0 1px #fff8; }
#game .window-meter.health i { background: linear-gradient(#ff8d79, #d9433d, #b52d2a); }
#game .window-meter.mana i { background: linear-gradient(#6dccea, #2996bd, #176f99); }
#game .window-meter.experience i { background: linear-gradient(#ffdf83, #d5a333, #b58324); }
#game .character-stage {
  background: linear-gradient(#25493108, #18392144), url('/games/main/assets/environment/world-maps-v1/training-village.png') center / cover;
  border-color: #af8b4f;
  border-radius: 4px;
  box-shadow: inset 0 0 18px #25342266;
  align-self: start;
}
#game .stage-label { color: #fff2cf; text-shadow: 0 1px 3px #17271c; letter-spacing: 0; }
#game .character-stage:after { border-color: #efd9a5aa; background: #9b957955; color: #fae5b4; }
#game .character-name { background: #252c22df; border-color: #ceb171; }
#game .character-name h3 { color: #fff0ca; }
#game .character-name span,
#game .equipment-label { color: #fff0cf; text-shadow: 0 1px 3px #15231a; }
#game .skill-sidebar { background: #34392e; border-color: #af8b4f; color: #f4e1b2; }
#game .skill-sidebar h3 { color: #ffe9b5; }
#game .skill-sidebar .window-muted { color: #d7d6be; }
#game .rpg-window .skill-card {
  background: linear-gradient(#efdfbe, #d9bf91);
  color: #382e1e;
  border-color: #b5945b;
}
#game .rpg-window .skill-card:hover:not(:disabled) { background: #f4e4bd; }
#game .rpg-window .skill-card[aria-pressed=true] { background: linear-gradient(#f9e5ab, #dbb65c); border-color: #ad7724; }
#game .skill-card small { color: #6a5837; }
#game .skill-card .rank-label { color: #72511e; }
#game .skill-card .window-icon { border-color: #a7894e; background: #252d22; border-radius: 4px; }
#game .skill-type { background: #70664d; color: #fff1cb; border-color: #8e7750; border-radius: 4px; }
#game .skill-rank { color: #35663d; font-weight: 600; }
#game .bag-tools input,
#game dialog input:not([type=checkbox]):not([type=range]),
#game dialog select {
  background: #3a3b32;
  color: #fff0cc;
  border-color: #aa905e;
  box-shadow: inset 0 2px 4px #0005;
}
#game dialog input::placeholder { color: #c7bea5; }
#game .rpg-window .bag-slot {
  background: linear-gradient(135deg, #716b58, #514f42);
  border-color: #a89267;
  box-shadow: inset 0 0 0 2px #c4b18233, inset 0 2px 5px #29291f66;
}
#game .rpg-window .bag-slot:hover { background: #77735d; }
#game .rpg-window .bag-slot[aria-pressed=true] {
  background: linear-gradient(#83734a, #5e563a);
  border-color: #ffe098;
  box-shadow: inset 0 0 0 1px #f6cf78, 0 0 8px #c88a3355;
}
#game .item-detail { background: #30332a; color: #f9ebc6; border-color: #b29355; }
#game .item-detail h3 { color: #ffe6a0; }
#game .item-detail .window-data-row { color: #ddd7bd; border-color: #a895633d; }
#game .item-detail .window-data-row strong { color: #fff0c9; }
#game .item-detail .window-muted { color: #d7cdb2; }
#game .item-category { color: #8cd2dd; }
#game .empty-detail { color: #c1a870; }
#game .shop-row { background: #f8e8c088; border-color: #b4945966; }
#game #shop-dialog { background: var(--paper-surface); color: var(--paper-ink); }
#game .gold-display { background: #30342a; color: #ffe198; }
#game .hud-menu button { background: #30332b; }
#game .hud-menu .hud-menu-label { background: #2b3026ed; }
#game #hotbar { background: linear-gradient(#3d4034, #262b23); }
#game #hotbar .slot { background: linear-gradient(#535441, #30372a); }
#game #hotbar .slot.empty { background: #2c3228; border-color: #817451; }
#game .map-card .section-title,
#game .map-coordinates { background: #30382b; }
#game #party-btn,
#game #quest-auto-stop,
#game #bot-settings-panel button,
#game #map-expand,
#game #loot-btn { background: linear-gradient(#4b4e3d, #2c3427); }

@media (min-width:1101px) {
  #game .character-stage { height: 580px; min-height: 0; }
  #game .character-stage .character-art { max-height: 330px; }
}

@media (max-width:750px), (pointer:coarse) and (max-width:1100px), (max-width:1100px) and (max-height:600px) {
  #game dialog.rpg-window { border-width: 8px; border-image-width: 8px; }
  #game .rpg-window .window-heading { background: linear-gradient(110deg, #3d3d34, #292b26); }
  #game .rpg-window .window-footer { background: #35362d; }
  #game .rpg-window .window-nav { padding-bottom: 0; }
  #game .rpg-window .window-sigil { flex-basis: 32px; width: 32px; height: 32px; }
  #game .character-stage:after { display: none; }
  #game #hotbar { background: none; }
}

/* Generated reference art and dialogue portraits. */
#game .catalog-entry h3 { display:flex; align-items:center; gap:10px; }
#game .catalog-art { display:inline-block; width:48px; height:48px; flex:0 0 48px; }
#game .npc-identity { display:flex; align-items:center; gap:12px; min-width:0; }
#game .npc-portrait { width:60px; height:60px; object-fit:contain; flex:0 0 60px; }
#game .npc-portrait[hidden] { display:none; }
#game #npc-actions { clear:both; }
#game .nation-crests img { width:100%; height:100%; object-fit:contain; }
#game dialog .primary, #game #npc-actions button, #game #npc-done {
  background: #25392e url('/games/main/assets/ui/theme-v1/button-normal.png') center / 100% 100% no-repeat;
  color:#fff0c3; min-height:40px; padding:10px 20px;
}
#game dialog .primary:hover, #game #npc-actions button:hover, #game #npc-done:hover {
  background-image:url('/games/main/assets/ui/theme-v1/button-hover.png');
}
#game .bag-slot { background: #e6cda1 url('/games/main/assets/ui/theme-v1/item-slot.png') center / 100% 100% no-repeat; }
