/* ═══════════════════════════════════════════════
   AD&D 2e — App Layout Stylesheet
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Indie+Flower&family=EB+Garamond&family=Raleway&display=swap');

/* ── Variables ── */
:root {
  --header-h: 54px;
  --sidebar-w: 170px;

  --dark:        #1a1d2e;
  --dark2:       #252a3d;
  --dark3:       #2f3550;
  --gold:        #c9a227;
  --gold-light:  #e6c35a;
  --gold-dim:    #7a6218;

  --content-bg:  #edeae0;
  --card-bg:     #ffffff;
  --card-border: #d8d0bb;

  --text:        #1a1d2e;
  --text-muted:  #6b6555;
  --text-light:  #f0ece0;

  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.13);

  --font:        'Indie Flower', cursive;
  --colour:      #1a1d2e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--content-bg);
  display: grid;
  grid-template:
    "header  header"  var(--header-h)
    "sidebar content" 1fr
    / var(--sidebar-w) 1fr;
}

/* ══════════════════════════════════════
   APP HEADER
══════════════════════════════════════ */
#app-header {
  grid-area: header;
  background: var(--dark);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 2px solid var(--gold-dim);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.header-logo {
  height: 32px;
  filter: brightness(0) invert(1) opacity(0.85);
}

.header-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-center {
  flex: 1;
  text-align: center;
}

#header-char-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--text-light);
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  justify-content: flex-end;
}

.hdr-btn {
  background: var(--dark3);
  color: var(--gold-light);
  border: 1px solid var(--gold-dim);
  border-radius: 5px;
  padding: 5px 10px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.hdr-btn:hover { background: var(--dark2); border-color: var(--gold); color: var(--gold-light); }
.hdr-btn .material-symbols-outlined { font-size: 16px; }

.colour-wrap {
  position: relative;
  cursor: pointer;
}
.colour-wrap input[type=color] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.hdr-select {
  background: var(--dark3);
  color: var(--gold-light);
  border: 1px solid var(--gold-dim);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  cursor: pointer;
}
.hdr-select:focus { outline: none; border-color: var(--gold); }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
#sidebar {
  grid-area: sidebar;
  background: var(--dark2);
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-right: 1px solid var(--dark3);
  overflow-y: auto;
}

.nav-btn {
  background: none;
  border: none;
  color: #8a9ab8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.nav-btn:hover {
  color: var(--text-light);
  background: rgba(255,255,255,0.05);
}
.nav-btn.active {
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.12);
  border-left-color: var(--gold);
}
.nav-btn .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
#main-content {
  grid-area: content;
  overflow-y: auto;
  padding: 20px;
  background: var(--content-bg);
}

/* ── Tabs ── */
.tab { display: none; }
.tab.active { display: block; }

/* ── Tab grid ── */
.tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.card-header {
  background: var(--dark3);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header .hint {
  font-family: var(--font);
  font-size: 10px;
  color: #8a9ab8;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: none;
  margin-left: auto;
}

.card-body {
  padding: 14px;
}
.card-body.no-pad { padding: 0; }

/* ══════════════════════════════════════
   MODAL (portrait URL)
══════════════════════════════════════ */
#modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}
.modal {
  display: none;
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 101;
  min-width: 300px;
}
.modal p {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--dark);
}
.modal input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 13px;
}

/* ══════════════════════════════════════
   GENERIC INPUT RESET
══════════════════════════════════════ */
input[type=text], textarea {
  font-family: var(--font);
  font-size: 14px;
  color: var(--colour);
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc4aa;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
input[type=text]:focus, textarea:focus {
  border-bottom-color: var(--gold);
}
input[type=text]:disabled {
  color: var(--text-muted);
  border-bottom-color: transparent;
}
textarea {
  resize: none;
  border: 1px solid #ccc4aa;
  border-radius: 4px;
  padding: 4px 6px;
  overflow-y: auto;
}
input[type=checkbox] {
  accent-color: var(--gold);
  cursor: pointer;
}

/* ── Field layout (label above input) ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.field label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input[type=text], .field textarea {
  font-size: 15px;
  padding-bottom: 2px;
}
.field textarea {
  height: 60px;
}

/* ══════════════════════════════════════
   CHARACTER TAB
══════════════════════════════════════ */
#character table {
  width: 100%;
  border-collapse: collapse;
}
#character td { padding: 0 4px; }

