/* Ash-Fall theme layer for Sanctuary's End. Upstream gameplay stays untouched. */
:root{
  --bg:#0d0918;--panel:#100d1b;--border:#74305f;--border-lit:#ff4ebf;
  --gold:#b8ff40;--gold-bright:#d5ff7c;--text:#eee7f5;--muted:#b7a4c8;
  --accent:#261331;--accent-hover:#3e2048;
}
body{background:#0b0715!important}
#actionBar{border-color:#ff4ebf!important;box-shadow:0 0 0 2px #0b0715,0 0 26px #ff4ebf33!important}
#actionBar button:hover{filter:brightness(1.15)}
#lvlBadge{border-color:#b8ff40!important}
#healthGlobe{border-color:#ff4ebf!important}
#manaGlobe{border-color:#58f5ef!important}
button:focus-visible,a:focus-visible{outline:2px solid #b8ff40;outline-offset:2px}
@media(max-width:680px){#hud{height:104px}#actionBar{max-width:68vw;transform:translateX(-50%) scale(.82);transform-origin:bottom center}#healthGlobe{left:4px}#manaGlobe{right:4px}.globe{width:90px;height:90px}}

/* Visible development identity: the original edition remains visually untouched. */
body::after{
  content:"ASH-FALL · DEV BUILD";position:fixed;top:8px;right:10px;z-index:1000;
  pointer-events:none;padding:5px 9px;border:1px solid #ff4ebf;
  border-radius:5px;background:#100d1bdf;color:#b8ff40;
  font:700 10px/1.2 system-ui,sans-serif;letter-spacing:.12em;
  box-shadow:0 0 14px #ff4ebf55;
}
@media(max-width:680px){body::after{font-size:8px;top:3px;right:3px;padding:3px 5px}}

/* Ash-Fall character selection: each class has its own unmistakable silhouette. */
#classPick{display:grid!important;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;max-width:880px;width:100%}
#classPick .classCard{width:auto;min-width:0;min-height:220px;padding:16px 12px;background:linear-gradient(155deg,#21102e,#100c1c);border:2px solid #58325e;border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:7px}
#classPick .classCard:hover{border-color:#ff4ebf;transform:translateY(-3px)}
#classPick .classCard.sel{border-color:#b8ff40;box-shadow:0 0 20px #b8ff4050}
#classPick .classCard .cn{color:#f6e9ff;font:800 19px/1.2 system-ui,sans-serif}
#classPick .classCard .cb{color:#d2c0df;font:12px/1.5 system-ui,sans-serif}
#classPick .ashfall-class-emblem{font-size:48px;line-height:1.2;text-shadow:0 0 20px currentColor}
#classPick .ashfall-class-abilities{margin-top:auto;padding-top:8px;border-top:1px solid #68466b;color:#b8ff40;font:11px/1.5 system-ui,sans-serif}
#classPick [data-archetype=warrior] .ashfall-class-emblem{color:#ff4ebf}
#classPick [data-archetype=mage] .ashfall-class-emblem{color:#945aff}
#classPick [data-archetype=rogue] .ashfall-class-emblem{color:#58f5ef}
#classPick [data-archetype=barbarian] .ashfall-class-emblem{color:#b8ff40}
@media(max-width:850px){#classPick{grid-template-columns:repeat(2,minmax(125px,1fr));max-width:500px}#classPick .classCard{min-height:180px}}
@media(max-width:430px){#classPick{gap:7px}#classPick .classCard{padding:8px 5px;min-height:150px}#classPick .ashfall-class-emblem{font-size:32px}#classPick .classCard .cn{font-size:15px}#classPick .classCard .cb{font-size:10px}#classPick .ashfall-class-abilities{font-size:9px}}

/* Infernal Reign / Knightfall: cathedral character hub and usable HUD surfaces. */
#selectScreen,#createScreen,#overScreen {
  background:linear-gradient(180deg,rgba(6,5,12,.83),rgba(7,4,10,.97)),
             url("/assets/knightfall/obsidian-cathedral.svg") center/cover no-repeat,#08050e;
}
#selectScreen h1,#createScreen h1 {
  color:#f4e4d4;letter-spacing:.08em;
  text-shadow:0 2px 0 #08050d,0 0 32px rgba(231,135,95,.35);
}
#selectScreen .hint {max-width:440px;text-align:center;line-height:1.55;color:#e0cbb6}
#topbar {
  background:linear-gradient(180deg,rgba(9,7,16,.95),rgba(11,7,18,.83) 74%,transparent);
  border-bottom:1px solid rgba(210,156,115,.25);
}
#topbar .right {min-width:0}
#topbar .tbtn {min-height:35px;white-space:nowrap;touch-action:manipulation}
#quickSaveBtn {border-color:#b18c63;color:#f4dda2;background:#292019}
#backupBtn {border-color:#7d638c;color:#f0ddfa;background:#251a31}
#saveNote {right:16px;top:52px;z-index:15;font-weight:700}
#mpStatus {overflow-wrap:anywhere}
#mpModal .setRow {flex-wrap:wrap;gap:8px}
#mpModal .mpin {max-width:100%;box-sizing:border-box}
#settingsModal .setPane[data-pane="saves"] .btn {min-width:0;white-space:normal}
@media(max-width:860px) {
  #topbar {gap:2px;align-items:flex-start;padding:5px 8px 9px}
  #topbar .right {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;gap:5px;padding:2px 0 5px}
  #topbar .tbtn {flex:0 0 auto;min-height:40px;font-size:12px}
  #selectScreen,#createScreen {padding:24px 12px 14px;overflow-y:auto;justify-content:safe center}
  #settingsModal {max-height:calc(100dvh - 20px);max-width:calc(100vw - 16px);padding:13px}
  #mpModal {max-height:calc(100dvh - 20px);max-width:calc(100vw - 16px);padding:14px}
}
@media(max-width:500px) {
  #classPick{width:min(95vw,420px)}
  #classPick .classCard{min-width:0}
  #topbar #killsTxt {display:none}
  #topbar .tbtn {padding:6px 9px}
}
@media(prefers-reduced-motion:reduce) {
  #classPick .classCard:hover {transform:none}
}
