/* Modo História — campanha e leitor do prólogo */
.story-main {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.75rem;
}

#story-app {
  min-height: 12rem;
}

#story-app.story-app--reader {
  max-width: 720px;
  margin: 0 auto;
}

#story-app.story-app--video {
  max-width: min(960px, 100%);
  margin: 0 auto;
}

.story-act-video__kicker,
.story-act-video__title {
  text-align: center;
}

.story-act-video__stage {
  position: relative;
  margin: 1rem 0 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  background: #050510;
  border: 1px solid rgba(155, 109, 255, 0.25);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  min-height: min(40vh, 280px);
}

.story-act-video__player {
  display: block;
  width: 100%;
  max-height: min(72vh, 540px);
  margin: 0 auto;
  background: #000;
  vertical-align: middle;
  object-fit: contain;
  cursor: pointer;
}

.story-act-video__overlay-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.story-act-video__overlay-play.hidden {
  display: none;
}

.story-act-video__loading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  text-align: center;
  color: rgba(232, 220, 255, 0.85);
  pointer-events: none;
  z-index: 2;
}

.story-act-video__hint {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(232, 220, 255, 0.85);
  background: rgba(20, 10, 40, 0.85);
}

.story-act-video__foot {
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.story-reader--video .story-scene__video-stage {
  margin-bottom: 1rem;
}

.story-reader--video .story-scene__body {
  margin-top: 0.5rem;
}

.story-hero {
  text-align: center;
  padding: 0.5rem 0 2rem;
  border-bottom: 1px solid rgba(212, 166, 75, 0.2);
  margin-bottom: 2rem;
}

.story-hero__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin: 0 0 0.5rem;
}

.story-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: var(--parchment);
  margin: 0 0 0.65rem;
  letter-spacing: 0.03em;
}

.story-hero__tagline {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(232, 220, 196, 0.88);
  max-width: 36rem;
  margin: 0 auto;
  font-style: italic;
}

.story-section {
  margin-bottom: 2.25rem;
}

.story-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.story-section__lead {
  color: rgba(232, 220, 196, 0.78);
  line-height: 1.6;
  margin: 0 0 1rem;
  max-width: 42rem;
}

.story-prologue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
}

.story-acts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.story-act-card {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 166, 75, 0.22);
  background: linear-gradient(145deg, rgba(18, 14, 10, 0.92), rgba(28, 22, 16, 0.75));
}

.story-act-card--locked {
  opacity: 0.55;
}

.story-act-card__num {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

.story-act-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--parchment);
  margin: 0 0 0.35rem;
}

.story-act-card__sub {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(232, 220, 196, 0.7);
  margin: 0;
}

.story-act-card__lock {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(212, 166, 75, 0.75);
}

.story-factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.story-faction-chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--clan-accent) 35%, transparent);
  background: rgba(12, 10, 8, 0.65);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.story-faction-chip:hover {
  border-color: var(--clan-accent);
  background: rgba(20, 16, 12, 0.85);
}

.story-faction-chip__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.story-faction-chip__nome {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--clan-accent);
}

.story-faction-chip__creed {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(232, 220, 196, 0.72);
  font-style: italic;
}

.story-footer-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 166, 75, 0.15);
}

/* Leitor de cenas */
.story-reader__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}

.story-reader__back {
  flex-shrink: 0;
}

.story-reader__progress {
  flex: 1;
  min-width: 100px;
  height: 4px;
  border-radius: 2px;
  background: rgba(212, 166, 75, 0.15);
  overflow: hidden;
}

.story-reader__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(180, 120, 40, 0.9), var(--gold));
  border-radius: 2px;
  transition: width 0.25s ease;
}

.story-reader__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(212, 166, 75, 0.75);
  white-space: nowrap;
}

.story-scene__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  color: var(--gold);
  margin: 0 0 1rem;
  text-align: center;
}

.story-scene__figure {
  margin: 0 0 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 166, 75, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.story-scene__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(52vh, 420px);
  object-fit: cover;
}

.story-scene__body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(232, 220, 196, 0.92);
}

.story-scene__p {
  margin: 0 0 0.65rem;
}

.story-scene__break {
  height: 0.85rem;
  margin: 0;
}

.story-scene__epigraph {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  color: var(--gold);
  text-align: center;
  margin: 0.5rem 0 1rem;
  letter-spacing: 0.04em;
}

.story-scene__title-inline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--parchment);
  text-align: center;
  margin: 0.75rem 0 0.85rem;
}

.story-scene__list {
  margin: 0.35rem 0 1rem 1.25rem;
  padding: 0;
  list-style: none;
}