.portrait-body {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Portrait — empty state */
.portrait-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 28px;
  border: 2px dashed var(--card-border);
  border-radius: var(--radius);
  width: 100%;
}
.portrait-placeholder .material-symbols-outlined { font-size: 36px; }
.portrait-placeholder-btns {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Portrait — image + hover overlay */
.portrait-img-wrap {
  position: relative;
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  background: #f0ece0;
}
.portrait-error {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f5f0e8;
  color: #b04040;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 16px;
  line-height: 1.6;
}
.portrait-error .material-symbols-outlined { font-size: 32px; }
.portrait-error.visible { display: flex; }
#portrait-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.portrait-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 30, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.portrait-img-wrap:hover .portrait-overlay {
  opacity: 1;
  background: rgba(20, 20, 30, 0.45);
}
.portrait-ovr-btn {
  background: rgba(30, 30, 45, 0.7);
  color: rgba(230, 195, 90, 0.8);
  border: 1px solid rgba(122, 98, 24, 0.5);
  border-radius: 5px;
  padding: 5px 10px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.5px;
}
.portrait-ovr-btn:hover {
  background: rgba(30, 30, 45, 0.9);
  color: var(--gold-light);
  border-color: var(--gold-dim);
}
.portrait-ovr-btn .material-symbols-outlined { font-size: 14px; }

#xp table, #money table {
  width: 100%;
  border-collapse: collapse;
}
#xp td, #money td { padding: 0; }

#money td:last-child textarea {
  height: 80px;
  width: 100%;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

/* ══════════════════════════════════════
   COMBAT — HP / SPELL POINTS
══════════════════════════════════════ */
#hp {
  width: 100%;
}
#hp table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
#hp td {
  padding: 4px 8px;
  vertical-align: top;
}
#hp tr:nth-child(odd) td {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 8px;
}
#hp td:first-child {
  width: 120px;
  border-right: 1px solid var(--card-border);
  text-align: center;
}
#hp tr.spell-points td {
  border-top: 1px solid var(--card-border);
}
#hp tr:nth-child(even) td:first-child input {
  font-size: 28px;
  text-align: center;
  width: 100px;
  border-bottom: none;
  color: var(--colour);
}
#hp tr:nth-child(even) td:last-child textarea {
  width: 100%;
  height: 60px;
  font-size: 13px;
}

/* ══════════════════════════════════════
   COMBAT — SAVING THROWS
══════════════════════════════════════ */
#saving-throws table {
  width: 100%;
  border-collapse: collapse;
}
#saving-throws tr { border-bottom: 1px solid #ede8d8; }
#saving-throws td {
  padding: 5px 6px;
  font-size: 13px;
}
#saving-throws td:nth-child(1),
#saving-throws td:nth-child(3) {
  width: 48px;
  text-align: center;
}
#saving-throws td:nth-child(1) input,
#saving-throws td:nth-child(3) input {
  text-align: center;
  font-size: 15px;
  width: 40px;
}
#saving-throws tr.st-header td {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: none;
}

/* ══════════════════════════════════════
   COMBAT — AC
══════════════════════════════════════ */
#ac table {
  border-collapse: collapse;
  width: 100%;
}
#ac td {
  padding: 4px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #ede8d8;
  font-size: 12px;
}
#ac td:last-child { width: 55%; }
#ac td input[type=text] { font-size: 13px; }

#ac .shield {
  width: 90px;
  text-align: center;
  vertical-align: top;
  border-right: 1px solid var(--card-border);
  padding: 8px 4px;
}
#ac .shield .shield-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
#ac .shield .shield-wrap {
  position: relative;
  width: 65px;
  height: 78px;
  margin: 0 auto;
  background: url('shield.svg') no-repeat center/contain;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ac .shield .shield-wrap input {
  width: 40px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  background: transparent;
  border: none;
  outline: none;
  color: var(--colour);
  padding-top: 4px;
}

#ac .input {
  display: flex;
  align-items: center;
  gap: 6px;
}
#ac .input label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
#ac .input div { flex: 1; }

/* ══════════════════════════════════════
   COMBAT — WEAPONS
══════════════════════════════════════ */
#weapons table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#weapons th {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--card-border);
  padding: 6px 6px;
  text-align: left;
  background: #f8f5ef;
}
#weapons td {
  border-bottom: 1px solid #ede8d8;
  padding: 3px 6px;
  vertical-align: middle;
}
#weapons td div { display: flex; gap: 2px; align-items: center; }
#weapons input[type=text] { font-size: 12px; }
#weapons td:first-child { min-width: 120px; }

