:root {
  color-scheme: light;
  --ink: #2b2015;
  --muted: #7a6653;
  --red: #9f2019;
  --red-deep: #6f1712;
  --gold: #d7a646;
  --gold-deep: #b47b23;
  --paper: #fff3d7;
  --paper-soft: #f7e4bc;
  --line: rgba(89, 55, 28, 0.22);
  --shadow: 0 26px 72px rgba(64, 39, 19, 0.24);
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  font-family:
    "Noto Serif SC",
    "Source Han Serif SC",
    "Microsoft YaHei",
    "PingFang SC",
    serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 52% 24%, rgba(255, 241, 199, 0.52), transparent 30%),
    linear-gradient(rgba(94, 58, 28, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 58, 28, 0.16) 1px, transparent 1px),
    linear-gradient(145deg, #f1d9ac 0%, #e3bb79 55%, #cf9253 100%);
  background-size: auto, 42px 42px, 42px 42px, auto;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
}

button {
  font: inherit;
}

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

.mobile-story-track,
.story-ticker {
  display: none;
}

.shell {
  display: grid;
  place-items: center;
  width: min(100% - 24px, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
}

.story-panel {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(91, 56, 27, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 20%),
    linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(247, 225, 184, 0.96));
  box-shadow: var(--shadow);
}

.story-panel::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(116, 70, 31, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.story-content {
  position: relative;
  z-index: 1;
  padding: 2px 4px 2px 0;
  overflow: visible;
}

.story-content::-webkit-scrollbar {
  width: 6px;
}

.story-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(124, 75, 35, 0.34);
}

.scene-heading {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  min-width: 0;
  padding-inline: 2px;
}

.scene-act {
  flex: none;
  margin: 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}

h1,
p,
blockquote {
  margin: 0;
}

