/* ===========================================================================
   realm.css — The look of the whole website (dark & gothic).

   LESSON: CSS describes how things LOOK. The ":root" block below defines
   "variables" — named colors and fonts — and the rest of the file uses them.
   Want a different red everywhere? Change --blood once.
   =========================================================================== */

:root {
  --bg: #0E0B0A;          /* page background, almost black */
  --panel: #17110F;       /* boxes */
  --panel-dark: #120E0C;  /* side panels and bars */
  --line: #2A1F19;        /* thin dividers */
  --frame: #4A3628;       /* box borders */
  --bone: #E8DFD0;        /* main text */
  --muted: #A89C8C;       /* quieter text */
  --faint: #8C8072;       /* quietest text */
  --gold: #C2A36B;
  --gold-bright: #E3C78F;
  --blood: #7A1515;       /* buttons */
  --blood-edge: #A33A2A;
  --monster: #E0483A;     /* creature names */
  --display: 'Cinzel', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--bone); font-family: var(--body); }
a { color: var(--gold); }
a:hover { color: var(--gold-bright); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- shared pieces ---------- */

.label {
  font-family: var(--display); font-size: 12px; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  height: 48px; padding: 0 14px; background: var(--bg); border: 1px solid var(--frame);
  border-radius: 0; color: var(--bone); font: inherit; font-size: 19px; width: 100%;
}
.input::placeholder { color: #7A6E62; }
.btn-blood {
  height: 52px; padding: 0 24px; border: 1px solid var(--blood-edge); border-radius: 0;
  background: var(--blood); color: #F3EADB; font-family: var(--display); font-weight: 700;
  font-size: 15px; letter-spacing: 0.22em; cursor: pointer;
}
.btn-blood:hover { background: #8E1E1A; }
.btn-blood:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost {
  min-height: 44px; padding: 0 16px; background: transparent; border: 1px solid #3A2A22;
  color: var(--muted); font-family: var(--display); font-size: 12px; letter-spacing: 0.16em;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--bone); border-color: var(--frame); }
.error { min-height: 1.4em; margin: 0; color: var(--monster); font-size: 18px; text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: #C9BFAF; }

/* ---------- landing / sign-in / characters pages ---------- */

.page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.topnav {
  width: 100%; max-width: 1200px; padding: 28px 32px; display: flex; flex-wrap: wrap;
  gap: 32px; justify-content: center; font-family: var(--display); font-size: 13px; letter-spacing: 0.22em;
}
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--bone); }
.hero { padding: 32px 32px 8px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 7vw, 68px);
  letter-spacing: 0.12em; line-height: 1.05;
}
.tagline { margin: 0; font-style: italic; font-size: 24px; color: var(--muted); max-width: 560px; line-height: 1.4; }
.divider { width: min(320px, 80%); height: auto; }

.panel {
  width: calc(100% - 48px); max-width: 440px; margin: 40px 24px 0; background: var(--panel);
  border: 1px solid var(--frame); outline: 1px solid var(--line); outline-offset: 6px;
  padding: 40px 36px; display: flex; flex-direction: column; gap: 22px;
}
.panel h2 {
  margin: 0; text-align: center; font-family: var(--display); font-size: 20px; font-weight: 500;
  letter-spacing: 0.2em; color: var(--gold);
}
.panel .switch { margin: 0; text-align: center; font-size: 18px; color: var(--muted); }
.panel .mudlet { margin: 0; text-align: center; font-size: 15px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 16px; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }
.linklike:hover { color: var(--gold-bright); }

.features {
  width: 100%; max-width: 1100px; padding: 88px 32px 72px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px; text-align: center;
}
.features h3 { margin: 0 0 12px; font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: 0.16em; color: var(--gold); }
.features p { margin: 0; font-size: 19px; line-height: 1.55; color: #B8AC9C; }
.footer {
  margin-top: auto; width: 100%; border-top: 1px solid var(--line); padding: 24px 32px; text-align: center;
  font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; color: var(--faint);
}

.char-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.char-btn {
  width: 100%; min-height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--frame); color: var(--bone); cursor: pointer;
  font-family: var(--display); font-size: 17px; letter-spacing: 0.1em;
}
.char-btn:hover { border-color: var(--gold); }
.char-btn .go { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.empty { margin: 0; text-align: center; font-style: italic; font-size: 19px; color: var(--muted); }
.row { display: flex; gap: 10px; }
.row .input { flex: 1; min-width: 0; }
.row .btn-blood { height: 48px; font-size: 13px; padding: 0 18px; }
.account-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 18px; color: var(--muted); }

