:root {
  --ink: #19150f;
  --ink-soft: #4c4337;
  --paper: #f2ead8;
  --paper-deep: #dfd2ba;
  --cream: #fff8e8;
  --ember: #e85f2a;
  --ember-dark: #a7331b;
  --gold: #e5a83b;
  --indigo: #1d2b3c;
  --green: #4f7258;
  --danger: #b32722;
  --line: rgba(25, 21, 15, 0.18);
  --shadow: 0 20px 60px rgba(8, 7, 5, 0.26);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #17140f;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #17140f;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.noise {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    repeating-radial-gradient(circle at 30% 20%, transparent 0 1px, rgba(255,255,255,.08) 1px 2px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.03) 0 1px, transparent 1px 4px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: overlay;
}

.landing-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--cream);
  isolation: isolate;
}

.landing-art,
.ending-backdrop {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    url("assets/campus-stall-hero.png") center 48% / cover no-repeat,
    #1a2430;
  transform: scale(1.015);
}

.landing-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 12, 14, 0.94) 0%, rgba(11, 12, 14, 0.78) 39%, rgba(11, 12, 14, 0.18) 72%, rgba(11, 12, 14, 0.5) 100%),
    linear-gradient(0deg, rgba(12, 10, 8, 0.8) 0%, transparent 45%, rgba(12, 10, 8, 0.35) 100%);
}

.landing-nav,
.game-header,
.ending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.landing-nav {
  position: absolute;
  top: 0;
  left: 0;
  padding: 26px clamp(22px, 5vw, 72px);
}

.brand-mark,
.logo-button {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand-seal {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--cream);
  background: var(--ember-dark);
  border: 1px solid rgba(255,255,255,.38);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 3px var(--ember-dark), inset 0 0 0 4px rgba(255,255,255,.26);
}

.text-button {
  padding: 8px 0;
  color: rgba(255, 248, 232, 0.76);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.28);
  cursor: pointer;
}

.text-button:hover {
  color: var(--cream);
}

.landing-content {
  width: min(690px, calc(100% - 44px));
  margin-left: clamp(22px, 8vw, 128px);
  padding-top: max(138px, 17vh);
  padding-bottom: 136px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: currentColor;
}

.landing-content h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.95;
  text-shadow: 0 3px 28px rgba(0,0,0,.3);
}

.landing-content h1 em {
  color: #ff9a51;
  font-style: normal;
}

.landing-lead {
  max-width: 620px;
  margin: 30px 0 0;
  color: rgba(255, 248, 232, 0.82);
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.landing-actions,
.ending-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.primary-button,
.secondary-button,
.continue-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 0 24px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.05em;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.primary-button {
  color: var(--cream);
  background: var(--ember);
  box-shadow: 6px 6px 0 rgba(126, 37, 17, 0.7);
}

.primary-button:hover,
.continue-button:hover {
  background: #f5713b;
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(126, 37, 17, 0.7);
}

.secondary-button {
  color: inherit;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
}

.secondary-button:hover {
  background: rgba(255,255,255,.15);
}

.landing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 32px;
  color: rgba(255, 248, 232, 0.55);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.landing-meta span + span::before {
  margin: 0 12px;
  content: "·";
  color: var(--ember);
}

.landing-quote {
  position: absolute;
  right: clamp(22px, 5vw, 72px);
  bottom: 34px;
  width: min(340px, calc(100% - 44px));
  padding: 16px 20px;
  background: rgba(13, 16, 20, 0.72);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(13px);
}

.quote-label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.landing-quote p {
  margin: 8px 0 2px;
  font-family: var(--serif);
  font-size: 15px;
}

.typing-dots {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: flex;
  gap: 4px;
}

.typing-dots i {
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,.55);
  border-radius: 50%;
  animation: typing 1.2s infinite ease-in-out;
}

