/* ================================================================
   Chronicles of the Abyss - style.css
   Dark fantasy D&D game UI
   Neofilisoft / Studio Balmung
================================================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:            #1a1410;
  --parchment:      #f5edd8;
  --parchment-dark: #e8d9b5;
  --parchment-deep: #d4c08a;
  --blood:          #8b1a1a;
  --blood-light:    #c0392b;
  --gold:           #c9a227;
  --gold-light:     #e8c547;
  --ember:          #d4530a;
  --shadow:         #2d1f0e;
  --teal:           #7ec8a0;
  --danger:         #e05c5c;
  --silver:         #b0b8c8;
  --copper:         #c87d3e;

  --font-title: 'Cinzel Decorative', serif;
  --font-body:  'Crimson Pro', serif;
  --font-mono:  'Inconsolata', monospace;

  --border-gold:     1px solid rgba(201,162,39,0.22);
  --border-gold-hi:  1px solid rgba(201,162,39,0.45);
  --bg-panel:        rgba(10,7,4,0.58);
  --bg-hover:        rgba(201,162,39,0.13);
}

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(201,162,39,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139,26,26,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ================================================================
   SETUP SCREEN
================================================================ */
#setup-screen {
  position: fixed; inset: 0;
  background: #0c0905;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

#setup-screen::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,162,39,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139,26,26,0.07) 0%, transparent 50%);
  pointer-events: none;
}

.setup-card {
  position: relative;
  max-width: 580px;
  width: 100%;
  background: rgba(20,14,8,0.97);
  border: var(--border-gold-hi);
  border-radius: 12px;
  padding: 2.2rem 2.4rem;
  text-align: center;
}

.setup-ornament {
  color: var(--gold);
  font-size: 1.6rem;
  opacity: 0.55;
  margin-bottom: 0.7rem;
  letter-spacing: 0.3em;
}

.setup-card h1 {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 4vw, 1.9rem);
  color: var(--gold);
  text-shadow: 0 0 32px rgba(201,162,39,0.4);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.tagline {
  font-size: 0.75rem;
  color: rgba(245,237,216,0.38);
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.setup-divider {
  width: 60px;
  height: 1px;
  background: rgba(201,162,39,0.28);
  margin: 0 auto 1.4rem;
}

.llm-config-box {
  background: rgba(201,162,39,0.04);
  border: var(--border-gold);
  border-radius: 8px;
  padding: 1.1rem 1.2rem 1rem;
  margin-bottom: 0.4rem;
  text-align: left;
}

.llm-config-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.65);
  margin-bottom: 0.8rem;
}

