/* ============================================================================
   ASCHENWACHT — Dark Fantasy Obsidian & Forged-Iron Design System
   ============================================================================ */

:root {
  color-scheme: dark;
  --bg-void: #08070a;
  --bg-panel: #121015;
  --bg-panel-elevated: #19161d;
  --bg-slot: #0d0b0f;
  --border-iron: #312c36;
  --border-bronze: #6b5435;
  --border-gold: #c89b52;

  --text-bone: #e8e1d5;
  --text-muted: #9a9184;
  --text-dim: #686056;

  --accent-gold: #c89b52;
  --accent-gold-bright: #e3bc78;
  --accent-blood: #a62b2d;
  --accent-blood-bright: #dc4c4e;
  --accent-mana: #3c7899;
  --accent-mana-bright: #67a9cc;
  --accent-ember: #d96b27;
  --accent-moss: #5c8a65;

  --rarity-common: #68635e;
  --rarity-rare: #4d88ad;
  --rarity-epic: #9b6bc2;
  --rarity-relic: #c89b52;

  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-void);
  color: var(--text-bone);
  font-family: var(--font-sans);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body {
  display: flex;
  flex-direction: column;
}

.aw-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.aw-icon-sm { width: 13px; height: 13px; }
.aw-icon-lg { width: 20px; height: 20px; }
.aw-icon-xl { width: 26px; height: 26px; }

.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==================== HEADER ==================== */

