/* Darkpost private rooms. Plain CSS, no framework or build step.
   Change the colours below; page structure and wording live in index.html. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #0c0c0c;
  --text: #eeeeee;
  --bright: #ffffff;
  --muted: #a6a6a6;
  --accent: #ff4d5a;
  --line: #a6424c;
  --quiet-line: #343434;
  --mono: 'Courier New', Courier, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--mono); }
::selection { background: var(--accent); color: var(--bg); }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--bright); }
button, input, select, textarea { font: inherit; border-radius: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { background: var(--bright); border-color: var(--bright); }
button:disabled { opacity: .55; cursor: default; }
button.secondary { background: transparent; border-color: var(--line); color: var(--text); font-weight: 400; }
button.secondary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 4px; }
[tabindex='-1']:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { color: var(--bright); font-size: clamp(25px, 2.8vw, 40px); line-height: 1.25; font-weight: 400; letter-spacing: -.045em; }
h3 { font-size: 15px; font-weight: 400; }
strong { font-weight: 400; color: var(--bright); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 9px 16px; background: var(--accent); color: var(--bg); }
.skip:focus { top: 12px; }
/* No narrow outer card: the page fills the browser at every desktop size. */
.page { width: 100%; min-height: 100vh; min-height: 100svh; padding: 14px clamp(16px, 3vw, 64px) 0; display: flex; flex-direction: column; }
.page-content { flex: 1; min-width: 0; }
.system-strip { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .07em; }
.system-strip > :last-child { text-align: right; }
.cursor { margin-left: 8px; color: var(--accent); }
.masthead { padding: 28px 0 22px; text-align: center; }
.wordmark { display: block; width: 480px; max-width: 100%; height: auto; margin-inline: auto; }
.wordmark-sub { margin-top: 9px; color: var(--accent); font-size: 11px; }
.masthead-note { color: var(--muted); margin-top: 14px; font-size: 13px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 11px 0; border-block: 1px solid var(--line); font-size: 14px; }
.main-nav a { text-decoration: none; white-space: nowrap; }
.main-nav a:hover { background: var(--accent); color: var(--bg); }
.nav-note { margin-left: auto; font-size: 11px; color: var(--muted); }
.connection-strip { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; min-height: 46px; border-bottom: 1px dotted var(--quiet-line); font-size: 13px; }
.status-label { color: var(--accent); }
#status { color: var(--muted); overflow-wrap: anywhere; }
.notice { margin: 14px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--panel); }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 30px; padding: 27px 0 22px; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .1em; margin-bottom: 10px; }
.heading-note { color: var(--muted); font-size: 13px; }
.entrance-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; border-left: 3px solid var(--accent); padding: 11px 16px; background: var(--panel); }
.entrance-note > span { color: var(--muted); font-size: 12px; }
.entrance-link { margin: 9px 0 22px; color: var(--muted); font-size: 12px; }
.entrance-link:empty { display: none; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.section-heading h3 { color: var(--bright); text-transform: uppercase; }
.section-heading p { color: var(--muted); font-size: 11px; }
.section-heading p span { margin: 0 8px; color: var(--accent); }
.room-directory { margin: 24px 0; }
.rooms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.room { min-width: 0; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 18px; align-items: center; justify-content: start; min-height: 98px; padding: 14px 16px; text-align: left; border-color: var(--quiet-line); background: var(--panel); color: var(--text); font-weight: 400; }
.room strong { grid-row: 1 / 3; font-size: clamp(26px, 2.5vw, 36px); line-height: 1; }
.room small { display: block; color: var(--muted); font: 11px/1.5 var(--mono); overflow-wrap: anywhere; }
.room-state { display: block; font-size: 11px; color: var(--accent); }
.room.selected { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.room.selected strong { color: var(--accent); }
.room:hover:not(:disabled) { background: #1b0d0e; border-color: var(--accent); color: var(--bright); }
.room.locked { background: transparent; border-style: dashed; opacity: 1; }
.room.locked strong, .room.locked small, .room.locked .room-state { color: #888888; }
.directory-help { margin-top: 10px; color: var(--muted); font-size: 11px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; margin: 27px 0; align-items: stretch; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--bg); }
.panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.panel-heading h3 { color: var(--accent); }
.panel-heading > span { color: var(--muted); font-size: 10px; }
.panel-body { padding: 20px; }
label { display: block; min-width: 0; color: var(--bright); font-size: 13px; }
label > input, label > select { margin-top: 8px; }
input, select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 11px 12px; border: 1px solid #666666; background: var(--panel); color: var(--bright); font-size: 14px; min-height: 44px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--line); }
select { cursor: pointer; }
textarea { resize: vertical; overflow-wrap: anywhere; line-height: 1.6; }
.booking-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full-field { grid-column: 1 / -1; }
.field-help, .form-after { color: var(--muted); font-size: 12px; }
.form-after { font-size: 11px; }
.availability-body { display: flex; flex-direction: column; gap: 16px; }
.schedule { max-height: 230px; min-height: 132px; overflow: auto; padding-right: 8px; scrollbar-color: var(--line) var(--bg); font-size: 13px; overflow-wrap: anywhere; }
.schedule-empty { display: flex; flex-direction: column; justify-content: center; align-items: start; min-height: 130px; gap: 8px; border-block: 1px dotted var(--quiet-line); padding: 14px 0; }
.schedule-empty strong { color: var(--bright); }
.schedule-empty span { color: var(--muted); font-size: 12px; }
.slot { display: grid; grid-template-columns: 8ch minmax(0, 1fr); gap: 14px; border-bottom: 1px dotted var(--quiet-line); padding: 10px 0; }
.slot-room { color: var(--accent); }
.slot-time { color: var(--text); font-size: 12px; }
.schedule-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 10px; border-top: 1px solid var(--quiet-line); font-size: 11px; }
.schedule-actions button { font-size: 12px; }
.room-guide { padding: 19px 0 12px; border-top: 1px dashed var(--line); margin-bottom: 16px; }
.room-guide h3 { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 0; margin: 15px 0 0; list-style: none; counter-reset: guide; }
.guide-steps li { counter-increment: guide; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; }
.guide-steps li::before { content: '0' counter(guide); grid-row: 1 / 3; color: var(--accent); font-size: 13px; padding-top: 1px; }
.guide-steps strong { font-size: 14px; }
.guide-steps li > span { color: var(--muted); font-size: 12px; }
.state-page { margin-bottom: 36px; }
.reservation-info { color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.invitation-layout, .join-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); gap: clamp(24px, 4vw, 70px); }
.credentials { display: flex; flex-direction: column; gap: 10px; }
.credential-row { display: flex; gap: 12px; align-items: start; margin-bottom: 16px; min-width: 0; }
.credential-row input, .credential-row textarea { flex: 1; }
.credential-row button { white-space: nowrap; font-size: 12px; }
.open-room { align-self: start; margin-top: 8px; }
.room-note { min-width: 0; border-top: 1px dashed var(--line); padding-top: 20px; }
.note-number { display: block; color: var(--accent); font-size: 32px; line-height: 1; margin-bottom: 18px; }
.room-note h3 { color: var(--bright); margin-bottom: 14px; font-size: 18px; }
.room-note p { color: var(--muted); font-size: 13px; margin-bottom: 14px; max-width: 64ch; }
.join-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.join-fields label:not(:first-child) { margin-top: 12px; }
.join-fields button { justify-self: start; margin-top: 18px; min-width: 200px; }
.chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.chat-heading h2 { font-size: 28px; }
.chat-heading .eyebrow { font-size: 10px; margin-bottom: 4px; }
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr); gap: 24px; min-height: 0; }
.chat-main { display: flex; flex-direction: column; border: 1px solid var(--line); min-width: 0; min-height: 0; }
.conversation-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.encrypted-label { color: var(--accent); }
#messages { flex: 1; height: 52vh; min-height: 180px; overflow: auto; padding: 18px; scrollbar-color: var(--line) var(--bg); font-size: 14px; line-height: 1.75; }
.message { display: grid; grid-template-columns: 16ch minmax(0, 1fr); gap: 8px 18px; margin: 8px 0; }
.message b { color: var(--accent); font-weight: 400; overflow-wrap: anywhere; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.message.system { display: block; border-left: 2px solid var(--quiet-line); margin: 7px 0 20px; padding-left: 12px; color: var(--muted); font-size: 12px; }
.composer { display: flex; gap: 12px; align-items: center; padding: 13px 16px; margin: 0; border-top: 1px solid var(--line); background: var(--panel); }
.prompt { color: var(--accent); font-size: 20px; }
.composer input { flex: 1; min-width: 0; border: 0; background: transparent; padding-inline: 0; }
.composer input:focus-visible { outline-offset: 2px; }
.composer button { flex-shrink: 0; }
.chat-sidebar { overflow: auto; scrollbar-color: var(--line) var(--bg); }
.room-stat { display: flex; flex-direction: column; gap: 8px; padding: 16px 0 20px; border-bottom: 1px dashed var(--line); }
.room-stat:first-child { padding-top: 0; }
.stat-label { color: var(--muted); font-size: 10px; letter-spacing: .07em; }
#countdown { color: var(--accent); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-help { font-size: 11px; color: var(--muted); }
#people { color: var(--bright); font-size: 18px; }
.chat-sidebar-note { padding-top: 20px; }
.chat-sidebar-note h3 { color: var(--text); font-size: 13px; margin-bottom: 12px; }
.chat-sidebar-note p { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; border-top: 1px solid var(--line); padding: 15px 0 19px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.footer-mark { color: var(--accent); margin-right: 12px; }
.footer-details { font-size: 10px; }
/* Give active conversations the available window height; keep the controls visible. */
body:not([data-view='lobby']) .lobby-only { display: none; }
body[data-view='chat'] .page { height: 100vh; height: 100svh; min-height: 600px; }
body[data-view='chat'] .masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; text-align: left; }
body[data-view='chat'] .wordmark { width: 210px; }
body[data-view='chat'] .wordmark-sub { font-size: 9px; }
body[data-view='chat'] .masthead-note { margin-top: 0; font-size: 11px; }
body[data-view='chat'] .page-content { min-height: 0; display: flex; flex-direction: column; }
body[data-view='chat'] #chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
body[data-view='chat'] .chat-layout { flex: 1; }
body[data-view='chat'] #messages { height: 0; min-height: 0; }
body[data-view='chat'] .footer { margin-top: 16px; padding-block: 12px; }
@media (max-width: 1100px) {
  .room { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .room strong { grid-row: auto; }
  .nav-note { display: none; }
  .chat-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; }
}
@media (max-width: 760px) {
  .page { padding: 10px 16px 0; }
  .system-strip { font-size: 9px; letter-spacing: 0; gap: 8px; }
  .cursor { margin-left: 3px; }
  .masthead { padding: 24px 0 20px; }
  .wordmark { width: 360px; }
  .wordmark-sub { font-size: 9px; }
  .masthead-note { font-size: 11px; }
  .main-nav { gap: 10px 18px; font-size: 12px; }
  .page-heading { padding-top: 22px; }
  .heading-note { font-size: 12px; }
  .rooms { gap: 8px; }
  .room { padding: 12px 9px; min-height: 110px; }
  .room small, .room-state { font-size: 10px; }
  .columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .guide-steps { gap: 20px; }
  .invitation-layout, .join-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .room-note { padding-top: 18px; }
  .note-number { float: left; margin-right: 18px; }
  .room-note h3 { padding-top: 4px; }
  .room-note p { clear: both; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 0; }
  .chat-sidebar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px 28px; padding: 13px 0 0; overflow: visible; }
  .room-stat { padding: 0; border: 0; flex-direction: row; align-items: baseline; gap: 10px; }
  .room-stat:first-child { padding-top: 0; }
  .stat-label { font-size: 9px; }
  #countdown { font-size: 17px; }
  #people { font-size: 13px; }
  .stat-help, .chat-sidebar-note { display: none; }
  .message { grid-template-columns: 12ch minmax(0, 1fr); gap: 12px; }
  #messages { padding: 13px; font-size: 13px; }
  .composer { padding: 10px 12px; gap: 10px; }
  .composer button { padding-inline: 14px; gap: 8px; }
  body[data-view='chat'] .masthead-note { display: none; }
  body[data-view='chat'] .wordmark { width: 180px; }
  body[data-view='chat'] .wordmark-sub { font-size: 8px; }
  body[data-view='chat'] .footer { font-size: 10px; }
  body[data-view='chat'] .footer-details { display: none; }
}
@media (max-width: 520px) {
  .page { padding-inline: 13px; }
  .system-strip > :last-child { max-width: 16ch; }
  .heading-note { max-width: none; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room { grid-template-columns: auto minmax(0, 1fr); min-height: 88px; gap: 0 15px; padding: 12px; }
  .room strong { grid-row: 1 / 3; font-size: 29px; }
  .booking-fields { grid-template-columns: minmax(0, 1fr); }
  .panel-body { padding: 16px; }
  .panel-heading { padding-inline: 16px; }
  .panel-heading > span { font-size: 9px; }
  .guide-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .credential-row { flex-direction: column; }
  .credential-row input, .credential-row textarea { flex: auto; }
  .credential-row button { align-self: end; }
  .chat-heading h2 { font-size: 25px; }
  .chat-heading > button { font-size: 12px; gap: 9px; padding-inline: 12px; }
  .message { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-bottom: 16px; }
  .composer .prompt { display: none; }
  .composer button { font-size: 12px; }
  .composer input { font-size: 13px; }
  .chat-sidebar { gap: 10px 20px; }
  .room-stat { gap: 8px; }
  .stat-label { font-size: 8px; }
  #countdown { font-size: 15px; }
  .slot { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .footer { font-size: 10px; }
}
@media (max-height: 650px) and (min-width: 761px) {
  body[data-view='chat'] .wordmark { width: 150px; }
  body[data-view='chat'] .wordmark-sub, body[data-view='chat'] .masthead-note { display: none; }
  body[data-view='chat'] .masthead { padding-block: 10px; }
}
