.page-film { background: #07080b; }
.page-film h1, .page-film h2, .page-film h3 {
  font-family: Cinzel, serif;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: .02em;
}
.page-film h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.02; margin: .15rem 0 .35rem; }
.page-film h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .2rem 0 .8rem; }
.banner { margin: 0; padding: .8rem 1.2rem; text-align: center; }
.banner.ok { background: rgba(198, 161, 90, .16); color: var(--gold-bright); }
.banner.err { background: rgba(140, 36, 40, .35); color: #f4ecdc; }
.quiet { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

.film-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.film-bg, .film-vignette, .film-fog, #embers {
  position: absolute;
  inset: 0;
}
.film-bg {
  background: url("/assets/img/film/film-hero.webp") 72% center / cover no-repeat;
}
.film-vignette {
  background:
    linear-gradient(90deg, rgba(7, 8, 11, .92) 0%, rgba(7, 8, 11, .72) 38%, rgba(7, 8, 11, .18) 68%, rgba(7, 8, 11, .55) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, .72) 100%);
}
.film-fog {
  background: linear-gradient(180deg, transparent 40%, rgba(232, 214, 170, .05) 70%, transparent 100%);
  animation: fogDrift 28s ease-in-out infinite;
  pointer-events: none;
}
#embers { width: 100%; height: 100%; pointer-events: none; }
@keyframes fogDrift {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(-18px); opacity: .8; }
}
.film-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6.5rem 0 2.2rem;
}
.hero-line {
  font-family: Cinzel, serif;
  color: var(--gold);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  margin: 0 0 1rem;
}
.film-hero .lede { max-width: 38rem; color: var(--parchment); }
.hero-actions, .export-row, .row-actions, .move-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0; }
.film-status {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.4rem auto 0;
}
.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 0;
  max-width: 44rem;
}
.status-row div {
  border: 1px solid rgba(198, 161, 90, .45);
  background: rgba(7, 8, 11, .55);
  padding: .75rem .8rem .65rem;
}
.status-row dt {
  font-family: Cinzel, serif;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.status-row dd { margin: .25rem 0 0; font-size: 1.55rem; color: var(--gold-bright); }
.status-note { max-width: 38rem; color: var(--muted); font-size: .92rem; }

.ornament {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: min(1180px, calc(100% - 2rem));
  margin: .4rem auto;
  color: var(--gold);
}
.ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 161, 90, .75), transparent);
}
.band { width: min(1180px, calc(100% - 2rem)); margin: 0 auto 2.5rem; }
.section-copy { max-width: 40rem; color: var(--muted); }