.story-scene__li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
  color: rgba(232, 220, 196, 0.88);
}

.story-scene__li::before {
  content: '◆';
  position: absolute;
  left: 0;
  font-size: 0.55rem;
  color: var(--gold);
  top: 0.45em;
}

.story-reader__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(212, 166, 75, 0.15);
}

@media (max-width: 520px) {
  .story-reader__foot {
    flex-direction: column-reverse;
  }

  .story-reader__foot .btn {
    width: 100%;
  }
}

/* Ato I */
.story-scene__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 166, 75, 0.75);
  text-align: center;
  margin: 0 0 0.35rem;
}

.story-scene__clan-line {
  margin: 0.35rem 0;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(212, 166, 75, 0.35);
  color: rgba(232, 220, 196, 0.9);
}

.story-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.story-chapter-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 166, 75, 0.18);
  background: rgba(14, 11, 8, 0.85);
  min-height: 140px;
}

.story-chapter-card__img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}

.story-chapter-card__num,
.story-chapter-card__title,
.story-chapter-card__sub {
  display: block;
  padding: 0 0.75rem;
}

.story-chapter-card__num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.5rem;
}

.story-chapter-card__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--parchment);
  margin: 0.2rem 0;
}

.story-chapter-card__sub {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(232, 220, 196, 0.65);
  padding-bottom: 0.75rem;
}

.story-chapter-card--current {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 166, 75, 0.15);
}

.story-chapter-card--done .story-chapter-card__img {
  filter: saturate(0.6);
}

.story-chapter-card__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(212, 166, 75, 0.25);
  color: var(--gold);
}

.story-chapter-card__badge--done {
  background: rgba(80, 160, 100, 0.35);
  color: #9fdf9f;
}

.story-act-card--done {
  border-color: rgba(80, 160, 100, 0.35);
}

.story-act-card__play {
  margin-top: 0.65rem;
  width: 100%;
}

.story-act-card__lock--done {
  color: #9fdf9f;
}

.story-mission-brief__goal {
  font-size: 1rem;
  color: var(--gold);
  margin: 0.75rem 0;
}

.story-mission-brief__hint {
  font-size: 0.85rem;
  opacity: 0.75;
}

.story-reader__foot--stack {
  flex-direction: column;
  align-items: stretch;
}

.story-reader__foot--stack .btn {
  text-align: center;
}

.story-act-complete {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}

.story-act1-actions {
  margin-bottom: 0.5rem;
}

.story-choice {
  max-width: 40rem;
  margin: 0 auto;
}

.story-choice__conflicts {
  margin-bottom: 1.25rem;
}

.story-choice__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.story-choice-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 220, 160, 0.2);
  border-radius: 10px;
  background: rgba(10, 12, 22, 0.65);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.story-choice-card:hover,
.story-choice-card--picked {
  border-color: rgba(255, 200, 120, 0.55);
  background: rgba(30, 28, 48, 0.85);
}

.story-choice-card__label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.story-choice-card__detail {
  display: block;
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.story-choice-card__effects {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  opacity: 0.75;
}

.story-act-complete__choices {
  margin: 1rem 0;
}

.story-act-complete__reveal {
  font-size: 1.15rem;
  color: #e8c4ff;
}

.story-hero--act3 .story-act-progress__fill {
  background: linear-gradient(90deg, #6b2d8a, #c45cff, #8a4fff);
}

.story-unlock-banner--act3 {
  border-color: rgba(180, 80, 255, 0.35);
}

/* Efeitos de batalha (Ato I) */
body.story-invert-ui #battle {
  transform: scaleY(-1);
}

body.story-invert-ui #battle .story-battle-banner,
body.story-invert-ui #battle .btn,
body.story-invert-ui #battle .card,
body.story-invert-ui #battle h2,
body.story-invert-ui #battle h3,
body.story-invert-ui #battle p,
body.story-invert-ui #battle span,
body.story-invert-ui #battle label {
  transform: scaleY(-1);
}

body.story-horizon-break .battle-field {
  animation: story-horizon-glitch 1.2s steps(2, end) infinite;
}

body.story-horizon-break::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(180, 40, 255, 0.04) 2px,
    rgba(180, 40, 255, 0.04) 4px
  );
}

@keyframes story-horizon-glitch {
  0%,
  100% {
    filter: hue-rotate(0deg) contrast(1);
  }
  50% {
    filter: hue-rotate(25deg) contrast(1.15);
  }
}

