:root {
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --line: #d9e2f2;
  --text: #11182a;
  --muted: #60708f;
  --accent: #3f63ff;
  --accent-2: #2f4fe3;
  --danger: #cf3557;
  --ok: #168f67;
  --warn: #8f6a00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rajdhani", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 99, 255, 0.08) 0%, transparent 34%),
    var(--bg);
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(28, 52, 110, 0.08);
}

.marketing-header,
.marketing-footer {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
}

.marketing-footer {
  margin-top: 30px;
  margin-bottom: 6px;
  padding-top: 12px;
  border-top: 1px solid #dce5f6;
}

.marketing-header {
  position: sticky;
  top: 8px;
  z-index: 20;
}

.header-inner,
.footer-inner {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-inner {
  min-height: 66px;
  background: #fbfdff;
}

.footer-links { display: flex; gap: 10px; color: var(--muted); font-size: 0.8rem; }

.marketing-footer .brand {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

#landingView.card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.brand {
  margin: 0;
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 700;
  font-size: 1.4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 22px;
}

.hero-main {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 34px;
  box-shadow:
    0 18px 44px rgba(29, 55, 117, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-center { text-align: left; }

.eyebrow {
  margin: 0;
  color: #355fc9;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}

h1 {
  margin: 10px 0 14px;
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: clamp(4rem, 9vw, 7.2rem);
  line-height: 0.82;
}

h2, h3 {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 1.22rem;
  max-width: 56ch;
}

.hero-main-cta { display: none; }

.muted { margin: 0; color: var(--muted); }

.audio-tip {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #5c6d8f;
  line-height: 1.4;
}

/* Breathing room between primary CTA and “No signup…” subline */
.hero-main .btn.primary + .muted,
.hero-cta .btn.primary + .muted {
  margin-top: 14px;
  line-height: 1.45;
}

.hero-cta {
  position: sticky;
  top: 90px;
  overflow: hidden;
  border-radius: 18px;
  padding: 26px 24px 22px;
  border: 1px solid rgba(63, 99, 255, 0.12);
  background:
    linear-gradient(165deg, #ffffff 0%, #f6f9ff 42%, #eef3ff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 28px 56px -14px rgba(46, 72, 160, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.hero-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2f4fe3, #5b7cff 50%, #2f4fe3);
  border-radius: 18px 18px 0 0;
}

.hero-cta > * {
  position: relative;
  z-index: 1;
}

.hero-cta .label {
  font-family: "Teko", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: #2d4aa8;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  width: 100%;
  padding: 13px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 9px;
  transition: transform .12s ease, opacity .12s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .65; cursor: not-allowed; }

.primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.secondary { color: var(--text); border-color: #d6dff0; background: #ffffff; }
.danger { color: #fff; border-color: #b02947; background: linear-gradient(135deg, #de5072, var(--danger)); }

.btn.small { width: auto; margin-top: 0; font-size: .82rem; padding: 8px 12px; }

.options { display: grid; gap: 8px; margin-top: 10px; }
.options label { color: var(--muted); font-size: 0.82rem; }

.options select,
.join-form input,
.shared-notes textarea {
  border: 1px solid #d6dff0;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.checkbox-line { display: flex; align-items: center; gap: 8px; }

/* Room setup: make link settings stand out from the CTA */
.room-settings {
  margin-top: 16px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(63, 99, 255, 0.22);
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 52%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 26px rgba(46, 83, 205, 0.1);
  gap: 10px;
}

.room-settings-head {
  margin: 0 0 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(63, 99, 255, 0.14);
  font-family: "Teko", sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #1e3a8f;
  font-weight: 600;
  line-height: 1.1;
}

.room-settings label[for="expirySelect"] {
  font-weight: 700;
  color: #33466b;
  font-size: 0.88rem;
  margin-top: 4px;
}

.room-settings select {
  border: 2px solid rgba(63, 99, 255, 0.28);
  background: #fbfdff;
  font-weight: 600;
  color: #152238;
  box-shadow: 0 1px 3px rgba(30, 57, 118, 0.06);
}

.room-settings select:focus {
  outline: none;
  border-color: rgba(63, 99, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(63, 99, 255, 0.18);
}

.room-settings .checkbox-line {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed rgba(63, 99, 255, 0.2);
  font-weight: 600;
  color: #33466b;
  font-size: 0.9rem;
  line-height: 1.35;
}

.room-settings .checkbox-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3f63ff;
  cursor: pointer;
}

.invite-purpose-field {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.invite-purpose-field label {
  font-weight: 700;
  color: #33466b;
  font-size: 0.88rem;
}

.invite-purpose-field textarea {
  border: 2px solid rgba(63, 99, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  min-height: 52px;
  max-height: 120px;
  color: #152238;
  background: #fbfdff;
}

.invite-purpose-field textarea:focus {
  outline: none;
  border-color: rgba(63, 99, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(63, 99, 255, 0.15);
}

.invite-purpose-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #60708f;
  line-height: 1.35;
}

/* Creator share panel — shown to room creator before guest joins */
.creator-share-panel {
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(63, 99, 255, 0.3);
  background: linear-gradient(135deg, #f0f5ff 0%, #eaefff 100%);
  overflow: hidden;
}

.csp-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 18px 16px;
}

.csp-step--two {
  padding: 12px 18px;
  border-top: 1px solid rgba(63, 99, 255, 0.15);
  background: rgba(255,255,255,0.5);
  align-items: center;
}

.csp-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: "Teko", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.csp-step--two .csp-step-num {
  background: rgba(63,99,255,0.15);
  color: var(--accent);
  margin-top: 0;
}

.csp-step-body { flex: 1; min-width: 0; }

.csp-step-title {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: #1a2d52;
}

.csp-step--two .csp-step-title {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.csp-step-sub {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.csp-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(63,99,255,0.2);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.csp-url {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  color: #3050a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.csp-share-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.csp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(63,99,255,0.25);
  background: rgba(255,255,255,0.8);
  color: #1a2d52;
  font: 600 0.82rem "Rajdhani", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.csp-share-btn:hover { background: rgba(255,255,255,1); }

.csp-share-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.csp-waiting {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.csp-waiting-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Call ended screen */
.call-ended-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px 24px;
  gap: 12px;
}

.call-ended-icon {
  width: 56px;
  height: 56px;
  color: var(--ok);
}

.call-ended-icon svg {
  width: 100%;
  height: 100%;
}

.call-ended-title {
  margin: 0;
  font-family: "Teko", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1;
}

.call-ended-reason {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.call-ended-share {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.call-ended-share-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.call-ended-new-call {
  margin-top: 4px;
  text-decoration: none;
}

/* Room branding bar — always visible in room view */
.room-brand-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.room-brand-link {
  font-family: "Teko", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}

.room-brand-link:hover { text-decoration: underline; }

.room-brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Guest invite card — shown only to invitees, not room creator */
.guest-invite-card {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8efff 100%);
  border: 1px solid rgba(63, 99, 255, 0.22);
}

.guest-invite-headline {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2d52;
}

.guest-invite-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.call-purpose {
  margin: 14px 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(63, 99, 255, 0.2);
  background: linear-gradient(135deg, #f8faff 0%, #eef4ff 100%);
  box-shadow: 0 6px 18px rgba(46, 83, 205, 0.08);
}

.call-purpose-label {
  margin: 0 0 6px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #355fc9;
}

.call-purpose-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a2d52;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.call-purpose-text--empty {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6a7899;
}

.shared-notes-purpose {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e3a72;
  line-height: 1.4;
  background: linear-gradient(180deg, #f4f7ff 0%, #eef3ff 100%);
  border: 1px solid #d8e2f5;
}

.usage-icons {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(63, 99, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.usage-item {
  border: 1px solid rgba(210, 222, 245, 0.95);
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(30, 57, 118, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.usage-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(46, 83, 205, 0.12);
  border-color: rgba(63, 99, 255, 0.22);
}

.usage-item p {
  margin: 0;
  color: #4a5d82;
  font-size: 0.86rem;
  line-height: 1.28;
  font-weight: 600;
}

.usage-item-title {
  font-family: "Teko", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e3a8f;
  font-weight: 600;
}

.usage-item--notes {
  grid-column: 1 / -1;
  grid-template-columns: 42px 1fr;
  align-items: start;
  padding: 14px 14px 14px 12px;
  background: linear-gradient(135deg, #f8faff 0%, #eef4ff 55%, #e8f0ff 100%);
  border-color: rgba(63, 99, 255, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(46, 83, 205, 0.1);
}

.usage-item--notes .usage-item-title {
  display: inline;
  margin-right: 0.25rem;
}

.usage-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(63, 99, 255, 0.12);
  background: linear-gradient(165deg, #ffffff 0%, #eef3ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.usage-icon--notes {
  border-color: rgba(63, 99, 255, 0.22);
  background: linear-gradient(165deg, #ffffff 0%, #e3ecff 100%);
}

.usage-icon svg {
  width: 18px;
  height: 18px;
  stroke: #3f63ff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-strip {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trust-strip span {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 7px 11px;
  color: #566789;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 0.7rem;
  font-weight: 700;
}

.label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4e68b6;
  font-weight: 700;
}

.product-footer { display: none; }

.link-btn {
  background: transparent;
  border: none;
  color: #4c67bb;
  padding: 0;
  font-size: 0.84rem;
  cursor: pointer;
}

.analytics {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #66769a;
  font-size: 0.84rem;
}

#roomView {
  padding: 20px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.room-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
  gap: 16px;
}

.room-shell.notes-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.call-pane,
.shared-notes {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px;
  box-shadow:
    0 14px 30px rgba(30, 57, 118, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.room-code-wrap { display: flex; align-items: center; gap: 8px; }

code {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #d6dff0;
  background: #f4f7ff;
  color: #35509f;
}

.timer-wrap { margin-top: 12px; }

.timer {
  margin: 4px 0 8px;
  font-family: "Teko", sans-serif;
  font-size: clamp(4rem, 10vw, 6.4rem);
  line-height: .82;
  letter-spacing: 0.01em;
  color: #11245f;
}

.meta-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.meta-badge {
  border: 1px solid #d6dff0;
  background: #f5f8ff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  color: #5b6c8d;
}

.status {
  margin-top: 10px;
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
}

.status.waiting { background: rgba(255, 179, 71, .16); color: var(--warn); }
.status.connecting { background: rgba(63, 99, 255, .14); color: #4769ca; }
.status.in-call { background: rgba(22, 143, 103, .14); color: var(--ok); }
.status.ended { background: rgba(205, 53, 87, .14); color: #b63352; }

.join-form { margin-top: 12px; display: grid; gap: 10px; }
.join-form label { font-size: 0.82rem; color: var(--muted); }

.call-controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mic-meter-wrap { flex: 1; min-width: 150px; }

.mic-meter {
  margin-top: 5px;
  height: 8px;
  border: 1px solid #d6dff0;
  border-radius: 999px;
  background: #eef3ff;
  overflow: hidden;
}

#micLevelBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6e92ff, #4de6b0);
  transition: width .12s linear;
}

.state-text { margin: 12px 0 8px; font-weight: 700; }

.events {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  min-height: 18px;
  color: #5d6d92;
  font-size: 0.84rem;
}

.events p { margin: 3px 0; }

.room-tips {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2eaf5;
}

.room-tips-title {
  margin: 0 0 12px;
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  font-weight: 600;
  color: #35509f;
}

.room-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.room-tips-heading {
  margin: 0 0 8px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5b6c8d;
}

.room-tips-col ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #4c5f84;
  font-size: 0.86rem;
  line-height: 1.45;
}

.room-tips-col li {
  margin-bottom: 6px;
}

.room-tips-col li:last-child {
  margin-bottom: 0;
}

.room-tips-col strong {
  color: #2a3d66;
  font-weight: 700;
}

.shared-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.shared-notes textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
}

.notes-hint { margin-top: 6px; font-size: 0.76rem; }

.toast-root {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast-root .toast {
  pointer-events: auto;
}

.toast {
  min-width: 200px;
  max-width: min(320px, calc(100vw - 32px));
  border-radius: 11px;
  border: 1px solid #d6dff0;
  background: #fff;
  color: #2e3b5f;
  padding: 11px 13px 11px 14px;
  font-size: 0.84rem;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(25, 42, 86, 0.16);
  border-left: 4px solid #5b7cff;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.toast--out {
  opacity: 0;
  transform: translateX(12px);
}

.toast.toast--success {
  border-left-color: #168f67;
  background: linear-gradient(180deg, #f6fffb 0%, #ffffff 100%);
}

.toast.toast--warning {
  border-left-color: #c98a10;
  background: linear-gradient(180deg, #fffbf3 0%, #ffffff 100%);
}

.toast.toast--error {
  border-left-color: #cf3557;
  background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
}

.toast.toast--info {
  border-left-color: #3f63ff;
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
}

.hidden { display: none !important; }

/* Timer urgency — last 60 seconds */
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer--urgent {
  color: var(--danger) !important;
  animation: timer-pulse 1s ease-in-out infinite;
}

/* Button loading state */
.btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn--loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

.btn--loading.secondary::after {
  border-color: rgba(63,99,255,0.3);
  border-top-color: var(--accent);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .hero,
  .room-shell {
    grid-template-columns: 1fr;
  }
  .hero-cta {
    position: static;
    top: auto;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-soft: #1a2230;
    --line: #2a3447;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #5b7eff;
    --accent-2: #4060e0;
    --danger: #e05370;
    --ok: #3fb882;
    --warn: #d4a017;
  }

  body {
    background:
      radial-gradient(circle at 100% 0%, rgba(63, 99, 255, 0.12) 0%, transparent 34%),
      var(--bg);
  }

  .header-inner {
    background: rgba(22, 27, 34, 0.94);
  }

  .footer-inner {
    background: #0f1419;
  }

  .hero-main {
    background: var(--surface);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  }

  .hero-cta {
    background: linear-gradient(165deg, #1a2035 0%, #141928 100%);
    box-shadow:
      0 1px 0 rgba(255,255,255,0.06) inset,
      0 28px 56px -14px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255,255,255,0.06) inset;
    border-color: rgba(91, 126, 255, 0.18);
  }

  .hero-cta .label { color: #7aa2f7; }

  .eyebrow { color: #7aa2f7; }

  .hero-copy { color: var(--muted); }

  .btn.secondary {
    background: #1e2535;
    border-color: var(--line);
    color: var(--text);
  }

  .options select,
  .join-form input,
  .shared-notes textarea,
  .invite-purpose-field textarea {
    background: #1a2030;
    border-color: var(--line);
    color: var(--text);
  }

  .room-settings {
    background: linear-gradient(180deg, #1a2235 0%, #161b22 52%);
    border-color: rgba(91, 126, 255, 0.22);
  }

  .room-settings-head { color: #7aa2f7; }
  .room-settings label[for="expirySelect"] { color: #a0b4d0; }
  .room-settings select { background: #1a2030; border-color: rgba(91,126,255,0.3); color: var(--text); }
  .room-settings .checkbox-line { color: #a0b4d0; }

  .invite-purpose-field label { color: #a0b4d0; }
  .invite-purpose-hint { color: var(--muted); }

  code {
    background: #1a2235;
    border-color: var(--line);
    color: #7aa2f7;
  }

  .trust-strip span {
    background: #1a2235;
    border-color: var(--line);
    color: var(--muted);
  }

  .usage-item {
    background: linear-gradient(180deg, #1a2235 0%, #161b22 100%);
    border-color: var(--line);
  }

  .usage-item p { color: var(--muted); }

  .usage-item--notes {
    background: linear-gradient(135deg, #1a2235 0%, #141d30 100%);
    border-color: rgba(91, 126, 255, 0.22);
  }

  .usage-icon {
    background: linear-gradient(165deg, #1e2840 0%, #1a2235 100%);
    border-color: rgba(91, 126, 255, 0.18);
  }

  .usage-item-title { color: #7aa2f7; }

  #roomView {
    background: linear-gradient(180deg, #161b22 0%, #0f1419 100%);
  }

  .call-pane,
  .shared-notes {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: 0 14px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .timer { color: #c9d1d9; }

  .meta-badge { background: #1a2235; border-color: var(--line); color: var(--muted); }

  .status.waiting { background: rgba(212, 160, 23, 0.18); }
  .status.connecting { background: rgba(91, 126, 255, 0.18); color: #7aa2f7; }
  .status.in-call { background: rgba(63, 184, 130, 0.18); }
  .status.ended { background: rgba(224, 83, 112, 0.18); }

  .creator-share-panel {
    background: linear-gradient(135deg, #1a2235 0%, #141d30 100%);
    border-color: rgba(91,126,255,0.25);
  }

  .csp-step--two { background: rgba(255,255,255,0.04); border-top-color: rgba(91,126,255,0.15); }
  .csp-step-title { color: #c9d1d9; }
  .csp-step--two .csp-step-title { color: var(--muted); }
  .csp-link-row { background: rgba(255,255,255,0.06); border-color: rgba(91,126,255,0.2); }
  .csp-url { color: #7aa2f7; }
  .csp-share-btn { background: rgba(255,255,255,0.07); border-color: rgba(91,126,255,0.2); color: #c9d1d9; }
  .csp-share-btn:hover { background: rgba(255,255,255,0.12); }

  .call-ended-share {
    background: #1a2235;
    border-color: var(--line);
  }

  .call-ended-title { color: var(--text); }

  .room-brand-bar { border-bottom-color: var(--line); }
  .room-brand-tagline { color: var(--muted); }

  .guest-invite-card {
    background: linear-gradient(135deg, #1a2235 0%, #141d30 100%);
    border-color: rgba(91, 126, 255, 0.22);
  }

  .guest-invite-headline { color: #c9d1d9; }

  .call-purpose {
    background: linear-gradient(135deg, #1a2235 0%, #141d30 100%);
    border-color: rgba(91, 126, 255, 0.22);
  }

  .call-purpose-label { color: #7aa2f7; }
  .call-purpose-text { color: #c9d1d9; }
  .call-purpose-text--empty { color: var(--muted); }

  .shared-notes-purpose {
    background: linear-gradient(180deg, #1a2235 0%, #141d30 100%);
    border-color: var(--line);
    color: #a0b4d0;
  }

  .mic-meter { background: #1a2235; border-color: var(--line); }

  .state-text { color: var(--text); }

  .room-tips { border-top-color: var(--line); }
  .room-tips-title { color: #7aa2f7; }
  .room-tips-heading { color: var(--muted); }
  .room-tips-col ul { color: var(--muted); }
  .room-tips-col strong { color: #c9d1d9; }

  .toast {
    background: #1e2535;
    border-color: var(--line);
    color: #c9d1d9;
  }

  .toast.toast--success { background: linear-gradient(180deg, #162030 0%, #1e2535 100%); }
  .toast.toast--warning { background: linear-gradient(180deg, #1e1a10 0%, #1e2535 100%); }
  .toast.toast--error { background: linear-gradient(180deg, #201318 0%, #1e2535 100%); }
  .toast.toast--info { background: linear-gradient(180deg, #141d30 0%, #1e2535 100%); }

  .link-btn { color: #7aa2f7; }

  .marketing-footer { border-top-color: var(--line); }

  .join-form label { color: var(--muted); }
  .options label { color: var(--muted); }
}

@media (max-width: 680px) {
  body { padding: 10px; }
  .card { padding: 12px; border-radius: 12px; }
  .marketing-header { position: static; }
  .header-inner,
  .footer-inner {
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .marketing-footer {
    margin-top: 24px;
    padding-top: 10px;
  }
  .hero-main,
  .hero-cta {
    padding: 14px;
  }
  h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero-copy { font-size: 0.95rem; }
  .btn { padding: 10px 11px; }
  .usage-icons { grid-template-columns: 1fr; }
  .room-tips-grid { grid-template-columns: 1fr; }
  #roomView { padding: 12px; }
  .call-pane,
  .shared-notes { padding: 14px; }
  .timer { font-size: clamp(2.7rem, 20vw, 4.2rem); }
  .shared-notes textarea { min-height: 170px; }
}