/* ══════════════════════════════════════
   ABILITIES
══════════════════════════════════════ */
#abilities > table {
  width: 100%;
  border-collapse: collapse;
}
#abilities > table > tbody > tr {
  border-bottom: 1px solid #ede8d8;
}
#abilities > table > tbody > tr > td:nth-child(1) {
  width: 56px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid var(--card-border);
  padding: 6px;
}
#abilities > table > tbody > tr > td:nth-child(1) input {
  font-size: 22px;
  text-align: center;
  width: 44px;
  font-weight: bold;
  color: var(--colour);
  border-bottom: 2px solid var(--gold-dim);
}
.ab-name {
  width: 38px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--dark3);
  text-align: center;
  padding: 0 6px;
  vertical-align: middle;
}
#abilities > table > tbody > tr > td:nth-child(3) {
  padding: 6px 4px;
}
#abilities table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
#abilities table table tr:first-child td {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 4px 1px;
}
#abilities table table tr:last-child td {
  padding: 0 4px;
}
#abilities table table input {
  font-size: 12px;
  text-align: center;
  width: 100%;
  color: var(--colour);
}

/* ══════════════════════════════════════
   SKILLS — THIEVING
══════════════════════════════════════ */
#thieving table {
  width: 100%;
  border-collapse: collapse;
}
#thieving td {
  text-align: center;
  padding: 4px 4px;
  border: none;
  font-size: 12px;
}
#thieving td input {
  text-align: center;
  font-size: 13px;
  width: 100%;
}
#thieving .label-row td {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px solid var(--card-border);
}

/* ══════════════════════════════════════
   SKILLS — TURNING UNDEAD
══════════════════════════════════════ */
#turning table {
  width: 100%;
  border-collapse: collapse;
}
#turning td {
  text-align: center;
  padding: 4px 2px;
  font-size: 12px;
}
#turning td input {
  text-align: center;
  font-size: 14px;
  width: 100%;
}
#turning .label-row td {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
  padding-top: 4px;
}

/* ══════════════════════════════════════
   SKILLS — SPELLS PER LEVEL
══════════════════════════════════════ */
#spells table {
  width: 100%;
  border-collapse: collapse;
}
#spells td {
  text-align: center;
  padding: 4px;
}
#spells td input {
  text-align: center;
  font-size: 16px;
  width: 100%;
}
#spells .label-row td {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
  padding-top: 4px;
}

/* ══════════════════════════════════════
   SKILLS — SPECIAL ABILITIES
══════════════════════════════════════ */
#special-abilities table {
  width: 100%;
  border-collapse: collapse;
}
#special-abilities td {
  padding: 4px 6px;
  border-bottom: 1px solid #ede8d8;
}
#special-abilities td div { display: flex; }
#special-abilities input[type=text] { font-size: 13px; }

/* ══════════════════════════════════════
   MAGIC — SPELL LIST
══════════════════════════════════════ */
.spell-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  cursor: pointer;
  font-family: var(--font);
  font-size: 11px;
  color: #8a9ab8;
  text-transform: none;
  letter-spacing: 0;
}
.spell-toggle input[type=checkbox] { display: none; }
.toggle-track {
  width: 32px;
  height: 16px;
  background: var(--dark);
  border-radius: 8px;
  position: relative;
  border: 1px solid var(--gold-dim);
  transition: background 0.2s;
}
.spell-toggle input:checked ~ .toggle-track { background: var(--gold-dim); }
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #8a9ab8;
  transition: transform 0.2s, background 0.2s;
}
.spell-toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: var(--gold-light);
}

#spell-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}
#spell-list th {
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #f8f5ef;
  padding: 5px 4px;
  border-bottom: 1px solid var(--card-border);
  text-align: center;
}
#spell-list tbody tr:nth-child(even) { background: #faf8f3; }
#spell-list td {
  padding: 2px 4px;
  border-bottom: 1px solid #ede8d8;
  text-align: center;
  vertical-align: middle;
}
#spell-list col:nth-child(1), #spell-list col:nth-child(8) { width: 18%; }
#spell-list col:nth-child(2), #spell-list col:nth-child(9) { width: 5%; }
#spell-list col:nth-child(3), #spell-list col:nth-child(10) { width: 5%; }
#spell-list col:nth-child(4), #spell-list col:nth-child(5),
#spell-list col:nth-child(6), #spell-list col:nth-child(7),
#spell-list col:nth-child(11), #spell-list col:nth-child(12),
#spell-list col:nth-child(13), #spell-list col:nth-child(14) { width: 4%; }

#spell-list td div { display: flex; justify-content: center; }
#spell-list input[type=text] {
  font-size: 11px;
  text-align: left;
  width: 100%;
  border-bottom: none;
}
#spell-list input[type=checkbox] {
  accent-color: var(--gold);
  cursor: pointer;
}

/* Spell play mode */
#spell-list.play td:nth-child(7n+4) div { cursor: pointer; }