.beat-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.beat-col h3 { font-size: 1.05rem; margin: 0 0 .7rem; }
.beat-card, .pitch-card, .panel, .review-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(198, 161, 90, .45);
  background: rgba(16, 14, 12, .88);
  padding: .9rem;
  margin-bottom: .7rem;
}
.beat-card strong, .pitch-card h3 { display: block; color: var(--gold-bright); font-family: Cinzel, serif; }
.beat-card span { display: block; color: var(--muted); margin-top: .35rem; }
.sample-flag {
  display: inline-block;
  margin: 0 .35rem .4rem 0;
  padding: .12rem .4rem;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: Cinzel, serif;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.reader { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.scene-nav, .scene-col, .notes-col {
  position: sticky;
  top: calc(var(--header) + .6rem);
}
.scene-nav a, #scene-list button.scene-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--gold-bright);
  border: 0;
  border-left: 2px solid rgba(198, 161, 90, .35);
  padding: .45rem .6rem;
  margin: 0 0 .2rem;
  cursor: pointer;
  font: inherit;
}
.scene-nav a:hover, #scene-list button.scene-link.is-on { border-left-color: var(--gold); background: rgba(198, 161, 90, .08); }
.paper {
  background: #f7f4ec;
  color: #1a140c;
  width: min(8.5in, 100%);
  margin: 0 auto;
  padding: 1in 1in 1in 1.5in;
  font-family: "Courier New", Courier, monospace;
  font-size: 12pt;
  line-height: 1.05;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.title-page { text-align: center; margin-bottom: 1.4in; }
.title-page h3 { font-family: "Courier New", Courier, monospace; color: #1a140c; font-size: 12pt; letter-spacing: 0; text-transform: uppercase; }
.title-line { margin: .15rem 0; white-space: pre-wrap; }
.paper .el { margin: 0 0 1em; min-height: 1em; white-space: pre-wrap; }
.paper .el-character, .paper .el-dialogue, .paper .el-paren { margin-bottom: 0; }
.paper .el-dialogue + .el-character { margin-top: 1em; }
.paper .el-scene, .paper .el-shot, .paper .el-character, .paper .el-transition { text-transform: uppercase; }
.paper .el-character { margin-left: 2.2in; margin-bottom: 0; }
.paper .el-dialogue { margin-left: 1in; margin-right: 1.5in; margin-bottom: 0; }
.paper .el-paren { margin-left: 1.6in; margin-right: 2in; margin-bottom: 0; }
.paper .el-transition { text-align: right; }
.paper .el.is-reading { background: rgba(198, 161, 90, .28); }
.cites { list-style: none; padding: .4rem 0 0; margin: 0 0 1.2rem; font-family: Inter, sans-serif; font-size: .82rem; }
.cites a { color: #6d5424; }
.credits { font-family: Inter, sans-serif; font-size: .85rem; text-align: center; }
.script-scene + .script-scene { margin-top: 1.2rem; }

.pitch-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.pitch-card h3 { font-size: 1.05rem; margin: .2rem 0 .4rem; }
.vote-row { display: flex; gap: .5rem; }
.stack-form { display: grid; gap: .45rem; margin-top: 1rem; max-width: 36rem; }
.stack-form[hidden], #join-forms[hidden], .ac[hidden], #view-cards[hidden], #view-people[hidden], #view-page[hidden], .typebar[hidden], .keys[hidden] { display: none; }
.stack-form input, .stack-form textarea, .stack-form select, .scene-jump, .role-row select {
  width: 100%;
  background: #100e0c;
  color: var(--parchment);
  border: 1px solid rgba(198, 161, 90, .45);
  border-radius: 2px;
  padding: .7rem .75rem;
  font: inherit;
}
.paper .stack-form, .desk .stack-form input, .desk .stack-form textarea, .desk .stack-form select,
.notes-col input, .notes-col textarea, .notes-col select, .scene-col select {
  background: #14110e;
}
.stack-form textarea { min-height: 7rem; }
.stack-form label, .check { color: var(--gold); font-size: .82rem; }
.cine {
  position: relative;
  margin: 1rem 0 2rem;
  background: url("/assets/img/film/film-hero.webp") 70% center / cover no-repeat;
}
.cine-shade {
  background: linear-gradient(90deg, rgba(7, 8, 11, .92), rgba(7, 8, 11, .78) 55%, rgba(7, 8, 11, .55));
}
.cine-copy { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0; }
.signed-in { color: var(--gold-bright); }
.queue-link { width: min(1180px, calc(100% - 2rem)); margin: 0 auto 2rem; }
.queue-link a { color: var(--gold); }

.room-main { width: min(1280px, calc(100% - 1.2rem)); margin: 0 auto 2rem; }
.room-bar { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; justify-content: space-between; padding-top: 1rem; }
.room-bar h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.draft-label, .save-state, .presence, .keys { color: var(--muted); }
.save-state { min-height: 1.2em; }
.room-tools { display: flex; flex-wrap: wrap; gap: .45rem; }
.room-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) 260px; gap: .8rem; margin-top: .6rem; }
.scene-col, .notes-col, .desk { min-width: 0; }
.notes-col h2 { font-size: 1rem; margin: .8rem 0 .4rem; }
.view-switch, .typebar { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.typebar .btn, .view-switch .btn { min-height: 34px; padding: .35rem .55rem; letter-spacing: .08em; }
.page { min-height: 11in; outline: none; }
.page:focus { outline: none; }
.ac {
  position: absolute;
  z-index: 5;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #1a140c;
  border: 1px solid var(--gold);
  min-width: 12rem;
}
.ac button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--gold-bright);
  border: 0;
  padding: .4rem .6rem;
  font-family: "Courier New", Courier, monospace;
  cursor: pointer;
}
.ac button.is-on, .ac button:hover { background: var(--gold); color: var(--ink); }
.paper-wrap { position: relative; }
.note-card, .version-card { border-top: 1px solid rgba(198, 161, 90, .3); padding: .45rem 0; }
.note-card b, .version-card b { color: var(--gold-bright); font-weight: 600; }
.card-board { display: grid; gap: .7rem; }
.card-board h3 { margin-bottom: .35rem; }
.index-card {
  background: #f7f4ec;
  color: #1a140c;
  border: 0;
  border-top: 4px solid var(--gold);
  padding: .7rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  width: 100%;
}
.index-card strong { font-family: "Courier New", Courier, monospace; }
.rev-blue { border-top-color: #5b8def; }
.rev-pink { border-top-color: #e38bb4; }
.rev-yellow { border-top-color: #e6c14a; }
.rev-green { border-top-color: #6ea36a; }
.rev-goldenrod { border-top-color: #c6a15a; }
.rev-buff { border-top-color: #d8c3a5; }
.rev-salmon { border-top-color: #e39a86; }
.rev-cherry { border-top-color: #8c2428; }
.diff { font-family: "Courier New", Courier, monospace; font-size: .82rem; background: #100e0c; padding: .5rem; overflow: auto; }
.diff-add { background: rgba(110, 163, 106, .25); }
.diff-del { background: rgba(140, 36, 40, .35); text-decoration: line-through; }
.fountain-preview { white-space: pre-wrap; color: var(--muted); font-family: "Courier New", Courier, monospace; }
.role-row, .review-card { margin-top: .8rem; }
.role-row { display: grid; gap: .4rem; align-items: center; }
.admin-main h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.panel { margin-top: 1rem; }
.panel h2 { font-size: 1.25rem; }

#scene-jump { width: 100%; max-width: 100%; }
@media (min-width: 981px) {
  #scene-jump { display: none; }
}
@media (min-width: 800px) {
  .role-row { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(6rem, .6fr)) auto; }
  .card-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .film-hero { min-height: auto; }
  .film-bg { background-position: 62% center; }
  .status-row, .beat-board, .reader, .pitch-wall, .room-grid { grid-template-columns: 1fr; }
  .scene-nav, .scene-col, .notes-col { position: static; }
  .room-bar h1 { font-size: 1.7rem; }
}

@media (max-width: 700px) {
  .paper {
    padding: .85rem .7rem .85rem .85rem;
    font-size: 15px;
    line-height: 1.25;
  }
  .paper .el-character { margin-left: 18%; }
  .paper .el-dialogue { margin-left: 8%; margin-right: 8%; }
  .paper .el-paren { margin-left: 14%; margin-right: 12%; }
  .title-page { margin-bottom: 1.5rem; }
  .page { min-height: 70vh; }
  .status-row { grid-template-columns: 1fr 1fr; }
  .keys { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .film-fog { animation: none; }
}
