/* The look of every screen: the navy of the Hotel Indigo logo, lighter at the
   top of the page, with gold for the things to press. The welcome page
   (welcome.css) set the style; these are the same colours. */
:root {
  --bg: #081c31;                        /* the page, at its darkest */
  --panel: rgba(255, 255, 255, .055);   /* a panel lying on the page */
  --panel-2: rgba(255, 255, 255, .09);  /* a button or a box inside a panel */
  --solid: #10294a;                     /* the same, for things that float over the page */
  --solid-2: #183a60;
  --field: rgba(3, 14, 28, .5);         /* where people type */
  --line: rgba(255, 255, 255, .14);
  --text: #f3f6fb;
  --muted: #a8b8cd;
  --brand: #dcb978;                     /* gold */
  --brand-ink: #10243b;                 /* text on gold */
  --air: #e5484d;
  --ok: #3dd68c;
  --warn: #f5b942;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(90% 520px at 50% -60px, #23578c 0%, rgba(35, 87, 140, 0) 72%),
    linear-gradient(180deg, #0e2e4f 0, #081c31 900px);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: #ecd3a0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; }
h2 { font-size: 1rem; letter-spacing: .02em; }
p { margin: 0; }
/* The hotel's logo on page headers: white lettering, straight on the navy.
   To change it, replace public/brand/logo-white.png. */
.brand { display: block; height: 64px; width: auto; }

/* Going from the welcome page into a room is a fade through the hotel logo.
   This is the logo on navy that does it: it fades in over the welcome page,
   is already up when the room's page arrives, and fades out once the room is
   ready. (.veil.on = showing.) */
.veil {
  position: fixed; inset: 0; z-index: 200; display: grid; justify-items: center; align-content: center;
  background: radial-gradient(70% 55% at 50% 46%, #1a4877 0%, #0c2947 62%, #081c31 100%);
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s;
}
.veil.on {
  opacity: 1; visibility: visible; transition: opacity .45s ease;
  animation: veil-give-up 0s linear 25s forwards; /* never left up over a page that failed to start */
}
.veil img { display: block; width: min(64vw, 300px); height: auto; transform: scale(1.05); transition: transform .7s ease; }
.veil.on img { transform: none; } /* the logo settles as it arrives and eases forward as it leaves */

/* Under the logo: a gold line that glides from side to side for as long as the
   logo is up, so a wait never looks like a frozen screen, and a few words
   saying what is happening. */
.veil-line { position: relative; width: 170px; height: 3px; margin-top: 30px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.veil-line::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 2px; background: var(--brand); }
.veil.on .veil-line::after { animation: veil-glide 1.3s ease-in-out infinite alternate; }
.veil p {
  min-height: 1.5em; margin-top: 16px; color: rgba(255, 255, 255, .74);
  font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  transition: opacity .25s ease;
}
.veil p.swap { opacity: 0; } /* the words fade out, change, and fade back in */
@keyframes veil-glide { from { transform: translateX(0); } to { transform: translateX(150%); } }
@keyframes veil-breathe { from { opacity: .3; } to { opacity: 1; } }
@keyframes veil-give-up { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .veil, .veil.on, .veil img, .veil p { transition: none; }
  /* Still alive, without anything sliding: the whole line slowly brightens and dims. */
  .veil-line::after { width: 100%; }
  .veil.on .veil-line::after { animation: veil-breathe 1.6s ease-in-out infinite alternate; }
}

.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */

.page { max-width: 1320px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 24px 16px 48px; }

.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(4, 16, 30, .32);
}
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { font-size: 1.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The hotel's logo at the left of the bar; a press goes back to the welcome page. */
.topbar-logo { display: block; flex: none; padding-right: 14px; border-right: 1px solid var(--line); }
.topbar-logo img { display: block; height: 40px; width: auto; }
@media (max-width: 560px) { .topbar-logo { display: none; } } /* a phone needs the room for the title */

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}

/* On a room just made from the welcome page: what was set up, and what to do next. */
.start-note {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); max-width: 1288px; margin: 16px auto 0;
  padding: 12px 14px; border: 1px solid rgba(220, 185, 120, .5); background: rgba(220, 185, 120, .1); border-radius: 12px;
}
.start-note p { flex: 1; min-width: 0; }
.start-note b { margin-right: 4px; }
.panel + .panel { margin-top: 16px; }
.panel > h2 { margin-bottom: 12px; }
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; letter-spacing: 0; }

