:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #101112;
  color: #f0efeb;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
.screen {
  position: relative;
  display: grid;
  grid-template-columns: 65% 35%;
  min-height: 100vh;
  min-height: 100svh;
}
.visual {
  display: grid;
  place-items: center;
  position: relative;
  background: #000;
  min-width: 0;
  overflow: hidden;
}
.visual img {
  position: absolute;
  width: 116%;
  height: 100%;
  object-fit: contain;
}
.panel {
  display: flex;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 4rem) clamp(1.5rem, 3.5vw, 4.75rem);
  background: #121314;
}
.scene { width: 100%; outline: none; }
h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.35vw, 3.6rem);
  font-weight: 550;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.prose { font-size: clamp(1rem, 1.08vw, 1.36rem); line-height: 1.44; }
.prose p { margin: 0 0 .66em; color: #cfceca; }
.prose p:last-child { margin-bottom: 0; }
.prose .dialogue { color: #f0efeb; }
.prose .dialogue + .dialogue { margin-top: -.17em; }
.speaker { font-weight: 680; }
.feedback {
  min-height: 1.25rem;
  margin-top: clamp(1rem, 2.2vh, 1.75rem);
  color: #e2e0da;
  font-size: .875rem;
  letter-spacing: .095em;
  line-height: 1.25rem;
  font-weight: 650;
}
.actions { display: grid; gap: .65rem; margin-top: clamp(1.35rem, 3.3vh, 2.5rem); }
.mode .actions { margin-top: clamp(1.7rem, 4vh, 3rem); }
button {
  width: 100%;
  min-height: 3.25rem;
  padding: .88rem 1.15rem;
  border: 1px solid #666765;
  border-radius: 2px;
  background: transparent;
  color: #f1f0ed;
  font: inherit;
  font-size: clamp(.875rem, .86vw, 1.0625rem);
  letter-spacing: .095em;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.choices button { text-align: left; letter-spacing: 0; font-size: clamp(1rem, 1vw, 1.25rem); font-weight: 450; }
@media (hover: hover) {
  button:hover { background: #282929; border-color: #b5b4b0; }
}
button:active { background: #deddd8; color: #151615; }
button:focus-visible { outline: 2px solid #f1f0ed; outline-offset: 3px; }
@media (min-width: 901px) and (max-height: 800px) {
  .panel { padding: 1.3rem clamp(1.4rem, 2.5vw, 3.25rem); }
  .prose { font-size: 1rem; line-height: 1.35; }
  .prose p { margin-bottom: .49em; }
  .actions { margin-top: 1.1rem; }
  button { min-height: 2.8rem; padding: .66rem 1rem; }
}
@media (max-width: 900px) and (orientation: portrait), (max-width: 650px) {
  .screen { grid-template-columns: 100%; grid-template-rows: auto 1fr; }
  .visual { height: min(43svh, 56.25vw); }
  .visual img { width: 100%; }
  .panel { align-items: flex-start; padding: 1.6rem clamp(1.35rem, 5.5vw, 3rem) 2rem; }
  .scene.mode { align-self: center; }
  .prose { line-height: 1.5; }
}
#totals:not([hidden]) {
  position: absolute;
  top: clamp(.75rem, 2.4vh, 1.75rem);
  right: clamp(1rem, 3.5vw, 4.75rem);
  display: flex;
  gap: clamp(.9rem, 1.8vw, 2rem);
  margin: 0;
  text-align: right;
}
#totals dt { color: #cbc9c5; font-size: .75rem; font-weight: 600; letter-spacing: .055em; }
#totals dd { margin: .18rem 0 0; font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (min-width: 901px), (min-width: 651px) and (orientation: landscape) {
  .screen:has(.scene:not(.mode)) .panel { padding-block: max(4.5rem, 7vh); }
}
@media (max-width: 900px) and (orientation: portrait), (max-width: 650px) {
  #totals:not([hidden]) {
    top: .65rem;
    right: .65rem;
    padding: .5rem .7rem;
    background: rgb(14 15 16 / 88%);
    border-radius: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