.llm-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  transition: background 0.2s, color 0.2s;
}
.llm-status.idle    { color: rgba(245,237,216,0.35); background: transparent; }
.llm-status.testing { color: #e8c547; background: rgba(201,162,39,0.08); }
.llm-status.ok      { color: #7ec8a0; background: rgba(126,200,160,0.1); }
.llm-status.error   { color: #e05c5c; background: rgba(224,92,92,0.1); }

.groq-tip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(245,237,216,0.38);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid rgba(201,162,39,0.25);
}
.groq-tip strong { color: rgba(201,162,39,0.65); font-weight: 500; }
.groq-tip a      { color: #9dc8f5; text-decoration: none; }
.groq-tip a:hover { text-decoration: underline; }

.test-btn {
  width: 100%;
  padding: 0.45rem;
  background: rgba(201,162,39,0.07);
  border: var(--border-gold);
  border-radius: 5px;
  color: rgba(245,237,216,0.65);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.test-btn:hover { background: rgba(201,162,39,0.15); color: var(--parchment-dark); }

.key-input-wrap {
  display: flex;
  gap: 0;
  position: relative;
}
.key-input-wrap input {
  flex: 1;
  border-radius: 5px 0 0 5px !important;
  border-right: none !important;
}
.toggle-key-btn {
  padding: 0 0.65rem;
  background: rgba(10,7,4,0.8);
  border: var(--border-gold);
  border-left: none;
  border-radius: 0 5px 5px 0;
  color: rgba(245,237,216,0.4);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.toggle-key-btn:hover { color: var(--gold); }

.key-note {
  color: rgba(245,237,216,0.28);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  font-style: normal;
  display: block;
  margin-top: 0.1rem;
}

.field-row {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.field {
  flex: 1;
  min-width: 130px;
  text-align: left;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.58);
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  background: rgba(10,7,4,0.82);
  border: var(--border-gold);
  border-radius: 5px;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.48rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(201,162,39,0.5);
}

.field select option {
  background: #1a1007;
  color: var(--parchment);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  text-align: left;
}

.class-btn {
  padding: 0.55rem 0.4rem;
  background: rgba(10,7,4,0.7);
  border: var(--border-gold);
  border-radius: 5px;
  color: rgba(245,237,216,0.55);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
  letter-spacing: 0.04em;
}
.class-btn:hover {
  background: rgba(201,162,39,0.1);
  color: var(--parchment);
}
.class-btn.selected {
  background: rgba(201,162,39,0.14);
  border-color: rgba(201,162,39,0.55);
  color: var(--gold);
}
.class-icon {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.setup-section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.48);
  text-align: left;
  margin-bottom: 0.45rem;
}

#begin-btn {
  width: 100%;
  padding: 0.9rem;
  background: rgba(201,162,39,0.1);
  border: var(--border-gold-hi);
  border-radius: 8px;
  color: rgba(201,162,39,0.5);
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: not-allowed;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#begin-btn.ready {
  color: var(--gold);
  cursor: pointer;
}
#begin-btn.ready:hover {
  background: rgba(201,162,39,0.22);
  box-shadow: 0 0 28px rgba(201,162,39,0.14);
}

/* ================================================================
   MAIN APP
================================================================ */
#app {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  padding: 1rem 0 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border-bottom: var(--border-gold);
  flex-shrink: 0;
  position: relative;
}
header h1 {
  font-family: var(--font-title);
  font-size: clamp(0.95rem, 2.8vw, 1.55rem);
  letter-spacing: 0.07em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(201,162,39,0.32);
  line-height: 1.2;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: absolute;
  right: 0;
}
.subtitle {
  font-size: 0.72rem;
  color: rgba(245,237,216,0.38);
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.settings-btn {
  background: none;
  border: var(--border-gold);
  border-radius: 4px;
  color: rgba(201,162,39,0.55);
  font-size: 0.85rem;
  width: 28px; height: 28px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.settings-btn:hover { color: var(--gold); background: rgba(201,162,39,0.1); }
.icon-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: rgba(201,162,39,0.55);
}

/* Char bar */
#char-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(201,162,39,0.07);
  border: var(--border-gold);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--parchment-dark);
  user-select: none;
  transition: background 0.2s;
}
.stat-chip.flash {
  animation: statFlash 0.5s ease;
}
@keyframes statFlash {
  0%   { background: rgba(201,162,39,0.35); }
  100% { background: rgba(201,162,39,0.07); }
}
.stat-chip .label {
  color: rgba(245,237,216,0.38);
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}
.stat-chip .val          { color: var(--gold); font-weight: 500; }
.stat-chip.hp .val       { color: var(--danger); }
.stat-chip.xp .val       { color: var(--teal); }
.stat-chip.provider-chip .val { color: #9dc8f5; }
.stat-chip.gold-chip .val   { color: var(--gold); }
.stat-chip.silver-chip .val { color: var(--silver); }
.stat-chip.copper-chip .val { color: var(--copper); }

/* Main layout */
#main {
  flex: 1;
  display: flex;
  gap: 0.7rem;
  min-height: 0;
  padding-bottom: 0.5rem;
}

/* ================================================================
   SKILLS SIDEBAR (left)
================================================================ */
#skills-sidebar {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#skills-list {
  list-style: none;
}
#skills-list li {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: rgba(245,237,216,0.55);
  padding: 0.3rem 0.3rem;
  border-bottom: 1px solid rgba(201,162,39,0.08);
  line-height: 1.4;
}
#skills-list li:last-child { border-bottom: none; }
#skills-list li .skill-name {
  color: var(--parchment-dark);
  font-weight: 500;
  display: block;
}
#skills-list li .skill-desc {
  color: rgba(245,237,216,0.35);
  font-size: 0.6rem;
  display: block;
  margin-top: 0.1rem;
}
#skills-list li.passive .skill-name::before {
  content: 'P ';
  color: var(--teal);
  font-size: 0.58rem;
}
#skills-list li.active .skill-name::before {
  content: 'A ';
  color: var(--ember);
  font-size: 0.58rem;
}