.typing-dots i:nth-child(2) { animation-delay: .16s; }
.typing-dots i:nth-child(3) { animation-delay: .32s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.game-screen {
  min-height: 100svh;
  background:
    linear-gradient(rgba(240,232,216,.94), rgba(240,232,216,.94)),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(25,21,15,.04) 25px 26px);
}

.game-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 70px;
  padding: 10px clamp(16px, 3vw, 40px);
  background: rgba(24, 21, 16, .96);
  color: var(--cream);
  border-bottom: 3px solid var(--ember);
  box-shadow: 0 7px 22px rgba(0,0,0,.15);
  backdrop-filter: blur(12px);
}

.logo-button,
.icon-button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.day-progress {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.day-copy {
  display: flex;
  min-width: 95px;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 900;
}

.day-copy span:last-child {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .18em;
}

.day-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-dot {
  width: 19px;
  height: 5px;
  background: rgba(255,255,255,.2);
  transform: skewX(-18deg);
  transition: background .25s ease, width .25s ease;
}

.day-dot.done {
  background: #8c6844;
}

.day-dot.active {
  width: 33px;
  background: var(--ember);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 17px;
}

.icon-button:hover,
.icon-button[aria-pressed="true"] {
  color: var(--gold);
  border-color: var(--gold);
}

.game-layout {
  display: grid;
  width: min(1480px, 100%);
  min-height: calc(100svh - 70px);
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 34px);
  grid-template-columns: minmax(210px, 250px) minmax(430px, 1fr) minmax(240px, 290px);
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
}

.paper-panel {
  background:
    linear-gradient(115deg, rgba(255,255,255,.3), transparent 44%),
    var(--paper);
  border: 1px solid rgba(70, 53, 32, .3);
  box-shadow: 5px 6px 0 rgba(96, 70, 42, .13);
}

.stats-panel,
.feed-panel {
  position: sticky;
  top: 104px;
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.panel-heading span {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
}

.panel-heading small {
  color: #766b5b;
  font-size: 10px;
}

.stats-list {
  display: grid;
  gap: 17px;
  padding: 20px 0 18px;
}

.stat-row {
  display: grid;
  gap: 7px;
}

.stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.stat-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: var(--cream);
  background: var(--ink);
  border-radius: 50%;
  font-size: 10px;
}

.stat-value {
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: 900;
}

.stat-track {
  height: 7px;
  overflow: hidden;
  background: #d6c9b1;
  border: 1px solid rgba(25,21,15,.18);
}

.stat-fill {
  height: 100%;
  background: var(--green);
  transition: width .5s cubic-bezier(.2,.8,.2,1), background .3s ease;
}

.stat-row[data-stat="cash"] .stat-fill { background: var(--gold); }
.stat-row[data-stat="conscience"] .stat-fill { background: #53725f; }
.stat-row[data-stat="risk"] .stat-fill { background: var(--danger); }
.stat-row[data-stat="hype"] .stat-fill { background: var(--ember); }

.stat-desc {
  margin: 0;
  color: #766b5b;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.5;
}

.stat-value.bump {
  animation: stat-bump .42s ease;
}

@keyframes stat-bump {
  40% { color: var(--ember); transform: scale(1.22); }
}

.inner-voice {
  padding: 15px;
  background: #272218;
  color: #efe3cb;
}

.inner-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.inner-voice p {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.75;
}

.event-card {
  overflow: hidden;
}

.event-visual {
  position: relative;
  height: clamp(220px, 31vh, 330px);
  overflow: hidden;
  background: var(--indigo);
}

.event-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  transition: transform 1.5s ease, filter .7s ease;
}

.event-card:hover .event-visual img {
  transform: scale(1.025);
}

.event-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(15,13,10,.78), transparent 62%),
    linear-gradient(90deg, rgba(16,13,9,.34), transparent 50%);
}

