/* The Emu: Wildborn's look (wild/style.css), with Cedar Haven's own accent. */
:root {
  --bg: #0d1210;
  --panel: #151d1a;
  --fg: #f4f1e8;
  --muted: #cdc7b6;
  --line: #3a4a43;
  --accent: #8fd6a8;
  --accent-ink: #0d1210;
  --focus: #ffd866;
  --bar: #8fd6a8;
  --bar-low: #ff9b7a;
  --current: #24342d;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8f6ef;
    --panel: #ffffff;
    --fg: #14130d;
    --muted: #3a372c;
    --line: #9fa595;
    --accent: #1f5b3a;
    --accent-ink: #ffffff;
    --focus: #1d3fb8;
    --bar: #1f6b45;
    --bar-low: #a3161b;
    --current: #e4ece2;
    color-scheme: light;
  }
}

:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 20px;
  line-height: 1.5;
}

body { min-height: 100vh; }

h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 0.5rem; letter-spacing: 0.01em; }
h2 { font-size: 1.3rem; margin: 0 0 0.6rem; }

.start, .game {
  max-width: 46rem;
  margin: 12px auto;
  padding: 2.5rem 16px 3rem;
}

.lead { font-size: 1.25rem; color: var(--muted); margin: 0 0 1.5rem; }
.load { color: var(--muted); min-height: 1.5em; }
.keys-intro { color: var(--muted); margin-top: 1.5rem; }

.buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }

button {
  font: inherit;
  font-weight: 700;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  border-radius: 0.6rem;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button + button { background: transparent; color: var(--fg); }
button:disabled { opacity: 0.5; cursor: wait; }

:focus-visible, .game:focus { outline: 3px solid var(--focus); outline-offset: 4px; }
.game:focus:not(:focus-visible) { outline-color: var(--line); }

.hud { border-bottom: 2px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.where { margin: 0 0 0.8rem; font-size: 1.15rem; }
.sep { color: var(--muted); }
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.4rem 1.2rem; }
.meter { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.bar { display: block; height: 0.8rem; background: var(--panel); border: 2px solid var(--line); border-radius: 0.5rem; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--bar); }
.bar span.low { background: var(--bar-low); }

.menu {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.menu ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.menu li { padding: 0.45rem 0.7rem; border-radius: 0.4rem; border: 2px solid transparent; cursor: pointer; }
.menu li .n { color: var(--muted); margin-right: 0.6rem; }
.menu li.current { background: var(--current); border-color: var(--focus); font-weight: 700; }
.menu ul:focus { outline: 3px solid var(--focus); outline-offset: 4px; }

.type { display: grid; gap: 0.3rem; }
.type label { color: var(--muted); font-size: 0.9rem; }
.type input {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--fg);
}

/* talking: the button, and a sign while the microphone is open */
.talk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin: 1rem 0 0; }
.mic { font-weight: 700; color: var(--accent); }
.mic::before { content: "\25CF  "; }

.log { list-style: none; margin: 0; padding: 0; color: var(--muted); max-height: 40vh; overflow-y: auto; }
.log li { padding: 0.2rem 0; border-bottom: 1px solid var(--line); }
.log li.turn { border-top: 2px solid var(--line); margin-top: 0.4rem; }
.log li b { color: var(--fg); }
.log li.you { color: var(--fg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }
