/* ============================================================
   MOONWIRE / shell-v2
   The main game surface: one scene, one decision, one record.
   Scoped to .game-v2 so title and chapter views keep their own
   incumbent visual world until the next pass.
   ============================================================ */

@font-face {
  font-family: "MW Serif";
  src: url("../assets/fonts/moonwire-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --v2-ink: #0b0a09;
  --v2-ink-raised: #12100e;
  --v2-ink-soft: #171411;
  --v2-paper: #ede6d6;
  --v2-body: #d6cebe;
  --v2-muted: #aaa294;
  --v2-faint: #827b70;
  --v2-line: rgba(237, 230, 214, 0.16);
  --v2-line-soft: rgba(237, 230, 214, 0.09);
  --v2-signal: #d9ff43;
  --v2-human: #f17d9c;
  --v2-risk: #c86b52;
  --v2-serif: "MW Serif", "Songti SC", "SimSun", serif;
  --v2-sans: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --v2-data: "Bahnschrift", "Consolas", monospace;
}

.game-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--v2-ink);
  color: var(--v2-paper);
  font-family: var(--v2-sans);
  font-size: 16px;
  line-height: 1.55;
  isolation: isolate;
}

.game-v2 *,
.game-v2 *::before,
.game-v2 *::after {
  box-sizing: border-box;
}

.game-v2 button {
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.game-v2 button:focus-visible,
.game-v2 a:focus-visible {
  outline: 2px solid var(--v2-signal);
  outline-offset: 3px;
}

.game-v2 ::selection {
  color: var(--v2-ink);
  background: var(--v2-signal);
}

.v2-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.v2-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 58px);
  flex: 0 0 74px;
  padding: 0 clamp(18px, 3.4vw, 48px);
  border-bottom: 1px solid var(--v2-line);
  background: var(--v2-ink);
}

.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--v2-paper);
  text-decoration: none;
}

.v2-brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: var(--v2-signal);
}

.v2-brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.v2-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.v2-brand-copy b {
  font-family: var(--v2-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.v2-brand-copy small {
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.v2-day {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: var(--v2-muted);
  font-size: 12px;
  white-space: nowrap;
}

.v2-day-word {
  color: var(--v2-muted);
  font-size: 12px;
}

.v2-day > b {
  color: var(--v2-paper);
  font-family: var(--v2-data);
  font-size: 30px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.v2-day-total {
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
}

.v2-time {
  margin-left: 13px;
  padding-left: 14px;
  border-left: 1px solid var(--v2-line);
  color: var(--v2-body);
  font-family: var(--v2-data);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.v2-ap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 13px;
  color: var(--v2-faint);
  font-size: 12px;
}

.v2-ap-pips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.v2-ap-pips i {
  display: block;
  width: 17px;
  height: 3px;
  background: var(--v2-line);
}

.v2-ap-pips i.is-full {
  background: var(--v2-signal);
}

.v2-ap-pips i.is-empty {
  background: rgba(241, 125, 156, 0.28);
}

.v2-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-self: end;
}

.v2-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1;
  transition: color 140ms ease, background-color 140ms ease;
}

.v2-tool svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.v2-tool:hover {
  color: var(--v2-ink);
  background: var(--v2-paper);
}

.v2-tool:focus-visible {
  outline-offset: -2px;
}

.v2-unread {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--v2-human);
}

/* ------------------------------------------------------------
   Status ribbon
   ------------------------------------------------------------ */

.v2-ribbon {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 44px;
  padding: 0 clamp(18px, 3.4vw, 48px);
  border-bottom: 1px solid var(--v2-line);
  background: var(--v2-ink);
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.2;
}

.v2-vitals {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  white-space: nowrap;
}

.v2-vital b {
  margin-left: 4px;
  color: var(--v2-paper);
  font-family: var(--v2-data);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.v2-vital--human b {
  color: var(--v2-human);
}

.v2-vital--ticket b {
  color: var(--v2-body);
}

.v2-memory-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--v2-faint);
  white-space: nowrap;
}

.v2-memory-status b {
  color: var(--v2-body);
  font-family: var(--v2-data);
  font-size: 12px;
  font-weight: 400;
}

.v2-memory-marks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.v2-memory-marks i {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid var(--v2-line);
  border-radius: 50%;
  background: transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.v2-memory-marks i.is-on {
  border-color: var(--v2-human);
  background: var(--v2-human);
}

/* ------------------------------------------------------------
   Page / stage
   ------------------------------------------------------------ */

.v2-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 14px clamp(18px, 3.4vw, 48px) 18px;
}

.v2-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--v2-line);
  background: #080706;
  isolation: isolate;
}

.v2-stage-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.v2-moon-photo {
  position: absolute;
  top: -22%;
  right: -4%;
  width: min(64%, 940px);
  height: auto;
  max-width: none;
  opacity: 0.82;
  filter: saturate(0.44) contrast(1.1) brightness(0.84);
  mix-blend-mode: screen;
  transform: rotate(-3deg);
  transform-origin: 58% 50%;
  user-select: none;
  pointer-events: none;
}

.v2-stage-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 34% 54% at 73% 38%, rgba(237, 230, 214, 0.07), transparent 72%),
    radial-gradient(ellipse 28% 46% at 30% 82%, rgba(241, 125, 156, 0.045), transparent 74%);
}

.v2-location-geometry {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.v2-location-geometry::before,
.v2-location-geometry::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.v2-stage-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 10, 9, 0.97) 0%, rgba(11, 10, 9, 0.84) 30%, rgba(11, 10, 9, 0.16) 66%, rgba(11, 10, 9, 0.48) 100%),
    linear-gradient(0deg, rgba(11, 10, 9, 0.94) 0%, rgba(11, 10, 9, 0.16) 56%, transparent 76%);
}

