:root {
  --bg: #100908;
  --ink: #fff5e8;
  --muted: rgba(255, 237, 213, 0.7);
  --paper: #f6dfbd;
  --gold: #d7a452;
  --gold-bright: #f2d38a;
  --red: #8e2630;
  --green: #397858;
  --panel: rgba(24, 14, 11, 0.82);
  --panel-strong: rgba(18, 10, 8, 0.94);
  --line: rgba(242, 211, 138, 0.26);
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

body {
  overflow: hidden;
}

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

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

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

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  width: min(100vw, 480px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 164, 82, 0.18), transparent 30%),
    linear-gradient(180deg, #21120e 0%, #100908 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 80px rgba(0, 0, 0, 0.7);
}

.intro-screen,
.game-screen,
.story-player,
.unlock-overlay,
.result-overlay {
  position: absolute;
  inset: 0;
}

.intro-image,
.home-visual {
  position: absolute;
  inset: 0;
  background-size: cover;
  animation: slow-move 7s ease-in-out infinite alternate;
}

.player-image {
  position: absolute;
  inset: 0;
}

@keyframes slow-move {
  from {
    transform: scale(1.02) translateY(0);
  }
  to {
    transform: scale(1.075) translateY(-10px);
  }
}

.intro-image {
  background-image: url("assets/story/opening-shen.webp");
}

.intro-image.startup {
  background-image:
    linear-gradient(180deg, rgba(44, 12, 15, 0.08), rgba(16, 7, 6, 0.32) 42%, rgba(8, 4, 3, 0.94)),
    url("assets/story/startup_entrance.webp");
  background-position: center 38%;
  background-size: auto 118%;
}

.intro-image.opening-1 {
  background-position: center 7%;
  background-size: auto 118%;
}

.intro-image.opening-2 {
  background-position: center 48%;
  background-size: auto 115%;
}

.intro-image.opening-3 {
  background-position: center 96%;
  background-size: auto 116%;
}

.intro-shade,
.player-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.16) 36%, rgba(0, 0, 0, 0.88)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 46%, rgba(0, 0, 0, 0.28));
}

.intro-screen.is-startup::before,
.intro-screen.is-startup::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 211, 138, 0.72), transparent);
  pointer-events: none;
}

.intro-screen.is-startup::before {
  top: calc(28px + env(safe-area-inset-top, 0px));
}

.intro-screen.is-startup::after {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}

.intro-text {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 92px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.86);
}

.intro-screen.is-startup .intro-text {
  bottom: 132px;
  text-align: center;
}

.intro-text strong,
.player-dialog strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-bright);
  font-size: 24px;
  font-weight: 800;
}

.intro-text p {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.56;
}

.intro-logo {
  margin-bottom: 12px !important;
  color: #ffe4a6 !important;
  font-family: "STSong", "SimSun", "Microsoft YaHei", serif;
  font-size: 46px !important;
  font-weight: 900 !important;
  line-height: 1.08;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.92), 0 0 28px rgba(215, 164, 82, 0.38);
}

.intro-subtitle {
  color: rgba(255, 239, 213, 0.84);
  font-size: 15px !important;
  letter-spacing: 0;
}

.tap-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  min-width: 188px;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid rgba(255, 226, 155, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(242, 211, 138, 0.22), rgba(142, 38, 48, 0.18)),
    linear-gradient(180deg, rgba(122, 22, 30, 0.96), rgba(56, 13, 17, 0.98));
  color: #fff4dc;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48), 0 0 24px rgba(215, 164, 82, 0.22);
  animation: tap-pulse 1.1s ease-in-out infinite alternate;
}

.intro-screen:not(.is-startup) .tap-button {
  display: none !important;
}

@keyframes tap-pulse {
  to {
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52), 0 0 34px rgba(242, 211, 138, 0.36);
    transform: translateX(-50%) translateY(3px);
  }
}

.game-screen {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(78px + env(safe-area-inset-bottom, 0px));
}

.status-bar,
.queen-mark,
.section-head,
.asset-head,
.rank-card,
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-bar {
  position: relative;
  z-index: 5;
}

.story-unlock-bar {
  position: absolute;
  z-index: 34;
  top: calc(82px + env(safe-area-inset-top, 0px));
  left: 14px;
  right: 14px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(242, 211, 138, 0.82);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 211, 138, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(142, 38, 48, 0.98), rgba(24, 14, 11, 0.98) 62%, rgba(8, 5, 4, 0.98)),
    rgba(24, 14, 11, 0.94);
  color: #fff2db;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.58), 0 0 34px rgba(215, 164, 82, 0.28);
  backdrop-filter: blur(14px);
  animation: story-unlock-drop 0.28s ease both, story-unlock-pulse 1.9s ease-in-out infinite;
}

