.header-actions, .ending-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.header-actions [aria-pressed="true"] { border-color: #d4ad84; background: #484036; }
.difficulty label { font-weight: 700; margin-right: 6px; }
.difficulty select {
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 4px 12px;
  font: inherit;
}
.difficulty p { color: var(--muted); margin-top: 5px; font-size: .9rem; }
.sources { border-top: 1px solid var(--line); margin: 12px 0; padding: 9px 0; }
.sources p { font-size: .9rem; margin-top: 7px; }
.sources a { color: var(--red-dark); }
.warning { border-inline-start: 3px solid var(--red); padding-inline-start: 10px; color: var(--red-dark); }
.fact.suggested { outline: 2px solid #8d7043; outline-offset: -2px; background: #eee5d3; }
.confrontation { display: flex; gap: 4px; margin-top: 12px; }
.confrontation span { flex: 1; padding: 4px; text-align: center; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .82rem; }
.confrontation .exposed { border-color: var(--red); color: var(--red-dark); font-weight: 700; background: #f1e3d5; }
.confrontation .fresh { animation: imprint .48s ease-out; }
.cutscene { border: 1px solid #473e33; background: #222722; color: #faefda; }
.frame { position: relative; isolation: isolate; overflow: hidden; height: clamp(230px, 50vw, 470px); }
.cinema-svg { width: 100%; height: 100%; display: block; object-fit: cover; animation: reveal .7s ease both; }
.cg-lantern-glow { animation: lantern 3.8s ease infinite alternate; }
.cg-boat { animation: cg-glide 5.5s ease-out both; }
.cg-seal { animation: stamp .52s ease-out both; transform-origin: 480px 270px; }
@keyframes cg-glide { from { transform: translate(290px, 328px); } to { transform: translate(395px, 318px); } }
.stage-image { position: absolute; inset: 0; overflow: hidden; animation: reveal .65s ease both; }
.stage-image > i { position: absolute; display: block; }
.cut-copy { padding: clamp(16px, 4vw, 30px); display: flex; gap: 20px; align-items: end; justify-content: space-between; }
.cut-script { max-width: 38rem; }
.cut-script .overline { color: #efbc94; }
.cut-script h1 { margin-top: 4px; font-size: clamp(1.85rem, 4vw, 3rem); }
.cut-script > p:last-child { margin-top: 10px; font-size: clamp(.95rem, 2vw, 1.1rem); }
.cut-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cut-controls span { font-size: .88rem; color: #e3d4b7; padding: 0 4px; }
.cut-controls .plain { color: #faefda; border-color: #81735f; }
.cut-controls .plain:hover { background: #403c32; }

.frame-gate { background: linear-gradient(160deg, #a5ac99, #3c4a40 59%, #222d28); }
.peak { background: #36443a; inset: 24% 0 0; clip-path: polygon(0 47%, 16% 15%, 24% 33%, 45% 2%, 64% 51%, 81% 18%, 100% 48%, 100% 100%, 0 100%); }
.gate-roof { z-index: 1; background: #242724; width: 65%; height: 34%; bottom: 36%; left: 19%; clip-path: polygon(0 99%, 22% 50%, 29% 18%, 71% 18%, 80% 51%, 100% 99%, 77% 95%, 26% 95%); }
.gate-wall {
  width: 48%;
  height: 41%;
  left: 28%;
  bottom: 0;
  border: 12px solid #3a382d;
  background: repeating-linear-gradient(90deg, #2d3029 0 5%, #50473a 5% 8%);
}
.gate-light { z-index: 2; width: 4%; height: 14%; bottom: 22%; left: 50%; background: #c09162; box-shadow: 0 0 36px #e4ac77; animation: lantern 4s ease infinite alternate; }
.snow {
  z-index: 3;
  inset: -25%;
  opacity: .6;
  background-image: radial-gradient(circle, #efe9d8 1px, transparent 1.5px), radial-gradient(circle, #e6eadc 1px, transparent 1.4px);
  background-size: 71px 83px, 113px 57px;
  background-position: 0 0, 15px 32px;
  animation: snowfall 9s linear infinite;
}
.frame-board { background: radial-gradient(ellipse at 52% 42%, #8b6950, #3e332a 66%, #252a25); }
.stage-image > .wood-board {
  inset: 13% auto 12% 31%;
  display: grid;
  place-content: center;
  width: 38%;
  border: clamp(5px, 1vw, 13px) solid #865634;
  background: repeating-linear-gradient(175deg, #452c20 0 3px, #603f2c 3px 16px);
  color: #f1c99e;
  font: normal clamp(2.8rem, 6.5vw, 6rem)/1 var(--serif);
  text-align: center;
  box-shadow: 8px 17px 0 #171a1277;
  transform: rotate(-6deg);
}
.wood-board b { scale: -1 1; font-weight: inherit; }
.split-token { width: 14%; height: 13%; bottom: 14%; background: #b18a5e; border: 2px solid #d0a974; box-shadow: 3px 8px #20190b55; }
.split-token.left { left: 38%; clip-path: polygon(0 0, 95% 0, 85% 32%, 99% 65%, 91% 100%, 0 100%); }
.split-token.right { left: 51%; clip-path: polygon(3% 0, 100% 0, 100% 100%, 0 100%, 11% 65%, 0 32%); }
.epilogue-sky .split-token.left { animation: half-left 2.4s ease-out both; }
.epilogue-sky .split-token.right { animation: half-right 2.4s ease-out both; }
.frame-latch { background: #282320; }
.door { inset: 0; background: repeating-linear-gradient(90deg, #4f3a2a 0 8%, #382c25 8.5% 9.5%, #5c4430 10% 18%); opacity: .8; }
.latch, .latch-loop { background: #251e1a; border: 2px solid #977357; box-shadow: 3px 10px #22171180; }
.latch { width: 64%; height: 15%; left: 18%; top: 48%; animation: lock 1.4s cubic-bezier(.22,.9,.25,1) both; }
.latch-loop { width: 10%; height: 22%; top: 44%; left: 48%; background: #573e2b; }
.epilogue-ice .latch { animation: unlock 3s ease-in-out both; }
.epilogue-ice .gate-light { background: #e7ab76; box-shadow: -90px 5px 30px 5px #e7ab76, 105px 18px 30px 5px #e7ab76; }
.frame-river { background: linear-gradient(#dbbaa0, #eee0c4 54%, #829385 57%, #425f5c); }
.frame-river .peak { background: #8b9b88; inset: 22% 0 32%; }
.water { inset: 55% 0 0; opacity: .45; background: repeating-linear-gradient(3deg, transparent 0 14px, #e0e4c9 15px, transparent 17px 32px); }
.boat { width: 17%; height: 7%; left: 38%; top: 68%; background: #332c25; border-radius: 8% 10% 52% 49%; animation: cross 6s ease-out both; }
.boat b { position: absolute; top: -92%; width: 46%; height: 100%; left: 25%; border-radius: 90% 90% 0 0; background: #40352b; }
.frame-seal { background: radial-gradient(ellipse, #f0deb5, #cbb181); }
.stage-image > .ending-seal {
  display: grid;
  place-content: center;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  padding: .25em;
  border: .08em solid #862f27;
  color: #862f27;
  border-radius: .08em;
  font: 700 clamp(2.8rem, 8vw, 7rem)/1.04 var(--serif);
  animation: stamp .48s ease-out both;
}
.cut-paused .snow, .cut-paused .gate-light { animation-play-state: paused; }
.decision-bar.confirmed {
  animation: imprint .38s ease-out;
  border-top-color: var(--red);
}

@keyframes reveal { from { opacity: .3; scale: 1.03; } to { opacity: 1; scale: 1; } }
@keyframes snowfall { to { transform: translate(-71px, 83px); } }
@keyframes lantern { to { opacity: .65; } }
@keyframes lock { from { translate: 33% 0; } to { translate: 0 0; } }
@keyframes unlock { 0%, 25% { translate: 0 0; } 100% { translate: 59% 0; } }
@keyframes cross { from { translate: -90% 0; } to { translate: 90% -12%; } }
@keyframes half-left { from { translate: -75% 0; } to { translate: 0 0; } }
@keyframes half-right { from { translate: 70% 0; } to { translate: 0 0; } }
@keyframes stamp { from { opacity: 0; scale: 1.55; rotate: -4deg; } to { opacity: 1; scale: 1; rotate: 2deg; } }
@keyframes imprint { 40% { background: #efd1bd; } }

@media (max-width: 720px) {
  .header-actions { gap: 4px; justify-content: end; }
  .header-actions .button { padding-inline: 6px; }
  .cut-copy { flex-direction: column; align-items: start; }
  .frame { height: clamp(230px, 70vw, 370px); }
}
@media (prefers-reduced-motion: reduce) {
  .stage-image, .stage-image > i, .decision-bar.confirmed, .confrontation .fresh { animation: none !important; }
}