.v2-stage.is-changing .v2-stage-copy,
.v2-stage.is-changing .v2-stage-bottom {
  animation: v2CopyIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.v2-stage.is-changing .v2-moon-photo {
  animation: v2MoonIn 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes v2CopyIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes v2MoonIn {
  from { opacity: 0.28; transform: rotate(-3deg) scale(1.025); }
  to { opacity: 0.68; transform: rotate(-3deg) scale(1); }
}

/* per-location mood: image crop, geometry, no fake city */

.game-v2 [data-location="h10"] .v2-moon-photo {
  top: -16%;
  right: -6%;
  width: 53%;
  opacity: 0.68;
  filter: saturate(0.32) contrast(1.1) brightness(0.9);
}

.game-v2 [data-location="h10"] .v2-location-geometry::before {
  top: 11%;
  right: 7%;
  bottom: 20%;
  left: 46%;
  border: 1px solid rgba(237, 230, 214, 0.24);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(237, 230, 214, 0.19) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(38% - 0.5px), rgba(237, 230, 214, 0.16) calc(38% - 0.5px) calc(38% + 0.5px), transparent calc(38% + 0.5px));
  box-shadow: inset 0 0 72px rgba(0, 0, 0, 0.34);
}

.game-v2 [data-location="h10"] .v2-location-geometry::after {
  left: 15%;
  bottom: 12%;
  width: 22%;
  height: 1px;
  background: var(--v2-human);
  box-shadow: 0 0 22px 7px rgba(241, 125, 156, 0.12);
  opacity: 0.62;
}

.game-v2 [data-location="transit"] .v2-moon-photo {
  top: -18%;
  right: 1%;
  width: 43%;
  opacity: 0.36;
  filter: saturate(0.25) contrast(1.05) brightness(0.72) blur(0.8px);
}

.game-v2 [data-location="transit"] .v2-location-geometry::before {
  top: 15%;
  right: 7%;
  bottom: 24%;
  left: 43%;
  border-top: 1px solid rgba(237, 230, 214, 0.2);
  border-bottom: 1px solid rgba(237, 230, 214, 0.2);
  background:
    linear-gradient(90deg, transparent 29%, rgba(237, 230, 214, 0.18) 29% calc(29% + 1px), transparent calc(29% + 1px) 71%, rgba(237, 230, 214, 0.18) 71% calc(71% + 1px), transparent calc(71% + 1px));
}

.game-v2 [data-location="transit"] .v2-location-geometry::after {
  left: 43%;
  right: 7%;
  top: 44%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 255, 67, 0.32), transparent);
  opacity: 0.6;
}

.game-v2 [data-location="afterlife"] .v2-moon-photo {
  top: -24%;
  right: -12%;
  width: 49%;
  opacity: 0.12;
  filter: blur(2px) saturate(0.2) brightness(0.75);
}

.game-v2 [data-location="afterlife"] .v2-stage-vignette {
  background:
    linear-gradient(90deg, rgba(11, 10, 9, 0.98) 0%, rgba(15, 11, 10, 0.9) 42%, rgba(18, 9, 10, 0.42) 100%),
    linear-gradient(0deg, rgba(11, 10, 9, 0.96) 0%, transparent 64%);
}

.game-v2 [data-location="afterlife"] .v2-location-geometry::before {
  left: 46%;
  right: 18%;
  top: 20%;
  height: 1px;
  background: var(--v2-human);
  box-shadow: 0 -34px 70px 24px rgba(241, 125, 156, 0.16);
  opacity: 0.75;
}

.game-v2 [data-location="afterlife"] .v2-location-geometry::after {
  left: 46%;
  right: 9%;
  bottom: 28%;
  height: 1px;
  background: rgba(237, 230, 214, 0.24);
}

.game-v2 [data-location="rooftop"] .v2-moon-photo {
  top: -23%;
  right: -2%;
  width: 70%;
  opacity: 0.93;
}

.game-v2 [data-location="rooftop"] .v2-location-geometry::before {
  left: 0;
  right: 0;
  bottom: 24%;
  height: 1px;
  background: rgba(237, 230, 214, 0.28);
  box-shadow:
    0 24px 0 rgba(237, 230, 214, 0.09),
    0 48px 0 rgba(237, 230, 214, 0.05);
}

.game-v2 [data-location="rooftop"] .v2-location-geometry::after {
  left: 5%;
  right: 5%;
  bottom: 17%;
  height: 9%;
  border-left: 1px solid rgba(237, 230, 214, 0.16);
  border-right: 1px solid rgba(237, 230, 214, 0.16);
  background:
    repeating-linear-gradient(90deg, transparent 0 8.8%, rgba(237, 230, 214, 0.15) 8.9% 9.1%, transparent 9.2% 17.7%);
}

.game-v2 [data-location="bd"] .v2-moon-photo {
  top: -32%;
  right: -20%;
  width: 88%;
  opacity: 0.46;
  filter: saturate(0.29) contrast(1.02) brightness(0.7) blur(0.5px);
}

.game-v2 [data-location="bd"] .v2-location-geometry::before {
  top: 43%;
  left: 61%;
  width: 20%;
  aspect-ratio: 1;
  border: 1px solid rgba(237, 230, 214, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(237, 230, 214, 0.025),
    0 0 0 82px rgba(241, 125, 156, 0.018);
}

.game-v2 [data-location="bd"] .v2-location-geometry::after {
  left: 0;
  right: 0;
  top: 43%;
  height: 1px;
  background: linear-gradient(90deg, transparent 35%, rgba(217, 255, 67, 0.24) 50%, transparent 65%);
}

.game-v2 [data-location="docks"] .v2-moon-photo {
  top: 0;
  right: 13%;
  width: 31%;
  opacity: 0.76;
  filter: saturate(0.36) contrast(1.06) brightness(0.72);
}

.game-v2 [data-location="docks"] .v2-location-geometry::before {
  left: 34%;
  right: 12%;
  top: 68%;
  height: 1px;
  background: rgba(237, 230, 214, 0.26);
}

.game-v2 [data-location="docks"] .v2-location-geometry::after {
  left: 47%;
  right: 29%;
  top: 72%;
  height: 20%;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(237, 230, 214, 0.12) 18% 18.3%, transparent 18.4% 77%, rgba(237, 230, 214, 0.12) 77% 77.3%, transparent 77.4%),
    radial-gradient(ellipse 34% 90% at 50% 5%, rgba(237, 230, 214, 0.12), transparent 72%);
}

.game-v2 [data-location="orbital"] .v2-moon-photo {
  top: -18%;
  right: 4%;
  width: 55%;
  opacity: 0.8;
}

.game-v2 [data-location="orbital"] .v2-location-geometry::before {
  left: 61%;
  bottom: 18%;
  width: 1px;
  height: 47%;
  background: rgba(217, 255, 67, 0.32);
}

.game-v2 [data-location="orbital"] .v2-location-geometry::after {
  left: 0;
  right: 0;
  bottom: 18%;
  height: 1px;
  background: rgba(237, 230, 214, 0.24);
}

/* stage header / route */