body.story-rupture-fx .battle-field {
  animation: story-rupture-pulse 2.5s ease-in-out infinite;
}

body.story-rupture-fx::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(ellipse at 50% 0%, rgba(120, 60, 200, 0.12), transparent 55%);
}

@keyframes story-rupture-pulse {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(12deg) brightness(1.05);
  }
}

body.story-illusion-ui .tcg-card-face__name,
body.story-illusion-ui .tcg-card-face__cost {
  text-shadow: 0 0 6px rgba(126, 196, 240, 0.5);
}

body.story-illusion-ui .hand-zone .tcg-card:nth-child(odd) .tcg-card-face__name {
  filter: blur(0.4px);
}

body.story-illusion-ui .hand-zone .tcg-card:nth-child(even) {
  transform: rotate(180deg);
}

body.story-illusion-ui .hand-zone .tcg-card:nth-child(even) .tcg-card-face {
  transform: rotate(180deg);
}

/* Banner pós-prólogo */
.story-unlock-banner {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 166, 75, 0.45);
  background: linear-gradient(135deg, rgba(40, 28, 12, 0.9), rgba(18, 14, 10, 0.95));
  text-align: center;
}

.story-unlock-banner__title {
  font-family: var(--font-display);
  color: var(--gold);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.story-unlock-banner__text {
  margin: 0 0 0.85rem;
  line-height: 1.55;
  color: rgba(232, 220, 196, 0.88);
}

/* CTA de batalha no hub do Ato I */
.story-mission-cta {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  border: 2px solid var(--gold);
  background: rgba(20, 16, 10, 0.92);
  text-align: center;
  box-shadow: 0 0 28px rgba(212, 166, 75, 0.12);
}

.story-mission-cta__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.story-mission-cta__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--parchment);
  margin: 0 0 0.35rem;
}

.story-mission-cta__sub {
  margin: 0 0 1rem;
  color: rgba(232, 220, 196, 0.8);
}

.story-mission-cta .btn-story-fight {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  font-size: 1.05rem;
  padding: 0.75rem 1.25rem;
}

.story-act-progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(212, 166, 75, 0.15);
  margin-top: 1rem;
  overflow: hidden;
}

.story-act-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(180, 120, 40, 0.9), var(--gold));
  transition: width 0.35s ease;
}

.story-chapter-card--locked {
  opacity: 0.45;
  pointer-events: none;
}

.story-chapter-card:not(.story-chapter-card--locked) {
  cursor: pointer;
}

.story-chapter-card:not(.story-chapter-card--locked):hover {
  border-color: rgba(212, 166, 75, 0.45);
}

.story-chapter-card__fight {
  display: block;
  margin: 0.65rem 0.75rem 0.75rem;
  width: calc(100% - 1.5rem);
  text-align: center;
  font-size: 0.88rem;
}

.story-chapter-card__badge--lock {
  background: rgba(120, 120, 120, 0.35);
  color: rgba(220, 220, 220, 0.85);
}

.story-act-card__lock--soon {
  color: rgba(212, 166, 75, 0.85);
}

/* Splash de entrada no capítulo (Cap. 1) */
.story-chapter-splash {
  position: relative;
  min-height: min(72vh, 520px);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(212, 166, 75, 0.25);
}

.story-chapter-splash__bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  animation: story-splash-kenburns 14s ease-in-out infinite alternate;
}

.story-chapter-splash__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 4, 0.95) 0%, rgba(8, 6, 4, 0.35) 55%, rgba(8, 6, 4, 0.2) 100%);
}

.story-chapter-splash__content {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.25rem 1.75rem;
  width: 100%;
  text-align: center;
}

.story-chapter-splash__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--parchment);
  margin: 0 0 0.5rem;
}

.story-chapter-splash__lead {
  margin: 0 0 1.1rem;
  line-height: 1.55;
  color: rgba(232, 220, 196, 0.88);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.story-chapter-splash .btn {
  margin: 0.25rem 0.35rem;
}

@keyframes story-splash-kenburns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.12) translate(-2%, -1%);
  }
}

.story-mission-brief__cover {
  margin: 0 0 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.story-mission-brief__cover img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.story-mission-brief__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.story-mission-brief__actions .btn-story-fight {
  font-size: 1.1rem;
  padding: 0.85rem 1.25rem;
  text-align: center;
}

.story-mission-brief__npc-note {
  font-size: 0.88rem;
  opacity: 0.85;
}

.story-mission-brief__npc-sub {
  font-style: italic;
  opacity: 0.9;
}

.story-win-xp {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #c9d4e8;
  opacity: 0.95;
}