.story-unlock-bar span {
  min-width: 0;
  overflow: visible;
  color: #fff6e8;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.story-unlock-bar b,
.story-unlock-bar em {
  display: block;
  font-style: normal;
}

.story-unlock-bar b {
  margin-bottom: 4px;
  color: var(--gold-bright);
  font-size: 19px;
  line-height: 1.2;
}

.story-unlock-bar em {
  color: #fff3df;
  font-size: 13px;
  font-weight: 700;
}

.story-unlock-bar strong {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe0a0, #b86a2d);
  color: #321208;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes story-unlock-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes story-unlock-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(0) scale(1.012);
  }
}

.status-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.queen-mark {
  min-width: 0;
}

.queen-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 211, 138, 0.68);
  border-radius: 50%;
  background: linear-gradient(135deg, #f1d58c 0%, #8e2630 54%, #21100d 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.queen-mark strong {
  display: block;
  font-size: 16px;
}

.queen-mark span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.small-button,
.tag {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 10, 8, 0.58);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.stats-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.stats-grid article {
  min-height: 52px;
  padding: 7px 5px;
  border: 1px solid rgba(242, 211, 138, 0.18);
  border-radius: 8px;
  background: rgba(18, 10, 8, 0.64);
  text-align: center;
  backdrop-filter: blur(12px);
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stats-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-bright);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-view {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

.home-panel {
  overflow: hidden;
}

.home-visual {
  background-image:
    linear-gradient(180deg, rgba(16, 9, 8, 0.05), rgba(16, 9, 8, 0.52) 56%, #100908 90%),
    url("assets/story/date-shen.webp");
  background-position: center 10%;
  background-size: auto 112%;
}

.home-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-copy h1 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

.home-copy p:not(.eyebrow) {
  margin-bottom: 14px;
  color: #f2e3cf;
  font-size: 15px;
  line-height: 1.58;
}

.home-actions,
.asset-actions,
.choice-list,
.edict-actions {
  display: grid;
  gap: 8px;
}

.home-actions,
.asset-actions,
.edict-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primary-button,
.ghost-button,
.asset-button,
.choice-list button,
.date-button,
.edict-button {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button {
  border: 1px solid rgba(242, 211, 138, 0.72);
  background: linear-gradient(180deg, rgba(148, 40, 49, 0.96), rgba(83, 20, 25, 0.98));
  color: #fff7e9;
  box-shadow: var(--shadow);
}

.ghost-button,
.asset-button,
.choice-list button,
.date-button,
.edict-button {
  border: 1px solid var(--line);
  background: rgba(24, 14, 11, 0.76);
  color: var(--gold-bright);
}

.content-panel {
  top: calc(114px + env(safe-area-inset-top, 0px));
  padding: 0 12px 14px;
  overflow: auto;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.rumor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.rumor-card,
.asset-card,
.edict-card,
.story-card,
.rank-card,
.task-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.rumor-card {
  min-height: 92px;
  padding: 9px;
}

.rumor-card strong,
.asset-name,
.edict-card h3,
.story-card strong,
.rank-card strong {
  display: block;
  color: var(--gold-bright);
}

.rumor-card span,
.asset-meta,
.edict-card p,
.story-card span,
.rank-card span,
.consort-card p,
.task-pill {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stars {
  margin-top: 8px;
  color: var(--gold-bright);
  font-size: 11px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.asset-card,
.edict-card,
.story-card,
.rank-card {
  padding: 12px;
}

.edict-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 12px;
  background-position: 72% 24%;
  background-size: auto 142%;
}

.edict-card::before,
.edict-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.edict-card::before {
  background: inherit;
  filter: blur(4px) saturate(1.08) brightness(1.08);
  transform: scale(1.035);
  opacity: 0.22;
}

.edict-card::after {
  background:
    radial-gradient(circle at 72% 26%, rgba(255, 228, 172, 0.22), rgba(255, 228, 172, 0.03) 26%, transparent 48%),
    linear-gradient(90deg, rgba(14, 8, 7, 0.95), rgba(14, 8, 7, 0.76) 44%, rgba(14, 8, 7, 0.24) 72%, rgba(14, 8, 7, 0.08)),
    linear-gradient(180deg, rgba(142, 38, 48, 0.02), rgba(0, 0, 0, 0.26));
}

.edict-tax {
  background-image: url("assets/story/unlocks/shen_unlock.webp");
  background-position: 76% 18%;
}

.edict-relief {
  background-image: url("assets/story/unlocks/rong_unlock.webp");
  background-position: 72% 22%;
}

.edict-army {
  background-image: url("assets/story/unlocks/xiao_unlock.webp");
  background-position: 70% 20%;
}

.edict-spy {
  background-image: url("assets/story/unlocks/pei_unlock.webp");
  background-position: 70% 20%;
}

.edict-trade {
  background-image: url("assets/story/unlocks/xie_unlock.webp");
  background-position: 72% 20%;
}

.edict-content,
.edict-actions {
  position: relative;
  z-index: 1;
}

.asset-head {
  margin-bottom: 8px;
}

.asset-name {
  font-size: 17px;
}

.price {
  color: var(--gold-bright);
  font-size: 19px;
  font-weight: 1000;
  white-space: nowrap;
}

.asset-actions {
  margin-top: 10px;
}

.asset-button.buy {
  background: rgba(57, 120, 88, 0.82);
  color: #fff8ec;
}

.asset-button.sell {
  background: rgba(142, 38, 48, 0.86);
  color: #fff8ec;
}

.edict-card h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.edict-card p {
  max-width: 66%;
  margin-bottom: 9px;
}

.edict-affinity {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(242, 211, 138, 0.34);
  border-radius: 999px;
  background: rgba(20, 11, 9, 0.62);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.edict-actions {
  grid-template-columns: 1fr;
  max-width: 66%;
}

.consort-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.consort-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.consort-card.is-locked {
  filter: grayscale(0.86);
}

.consort-card img {
  width: 100%;
  height: 134px;
  display: block;
  object-fit: cover;
  object-position: center 20%;
}

.consort-body {
  padding: 9px;
}

.consort-body h3 {
  margin: 0 0 3px;
  color: var(--gold-bright);
  font-size: 17px;
}

.consort-card p {
  margin-bottom: 8px;
}

.date-button {
  width: 100%;
  min-height: 36px;
}

.story-card {
  min-height: 72px;
  text-align: left;
}

.story-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(242, 211, 138, 0.22);
  border-radius: 8px;
  background: rgba(14, 8, 7, 0.46);
}

.story-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 4px;
}

.story-group-head strong {
  color: var(--gold-bright);
  font-size: 17px;
}

.story-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.story-card.is-current {
  border-color: rgba(242, 211, 138, 0.76);
  background: linear-gradient(135deg, rgba(142, 38, 48, 0.54), rgba(24, 14, 11, 0.84));
}

.story-card.is-watched {
  background: rgba(16, 9, 8, 0.62);
}

.story-card.is-watched strong,
.story-card.is-watched span {
  opacity: 0.72;
}

.story-card.is-unwatched:not(:disabled) {
  border-color: rgba(242, 211, 138, 0.6);
  box-shadow: inset 3px 0 0 rgba(242, 211, 138, 0.82);
}

.story-card.is-guided {
  border-color: rgba(255, 225, 158, 0.95) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 224, 160, 0.26), transparent 42%),
    linear-gradient(135deg, rgba(142, 38, 48, 0.78), rgba(24, 14, 11, 0.96)) !important;
  box-shadow: 0 0 0 2px rgba(242, 211, 138, 0.24), 0 16px 38px rgba(0, 0, 0, 0.36);
  animation: story-guide-flash 1.2s ease-in-out infinite;
}

.story-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid rgba(242, 211, 138, 0.32);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  vertical-align: 1px;
}

.story-card.is-watched .story-state {
  color: rgba(255, 237, 213, 0.58);
}

.story-card:disabled .story-state {
  color: rgba(255, 237, 213, 0.52);
}

.story-card:disabled {
  opacity: 0.46;
}

.story-card span {
  display: block;
  margin-top: 5px;
}

@keyframes story-guide-flash {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.task-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.task-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
}

.rank-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(215, 164, 82, 0.2);
  color: var(--gold-bright);
  font-weight: 1000;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(242, 211, 138, 0.16);
  background: rgba(12, 7, 6, 0.92);
  backdrop-filter: blur(16px);
}

