/* TARZAN OF THE APES — theme skin.
   css/game.css ships byte-identical to TIFE Core 2.3.0. Everything here is an
   override layered on top of it: the palette moves off the kit's phosphor green
   onto equatorial forest green, sun-bleached bone and Greystoke brass, and the
   two signature panels drawn by js/map.js — the region chart and the primer
   strip — get their styling here.

   High contrast, reduced motion, large controls and the simplified layout are
   all honoured, and nothing here depends on colour alone to carry meaning. */

:root {
  --primary: #cfe3c8;          /* bone on green: body text */
  --bright: #f6f1df;           /* bleached paper */
  --dim: #7d9575;
  --line: #2f4a2c;
  --bg: #060a06;
  --panel: #0b120a;
  --panel2: #0e150c;
  --warn: #e8b64c;             /* brass */
  --danger: #d4735a;
  --brass: #c69a3e;
  --leaf: #6f9c5a;
  --deep: #08110a;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: Consolas, "Courier New", monospace;
  --scale: 1;
  --glow: 0;
}

html, body { background: var(--bg); }

.shell {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(111, 156, 90, .10) 0, transparent 55%),
    linear-gradient(180deg, #0a110a 0%, #060a06 60%, #040704 100%);
}

.topbar, .footerbar { background: #0a110a; border-color: var(--line); }
.logo { color: var(--brass); text-shadow: none; letter-spacing: .18em; }
.product, .metric small, .panel-body .hint { font-family: var(--mono); }
.game-title strong { color: var(--bright); letter-spacing: .22em; }

.terminal {
  background: linear-gradient(180deg, #070c07, #040704);
  text-shadow: none;
  font-size: calc(15px * var(--scale));
  line-height: 1.62;
}
.output.title { color: var(--brass); letter-spacing: .06em; }
.output.command { color: var(--leaf); font-family: var(--mono); }
.output.system { color: #b9d2b0; }
.output.warning { color: var(--warn); }
.output.error { color: var(--danger); }
.output.room { color: var(--bright); }

.panel {
  background: linear-gradient(180deg, rgba(14, 21, 12, .97), rgba(6, 10, 6, .97));
  box-shadow: inset 0 0 20px rgba(111, 156, 90, .04);
}
.panel h2 { color: var(--brass); border-bottom-color: var(--line); letter-spacing: .1em; }
.panel .row { border-bottom-color: #1d2e1b; }
.progress { background: #16220f; }
.progress i { background: var(--leaf); }

.command-entry { background: #0a110a; }
.command-entry span { color: var(--brass); }
.command-entry input { color: var(--bright); background: #040704; border-color: var(--line); font-family: var(--mono); }

.palette { background: linear-gradient(180deg, #0b120a, #060a06); }
.palette-label { color: var(--brass); font-family: var(--mono); letter-spacing: .16em; }
.topbar button, .footerbar button, .command-entry button, .button-row button, dialog button {
  color: var(--primary); background: #10190e; border-color: var(--line); font-family: var(--mono);
}
.topbar button:hover, .footerbar button:hover, .button-row button:hover {
  background: #1e3019; color: var(--bright);
}
.button-row button.selected { background: #2b4423; color: var(--bright); }

/* the eight jungle-craft verbs read as a distinct band, not as more UI chrome */
#story-verb-label { color: var(--brass); }
#story-verb-row button {
  background: #16210f; border-color: var(--brass); color: var(--bright); letter-spacing: .06em;
}
#story-verb-row button:hover { background: #2a3a18; }

/* the kit relies on the browser's default focus ring, which vanishes on these
   backgrounds; give keyboard users something they can actually see */
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

dialog { background: #060a06; border-color: var(--brass); }

/* ------------------------------------------------------------ region chart */
.tz-chart { font-family: var(--mono); font-size: 11px; }
.tz-region { margin-bottom: 9px; }
.tz-region-name {
  color: var(--brass); letter-spacing: .12em; font-size: 9px;
  border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-bottom: 3px;
}
.tz-region.tz-unseen .tz-region-name { color: #4c5d47; }
.tz-rooms { list-style: none; margin: 0; padding: 0 0 0 6px; }
.tz-rooms li { padding: 1px 0; }
.tz-rooms li.tz-here { color: var(--bright); }
.tz-rooms li.tz-here:before { content: "\25B6\00a0"; color: var(--brass); }
.tz-rooms li.tz-been { color: var(--primary); }
.tz-rooms li.tz-been:before { content: "\00b7\00a0\00a0"; }
.tz-rooms li.tz-dark { color: #4c5d47; }
.tz-rooms li.tz-dark:before { content: "\00a0\00a0\00a0"; }

/* ------------------------------------------------------------ primer strip */
.tz-primer {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  font-family: var(--mono);
}
.tz-primer-title { color: var(--brass); font-size: 9px; letter-spacing: .16em; margin-bottom: 6px; }
.tz-primer-foot { color: var(--dim); font-size: 9px; margin-top: 6px; }

.tz-bugs { display: flex; flex-wrap: wrap; gap: 3px; }
.tz-bug {
  width: 17px; height: 19px; line-height: 19px; text-align: center;
  font-size: 11px; color: #40512f; border: 1px solid #1d2e1b; background: #0a110a;
}
.tz-bug.tz-bug-known {
  color: #040704; background: var(--brass); border-color: var(--brass); font-weight: bold;
}
.tz-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tz-word { font-size: 10px; color: #4c5d47; letter-spacing: .14em; }
.tz-word.tz-word-known { color: var(--bright); }
.tz-word.tz-word-known:before { content: "\2713\00a0"; color: var(--leaf); }

/* act one shows the diary instead: ruled lines that ink over when it is written */
.tz-diary-line {
  height: 7px; margin: 4px 0; border-bottom: 1px solid #1d2e1b;
}
.tz-diary-line.tz-inked {
  border-bottom-color: var(--brass);
  background: linear-gradient(90deg, rgba(198, 154, 62, .22), transparent 78%);
}

/* ----------------------------------------------------------------- cover */
.story-cover { background: #060a06; }
.cover-art {
  background:
    radial-gradient(circle at 74% 16%, rgba(246, 241, 223, .30), transparent 12%),
    linear-gradient(180deg, #14200f 0%, #0a110a 55%, #040704 100%);
  border-right-color: var(--line);
}
.cover-art:before { background: none; }
.cover-moon {
  background: radial-gradient(circle at 40% 36%, #f6f1df, #c69a3e 52%, #4a3a14 70%, transparent 72%);
  box-shadow: 0 0 60px rgba(198, 154, 62, .28);
}
.ridge-one { background: #1b2c14; opacity: .92; }
.ridge-two { background: #0a110a; }
.cover-cave {
  background: radial-gradient(ellipse at 50% 96%, #040704 0 42%, #0d1509 43% 58%, transparent 59%);
  filter: none;
}
.cover-content { background: linear-gradient(135deg, rgba(13, 21, 10, .98), #060a06); }
.cover-kicker { color: var(--brass); }
.cover-content h1 { color: var(--bright); text-shadow: none; letter-spacing: .05em; }
.cover-content p { color: #bfd4b6; }
.cover-credit { border-top-color: var(--line); }
.start-story {
  background: #23350f; border-color: var(--brass); color: var(--bright);
  box-shadow: none; letter-spacing: .16em;
}
.start-story:hover, .start-story:focus { background: #354a17; outline-color: var(--brass); }

/* high contrast must beat every colour above, so it is restated last */
body.high-contrast {
  --primary: #fff; --bright: #fff; --dim: #eee; --line: #fff;
  --brass: #fff; --leaf: #fff; --warn: #fff; --danger: #fff;
  --panel: #000; --panel2: #000; --bg: #000; --glow: 0;
}
body.high-contrast .tz-bug { color: #fff; background: #000; border-color: #fff; }
body.high-contrast .tz-bug.tz-bug-known { color: #000; background: #fff; }
body.high-contrast .tz-rooms li.tz-dark, body.high-contrast .tz-word { color: #bbb; }
body.high-contrast .terminal, body.high-contrast .shell { background: #000; }

body.reduced-motion .story-cover { transition: none; }
body.large-controls #story-verb-row button { min-height: 44px; }
body.simplified-ui #story-verb-row, body.simplified-ui #story-verb-label { display: none; }