.v2-stage-top {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 16px 22px;
  background: linear-gradient(180deg, rgba(11, 10, 9, 0.97) 0%, rgba(11, 10, 9, 0.76) 56%, transparent 100%);
}

.v2-route-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.v2-route-scroll::-webkit-scrollbar {
  display: none;
}

.v2-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: start;
  min-width: 680px;
  height: 50px;
}

.v2-route::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--v2-line);
}

.v2-stage .station {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 0 8px 0 0;
  color: var(--v2-muted);
  background: transparent;
  text-align: left;
  transition: color 140ms ease;
}

.v2-stage .station:hover:not(:disabled) {
  color: var(--v2-paper);
}

.v2-stage .station-dot {
  display: block;
  width: 7px;
  height: 7px;
  margin: 9px 0 0;
  border: 1px solid var(--v2-line);
  border-radius: 50%;
  background: var(--v2-ink);
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.v2-stage .station-index,
.v2-stage .station-en {
  display: none;
}

.v2-stage .station-name {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-stage .station.is-locked {
  opacity: 0.56;
}

.v2-stage .station.is-visited .station-dot {
  border-color: rgba(237, 230, 214, 0.42);
}

.v2-stage .station.is-current {
  color: var(--v2-paper);
}

.v2-stage .station.is-current .station-dot {
  border-color: var(--v2-signal);
  background: var(--v2-signal);
  box-shadow: none;
  transform: scale(1.15);
}

.v2-stage .station.is-orbital .station-dot {
  width: 7px;
  height: 7px;
  margin-top: 9px;
  background: var(--v2-ink);
  box-shadow: none;
}

.v2-stage .station.is-orbital.is-current .station-dot {
  background: var(--v2-signal);
}

.v2-stage .station.is-current .station-name {
  color: var(--v2-paper);
}

.v2-stage .station.is-current .station-name::after {
  content: "";
  display: block;
  width: 16px;
  height: 1px;
  margin-top: 4px;
  background: var(--v2-signal);
}

.v2-stage .station.is-locked .station-dot {
  border-style: dashed;
}

.v2-stage .station.is-locked .station-dot::after {
  display: none;
}

.v2-stage .station-en.is-lock-label {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-stage .station.is-orbital .station-dot {
  border-radius: 50%;
}

.v2-stage-id {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.v2-stage-id #sceneClock {
  color: var(--v2-muted);
}

/* stage copy */

.v2-stage-copy {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 3.2vw, 42px);
  bottom: 72px;
  width: min(58%, 760px);
}

.v2-location-en {
  margin: 0 0 9px;
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.v2-stage-copy h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.38);
}

.v2-location-desc {
  max-width: 46ch;
  margin: 11px 0 0;
  color: var(--v2-body);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

.v2-stage-bottom {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 3.2vw, 42px);
  right: clamp(20px, 3.2vw, 42px);
  bottom: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.v2-stage-bottom blockquote {
  max-width: 48ch;
  color: var(--v2-muted);
  font-family: var(--v2-serif);
  font-size: 14px;
  line-height: 1.55;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.v2-stage-notes {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
}

.v2-stage-notes span + span {
  padding-left: 14px;
  border-left: 1px solid var(--v2-line);
}

.v2-stage-corners {
  display: none;
}

.v2-stage-corners i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(237, 230, 214, 0.22);
  border-style: solid;
}

.v2-stage-corners i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.v2-stage-corners i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.v2-stage-corners i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.v2-stage-corners i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* ------------------------------------------------------------
   Lucy line
   ------------------------------------------------------------ */

.v2-lucy-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 44px;
  width: 100%;
  padding: 0 2px;
  border-bottom: 1px solid var(--v2-line);
  color: var(--v2-muted);
  text-align: left;
}

.v2-lucy-name {
  flex: 0 0 auto;
  color: var(--v2-human);
  font-family: var(--v2-serif);
  font-size: 15px;
  font-weight: 600;
}

.v2-lucy-message {
  min-width: 0;
  overflow: hidden;
  color: var(--v2-body);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-lucy-line svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--v2-faint);
  transition: color 140ms ease, transform 140ms ease;
}

.v2-lucy-line:hover .v2-lucy-message {
  color: var(--v2-paper);
}

.v2-lucy-line:hover svg {
  color: var(--v2-signal);
  transform: translateX(3px);
}

/* ------------------------------------------------------------
   Decisions
   ------------------------------------------------------------ */

.v2-decisions {
  flex: 0 0 auto;
  padding-top: 11px;
}

.v2-decisions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 8px;
}

.v2-decisions-title {
  display: flex;
  align-items: baseline;
  gap: 17px;
  min-width: 0;
}

.v2-decisions-title h2 {
  margin: 0;
  color: var(--v2-paper);
  font-family: var(--v2-sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

#objectiveTitle {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-actions-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--v2-faint);
  font-size: 12px;
  white-space: nowrap;
}

.v2-actions-left b {
  color: var(--v2-signal);
  font-family: var(--v2-data);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.v2-decisions .action-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--v2-line);
}

.v2-decisions .action-grid:focus {
  outline: none;
}

.v2-decisions .action-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 15px;
  width: 100%;
  min-height: 66px;
  padding: 10px 0 11px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  background: transparent;
  color: var(--v2-body);
  text-align: left;
  clip-path: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.v2-decisions .action-card::before {
  display: none;
}

.v2-decisions .action-card:hover:not(:disabled) {
  background: rgba(237, 230, 214, 0.045);
  transform: none;
}

.v2-decisions .action-card:active:not(:disabled) {
  background: rgba(237, 230, 214, 0.08);
  transform: none;
}

.v2-decisions .action-card:focus-visible {
  outline: 2px solid var(--v2-signal);
  outline-offset: -2px;
}

.v2-decisions .action-card:disabled {
  opacity: 0.48;
  border-color: var(--v2-line-soft);
  background: transparent;
  cursor: not-allowed;
}