.nav-button {
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-button.is-active {
  background: rgba(215, 164, 82, 0.14);
  color: var(--gold-bright);
}

.guide-arrow {
  position: absolute;
  right: 138px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 211, 138, 0.75);
  border-radius: 50%;
  background: rgba(142, 38, 48, 0.72);
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 32px rgba(242, 211, 138, 0.34);
  pointer-events: none;
  animation: guide-bounce 0.72s ease-in-out infinite alternate;
}

@keyframes guide-bounce {
  to {
    transform: translateY(-8px);
  }
}

.story-player {
  z-index: 30;
  background: #090605;
}

.story-player.strip-mode {
  --dialog-space: calc(246px + env(safe-area-inset-bottom, 0px));
}

.player-image {
  background-color: #090605;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.player-image::-webkit-scrollbar {
  display: none;
}

.player-image img {
  width: 100%;
  height: auto;
  min-height: 100%;
  display: block;
  object-fit: contain;
}

.story-player.strip-mode .player-image {
  bottom: var(--dialog-space);
  background:
    linear-gradient(180deg, #090605 0%, #120907 76%, #090605 100%);
}

.story-player.strip-mode .player-image img {
  min-height: auto;
  margin-bottom: 0;
}

.story-player.strip-mode .player-image::after {
  content: "";
  display: block;
  height: 90px;
  margin-top: -44px;
  background:
    linear-gradient(180deg, rgba(9, 6, 5, 0), rgba(18, 9, 7, 0.78) 42%, rgba(9, 6, 5, 1)),
    radial-gradient(circle at 50% 0%, rgba(242, 211, 138, 0.16), transparent 42%);
  filter: blur(0.4px);
}

.player-dialog {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  padding: 14px;
  border: 1px solid rgba(242, 211, 138, 0.42);
  border-radius: 8px;
  background: rgba(13, 8, 7, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.story-player.is-advancing .player-dialog {
  opacity: 0.72;
  transform: translateY(4px);
  filter: saturate(0.88);
}

.story-player.is-advancing .choice-list button {
  pointer-events: none;
  opacity: 0.58;
}

.story-player.strip-mode .player-shade {
  pointer-events: none;
  bottom: var(--dialog-space);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.04) 70%, rgba(0, 0, 0, 0.54));
}

.story-player.strip-mode .player-dialog {
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  min-height: 214px;
  padding: 12px;
  background: rgba(13, 8, 7, 0.88);
}

.story-player.strip-mode .player-dialog::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -52px;
  height: 54px;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(9, 6, 5, 0), rgba(13, 8, 7, 0.82)),
    radial-gradient(circle at 50% 100%, rgba(242, 211, 138, 0.12), transparent 58%);
  pointer-events: none;
}