/* ================================================================
   STORY PANEL
================================================================ */
#story-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem 1rem;
  background: rgba(10,7,4,0.6);
  border: var(--border-gold);
  border-radius: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,162,39,0.28) transparent;
  position: relative;
}
#scroll-area::-webkit-scrollbar { width: 4px; }
#scroll-area::-webkit-scrollbar-track { background: transparent; }
#scroll-area::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.28); border-radius: 2px; }

/* Message types */
.msg { margin-bottom: 1.1rem; animation: fadeUp 0.35s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg.dm .speaker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.msg.dm .speaker::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--gold);
  opacity: 0.45;
}
.msg.dm .body {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--parchment);
  font-style: italic;
  font-weight: 300;
  border-left: 2px solid rgba(201,162,39,0.18);
  padding-left: 0.9rem;
}
.msg.dm .body em     { font-style: normal; color: var(--gold-light); }
.msg.dm .body strong { font-style: normal; font-weight: 600; color: #e8c8a0; }

.msg.player .body {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(245,237,216,0.5);
  padding: 0.38rem 0.7rem;
  background: rgba(201,162,39,0.055);
  border-radius: 4px;
  border-left: 2px solid rgba(201,162,39,0.33);
}
.msg.player .body::before { content: '> '; color: var(--gold); opacity: 0.65; }

.msg.system .body {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(245,237,216,0.28);
  text-align: center;
  letter-spacing: 0.06em;
  padding: 0.45rem 0;
  border-top: 1px dashed rgba(201,162,39,0.1);
  border-bottom: 1px dashed rgba(201,162,39,0.1);
}

.msg.roll .body {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e8a045;
  text-align: center;
  padding: 0.3rem 0;
  letter-spacing: 0.1em;
}

/* Typing dots */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0 0.45rem 0.9rem;
  border-left: 2px solid rgba(201,162,39,0.12);
  margin-bottom: 1rem;
}
.typing-indicator span {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: rgba(201,162,39,0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.dots { display: flex; gap: 3px; }
.dots i {
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.45;
  animation: dotPulse 1.2s infinite;
}
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%,80%,100% { transform: scale(0.55); opacity: 0.25; }
  40%         { transform: scale(1);    opacity: 0.75; }
}

/* Quick actions */
#quick-actions {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
  padding: 0.45rem 0 0;
  flex-shrink: 0;
}
.quick-btn {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  padding: 0.28rem 0.6rem;
  background: rgba(201,162,39,0.055);
  border: var(--border-gold);
  border-radius: 3px;
  color: rgba(245,237,216,0.45);
  cursor: pointer;
  transition: all 0.14s;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.quick-btn:hover {
  background: rgba(201,162,39,0.14);
  color: var(--parchment-dark);
  border-color: rgba(201,162,39,0.38);
}

/* Input area */
#input-area {
  flex-shrink: 0;
  padding: 0.55rem 0 0.7rem;
  border-top: var(--border-gold);
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
}
#action-input {
  flex: 1;
  background: rgba(10,7,4,0.72);
  border: var(--border-gold);
  border-radius: 6px;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.52rem 0.85rem;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
#action-input::placeholder { color: rgba(245,237,216,0.18); font-style: italic; }
#action-input:focus { border-color: rgba(201,162,39,0.5); }

#send-btn {
  padding: 0.52rem 1rem;
  background: rgba(201,162,39,0.1);
  border: var(--border-gold-hi);
  border-radius: 6px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  height: 42px;
}
#send-btn:hover:not(:disabled) { background: rgba(201,162,39,0.2); border-color: rgba(201,162,39,0.6); }
#send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ================================================================
   RIGHT SIDEBAR
================================================================ */
#sidebar {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,162,39,0.15) transparent;
}

.panel {
  background: var(--bg-panel);
  border: var(--border-gold);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.5);
  margin-bottom: 0.55rem;
  padding-bottom: 0.38rem;
  border-bottom: var(--border-gold);
}