/* ---------- play screen ---------- */

.play { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.play-header {
  border-bottom: 1px solid var(--line); background: var(--panel-dark); padding: 10px 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.18em; }
.room-name { font-family: var(--display); font-size: 14px; letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; background: transparent; border: 1px solid #3A2A22; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--bone); border-color: var(--frame); }

.play-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr) 290px; }
.side {
  background: var(--panel-dark); padding: 22px 20px; display: flex; flex-direction: column; gap: 26px;
  overflow-y: auto; min-height: 0;
}
.side.left { border-right: 1px solid var(--line); }
.side.right { border-left: 1px solid var(--line); }
.block { display: flex; flex-direction: column; gap: 10px; }
.block .label { font-size: 11px; }

.minimap { width: 100%; max-width: 260px; align-self: center; height: auto; background: var(--bg); border: 1px solid var(--line); }
.exits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.exit-btn {
  height: 44px; background: #241A16; border: 1px solid #7A6450; color: var(--bone);
  font-family: var(--display); font-size: 12px; letter-spacing: 0.06em; cursor: pointer;
}
.exit-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.exit-btn:disabled { background: transparent; border-color: #241A16; color: #4A3F36; cursor: default; }
.extra-exits { display: flex; flex-wrap: wrap; gap: 6px; }
.extra-exits .exit-btn { padding: 0 12px; flex: 1 1 auto; }
.who { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.who li { display: flex; align-items: center; gap: 10px; }
.who li::before { content: ''; width: 7px; height: 7px; background: #8FA87A; flex: none; }

.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.output {
  flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px; font-size: 20px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.output .line { margin: 0 0 6px; }
.output .echo { color: var(--faint); font-size: 16px; font-style: italic; }
.cmd-bar { border-top: 1px solid var(--line); background: var(--panel-dark); padding: 14px 20px; display: flex; gap: 12px; align-items: center; }
.cmd-bar label { font-family: var(--display); font-size: 22px; color: var(--gold); }
.cmd-bar .input { flex: 1; min-width: 0; font-size: 20px; }
.cmd-bar .btn-blood { height: 48px; font-size: 13px; letter-spacing: 0.2em; }

.char-name { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.08em; }
.char-sub { font-style: italic; font-size: 17px; color: var(--muted); }
.vital { display: flex; flex-direction: column; gap: 6px; }
.vital-top { display: flex; justify-content: space-between; font-family: var(--display); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); }
.vital-top span:last-child { color: var(--bone); }
.bar { height: 8px; background: #241A16; border: 1px solid #3A2A22; }
.bar > div { height: 100%; width: 0; transition: width 0.3s ease; }
.bar-health > div { background: #A62B22; }
.bar-mana > div { background: #5A6FB0; }
.bar-stamina > div { background: var(--gold); }
.bar-spirit > div { background: #8C7AA8; }
.pips { display: flex; gap: 4px; }
.pips div { flex: 1; height: 10px; background: #241A16; border: 1px solid #3A2A22; }
.pips div.on { background: var(--gold); border-color: var(--gold); }
.small { font-size: 16px; color: var(--muted); }
.hands { font-size: 17px; line-height: 1.5; }

.injury-wrap { display: flex; gap: 16px; align-items: center; }
.body-part { fill: #241A16; stroke: #7A6450; stroke-width: 1.5; }
.body-part.minor { fill: var(--gold); stroke: var(--gold-bright); }
.body-part.serious { fill: #A62B22; stroke: var(--monster); }
.injury-list { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.35; }
.injury-list .minor { color: var(--gold-bright); font-weight: 600; }
.injury-list .serious { color: var(--monster); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; display: inline-block; }
.swatch.ok { background: #241A16; border: 1px solid #7A6450; }
.swatch.minor { background: var(--gold); }
.swatch.serious { background: #A62B22; }

.notice {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 10;
  background: var(--panel); border: 1px solid var(--frame); padding: 14px 20px; font-size: 18px;
}

/* On smaller screens, the story goes on top and the panels stack below. */
@media (max-width: 1000px) {
  .play { height: auto; min-height: 100vh; overflow: visible; }
  .play-body { grid-template-columns: 1fr; }
  .main { order: -1; height: 75vh; }
  .side.left, .side.right { border: 0; border-top: 1px solid var(--line); }
}

/* ---------- colors inside the story text (from the game's color tags) ---------- */

.c-room { color: var(--gold); font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.1em; }
.c-exits { color: #8FA87A; }
.c-speech { color: #9FB6C9; }
.c-monster { color: var(--monster); font-weight: 700; }
.c-player { color: var(--bone); font-weight: 600; }
.c-item { color: #D9C27A; }
/* Item rarity colors (keep in step with content/items/rarity.json) */
.c-uncommon { color: #8FC97A; }
.c-rare { color: #7AA7E0; font-weight: 600; }
.c-epic { color: #B88AE6; font-weight: 600; }
.c-legendary { color: #F0A04B; font-weight: 700; text-shadow: 0 0 6px rgba(240, 160, 75, 0.35); }
.c-system { color: var(--muted); font-style: italic; }
.c-warn { color: #D9A35A; }
.c-good { color: #8FA87A; font-weight: 600; }
.c-emote { color: var(--muted); font-style: italic; }
.c-bold { font-weight: 700; }
.c-red, .c-bred { color: var(--monster); }
.c-green, .c-bgreen { color: #8FA87A; }
.c-yellow, .c-byellow { color: #D9C27A; }
.c-blue, .c-bblue { color: #8FA8D9; }
.c-magenta { color: #B58FC9; }
.c-cyan, .c-bcyan { color: #9FB6C9; }
.c-white, .c-bwhite { color: var(--bone); }
.c-gray { color: var(--faint); }
.c-gold { color: var(--gold); }
.mono-block { font-family: ui-monospace, Consolas, 'Courier New', monospace; font-size: 15px; line-height: 1.6; }
.c-bred, .c-bgreen, .c-byellow, .c-bblue, .c-bcyan, .c-bwhite { font-weight: 700; }

/* ---------- character creation wizard ---------- */

.hero-small { padding-top: 28px; gap: 10px; }
.hero-small h1 { font-size: clamp(28px, 5vw, 44px); }
.center { text-align: center; margin: 24px 0 0; }
.invisible { visibility: hidden; }

.steps {
  list-style: none; margin: 24px 0 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center;
  font-family: var(--display); font-size: 12px; letter-spacing: 0.18em; color: #6E6356; counter-reset: step;
}
.steps li { text-transform: uppercase; counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.done { color: var(--muted); }
.steps li.now { color: var(--gold); }

.panel.wizard { max-width: 980px; }
.sub-h { margin-top: 18px !important; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.card {
  text-align: left; background: var(--bg); border: 1px solid var(--frame); color: var(--bone); padding: 16px 18px;
  cursor: pointer; display: flex; flex-direction: column; gap: 8px; font-family: var(--body); font-size: 17px; line-height: 1.4;
}
.card:hover { border-color: var(--gold); }
.card[aria-pressed="true"] { border-color: var(--gold); background: #1E1612; box-shadow: inset 0 0 0 1px var(--gold); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; }
.card[aria-pressed="true"] .card-title { color: var(--gold-bright); }
.card-tag { font-family: var(--display); font-size: 11px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.card-desc { color: #C9BFAF; }
.card-meta { font-size: 15px; color: var(--gold); }
.card-perk { font-size: 15px; font-style: italic; color: var(--muted); }

.stat-head, .stat-row { display: grid; grid-template-columns: minmax(120px, 1fr) 170px 60px 60px; gap: 12px; align-items: center; }
.stat-head { font-family: var(--display); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }
.stat-row { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 19px; }
.stat-row.prime .stat-name, .prime-word { color: var(--gold-bright); }
.stat-ctl { display: flex; gap: 6px; align-items: center; }
.step-btn {
  width: 44px; height: 44px; background: #241A16; border: 1px solid #7A6450; color: var(--bone); font-size: 20px; cursor: pointer;
}
.step-btn:hover { border-color: var(--gold); }
.stat-input { height: 44px; width: 70px; text-align: center; padding: 0 4px; font-size: 19px; }
.stat-final { text-align: center; }
.stat-bonus { text-align: center; color: var(--gold); }
.stat-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 19px; padding-top: 8px; }
#points-left.bad { color: var(--monster); }

.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
select.input { appearance: auto; }
.preview { background: var(--bg); border: 1px solid var(--line); padding: 16px 20px; font-size: 19px; line-height: 1.5; }
.preview p { margin: 0 0 8px; }
.review-title { font-family: var(--display); font-size: 20px; letter-spacing: 0.08em; color: var(--gold-bright); }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; }
.char-btn .summary { font-family: var(--body); font-size: 15px; letter-spacing: 0; color: var(--muted); display: block; }

@media (max-width: 600px) {
  .stat-head, .stat-row { grid-template-columns: 1fr 150px 44px 44px; gap: 6px; font-size: 17px; }
  .step-btn { width: 40px; }
  .stat-input { width: 58px; }
}
.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-link:hover { color: #F3EADB; }
.cards-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; margin: 0 auto; width: 100%; }
.cards-two .card { align-items: center; }
.review-look p, .review-look { margin: 0 0 8px; white-space: pre-wrap; }
#look-preview { white-space: pre-wrap; }

/* Stat pop-ups: hidden until you hover the stat's name or tab into its row. */
.stat-name { position: relative; cursor: help; text-decoration: underline dotted rgba(194, 163, 107, 0.5); text-underline-offset: 4px; }
.stat-tip {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(340px, 80vw);
  background: #1E1612; border: 1px solid var(--gold); padding: 12px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-family: var(--body); font-size: 16px; line-height: 1.45; color: var(--bone); text-decoration: none; cursor: default;
}
.stat-name:hover .stat-tip, .stat-row:focus-within .stat-tip { display: block; }
.stat-tip-title { font-family: var(--display); font-size: 12px; letter-spacing: 0.14em; color: var(--gold-bright); text-transform: uppercase; margin-bottom: 6px; }
.stat-tip-tp { margin-top: 6px; font-size: 14px; font-style: italic; color: var(--muted); }
.wizard section[data-step] { display: flex; flex-direction: column; gap: 18px; }
.look-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.look-grid [data-field="scars"] { grid-column: 1 / -1; }

/* ---- Step 5: status line, group panel, bleeding ---- */
.status-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; color: var(--muted); margin-top: 4px; }
.status-line .st-silver { color: var(--gold, #C2A36B); }
.status-line .st-dead { color: #E0483A; font-weight: 700; letter-spacing: .08em; }
.status-line .st-chill { color: #8FB4D9; }
.group-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.group-list li { display: flex; flex-direction: column; gap: 3px; }
.group-list .gm-name.away { opacity: .55; font-style: italic; }
.group-list li.dead .gm-name { color: #E0483A; text-decoration: line-through; }
.group-list .gm-bar { height: 5px; }
#body .body-part.bleeding { animation: bleed-pulse 1.2s ease-in-out infinite; }
@keyframes bleed-pulse { 50% { opacity: .45; } }

/* ---- Targeting ---- */
.status-line .st-target { color: #E0483A; }
.group-list .gm-target { font-size: 14px; color: #E0483A; font-style: italic; }
.creature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.creature-btn { width: 100%; text-align: left; background: var(--panel-dark); border: 1px solid var(--line); color: var(--bone);
  padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.creature-btn:hover { border-color: var(--frame); }
.creature-btn.mine { border-color: #7A1515; box-shadow: inset 3px 0 0 #E0483A; }
.creature-btn .cr-name { color: #E0483A; font-weight: 700; font-size: 16px; }
.creature-btn .cr-info { color: var(--muted); font-size: 14px; font-style: italic; }

/* ---- Shop panel ---- */
.shop-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.shop-btn { width: 100%; display: flex; justify-content: space-between; gap: 8px; background: var(--panel-dark); border: 1px solid var(--line);
  color: var(--bone); padding: 4px 8px; cursor: pointer; font: inherit; font-size: 15px; text-align: left; }
.shop-btn:hover { border-color: var(--frame); }
.shop-btn .sh-price { color: var(--gold-bright); white-space: nowrap; }
.shop-btn .sh-price::after { content: ' s'; color: var(--muted); }
.sh-name.r-common { color: #D9C27A; } .sh-name.r-uncommon { color: #8FC97A; } .sh-name.r-rare { color: #7AA7E0; } .sh-name.r-epic { color: #B88AE6; } .sh-name.r-legendary { color: #F0A04B; }

/* ---- Creation: Skills step ---- */
.tp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 6px 0 14px; }
.tp-bar strong { color: var(--gold-bright); font-size: 20px; }
.tp-bar strong.bad { color: #E0483A; }
.skill-head, .skill-row { display: grid; grid-template-columns: 1fr 90px 150px 60px; align-items: center; gap: 10px; }
.skill-head { font-size: 11px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; padding: 0 4px 6px; border-bottom: 1px solid var(--line); }
.skill-group { font-family: var(--display); color: var(--gold); font-size: 12px; letter-spacing: .18em; margin: 14px 0 4px; }
.skill-row { padding: 4px; border-bottom: 1px solid var(--line); }
.skill-row.trained .skill-name { color: var(--gold-bright); }
.skill-name { position: relative; cursor: help; }
.skill-name:focus .stat-tip { display: block; }
.skill-cost { color: var(--muted); font-variant-numeric: tabular-nums; }
.skill-cost.dim { opacity: .45; }
.skill-ranks { min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.step-btn:disabled { opacity: .3; cursor: default; }
@media (max-width: 640px) { .skill-head, .skill-row { grid-template-columns: 1fr 60px 120px 40px; } }

/* ---- Magic: spells and effects ---- */
.status-line .st-hidden { color: #8FA3B8; font-style: italic; }
.spell-list, .effect-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.spell-list li { display: flex; gap: 4px; }
.spell-btn { flex: 1; display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; text-align: left;
  background: var(--panel-dark); border: 1px solid var(--line); color: var(--bone); padding: 4px 8px; font: inherit; font-size: 15px; cursor: pointer; }
.spell-btn:hover { border-color: var(--frame); }
.spell-btn.ready { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold-bright); }
.spell-btn .sp-num { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 13px; }
.spell-btn .sp-mana { color: #8FB4D9; font-variant-numeric: tabular-nums; font-size: 13px; }
.spell-btn.kind-bolt .sp-name, .spell-btn.kind-warding .sp-name { color: #E8A07A; }
.spell-btn.kind-heal .sp-name { color: #9FD39A; }
.spell-group { width: 30px; background: var(--panel-dark); border: 1px solid var(--line); color: var(--gold); font: inherit; font-size: 13px; cursor: pointer; }
.spell-group:hover { border-color: var(--gold); }
.g-key { color: var(--gold); border: 1px solid var(--line); padding: 0 4px; }
.effect-list li { display: flex; justify-content: space-between; font-size: 15px; color: #9FD39A; }
.effect-list li.harmful { color: #E0483A; }
.effect-list .fx-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.group-list .gm-effects { font-size: 13px; color: #9FD39A; font-style: italic; }

/* ---- World: map label, world map page ---- */
.map-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.world-link { font-size: 12px; letter-spacing: .08em; color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }
.world-link:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ---- World map page ---- */
.page-wide .panel { max-width: 960px; }
.world-map { width: 100%; height: auto; display: block; margin: 8px 0 12px; }
.wm-road { stroke: #7A6450; stroke-width: 2; }
.wm-road.later { stroke-dasharray: 6 5; opacity: .55; }
.wm-region rect { fill: #17110F; stroke: #7A6450; stroke-width: 1.5; }
.wm-region.open rect { stroke: #C2A36B; stroke-width: 2; }
.wm-region.town rect { fill: #2A1610; stroke: #B5562F; stroke-width: 2; }
.wm-region.later rect { stroke-dasharray: 6 5; stroke-opacity: .6; }
.wm-region.later text { opacity: .55; }
.wm-region.here rect { fill: #3A0E0E; stroke: #E0483A; stroke-width: 3; }
.wm-name { fill: #E8DFD0; font-family: 'Cinzel', serif; font-size: 13px; font-weight: 700; }
.wm-band { fill: #A89A86; font-size: 13px; font-style: italic; }
.world-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #A89A86; font-size: 15px; }
.world-legend .lg { display: inline-block; width: 18px; height: 12px; border: 2px solid #C2A36B; vertical-align: middle; margin-right: 4px; }
.world-legend .lg-town { border-color: #B5562F; background: #2A1610; border-radius: 6px; }
.world-legend .lg-later { border-color: #7A6450; border-style: dashed; }
.world-legend .lg-here { border-color: #E0483A; background: #3A0E0E; }

/* The hidden attribute always wins over a panel's display rule. */
[hidden] { display: none !important; }