/* A box that folds away when its heading is pressed (the boxes at the side of
   the producer screen). The heading is a button: the name, a short note that
   still shows when the box is folded (how many people, say), and an arrow. */
.fold > h2 { margin: 0; }
.fold-head {
  display: flex; align-items: baseline; justify-content: flex-start; gap: 10px; width: 100%; min-height: 0;
  padding: 6px 0; margin: -6px 0; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left;
}
.fold-head:hover .chev { opacity: 1; }
.fold-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 5px; }
.fold-note { font: 600 .8rem/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--muted); letter-spacing: .01em; }
.fold-note:empty { display: none; }
.fold-head .chev { margin-left: auto; align-self: center; width: 20px; height: 20px; flex: none; opacity: .65; transition: transform .2s ease, opacity .2s ease; }
.fold.folded .chev { transform: rotate(-90deg); }
.fold-body { margin-top: 12px; }
.fold.folded .fold-body { display: none; }

.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 0; }

/* ---------- controls ---------- */

button, .button {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 10px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
}
button:hover, .button:hover { border-color: rgba(255, 255, 255, .4); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.primary:hover:not(:disabled), .button.primary:hover { background: #e7c98f; border-color: #e7c98f; }
button.danger { background: var(--air); border-color: var(--air); color: #fff; }
button.on { background: rgba(220, 185, 120, .2); border-color: var(--brand); color: #fff; }
button.big { padding: 14px 18px; font-size: 1.05rem; width: 100%; }
button.tiny, .button.tiny { min-height: 32px; padding: 4px 10px; font-size: .85rem; font-weight: 600; }

label, .label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
textarea { resize: vertical; line-height: 1.4; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="time"], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: inherit; min-height: 44px;
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .38); }
select { background-color: #0b2038; } /* solid, so the list that drops down can be read */
select.tiny { width: auto; min-height: 32px; padding: 3px 8px; font-size: .85rem; border-radius: 8px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
input[type="color"] { width: 48px; height: 44px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); }
input[type="checkbox"] { accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel-2); white-space: nowrap;
}
.pill.live { color: var(--ok); border-color: rgba(61, 214, 140, .42); }
.pill.demo { color: var(--warn); border-color: rgba(245, 185, 66, .45); }
.pill.air { color: #fff; background: var(--air); border-color: var(--air); }
.pill.hold { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); } /* the title screen is on the picture */
.pill.hold .dot { display: none; }
.pill.off { color: #dfe6f0; background: #33465e; border-color: #4a607b; } /* the broadcast has ended */
.pill.off .dot { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.air .dot { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; font-weight: 700; }

.notice {
  border: 1px solid rgba(220, 185, 120, .5); background: rgba(220, 185, 120, .1); color: #f4e3be;
  border-radius: 10px; padding: 10px 12px; font-size: .9rem;
}
.notice.error { border-color: rgba(229, 72, 77, .65); background: rgba(229, 72, 77, .15); color: #ffd5d6; }

#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: #2b1516; border: 1px solid #7a2a2d; color: #ffd9da; padding: 10px 16px; border-radius: 10px;
  max-width: min(92vw, 560px); z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
#toast.ok { background: #132a1f; border-color: #235c43; color: #c9f5de; }

/* ---------- stage (the program picture) ---------- */

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
  container-type: size; border-radius: 10px; --accent: var(--brand);
}
.stage.full { border-radius: 0; }

.stage-videos { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; }
.tile { position: relative; overflow: hidden; background: #0a0c10; width: 100%; height: 100%; box-shadow: inset 0 0 0 .12cqw #000; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0c10; }

/* Two cameras: show both whole pictures, not a centre crop. A wide room shot
   (the Owl's panorama) loses most of the room if it is cropped to half width. */
.stage-videos[data-count="2"] .tile { width: 50%; height: 50%; }
.stage-videos[data-count="3"] .tile,
.stage-videos[data-count="4"] .tile { width: 50%; height: 50%; }
.stage-videos[data-count="5"] .tile,
.stage-videos[data-count="6"] .tile { width: 33.333%; height: 50%; }
.stage-videos[data-count="7"] .tile,
.stage-videos[data-count="8"] .tile,
.stage-videos[data-count="9"] .tile { width: 33.333%; height: 33.333%; }

.stage-videos.layout-single .tile video { object-fit: contain; }
/* A shared screen is always shown whole, in every layout: slides must not lose their edges. */
.tile.screen video, .source.screen video { object-fit: contain; background: #000; }

.stage-videos.layout-pip .tile:first-child { width: 100%; height: 100%; }
.stage-videos.layout-pip .tile:nth-child(2) {
  position: absolute; right: 3cqw; bottom: 5cqh; width: 27cqw; height: 15.19cqw;
  border-radius: 1cqw; border: .3cqw solid rgba(255,255,255,.9); box-shadow: 0 1cqw 3cqw rgba(0,0,0,.55);
}

.stage-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #8f98aa; font-size: 2.4cqw; gap: 1cqw; text-align: center; padding: 0 8cqw;
}
.stage-empty small { font-size: 1.5cqw; opacity: .8; }

.namecard {
  position: absolute; left: 4cqw; bottom: 7cqh; max-width: 62cqw; display: flex;
  opacity: 0; transform: translateY(3cqh); transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
.namecard.show { opacity: 1; transform: none; }
.namecard .bar { width: .7cqw; background: var(--accent); border-radius: .5cqw 0 0 .5cqw; flex: none; }
.namecard .body {
  background: rgba(12, 14, 20, .88); color: #fff; padding: 1.3cqw 2.2cqw 1.4cqw; border-radius: 0 .8cqw .8cqw 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.namecard .n { font-size: 3.1cqw; font-weight: 700; line-height: 1.12; }
.namecard .t { font-size: 1.75cqw; opacity: .92; margin-top: .35cqw; }
.namecard .w { font-size: 1.4cqw; opacity: .7; margin-top: .25cqw; }

/* A private meeting: a thin band along the foot of the picture, on every screen
   that shows it. It clears the name card, the small picture in picture and the
   frame of the framed title screen, which all sit higher. */
.private-sign {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .55cqh 2cqw; text-align: center; color: #fff;
  background: rgba(8, 20, 36, .82); border-top: .1cqw solid rgba(220, 185, 120, .7);
  font-size: 1.15cqw; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; pointer-events: none;
}
.private-sign[hidden] { display: none; }
/* The same line while a recording runs: a red dot before the words. */
.private-sign.rec::before {
  content: ""; display: inline-block; width: .9cqw; height: .9cqw; margin-right: .9cqw; border-radius: 50%;
  background: var(--air); vertical-align: .02em; animation: pulse 1.2s infinite;
}

/* People: whether each person has agreed to be recorded. */
.people .agreed { color: var(--ok); border-color: rgba(61, 214, 140, .45); }
.people .not-agreed { color: #f4e3be; border-color: rgba(220, 185, 120, .55); }

/* The answer screen: something Indigo AI said or found, put on the picture for
   the room to read (createBoard in stage.js). It lies over the cameras and
   under the name card and the corner logo, in the colour chosen for the title
   screen (--bd). stage.js sets the size of the text so that it just fits. */
.board {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 1.5cqw; padding: 7.4cqw 7cqw 3.2cqw;
  color: #fff; text-align: left; --bd: #0e2e4f; --bd-gold: #dcb978;
  background: radial-gradient(90% 120% at 50% -15%, color-mix(in srgb, var(--bd) 70%, #fff) 0%, var(--bd) 48%, color-mix(in srgb, var(--bd) 58%, #000) 100%);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.board.show { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.board .foot { display: flex; align-items: baseline; gap: 3cqw; }
.board .kicker { margin-left: auto; white-space: nowrap; font-size: 1.3cqw; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--bd-gold); }
.board .head {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-weight: 400;
  font-size: 4cqw; line-height: 1.12; max-width: 74cqw; padding-bottom: 1.5cqw; overflow-wrap: anywhere;
  border-bottom: .16cqw solid color-mix(in srgb, var(--bd-gold) 70%, transparent);
}
.board .body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; font-size: 3.4cqw; line-height: 1.34; }
.board .lines { display: grid; gap: .45em; }
.board .lines p { margin: 0; overflow-wrap: anywhere; }
.board .lines .li { position: relative; padding-left: 1.15em; }
.board .lines .li::before { content: ""; position: absolute; left: .2em; top: .5em; width: .34em; height: .34em; border-radius: 50%; background: var(--bd-gold); }
.board .from { flex: 1; min-width: 0; font-size: 1.3cqw; opacity: .8; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* On the producer screen, under the picture, while something is on the screen. */
.board-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid rgba(220, 185, 120, .5);
  background: rgba(220, 185, 120, .1); color: #f4e3be; border-radius: 10px; padding: 8px 10px 8px 12px; font-size: .9rem;
}
.board-bar[hidden] { display: none; }
.board-bar .what { flex: 1; min-width: 200px; }

/* The countdown: the hotel logo, the meeting's name, the time it starts, a
   clock and a message, over a colour the producer chose (--cd). stage.js builds
   it as two groups, .cd-a (logo, name, start time, message) and .cd-b (the
   clock), and the three designs below arrange those. Sizes are in cqw, so it is
   the same picture on a phone, on the room display and in a recording. */
.countdown {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
  --cd: #0e2e4f; --cd-gold: #dcb978;
  --cd-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
.countdown.show { display: flex; }
.countdown .cd-logo { display: block; width: 15cqw; height: auto; }
.countdown .title { font-family: var(--cd-serif); font-weight: 400; font-size: 5cqw; line-height: 1.12; overflow-wrap: anywhere; }
.countdown .starts { font-size: 2.1cqw; color: var(--cd-gold); letter-spacing: .03em; }
.countdown .kicker { font-size: 1.4cqw; letter-spacing: .32em; text-transform: uppercase; opacity: .8; }
.countdown .clock { font-size: 14cqw; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown .msg { font-size: 1.9cqw; opacity: .86; }

/* Classic: everything centred, lighter at the top like the pages. */
.countdown[data-template="classic"] {
  background: radial-gradient(90% 120% at 50% -15%, color-mix(in srgb, var(--cd) 70%, #fff) 0%, var(--cd) 48%, color-mix(in srgb, var(--cd) 58%, #000) 100%);
}
.countdown[data-template="classic"] .cd-a, .countdown[data-template="classic"] .cd-b,
.countdown[data-template="framed"] .cd-a, .countdown[data-template="framed"] .cd-b { display: contents; }
.countdown[data-template="classic"] .cd-logo { order: 1; margin-bottom: 2.6cqh; }
.countdown[data-template="classic"] .title { order: 2; max-width: 84cqw; }
.countdown[data-template="classic"] .kicker { order: 3; margin-top: 3.2cqh; }
.countdown[data-template="classic"] .clock { order: 4; margin-top: .6cqh; }
.countdown[data-template="classic"] .starts { order: 5; margin-top: 1cqh; }
.countdown[data-template="classic"] .msg { order: 6; margin-top: 1.6cqh; max-width: 72cqw; }

/* Split: logo, name and start time on the left; the clock in its own panel on the right. */
.countdown[data-template="split"] {
  flex-direction: row; align-items: stretch; text-align: left;
  background: linear-gradient(160deg, color-mix(in srgb, var(--cd) 82%, #fff) 0%, var(--cd) 60%);
}
.countdown[data-template="split"] .cd-a {
  width: 56%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 4cqw 0 6cqw;
}
.countdown[data-template="split"] .cd-b {
  width: 44%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background: color-mix(in srgb, var(--cd) 60%, #000); border-left: .28cqw solid var(--cd-gold);
}
.countdown[data-template="split"] .cd-logo { width: 14cqw; margin-bottom: 5cqh; }
.countdown[data-template="split"] .title { font-size: 4.8cqw; }
.countdown[data-template="split"] .starts { margin-top: 2cqh; font-size: 2.3cqw; }
.countdown[data-template="split"] .msg { margin-top: 3cqh; }
.countdown[data-template="split"] .clock { font-size: 12cqw; margin-top: 1.4cqh; }
.countdown[data-template="split"].long .clock { font-size: 8cqw; } /* room for "11:59:59" */

/* Framed: centred inside a gold frame, with the clock between two fine lines. */
.countdown[data-template="framed"] {
  background: radial-gradient(120% 130% at 50% 50%, color-mix(in srgb, var(--cd) 90%, #fff) 0%, var(--cd) 45%, color-mix(in srgb, var(--cd) 62%, #000) 100%);
}
.countdown[data-template="framed"]::before {
  content: ""; position: absolute; inset: 2.2cqw; border: .22cqw solid var(--cd-gold); border-radius: .5cqw; pointer-events: none;
}
.countdown[data-template="framed"]::after {
  content: ""; position: absolute; inset: 3cqw; border: .08cqw solid var(--cd-gold); opacity: .55; pointer-events: none;
}
.countdown[data-template="framed"] .cd-logo { order: 1; width: 13cqw; margin-bottom: 2cqh; }
.countdown[data-template="framed"] .title { order: 2; font-style: italic; font-size: 4.6cqw; max-width: 78cqw; }
.countdown[data-template="framed"] .starts { order: 3; margin-top: 1.4cqh; font-size: 1.7cqw; letter-spacing: .22em; text-transform: uppercase; }
.countdown[data-template="framed"] .kicker { display: none; }
.countdown[data-template="framed"] .clock {
  order: 4; margin-top: 2.6cqh; padding: 1.6cqh 7cqw 1.2cqh; font-family: var(--cd-serif); font-weight: 400; font-size: 12.5cqw;
  border-top: .1cqw solid color-mix(in srgb, var(--cd-gold) 70%, transparent);
  border-bottom: .1cqw solid color-mix(in srgb, var(--cd-gold) 70%, transparent);
}
.countdown[data-template="framed"] .msg { order: 6; margin-top: 2cqh; max-width: 66cqw; }

/* The title screen with no countdown (.no-clock): the clock and the start time
   are left out, and the name is given the room they leave. */
.countdown.no-clock .starts, .countdown.no-clock .kicker, .countdown.no-clock .clock { display: none; }
.countdown.no-clock[data-template="classic"] .cd-logo { width: 19cqw; margin-bottom: 5cqh; }
.countdown.no-clock[data-template="classic"] .title { font-size: 6.6cqw; }
.countdown.no-clock[data-template="classic"] .msg { margin-top: 3cqh; font-size: 2.3cqw; }
/* Split with no clock: the logo takes the clock's panel. */
.countdown.no-clock[data-template="split"] .cd-logo { display: none; }
.countdown.no-clock[data-template="split"]:not(.no-logo) .cd-b {
  background-image: url("/brand/logo-white.png"); background-repeat: no-repeat; background-position: center; background-size: 62% auto;
}
.countdown.no-clock[data-template="split"] .title { font-size: 5.6cqw; }
.countdown.no-clock[data-template="split"] .msg { margin-top: 3cqh; font-size: 2.3cqw; }
.countdown.no-clock[data-template="framed"] .cd-logo { width: 16cqw; margin-bottom: 4cqh; }
.countdown.no-clock[data-template="framed"] .title { font-size: 6cqw; }
.countdown.no-clock[data-template="framed"] .msg { margin-top: 3.4cqh; font-size: 2.2cqw; }

/* The hotel's logo on the picture. Sized from the stage, so it is the same
   proportion on a phone, on the room display and in the recording. */
.stage .watermark {
  position: absolute; top: 3cqh; right: 2.2cqw; width: 11cqw; height: auto; z-index: 4;
  opacity: .9; filter: drop-shadow(0 0 .5cqw rgba(0, 0, 0, .6)); pointer-events: none; user-select: none;
}
.stage .watermark[hidden] { display: none; }

/* ---------- producer ---------- */

.producer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1020px) { .producer { grid-template-columns: 1fr; } }

.preview-wrap { position: relative; }
.preview-wrap .pill { position: absolute; top: 10px; left: 10px; z-index: 2; }

.layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 560px) { .layouts { grid-template-columns: repeat(2, 1fr); } }

.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.source {
  position: relative; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid var(--line);
  background: #0a0c10; display: block; text-align: left; min-height: 0;
}
.source video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #0a0c10; }
.source .name { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font-size: .85rem; font-weight: 600; background: var(--solid); }
.source .name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source .role { color: var(--muted); font-weight: 500; flex: none; }
.source.air { border-color: var(--air); }
.source .badge {
  position: absolute; top: 6px; left: 6px; background: var(--air); color: #fff; font-size: .7rem; font-weight: 800;
  padding: 2px 7px; border-radius: 6px; letter-spacing: .05em;
}

.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 10px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; padding-top: 0; }
.people .top { display: flex; align-items: center; gap: 10px; }
.people .who { flex: 1; min-width: 0; }
.people .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .who span { display: block; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Under each person: where they are, and Remove. */
.people .tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.people .tools .remove { margin-left: auto; background: transparent; color: var(--muted); }
.people .tools .remove:hover { color: #fff; }
.people .tools .remove.sure { background: var(--air); border-color: var(--air); color: #fff; }

/* Room left at the bottom of the producer screen, so the Indigo AI button never hides the last control. */
.producer { padding-bottom: 96px; }

.qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.qr img { width: 100%; max-width: 150px; background: #fff; border-radius: 8px; padding: 6px; display: block; margin: 0 auto 8px; }
.qr b { display: block; font-size: .9rem; }
.qr span { display: block; }

/* A button that is waiting to be pressed: Update title screen, while the form
   differs from what is on the picture. A soft gold ring swells and fades. */
.nudge { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 185, 120, 0); } 50% { box-shadow: 0 0 0 6px rgba(220, 185, 120, .4); } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; box-shadow: 0 0 0 3px rgba(220, 185, 120, .45); } }

/* A camera chosen for when the room goes live, while the title screen is still up. */
.source .badge.next { background: var(--brand); color: var(--brand-ink); }
/* The countdown, in its own box at the bottom of the Title panel. */
.cd-box { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 14, 28, .22); }

/* The countdown goes by minutes or by a start time: the box that decides is outlined in gold. */
input.by { border-color: var(--brand); }
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; cursor: pointer; } /* the little clock, made visible on navy */

/* Choosing a countdown: three designs, each the real countdown drawn small, and a row of colours. */
.cd-designs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cd-design { display: block; min-height: 0; padding: 6px 6px 5px; font-size: .82rem; text-align: center; }
.cd-design .stage { border-radius: 6px; margin-bottom: 5px; pointer-events: none; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swatch {
  width: 38px; height: 38px; min-height: 0; padding: 0; margin: 0; border-radius: 50%; flex: none;
  background: var(--c); border: 2px solid rgba(255, 255, 255, .28); cursor: pointer;
}
.swatch:hover { border-color: #fff; }
.swatch.on { background: var(--c); border-color: #fff; box-shadow: 0 0 0 3px var(--brand); }
/* The last one opens the full colour picker. Until a colour is picked with it, it shows a rainbow. */
.swatch.custom { position: relative; display: block; overflow: hidden; background: conic-gradient(#e5484d, #f5b942, #3dd68c, #38bdf8, #6272ff, #c05bd6, #e5484d); }
.swatch.custom.on { background: var(--c); }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.swatch.custom:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

/* The live transcript: the time on the left, what was said on the right. The
   sentence still being spoken is the last line, lighter. */
.lt-lines { max-height: 320px; overflow-y: auto; display: grid; gap: 10px; padding-right: 6px; }
.lt-line { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.lt-line .at { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-line p { line-height: 1.5; overflow-wrap: anywhere; }
.lt-line.partial p { color: var(--muted); font-style: italic; }
.lt-lines + p { margin-top: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* An Open button with its Copy link button underneath. */
.screen-link { display: grid; gap: 6px; align-content: start; }
.screen-link .button { text-align: center; }
/* Waiting at the door, or removed by the host: a plain notice over the whole
   page, on any page that joins a meeting (enter() in media.js). */
.door-wait {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center; color: #fff;
  background: radial-gradient(90% 520px at 50% -60px, #23578c 0%, rgba(35, 87, 140, 0) 72%), linear-gradient(180deg, #0e2e4f 0, #081c31 900px);
}
.door-wait img { width: min(200px, 46vw); height: auto; margin-bottom: 14px; }
.door-wait b { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; }
.door-wait p { max-width: 420px; color: var(--muted); line-height: 1.5; }
.door-wait button { margin-top: 8px; }
/* A gold line that keeps moving, so that waiting never looks frozen. */
.door-line { position: relative; width: 132px; height: 2px; margin-top: 10px; border-radius: 2px; background: rgba(220, 185, 120, .22); overflow: hidden; }
.door-line::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--brand); animation: door-glide 1.4s ease-in-out infinite; }
@keyframes door-glide { to { left: 100%; } }

/* The host's side of the door, on the producer screen: who is asking to come
   in (a bar under the picture), and the Who can join box. */
.knock-bar { display: grid; gap: 8px; }
.knock-bar[hidden] { display: none; }
.knock {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--brand); background: rgba(220, 185, 120, .16);
  color: #fff; border-radius: 10px; padding: 8px 10px 8px 12px; animation: knock-in .35s ease;
}
.knock .who { flex: 1; min-width: 180px; }
.knock .who small { display: block; color: #f4e3be; font-size: .8rem; }
@keyframes knock-in { from { transform: translateY(-6px); opacity: 0; } }
.door .devices { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.door .devices li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.door .devices .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.door .devices .what small { color: var(--muted); }
.pill.locked { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }

/* A sheet over the page for a decision that cannot be undone (Delete
   everything), and for the receipt that follows it. */
dialog.sheet {
  width: min(94vw, 540px); max-height: 92vh; overflow: auto; padding: 24px; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px; background: var(--solid); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
dialog.sheet::backdrop { background: rgba(4, 14, 26, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.sheet h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: 0; margin-bottom: 12px; }
dialog.sheet ul { margin: 10px 0 14px; padding-left: 20px; display: grid; gap: 4px; }
dialog.sheet p + p { margin-top: 10px; }
dialog.sheet .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.receipt {
  margin: 0; padding: 14px; max-height: 52vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: .86rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line); border-radius: 10px;
}
.receipts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
/* Delete everything automatically: the menu under the button, and the line saying when. */
.auto-delete { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.auto-delete p { margin: 8px 0 0; }
.receipts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .92rem; }

/* The host link, in the Invite box: what it is, and the button that copies it. */
.host-link { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.host-link > div { flex: 1; min-width: 0; }
.host-link b { display: block; font-size: .95rem; margin-bottom: 2px; }
.host-link button { flex: none; }

/* Share a screen, in the Layout box: the button, Copy link, and a line saying what it is for. */
.share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.share-row .button svg { width: 18px; height: 18px; flex: none; }
.share-row > span { flex: 1; min-width: 190px; }

.recordings { list-style: none; margin: 0; padding: 0; }
.recordings li { padding: 10px 0; border-top: 1px solid var(--line); }
.recordings li:first-child { border-top: 0; padding-top: 0; }
.recordings li:last-child { padding-bottom: 0; }
.recordings p { margin: 4px 0 0; overflow-wrap: anywhere; }
.recordings .row { margin-top: 8px; }
.recordings + p { margin: 12px 0 0; }
.bad { color: #ffc9cb; }

/* ---------- Indigo AI chat ---------- */

/* The gold button that opens the chat. It floats over the page and can be
   dragged anywhere; producer.html remembers where it was left. */
.ai-pill {
  position: fixed; right: 24px; bottom: 24px; z-index: 41;
  min-height: 52px; padding: 0 22px 0 18px; border-radius: 999px; gap: 9px;
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-size: 1.02rem; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 5px rgba(220, 185, 120, .2);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.ai-pill:hover { background: #e7c98f; border-color: #e7c98f; }
.ai-pill svg { width: 20px; height: 20px; flex: none; }
.ai-pill.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 3px #fff; } /* the chat is open */
.ai-pill.busy svg { animation: ai-think 1.1s ease-in-out infinite; } /* Indigo AI is working */
.ai-pill.dragging, .ai-box.dragging .ai-bar { cursor: grabbing; }
@keyframes ai-think { 50% { transform: scale(.72) rotate(40deg); opacity: .6; } }

/* The chat itself: a small window, moved by dragging its top bar. */
.ai-box {
  position: fixed; right: 24px; bottom: 92px; z-index: 40;
  width: min(400px, calc(100vw - 16px)); height: min(580px, calc(100vh - 16px)); height: min(580px, calc(100dvh - 16px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--solid); border: 1px solid rgba(255, 255, 255, .2); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.ai-box[hidden] { display: none; }
.ai-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; flex: none;
  background: var(--solid-2); border-bottom: 1px solid var(--line);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.ai-bar svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.ai-bar b { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.ai-bar button { cursor: pointer; }
.ai-box .notice { margin: 0 14px 12px; }
.ai-log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-line { max-width: 88%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; font-size: .95rem; }
.ai-line.you { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.ai-line.ai { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-line.did { align-self: center; max-width: 100%; padding: 3px 12px; font-size: .8rem; color: var(--ok); border: 1px solid rgba(61, 214, 140, .42); border-radius: 999px; text-align: center; }
.ai-line.error { align-self: stretch; max-width: 100%; border: 1px solid rgba(229, 72, 77, .65); background: rgba(229, 72, 77, .15); color: #ffd5d6; }

/* On a phone the chat is a sheet along the bottom, and the button steps aside while it is open. */
@media (max-width: 560px) {
  .ai-box { left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important; width: auto; height: min(72vh, 580px); }
  .ai-bar { cursor: default; }
  .ai-pill.on { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ai-pill.busy svg { animation: none; } }
.ai-line.wait { align-self: flex-start; color: var(--muted); font-size: .9rem; padding-left: 2px; }
.ai-line a { color: inherit; text-decoration: underline; }
/* Under a reply: the button that puts it on the picture. */
.ai-acts { margin-top: 9px; white-space: normal; }
.ai-acts button { min-height: 28px; padding: 3px 10px; font-size: .78rem; }
.ai-acts button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
/* The web pages an answer rests on: a short list under it, one page to a line. */
.ai-sources { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); display: grid; gap: 6px; white-space: normal; font-size: .82rem; }
.ai-sources .label { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ai-sources a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; text-decoration: none; }
.ai-sources a b { font-weight: 600; color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-sources a span { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.ai-sources a:hover b { text-decoration: underline; }
.ai-ideas { display: flex; flex-direction: column; gap: 8px; }
.ai-ideas button { justify-content: flex-start; text-align: left; font-weight: 500; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; min-height: 44px; max-height: 40vh; }

/* ---------- transcript page ---------- */

.transcript-page { max-width: 900px; }
.transcript-page video { width: 100%; max-height: 40vh; background: #000; border-radius: 10px; display: block; }
.player-wrap { position: sticky; top: 0; z-index: 5; background: #0d2a48; padding-bottom: 12px; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 8px; border-radius: 8px; border-top: 1px solid var(--line); }
.lines li:first-child { border-top: 0; }
.lines li.now { background: rgba(220, 185, 120, .12); }
.lines .at { min-height: 32px; padding: 2px 6px; font-size: .85rem; font-variant-numeric: tabular-nums; align-self: start; }
.lines .who { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.lines .said { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }

/* Sentences can be pressed to choose what goes into a clip. */
.sentence { cursor: pointer; border-radius: 4px; padding: 2px 1px; }
.sentence:hover { background: rgba(255, 255, 255, .1); }
.sentence.picked { background: rgba(220, 185, 120, .34); color: #fff; }
.sentence:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.clipbar {
  position: sticky; bottom: 12px; z-index: 6; margin-top: 16px; padding: 12px;
  background: var(--solid-2); border: 1px solid var(--brand); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.clipbar form { margin-top: 8px; }
.clipbar p { margin: 8px 0 0; }

.clip-page { max-width: 900px; padding-top: 24px; }
.clip-page video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; display: block; }

/* ---------- camera / room / guest pages ---------- */

.viewer { display: grid; gap: 12px; }
.selfview {
  position: relative; border-radius: 10px; overflow: hidden; border: 3px solid var(--line); background: #000;
}
.selfview video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.selfview.air { border-color: var(--air); }
.selfview .pill { position: absolute; top: 8px; left: 8px; }
.selfview.small { width: 240px; max-width: 45%; }

.phone-cam { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; }
.phone-cam video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.phone-cam .bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #0b2038; }
.phone-cam.air { box-shadow: inset 0 0 0 6px var(--air); }

.program-page { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.program-page .stage { width: min(100vw, 177.78vh); border-radius: 0; }
.sound-gate {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
}