.top-bar {
  background: linear-gradient(180deg, #17141b 0%, #100e13 100%);
  border-bottom: 1px solid var(--border-iron);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  z-index: 20;
  flex-shrink: 0;
}

.top-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-crest {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-bronze);
  background: linear-gradient(180deg, #251f19 0%, #13100d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold-bright);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: #1a171e;
  border: 1px solid var(--border-iron);
  font-size: 11px;
  color: var(--text-bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-floor {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-weight: 700;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-moss);
  font-family: var(--font-mono);
  opacity: 0.85;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bone);
  background: linear-gradient(180deg, #242029 0%, #17141b 100%);
  border: 1px solid #3c3643;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
  position: relative;
  border-radius: 2px;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #302b36 0%, #1f1b24 100%);
  border-color: var(--border-bronze);
  color: #fff;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-gold {
  background: linear-gradient(180deg, #5e4422 0%, #3a2812 100%);
  border-color: var(--border-gold);
  color: #f6e7c8;
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #75552b 0%, #4b3417 100%);
  border-color: var(--accent-gold-bright);
}

.btn-blood {
  background: linear-gradient(180deg, #591a1c 0%, #360e10 100%);
  border-color: #8f2d30;
  color: #f7dada;
}

.btn-blood:hover:not(:disabled) {
  background: linear-gradient(180deg, #732225 0%, #471315 100%);
  border-color: #bd3b3f;
}

.btn-icon {
  padding: 5px 7px;
}

.badge-alert {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent-gold);
  color: #140f08;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #120d06;
  border-radius: 2px;
}

/* ==================== RESOURCE STRIP ==================== */

.resource-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: #0c0a0e;
  border-top: 1px solid #211d26;
  overflow-x: auto;
  scrollbar-width: none;
}

.resource-strip::-webkit-scrollbar {
  display: none;
}

.res-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: #141218;
  border: 1px solid #26222b;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-bone);
  flex-shrink: 0;
  cursor: default;
}

.res-chip.clickable {
  cursor: pointer;
}

.res-chip.clickable:hover {
  border-color: var(--border-bronze);
}

.res-label {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.res-divider {
  width: 1px;
  height: 16px;
  background: #2b2630;
  flex-shrink: 0;
}

/* ==================== VIEWPORT ==================== */

.viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--bg-void);
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Combat Log Ticker */
.log-overlay {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 10;
  width: min(360px, calc(100% - 170px));
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.log-line {
  background: rgba(11, 10, 14, 0.78);
  border-left: 2px solid var(--border-bronze);
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--text-bone);
  text-shadow: 0 1px 2px #000;
  line-height: 1.3;
  animation: fadeInLog 0.16s ease-out;
}

.log-line.combat { border-left-color: var(--accent-blood-bright); }
.log-line.loot { border-left-color: var(--accent-gold); color: #f1dfbc; }
.log-line.system { border-left-color: var(--accent-mana-bright); color: #cde2ee; }
.log-line.warn { border-left-color: var(--accent-ember); color: #f6c9a5; }

@keyframes fadeInLog {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Minimap */
.minimap-frame {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  padding: 4px;
  background: rgba(11, 10, 14, 0.88);
  border: 1px solid var(--border-iron);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.minimap-title {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3px;
}

#minimap-canvas {
  display: block;
  width: 144px;
  height: 100px;
  border: 1px solid #221e27;
}

/* Inspect Tooltip (Bottom-right above HUD) */
.inspect-box {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 11;
  min-width: 190px;
  max-width: 260px;
  padding: 7px 10px;
  background: rgba(13, 11, 16, 0.92);
  border: 1px solid var(--border-bronze);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  font-size: 11.5px;
}

.inspect-box.hidden { display: none; }

.inspect-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-gold-bright);
  margin-bottom: 2px;
}

.inspect-sub {
  color: var(--text-muted);
  font-size: 11px;
}

/* Aiming Banner */
.aim-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(20, 16, 12, 0.95);
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  font-size: 12px;
}

.aim-banner.hidden { display: none; }

/* Floor Transition Curtain */
.floor-curtain {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: radial-gradient(circle at center, rgba(20, 17, 24, 0.94) 0%, rgba(6, 5, 8, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.floor-curtain.visible {
  opacity: 1;
}

.curtain-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.curtain-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-bone);
  margin: 0 0 8px;
}

.curtain-sub {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 440px;
}

/* Mobile D-Pad */
.dpad-wrap {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 14;
  display: none;
  grid-template-columns: repeat(3, 44px);
  gap: 4px;
  padding: 5px;
  background: rgba(12, 10, 15, 0.72);
  border: 1px solid var(--border-iron);
}

.dpad-wrap.visible {
  display: grid;
}

.dpad-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1821;
  border: 1px solid #3c3643;
  color: var(--text-bone);
  cursor: pointer;
}

.dpad-btn:active {
  background: #3d2c17;
  border-color: var(--accent-gold);
}

/* ==================== BOTTOM HUD ==================== */

.bottom-hud {
  background: linear-gradient(180deg, #131117 0%, #0b0a0e 100%);
  border-top: 1px solid var(--border-iron);
  padding: 8px 14px 10px;
  z-index: 20;
  flex-shrink: 0;
}

.hud-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vitals-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.bar-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.bar-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.bar-label.hp { color: var(--accent-blood-bright); }
.bar-label.mp { color: var(--accent-mana-bright); }
.bar-label.xp { color: var(--accent-gold-bright); }

.bar-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-bone);
}

.bar-track {
  height: 8px;
  background: #0a090c;
  border: 1px solid #2e2934;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  transition: width 0.16s ease;
}

.bar-fill.hp { background: linear-gradient(90deg, #6e1a1c 0%, #b53235 100%); }
.bar-fill.mp { background: linear-gradient(90deg, #214a63 0%, #4b8fb3 100%); }
.bar-fill.xp { background: linear-gradient(90deg, #7a5824 0%, #c89b52 100%); }

/* Action Bar */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.quickslots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.quickslot {
  width: 58px;
  height: 52px;
  background: linear-gradient(180deg, #1b1821 0%, #100e14 100%);
  border: 1px solid #383240;
  color: var(--text-bone);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 3px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.quickslot:hover:not(:disabled) {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, #26212e 0%, #16131b 100%);
}

.quickslot.active {
  border-color: var(--accent-gold-bright);
  box-shadow: inset 0 0 10px rgba(200, 155, 82, 0.25);
}

.quickslot:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.slot-cost {
  position: absolute;
  top: 2px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-mana-bright);
}

.slot-qty {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-gold-bright);
}

.slot-name {
  font-size: 9px;
  color: var(--text-muted);
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================== NATIVE DIALOG MODALS ==================== */

dialog.aw-modal {
  margin: auto;
  padding: 0;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  background: linear-gradient(180deg, #17141c 0%, #0e0c11 100%);
  color: var(--text-bone);
  border: 1px solid var(--border-bronze);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(200, 155, 82, 0.16);
  overflow: hidden;
  flex-direction: column;
}

dialog.aw-modal[open] {
  display: flex;
}

dialog.aw-modal::backdrop {
  background: rgba(4, 3, 6, 0.8);
  backdrop-filter: blur(4px);
}

dialog.aw-modal.narrow {
  width: min(500px, calc(100vw - 24px));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #110f15;
  border-bottom: 1px solid var(--border-iron);
  flex-shrink: 0;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold-bright);
  letter-spacing: 0.06em;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 10px 16px;
  background: #100e14;
  border-top: 1px solid var(--border-iron);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ==================== CHARACTER CREATION ==================== */

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.class-card {
  background: #121016;
  border: 1px solid var(--border-iron);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.class-card:hover {
  border-color: var(--border-bronze);
  background: #191620;
}

.class-card.selected {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, #211c17 0%, #141118 100%);
  box-shadow: inset 0 0 18px rgba(200, 155, 82, 0.12);
}

.class-portrait {
  width: 76px;
  height: 76px;
  background: radial-gradient(circle at center, #26212c 0%, #0d0b10 72%);
  border: 1px solid #352f3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.class-portrait img {
  width: 64px;
  height: 64px;
  image-rendering: auto;
}

.class-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold-bright);
}

.class-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -4px;
}

.class-desc {
  font-size: 11.5px;
  color: #bfb8ac;
  line-height: 1.45;
  flex: 1;
}

.class-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #26222c;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.aw-input {
  flex: 1;
  background: #0c0a0f;
  border: 1px solid var(--border-iron);
  color: var(--text-bone);
  padding: 7px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}

.aw-input:focus {
  border-color: var(--accent-gold);
}

/* ==================== CHARACTER PAPERDOLL & INVENTORY ==================== */

.char-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}

.paperdoll-grid {
  display: grid;
  grid-template-columns: 1fr 84px 1fr;
  gap: 8px;
  align-items: center;
}

.paperdoll-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paperdoll-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px;
  background: radial-gradient(circle at center, #221d28 0%, #0e0c11 75%);
  border: 1px solid var(--border-iron);
  min-height: 220px;
}

.paperdoll-center img {
  width: 68px;
  height: 68px;
}

.equip-slot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  background: var(--bg-slot);
  border: 1px solid var(--border-iron);
  cursor: pointer;
  min-height: 44px;
  text-align: left;
  color: var(--text-bone);
  width: 100%;
}

.equip-slot:hover {
  border-color: var(--border-bronze);
}

.equip-slot-meta {
  min-width: 0;
  flex: 1;
}

.equip-slot-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.equip-slot-name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rarity-common { border-color: var(--rarity-common) !important; }
.rarity-rare { border-color: var(--rarity-rare) !important; }
.rarity-epic { border-color: var(--rarity-epic) !important; }
.rarity-relic { border-color: var(--rarity-relic) !important; box-shadow: inset 0 0 10px rgba(200, 155, 82, 0.14); }

.text-common { color: #cbc5bc; }
.text-rare { color: #7ec0e6; }
.text-epic { color: #c49ce8; }
.text-relic { color: #e3bc78; }

.stats-panel {
  margin-top: 12px;
  padding: 10px;
  background: #0e0c12;
  border: 1px solid var(--border-iron);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  font-size: 12px;
}

.stat-pair {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #1e1a24;
  padding-bottom: 3px;
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #1e1a24;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #121016;
  border: 1px solid var(--border-iron);
}

.item-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.item-icon-box {
  width: 34px;
  height: 34px;
  background: #0c0a0f;
  border: 1px solid #2f2a36;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-card-info {
  min-width: 0;
}

.item-card-title {
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.item-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.diff-pos { color: #72b07d; font-family: var(--font-mono); font-size: 11px; }
.diff-neg { color: #d65a5c; font-family: var(--font-mono); font-size: 11px; }

.tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-iron);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 5px 11px;
  background: #131117;
  border: 1px solid var(--border-iron);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn.active {
  background: #231d17;
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
}

.cost-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: #0d0b10;
  border: 1px solid #2b2632;
}

.cost-pill.missing {
  border-color: #6b2224;
  color: #dc6b6d;
}

/* Chronicle Table */
.chronicle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.chronicle-table th {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border-bronze);
  color: var(--accent-gold);
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
}

.chronicle-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #201c26;
}

.tag-victory {
  color: #84c48f;
  border: 1px solid #3c6945;
  padding: 1px 6px;
  font-size: 10px;
  text-transform: uppercase;
}

.tag-fallen {
  color: #dc6b6d;
  border: 1px solid #6e2628;
  padding: 1px 6px;
  font-size: 10px;
  text-transform: uppercase;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 780px) {
  .brand-title { display: none; }
  .save-indicator { display: none; }
  .btn .btn-label { display: none; }
  .class-grid { grid-template-columns: 1fr; }
  .char-layout { grid-template-columns: 1fr; }
  .vitals-row { gap: 8px; }
  #minimap-canvas { width: 104px; height: 74px; }
  .log-overlay { width: calc(100% - 134px); }
}