.event-stamp {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  min-width: 62px;
  flex-direction: column;
  padding: 9px 11px 7px;
  color: var(--cream);
  background: var(--ember-dark);
  border: 2px solid rgba(255,255,255,.65);
  outline: 2px solid var(--ember-dark);
  transform: rotate(-2deg);
}

.event-stamp span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.event-stamp strong {
  font-family: "Courier New", monospace;
  font-size: 24px;
}

.trend-badge {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 7px 12px;
  color: var(--cream);
  background: rgba(20,18,15,.78);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.event-body {
  padding: clamp(22px, 4vw, 42px);
}

.event-kicker {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #7d6c56;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.event-body h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.24;
  letter-spacing: -.03em;
}

.event-text {
  max-width: 790px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}

.event-text p {
  margin: 0 0 10px;
}

.event-text strong {
  color: var(--ember-dark);
  font-weight: 900;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 27px;
}

.choice-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 67px;
  padding: 13px 16px 13px 58px;
  color: var(--ink);
  text-align: left;
  background: rgba(255,255,255,.32);
  border: 1px solid rgba(25,21,15,.25);
  cursor: pointer;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.choice-button:hover {
  background: #fff9e9;
  border-color: var(--ember);
  transform: translateX(3px);
}

.choice-letter {
  position: absolute;
  left: 14px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--cream);
  background: var(--ink);
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.choice-copy {
  display: grid;
  gap: 5px;
}

.choice-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.choice-hint {
  color: #786d5d;
  font-size: 10px;
  line-height: 1.45;
}

.choice-effects {
  display: flex;
  max-width: 178px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.effect-chip,
.delta-chip {
  padding: 3px 6px;
  background: #e1d6c2;
  color: #685b49;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.effect-chip.good,
.delta-chip.good {
  color: #315b3d;
  background: #d7e5d2;
}

.effect-chip.bad,
.delta-chip.bad {
  color: #8c271f;
  background: #efd0c8;
}

.result-panel {
  margin-top: 26px;
  padding: 20px;
  color: var(--cream);
  background: #252017;
  border-left: 5px solid var(--ember);
  animation: result-in .35s ease both;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(12px); }
}

.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.result-deltas {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  letter-spacing: 0;
}

.result-panel p {
  margin: 15px 0 18px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
}

.continue-button {
  width: 100%;
  min-height: 48px;
  color: var(--cream);
  background: var(--ember);
  border: 0;
  box-shadow: none;
}

.continue-button:hover {
  box-shadow: none;
}

.comment-feed {
  display: grid;
  max-height: 490px;
  gap: 13px;
  padding: 17px 0;
  overflow: auto;
  scrollbar-width: thin;
}

.comment-item {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 9px;
  animation: comment-in .32s ease both;
}

@keyframes comment-in {
  from { opacity: 0; transform: translateY(5px); }
}

.comment-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--cream);
  background: var(--avatar, #6a5541);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 900;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #83725c;
  font-size: 9px;
  font-weight: 800;
}

.comment-user i {
  width: 3px;
  height: 3px;
  background: var(--ember);
  border-radius: 50%;
}

.comment-item p {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.55;
}

.heat-card {
  margin-top: 3px;
  padding: 14px;
  background: #e0d3bd;
  border-top: 1px solid var(--line);
}

.heat-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: #6f604e;
  font-size: 10px;
  font-weight: 900;
}

.heat-topline strong {
  color: var(--ember-dark);
  font-family: "Courier New", monospace;
  font-size: 24px;
}

.sparkline {
  display: flex;
  height: 38px;
  align-items: end;
  gap: 3px;
  margin: 8px 0 10px;
}

.sparkline i {
  width: 100%;
  height: var(--bar, 25%);
  background: var(--ember);
  opacity: .82;
  transition: height .45s ease;
}

.heat-card p {
  margin: 0;
  color: #716452;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.55;
}

