:root {
  color-scheme: dark;
  --bg: #101418;
  --ink: #f7f1e4;
  --muted: #b9bdc5;
  --panel: #17212a;
  --panel-strong: #202b35;
  --line: #354452;
  --gold: #eeb861;
  --teal: #75c9bf;
  --sky: #9bb7ff;
  --rose: #e88f87;
  --button: #263342;
  --button-hover: #314256;
  --focus: #9bd6ff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(117, 201, 191, 0.18), transparent 32%),
    linear-gradient(220deg, rgba(232, 143, 135, 0.16), transparent 36%),
    linear-gradient(160deg, #101418 0%, #1a2230 50%, #231e1b 100%);
  color: var(--ink);
}

button {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(340px, 1.38fr);
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

.title-panel {
  padding-block: 14px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 12px;
  font-size: 4.8rem;
  line-height: 0.94;
  letter-spacing: 0;
}

.tagline {
  max-width: 30rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.game-panel {
  border: 1px solid rgba(247, 241, 228, 0.18);
  border-radius: 8px;
  background: rgba(23, 33, 42, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.hud {
  display: grid;
  grid-template-columns: 116px 1fr minmax(128px, 0.7fr);
  gap: 1px;
  background: var(--line);
}

.hud-item {
  min-width: 0;
  padding: 14px 16px;
  background: var(--panel-strong);
}

.hud-item strong {
  display: block;
  min-height: 1.3rem;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  min-height: 286px;
  border-bottom: 1px solid var(--line);
}

.stage img {
  width: 100%;
  height: 100%;
  min-height: 286px;
  object-fit: cover;
  display: block;
  background: #111820;
}

.scene-copy {
  display: flex;
  align-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.08));
}

#scene-text {
  min-height: 11rem;
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.65;
}

.meters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}

.meter {
  min-width: 0;
  padding: 13px 14px;
  background: var(--panel);
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.83rem;
}

.meter-label strong {
  color: var(--ink);
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 220ms ease;
}

#hunger-bar,
#potty-bar {
  background: var(--rose);
}

#boredom-bar {
  background: var(--gold);
}

#energy-bar {
  background: var(--sky);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.choice,
.small-button {
  min-height: 46px;
  border: 1px solid rgba(238, 184, 97, 0.36);
  border-radius: 6px;
  background: var(--button);
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.choice {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.choice:hover,
.choice:focus-visible,
.small-button:hover,
.small-button:focus-visible {
  border-color: var(--gold);
  background: var(--button-hover);
  transform: translateY(-1px);
  outline: 2px solid transparent;
}

.choice:focus-visible,
.small-button:focus-visible {
  box-shadow: 0 0 0 3px var(--focus);
}

.choice.warning {
  border-color: rgba(232, 143, 135, 0.58);
}

.choice.good {
  border-color: rgba(145, 198, 110, 0.58);
}

.choice:disabled {
  color: #8f969f;
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.log-panel {
  padding: 14px 16px 16px;
}

.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.log {
  display: grid;
  gap: 7px;
  min-height: 5.5rem;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 18px;
    padding: 22px 0;
  }

  h1 {
    font-size: 3.2rem;
  }
}

@media (max-width: 680px) {
  body {
    background: #101418;
  }

  .shell {
    width: min(100% - 14px, 430px);
    gap: 8px;
    padding: 8px 0;
  }

  .title-panel {
    padding-block: 2px;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  h1 {
    margin: 3px 0 4px;
    font-size: 2rem;
    line-height: 1;
  }

  .tagline {
    max-width: none;
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .game-panel {
    border-radius: 6px;
  }

  .hud {
    grid-template-columns: 76px 1fr 86px;
  }

  .hud-item {
    padding: 8px 9px;
  }

  .label {
    font-size: 0.64rem;
  }

  .hud-item strong {
    min-height: 1rem;
    margin-top: 3px;
    font-size: 0.84rem;
  }

  .stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .stage img {
    min-height: 0;
    height: 112px;
  }

  .scene-copy {
    padding: 10px 12px;
  }

  #scene-text {
    min-height: 4.7rem;
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .meters {
    grid-template-columns: repeat(2, 1fr);
  }

  .meter {
    padding: 8px 10px;
  }

  .meter-label {
    margin-bottom: 5px;
    font-size: 0.76rem;
  }

  .bar {
    height: 6px;
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
  }

  .choice {
    min-height: 40px;
    padding: 8px 9px;
    font-size: 0.82rem;
    line-height: 1.18;
  }

  .log-panel {
    padding: 9px 11px 10px;
  }

  .log-heading {
    margin-bottom: 6px;
  }

  .small-button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .log {
    gap: 4px;
    min-height: 0;
    max-height: 3.9rem;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.28;
  }
}