/* ══════════════════════════════════════
   GEAR — HEALING POTIONS
══════════════════════════════════════ */
#healing-potions table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
#healing-potions th {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 8px;
  text-align: left;
  background: #f8f5ef;
  border-bottom: 2px solid var(--card-border);
}
#healing-potions th .material-symbols-outlined {
  font-size: 14px;
  vertical-align: middle;
  line-height: 1;
}
#healing-potions td {
  padding: 3px 6px;
  border-bottom: 1px solid #ede8d8;
  vertical-align: middle;
}
#healing-potions input[type=text] { font-size: 12px; }
#healing-potions td:nth-child(1) { width: 32%; }
#healing-potions td:nth-child(2) { width: 7%; text-align: center; }
#healing-potions td:nth-child(2) input { text-align: center; }
#healing-potions td:nth-child(3) { width: 10%; text-align: center; }
#healing-potions td:nth-child(3) input { text-align: center; width: 100%; }
#healing-potions td:nth-child(4) { width: 12%; text-align: center; padding-left: 0; padding-right: 0; }
#healing-potions td:nth-child(5) { width: 39%; }
#healing-potions th:nth-child(1) { width: 32%; }
#healing-potions th:nth-child(2) { width: 7%; }
#healing-potions th:nth-child(3) { width: 10%; text-align: center; }
#healing-potions th:nth-child(4) { width: 12%; text-align: center; }
#healing-potions th:nth-child(5) { width: 39%; }

.uses-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.uses-cell .uses-cur {
  width: 24px;
  text-align: right;
  font-size: 12px;
}
.uses-cell .uses-slash {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 1px;
}
.uses-cell .uses-max {
  width: 24px;
  text-align: left;
  font-size: 12px;
}
.uses-cell input { border-bottom-color: transparent; }
.uses-cell input:focus { border-bottom-color: var(--gold); }
#movement table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#movement td {
  padding: 4px 6px;
  border-bottom: 1px solid #ede8d8;
}
#movement td:first-child {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
#movement td:nth-child(3) input { text-align: center; font-size: 15px; }
#movement td:nth-child(2) input {
  text-align: center;
  font-size: 11px;
  width: 40px;
}
#movement tr:first-child td:first-child {
  font-size: 11px;
  font-weight: 600;
}
#movement tr:first-child input {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  width: 60px;
}

/* ══════════════════════════════════════
   GEAR — EQUIPMENT
══════════════════════════════════════ */
#gear table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#gear th {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 8px;
  text-align: left;
  background: #f8f5ef;
  border-bottom: 2px solid var(--card-border);
}
#gear td {
  padding: 3px 8px;
  border-bottom: 1px solid #ede8d8;
  vertical-align: middle;
}
#gear td:nth-child(1) { width: 50%; }
#gear td:nth-child(2) { width: 30%; }
#gear td:nth-child(3) { width: 20%; text-align: right; }
#gear input[type=text] { font-size: 12px; }
#gear .input div { display: flex; }
tr.gear-total td {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: #f8f5ef;
  border-top: 2px solid var(--card-border);
  color: var(--text-muted);
}
#gear-total-weight {
  text-align: right;
  font-size: 14px;
  color: var(--text);
}

/* ══════════════════════════════════════
   NOTES — PROFICIENCIES
══════════════════════════════════════ */
#proficiencies table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#proficiencies th {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px;
  background: #f8f5ef;
  border-bottom: 2px solid var(--card-border);
  text-align: left;
}
#proficiencies td {
  padding: 4px 6px;
  border-bottom: 1px solid #ede8d8;
  vertical-align: middle;
}
#proficiencies td div { display: flex; align-items: center; gap: 2px; }
#proficiencies span { display: flex; align-items: center; gap: 2px; }
#proficiencies input { font-size: 12px; }
#proficiencies td:nth-child(1) input:first-child { flex: 2; }
#proficiencies td:nth-child(1) input:not(:first-child) { width: 30px; }

/* ══════════════════════════════════════
   NOTES — TEXTAREA
══════════════════════════════════════ */
#notes table { width: 100%; }
#notes td { padding: 0; }
#notes textarea {
  width: 100%;
  height: 400px;
  font-size: 14px;
  border: 1px solid var(--card-border);
  padding: 8px;
  color: var(--colour);
  border-radius: 4px;
}

/* ══════════════════════════════════════
   SCROLLBAR STYLING
══════════════════════════════════════ */
#main-content::-webkit-scrollbar { width: 6px; }
#main-content::-webkit-scrollbar-track { background: transparent; }
#main-content::-webkit-scrollbar-thumb { background: #c8b890; border-radius: 3px; }

#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--dark3); }
