.story-page {
  --story-surface: #2b2931;
  --story-border: #4c4952;
  --story-muted: #d0cbc5;
  --story-green: #d1e8d9;
  --story-green-ink: #1c443a;
  --story-accent: #b8dfc6;
  --story-canvas: var(--bg);
}
[data-theme="light"] .story-page {
  --story-surface: #e9e5d9;
  --story-border: #ccc5b6;
  --story-muted: #504d50;
  --story-accent: #28634f;
}
.story-page .wrap { width: min(1160px, calc(100% - 40px)); }
.story-page :is(button, a, summary):focus-visible { outline-offset: 3px; }
.story-page h2 { line-height: 1.12; text-wrap: balance; }
.story-page .story-header {
  min-height: 72px;
  height: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 18px;
  align-items: center;
  border-color: var(--story-border);
}
.story-header .brand { gap: 8px; font-size: 17px; }
.story-header .brand-mark { width: 27px; height: 27px; }
.story-header .story-modes { display: flex; gap: 8px; }
.story-header .story-modes a {
  min-width: 47px;
  min-height: 44px;
  font-weight: 650;
}
.story-page .story-header .story-modes .mode-yi { border-radius: 999px; }
.story-page .story-header .story-modes .mode-lao { border-radius: 3px; }
.story-header .story-utilities { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.story-header :is(.theme, .language) {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 2px;
  font-size: 13px;
  text-decoration: none;
}
.story-login {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 56px;
  padding: 0 10px;
  border: 1px solid var(--story-border);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 78px);
  padding-block: clamp(34px, 6vw, 90px) 32px;
}
.story-hero h1, .story-work h1 {
  margin: 0;
  font-size: clamp(2.55rem, 5.4vw, 5.5rem);
  font-weight: 720;
  letter-spacing: -.062em;
  line-height: 1.02;
  text-wrap: balance;
}
html[lang^="zh"] .story-page h1 { letter-spacing: -.055em; line-height: 1.12; }
.story-hero h1 span { display: block; }
.story-hero-copy > p {
  max-width: 38ch;
  margin: 18px 0 20px;
  color: var(--story-muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.52;
}
.story-page .story-primary {
  margin: 0;
  min-height: 48px;
  gap: 18px;
  padding: 8px 18px;
  background: var(--story-green);
  color: var(--story-green-ink);
  font-size: 15px;
}
.story-hero-visual {
  display: grid;
  overflow: hidden;
  border-radius: 20px;
  background: #335c4e;
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
}
.court-illustration {
  grid-area: 1 / 1;
  width: 100%;
  height: clamp(260px, 34vw, 454px);
  object-fit: cover;
  object-position: center 44%;
}
.game-card {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--story-green);
  color: var(--story-green-ink);
  line-height: 1.3;
}
.story-hero-visual .game-card {
  grid-area: 1 / 1;
  align-self: end;
  z-index: 1;
  margin: 12px;
}
.game-card :is(.game-card-top, .game-card-bottom), .invite-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 4px;
  font-size: 13px;
}
.game-card time { font-weight: 700; }
.game-card h2 { margin: 6px 0 8px; font-size: clamp(1.35rem, 2.8vw, 1.8rem); text-wrap: wrap; }
.game-card-bottom strong { font-weight: 760; }
.story-sample {
  flex: none;
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 99px;
  background: #f0f4e9;
  color: #34574a;
  font-size: 11px;
  font-weight: 700;
}
.story-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.story-shortcuts a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 46px;
  padding-inline: 13px;
  border: 1px solid var(--story-border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
}
.story-section { padding-block: clamp(38px, 6vw, 78px); }
.story-section-heading { max-width: 48ch; margin-bottom: 24px; }
.story-section-heading h2, .story-secondary h2, .story-closing h2 { font-size: clamp(2rem, 4.6vw, 4rem); }
.story-section-heading p, .story-secondary p { margin-top: 8px; color: var(--story-muted); line-height: 1.5; }
.story-path {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: start;
  gap: clamp(24px, 5vw, 70px);
}
.story-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: story-step;
}
.story-steps li {
  counter-increment: story-step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--story-border);
}
.story-steps li::before {
  content: counter(story-step);
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--story-border);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.story-steps h3 { font-size: 17px; line-height: 1.25; letter-spacing: -.015em; }
.story-steps p { margin-top: 4px; color: var(--story-muted); font-size: 15px; line-height: 1.45; }
.join-visual, .invite-visual { background: var(--story-surface); border-radius: 16px; overflow: hidden; }
.map-hint { margin: 0; }
.map-hint img { display: block; width: 100%; height: 124px; object-fit: cover; }
.map-hint figcaption { padding: 7px 13px; color: var(--story-muted); font-size: 12px; }
.map-hint small { display: block; font-size: 11px; }
.confirmation-example { padding: 10px 13px 14px; }
.confirmation-example p {
  margin-top: 7px;
  padding: 7px 10px;
  border: 1px solid var(--story-border);
  border-radius: 8px;
  line-height: 1.35;
  font-size: 13px;
}
.confirmation-example p:last-child { background: var(--story-green); color: var(--story-green-ink); border-color: transparent; }
.confirmation-example p :is(strong,span) { display: block; }
.story-band { background: var(--story-surface); }
.story-band .invite-visual { background: var(--story-canvas); padding: 14px; }
.invite-caption { margin-bottom: 10px; }
.invite-visual blockquote {
  margin: 0 0 10px;
  padding: 12px;
  border-radius: 12px 12px 4px 12px;
  background: var(--story-green);
  color: var(--story-green-ink);
  font-size: 16px;
  line-height: 1.5;
}
.story-page summary {
  display: list-item;
  cursor: pointer;
  min-height: 44px;
  padding: 11px 10px;
  font-size: 14px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.recipient summary, .publish-disclosure summary {
  border: 1px solid var(--story-border);
  border-radius: 9px;
}
.recipient[open] .game-card { margin-top: 10px; }
.recipient p { margin: 8px 0 0; color: var(--story-muted); font-size: 13px; line-height: 1.45; }
.publish-disclosure { margin-top: 8px; }
.publish-disclosure .publish-scene { width: 100%; margin-top: 10px; }
.story-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.story-page .tools { padding-block: 22px 38px; }
.story-closing {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--story-border);
  padding-block: 34px;
}
.story-closing h2 { font-size: clamp(1.7rem, 3vw, 3rem); }
.story-closing .yi-script { width: 52px; height: 52px; }
.story-closing p { color: var(--story-muted); font-size: 14px; }
.story-footer { gap: 15px; flex-wrap: wrap; }
.story-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.story-work .work-copy > p { line-height: 1.45; }
.story-work .story-primary { margin-top: 16px; border-radius: 3px; }
.story-work .work-art { margin-inline: auto; }
@media (prefers-reduced-motion: no-preference) {
  .recipient[open] .game-card { animation: story-receive .24s ease-out both; }
  @keyframes story-receive { from { opacity: .55; transform: translateY(6px); } }
}
@media (max-width: 700px) {
  .story-page .wrap { width: calc(100% - 32px); }
  .story-page .story-header {
    grid-template-columns: 1fr auto;
    row-gap: 0;
    column-gap: 8px;
    padding-top: 4px;
  }
  .story-header .story-modes { grid-column: 1 / -1; grid-row: 2; padding-block: 2px 5px; }
  .story-header .story-utilities { grid-column: 2; grid-row: 1; }
  .story-hero { grid-template-columns: minmax(0, 1fr); gap: 15px; padding-block: 22px 12px; }
  .story-hero h1, .story-work h1 { font-size: clamp(2.15rem, 8.8vw, 3.2rem); }
  .story-hero-copy > p { margin: 12px 0 14px; }
  .court-illustration { height: clamp(218px, 62vw, 330px); object-position: center 42%; }
  .story-hero-visual .game-card { margin: 8px; padding: 11px 12px; }
  .story-shortcuts { margin-bottom: 0; }
  .story-section { padding-block: 35px; }
  .story-section-heading { margin-bottom: 16px; }
  .story-path, .story-secondary { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .story-steps li { padding-block: 11px; }
  .story-closing { grid-template-columns: auto 1fr; gap: 10px; }
  .story-closing .story-primary { justify-self: start; grid-column: 2; }
  .story-work { gap: 22px; padding-block: 30px; }
  .story-footer { font-size: 13px; }
}
@media (max-width: 350px) {
  .story-hero { gap: 12px; padding-top: 16px; }
  .story-hero h1 { font-size: 2rem; }
  .story-hero-copy > p { margin-block: 8px 10px; line-height: 1.4; }
  .court-illustration { height: 202px; }
}

.story-sample.story-beta { margin-block-end: 10px; font-size: 0.8125rem; }

@media (min-width: 701px) {
  .story-work .work-art { margin-inline: 0; }
}
