:root {
  color-scheme: light;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  --ink: #22231e;
  --muted: #6c6250;
  --paper: #fff7df;
  --paper-2: #ead7a7;
  --jade: #2f6353;
  --jade-dark: #173331;
  --cinnabar: #9b493c;
  --bronze: #7a542e;
  --gold: #d6a848;
  --line: rgba(50, 42, 30, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(132deg, rgba(47, 99, 83, 0.22), transparent 32%),
    linear-gradient(318deg, rgba(155, 73, 60, 0.18), transparent 38%),
    linear-gradient(180deg, #f2eedb, #d4bc86 58%, #2b594f);
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-shell {
  width: min(1360px, calc(100vw - 28px));
  height: 100vh;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 0;
}

.view {
  height: calc(100vh - 32px);
  min-height: 0;
  overflow: hidden;
}

.home-view {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border-radius: 0;
  background: url("assets/home-cover-v0.5.5.png") center / cover no-repeat;
}

.home-view::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 201, 111, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.32) 72%, rgba(0, 0, 0, 0.56));
}

.brand-panel,
.story-panel,
.result-panel,
.page-header,
.game-topbar,
.side-panel,
.level-card,
.glossary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 247, 223, 0.92);
  box-shadow: 0 18px 42px rgba(31, 38, 33, 0.18);
}

.brand-panel {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 36px));
  min-height: 390px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 34px 52px 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
}

.brand-panel h1 {
  margin: 10px 0 16px;
  color: #fff5cf;
  font-family: KaiTi, STKaiti, "Microsoft YaHei", serif;
  font-size: clamp(64px, 8vw, 108px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 4px 0 rgba(63, 28, 18, 0.72),
    0 18px 34px rgba(0, 0, 0, 0.66),
    0 0 28px rgba(255, 189, 88, 0.16);
}

.brand-panel p {
  max-width: 560px;
  margin: 0;
  color: #f0dfb2;
  font-size: 20px;
  line-height: 1.7;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.home-actions,
.story-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.home-actions {
  width: 100%;
  margin-top: 40px;
  gap: 28px;
}

.home-actions .primary-btn,
.home-actions .secondary-btn {
  min-width: 238px;
  min-height: 68px;
  border: 1px solid rgba(255, 236, 180, 0.36);
  border-radius: 10px;
  font-size: 26px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.home-actions .primary-btn {
  background: linear-gradient(180deg, #b65641, #6f2d26);
}

.home-actions .primary-btn:hover {
  background: linear-gradient(180deg, #c1644c, #7b342b);
}

.home-actions .secondary-btn {
  background: linear-gradient(180deg, #496f5f, #1d3d37);
}

.home-actions .secondary-btn:hover {
  background: linear-gradient(180deg, #537c6a, #244a42);
}

.rules-open-btn {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 2;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 236, 180, 0.42);
  border-radius: 6px;
  color: #fff8dd;
  background: rgba(45, 33, 18, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-weight: 900;
}

.rules-open-btn:hover {
  background: rgba(87, 54, 32, 0.9);
}

.rules-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 18, 14, 0.68);
}

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

.rules-card {
  width: min(760px, 100%);
  max-height: min(82vh, 680px);
  overflow: auto;
  border: 1px solid rgba(215, 170, 78, 0.52);
  border-radius: 8px;
  background: rgba(255, 247, 223, 0.98);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(122, 84, 46, 0.18);
}

.rules-header h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 32px;
}

.rules-close-btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #fff8dd;
  background: var(--cinnabar);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.rules-content {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}

.rules-content article {
  border: 1px solid rgba(122, 84, 46, 0.18);
  border-radius: 8px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.36);
}

.rules-content h3 {
  margin: 0 0 10px;
  color: var(--jade);
  font-size: 23px;
}

.rules-content p {
  margin: 8px 0 0;
  color: #514735;
  font-size: 16px;
  line-height: 1.75;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.pause-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-btn {
  color: #fff8dd;
  background: var(--jade);
}

.primary-btn:hover {
  background: #244d41;
}

.secondary-btn {
  color: #fff8dd;
  background: var(--bronze);
}

.secondary-btn:hover {
  background: #604224;
}

.ghost-btn {
  color: var(--jade-dark);
  background: rgba(47, 99, 83, 0.12);
}

.ghost-btn:hover {
  background: rgba(47, 99, 83, 0.2);
}

.danger-btn {
  color: #fff8dd;
  background: var(--cinnabar);
}

.pause-btn {
  min-width: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff8dd;
  background: linear-gradient(180deg, #3f7563, #21483e);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 210, 0.14);
}

.audio-toggle-btn {
  position: fixed;
  z-index: 30;
  top: 18px;
  right: 18px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 236, 180, 0.34);
  border-radius: 6px;
  color: #fff8dd;
  background: rgba(18, 31, 28, 0.62);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(2px);
}

.audio-toggle-btn:hover {
  background: rgba(42, 73, 62, 0.78);
}

.pause-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 248, 221, 0.16);
  font-size: 15px;
  line-height: 1;
}

.kicker,
.label {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
}

.brand-panel .kicker,
.game-topbar .kicker {
  color: #d7cba4;
}

.brand-panel .kicker {
  color: #edc770;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

h2,
h3,
p {
  margin-top: 0;
}

.page-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 20px;
}

#levelView:not([hidden]),
#glossaryView:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-header h2 {
  margin: 4px 0 0;
  font-size: 32px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  overflow: auto;
  align-content: start;
  padding-bottom: 4px;
}

.level-card {
  min-height: 218px;
  padding: 20px;
  text-align: left;
}

.level-card strong {
  display: block;
  margin: 8px 0;
  font-size: 26px;
}

.level-card p {
  color: #4e4739;
  line-height: 1.6;
}

.level-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.story-view {
  display: grid;
  align-content: center;
}

.story-panel,
.result-panel {
  padding: 30px;
}

.story-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.story-panel p,
.result-panel p {
  max-width: 900px;
  color: #3e382e;
  font-size: 18px;
  line-height: 1.8;
}

.opening {
  padding-left: 18px;
  border-left: 4px solid var(--cinnabar);
}

.game-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
}

