:root {
  color-scheme: dark;
  --night: #151317;
  --surface: #211d23;
  --ink: #f5ede0;
  --muted: #c3b8b4;
  --gold: #f0bd83;
  --clay: #ac6c6c;
  --sea: #9cceca;
  --line: #f0ddc328;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 10% 12%, #2c232a 0, transparent 42%), var(--night);
  color: var(--ink);
  font: 1rem/1.56 var(--sans);
}
a { color: inherit; }
button, input, summary { font: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.07; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 4px;
}
.sr {
  position: absolute; overflow: hidden; width: 1px; height: 1px;
  white-space: nowrap; clip-path: inset(50%);
}
.muted { color: var(--muted); }
.eyebrow {
  color: var(--gold);
  font-size: .74rem;
  font-weight: 730;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.primary, .plain, .utterance {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: .28rem;
  padding: .56rem .91rem;
}
.primary {
  background: var(--gold);
  border-color: transparent;
  color: #251814;
  font-weight: 760;
}
.primary:not(:disabled):hover { background: #ffdaaa; }
.plain { background: #1a171ca6; color: var(--ink); }
.plain:not(:disabled):hover { border-color: var(--gold); }
.primary:disabled, .plain:disabled { opacity: .48; }

.mast {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .48rem clamp(1rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: #17141ad9;
}
.brand { display: flex; align-items: baseline; gap: .68rem; text-decoration: none; white-space: nowrap; font: 1.4rem var(--serif); }
.brand span { color: var(--muted); font: .73rem var(--sans); }
.mast-tools { display: flex; align-items: center; gap: .7rem; }
.room { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.mast .plain { min-height: 38px; padding: .31rem .65rem; font-size: .84rem; white-space: nowrap; }

.lobby {
  min-height: calc(100dvh - 57px);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(18rem,23.5rem);
  align-items: center;
  gap: clamp(1.8rem,7vw,8rem);
  padding: clamp(2rem,6vw,6rem) clamp(1.2rem,7vw,8rem);
  background:
    linear-gradient(90deg,#151317ea 0%,#181318c9 36%,#18131830 85%),
    linear-gradient(0deg,#100e14c7, transparent 66%),
    var(--lobby-art, url('/yedinci/courtyard.webp')) center 48% / cover no-repeat;
}
.opening-title { max-width: 48rem; }
.opening-title h1 {
  margin: .14em 0 .18em;
  font-size: clamp(5rem,13vw,12.5rem);
  letter-spacing: -.092em;
  line-height: .78;
  color: #ffe7cf;
  text-shadow: 0 .11em .36em #120e13b3;
}
.premise { width: min(100%, 29rem); margin-top: 1.5rem; color: #f5e2d4; font-size: clamp(1.1rem, 1.9vw,1.55rem); text-wrap: pretty; }
.room-mode { display: inline-block; margin-top: 1.15rem; color: var(--gold); text-underline-offset: .25em; }
.ticket {
  display: grid;
  gap: .74rem;
  border-radius: .45rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  background: #f2dfc7;
  color: #362528;
  box-shadow: 0 22px 60px #120e13b3;
}
.ticket .eyebrow { color: #754544; }
.ticket h2 { font-size: clamp(1.75rem,3vw,2.28rem); }
.ticket > p:not(.eyebrow) { font-size: .9rem; }
.ticket .primary { background: #51383b; color: #fff0df; }
.ticket .primary:not(:disabled):hover { background: #654346; }
.admin-login { display: grid; gap: .6rem; }
.admin-login input {
  width: 100%; min-width: 0; padding: .62rem .72rem; border-radius: .28rem;
  border: 1px solid #926d68; color: inherit; background: #fff7ec; font: inherit;
}
.admin-login input:focus-visible { outline: 2px solid #51383b; outline-offset: 2px; }
.qr { display: block; width: fit-content; padding: .55rem; background: #fff; border: 1px solid #39252442; }
.qr img { display: block; width: min(100%, 155px); height: auto; }
.phone-url { font-size: .76rem; overflow-wrap: anywhere; text-underline-offset: .18em; }
.people { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; }
.person { white-space: nowrap; display: flex; align-items: center; gap: .38rem; font-size: .89rem; }
.dot { width: .52rem; height: .52rem; border-radius: 50%; background: #9b7b72; display: inline-block; }
.dot.online { background: #356751; }
.tempo { min-width: 0; margin: 0; padding: .42rem .64rem .58rem; border: 1px solid #76595550; border-radius: .26rem; }
.tempo legend { padding: 0 .3rem; font-size: .83rem; font-weight: 730; }
.tempo label { display: flex; align-items: center; gap: .38rem; font-size: .85rem; cursor: pointer; padding: .18rem 0; }
.tempo input { margin: 0; accent-color: #72434b; }

.presentation {
  width: min(100%, 92rem);
  margin: 0 auto;
  padding: clamp(.65rem, 2.5vw, 2.1rem) clamp(.7rem, 3vw, 3.2rem) 2rem;
}
.cinema { min-width: 0; }
.admin .presentation:has(.controls) {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(19rem, 1fr);
  align-items: start;
  gap: clamp(.95rem,2.25vw,1.8rem);
}
.frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: min(64vh, 62vw);
  min-height: 16rem;
  overflow: hidden;
  background: #100e11;
  border: 1px solid #cab3a03d;
  box-shadow: 0 20px 70px #100d14ce;
}
.admin .frame { aspect-ratio: 16/9; height: auto; min-height: 13rem; }
.picture-backdrop, .picture {
  position: absolute;
  width: 100%; height: 100%;
  inset: 0;
  display: block;
  object-fit: cover;
  object-position: 50% 49%;
}
.picture { object-fit: contain; background: #100e11; }
.frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#100e16ab, transparent 24%, transparent 61%, #100e17d9);
  pointer-events: none;
}
.frame-top {
  position: absolute;
  z-index: 1;
  inset: 1rem 1.3rem auto;
  display: flex;
  justify-content: flex-start;
}
.frame-chapter {
  color: #f9e4cd;
  font-size: .73rem;
  letter-spacing: .11em;
  font-weight: 720;
  text-transform: uppercase;
  text-shadow: 0 2px 5px #0b0812;
}
.subtitle {
  position: absolute;
  z-index: 1;
  bottom: clamp(.8rem,3vw,2.5rem);
  left: 50%;
  translate: -50% 0;
  width: min(91%,64rem);
  text-align: center;
  padding: .48rem .9rem;
  background: #151219cd;
  border-radius: .24rem;
  color: #fff6e9;
  box-shadow: 0 2px 12px #0a08114d;
  font-size: clamp(1.05rem,2.05vw,1.85rem);
  font-weight: 570;
  line-height: 1.37;
  text-wrap: pretty;
}
.admin .subtitle { font-size: clamp(.98rem,1.65vw,1.45rem); bottom: .9rem; }
.speaker { display: inline-block; margin-right: .62em; color: var(--gold); font-weight: 740; }
.play-cover { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; background: #14121742; }
.play-cover button { box-shadow: 0 7px 45px #100d18aa; }

.caption-band {
  display: grid;
  gap: .38rem 1.2rem;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  padding: clamp(.9rem,2.2vw,1.55rem) 0 .7rem;
  border-bottom: 1px solid var(--line);
}
.scene-heading h1 { font-size: clamp(2.15rem,4.5vw,4.3rem); letter-spacing: -.035em; text-wrap: balance; }
.admin .scene-heading h1 { font-size: clamp(1.8rem,3.2vw,3.1rem); }
.scene-heading p:not(.eyebrow) { color: var(--muted); margin-top: .32rem; max-width: 53rem; }
.scene-heading p.reflection { color: var(--gold); }
.scene-status { display: flex; flex-wrap: wrap; gap: .36rem; font-size: .8rem; color: var(--muted); align-items: center; }
.status-name { color: var(--ink); padding: .27rem .53rem; border: 1px solid var(--line); border-radius: .2rem; }
.status-name.agreed { border-color: #75a39796; color: var(--sea); }
.clock {
  display: flex;
  align-items: center;
  gap: .65rem;
  grid-column: 1 / -1;
  color: var(--gold);
  min-height: 1.25rem;
  font-size: .83rem;
}
.clock progress { flex: 1; min-width: 0; height: .33rem; appearance: none; border: 0; background: #87746d42; color: var(--gold); }
.clock progress::-webkit-progress-bar { background: #87746d42; }
.clock progress::-webkit-progress-value { background: currentColor; transition: width .16s linear; }
.clock progress::-moz-progress-bar { background: currentColor; }
.clock.short { color: #f59891; }
.clock time { white-space: nowrap; }
.film-tools {
  display: flex; align-items: start; flex-wrap: wrap; gap: .45rem .95rem;
  padding-top: .72rem;
}
.film-tools button, .history-link { min-height: 38px; font-size: .8rem; padding: .35rem .57rem; }
.transport, .line-tools { display: flex; align-items: center; gap: .32rem; }
.line-tools span { font-size: .77rem; color: var(--muted); white-space: nowrap; }
.transcript { color: var(--muted); }
.transcript summary { cursor: pointer; font-size: .88rem; margin: .54rem 0 .42rem; }
.script { display: grid; gap: .43rem; padding: .62rem .72rem; border-left: 2px solid #b18b6d8a; background: #18151bbc; }
.script strong { color: var(--gold); }
.film-tools:has(.transcript[open]) .transcript { flex: 1 0 100%; }
.history-link { margin-top: .7rem; }

.controls { display: block; min-width: 0; }
.role-set { display: grid; gap: .8rem; }
.role-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: .28rem;
  padding: 1rem;
  background: #231d25f0;
}
.role-card.role-1 { border-top-color: var(--sea); }
.role-card h2 { margin: 0 0 .68rem; font-size: 1.38rem; }
.role-card h3 { font-size: 1.17rem; line-height: 1.2; }
.perspective { color: #ecdfd7; font-size: .93rem; }
.perspective strong { display: block; color: var(--gold); margin-bottom: .15rem; }
.role-1 .perspective strong { color: var(--sea); }
.role-wait { color: var(--muted); font-size: .89rem; padding: .5rem 0 .08rem; }
.said { color: #ffe6c4; font-family: var(--serif); font-size: 1.19rem; margin-top: .56rem; }
.advance { margin-top: .75rem; width: 100%; }
.fast-forward, .reset { margin-top: .8rem; }
.answers { display: grid; gap: .5rem; margin-top: .6rem; }
.utterance {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  color: #f9efdd;
  background: #2b2229;
  border-color: #baa18451;
  font-size: 1rem;
  font-family: var(--serif);
  line-height: 1.35;
  padding: .68rem .85rem .69rem 1rem;
}
.utterance:hover:enabled { color: #ffe2bd; border-color: var(--gold); background: #382832; }
.utterance:disabled { opacity: .7; }

.inspection-picture {
  position: relative;
  aspect-ratio: 16/9;
  background: #17141c;
  border: 1px solid var(--line);
  margin-top: .7rem;
}
.inspection-picture > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark-layer { position: absolute; inset: 0; }
.mark {
  --label: #1b171de6;
  appearance: none;
  border: 0;
  background: transparent;
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  z-index: 1;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
}
.mark:hover, .mark:focus-visible, .mark[aria-pressed=true] { z-index: 2; }
.mark i {
  width: 1.06rem; height: 1.06rem; border-radius: 50%;
  background: #21171c; border: 2px solid #ffe7c6;
  box-shadow: 0 0 0 4px #1710187c, 0 1px 9px #08060b;
}
.mark.seen i { border-color: var(--sea); }
.mark[aria-pressed=true] i { background: var(--gold); }
.mark span {
  position: absolute; top: 35px; padding: .19rem .3rem; border-radius: .16rem;
  background: var(--label); color: #fff1df;
  white-space: nowrap; max-width: 146px;
  overflow: hidden; text-overflow: ellipsis;
  font-size: .69rem; line-height: 1.32;
  pointer-events: none;
}
.found { padding: .7rem 0 .14rem; display: grid; gap:.39rem; }
.found p { color: var(--ink); font-size: .9rem; }
.found img, .found video { display: block; width: min(100%, 30rem); max-height: 10rem; object-fit: cover; border-radius: .18rem; }

.handset, .waiting { width: min(100%, 36rem); margin: 0 auto; padding: 1.23rem .92rem 2.1rem; }
.handset .clock { padding-top: .4rem; }
.waiting { padding-top: 2.1rem; }
.waiting h1, .hand-scene h1, .handset > h1 { font-size: clamp(2.2rem,9vw,3.8rem); letter-spacing: -.045em; margin: .16em 0 .25em; }
.waiting p:not(.eyebrow), .hand-scene p:not(.eyebrow) { margin: .34rem 0 .69rem; text-wrap: pretty; }
.hand-scene { margin-bottom: .8rem; }
.waiting form { margin-top: 1rem; display: grid; gap: .4rem; }
.join-fields { display: flex; flex-wrap: wrap; gap: .55rem; }
.join-fields input {
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: .28rem; width: 8rem; font-size: 1.12rem; letter-spacing: .14em;
  padding: .51rem .6rem;
}
.waiting > button { margin-top: .65rem; }

.decision-history {
  max-width: min(42rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem);
  background: #241e26; border: 1px solid #b59b8075;
  border-radius: .4rem; color: var(--ink); padding: 1.15rem;
}
.decision-history::backdrop { background: #0b0910bf; }
.decision-history header { display: flex; align-items: start; justify-content: space-between; gap: .85rem; }
.decision-history h2 { font-size: 1.9rem; }
.decision-history ol { padding-left: 1.3rem; }
.decision-history li { margin-bottom: .9rem; padding-left: .22rem; }
.decision-history h3 { font-size: 1.18rem; margin-bottom: .2rem; }

#notice {
  position: fixed;
  z-index: 10;
  bottom: max(1rem,env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  width: min(92%,34rem);
  padding: .6rem .85rem;
  background: #3b2935;
  color: #fff0df;
  border: 1px solid #dfad6e83;
  border-radius: .28rem;
  box-shadow: 0 .5rem 1.8rem #0d0a12bc;
}

@media (max-width: 860px) {
  .admin .presentation:has(.controls) { display: block; }
  .admin .controls { margin-top: 1rem; }
  .admin .role-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby { gap: 1.6rem; padding-inline: 1.35rem; }
  .opening-title h1 { font-size: clamp(4.45rem,14vw,8rem); }
}
@media (max-width: 600px) {
  .brand { font-size: 1.2rem; }
  .brand span { display: none; }
  .mast { min-height: 49px; }
  .lobby { grid-template-columns: minmax(0,1fr); align-items: start; }
  .ticket { width: min(100%,27rem); }
  .qr img { width: 135px; }
  .caption-band { grid-template-columns: minmax(0,1fr); align-items: start; }
  .frame { height: 58vw; min-height: 13.2rem; }
  .frame-top { inset: .48rem .6rem auto; }
  .subtitle { width: 96%; bottom: .6rem; font-size: .91rem; }
  .admin .role-set { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