.story-player.strip-mode .player-dialog p {
  min-height: 44px;
  font-size: 16px;
  line-height: 1.42;
}

.player-dialog p {
  min-height: 58px;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.55;
}

.choice-list {
  grid-template-columns: 1fr;
}

.unlock-overlay {
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.86)),
    url("assets/story/opening-shen.webp") center / auto 118%;
}

.unlock-content {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(242, 211, 138, 0.45);
  border-radius: 8px;
  background: rgba(13, 8, 7, 0.84);
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.unlock-content h2 {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 30px;
}

.unlock-content p:not(.eyebrow) {
  color: #f0dfc8;
  line-height: 1.6;
}

.result-overlay {
  z-index: 42;
  background: #090605;
  overflow: hidden;
}

.result-image,
.result-shade,
.result-content {
  position: absolute;
}

.result-image {
  inset: 0;
  background-position: center 38%;
  background-size: auto 116%;
  animation: slow-move 7s ease-in-out infinite alternate;
}

.result-shade {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(7, 4, 4, 0.24) 42%, rgba(7, 4, 4, 0.9)),
    radial-gradient(circle at 50% 68%, rgba(242, 211, 138, 0.15), transparent 50%);
}

.result-content {
  left: 18px;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  padding: 18px;
  border: 1px solid rgba(242, 211, 138, 0.45);
  border-radius: 8px;
  background: rgba(13, 8, 7, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.result-content h2 {
  margin: 2px 0 8px;
  color: var(--gold-bright);
}

.result-content p:not(.eyebrow) {
  margin-bottom: 14px;
  color: #f0dfc8;
  line-height: 1.55;
}

.toast-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.toast {
  position: absolute;
  left: 50%;
  top: 44%;
  min-width: 180px;
  max-width: calc(100% - 36px);
  padding: 12px 16px;
  border: 1px solid rgba(242, 211, 138, 0.52);
  border-radius: 8px;
  background: rgba(14, 8, 7, 0.9);
  color: var(--gold-bright);
  font-size: 20px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  animation: toast-up 1.35s ease forwards;
}

@keyframes toast-up {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.92);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -118px) scale(1);
  }
}

.coin {
  position: absolute;
  top: -18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6be, #dca13a 62%, #75440d);
  animation: coin-fall 1.65s linear forwards;
}

@keyframes coin-fall {
  to {
    opacity: 0.12;
    transform: translateY(108dvh) rotate(540deg);
  }
}

@media (max-width: 390px) {
  .stats-grid strong {
    font-size: 13px;
  }

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

  .consort-card img {
    height: 118px;
  }

  .home-copy h1 {
    font-size: 26px;
  }
}