.toast-layer {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(360px, calc(100% - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: grid;
  padding: 14px 16px;
  color: var(--cream);
  background: rgba(25,21,15,.96);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
  grid-template-columns: 42px 1fr;
  gap: 12px;
  animation: toast-in .35s ease both;
}

.toast.out {
  animation: toast-out .3s ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(30px); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(30px); }
}

.toast-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--gold);
  border: 1px solid var(--gold);
  font-family: var(--serif);
  font-size: 21px;
}

.toast strong {
  display: block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 14px;
}

.toast p {
  margin: 4px 0 0;
  color: rgba(255,248,232,.7);
  font-size: 10px;
  line-height: 1.5;
}

.game-modal {
  width: min(630px, calc(100% - 28px));
  padding: clamp(26px, 5vw, 50px);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 12px 12px 0 rgba(0,0,0,.38);
}

.game-modal::backdrop {
  background: rgba(10,9,7,.82);
  backdrop-filter: blur(5px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 28px;
}

.game-modal h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.2;
}

.game-modal > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.9;
}

.rules-grid {
  display: grid;
  margin: 22px 0;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.rules-grid div {
  display: grid;
  padding: 12px;
  gap: 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rules-grid strong {
  color: var(--ember-dark);
  font-family: var(--serif);
}

.rules-grid span {
  color: #6f6252;
  font-size: 11px;
  line-height: 1.5;
}

.modal-primary {
  margin-top: 14px;
}

.ending-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 0 clamp(16px, 4vw, 60px) 50px;
  color: var(--cream);
  isolation: isolate;
}

.ending-backdrop {
  filter: saturate(.6) brightness(.42);
}

.ending-screen::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 27% 46%, rgba(224,93,37,.23), transparent 33%),
    linear-gradient(90deg, rgba(9,10,11,.88), rgba(9,10,11,.52));
}

.ending-header {
  min-height: 76px;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.ending-index {
  color: rgba(255,255,255,.55);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.ending-wrap {
  display: grid;
  width: min(1150px, 100%);
  margin: clamp(35px, 7vh, 80px) auto 0;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.ending-card {
  padding: clamp(26px, 5vw, 58px);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.4), transparent 48%),
    var(--paper);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 14px 16px 0 rgba(0,0,0,.34);
}

.ending-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -.06em;
}