h1 {
  color: #24180f;
  font-size: clamp(25px, 3.6vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

blockquote {
  margin-top: var(--space-4);
  padding: 11px 13px;
  border: 1px solid rgba(159, 32, 25, 0.12);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  color: #3e2a1b;
  background:
    linear-gradient(180deg, rgba(255, 240, 213, 0.92), rgba(239, 211, 169, 0.74));
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 850;
  line-height: 1.55;
}

.story-text {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.story-text p {
  color: #3b2b1e;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.68;
}

.choice-context {
  display: grid;
  gap: 7px;
  margin-top: var(--space-4);
}

.choice-context p {
  margin: 0;
  color: #3b2b1e;
  font-size: clamp(13px, 1.9vw, 15px);
  font-weight: 760;
  line-height: 1.55;
}

.story-art {
  position: relative;
  overflow: hidden;
  margin: var(--space-5) 0 0;
  border: 1px solid rgba(91, 56, 27, 0.24);
  border-radius: 10px;
  background: rgba(38, 24, 14, 0.12);
  box-shadow:
    0 10px 24px rgba(75, 45, 20, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.story-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.story-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 216, 0.32);
}

.match-text {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(105, 66, 35, 0.16);
  border-radius: 8px;
  background: rgba(255, 249, 231, 0.48);
}

.match-brief {
  display: grid;
  gap: 10px;
}

.match-brief-title {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.match-brief-title strong {
  color: #24180f;
  font-size: 16px;
  font-weight: 950;
}

.match-brief-title span {
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(159, 32, 25, 0.18);
  border-radius: 999px;
  background: rgba(255, 232, 168, 0.58);
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 900;
}

.match-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.match-brief-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(116, 70, 31, 0.13);
  border-radius: 7px;
  background: rgba(255, 244, 218, 0.62);
}

.match-brief-item span {
  color: #806044;
  font-size: 12px;
  font-weight: 850;
}

.match-brief-item strong {
  overflow: hidden;
  color: #2d1d12;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.match-brief p {
  margin: 0;
  color: #4d3928;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.55;
}

.story-game-shell {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: var(--space-3);
  min-height: min(72vh, 720px);
}

.story-game-frame {
  display: block;
  width: 100%;
  aspect-ratio: 600 / 664;
  min-height: 0;
  border: 1px solid rgba(78, 46, 22, 0.42);
  border-radius: 10px;
  background: #14121d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 202, 0.18),
    0 12px 28px rgba(56, 33, 15, 0.2);
}

.story-game-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.scene-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(105, 66, 35, 0.14);
}

.nav-btn {
  min-height: 50px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(78, 46, 22, 0.44);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(226, 199, 149, 0.95));
  box-shadow:
    0 3px 0 rgba(91, 55, 26, 0.34),
    0 9px 18px rgba(92, 56, 27, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.nav-btn.compact {
  min-height: 42px;
  padding: 8px 10px 9px;
  font-size: 14px;
}

.nav-btn.primary {
  border-color: rgba(116, 67, 20, 0.64);
  background:
    linear-gradient(180deg, #ffe99f 0%, #edc05a 52%, #d19a34 100%);
}

.nav-btn:not(:disabled):hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 rgba(91, 55, 26, 0.34),
    0 12px 22px rgba(92, 56, 27, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.nav-btn:focus-visible {
  outline: 3px solid rgba(159, 32, 25, 0.32);
  outline-offset: 3px;
}

.nav-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(88, 53, 25, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (max-width: 560px) {
  html,
  body {
    min-height: 100%;
    overflow: hidden;
  }

  .shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    width: min(100% - 14px, 430px);
    min-height: 100svh;
    height: 100svh;
    place-items: stretch;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .mobile-story-track {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 5px;
    padding: 8px 10px 7px;
    border: 1px solid rgba(91, 56, 27, 0.24);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(241, 218, 178, 0.95));
    box-shadow:
      0 5px 0 rgba(91, 55, 26, 0.22),
      0 14px 28px rgba(83, 50, 22, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow: hidden;
  }

  .mobile-track-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .mobile-count {
    margin: 0;
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
  }

  .mobile-track-title h2 {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    color: #24180f;
    font-size: 23px;
    line-height: 1.08;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .mobile-track-title h2 span {
    flex: none;
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-count {
    align-self: center;
    padding: 5px 8px;
    border: 1px solid rgba(116, 70, 31, 0.22);
    border-radius: 999px;
    background: rgba(255, 246, 222, 0.78);
    color: #6a3d20;
    white-space: nowrap;
  }

  .track-scroll {
    position: relative;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 2px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .track-scroll::-webkit-scrollbar {
    display: none;
  }

  .track-scroll::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 16px;
    height: 2px;
    background: linear-gradient(90deg, rgba(159, 32, 25, 0.26), rgba(180, 123, 35, 0.42));
    pointer-events: none;
  }

  .track-item {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 3px;
    flex: 0 0 54px;
    min-width: 54px;
    padding: 0;
    border: 0;
    color: #6d4c32;
    background: transparent;
    font: inherit;
    scroll-snap-align: center;
  }

  .track-dot {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(116, 70, 31, 0.46);
    border-radius: 50%;
    background:
      radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.92), transparent 35%),
      linear-gradient(180deg, #f7dfaa, #c99642);
    box-shadow: 0 2px 0 rgba(77, 46, 22, 0.28);
  }

  .track-label {
    width: 100%;
    overflow: hidden;
    color: #68482f;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .track-item.current .track-dot {
    border-color: rgba(159, 32, 25, 0.78);
    background:
      radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.96), transparent 34%),
      linear-gradient(180deg, #ffdf73, #c93622);
    box-shadow:
      0 0 0 4px rgba(159, 32, 25, 0.11),
      0 3px 0 rgba(77, 46, 22, 0.28);
  }

  .track-item.current .track-label {
    color: var(--red-deep);
  }

  .track-item.locked {
    opacity: 1;
  }

  .track-item.locked .track-dot {
    border-color: rgba(116, 70, 31, 0.18);
    background: linear-gradient(180deg, rgba(240, 220, 183, 0.74), rgba(198, 170, 126, 0.64));
    box-shadow: none;
  }

  .track-item.locked .track-label {
    color: rgba(92, 63, 42, 0.55);
  }

  .story-panel {
    display: block;
    min-height: 0;
    height: auto;
    padding: 12px;
    border-radius: 10px;
  }

  .story-panel::before {
    inset: 7px;
  }

  .story-content {
    min-height: 0;
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 75, 35, 0.38) transparent;
  }

  .story-panel.is-playing {
    align-self: start;
    height: auto;
    padding: 8px;
  }

  .story-panel.is-playing .story-content {
    display: grid;
    height: auto;
    padding-right: 0;
    overflow: hidden;
  }

  .story-game-shell {
    align-content: start;
    gap: 7px;
    min-height: 0;
    height: auto;
  }

  .story-game-frame {
    min-height: 0;
    height: auto;
    max-height: 100%;
    border-radius: 8px;
  }

  .story-game-actions {
    gap: 7px;
  }

  .desktop-heading {
    display: none;
  }

  .story-ticker {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 9px 10px;
    border: 1px solid rgba(159, 32, 25, 0.12);
    border-left: 4px solid var(--red);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 240, 213, 0.92), rgba(239, 211, 169, 0.74));
    color: #3e2a1b;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.45;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .story-ticker::-webkit-scrollbar {
    display: none;
  }

  .story-ticker span {
    display: inline-block;
    min-width: max-content;
    padding-right: 24px;
  }

  .story-ticker.is-long span {
    animation: ticker-nudge var(--ticker-duration, 4.8s) ease-in-out infinite alternate;
  }

  .story-panel.kind-choice .story-ticker {
    display: none;
  }

  @keyframes ticker-nudge {
    from {
      transform: translateX(0);
    }

    to {
      transform: translateX(var(--ticker-shift, -24px));
    }
  }

  h1 {
    font-size: clamp(24px, 7vw, 32px);
  }

  blockquote {
    padding: 9px 10px;
    font-size: 15px;
  }

  .story-text {
    gap: 9px;
    margin-top: 12px;
  }

  .story-art {
    margin-top: 10px;
    border-radius: 8px;
  }

  .story-art img {
    max-height: 150px;
  }

  .story-text p {
    font-size: 14px;
    line-height: 1.62;
  }

  .story-mark {
    display: inline-block;
    width: 1.55em;
    transform: translateY(0.03em);
  }

  .scene-actions {
    position: relative;
    z-index: 2;
    grid-template-columns: 0.85fr 1.2fr 0.85fr;
    gap: 7px;
    margin-top: 0;
    padding: 9px 0 0;
  }

  .nav-btn {
    min-height: 50px;
    padding: 9px 6px 10px;
    font-size: 15px;
  }

  .nav-btn.compact {
    min-height: 38px;
    padding: 7px 5px 8px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-ticker.is-long span {
    animation: none;
  }
}

.story-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
  padding: 8px 10px;
  border: 1px solid rgba(116, 70, 31, 0.18);
  border-radius: 8px;
  background: rgba(255, 249, 231, 0.54);
  color: #6b4a30;
  font-size: 13px;
  font-weight: 850;
}

.story-score strong {
  color: var(--red-deep);
  font-size: 15px;
}

.story-score span:last-child {
  text-align: right;
}

.choice-panel,
.ability-card {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(105, 66, 35, 0.18);
  border-radius: 8px;
  background: rgba(255, 249, 231, 0.52);
}

.choice-head {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.choice-head strong,
.ability-card strong {
  color: #2d1d12;
  font-size: 16px;
}

.choice-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.soul-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.soul-button {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 76px;
  padding: 9px 6px 8px;
  border: 1px solid rgba(78, 46, 22, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(231, 204, 154, 0.94));
  box-shadow:
    0 3px 0 rgba(91, 55, 26, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-align: center;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.soul-button.selected {
  border-color: rgba(159, 32, 25, 0.68);
  background: linear-gradient(180deg, #ffe99f 0%, #edc05a 54%, #d19a34 100%);
  box-shadow:
    0 3px 0 rgba(116, 67, 20, 0.38),
    0 0 0 3px rgba(159, 32, 25, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.soul-button:not(:disabled):hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.soul-button:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(91, 55, 26, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

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

.choice-piece {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 32, 25, 0.36);
  border-radius: 50%;
  background: #fff4d8;
  color: var(--red);
  font-size: 18px;
  font-weight: 950;
}

.choice-piece.large {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.soul-button-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.soul-button-text strong,
.soul-button-text small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.soul-button-text strong {
  color: #24180f;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}

.soul-button-text small {
  color: #755231;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.soul-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
  margin-top: var(--space-4);
}

.soul-art {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(91, 56, 27, 0.22);
  border-radius: 8px;
  background: rgba(38, 24, 14, 0.1);
}

.soul-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 188px;
  object-fit: cover;
}

.soul-copy {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 1px 0;
}

.soul-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.soul-title-row strong {
  display: block;
  color: #24180f;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
}

.soul-title-row span {
  display: block;
  margin-top: 3px;
  color: #6b4a30;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.soul-copy p,
.soul-empty p {
  margin: 0;
  color: #4d3928;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.soul-copy b {
  color: var(--red-deep);
}

.soul-warning,
.soul-empty {
  padding: 10px 11px;
  border: 1px solid rgba(159, 32, 25, 0.12);
  border-radius: 8px;
  background: rgba(255, 240, 213, 0.5);
}

.soul-empty {
  display: grid;
  gap: 5px;
  margin-top: var(--space-4);
}

.soul-empty strong {
  color: #24180f;
  font-size: 16px;
  font-weight: 950;
}

.ability-card {
  display: grid;
  gap: 8px;
}

.ability-card p {
  margin: 0;
  color: #4d3928;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.ability-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.story-game-shell {
  grid-template-rows: auto auto auto;
}

.story-game-meta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(105, 66, 35, 0.16);
  border-radius: 8px;
  background: rgba(255, 249, 231, 0.5);
  color: #5f422b;
  font-size: 13px;
  font-weight: 850;
}

.story-game-meta strong {
  color: var(--red-deep);
}

.story-live-hint {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(105, 66, 35, 0.15);
  border-radius: 8px;
  background: rgba(255, 249, 231, 0.58);
  color: #5a3d28;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.story-live-hint.active {
  border-color: rgba(159, 32, 25, 0.18);
  background: rgba(255, 232, 168, 0.52);
  color: #4b251a;
}

.story-game-actions.four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 560px) {
  .story-score {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 9px;
    padding: 7px 8px;
    font-size: 11px;
    text-align: left;
  }

  .story-score strong {
    min-width: 0;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }

  .story-score span:last-child {
    text-align: right;
    white-space: nowrap;
  }

  .choice-context {
    gap: 5px;
    margin-top: 9px;
  }

  .choice-context p {
    font-size: 12px;
    line-height: 1.46;
  }

  .choice-context p + p {
    display: none;
  }

  .choice-panel,
  .ability-card {
    margin-top: 10px;
    padding: 10px;
  }

  .choice-head {
    display: grid;
    gap: 4px;
    margin-bottom: 9px;
  }

  .choice-head strong,
  .ability-card strong {
    font-size: 15px;
  }

  .choice-head span {
    font-size: 12px;
    text-align: left;
  }

  .soul-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .soul-button {
    min-height: 68px;
    padding: 7px 4px 6px;
  }

  .choice-piece {
    width: 31px;
    height: 31px;
    font-size: 17px;
  }

  .choice-piece.large {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .soul-button-text strong {
    font-size: 12px;
    white-space: normal;
    line-height: 1.12;
    min-height: 2.24em;
  }

  .soul-button-text small {
    font-size: 10px;
  }

  .soul-detail {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 10px;
  }

  .soul-art img {
    min-height: 0;
    max-height: 94px;
    aspect-ratio: 16 / 9;
  }

  .soul-copy {
    order: -1;
    gap: 8px;
  }

  .soul-title-row strong {
    font-size: 15px;
  }

  .soul-title-row span,
  .soul-copy p,
  .soul-empty p {
    font-size: 12px;
    line-height: 1.5;
  }

  .soul-belief {
    display: none;
  }

  .soul-warning,
  .soul-empty {
    padding: 8px 9px;
  }

  .ability-card p {
    font-size: 13px;
  }

  .story-game-meta {
    padding: 7px 8px;
    font-size: 12px;
  }

  .match-brief {
    gap: 8px;
  }

  .match-brief-title strong {
    font-size: 14px;
  }

  .match-brief-title span {
    padding: 3px 7px;
    font-size: 11px;
  }

  .match-brief-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .match-brief-item {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    padding: 7px 8px;
  }

  .match-brief-item span {
    font-size: 11px;
  }

  .match-brief-item strong {
    font-size: 12px;
  }

  .match-brief p {
    font-size: 12px;
    line-height: 1.5;
  }

  .story-live-hint {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .story-game-actions.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 370px) {
  .story-panel.kind-choice .soul-art {
    display: none;
  }
}
