/* ============================================================
   Velharrow — classic fantasy RPG skin
   dark leather + bronze bevels + parchment text + gold accents
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #14100b;
  --panel: #221a12;
  --panel2: #2d2318;
  --panel-deep: #171009;
  --border: #6e5430;
  --border-dark: #0b0805;
  --border-hi: #9c7a45;
  --text: #e4d5b3;
  --dim: #9d8a66;
  --gold: #d5a746;
  --gold-hi: #f2cd75;
  --hp: #a52a1d;
  --res: #2f6390;
  --exp: #55863b;
  --good: #7dbb59;
}

/* leather button used everywhere */
.side-btn, .mini-btn, .act-btn, .dlg-btn, .big-btn {
  background: linear-gradient(180deg, #453520, #2b2013);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 224, 160, 0.12), inset 0 -2px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}
.side-btn:hover:not(:disabled), .mini-btn:hover:not(:disabled), .act-btn:hover:not(:disabled),
.dlg-btn:hover:not(:disabled), .big-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #57432a, #37291a);
  border-color: var(--border-hi);
  color: #fff3d8;
}
.mini-btn:disabled, .act-btn:disabled { opacity: 0.4; cursor: default; }

html { height: 100%; overflow: hidden; background: var(--bg); }

/* The whole UI lives in a fixed 940x670 design space; fitUI() in game.js
   scales and centers the body to fill the real screen. Fixed overlays are
   contained by the transformed body, so they scale with everything else. */
body {
  width: 940px;
  height: 670px;
  overflow: hidden;
  transform-origin: 0 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  display: flex;
  justify-content: center;
  user-select: none;
}

#app {
  width: 916px;
  height: 100%;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* thin dark scrollbars everywhere a scroll is actually needed */
* { scrollbar-width: thin; scrollbar-color: #5c4526 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #5c4526; border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- shared chrome: framed boxes ---------- */
#topbar, #quest-tracker, #party-box, .side-help, #log, #chatbar, .panel {
  background: linear-gradient(180deg, #241c12, #1c150d);
  border: 1px solid var(--border);
  outline: 1px solid var(--border-dark);
  box-shadow: inset 0 1px 0 rgba(255, 224, 160, 0.06), 0 2px 6px rgba(0, 0, 0, 0.5);
  border-radius: 3px;
}

/* ---------- top bar ---------- */
#topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 7px 12px; margin-bottom: 8px; flex: none;
}
.tb-left { display: flex; flex-direction: column; min-width: 120px; }
.hud-name { font-weight: bold; font-size: 15px; color: var(--gold-hi); text-shadow: 0 1px 2px #000; letter-spacing: 0.5px; }
.hud-class { color: var(--dim); font-size: 12px; }
.hud-level { color: var(--gold); font-size: 13px; }
.tb-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.tb-right { text-align: right; display: flex; flex-direction: column; }
.hud-gold { color: var(--gold); font-weight: bold; font-size: 16px; text-shadow: 0 1px 2px #000; }
.hud-zone { color: var(--dim); font-size: 12px; font-style: italic; }
.hud-online { font-size: 11px; font-family: monospace; }
.hud-online.on { color: var(--good); }
.hud-online.off { color: #7a6a50; }
.mute-btn {
  background: none; border: 1px solid var(--border); border-radius: 3px;
  font-size: 14px; padding: 3px 7px; cursor: pointer; margin-left: 4px;
}
.mute-btn:hover { border-color: var(--border-hi); }

/* ---------- beveled stat bars ---------- */
.bar {
  position: relative; height: 16px;
  background: #0e0a06;
  border: 1px solid var(--border-dark);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 224, 160, 0.07);
  border-radius: 2px; overflow: hidden;
}
.bar.sm { height: 14px; }
.bar-fill { height: 100%; width: 100%; transition: width 0.25s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 2px rgba(0,0,0,0.35); }
.hp-bar .bar-fill { background: linear-gradient(180deg, #d0533f, var(--hp) 55%, #7c1a10); }
.res-bar .bar-fill { background: linear-gradient(180deg, #5490c2, var(--res) 55%, #1e4266); }
.exp-bar .bar-fill { background: linear-gradient(180deg, #7fb35e, var(--exp) 55%, #3a5f27); }
.bar-text {
  position: absolute; inset: 0; text-align: center; font-size: 11px;
  line-height: 16px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; font-family: monospace;
}

/* ---------- main layout ---------- */
#main { display: flex; gap: 8px; flex: none; min-height: 0; }
#canvas-wrap {
  border: 1px solid var(--border);
  outline: 1px solid var(--border-dark);
  box-shadow: inset 0 0 0 2px #0b0805, 0 3px 10px rgba(0, 0, 0, 0.6);
  border-radius: 2px; line-height: 0; padding: 2px; background: #000;
  position: relative;
}

/* in-world action hotbar */
#hotbar {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 5;
}
.hb-btn {
  background: linear-gradient(180deg, rgba(69,53,32,0.92), rgba(43,32,19,0.92));
  color: var(--text); border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,224,160,0.12), 0 2px 4px rgba(0,0,0,0.6);
  border-radius: 3px; cursor: pointer; font-family: inherit;
  font-size: 11px; padding: 6px 9px; position: relative; overflow: hidden;
  text-shadow: 0 1px 1px rgba(0,0,0,0.7); white-space: nowrap;
}
.hb-btn kbd { font-size: 8px; padding: 0 2px; margin-left: 3px; opacity: 0.75; }
.hb-btn:hover:not(:disabled) { border-color: var(--border-hi); }
.hb-btn:disabled { cursor: default; }
.hb-btn.no-res { border-color: #6a3428; }

/* death screen */
#death-overlay {
  position: fixed; inset: -2000px; background: rgba(20, 4, 2, 0.82);
  display: flex; align-items: center; justify-content: center; z-index: 90;
}
.death-box { text-align: center; }
.death-title {
  font-size: 44px; font-weight: bold; letter-spacing: 8px; color: #c23a2b;
  text-shadow: 0 0 30px rgba(194, 58, 43, 0.5), 0 3px 0 #4a0f08; margin-bottom: 10px;
}
.death-sub { color: var(--dim); margin-bottom: 24px; font-style: italic; }
canvas#game { display: block; background: #000; image-rendering: pixelated; }

#sidebar { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.side-buttons { display: flex; flex-direction: column; gap: 5px; }
.side-btn {
  padding: 7px 10px; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
kbd {
  background: #120d08; border: 1px solid #4a3820; border-radius: 3px;
  padding: 0 5px; font-size: 11px; color: var(--dim);
}

#quest-tracker { padding: 8px; flex: 1; overflow-y: auto; }
.qt-title { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; border-bottom: 1px solid #3d2f1c; padding-bottom: 4px; }
.qt-item { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; border-bottom: 1px solid #2a2013; gap: 6px; }
.qt-name { color: var(--text); }
.qt-prog { color: var(--dim); font-family: monospace; white-space: nowrap; }
.qt-ready .qt-prog { color: var(--good); }
.qt-empty, .q-empty { color: var(--dim); font-size: 12px; font-style: italic; }

.side-help { padding: 8px; font-size: 11px; color: var(--dim); line-height: 1.6; }
.side-help b { color: var(--gold); letter-spacing: 1px; }

/* ---------- log + chat ---------- */
#log {
  margin-top: 8px; background: linear-gradient(180deg, #17110a, #120d07);
  flex: 1; min-height: 56px; overflow-y: auto; overflow-x: hidden;
  padding: 6px 10px; font-size: 12px; font-family: monospace;
}
.log-line { padding: 1px 0; color: #b3a380; }
.log-sys { color: #8d7c5e; font-style: italic; }
.log-good { color: #8fce6a; }
.log-warn { color: #d9884f; }
.log-gold { color: var(--gold); }
.log-exp { color: #b89ede; }
.log-level { color: var(--gold-hi); font-weight: bold; }
.log-quest { color: #6fb9d8; }
.log-crit { color: #f0644f; font-weight: bold; }
.log-zone { color: #f0e6cd; letter-spacing: 1px; }
.log-chat { color: #efe6d2; }

#chatbar {
  margin-top: 6px; flex: none; display: flex; align-items: center; gap: 8px;
  padding: 4px 10px;
}
.chat-label { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
#chat-input {
  flex: 1; background: #0e0a06; border: 1px solid #4a3820; border-radius: 2px;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.6);
  color: var(--text); padding: 4px 8px; font-size: 12px; font-family: monospace;
}
#chat-input:focus { outline: none; border-color: var(--border-hi); }
#chat-input::placeholder { color: #6b5c42; }

/* ---------- overlay panels ---------- */
.hidden { display: none !important; }
/* overlays extend far past the 940x670 design box so the dim layer
   also covers letterbox strips on wide/tall screens */
#overlay, #combat-overlay {
  position: fixed; inset: -2000px; background: rgba(5, 3, 1, 0.75);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.panel {
  width: 560px; max-height: 630px; display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 224, 160, 0.06), 0 12px 50px rgba(0, 0, 0, 0.85);
  position: relative;
}
/* gold corner brackets — classic RPG frame */
.panel::before, .panel::after {
  content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none;
}
.panel::before { top: -4px; left: -4px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.panel::after { bottom: -4px; right: -4px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }

.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  background: linear-gradient(180deg, #382b18, #261c0f);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 224, 160, 0.05);
  color: var(--gold-hi); font-size: 15px; font-weight: bold; letter-spacing: 1.5px;
  text-shadow: 0 1px 2px #000;
}
.x-btn { background: none; border: none; box-shadow: none; color: var(--dim); font-size: 16px; cursor: pointer; }
.x-btn:hover { color: var(--gold-hi); }
.panel-body { padding: 12px 14px; overflow-y: auto; font-size: 13px; }
.panel-h3 {
  color: var(--gold); font-size: 12px; margin: 12px 0 6px;
  text-transform: uppercase; letter-spacing: 2px;
  border-bottom: 1px solid #3d2f1c; padding-bottom: 3px;
}

.mini-btn { padding: 2px 8px; font-size: 11px; }

/* ---------- item tooltip ---------- */
#tooltip {
  display: none; position: fixed; z-index: 300; pointer-events: none;
  width: 230px; padding: 9px 11px;
  background: linear-gradient(180deg, #201810f2, #14100bf2);
  border: 1px solid var(--border); outline: 1px solid var(--border-dark);
  border-radius: 3px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  font-size: 12px;
}
.tip-name { font-weight: bold; font-size: 14px; margin-bottom: 1px; text-shadow: 0 1px 2px #000; }
.tip-type { color: var(--dim); font-size: 11px; text-transform: capitalize; margin-bottom: 5px; border-bottom: 1px solid #3d2f1c; padding-bottom: 4px; }
.tip-stat { color: #8fce6a; font-size: 12px; }
.tip-cls { font-size: 11px; margin-bottom: 3px; }
.tip-cls-ok { color: #8fce6a; }
.tip-cls-no { color: #e0644f; }
.cls-lock { font-size: 10px; color: #e0864f; font-style: italic; }
.tip-desc { color: #c9b98f; font-style: italic; margin-top: 5px; line-height: 1.4; }
.tip-value { color: var(--gold); font-size: 11px; margin-top: 5px; border-top: 1px solid #3d2f1c; padding-top: 4px; }

/* ---------- world map panel ---------- */
#map-canvas {
  display: block; margin: 0 auto;
  border: 1px solid var(--border); outline: 1px solid var(--border-dark);
  image-rendering: pixelated; background: #000;
}
.map-exits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.map-exit {
  background: #191309; border: 1px solid #4a3820; border-radius: 3px;
  padding: 3px 10px; font-size: 12px; color: var(--gold);
}
.map-exit.map-locked { color: var(--dim); }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; font-size: 11px; color: var(--dim); }
.map-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 2px; }
.map-route { text-align: center; color: var(--dim); font-size: 11px; margin-top: 8px; font-style: italic; }
.map-route b { color: var(--gold); }

/* rarity colors (standard MMO convention) */
.rar-common { color: #d8d2c4; }
.rar-uncommon { color: #58c05c; }
.rar-rare { color: #4f8fe0; }
.rar-epic { color: #b45fe0; }

/* inventory */
.equip-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.equip-slot {
  flex: 1; min-width: 96px; background: #191309; border: 1px solid #4a3820;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  border-radius: 3px; padding: 6px; text-align: center;
}
.es-label { color: #7a6a50; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.es-item { font-size: 12px; margin: 4px 0; }
.inv-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.inv-slot {
  background: #191309; border: 1px solid #4a3820;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  border-radius: 3px;
  min-height: 58px; padding: 4px; position: relative; font-size: 11px;
}
.inv-slot.empty { background: #140f08; border-color: #332716; }
.inv-qty { position: absolute; top: 3px; right: 5px; color: var(--gold); font-family: monospace; font-size: 10px; }
.inv-actions { position: absolute; bottom: 3px; left: 4px; display: flex; gap: 3px; }

/* character */
.char-stats { background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 8px 10px; }
.cs-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #2a2013; }
.cs-row:last-child { border-bottom: none; }
.cs-row i { color: var(--dim); font-size: 11px; }
.ab-row { background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 6px 10px; margin-bottom: 5px; }
.ab-row .ab-name { font-weight: bold; color: var(--gold-hi); }
.ab-row .ab-meta { float: right; color: var(--dim); font-size: 11px; }
.ab-row .ab-desc { color: var(--dim); font-size: 12px; margin-top: 2px; }
.ab-locked { opacity: 0.45; }

/* quest log */
.q-row { background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 8px 10px; margin-bottom: 6px; }
.q-title { font-weight: bold; color: var(--gold-hi); }
.q-tag { color: var(--good); font-size: 11px; font-weight: normal; }
.q-desc { color: var(--dim); font-size: 12px; margin: 3px 0; }
.q-prog { color: #6fb9d8; font-size: 11px; }
.q-ready { border-left: 3px solid var(--good); }
.q-done { color: var(--dim); }

/* dialogue */
.dlg-lines p { margin-bottom: 8px; font-style: italic; color: #efe4c8; line-height: 1.5; }
.dlg-options { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.dlg-btn { padding: 8px 12px; font-size: 13px; text-align: left; }
.dlg-btn.q-turnin { border-color: #5c7a3d; color: var(--good); }
.dlg-quest { background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 8px 10px; border-left: 3px solid var(--gold); }
.dlg-quest.dlg-locked { opacity: 0.55; border-left-color: var(--dim); }
.dq-title { color: var(--gold); font-weight: bold; }
.dq-title i { color: var(--dim); font-size: 11px; }
.dq-text { font-style: italic; margin: 4px 0; font-size: 12px; }
.dq-desc { color: var(--dim); font-size: 12px; margin-bottom: 6px; }

/* shop & crafting */
.shop-gold { text-align: right; color: var(--gold); margin-bottom: 4px; }
.shop-list { display: flex; flex-direction: column; gap: 4px; }
.shop-row {
  display: grid; grid-template-columns: 1fr 60px 60px; align-items: center; gap: 8px;
  background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 5px 10px;
}
.craft-row { background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 7px 10px; margin-bottom: 5px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.craft-row.craft-no { opacity: 0.6; }
.cr-out { font-weight: bold; }
.cr-out i { color: var(--dim); font-size: 11px; font-weight: normal; }
.cr-ing { grid-column: 1; color: var(--dim); font-size: 12px; }
.craft-row .mini-btn { grid-row: 1 / 3; grid-column: 2; }
.ing-ok { color: var(--good); }
.ing-no { color: #d9884f; }

/* ---------- combat ---------- */
.combat-panel { width: 620px; }
.combat-status { display: flex; justify-content: space-between; gap: 20px; padding: 10px 16px 4px; }
.cs-side { flex: 1; }
.cs-side .bar { margin-top: 3px; }
.cs-right { text-align: right; }
#arena {
  display: block; margin: 6px 16px;
  border: 1px solid var(--border); outline: 1px solid var(--border-dark); border-radius: 3px;
  image-rendering: pixelated; background: #100c08;
}
.c-name { font-weight: bold; margin: 2px 0; color: var(--gold-hi); text-shadow: 0 1px 2px #000; }
.c-effects { min-height: 16px; margin-top: 3px; }
.fx {
  display: inline-block; background: #33271a; border: 1px solid #4a3820; border-radius: 3px;
  font-size: 10px; padding: 1px 6px; margin: 1px; color: #cbb98f;
}
#combat-log {
  height: 120px; overflow-y: auto; background: #120d07; margin: 0 12px;
  border: 1px solid #3d2f1c; box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  border-radius: 3px; padding: 6px 10px;
  font-family: monospace; font-size: 12px;
}
.clog-line { padding: 1px 0; color: #b3a380; }
#combat-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; justify-content: center; }
.act-btn { padding: 8px 14px; font-size: 13px; position: relative; overflow: hidden; }
.act-btn kbd { font-size: 9px; padding: 0 3px; opacity: 0.7; }
.ab-btn .ab-cost { display: block; font-size: 10px; color: var(--dim); }
.flee-btn { border-color: #7a4a35; }
.cd-overlay {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: rgba(10, 6, 2, 0.65); pointer-events: none;
  border-right: 1px solid rgba(213, 167, 70, 0.35);
}
.act-btn:disabled .cd-overlay { transition: none; }
.act-btn.no-res { border-color: #6a3428; }
.c-waiting { color: var(--dim); font-style: italic; padding: 10px; }
.c-result { width: 100%; text-align: center; font-size: 22px; font-weight: bold; letter-spacing: 4px; padding: 4px; text-shadow: 0 2px 4px #000; }
.c-result.victory { color: var(--gold-hi); }
.c-result.defeat { color: #c23a2b; }

/* ---------- party & trade ---------- */
#party-box { padding: 8px; flex: none; }
#party-box .mini-btn { margin-top: 6px; }
.pd-info { text-align: center; margin-bottom: 8px; }
.pd-name { font-size: 17px; font-weight: bold; color: var(--gold-hi); }
.pd-meta { color: var(--dim); font-size: 12px; }

.trade-cols { display: flex; gap: 10px; }
.trade-col {
  flex: 1; background: #191309; border: 1px solid #3d2f1c; border-radius: 3px; padding: 8px;
}
.trade-col.tr-locked { border-color: var(--gold); box-shadow: 0 0 6px rgba(213, 167, 70, 0.25); }
.tc-head { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; border-bottom: 1px solid #3d2f1c; padding-bottom: 3px; }
.tc-items { min-height: 70px; }
.tr-item { font-size: 12px; padding: 2px 0; }
.tr-x { color: #d9884f; cursor: pointer; padding: 0 4px; }
.tr-x:hover { color: #ff6b5b; }
.tr-gold { color: var(--gold); font-size: 12px; margin-top: 4px; }
.tc-gold { margin-top: 6px; font-size: 12px; color: var(--dim); }
.tc-gold input {
  width: 70px; background: #0e0a06; border: 1px solid #4a3820; border-radius: 2px;
  color: var(--text); padding: 2px 6px; font-family: monospace;
}
.trade-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.trade-status { text-align: center; color: var(--dim); font-size: 12px; font-style: italic; margin-top: 6px; min-height: 16px; }
.trade-inv { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-chip { font-size: 11px; }

/* ---------- title screen ---------- */
#title-screen {
  position: fixed; inset: -2000px; z-index: 100;
  background: radial-gradient(ellipse 1400px 900px at center, #2c2114 0%, #14100b 70%);
  display: flex; align-items: center; justify-content: center;
}
.title-inner { text-align: center; width: 520px; max-height: 660px; overflow-y: auto; overflow-x: hidden; padding: 20px; }
.title-inner h1 {
  font-size: 42px; letter-spacing: 10px; color: var(--gold);
  text-shadow: 0 0 34px rgba(213, 167, 70, 0.4), 0 3px 0 #5c4415, 0 5px 8px #000;
  margin-bottom: 2px;
}
.tagline { color: var(--dim); margin-bottom: 18px; font-style: italic; }
#title-menu { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.big-btn {
  color: #f5ead0; border-radius: 4px;
  padding: 12px 40px; font-size: 16px; letter-spacing: 2px; min-width: 260px;
}
.big-btn:hover { border-color: var(--gold); }
.text-btn { background: none; border: none; color: var(--dim); cursor: pointer; margin-top: 8px; font-family: inherit; }
.text-btn:hover { color: var(--gold-hi); }

#charcreate { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.cc-label { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }
#cc-name {
  background: #0e0a06; border: 1px solid #4a3820; border-radius: 3px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  color: var(--text); padding: 9px 12px; font-size: 15px; font-family: inherit;
}
#cc-name:focus { outline: none; border-color: var(--border-hi); }
#cc-classes { display: flex; gap: 8px; }
.cc-class {
  flex: 1; background: linear-gradient(180deg, #241c12, #1c150d);
  border: 1px solid #4a3820; border-radius: 4px;
  padding: 10px; cursor: pointer; font-size: 12px;
}
.cc-class:hover { border-color: var(--border-hi); }
.cc-class.sel {
  border-color: var(--gold); background: linear-gradient(180deg, #2f2415, #241b0f);
  box-shadow: 0 0 10px rgba(213, 167, 70, 0.25), inset 0 1px 0 rgba(255, 224, 160, 0.08);
}
.ccc-sprite { width: 48px; height: 48px; image-rendering: pixelated; display: block; margin: 0 auto 4px; }
.ccc-name { font-size: 15px; font-weight: bold; text-shadow: 0 1px 2px #000; }
.ccc-role { color: var(--dim); font-size: 11px; margin-bottom: 4px; }
.ccc-stats { font-family: monospace; font-size: 10px; color: #c2b291; margin-bottom: 4px; }
.ccc-blurb { color: var(--dim); font-size: 11px; line-height: 1.4; }
#cc-palettes { display: flex; gap: 8px; }
.cc-pal { width: 34px; height: 34px; border-radius: 4px; border: 2px solid #4a3820; cursor: pointer; }
.cc-pal.sel { border-color: var(--gold); box-shadow: 0 0 8px rgba(213, 167, 70, 0.5); }
#cc-error { color: #d9884f; font-size: 12px; min-height: 16px; }