.ending-subtitle {
  margin: 15px 0 26px;
  color: var(--ember-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.ending-text {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
}

.ending-text p {
  margin: 0 0 8px;
}

.ending-card blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  color: var(--cream);
  background: var(--ink);
  border-left: 5px solid var(--ember);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.7;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.final-stat {
  padding: 12px 6px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.final-stat span {
  display: block;
  color: #766957;
  font-size: 9px;
}

.final-stat strong {
  display: block;
  margin-top: 5px;
  font-family: "Courier New", monospace;
  font-size: 17px;
}

.ending-card .secondary-button {
  color: var(--ink);
  border-color: rgba(25,21,15,.35);
}

.share-feedback {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--green);
  font-size: 11px;
}

.achievement-board {
  padding: 22px;
  color: var(--cream);
  background: rgba(20,18,14,.86);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
}

.achievement-board .panel-heading {
  border-bottom-color: var(--cream);
}

.achievement-board .panel-heading small {
  color: rgba(255,255,255,.5);
}

.ending-achievements {
  display: grid;
  gap: 10px;
  margin: 17px 0 24px;
}

.achievement-item {
  display: grid;
  padding: 11px;
  background: rgba(255,255,255,.07);
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.achievement-item.locked {
  opacity: .34;
  filter: grayscale(1);
}

.achievement-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold);
  border: 1px solid currentColor;
  font-family: var(--serif);
  font-weight: 900;
}

.achievement-item strong {
  display: block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
}

.achievement-item p {
  margin: 4px 0 0;
  color: rgba(255,255,255,.62);
  font-size: 9px;
  line-height: 1.45;
}

.ending-note {
  margin: 0;
  padding-top: 16px;
  color: rgba(255,255,255,.46);
  border-top: 1px solid rgba(255,255,255,.15);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.75;
}

@media (max-width: 1080px) {
  .game-layout {
    grid-template-columns: 220px minmax(430px, 1fr);
  }

  .feed-panel {
    position: static;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }

  .feed-panel .panel-heading {
    grid-column: 1 / -1;
  }

  .comment-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heat-card {
    margin: 0;
  }
}

@media (max-width: 760px) {
  .landing-nav {
    padding: 18px;
  }

  .brand-mark {
    font-size: 10px;
  }

  .landing-content {
    width: calc(100% - 36px);
    margin-left: 18px;
    padding-top: max(122px, 15vh);
    padding-bottom: 170px;
  }

  .landing-content h1 {
    font-size: clamp(48px, 17vw, 74px);
  }

  .landing-lead {
    max-width: 92%;
    font-size: 15px;
    line-height: 1.78;
  }

  .landing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-actions button {
    width: 100%;
  }

  .landing-quote {
    right: 18px;
    bottom: 18px;
    width: calc(100% - 36px);
  }

  .landing-shade {
    background:
      linear-gradient(90deg, rgba(11,12,14,.9), rgba(11,12,14,.3)),
      linear-gradient(0deg, rgba(12,10,8,.86) 0%, transparent 58%, rgba(12,10,8,.55) 100%);
  }

  .game-header {
    min-height: 62px;
    padding: 8px 12px;
  }

  .desktop-only,
  .day-dots {
    display: none;
  }

  .brand-seal {
    width: 34px;
    height: 34px;
  }

  .day-progress {
    gap: 0;
  }

  .day-copy {
    min-width: auto;
    text-align: center;
  }

  .header-actions {
    gap: 5px;
  }

  .icon-button {
    width: 33px;
    height: 33px;
  }

  .game-layout {
    display: flex;
    min-height: auto;
    padding: 12px;
    flex-direction: column;
    gap: 12px;
  }

  .stats-panel,
  .feed-panel {
    position: static;
    width: 100%;
  }

  .stats-panel {
    padding: 13px;
  }

  .stats-panel .panel-heading,
  .stats-panel .inner-voice,
  .stat-desc {
    display: none;
  }

  .stats-list {
    display: grid;
    padding: 0;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
  }

  .stat-row {
    gap: 5px;
  }

  .stat-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .stat-name {
    gap: 4px;
    font-size: 9px;
  }

  .stat-icon {
    display: none;
  }

  .stat-value {
    font-size: 12px;
  }

  .stat-track {
    height: 5px;
  }

  .story-column {
    order: 2;
    width: 100%;
  }

  .event-visual {
    height: 190px;
  }

  .event-body {
    padding: 21px 18px 23px;
  }

  .event-body h2 {
    font-size: 28px;
  }

  .event-text {
    font-size: 14px;
    line-height: 1.78;
  }

  .choice-button {
    padding: 13px 12px 13px 50px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .choice-effects {
    max-width: none;
    justify-content: flex-start;
  }

  .feed-panel {
    display: block;
    order: 3;
    padding: 16px;
  }

  .comment-feed {
    display: grid;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .heat-card {
    margin-top: 8px;
  }

  .toast-layer {
    right: 16px;
    bottom: 16px;
  }

  .ending-screen {
    padding: 0 14px 30px;
  }

  .ending-header {
    min-height: 64px;
  }

  .ending-wrap {
    display: flex;
    margin-top: 24px;
    flex-direction: column;
  }

  .ending-card,
  .achievement-board {
    width: 100%;
  }

  .ending-card {
    padding: 27px 21px;
  }

  .final-stats {
    grid-template-columns: repeat(5, 1fr);
  }

  .final-stat {
    padding: 9px 2px;
  }

  .final-stat strong {
    font-size: 13px;
  }

  .ending-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }
}

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