* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'EB Garamond', Georgia, serif;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px 0;
}
.frame {
  position: relative;
  width: 100vw;
  max-width: 1600px;
  background: #14110d;
  overflow: hidden;
}
.stage-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.panel-spacer {
  width: 100%;
  height: 14vh;
  background: #14110d;
}
.layer { position: absolute; inset: 0; }
.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.7s ease;
  animation: kb 34s ease-in-out infinite alternate;
}
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1.2%, -0.8%); } }
@keyframes charIn { from { opacity: 0; transform: translateY(3%); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.screen-fade {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #050403;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.screen-fade.show { opacity: 1; }
.vignette {
  background: linear-gradient(to bottom, rgba(10,9,8,0.25) 0%, rgba(10,9,8,0.02) 22%, rgba(10,9,8,0.05) 50%, rgba(10,9,8,0.72) 100%);
}
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: none;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  z-index: 5;
}
.top-left { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10,9,8,0.5);
  border: 1px solid rgba(216,201,163,0.35);
  color: #d8c9a3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: rgba(10,9,8,0.85); border-color: #c89a3e; }
.icon-btn.playing { color: #c89a3e; border-color: #c89a3e; }
.day-label {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 10.5px;
  letter-spacing: 2px;
  color: #d8c9a3;
  text-transform: uppercase;
  opacity: 0.85;
}
.scene-title {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #f0e6cc;
  text-transform: uppercase;
}
.progress { display: flex; gap: 5px; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(216,201,163,0.3);
  transition: background 0.3s ease;
}
.dot.active { background: #c89a3e; }
.dot.done { background: #6f7a4a; }
.sprites { z-index: 2; }
.sprite {
  position: absolute;
  bottom: 0;
  width: auto;
  object-fit: contain;
  opacity: 0;
  transform: var(--tx, translateX(0)) translateY(3%);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.4s ease;
}
.sprite.show { opacity: 1; transform: var(--tx, translateX(0)) translateY(0); }
/* 5 позиций постановки (v3): дальний левый / слева / центр / справа / дальний правый */
.sprite.pos-back_left { left: 0; height: 58%; z-index: 1; }
.sprite.pos-left { left: 4%; height: 78%; z-index: 2; }
.sprite.pos-center { left: 50%; --tx: translateX(-50%); height: 80%; z-index: 2; }
.sprite.pos-right { right: 6%; height: 78%; z-index: 2; }
.sprite.pos-back_right { right: 0; height: 58%; z-index: 1; }
.dialogue-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  background: linear-gradient(to top, rgba(8,6,4,0.95) 0%, rgba(8,6,4,0.78) 55%, rgba(8,6,4,0) 100%);
  padding: 30px 40px 16px;
  height: 24vh;
  cursor: pointer;
  display: none;
}
.narration {
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: #bda57c;
  margin-bottom: 8px;
  max-width: 100%;
  min-height: 60px;
  animation: fadeUp 0.5s ease both;
}
.narration.speech { font-style: normal; color: #e6d3a3; }
.narration .speaker-name {
  display: block;
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  color: #c89a3e;
  margin-bottom: 5px;
}
.advance-hint {
  position: absolute;
  right: 16px;
  bottom: 10px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: #9a8f74;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}
.advance-hint.show { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,50% { opacity: 0.5; } 25%,75% { opacity: 1; } 100% { opacity: 0.5; } }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }
.dilemma-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.dilemma-label {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #c89a3e;
  white-space: nowrap;
}
.dilemma-text {
  font-size: 16px;
  line-height: 1.5;
  color: #cfc4a8;
}
.prop-card {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(200,154,62,0.4);
  border-radius: 3px;
  padding: 6px 10px 6px 6px;
  margin-bottom: 12px;
  max-width: 340px;
  animation: fadein 0.5s ease forwards;
}
.prop-card.show { display: flex; }
.prop-card img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 2px;
}
.prop-card span {
  font-size: 12px;
  font-style: italic;
  color: #cfc4a8;
  line-height: 1.4;
}
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(216,201,163,0.25);
  border-radius: 3px;
  padding: 11px 14px;
  cursor: pointer;
  text-align: left;
  font-family: 'EB Garamond', serif;
  font-size: 15.5px;
  color: #e6dcc4;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.choice:hover:not(:disabled) { background: rgba(255,255,255,0.13); border-color: #c89a3e; }
.choice:active:not(:disabled) { transform: scale(0.99); }
.choice:disabled { cursor: default; opacity: 0.45; }
.choice.chosen { background: rgba(200,154,62,0.18); border-color: #c89a3e; opacity: 1; }
.choice.pulse { animation: choicepulse 0.5s ease; }
@keyframes choicepulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.045); }
  100% { transform: scale(1.02); }
}
.choice-letter {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 11px;
  color: #14110d;
  background: #c89a3e;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.value-toast {
  position: absolute;
  top: 64px;
  right: 18px;
  z-index: 6;
  background: rgba(15,13,10,0.88);
  border: 1px solid rgba(200,154,62,0.4);
  border-radius: 4px;
  padding: 10px 14px;
  max-width: 260px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.value-toast.show { opacity: 1; transform: translateY(0); }
.value-toast .reveal-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.value-toast .consequence { font-size: 12px; line-height: 1.45; color: #b8ac8e; font-style: italic; }
.tag {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}
.tag.chosen-tag { background: #c89a3e; color: #3a2412; }
.tag.rejected-tag { background: transparent; color: #8a7a5c; text-decoration: line-through; border: 1px solid #55503f; }
.consequence { font-size: 12.5px; line-height: 1.5; color: #b8ac8e; font-style: italic; margin-bottom: 10px; }
.next-btn {
  background: #23515f;
  color: #ece2c6;
  border: none;
  padding: 9px 20px;
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.next-btn:hover { background: #2d6879; }
.overlay-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(8,7,6,0.55);
  padding: 20px;
}
.overlay-screen.show { display: flex; }
.menu-eyebrow {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #c89a3e;
  margin-bottom: 14px;
}
.menu-title {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ecd9a8;
  margin-bottom: 8px;
}
/* каскадное появление строк меню */
#menu-screen.show .menu-eyebrow { animation: fadeUp 0.7s ease 0.2s both; }
#menu-screen.show .menu-title { animation: fadeUp 0.7s ease 0.5s both; }
#menu-screen.show .menu-subtitle { animation: fadeUp 0.7s ease 0.9s both; }
#menu-screen.show .menu-actions { animation: fadeUp 0.7s ease 1.3s both; }
#menu-screen.show .auth-box { animation: fadeUp 0.7s ease 1.6s both; }
.menu-subtitle {
  font-style: italic;
  font-size: 14px;
  color: #cfc4a8;
  margin-bottom: 34px;
  max-width: 420px;
}
.menu-actions { display: flex; flex-direction: column; gap: 10px; width: 220px; }
.menu-btn {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(216,201,163,0.5);
  color: #e6dcc4;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.menu-btn.primary { background: #b1502e; border-color: #b1502e; color: #fbe9dc; }
.menu-btn.primary:hover { background: #c65e3a; }
.menu-btn:not(.primary):hover { border-color: #c89a3e; color: #f0e6cc; }
.menu-btn:disabled { opacity: 0.35; cursor: default; }
.menu-btn:disabled:hover { border-color: rgba(216,201,163,0.5); }
.end-summary { font-size: 13px; line-height: 1.7; color: #cfc4a8; max-width: 420px; margin-bottom: 28px; }
.end-summary .tag { margin: 0 4px 4px 0; display: inline-block; }
.auth-box { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.google-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 9px 16px;
  font-family: 'EB Garamond', serif;
  font-size: 13.5px;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.google-btn:hover { box-shadow: 0 1px 6px rgba(0,0,0,0.3); }
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(216,201,163,0.3);
  border-radius: 20px;
  padding: 5px 8px 5px 5px;
}
.user-badge img { width: 26px; height: 26px; border-radius: 50%; }
.user-badge span { font-size: 13px; color: #e6dcc4; }
.user-badge button {
  background: none;
  border: none;
  color: #9a8f74;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.user-badge button:hover { color: #c89a3e; }
.hint { position: absolute; bottom: 10px; font-size: 11px; color: #9a8f74; }
/* Экран выбора истории — вариант «Кино»: дышащая полноэкранная галерея */
.overlay-screen.story-select {
  padding: 0;
  background: #0b0908;
  flex-direction: column;
}
.kino-head {
  position: absolute;
  top: 22px; left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.kino-gallery {
  position: absolute;
  inset: 0;
  display: flex;
}
.kino-col {
  position: relative;
  flex: 1;
  min-width: 0;
  border: none;
  border-right: 1px solid rgba(10,8,6,0.9);
  background-color: #14110d;
  background-size: cover;
  background-position: center top;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: flex 0.5s cubic-bezier(.3,.7,.3,1), filter 0.4s ease;
}
.kino-col:hover:not(.locked) { flex: 1.7; }
.kino-col.locked {
  cursor: default;
  filter: grayscale(0.75) brightness(0.62) sepia(0.15);
}
.kino-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,6,4,0.92) 0%, rgba(8,6,4,0.35) 45%, rgba(8,6,4,0.15) 100%);
}
.kino-letter {
  position: absolute;
  top: 34%;
  left: 0; right: 0;
  text-align: center;
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: clamp(48px, 7vw, 96px);
  color: rgba(200,154,62,0.35);
}
.kino-letter small {
  display: block;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: #9a8f74;
  letter-spacing: 1px;
  margin-top: 6px;
}
.kino-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}
.kino-name {
  font-family: 'Cinzel', 'Cormorant SC', serif;
  font-size: 17px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ecd9a8;
}
.kino-desc {
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  color: #cfc4a8;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.45s ease 0.15s, max-height 0.45s ease;
}
.kino-col:hover:not(.locked) .kino-desc { opacity: 1; max-height: 120px; }
.kino-col.locked .kino-desc { opacity: 0.7; max-height: none; overflow: visible; font-size: 12px; }
.menu-btn.kino-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  width: auto;
  padding: 9px 18px;
  background: rgba(10,9,8,0.55);
}