.v2-decisions .action-hotkey {
  display: block;
  align-self: center;
  padding-top: 1px;
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.v2-decisions .action-card:hover:not(:disabled) .action-hotkey {
  color: var(--v2-signal);
}

.v2-decisions .action-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.v2-decisions .action-title {
  display: block;
  color: var(--v2-paper);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.005em;
}

.v2-decisions .action-desc {
  display: -webkit-box;
  max-width: 78ch;
  margin-top: 3px;
  overflow: hidden;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v2-decisions .action-reason {
  display: block;
  margin-top: 3px;
  color: var(--v2-risk);
  font-size: 13px;
  line-height: 1.4;
}

.v2-decisions .action-card:disabled .action-desc {
  display: none;
}

.v2-decisions .action-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  align-self: center;
  flex: 0 0 auto;
  min-width: 86px;
  color: var(--v2-faint);
  text-align: right;
}

.v2-decisions .action-cost {
  color: var(--v2-muted);
  font-family: var(--v2-data);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.v2-decisions .action-cost b {
  color: var(--v2-body);
  font-weight: 400;
}

.v2-decisions .action-cost .cost-warn,
.v2-decisions .action-card.is-unaffordable .action-cost {
  color: var(--v2-risk);
}

.v2-decisions .action-arrow {
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 16px;
  line-height: 1;
  transition: color 140ms ease, transform 140ms ease;
}

.v2-decisions .action-card:hover:not(:disabled) .action-arrow {
  color: var(--v2-signal);
  transform: translateX(3px);
}

.v2-decisions .action-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0 11px 47px;
  border: 0;
  border-bottom: 1px solid var(--v2-line-soft);
  background: transparent;
  color: var(--v2-faint);
  clip-path: none;
  font-size: 13px;
}

.v2-decisions .action-placeholder::after {
  display: none;
}

.v2-decisions .action-placeholder .action-title {
  color: var(--v2-faint);
  font-size: 14px;
  font-weight: 400;
}

.v2-decisions .action-placeholder .action-desc {
  color: var(--v2-faint);
  font-size: 12px;
  -webkit-line-clamp: 1;
}

.v2-decisions .action-empty {
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  color: var(--v2-faint);
  font-size: 14px;
}

.v2-decisions-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 43px;
  padding-top: 8px;
}

.v2-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--v2-faint);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-save i {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--v2-signal);
}

.v2-save.is-error {
  color: var(--v2-risk);
}

.v2-save.is-error i {
  background: var(--v2-risk);
}

.v2-end-day {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--v2-line);
  color: var(--v2-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.v2-end-day:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.v2-end-day.is-ready {
  border-color: rgba(217, 255, 67, 0.52);
  color: var(--v2-signal);
}

.v2-end-day.is-ready:hover {
  color: var(--v2-ink);
  background: var(--v2-signal);
  border-color: var(--v2-signal);
}

.v2-end-day.is-final {
  color: var(--v2-ink);
  background: var(--v2-signal);
  border-color: var(--v2-signal);
}

.v2-end-day.is-final:hover {
  background: #efff8d;
  border-color: #efff8d;
}

.v2-end-day-arrow {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: currentColor;
  opacity: 0.72;
}

/* ------------------------------------------------------------
   Archive dialog
   ------------------------------------------------------------ */

.v2-archive {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--v2-line);
  background: var(--v2-ink-raised);
  color: var(--v2-body);
  font-family: var(--v2-sans);
  font-size: 16px;
  line-height: 1.65;
}

.v2-archive[open] {
  display: flex;
  flex-direction: column;
  animation: v2ArchiveIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.v2-archive::backdrop {
  background: rgba(5, 4, 3, 0.62);
}

@keyframes v2ArchiveIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

.v2-archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--v2-line);
}

.v2-archive-kicker {
  margin: 0 0 5px;
  color: var(--v2-faint);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.v2-archive-head h2 {
  margin: 0;
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.v2-archive-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--v2-line);
  color: var(--v2-muted);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.v2-archive-close:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.v2-archive-close svg {
  width: 19px;
  height: 19px;
}

.v2-archive-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--v2-line) transparent;
}

.v2-archive-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--v2-line-soft);
}

.v2-archive-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.v2-archive-section-head h3 {
  margin: 0;
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.v2-archive-index {
  display: none;
}

.v2-record-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--v2-muted);
  font-size: 13px;
}

.v2-record-line b {
  margin-right: 14px;
  color: var(--v2-paper);
  font-family: var(--v2-data);
  font-size: 18px;
  font-weight: 400;
}

.v2-record-copy {
  margin: 4px 0 0;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.65;
}

.v2-record-copy + .v2-record-copy {
  margin-top: 9px;
}

.v2-memory-list {
  display: flex;
  flex-direction: column;
  margin-top: 17px;
  border-top: 1px solid var(--v2-line-soft);
}

.v2-memory-chip {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--v2-line-soft);
  color: var(--v2-muted);
  background: transparent;
  text-align: left;
  clip-path: none;
}

.v2-memory-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.v2-memory-chip.is-unlocked {
  color: var(--v2-paper);
  opacity: 1;
  cursor: pointer;
}

.v2-memory-mark {
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--v2-line);
  border-radius: 50%;
}

.v2-memory-chip.is-unlocked .v2-memory-mark {
  border-color: var(--v2-human);
  background: var(--v2-human);
}

.v2-memory-name {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-memory-chip .memory-state {
  color: var(--v2-faint);
  font-size: 12px;
  line-height: 1;
}

.v2-memory-chip.is-unlocked .memory-state {
  color: var(--v2-human);
}

.v2-comms-feed {
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--v2-line) transparent;
}

.v2-comms-feed .msg {
  display: block;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--v2-line-soft);
  animation: none;
}

.v2-comms-feed .msg:first-child {
  padding-top: 0;
}

.v2-comms-feed .msg-avatar {
  display: none;
}

.v2-comms-feed .msg-body {
  max-width: none;
}

.v2-comms-feed .msg-who {
  margin-bottom: 3px;
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  letter-spacing: 0;
}

.v2-comms-feed .msg-who b {
  color: var(--v2-human);
  font-family: var(--v2-sans);
  font-size: 13px;
  font-weight: 500;
}

.v2-comms-feed .msg--you .msg-who {
  justify-content: flex-start;
}

.v2-comms-feed .msg--you .msg-who b {
  color: var(--v2-paper);
}

.v2-comms-feed .msg-bubble {
  padding: 0;
  border: 0;
  color: var(--v2-body);
  background: transparent;
  font-size: 16px;
  line-height: 1.65;
}

.v2-comms-feed .msg--you .msg-bubble {
  color: var(--v2-body);
}

.v2-comms-feed .msg-time {
  margin-top: 4px;
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
  opacity: 1;
}

.v2-comms-feed .msg--system {
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--v2-line-soft);
  color: var(--v2-faint);
  background: transparent;
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.5;
}