.game-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(360px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: rgba(23, 51, 49, 0.96);
}

.game-title strong {
  display: block;
  color: #fff8dd;
  font-size: 22px;
  line-height: 1.1;
}

.task-summary,
.target-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 247, 223, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 223, 0.05);
  padding: 8px 10px;
}

.target-summary {
  min-height: 36px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  background: rgba(23, 51, 49, 0.96);
  border-color: rgba(255, 247, 223, 0.1);
  box-shadow: 0 8px 20px rgba(31, 38, 33, 0.12);
}

.task-summary .label,
.target-summary .label {
  color: #d7cba4;
}

.task-summary {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.task-summary h3 {
  display: block;
  margin: 0 10px 0 0;
  color: #fff8dd;
  font-size: 19px;
  line-height: 1.15;
}

.task-summary p {
  display: block;
  margin: 3px 0 0;
  color: #eadbb2;
  line-height: 1.2;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-summary .stack-list {
  display: grid;
  grid-template-rows: 26px;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 4px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  margin-top: 0;
}

.target-strip,
.stack-list,
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.target-chip,
.word-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 12px;
  color: #fff8dd;
  background: var(--jade);
  font-weight: 800;
}

.target-summary .target-chip {
  min-height: 26px;
  padding: 0 11px;
  font-size: 14px;
  white-space: nowrap;
}

.target-chip.done {
  background: var(--bronze);
  text-decoration: line-through;
}

.game-topbar .stat {
  min-width: 82px;
}

.game-topbar .stat strong {
  display: block;
  color: #fff8dd;
  font-size: 23px;
  white-space: nowrap;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  gap: 10px;
  min-height: 0;
}

.side-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.side-panel h3 {
  margin: 8px 0 16px;
  font-size: 24px;
}

.side-panel p {
  color: #4e4739;
  line-height: 1.7;
}

.side-panel .stack-list {
  gap: 6px;
}

.side-panel .word-chip {
  min-height: 28px;
  padding: 0 9px;
  font-size: 13px;
}

.board-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(46, 42, 34, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 229, 0.64), rgba(215, 188, 124, 0.44)),
    #d6bd84;
  box-shadow: 0 18px 42px rgba(31, 38, 33, 0.22);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.canvas-message {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  min-width: 220px;
  padding: 16px 22px;
  border-radius: 8px;
  color: #fff8dd;
  background: rgba(23, 51, 49, 0.9);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.next-ball {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 10px 0 18px;
  border-radius: 50%;
  color: #fff8dd;
  background: radial-gradient(circle at 35% 28%, #fff6cf, var(--cinnabar) 38%, #442722);
  box-shadow: inset 0 -9px 0 rgba(0, 0, 0, 0.16), 0 10px 18px rgba(32, 34, 28, 0.22);
  font-size: 30px;
  font-weight: 900;
}

.progress {
  height: 16px;
  overflow: hidden;
  margin: 12px 0 8px;
  border-radius: 999px;
  background: #e4cf94;
}

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

.progress-text {
  font-size: 14px;
}

.muted-list .word-chip {
  background: rgba(47, 99, 83, 0.16);
  color: var(--jade-dark);
}

.side-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.side-actions .secondary-btn,
.side-actions .ghost-btn {
  width: 100%;
}

.result-view {
  display: grid;
  align-content: center;
}

.result-panel {
  max-width: 880px;
  margin: 0 auto;
}

.result-panel h2 {
  margin: 8px 0 12px;
  font-size: 44px;
}

.result-stats {
  display: flex;
  gap: 16px;
  margin: 22px 0;
}

.result-stats div {
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(47, 99, 83, 0.1);
}

.result-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.glossary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  align-content: start;
  padding-bottom: 4px;
}

.glossary-card {
  padding: 16px;
}

.glossary-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.glossary-card p {
  margin: 0;
  color: #4e4739;
  line-height: 1.6;
}

.pk-live-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.pk-live-topbar,
.pk-player-panel,
.pk-result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(31, 38, 33, 0.18);
}

