/* ManRPG — Obsidian. Load after legacy presentation styles.
   Opaque surfaces keep combat scenery from reducing text contrast. */
:root {
  color-scheme: dark;
  --df-black: #09090b;
  --df-panel: #141416;
  --df-raised: #1f1e21;
  --df-hover: #2c2928;
  --df-line: #48413b;
  --df-text: #f1e9db;
  --df-muted: #bfb5a7;
  --df-gold: #d3b47c;
  --df-gold-dark: #927240;
  --df-red: #c67b75;
  --df-green: #a6c6a6;
  --bg: var(--df-black); --panel: var(--df-panel); --panel2: var(--df-raised);
  --line: var(--df-line); --text: var(--df-text); --dim: var(--df-muted);
  --gold: var(--df-gold); --gold-dim: var(--df-gold-dark); --danger: var(--df-red);
  --accent: var(--df-gold); --exp: var(--df-green);
  --ui-bg: #141416f5; --ui-line: #51473b; --ui-text: var(--df-text);
  --ui-muted: var(--df-muted); --ui-blue: var(--df-gold);
}
body { background: var(--df-black); color: var(--df-text); }
::selection { color: #fff5e1; background: #6a4833; }
button, input, textarea, select { accent-color: var(--df-gold); }
button:focus-visible, [role="button"]:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #efd29a !important; outline-offset: 3px !important;
}