.v2-comms-feed .msg--system .msg-who {
  color: var(--v2-faint);
}

.v2-objective-copy {
  margin: 0 0 10px;
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.6;
}

.v2-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v2-checks .objective-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--v2-line-soft);
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.2;
}

.v2-checks .objective-check i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.v2-checks .objective-check.is-done {
  border-color: rgba(217, 255, 67, 0.24);
  color: var(--v2-signal);
}

.v2-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  border-top: 1px solid var(--v2-line-soft);
}

.v2-data-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--v2-line-soft);
}

.v2-data-grid span,
.v2-data-grid small {
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.3;
}

.v2-data-grid b {
  color: var(--v2-paper);
  font-family: var(--v2-data);
  font-size: 14px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.v2-data-grid small {
  grid-column: 1 / -1;
  color: var(--v2-faint);
  font-size: 12px;
}

.v2-data-grid #bioState.is-warn {
  color: var(--v2-risk);
}

.v2-data-grid .chrome-pips {
  grid-column: 1 / -1;
  display: flex;
  gap: 2px;
  margin-top: 1px;
}

.v2-data-grid .chrome-pips i {
  display: block;
  width: 8px;
  height: 3px;
  background: var(--v2-line);
}

.v2-data-grid .chrome-pips i.is-on {
  background: var(--v2-human);
}

.v2-escape-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--v2-muted);
  font-size: 13px;
}

.v2-escape-line b {
  margin-right: 14px;
  color: var(--v2-paper);
  font-family: var(--v2-data);
  font-size: 14px;
  font-weight: 400;
}

.v2-escape-line b.is-complete {
  color: var(--v2-signal);
}

.v2-escape-track {
  display: block;
  width: 0;
  max-width: 100%;
  height: 2px;
  margin-top: 12px;
  background: var(--v2-signal);
  transition: width 260ms ease;
}

.v2-archive .v2-record-copy {
  margin-top: 10px;
}

/* ------------------------------------------------------------
   Existing moment modal, retuned to the V2 record
   ------------------------------------------------------------ */

.modal-overlay:has(.modal--moment) {
  align-items: flex-end;
  padding: 16px;
  background: rgba(5, 4, 3, 0.56);
  backdrop-filter: none;
}

.modal--moment {
  width: min(900px, 100%);
  max-height: min(86svh, 760px);
  border: 1px solid var(--v2-line);
  border-radius: 0;
  background: var(--v2-ink-raised);
  clip-path: none;
  color: var(--v2-body);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  font-family: var(--v2-sans);
}

.modal--moment .moment-art {
  display: none;
}

.modal--moment .modal-close {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-color: var(--v2-line);
  color: var(--v2-muted);
  background: transparent;
}

.modal--moment .modal-close:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.modal--moment .moment-main {
  max-height: none;
  padding: 26px 28px 18px;
}