.pk-live-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: 174px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #fff8dd;
  background: rgba(23, 51, 49, 0.96);
}

.pk-mode-title strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  line-height: 1;
}

.pk-timer {
  text-align: center;
}

.pk-timer strong {
  display: block;
  color: #ffe2a0;
  font-size: 32px;
  line-height: 1;
}

.pk-targets {
  min-width: 0;
}

.pk-targets .label,
.pk-live-topbar .label {
  color: #d7cba4;
}

.pk-targets div {
  display: flex;
  gap: 7px;
  overflow: hidden;
  margin-top: 5px;
}

.pk-targets b {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 0 10px;
  color: #fff8dd;
  background: var(--jade);
  font-size: 14px;
}

.pk-live-board {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 8px;
}

.pk-player-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(255, 247, 223, 0.94);
}

.pk-player-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  color: #fff8dd;
  background: var(--jade-dark);
}

.pk-player-b .pk-player-head {
  background: #4d2c2a;
}

.pk-player-head .label,
.pk-player-foot .label {
  color: #d7cba4;
}

.pk-player-head strong {
  display: block;
  margin-top: 3px;
  font-size: 23px;
  line-height: 1;
}

.pk-combo {
  min-width: 78px;
  border-radius: 6px;
  padding: 8px 10px;
  color: #ffe2a0;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
  font-weight: 900;
}