/* All game windows share the same surface, controls and state vocabulary. */
.game-window, #pauseMenu .pause-col, .ash-journal, .edition-dialog {
  --dim: var(--df-muted); --text: var(--df-text); --line: var(--df-line);
  --panel: var(--df-panel); --panel2: var(--df-raised);
  color: var(--df-text) !important;
  background: linear-gradient(135deg, #1b1919, #121214 42%, #101012) !important;
  border: 1px solid #776247 !important; border-radius: 10px !important;
  box-shadow: 0 24px 80px #000c, inset 0 1px #e6c8931a !important;
  scrollbar-width: thin; scrollbar-color: #736149 #121214;
  text-shadow: none;
}
.game-window { padding: 26px !important; max-height: calc(100dvh - 40px) !important; overflow-y: auto; }
.game-window .win-title, .game-window h2, .game-window h3, .game-window .window-title {
  color: #f0ddbc !important; font-family: Pretendard, sans-serif !important;
  letter-spacing: -.025em; line-height: 1.5;
}
.game-window > .win-title { font-size: 22px !important; font-weight: 650 !important; padding: 0 44px 15px 0 !important; margin-bottom: 18px !important; border-bottom: 1px solid #514435 !important; }
.game-window .win-title > .game-icon { width: 22px; height: 22px; margin-right: 10px; vertical-align: -4px; }
.game-window .win-title small { font-size: 12px !important; font-weight: 400; letter-spacing: 0; }
.game-window .game-icon, #pauseMenu .game-icon { color: #d0b584 !important; }
.game-window .muted, .game-window small, .game-window .pp-empty,
.game-window .pl-note, .game-window .lb-val { color: var(--df-muted) !important; }
.game-window small { line-height: 1.6; }
.game-window .sec-label { color: #e0c79b !important; font-size: 14px !important; margin-top: 20px; }
.game-window button:not(.nick-sw), .game-window .tab, #pauseMenu .pause-btn,
#dialogueBox button, .ash-journal button:not(.ash-primary) {
  background: #242122 !important; color: var(--df-text) !important;
  border: 1px solid #625342 !important; border-radius: 6px !important;
  box-shadow: inset 0 1px #ffffff06 !important;
  transition: background .16s, border-color .16s, color .16s !important;
}
.game-window button:not(.nick-sw):not(:disabled):hover, #pauseMenu .pause-btn:not(:disabled):hover,
#dialogueBox button:not(:disabled):hover, .ash-journal button:not(:disabled):hover {
  background: #37302a !important; border-color: #c6a16b !important; color: #fff5e2 !important;
  filter: none; transform: none !important;
}
.game-window button:not(.nick-sw):disabled, .ash-journal button:disabled, #pauseMenu button:disabled {
  background: #1a191c !important; border: 1px dashed #554d44 !important;
  color: #a59b90 !important; opacity: 1 !important; cursor: not-allowed !important;
  box-shadow: none !important; transform: none !important;
}
.game-window .tab-btn.sel, .game-window .lb-tab.sel, .game-window .season-tab.on,
.game-window [aria-selected="true"], .game-window [aria-pressed="true"] {
  background: #423326 !important; color: #f6dcab !important; border-color: #c4a06b !important;
  box-shadow: inset 0 -2px #c4a06b !important; font-weight: 650;
}
.game-window button.btn-gold:not(:disabled), .game-window .shop-item button:not(:disabled),
#pauseMenu #btnResume, #dialogueBox .dlg-btn.accept, #dialogueBox .dlg-accept,
.ash-journal .ash-primary {
  color: #1b140d !important; background: linear-gradient(#dbc18d, #bb9459) !important;
  border: 1px solid #e0c390 !important; border-radius: 6px !important;
  font-weight: 700 !important; text-shadow: none !important;
}
.game-window button.btn-gold:not(:disabled):hover, #pauseMenu #btnResume:hover,
.game-window .shop-item button:not(:disabled):hover, .ash-journal .ash-primary:not(:disabled):hover {
  color: #1b140d !important; background: #e1c792 !important; border-color: #f4ddb1 !important;
}
.game-window button.ban:not(:disabled), .game-window .btn-mini.no:not(:disabled),
#pauseMenu .pause-exit, #btnLogoutSettings {
  color: #f0b9b1 !important; background: #342020 !important; border-color: #79463f !important;
}
.game-window input:not([type="color"]):not([type="range"]):not([type="checkbox"]),
.game-window select, .game-window textarea {
  background: #0d0d0f !important; color: #f1e9db !important;
  border: 1px solid #635443 !important; border-radius: 5px !important;
  padding: 10px 12px; min-height: 40px; max-width: 100%;
}
.game-window input::placeholder, .game-window textarea::placeholder { color: #a89b8b !important; opacity: 1; }
.game-window input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; flex-shrink: 0; }
.game-window input[type="range"] { min-height: 24px; cursor: pointer; background: transparent !important; border: 0 !important; }
.game-window .win-close, #dialogueBox .win-close {
  position: absolute; top: 17px; right: 17px; width: 36px; height: 36px;
  min-width: 36px; min-height: 36px; padding: 0 !important; font-size: 16px;
  z-index: 2; background: #272120 !important; border-color: #5c4b3a !important;
}
.game-window .pp-list, .game-window .lb-list { scrollbar-color: #736149 #121214; padding-right: 4px; }
.game-window .pp-row, .game-window .quest-item, .game-window .job-item,
.game-window .shop-item, .game-window .lb-row {
  background: #1d1b1e; border: 1px solid #403a34; border-radius: 6px;
  padding: 12px 14px; color: var(--df-text); line-height: 1.6;
}
.game-window .pp-row { gap: 14px; margin-bottom: 8px; }
.game-window .pp-row > span:first-child, .game-window .s-info { min-width: 0; overflow-wrap: anywhere; }
.game-window .pp-row small { display: block; margin-top: 4px; font-size: 12px; }
.game-window .pp-row button, .game-window .shop-item button { flex-shrink: 0; min-height: 36px; padding: 7px 12px; }
.game-window .locked-row { opacity: 1; color: #b8aea1; background: #141315; border-style: dashed; }
.game-window .story-cur { border-color: #c09d68; background: #2a231c; }
.game-window .q-name, .game-window .j-name, .game-window .s-price { color: #ddc091; }
.game-window .q-prog { color: #a7c8a3; }
.game-window .pp-empty { padding: 24px 18px; background: #111113; border: 1px dashed #544735; border-radius: 6px; line-height: 1.8; }

/* Equipment reads as a character sheet, with enough space for actual item names. */
#invWindow:not(.hidden) { width: min(940px, 94vw) !important; padding: 26px !important; gap: 14px 24px !important; }
#invTop { padding: 12px 0; border-bottom: 1px solid #40372c; }
#invWindow .inv-char { background: radial-gradient(ellipse at 50% 38%, #3d3328, #121215 75%); border: 1px solid #4c4032; border-radius: 6px; }
#invWindow .inv-char canvas { background: transparent; }
#invWeapon { color: #d7bc8c; line-height: 1.5; font-size: 12px; padding: 7px; min-height: 30px; }
.game-window .equip-slot, .game-window .inv-slot {
  background: linear-gradient(145deg, #2a2420, #161518) !important;
  color: #e4d6be !important; border: 1px solid #746044 !important; border-radius: 6px !important;
  box-shadow: inset 0 0 18px #0004;
}
.game-window .equip-slot:hover, .game-window .inv-slot:hover { border-color: #dfb875 !important; background: #322b23 !important; }
.game-window .equip-slot small, .game-window .inv-slot .iname { color: #e4d6be !important; font-size: 11px !important; line-height: 1.3 !important; }
#invGrid .inv-slot { height: 88px !important; }
.game-window .inv-slot .iname { white-space: normal !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; bottom: 5px; padding: 0 4px; font-size: 12px !important; line-height: 1.35 !important; }
.game-window .inv-slot .qty { background: #09090bed !important; color: #f1d8a8 !important; border: 1px solid #665132; border-radius: 3px; padding: 1px 5px; font-size: 11px !important; top: 5px; right: 5px; bottom: auto; }
#invGrid .inv-slot .it-ico { width: 42px; height: 42px; align-self: flex-start; margin-top: 8px; }
.game-window .inv-stat { background: #201d1b !important; color: #e6c994 !important; border: 1px solid #564532 !important; border-radius: 5px; padding: 10px 8px; font-size: 12px; }
#invSkills .inv-sk { background: #171518; border: 1px solid #685136; border-radius: 5px !important; overflow: hidden; }
#invSkills .inv-sk small { color: #e2d1b3 !important; background: #131113; font-size: 11px !important; padding: 4px 2px; }
#invUltCell { border-color: #c4a067 !important; }
#invUltCell small { background: #17120feF !important; color: #ffe0a3 !important; }
#invTabs { gap: 6px; }
#invTabs .tab-btn { min-height: 38px; font-size: 13px; }
#statInfo { border-top: 1px solid #453a2f; padding-top: 10px; line-height: 1.8; }
#storageGrid .inv-slot { height: 80px; }
@media (min-width: 701px) and (max-height: 800px) {
  #invWindow:not(.hidden) { padding: 20px !important; row-gap: 8px !important; }
  #invTop { padding-top: 6px; padding-bottom: 6px; }
  #invGrid { max-height: 300px !important; }
  #statInfo { margin-top: 0; padding-top: 8px; }
  #statInfo .sec-label { margin: 0 0 4px !important; }
}

/* Pause is a readable overlay, independent of the scene underneath. */
#pauseMenu { background: #030305c9 !important; backdrop-filter: none !important; }
#pauseMenu .pause-col { position: relative !important; left: auto !important; top: auto !important; transform: none !important; width: min(640px, 94vw) !important; min-width: 0 !important; padding: 30px !important; gap: 10px !important; }
#pauseMenu .pause-title { color: #ecd5ad !important; font: 650 26px/1.4 Pretendard, sans-serif !important; text-align: left; padding-bottom: 18px !important; border-bottom: 1px solid #554533; }
#pauseMenu .pause-title { grid-column: 1 / -1; }
#pauseMenu .pause-spacer { display: none; }
#pauseMenu .pause-btn:last-child { grid-column: 1 / -1; }
#pauseMenu .pause-title small { color: #baaa93 !important; font-size: 12px !important; }
#pauseMenu .pause-btn { text-align: left; min-height: 48px !important; padding: 12px 16px !important; font-size: 14px !important; letter-spacing: 0; }
#pauseMenu #btnResume .game-icon { color: inherit !important; }

/* Dungeon journal: dark stone, brass rules and explicit choice states. */
.ash-journal { --ash-gold: #d3b47c; border-radius: 10px !important; scrollbar-color: #796044 #141416 !important; }
.ash-journal::backdrop { background: #020204c9 !important; backdrop-filter: none !important; }
.ash-header { background: linear-gradient(115deg, #2b241d, #151416 70%) !important; border-bottom: 1px solid #54432f !important; padding: 23px 30px !important; }
.ash-header h2 { color: #f0dcba !important; font: 650 28px/1.4 Pretendard, sans-serif !important; letter-spacing: -.035em; }
.ash-eyebrow { color: #c8ab7e !important; font-size: 11px !important; }
.ash-journal .ash-close { width: 38px; height: 38px; min-width: 38px; padding: 0; color: #e2d2b8 !important; }
.ash-tabs { background: #101012 !important; border-bottom: 1px solid #4b3d30 !important; gap: 8px !important; padding: 10px 24px !important; }
.ash-journal .ash-tabs button { background: transparent !important; color: #baad9a !important; border: 1px solid transparent !important; border-radius: 5px !important; padding: 10px 14px !important; min-height: 42px; }
.ash-journal .ash-tabs button[aria-current="page"] { color: #f0d6a9 !important; background: #33281c !important; border-color: #987345 !important; box-shadow: inset 0 -2px #c6a06b !important; }
.ash-map { background: radial-gradient(ellipse at 50% 25%, #353027, #111113 80%) !important; border-right: 1px solid #483b2f !important; color: #e1c99f !important; }
.ash-map svg { filter: sepia(.35) saturate(.65); }
.ash-map p { color: #c8ad7c !important; }
.ash-map small { color: #b9ad99 !important; }
.ash-content { padding: 26px 30px !important; }
.ash-content h3 { color: #f0ddba !important; font: 650 28px/1.45 Pretendard, sans-serif !important; letter-spacing: -.04em; }
.ash-content h4 { color: #ddc79f !important; font: 600 14px/1.5 Pretendard, sans-serif !important; }
.ash-content p { color: #c5bcaf !important; font-size: 14px !important; line-height: 1.85 !important; }
.ash-facts { border-color: #50412f !important; gap: 24px; }
.ash-facts small, .ash-note, .ash-footer, .ash-empty small { color: #b7a993 !important; }
.ash-facts b { color: #e9cc94 !important; }
.ash-footer { background: #111113; border-top: 1px solid #4c3d2d !important; }
.ash-journal .ash-difficulties button, .ash-journal .ash-loot button, .ash-journal .blessing-cards button { padding: 15px !important; color: #eadbc5 !important; background: #201d1b !important; border: 1px solid #63513b !important; border-radius: 6px !important; }
.ash-journal .ash-difficulties [aria-pressed="true"], .ash-journal .ash-loot [aria-pressed="true"] { background: #3b2d1e !important; border-color: #d4ad71 !important; box-shadow: inset 3px 0 #d4ad71 !important; }
.ash-difficulties small, .ash-loot small, .blessing-cards small { color: #c2b4a0 !important; font-size: 12px !important; line-height: 1.6; }
.ash-difficulties strong, .ash-loot strong { color: #eedbbc; font-size: 14px; }
.ash-journal .ash-secondary { color: #e0ca9f !important; background: #292119 !important; }
.ash-journal .ash-message { background: #3a291b !important; color: #efc893 !important; border-left: 2px solid #ca9d5b; }
.ash-pattern { border-color: #4c3d2d !important; }
.ash-pattern > span { color: #b79360; }
.ash-records th { color: #c9b89d !important; }
.ash-records td, .ash-records th { border-color: #4e4032 !important; }
.ash-empty { color: #e2cba4; }
.ash-journal .ash-difficulties button:disabled, .ash-journal .ash-loot button:disabled,
.ash-journal .blessing-cards button:disabled {
  background: #171517 !important; color: #ac9e8c !important; border: 1px dashed #60503d !important;
}

/* Combat HUD is compact; warm neutral plates leave HP and mana colors distinct. */
#charFrame, #mapNameBox, #goldBox, #onlineBox, #adventureTracker, #expeditionHud,
#sanctuaryMap, #skillBar, #ultBar, #chatBox, #interactHint {
  background: #111113f5 !important; color: #eadfce !important;
  border: 1px solid #6a5539 !important; border-radius: 6px !important;
  box-shadow: 0 8px 24px #0006, inset 0 1px #e7be7310 !important;
}
#charFrame { width: 248px !important; padding: 14px 16px !important; border-top: 2px solid #b49360 !important; }
#charName { color: #f1e2c8 !important; font: 650 17px/1.4 Pretendard, sans-serif !important; }
#charName .lv, #charJob { color: #c6b18d !important; }
#charFrame .bar { height: 14px !important; overflow: hidden !important; background: #070708 !important; border: 1px solid #4e3830 !important; border-radius: 2px !important; }
#charFrame .bar > div { border-radius: 0 !important; }
#charFrame .bar span { top: 0 !important; color: #fff6e6 !important; font: 600 10px/12px Pretendard, sans-serif !important; text-shadow: 0 1px 2px #000, 0 0 4px #000 !important; }
#hpBar > div { background: linear-gradient(90deg, #79332c, #ba5c48) !important; }
#mpBar > div { background: linear-gradient(90deg, #334d65, #648ca7) !important; }
#expBar > div { background: #af9562 !important; }
#partyBox { top: 172px !important; }
#myPortrait { background: #1a1717 !important; border: 1px solid #806744 !important; border-radius: 6px !important; }
#btnPartyPlus, #btnVoice, #sanctuaryDock button { background: #1b1919f5 !important; color: #e8d3ad !important; border: 1px solid #765e40 !important; border-radius: 6px !important; }
#btnVoice.on { border-color: #99b68a !important; background: #293227 !important; }
#mapNameBox { color: #e5cca1 !important; font-size: 13px !important; }
#goldBox { color: #e0bc79 !important; }
#onlineBox { color: #c7b8a2 !important; }
#trackerTitle, #expeditionHud h3 { color: #e9d2ab !important; font-weight: 650 !important; }
#trackerObjective, #ashRunHint { color: #d4c7b3 !important; font-size: 12px !important; }
.tracker-kicker, .ash-run-top { color: #c7a777 !important; }
#trackerControls { color: #b7a58b !important; font-size: 11px !important; line-height: 1.7; }
#trackerProgress { color: #d3bb91; }
#btnExpedition { background: #2a2017f5 !important; color: #efd7ac !important; border: 1px solid #aa8250 !important; border-radius: 5px !important; top: 240px !important; }
#btnExpedition small { color: #c3ad8b !important; }
#sanctuaryMap { border-color: #6c5538 !important; }
#sanctuaryMap span { color: #c8b898 !important; font-size: 10px; }
#sanctuaryMap canvas { filter: sepia(.6) saturate(.62); }
#sanctuaryDock .game-icon { color: #d2b782 !important; }
#sanctuaryDock button:hover { background: #3b2d21 !important; border-color: #c4a069 !important; }
#sanctuaryDock .dock-caption { background: #181416 !important; color: #f1e1c6 !important; border: 1px solid #89704d !important; border-radius: 4px !important; }
#skillBar { border-radius: 7px !important; gap: 8px !important; }
#skillBar .skill-slot { border: 1px solid #b2935f !important; border-radius: 5px !important; }
#skillBar .skill-slot:hover { transform: none !important; box-shadow: 0 0 0 2px #c9a76a66 !important; }
#skillBar .skill-slot.locked { opacity: 1 !important; filter: saturate(.15); border-style: dashed !important; }
#skillBar .sk-lock { color: #dfd1bd !important; background: #09090bcf !important; font-weight: 650; }
#skillBar .sk-key { color: #f4dfb5 !important; background: #100c09eb !important; border: 1px solid #b18c5455; border-radius: 3px; }
#ultBar { border-color: #a78248 !important; }
#ultBtn { background: #332619 !important; border-color: #aa854f !important; color: #efd5a3 !important; border-radius: 4px !important; }
#ultText { color: #edd4a7 !important; }
#ultFill { background: linear-gradient(90deg, #75502d, #d4b57a) !important; }
#ashenBoss { background: #151011f5 !important; border: 1px solid #86554a !important; border-radius: 6px !important; }
#ashenBoss strong { color: #ecd0b0 !important; }
#ashBossFill { background: linear-gradient(90deg, #612725, #b45b4b) !important; }
#ashPhase, #ashBossHP { color: #dfc1a6 !important; }
#ashHeal, #ashDodge { background: #2c251d !important; color: #ead6b3 !important; border-color: #7c6545 !important; border-radius: 5px !important; }
#ashHeal:disabled, #ashDodge:disabled { opacity: 1 !important; color: #a39785 !important; background: #171617 !important; border-style: dashed !important; }
#ashStaminaFill { background: linear-gradient(90deg, #6e754a, #bbb77a) !important; }
#ashNotice { color: #e7bd7f !important; }
#interactHint { color: #f8dfae !important; border-color: #c4a16b !important; padding: 12px 20px !important; }
#chatInput { background: #111013 !important; color: #efe3ce !important; border-color: #5d4933 !important; }

/* Dialogue, settings, changelog and entry use the same visual language. */
#dlgPortraitWrap, #dlgBody { background: #151315f7 !important; color: #efe3ce !important; border: 1px solid #806444 !important; border-radius: 7px !important; }
#dlgPortrait, #customPreview { background: radial-gradient(ellipse at 50% 30%, #352c23, #111012) !important; border-color: #6c5438 !important; border-radius: 6px !important; }
#dlgNpcName { color: #e4c594 !important; }
#dlgText { color: #efe1cb !important; font-size: 15px; line-height: 1.9; }
.key-row, .av-row, .set-row, .cst-row { color: #e0d6c6; gap: 16px; border-color: #44382c; }
.av-row { flex-wrap: wrap; }
.key-row button { min-height: 38px; }
.cst-group h4 { color: #d9bd8b; border-color: #4e3f2c; }
.patch-block { background: #1d1918 !important; border: 1px solid #5c4932 !important; border-radius: 7px !important; }
.patch-head { color: #e8c994 !important; font-size: 17px; }
.patch-item { color: #d0c2ad !important; font-size: 13px; line-height: 1.9 !important; }
.patch-head small { color: #b6a58b !important; }
.patch-major { color: #f2d8a3; background: #49351d; padding: 5px 10px; border-radius: 4px; font-size: 12px; }
.edition-dialog::backdrop { background: #030205cc; backdrop-filter: none; }
.edition-dialog h2 { color: #f0dbb7; }
.edition-dialog p, .edition-dialog li { color: #d1c0a7; }
.edition-dialog .update-row { border-color: #5b4630; }
.edition-dialog .guide-grid { background: #56422e; border-color: #56422e; }
.edition-dialog .guide-grid > div { background: #211b18; color: #e7d7bc; }
.edition-dialog kbd { background: #32261c; border-color: #816342; color: #edc78f; }
.edition-dialog .dialog-close { color: #e8d3ad; border: 1px solid #665035; border-radius: 4px; background: #2c2119; }
#confirmBox { background: #030205c9; }
.confirm-inner { background: #191416; color: #eddec5; border: 1px solid #927046; border-radius: 8px; padding: 27px; box-shadow: 0 24px 80px #000b; }
.confirm-inner button { min-height: 42px; border-radius: 5px; }
.confirm-inner .btn-dark { border: 1px solid #775838; background: #2a211b; color: #e8d4b3; }
.game-window .inv-cell { background: #221b18; color: #e5d2ad; border: 1px solid #725637; border-radius: 5px; }
.game-window .inv-cell.empty { background: #131113; border-color: #42352a; }
.entry-art { filter: saturate(.58) brightness(.64); }
.entry-shade { background: linear-gradient(90deg, #07060844, #07060844 43%, #070608ef 90%), linear-gradient(0deg, #070608fa, transparent 75%, #07060888) !important; }
.entry-card.login-card, .screen:not(.entry-screen) .login-card { background: #141214f5 !important; border: 1px solid #746047 !important; border-radius: 9px !important; box-shadow: 0 24px 70px #0008 !important; }
.entry-card input { background: #0b0b0d !important; border-color: #66523b !important; color: #f0e4cf !important; }
.entry-card .field-label, .entry-card .auth-lead, .entry-card .save-note, .entry-card .signup-line { color: #c7b69c !important; }
.entry-card .guest-btn { color: #e1c599 !important; }
.entry-card .auth-divider span { background: #141214 !important; color: #b6a78f !important; }
.entry-card .auth-divider, .entry-card .guest-divider { border-color: #50412f !important; }
.entry-card #authTitle { color: #f0dfc1 !important; }
.entry-story h1 { color: #f3e1c0 !important; }
.story-copy, .entry-footer, .entry-header nav button { color: #d4c7b4 !important; }
#mainMenu { background: linear-gradient(90deg, #090809fd 0%, #0c0b0ceb 390px, #09090b77 75%) !important; }
#mainMenu .menu-col { background: #121012f5 !important; border: 1px solid #6b5236 !important; border-radius: 7px !important; padding: 16px !important; }
#mainMenu .menu-btn { background: #211c1b !important; color: #e6d7bf !important; border: 1px solid #56422e !important; border-radius: 4px !important; }
#mainMenu .menu-btn:hover { background: #392b1f !important; border-color: #bd9459 !important; color: #f8dfb7 !important; }
#mainMenu #btnPlay { background: linear-gradient(#dfc28b, #ba9357) !important; color: #21170d !important; border-color: #dfc28b !important; }
#mainMenu .menu-logo { color: #e4c390 !important; }
#mainMenu .menu-user { color: #cbb899 !important; }
#deathScreen { background: #160708e8 !important; }
#deathScreen h2 { color: #d59687; font-weight: 500; letter-spacing: .08em; }
#deathScreen p { color: #d8bdad; }

/* Operations shares the palette, without changing permissions or backend behavior. */
.admin-body { background: #0c0b0d !important; color: #e8dece !important; }
.admin-body #gate { background: linear-gradient(90deg, #0a080bb5, #0a080bef 80%), url('../assets/images/manas-dawn.webp') center/cover !important; }
.admin-body .gate-card, .admin-body .card, .admin-body .admin-stats article, .admin-body .admin-detail { background: #171416 !important; color: #e8dece; border-color: #5c4732 !important; border-radius: 7px; }
.admin-body .admin-sidebar { background: #121012; border-color: #463827; }
.admin-body .admin-sidebar nav button { background: transparent; color: #c2b29b; }
.admin-body .admin-sidebar nav button.active { background: #35281c; border-color: #977143; color: #efd1a0; }
.admin-body button { background: #27201c; border-color: #725738; color: #e6d2b4; }
.admin-body button:hover { background: #3c2c1e; border-color: #c49a60; }
.admin-body button.gold { background: #d3b077; border-color: #d3b077; color: #20160c; }
.admin-body button.red { background: #482421; border-color: #96584d; color: #f1b9af; }
.admin-body input, .admin-body textarea, .admin-body select { background: #0c0b0d; color: #eee0c7; border-color: #665038; }
.admin-body input::placeholder, .admin-body textarea::placeholder { color: #b3a087; }
.admin-body .note, .admin-body .dim, .admin-body .empty-caption, .admin-body .admin-breadcrumb,
.admin-body .gate-subtitle, .admin-body .admin-heading > p:last-child, .admin-body .admin-stats small { color: #baa98f; }
.admin-body .admin-stats article > span, .admin-body .admin-stats strong, .admin-body .card h3 { color: #e8d6b7; }
.admin-body .card .card-number, .admin-body .detail-eyebrow, .admin-body .record-link { color: #dcc08f; }
.admin-body .item, .admin-body .list, .admin-body .admin-detail header, .admin-body .admin-breadcrumb,
.admin-body .sidebar-bottom, .admin-body .operation-log { border-color: #4b3928; }
.admin-body .gate-card #gateMsg, .admin-body #mantraiLog { background: #0f0d10; border-color: #60482f; color: #dac9ad; }
.admin-body .gate-emblem { background: #2c2118; border-color: #8a6940; }
.admin-body .player-record, .admin-body .report-record { border-color: #4d3b2a; }
.admin-body .player-record small, .admin-body .report-excerpt, .admin-body .detail-facts dt { color: #bca98d; }
.admin-body .admin-detail::backdrop { background: #030205cf; backdrop-filter: none; }
.admin-body button:disabled { opacity: 1; color: #a29178; background: #181517; border-style: dashed; cursor: not-allowed; }

@media (max-width: 800px) {
  .game-window { padding: 20px !important; max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 24px) !important; }
  #charFrame { width: 195px !important; padding: 11px 12px !important; }
  #partyBox { top: 148px !important; }
  #btnExpedition { top: 214px !important; }
  #pauseMenu .pause-col { padding: 22px !important; }
  .ash-tabs { gap: 4px !important; padding: 8px 16px !important; overflow-x: auto; }
  .ash-journal .ash-tabs button { white-space: nowrap; padding: 10px !important; }
  .ash-header, .ash-content { padding: 20px !important; }
  .ash-content h3 { font-size: 25px !important; }
  #customLayout { flex-wrap: wrap; justify-content: center; }
  #customControls { min-width: min(280px, 100%); }
}
@media (max-width: 700px) {
  #invWindow:not(.hidden) { display: block !important; padding: 20px !important; }
  #invTop { justify-content: center; }
  #invGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  #invGrid .inv-slot { height: 88px !important; }
  #invStats { gap: 6px; }
  .game-window .row2 { flex-wrap: wrap; }
  .tr-cols { grid-template-columns: 1fr; }
  .game-window .pp-row { align-items: flex-start; }
  .game-window .pp-row > span:last-child:has(input) { flex-wrap: wrap; }
  .game-window .win-title { font-size: 20px !important; }
  .game-window .tab-row { flex-wrap: wrap; }
  .game-window .tab-row .tab-btn { min-width: 100px; font-size: 12px; }
  #pauseMenu .pause-btn { font-size: 13px !important; padding: 11px !important; }
  .ash-facts { gap: 18px; flex-wrap: wrap; }
  .ash-difficulties { grid-template-columns: 1fr; }
  .ash-difficulties button { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; }
  .ash-difficulties small { margin: 0; }
  .game-window input:not([type="range"]):not([type="checkbox"]), .game-window select, .game-window textarea { font-size: 16px; }
}
@media (max-width: 540px) {
  #charFrame { width: 177px !important; }
  #partyBox { top: 146px !important; }
  #btnExpedition { top: 211px !important; }
  #invGrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #invSkills { gap: 5px !important; }
  #pauseMenu .pause-col { padding: 18px !important; }
  #pauseMenu .pause-title { font-size: 23px !important; }
  #sanctuaryDock button { width: 40px !important; height: 40px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .game-window *, #pauseMenu *, .ash-journal *, .admin-body * { transition: none !important; scroll-behavior: auto !important; }
}