/* Dice */
.dice-btn {
  width: 100%;
  margin-bottom: 0.38rem;
  padding: 0.38rem;
  background: rgba(201,162,39,0.07);
  border: var(--border-gold);
  border-radius: 4px;
  color: var(--parchment-dark);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.1s;
  letter-spacing: 0.05em;
}
.dice-btn:hover { background: var(--bg-hover); border-color: rgba(201,162,39,0.42); }
.dice-btn:active { transform: scale(0.97); }

.dice-result-inline {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--gold-light);
  text-align: center;
  min-height: 1.5rem;
  padding: 0.2rem 0;
  letter-spacing: 0.08em;
  transition: all 0.15s;
}
.dice-result-inline.crit  { color: #ff9f43; text-shadow: 0 0 8px rgba(255,159,67,0.6); }
.dice-result-inline.fumble { color: var(--danger); }

/* Inventory */
#inventory-list {
  list-style: none;
  font-size: 0.72rem;
  color: rgba(245,237,216,0.6);
  font-family: var(--font-mono);
  line-height: 1.85;
}
#inventory-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(201,162,39,0.05);
}
#inventory-list li:last-child { border-bottom: none; }
#inventory-list li::before {
  content: 'o ';
  color: var(--gold);
  font-size: 0.48rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.inv-qty {
  color: rgba(201,162,39,0.6);
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* Key Items */
#key-items-list {
  list-style: none;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  line-height: 1.85;
}
#key-items-list li {
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(201,162,39,0.05);
}
#key-items-list li:last-child { border-bottom: none; }
#key-items-list li::before {
  content: '* ';
  color: var(--gold-light);
  font-size: 0.5rem;
  vertical-align: middle;
}
#key-items-list li .ki-name  { color: var(--parchment-dark); }
#key-items-list li .ki-unusable { color: #e05c5c; font-size: 0.62rem; }

/* Quests */
#quests-list { list-style: none; }
.quest {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.7;
  color: rgba(245,237,216,0.38);
}
.quest.active { color: var(--parchment-dark); }
.quest.active::before { content: '> '; color: var(--ember); }
.quest.done   { text-decoration: line-through; color: rgba(245,237,216,0.22); }
.quest.done::before { content: '+ '; color: var(--teal); }

/* ================================================================
   SETTINGS MODAL
================================================================ */
#settings-modal,
#saveload-modal {
  position: fixed; inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.72);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(20,14,8,0.98);
  border: var(--border-gold-hi);
  border-radius: 10px;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: var(--border-gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.modal-close {
  background: none;
  border: none;
  color: rgba(245,237,216,0.4);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.3rem;
  transition: color 0.14s;
}
.modal-close:hover { color: var(--parchment); }
.modal-body { padding: 1.1rem; }

/* ================================================================
   SAVE / LOAD SLOTS
================================================================ */
.save-slot {
  background: rgba(201,162,39,0.05);
  border: var(--border-gold);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.save-slot:last-child { margin-bottom: 0; }

.slot-info {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(245,237,216,0.55);
  line-height: 1.5;
}
.slot-info .slot-num {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: rgba(201,162,39,0.45);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.15rem;
}
.slot-info .slot-name {
  color: var(--parchment-dark);
  font-size: 0.75rem;
}
.slot-info .slot-meta {
  color: rgba(245,237,216,0.3);
  font-size: 0.6rem;
}

.slot-btns {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.slot-btn {
  padding: 0.28rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  border: var(--border-gold);
  background: rgba(201,162,39,0.07);
  color: rgba(245,237,216,0.55);
}
.slot-btn:hover { background: rgba(201,162,39,0.18); color: var(--parchment); }
.slot-btn.save-btn { border-color: rgba(201,162,39,0.35); color: var(--gold); }
.slot-btn.load-btn { border-color: rgba(126,200,160,0.35); color: var(--teal); }
.slot-btn.del-btn  { border-color: rgba(224,92,92,0.25); color: rgba(224,92,92,0.6); }
.slot-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 800px) {
  #skills-sidebar { display: none; }
}
@media (max-width: 640px) {
  #sidebar { display: none; }
  .setup-card { padding: 1.4rem 1.2rem; }
  .stat-chip .label { display: none; }
  .header-right .subtitle { display: none; }
  #quick-actions { gap: 0.3rem; }
}
@media (max-width: 420px) {
  .class-grid { grid-template-columns: repeat(2, 1fr); }
}