.pk-canvas-wrap {
  min-height: 0;
  margin: 8px;
  overflow: hidden;
  border: 1px solid rgba(43, 36, 25, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 229, 0.62), rgba(215, 188, 124, 0.46)),
    #d7bd82;
}

.pk-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pk-player-foot {
  min-height: 70px;
  display: grid;
  grid-template-columns: 78px 78px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
}

.pk-ball {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-top: 4px;
  border-radius: 50%;
  color: #fff8dd;
  background: var(--jade);
  font-size: 23px;
  font-weight: 900;
}

.pk-next {
  color: #2d2112;
  background: var(--gold);
}

.pk-player-foot strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--jade-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-versus {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff8dd;
  background: rgba(23, 51, 49, 0.92);
  font-size: 22px;
  font-weight: 900;
  writing-mode: vertical-rl;
}

.pk-result-view {
  display: grid;
  place-items: center;
}

.pk-result-card {
  width: min(1080px, 100%);
  overflow: hidden;
  background: rgba(255, 247, 223, 0.96);
}

.pk-result-header {
  position: relative;
  overflow: hidden;
  padding: 24px 28px 18px;
  color: #fff8dd;
  text-align: center;
  background: rgba(23, 51, 49, 0.96);
}

.pk-result-header .kicker,
.pk-result-header h2 {
  position: relative;
  z-index: 1;
}

.pk-result-header h2 {
  margin: 8px 0 0;
  color: #ffe2a0;
  font-size: 50px;
  line-height: 1;
}

.pk-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pk-fireworks i,
.pk-fireworks i::before,
.pk-fireworks i::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe2a0;
  content: "";
  opacity: 0;
  animation: pkSparkle 2.4s ease-in-out infinite;
}

.pk-fireworks i:nth-child(1) {
  top: 24px;
  left: 14%;
}

.pk-fireworks i:nth-child(2) {
  top: 28px;
  left: 86%;
  animation-delay: 0.45s;
}

.pk-fireworks i:nth-child(3) {
  top: 82px;
  left: 8%;
  animation-delay: 0.9s;
}

.pk-fireworks i::before {
  transform: translate(18px, 9px);
  background: #d7aa4e;
  animation-delay: 0.12s;
}

.pk-fireworks i::after {
  transform: translate(-16px, 12px);
  background: #f6f0c6;
  animation-delay: 0.24s;
}

@keyframes pkSparkle {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  35% {
    opacity: 0.9;
    transform: scale(1.2);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.pk-score-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.pk-result-player {
  position: relative;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fffaf0;
}

.pk-result-player.is-winner {
  box-shadow: inset 0 0 0 3px rgba(215, 170, 78, 0.42);
}

.pk-result-player.is-loser {
  opacity: 0.86;
}

.pk-result-player.is-draw {
  box-shadow: inset 0 0 0 3px rgba(122, 84, 46, 0.28);
}

.pk-result-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff8dd;
  background: var(--jade);
  font-size: 24px;
  font-weight: 900;
}

.is-loser .pk-result-badge {
  background: var(--cinnabar);
}

.is-draw .pk-result-badge {
  background: var(--bronze);
}

.pk-result-player strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 32px;
}

.pk-result-player p {
  margin: 0 0 16px;
  color: #514735;
}

.pk-result-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pk-result-words b {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 11px;
  color: #fff8dd;
  background: var(--jade);
  font-size: 14px;
}

.pk-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 18px 22px;
}

@media (max-width: 1080px) {
  .view {
    overflow: auto;
  }

  .game-topbar,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    min-height: auto;
  }

  canvas {
    min-height: auto;
    aspect-ratio: 960 / 620;
  }

  .level-grid,
  .glossary-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100vw - 18px, 1360px);
    padding: 9px 0;
  }

  .view {
    height: calc(100vh - 18px);
  }

  .brand-panel,
  .story-panel,
  .result-panel {
    padding: 22px;
  }

  .brand-panel h1 {
    font-size: 52px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-stats {
    flex-direction: column;
  }
}
