/* The demo room (templates/demo/): an unlisted page built like Jazmine's workshop pages, in Busy Book's own look.
   The sign-up page, the "You're in" page and each person's room. Built on front/site.css. */

.demo-small { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.demo-kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); }
.demo-head { padding-bottom: 28px; }

/* The sign-up page */
.demo-hero { padding: 64px 0 48px; background: radial-gradient(900px 420px at 15% 0%, rgba(45, 212, 191, .16), transparent 70%); }
.demo-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.demo-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin: 18px 0 16px; text-wrap: balance; }
.demo-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.demo-hero-actions .demo-small { margin: 0; }
.demo-date { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 30px 28px; text-align: center; }
.demo-date-day { font-weight: 800; letter-spacing: .14em; color: var(--teal-dark); font-size: .95rem; }
.demo-date-num { font-size: 5.2rem; line-height: 1; font-weight: 800; color: var(--ink); letter-spacing: -0.05em; margin: 6px 0; }
.demo-date-soon { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--teal); font-size: 4.2rem; }
.demo-date-when { font-weight: 700; color: var(--ink); }
.demo-date-local { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; color: var(--body); font-size: .95rem; }
.demo-section { padding: 56px 0; }
.demo-section h2 { margin: 8px 0 24px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.demo-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: none; }
.demo-steps li { display: flex; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.demo-steps li > span { flex: none; font-weight: 800; color: var(--teal); font-size: 1.1rem; }
.demo-steps h3 { font-size: 1.08rem; margin-bottom: 4px; }
.demo-steps p { font-size: .96rem; }
.demo-host-wrap { background: var(--cloud); }
.demo-host { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: center; }
.demo-host h2 { margin-bottom: 12px; }
.demo-host > div > p { max-width: 62ch; margin-bottom: 18px; }
.demo-photo { margin: 0; background: var(--white); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg); }
.demo-photo img { width: 100%; height: auto; border-radius: 12px; }
.demo-honest { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; font-size: .95rem; display: grid; gap: 8px; }
.demo-form-wrap { max-width: 620px; }
.demo-form { display: flex; flex-direction: column; gap: 18px; padding: 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.demo-form h2 { margin: 0; }
.demo-picks, .demo-stages { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.demo-picks legend, .demo-stages legend { margin-bottom: 8px; }
.demo-stages .opt, .demo-form .opt { color: var(--muted); font-weight: 500; }
.demo-pick, .demo-stage { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--ink); font-size: .97rem; }
.demo-pick { padding: 14px 16px; font-size: 1.02rem; }
.demo-pick:has(input:checked), .demo-stage:has(input:checked) { border-color: var(--teal); background: var(--tint); }
.demo-pick-now b { font-weight: 700; color: var(--teal); }
.demo-pick input, .demo-stage input { accent-color: var(--teal); width: 18px; height: 18px; margin: 0; flex: none; }
.demo-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.demo-privacy { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.demo-privacy i { margin-right: 4px; }
.demo-alert { margin-bottom: 16px; }
.alert-good { background: var(--ok-bg); color: var(--ok); border-radius: var(--r-sm); padding: 14px 16px; font-weight: 600; font-size: .95rem; }
.demo-stop-actions { margin-top: 22px; }
.demo-foot { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: .86rem; }
.demo-foot p + p { margin-top: 8px; }
.demo-foot a { color: var(--muted); text-decoration: underline; }

@media (max-width: 900px) {
  .demo-hero { padding-top: 40px; }
  .demo-hero-grid, .demo-host { grid-template-columns: 1fr; gap: 28px; }
  .demo-photo { max-width: 240px; }
  .demo-form { padding: 22px; }
}

/* "You're in" */
.room-saved { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--teal-dark); background: var(--tint); border-radius: 999px; padding: 7px 14px; }
.joined { padding: 40px 0 70px; }
.joined-wrap { max-width: 860px; }
.joined-head { text-align: center; display: grid; justify-items: center; gap: 14px; }
.joined-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); text-wrap: balance; }
.joined-check { width: 64px; height: 64px; border-radius: 999px; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.6rem; }
.joined-card { margin: 30px 0 22px; background: var(--white); border: 2px solid var(--teal); border-radius: var(--r-lg); padding: 26px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.joined-card h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.joined-cal { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.countdown-light div { background: var(--cloud); border-color: var(--line); }
.countdown-light b { color: var(--ink) !important; }
.countdown-light span { color: var(--muted) !important; }
.joined-steps { display: grid; gap: 12px; }
.joined-steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.joined-steps li > span { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--tint); color: var(--teal-dark); font-weight: 800; display: grid; place-items: center; }
.joined-steps h2 { font-size: 1.1rem; margin-bottom: 2px; }
.joined-steps p { font-size: .97rem; }
.joined-foot { margin-top: 26px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.joined-report { margin-top: 26px; border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.joined-report p { margin: 0; flex: 1 1 280px; }
.demo-report { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 18px; padding: 26px 28px; }
.demo-report > div { flex: 1 1 360px; }
.demo-report h2 { margin: 6px 0 8px; }
.demo-report p { margin: 0; }

/* The room ---------------------------------------------------------------------------------------------------------- */
.room-body { background: var(--cloud); }
.room-body .foot { display: none; }
.room { padding: 22px 0 60px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.room-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.room-top h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.room-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 800; letter-spacing: .02em; color: var(--teal-dark); background: var(--tint); border-radius: 999px; padding: 5px 12px; }
.room-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.room-tag.is-playing .dot { background: #DC2626; animation: room-pulse 1.6s infinite; }
@keyframes room-pulse { 50% { opacity: .35; } }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-lg); }
.stage iframe, .stage #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; color: #fff; gap: 12px; background: radial-gradient(700px 360px at 50% 0%, rgba(45, 212, 191, .22), transparent 70%), var(--ink); }
.stage-card h2 { color: #fff; font-size: clamp(1.3rem, 2.8vw, 2rem); }
.stage-card p { color: rgba(255, 255, 255, .82); max-width: 32em; }
.stage-card .btn { margin-top: 6px; }
.countdown { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.countdown div { min-width: 74px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 8px; }
.countdown b { display: block; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .7); }
.sound { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: inline-flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: 18px 30px; font-size: 1.15rem; font-weight: 800; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.sound[hidden] { display: none; }
.sound i { color: var(--teal); font-size: 1.3rem; }
.sound:hover { background: var(--tint); }
.room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; min-height: 52px; }
.room-actions .room-note { color: var(--muted); font-size: .92rem; }
.trial-btn[hidden] { display: none; }
.trial-btn { animation: room-rise .5s ease-out; }
@keyframes room-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sound-hint { color: var(--teal-dark) !important; font-weight: 700; }
.sound-hint[hidden] { display: none; }
.room-welcome { background: var(--ok-bg); color: var(--ok); border-radius: var(--r-sm); padding: 12px 16px; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
.room-preview { background: var(--sun-bg); color: #92400E; border-radius: var(--r-sm); padding: 12px 16px; font-weight: 600; margin-bottom: 14px; font-size: .92rem; }
.room-preview a { color: #92400E; text-decoration: underline; margin-right: 10px; }
.room-preview a[aria-current] { text-decoration: none; background: #fff; border-radius: 6px; padding: 1px 6px; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.room-honest { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.chapters { margin-top: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.chapters h2 { font-size: 1rem; margin-bottom: 8px; }
.chapters ol { display: flex; flex-wrap: wrap; gap: 8px; }
.chapters li, .chapters button { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--body); }
.chapters li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--cloud); }
.chapters button { border: 0; background: none; padding: 0; color: inherit; }
.chapters li.now { border-color: var(--teal); background: var(--tint); color: var(--teal-dark); }
.chapters .ch-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.room-honest i { margin-right: 4px; color: var(--teal); }

/* The offer: the card under the video, the bar at the bottom, the pop-up at the end */
.offer-card { margin-top: 18px; background: var(--white); border: 2px solid var(--teal); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 10px; justify-items: start; animation: room-rise .5s ease-out; }
.offer-card[hidden] { display: none; }
.offer-card h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.offer-spots { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #92400E; background: var(--sun-bg); border-radius: 999px; padding: 5px 12px; font-size: .9rem; }
.offer-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateY(110%); transition: transform .45s ease-out; box-shadow: 0 -10px 30px rgba(11, 27, 43, .25); }
.offer-bar.in { transform: none; }
.offer-bar[hidden] { display: none; }
.offer-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.offer-bar p { color: rgba(255, 255, 255, .9); font-size: .98rem; }
.offer-bar b { color: #fff; }
body.has-offer-bar { padding-bottom: 84px; }
.end-modal { position: fixed; inset: 0; z-index: 60; background: rgba(11, 27, 43, .62); display: flex; align-items: center; justify-content: center; padding: 20px; }
.end-modal[hidden] { display: none; }
.end-card { background: var(--white); border-radius: var(--r-lg); padding: 30px; max-width: 520px; width: 100%; display: grid; gap: 12px; box-shadow: var(--shadow-lg); }
.end-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.say { display: flex; align-items: center; gap: 6px; margin-top: 8px; border: 1px solid var(--line-2); background: var(--white); color: var(--teal-dark); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 700; }
.say[disabled] { opacity: .7; }

.chat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 120px); position: sticky; top: 96px; }
.chat-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.chat-head h2 { font-size: 1.15rem; }
.chat-label { display: flex; gap: 8px; color: var(--body); font-size: .86rem; line-height: 1.45; margin-top: 8px; }
.chat-label i { color: var(--teal); margin-top: 3px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.chat-empty { color: var(--muted); font-size: .92rem; text-align: center; margin: auto 0; }
.bubble { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: .94rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--cloud); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.ai .ai-from { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 3px; }
.bubble.wait { color: var(--muted); font-style: italic; }
.chat-form { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 8px; }
.chat-form textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 64px; }
.chat-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 118, 110, .12); }
.chat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-count { color: var(--muted); font-size: .8rem; }
.chat-private { color: var(--muted); font-size: .8rem; padding: 0 14px 14px; }
.chat-private i { margin-right: 4px; }

@media (max-width: 980px) {
  .room-grid { grid-template-columns: 1fr; }
  .chat { position: static; max-height: none; }
  .chat-log { max-height: 420px; }
}
@media (max-width: 700px) {
  .stage.stage-text { aspect-ratio: auto; }
  .stage.stage-text .stage-card { position: relative; inset: auto; min-height: 300px; }
}
@media (max-width: 520px) {
  .room { padding-top: 14px; }
  .countdown div { min-width: 60px; }
  .sound { padding: 14px 22px; font-size: 1rem; }
}
