/* HOLLOWTIDE — theme overrides.
   css/game.css ships byte-identical to the TIFE Core 2.3.0 stylesheet; every
   visual change this story makes lives here and is loaded after it. */

:root {
  --primary: #b8d6d0;
  --bright: #eef7f3;
  --dim: #6c8a86;
  --line: #2a4a4c;
  --bg: #04090b;
  --panel: #071316;
  --panel2: #0a1a1e;
  --warn: #f0b352;
  --danger: #e2705c;
  --glow: 0.35;
  --tide: #4fbfa8;
  --oxide: #c8703a;
  --salt: #f2f6f2;
}

html,
body {
  background: #04090b;
}

.shell {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(79, 191, 168, 0.09) 0, rgba(4, 9, 11, 0) 58%),
    linear-gradient(180deg, #071216 0%, #04090b 45%, #020506 100%);
}

.topbar {
  background: linear-gradient(180deg, #0a171b, #050d10);
  border-color: var(--line);
}

.logo {
  color: var(--tide);
  text-shadow: 0 0 calc(14px * var(--glow)) var(--tide);
}

.game-title strong {
  color: var(--salt);
  letter-spacing: 0.26em;
}

.metric b {
  color: var(--tide);
}

.panel {
  background: linear-gradient(180deg, rgba(10, 26, 30, 0.96), rgba(4, 10, 12, 0.96));
  box-shadow: inset 0 0 26px rgba(79, 191, 168, 0.035);
}

.panel h2 {
  color: var(--salt);
  border-bottom-color: #1f3f42;
  letter-spacing: 0.13em;
}

.panel p {
  color: #93b0ac;
}

.panel .row {
  border-bottom-color: #16302f;
}

.progress i {
  background: var(--tide);
}

.terminal .output.title {
  color: var(--salt);
  border-left: 2px solid var(--tide);
  padding-left: 10px;
}

.terminal .output.command {
  color: var(--oxide);
}

.terminal .output.system {
  color: #8fbcb2;
}

.terminal .output.warning {
  color: var(--warn);
}

.terminal .output.error {
  color: var(--danger);
}

.topbar button,
.footerbar button,
.command-entry button,
.button-row button,
dialog button {
  background: #0a1b1f;
  border-color: var(--line);
  color: var(--primary);
}

.topbar button:hover,
.footerbar button:hover,
.button-row button:hover {
  background: #133033;
  color: var(--salt);
}

.button-row button.story-verb {
  border-color: #6a3d22;
  color: #e0a271;
  background: #16100c;
}

.button-row button.story-verb:hover {
  background: #2a1a11;
  color: #f6c79b;
}

.button-row button.selected {
  background: #1c4642;
  color: var(--salt);
  border-color: var(--tide);
}

/* The engine stylesheet relies on the browser default focus ring; give
   keyboard users something legible against this palette. */
:focus-visible {
  outline: 2px solid var(--tide);
  outline-offset: 2px;
}

/* ---------------- station chart (js/map.js) ---------------- */

.chart {
  font-size: 11px;
  line-height: 1.45;
}

.chart-region {
  margin: 0 0 9px;
  padding: 0 0 7px;
  border-bottom: 1px solid #16302f;
}

.chart-region:last-of-type {
  border-bottom: 0;
}

.chart-region-name {
  color: var(--dim);
  letter-spacing: 0.12em;
  font-size: 10px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.chart-region.active .chart-region-name {
  color: var(--tide);
}

.chart-count {
  color: #4c6a68;
}

.chart-room {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 1px 0 1px 6px;
  color: #9dbdb8;
}

.chart-room i {
  width: 6px;
  height: 6px;
  border: 1px solid #35595a;
  display: inline-block;
  flex: 0 0 auto;
}

.chart-room.unknown {
  color: #45605e;
}

.chart-room.unknown i {
  border-style: dotted;
}

.chart-room.here {
  color: var(--salt);
}

.chart-room.here i {
  background: var(--tide);
  border-color: var(--tide);
  box-shadow: 0 0 8px var(--tide);
}

.chart-fever {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #16302f;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.chart-fever-label {
  color: var(--dim);
}

.chart-fever-bar {
  display: inline-flex;
  gap: 3px;
}

.chart-fever-bar i {
  width: 15px;
  height: 6px;
  background: #14262a;
  border: 1px solid #24403f;
  display: inline-block;
}

.chart-fever-bar i.lit {
  background: var(--oxide);
  border-color: var(--oxide);
}

.chart-fever.bad .chart-fever-bar i.lit {
  background: var(--danger);
  border-color: var(--danger);
}

.chart-fever-stage {
  color: #9dbdb8;
  margin-left: auto;
}

.chart-fever.clear .chart-fever-stage {
  color: var(--tide);
}

/* ---------------- story cover ---------------- */

.story-cover {
  background: linear-gradient(180deg, #071216 0%, #04090b 100%);
}

.cover-content h1 {
  color: var(--salt);
  letter-spacing: 0.16em;
}

.cover-kicker {
  color: var(--oxide);
}

.start-story {
  background: #133033;
  border: 1px solid var(--tide);
  color: var(--salt);
}

.start-story:hover {
  background: #1c4642;
}

.cover-sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background:
    linear-gradient(180deg, rgba(79, 191, 168, 0) 0%, rgba(79, 191, 168, 0.12) 60%, rgba(79, 191, 168, 0.2) 100%);
}

.cover-wall {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 34%;
  height: 12%;
  background: linear-gradient(180deg, #16262a 0%, #0b171a 100%);
  box-shadow: 0 -1px 0 #2a4a4c;
}

.cover-mast {
  position: absolute;
  left: 22%;
  bottom: 46%;
  width: 3px;
  height: 30%;
  background: linear-gradient(180deg, rgba(200, 112, 58, 0.9), rgba(42, 74, 76, 0.6));
}

.cover-beacon {
  position: absolute;
  left: 21%;
  bottom: 75%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--oxide);
  box-shadow: 0 0 26px 6px rgba(200, 112, 58, 0.55);
}

body.reduced-motion .cover-beacon {
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-beacon {
    animation: hollowtide-pulse 3.4s ease-in-out infinite;
  }
}

@keyframes hollowtide-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

body.high-contrast .chart-room.here {
  color: #fff;
}