.modal--moment .moment-title h2 {
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.modal--moment .moment-title span {
  display: none;
}

.modal--moment .moment-lines {
  gap: 12px;
  margin-top: 18px;
}

.modal--moment .moment-line {
  color: var(--v2-body);
  font-size: 15px;
  line-height: 1.8;
}

.modal--moment .moment-line--lucy,
.modal--moment .moment-line--you {
  border-left: 0;
  padding-left: 0;
  color: var(--v2-paper);
}

.modal--moment .line-who {
  color: var(--v2-human);
  font-family: var(--v2-sans);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.modal--moment .moment-line--you .line-who {
  color: var(--v2-signal);
}

.modal--moment .moment-line--system {
  border: 0;
  padding: 8px 0;
  border-top: 1px solid var(--v2-line-soft);
  color: var(--v2-faint);
  background: transparent;
  font-family: var(--v2-sans);
  font-size: 12px;
}

.modal--moment .reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 17px;
  padding-top: 13px;
  border-color: var(--v2-line);
}

.modal--moment .reward-chip {
  border: 0;
  padding: 0;
  color: var(--v2-muted);
  font-family: var(--v2-sans);
  font-size: 12px;
}

.modal--moment .reward-chip--pink {
  color: var(--v2-human);
}

.modal--moment .reward-chip--cyan {
  color: var(--v2-signal);
}

.modal--moment .reward-chip--red {
  color: var(--v2-risk);
}

.modal--moment .memory-unlock {
  border-color: var(--v2-line);
  background: transparent;
  clip-path: none;
}

.modal--moment .memory-unlock-top {
  color: var(--v2-human);
  font-family: var(--v2-sans);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.modal--moment .memory-unlock h4 {
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: 19px;
}

.modal--moment .memory-unlock p {
  color: var(--v2-muted);
  font-size: 13px;
}

.modal--moment .modal-actions {
  padding: 0 28px 24px;
}

.modal--moment .modal-btn {
  min-height: 44px;
  border-color: var(--v2-line);
  color: var(--v2-paper);
  background: transparent;
  font-family: var(--v2-sans);
  font-size: 14px;
}

.modal--moment .modal-btn:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.modal--moment .modal-btn--primary {
  border-color: var(--v2-signal);
  color: var(--v2-ink);
  background: var(--v2-signal);
}

.modal--moment .modal-btn--primary:hover {
  background: #efff8d;
  border-color: #efff8d;
}

/* Keep transient status off the decision area. */
.toast-stack {
  top: 128px;
  right: clamp(16px, 3.4vw, 48px);
  bottom: auto;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  border-color: var(--v2-line);
  background: var(--v2-ink-raised);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  color: var(--v2-body);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.5;
}

.toast strong,
.toast b {
  color: var(--v2-paper);
}

.toast.is-error {
  border-color: rgba(200, 107, 82, 0.5);
  color: var(--v2-risk);
}

/* ------------------------------------------------------------
   Memory reading pane
   ------------------------------------------------------------ */

.modal--medium:has(.moment-art[data-scene]) {
  width: min(680px, 100%);
  border: 1px solid var(--v2-line);
  border-radius: 0;
  background: var(--v2-ink-raised);
  color: var(--v2-body);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.44);
  clip-path: none;
  font-family: var(--v2-sans);
}

.modal--medium:has(.moment-art[data-scene]) .moment-art {
  display: none;
}

.modal--medium:has(.moment-art[data-scene]) .modal-close {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-color: var(--v2-line);
  color: var(--v2-muted);
  background: transparent;
}

.modal--medium:has(.moment-art[data-scene]) .moment-main {
  padding: 26px 28px 12px;
}

.modal--medium:has(.moment-art[data-scene]) .moment-title h2 {
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.modal--medium:has(.moment-art[data-scene]) .moment-title span {
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.modal--medium:has(.moment-art[data-scene]) .moment-line {
  color: var(--v2-body);
  font-size: 16px;
  line-height: 1.8;
}

.modal--medium:has(.moment-art[data-scene]) .reward-row {
  display: flex;
  gap: 0 16px;
  margin-top: 18px;
  padding-top: 13px;
  border-color: var(--v2-line);
}

.modal--medium:has(.moment-art[data-scene]) .reward-chip {
  border: 0;
  padding: 0;
  color: var(--v2-muted);
  font-size: 12px;
}

.modal--medium:has(.moment-art[data-scene]) .reward-chip--pink {
  color: var(--v2-human);
}

.modal--medium:has(.moment-art[data-scene]) .reward-chip--cyan {
  color: var(--v2-signal);
}

.modal--medium:has(.moment-art[data-scene]) .modal-actions {
  padding: 0 28px 24px;
}

.modal--medium:has(.moment-art[data-scene]) .modal-btn {
  min-height: 44px;
  border-color: var(--v2-line);
  color: var(--v2-paper);
  background: transparent;
  font-family: var(--v2-sans);
  font-size: 14px;
}

.modal--medium:has(.moment-art[data-scene]) .modal-btn:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

/* ------------------------------------------------------------
   The one authored day transition
   ------------------------------------------------------------ */

.day-transition {
  background: var(--v2-ink);
  color: var(--v2-paper);
  font-family: var(--v2-sans);
}

.day-transition::before,
.day-transition::after {
  display: none;
}

.day-transition-inner {
  width: min(620px, calc(100vw - 56px));
  text-align: left;
  animation: v2DayIn 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.day-transition-kicker {
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
}

.day-transition h2 {
  margin-top: 15px;
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: clamp(7rem, 15vw, 12rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.055em;
}

.day-transition h2 span {
  color: var(--v2-paper);
}

.day-transition h2 small {
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 0.16em;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.day-transition p {
  max-width: 42ch;
  margin-top: 20px;
  color: var(--v2-body);
  font-family: var(--v2-serif);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

.day-transition-line {
  width: 100%;
  height: 1px;
  margin-top: 26px;
  background: linear-gradient(90deg, var(--v2-signal), transparent);
}

@keyframes v2DayIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   Final-choice gate, re-skinned to match V2
   ------------------------------------------------------------ */

.modal-overlay:has(.modal--final) {
  padding: 0;
  background: var(--v2-ink);
  backdrop-filter: none;
}

.modal--final {
  position: relative;
  width: 100%;
  height: 100svh;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--v2-ink);
  color: var(--v2-body);
  box-shadow: none;
  clip-path: none;
  font-family: var(--v2-sans);
  font-size: 16px;
}

.final-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.final-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 10, 9, 0.98) 0%, rgba(11, 10, 9, 0.9) 42%, rgba(11, 10, 9, 0.38) 100%),
    linear-gradient(0deg, rgba(11, 10, 9, 0.92) 0%, transparent 64%);
}

.final-atmosphere img {
  position: absolute;
  top: 7%;
  right: -12%;
  width: min(67vw, 900px);
  height: auto;
  max-width: none;
  opacity: 0.3;
  filter: saturate(0.3) contrast(1.08) brightness(0.82);
  mix-blend-mode: screen;
  transform: rotate(-3deg);
  user-select: none;
}

.modal--final .modal-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-color: var(--v2-line);
  color: var(--v2-muted);
  background: transparent;
}

.modal--final .modal-close:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.modal--final .final-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  height: 100%;
  max-height: none;
  margin: 0 auto;
  padding: clamp(34px, 6vh, 68px) clamp(24px, 6vw, 88px) 28px;
  overflow-y: auto;
}

.modal--final .content-modal-kicker {
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.modal--final .final-head {
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 30px;
}

.modal--final .final-head h2 {
  margin-top: 7px;
  color: var(--v2-paper);
  font-family: var(--v2-serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.modal--final .final-head p {
  max-width: 55ch;
  margin-top: 10px;
  color: var(--v2-muted);
  font-size: 14px;
  line-height: 1.75;
}

.modal--final .final-checks {
  padding: 13px 0;
  border: 0;
  border-top: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
  background: transparent;
}

.modal--final .final-checks h3 {
  color: var(--v2-faint);
  font-family: var(--v2-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.modal--final .final-check {
  padding: 5px 0;
  border-color: var(--v2-line-soft);
  color: var(--v2-muted);
  font-size: 12px;
}

.modal--final .final-check b {
  color: var(--v2-faint);
  font-family: var(--v2-data);
  font-size: 12px;
}

.modal--final .final-check.is-ok {
  color: var(--v2-body);
}

.modal--final .final-check.is-ok b {
  color: var(--v2-signal);
}

.modal--final .final-check.is-bad b {
  color: var(--v2-risk);
}

.modal--final .final-choices {
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--v2-line);
}

.modal--final .final-choice {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  background: transparent;
}

.modal--final .final-choice:hover:not(:disabled) {
  border-color: var(--v2-line);
  background: rgba(237, 230, 214, 0.045);
  transform: none;
}

.modal--final .final-choice:focus-visible {
  outline: 2px solid var(--v2-signal);
  outline-offset: -2px;
}

.modal--final .final-choice:disabled {
  opacity: 0.45;
}

.modal--final .final-choice-index {
  display: none;
}

.modal--final .final-choice-copy b {
  color: var(--v2-paper);
  font-size: 17px;
  font-weight: 500;
}

.modal--final .final-choice-copy small {
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.55;
}

.modal--final .final-choice-mark {
  color: var(--v2-faint);
  font-size: 17px;
}

.modal--final .final-choice:hover:not(:disabled) .final-choice-mark {
  color: var(--v2-signal);
}

.modal--final .final-choice.is-armed {
  border-color: rgba(217, 255, 67, 0.42);
  background: rgba(217, 255, 67, 0.045);
}

.modal--final .final-choice.is-armed .final-choice-mark {
  color: var(--v2-signal);
}

.modal--final .final-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
}

.modal--final .final-confirm[hidden] {
  display: none;
}

.modal--final .final-confirm p {
  max-width: 62ch;
  margin: 0;
  color: var(--v2-body);
  font-size: 14px;
  line-height: 1.6;
}

.modal--final .final-confirm-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.modal--final .final-confirm .modal-btn {
  min-height: 40px;
  padding: 8px 13px;
  border-color: var(--v2-line);
  color: var(--v2-paper);
  background: transparent;
  font-size: 13px;
}

.modal--final .final-confirm .modal-btn:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

.modal--final .final-confirm .modal-btn--primary {
  border-color: var(--v2-signal);
  color: var(--v2-ink);
  background: var(--v2-signal);
}

.modal--final .final-confirm .modal-btn--primary:hover {
  border-color: #efff8d;
  background: #efff8d;
}

.modal--final .final-footer {
  margin-top: 15px;
  padding-top: 13px;
  border-color: var(--v2-line);
}

.modal--final .final-footer p {
  color: var(--v2-muted);
  font-size: 12px;
}

.modal--final .modal-btn {
  min-height: 40px;
  border-color: var(--v2-line);
  color: var(--v2-paper);
  background: transparent;
  font-family: var(--v2-sans);
  font-size: 13px;
}

.modal--final .modal-btn:hover {
  color: var(--v2-ink);
  border-color: var(--v2-paper);
  background: var(--v2-paper);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1180px) {
  .v2-header {
    gap: 22px;
  }

  .v2-stage-copy {
    width: min(58%, 610px);
  }

  .v2-decisions-title {
    gap: 13px;
  }

  .v2-decisions-title h2 {
    font-size: 18px;
  }

  #objectiveTitle {
    font-size: 12px;
  }

  .v2-decisions .action-card {
    padding-top: 7px;
    padding-bottom: 8px;
  }
}

@media (max-width: 900px) {
  .game-v2 {
    height: 100dvh;
    min-height: 560px;
  }

  .v2-header {
    flex-basis: 62px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 16px;
  }

  .v2-brand-copy small {
    display: none;
  }

  .v2-day {
    justify-self: start;
    gap: 3px;
  }

  .v2-day > b {
    font-size: 24px;
  }

  .v2-day-total,
  .v2-time {
    display: none;
  }

  .v2-ap {
    margin-left: 6px;
  }

  .v2-ap > span:first-child {
    display: none;
  }

  .v2-brand-copy b {
    font-size: 16px;
  }

  .v2-tool {
    position: relative;
    gap: 0;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .v2-tool::before {
    content: "";
    position: absolute;
    inset: 0;
  }

  .v2-tool > span {
    display: none;
  }

  .v2-tool svg {
    width: 19px;
    height: 19px;
  }

  .v2-ribbon {
    flex-basis: 40px;
    gap: 10px;
    padding: 0 16px;
  }

  .v2-vitals {
    gap: 11px;
    font-size: 12px;
    overflow: hidden;
  }

  .v2-vital b {
    margin-left: 3px;
    font-size: 13px;
  }

  .v2-vital--ticket {
    display: none;
  }

  .v2-memory-status {
    font-size: 12px;
  }

  .v2-page {
    padding: 10px 12px 12px;
  }

  .v2-stage {
    min-height: 270px;
  }

  .v2-stage-top {
    padding: 9px 10px 13px;
  }

  .v2-route {
    min-width: 615px;
    height: 44px;
  }

  .v2-stage .station-dot {
    margin-top: 8px;
  }

  .v2-stage .station-name {
    margin-top: 4px;
    font-size: 12px;
  }

  .v2-stage .station-en.is-lock-label {
    font-size: 12px;
  }

  .v2-stage-id {
    display: flex;
    gap: 0;
    font-size: 12px;
  }

  .v2-stage-id #sceneCode {
    display: none;
  }

  .v2-stage-copy {
    left: 18px;
    bottom: 53px;
    width: min(92%, 560px);
  }

  .v2-location-en {
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: 0.05em;
  }

  .v2-stage-copy h1 {
    max-width: 100%;
    font-size: clamp(1.75rem, 6.2vw, 2.5rem);
  }

  .v2-location-desc {
    max-width: 42ch;
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .v2-stage-bottom {
    left: 18px;
    right: 18px;
    bottom: 12px;
  }

  .v2-stage-bottom blockquote {
    max-width: 55ch;
    font-size: 13px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .v2-stage-notes {
    font-size: 12px;
  }

  .v2-stage-notes span + span {
    display: none;
  }

  .v2-lucy-line {
    flex-basis: 40px;
    gap: 9px;
  }

  .v2-lucy-name {
    font-size: 14px;
  }

  .v2-lucy-message {
    font-size: 13px;
  }

  .v2-decisions {
    padding-top: 8px;
  }

  .v2-decisions-head {
    gap: 10px;
    padding-bottom: 5px;
  }

  .v2-decisions-title {
    display: block;
    min-width: 0;
  }

  .v2-decisions-title h2 {
    font-size: 18px;
  }

  #objectiveTitle {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.35;
  }

  .v2-actions-left {
    font-size: 12px;
  }

  .v2-actions-left b {
    font-size: 20px;
  }

  .v2-decisions .action-card {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 0 10px;
    min-height: 65px;
    padding: 8px 0 9px;
  }

  .v2-decisions .action-hotkey {
    font-size: 12px;
  }

  .v2-decisions .action-title {
    font-size: 16px;
  }

  .v2-decisions .action-desc {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }

  .v2-decisions .action-reason {
    font-size: 12px;
  }

  .v2-decisions .action-meta {
    min-width: 72px;
  }

  .v2-decisions .action-cost {
    font-size: 12px;
    white-space: normal;
  }

  .v2-decisions .action-arrow {
    font-size: 14px;
  }

  .v2-decisions-foot {
    gap: 10px;
    min-height: 40px;
    padding-top: 6px;
  }

  .v2-save {
    max-width: 47%;
    font-size: 12px;
  }

  .v2-end-day {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .toast-stack {
    top: 104px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .v2-archive {
    width: 100vw;
    border-left: 0;
  }

  .v2-archive-head {
    padding: 18px 18px 13px;
  }

  .v2-archive-head h2 {
    font-size: 23px;
  }

  .v2-archive-section {
    padding: 16px 18px;
  }

  .v2-archive-section-head h3 {
    font-size: 17px;
  }

  .v2-archive-close {
    width: 44px;
    height: 44px;
  }

  .modal--moment .modal-close,
  .modal--final .modal-close {
    width: 44px;
    height: 44px;
  }

  .modal-overlay:has(.modal--moment) {
    align-items: flex-end;
    padding: 0;
  }

  .modal--moment {
    width: 100%;
    max-height: 88svh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .modal--moment .moment-main {
    padding: 22px 18px 14px;
  }

  .modal--moment .modal-actions {
    padding: 0 18px 18px;
  }

  .modal--moment .moment-line {
    font-size: 14px;
  }

  .modal--medium:has(.moment-art[data-scene]) .modal-close {
    width: 44px;
    height: 44px;
  }

  .modal--medium:has(.moment-art[data-scene]) .moment-main {
    padding: 22px 18px 10px;
  }

  .modal--medium:has(.moment-art[data-scene]) .modal-actions {
    padding: 0 18px 18px;
  }

  .modal-overlay:has(.modal--final) {
    padding: 12px;
  }

  .modal--final .final-body {
    max-height: calc(100svh - 24px);
    padding: 24px 20px 20px;
  }

  .final-atmosphere img {
    top: 2%;
    right: -28%;
    width: min(92vw, 700px);
    opacity: 0.2;
  }

  .modal--final .final-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .modal--final .final-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .modal--final .final-checks h3 {
    grid-column: 1 / -1;
  }

  .modal--final .final-choice-copy b {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .v2-header {
    flex-basis: 56px;
    padding: 0 11px;
    gap: 6px;
  }

  .v2-brand-mark {
    width: 24px;
    height: 24px;
  }

  .v2-brand {
    gap: 7px;
  }

  .v2-brand-copy b {
    font-size: 14px;
  }

  .v2-day {
    gap: 2px;
  }

  .v2-day > b {
    font-size: 21px;
  }

  .v2-day-word {
    font-size: 12px;
  }

  .v2-ap {
    gap: 4px;
    margin-left: 3px;
  }

  .v2-ap-pips {
    gap: 3px;
  }

  .v2-ap-pips i {
    width: 12px;
  }

  .v2-tool {
    min-width: 44px;
    height: 44px;
  }

  .v2-tool svg {
    width: 19px;
    height: 19px;
  }

  .v2-ribbon {
    flex-basis: 38px;
    padding: 0 12px;
  }

  .v2-vitals {
    gap: 8px;
    font-size: 12px;
  }

  .v2-vital b {
    font-size: 13px;
  }

  .v2-memory-status {
    gap: 5px;
    font-size: 12px;
  }

  .v2-memory-status b {
    font-size: 12px;
  }

  .v2-memory-marks i {
    width: 5px;
    height: 5px;
  }

  .v2-page {
    padding: 8px 10px 10px;
  }

  .v2-stage {
    min-height: 248px;
  }

  .v2-stage-copy {
    left: 15px;
    bottom: 46px;
  }

  .v2-location-en {
    font-size: 12px;
  }

  .v2-stage-copy h1 {
    font-size: 30px;
  }

  .v2-location-desc {
    font-size: 14px;
    max-width: 36ch;
  }

  .v2-stage-bottom {
    left: 15px;
    right: 15px;
    bottom: 10px;
  }

  .v2-stage-bottom blockquote {
    font-size: 12px;
  }

  .v2-stage-notes {
    display: none;
  }

  .v2-lucy-line {
    flex-basis: 38px;
  }

  .v2-lucy-message {
    max-width: 100%;
  }

  .v2-decisions .action-card {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 0 8px;
    min-height: 62px;
    padding: 7px 0 8px;
  }

  .v2-decisions .action-title {
    font-size: 16px;
  }

  .v2-decisions .action-desc {
    font-size: 14px;
  }

  .v2-decisions .action-meta {
    min-width: 68px;
  }

  .v2-decisions .action-cost {
    font-size: 12px;
    white-space: normal;
  }

  .v2-decisions .action-reason {
    font-size: 12px;
  }

  .v2-decisions-title h2 {
    font-size: 18px;
  }

  #objectiveTitle {
    font-size: 14px;
  }

  .v2-actions-left b {
    font-size: 20px;
  }

  .v2-decisions-foot {
    gap: 6px;
  }

  .v2-save {
    font-size: 12px;
  }

  .v2-end-day {
    min-height: 44px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .v2-data-grid {
    grid-template-columns: 1fr;
  }

  .modal-overlay:has(.modal--final) {
    padding: 0;
  }

  .modal--final {
    min-height: 100svh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .modal--final .final-body {
    max-height: 100svh;
    padding: 20px 16px 18px;
  }

  .modal--final .final-head h2 {
    font-size: 30px;
  }

  .modal--final .final-checks {
    grid-template-columns: 1fr;
  }

  .modal--final .final-confirm {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .modal--final .final-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal--final .final-confirm .modal-btn {
    min-height: 44px;
  }

  .modal--final .final-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .modal--final .final-footer .modal-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* The 1024×768 class of screens needs a slightly tighter chrome budget
   so the scene keeps its 300px floor and the end-day control stays in view. */
@media (min-width: 901px) and (max-width: 1180px) and (max-height: 820px) {
  .v2-header {
    flex-basis: 64px;
  }

  .v2-ribbon {
    flex-basis: 38px;
  }

  .v2-page {
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .v2-stage {
    min-height: 300px;
  }

  .v2-lucy-line {
    flex-basis: 38px;
  }

  .v2-decisions {
    padding-top: 6px;
  }

  .v2-decisions-head {
    padding-bottom: 4px;
  }

  .v2-decisions-foot {
    min-height: 44px;
    padding-top: 0;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .v2-header {
    flex-basis: 64px;
  }

  .v2-page {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .v2-stage-copy {
    bottom: 58px;
  }

  .v2-stage-copy h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
  }

  .v2-decisions {
    padding-top: 7px;
  }

  .v2-lucy-line {
    flex-basis: 39px;
  }

  .v2-decisions .action-card {
    min-height: 60px;
    padding-top: 7px;
    padding-bottom: 8px;
  }

  .v2-decisions .action-desc {
    -webkit-line-clamp: 1;
  }

  .v2-decisions-foot {
    min-height: 38px;
    padding-top: 5px;
  }
}

/* Reflow at 200% zoom / short viewports: let the page grow vertically
   instead of clipping actions out of reach. */
@media (max-height: 760px) {
  .game-v2 {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .v2-page {
    flex: 0 0 auto;
    min-height: 0;
  }

  .v2-stage {
    flex: 0 0 auto;
    min-height: 300px;
  }

  .v2-end-day {
    margin-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-v2 *,
  .game-v2 *::before,
  .game-v2 *::after,
  .day-transition-inner {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
