:root {
  --ink: #0B0D12;
  --panel: #14171F;
  --panel-raised: #1A1E29;
  --border: #232733;
  --text: #ECEDF2;
  --muted: #8A8FA3;
  --gold: #E3A94E;
  --gold-dim: #B8843A;
  --cyan: #4FD8D0;
  --danger: #FF6B6B;
  --ok: #4FD8A0;

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14.5px;
}

.home-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 14px;
}
.home-link:hover { color: var(--gold); }

a { color: var(--gold); }

button, .primary, .danger {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  transition: transform 0.1s ease, filter 0.15s ease;
}

button:active, .primary:active, .danger:active { transform: scale(0.97); }

.primary {
  background: var(--gold);
  color: #14110a;
  font-weight: 600;
  font-family: var(--font-display);
  text-decoration: none;
  display: inline-block;
}
.primary:hover { filter: brightness(1.08); }
.primary.small { padding: 6px 12px; font-size: 13px; }

.secondary {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  font-weight: 600;
  font-family: var(--font-display);
  text-decoration: none;
  display: inline-block;
}

.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

.badge {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 999px;
  padding: 2px 10px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ---------- The signature beam: converging light behind the QR / code, suggesting the file materializing there. One place only. ---------- */

.room-header {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(120px 120px at 70px 60px, rgba(227,169,78,0.16), transparent 70%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  overflow: hidden;
}

.room-header::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  width: 200px;
  height: 220%;
  background: linear-gradient(115deg, transparent 40%, rgba(79,216,208,0.10) 48%, rgba(227,169,78,0.14) 52%, transparent 60%);
  pointer-events: none;
}

.room-header img {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(227,169,78,0.35), 0 8px 30px rgba(227,169,78,0.12);
}

.room-meta { position: relative; display: flex; flex-direction: column; gap: 8px; }

.code {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.presence { color: var(--muted); font-size: 13.5px; }
.presence strong { color: var(--cyan); font-weight: 600; }

.share-menu {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.share-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 6px;
}

.share-menu a:hover { background: var(--panel); color: var(--gold); }

/* ---------- rest of the UI: quiet, disciplined ---------- */

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  margin-bottom: 20px;
  transition: border-color .15s, background .15s;
}

.dropzone.drag { border-color: var(--gold); background: rgba(227,169,78,0.05); }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.file-row .fname {
  flex: 1 1 100%;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .file-row .fname { flex: 1 1 auto; }
}

.file-row .fsize, .file-row .fstatus { color: var(--muted); font-size: 12.5px; font-family: var(--font-mono); white-space: nowrap; }
.file-row.blocked .fname { color: var(--danger); text-decoration: line-through; }
.file-row.clean .fstatus { color: var(--ok); }
.file-row.ready { border-style: dashed; }
.file-row.ready .fstatus { color: var(--muted); font-style: italic; }

.progress-track {
  flex: 1 1 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.15s ease;
}

.publish-btn {
  background: var(--gold);
  color: #14110a;
  font-weight: 600;
  font-family: var(--font-display);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
}

.highlight-btn {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--danger);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.download-btn {
  font-family: var(--font-display);
}

.highlight-banner {
  background: rgba(79,216,208,0.08);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.highlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.highlight-preview img,
.highlight-preview video {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  display: block;
}

.highlight-preview iframe {
  width: 100%;
  height: 60vh;
  border: none;
  border-radius: 8px;
  background: #fff;
}

.highlight-preview audio { width: 100%; }

.closed-msg { color: var(--danger); margin-top: 20px; }

.ios-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.code-input {
  width: 100%;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  margin-bottom: 12px;
}

.masked-input {
  -webkit-text-security: disc;
  text-security: disc;
}

.text-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.text-form textarea {
  font: inherit;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.how-it-works {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}

.how-it-works li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.step-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- landing page ---------- */

.landing {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 20px 100px;
}

.landing-hero {
  position: relative;
  text-align: center;
  padding: 56px 20px 48px;
  margin-bottom: 32px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
}

.beam-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(360px 320px at 50% 0%, rgba(227,169,78,0.32), transparent 68%),
    conic-gradient(from 200deg at 50% -15%, transparent 0deg, rgba(79,216,208,0.22) 35deg, transparent 85deg);
}

.beam-glow::after {
  content: '';
  position: absolute;
  top: -60%;
  left: 30%;
  width: 260px;
  height: 260%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent 42%, rgba(79,216,208,0.16) 48%, rgba(227,169,78,0.22) 52%, transparent 58%);
}

.landing-hero h1 {
  position: relative;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 10px;
}

.landing-tagline {
  position: relative;
  font-size: 17px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 32px;
}

.landing-ctas {
  position: relative;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.landing-ctas .primary,
.landing-ctas .secondary {
  padding: 13px 26px;
  font-size: 15.5px;
  border-radius: 12px;
}

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

.landing-join h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-join form {
  display: flex;
  gap: 10px;
}

.landing-join .code-input { margin-bottom: 0; flex: 1; }

.landing-modes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

@media (max-width: 520px) {
  .landing-modes { grid-template-columns: 1fr; }
}

.mode-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.mode-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.mode-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-arrow {
  color: var(--gold);
  font-weight: 400;
}

.mode-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.5;
}

/* ---------- toast notifications — replaces blocking browser alert() popups ---------- */

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  padding: 0 16px;
}

.toast {
  pointer-events: auto;
  max-width: 420px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.danger { border-left-color: var(--danger); }
.toast.gold { border-left-color: var(--gold); }

/* ---------- live shared pointer ---------- */

.pointer-surface {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 60vh;
  overflow: auto;
}

.pointer-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(79, 216, 208, 0.35), 0 0 16px 4px rgba(79, 216, 208, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.06s linear, top 0.06s linear;
  display: none;
  z-index: 5;
}

/* ---------- synchronized PDF presentation ---------- */

.pdf-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.pointer-surface canvas {
  display: block;
  border-radius: 8px;
}

/* ---------- live annotations ---------- */

.annotation-ping {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 6;
  animation: annotationPing 1.5s ease-out forwards;
}

@keyframes annotationPing {
  0%   { width: 12px; height: 12px; opacity: 1;   border-width: 4px; }
  100% { width: 70px; height: 70px; opacity: 0;   border-width: 1px; }
}

/* ---------- Quick Signals ---------- */

.reaction-bar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
}

.reaction-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
}

.reaction-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reaction-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  transition: transform 0.1s ease, border-color 0.15s ease, color 0.15s ease;
}

.reaction-btn svg { width: 19px; height: 19px; }
.reaction-btn span { font-size: 10.5px; font-family: var(--font-mono); }
.reaction-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.reaction-btn:active { transform: scale(0.92); }
.reaction-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

#reactionFloats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.reaction-float {
  position: absolute;
  bottom: 0;
  color: var(--gold);
  animation: reactionFloat 1.4s ease-out forwards;
}

.reaction-float svg { width: 34px; height: 34px; }

@keyframes reactionFloat {
  0%   { transform: translateY(0) scale(0.78); opacity: 0; }
  18%  { transform: translateY(-8vh) scale(1); opacity: 0.95; }
  100% { transform: translateY(-42vh) scale(0.96); opacity: 0; }
}

.quick-signal-summary {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 998;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(92vw, 520px);
  pointer-events: none;
}

.quick-signal-summary[hidden] { display: none; }

.quick-signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  font-size: 11px;
  color: var(--muted);
}
.quick-signal-chip svg { width: 15px; height: 15px; color: var(--gold); }
.quick-signal-chip b { color: var(--text); font-family: var(--font-mono); }

@media (max-width: 640px) {
  .reaction-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reaction-btn { padding: 8px 6px 7px; min-width: 0; }
  .reaction-btn span { white-space: nowrap; font-size: 10px; }
  .quick-signal-summary { top: 10px; right: 10px; left: 10px; justify-content: center; }
  .quick-signal-chip span { display: none; }
}

/* ---------- bidirectional 1:1 — owner tags ---------- */

.owner-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-right: 8px;
  white-space: nowrap;
}

.owner-tag.mine { background: rgba(227, 169, 78, 0.15); color: var(--gold); }
.owner-tag.theirs { background: rgba(79, 216, 208, 0.15); color: var(--cyan); }

/* v1.1: clearer room-first landing + resumable upload controls */
.share-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  max-width: 880px;
  margin: 22px auto 34px;
}
.share-flow > div:not(.flow-arrow) {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.share-flow span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.flow-arrow { align-self: center; color: var(--muted); font-size: 20px; }
.featured-mode { border-color: rgba(88, 214, 255, 0.45); }
.upload-actions { display: flex; gap: 10px; align-items: center; }
.upload-actions .link { font-size: 12px; padding: 2px 0; }
@media (max-width: 700px) {
  .share-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
}


/* ---------- v1.2 product polish ---------- */
.hero-kicker,
.mode-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.hero-kicker { margin-bottom: 10px; }
.hero-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(79,216,208,.65);
}
.hero-proof {
  position: relative;
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 32px;
}
.trust-strip > div {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  background: rgba(255,255,255,.018);
}
.trust-strip strong { display: block; margin-bottom: 5px; font-size: 13px; }
.trust-strip span { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.landing-modes { grid-template-columns: 1.35fr 1fr 1fr; }
.featured-mode {
  position: relative;
  background: linear-gradient(145deg, rgba(79,216,208,.07), rgba(227,169,78,.035) 60%, var(--panel));
  border-color: rgba(79,216,208,.42);
}
.mode-eyebrow { margin-bottom: 11px; }
.mode-cta {
  display: inline-block;
  margin-top: 15px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}
.use-cases {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px auto 0;
}
.use-cases span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-family: var(--font-mono);
}
.micro-trust {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
}
.room-live-note,
.guest-trust-note {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(79,216,208,.22);
  border-radius: 10px;
  background: rgba(79,216,208,.045);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.presenter-tip { color: var(--gold); opacity: .92; }
.share-mode-options {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.share-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
}
.share-mode-option:hover { border-color: var(--gold-dim); }
.share-mode-option input { margin-top: 3px; }
.share-mode-option span { display: flex; flex-direction: column; gap: 3px; }
.share-mode-option strong { font-size: 13px; }
.share-mode-option small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.recipient-growth {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 11.5px;
}
.recipient-growth a { color: var(--cyan); text-decoration: underline; }
@media (max-width: 700px) {
  .trust-strip { grid-template-columns: 1fr; }
  .landing-modes { grid-template-columns: 1fr; }
}

/* ---------- v1.2.2 landing simplification ---------- */
.share-flow {
  align-items: center;
  gap: 18px;
  max-width: 900px;
  margin: 28px auto 22px;
}
.share-flow > div:not(.flow-arrow) {
  border: 0;
  border-radius: 0;
  padding: 4px 2px;
  background: transparent;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.flow-step strong {
  font-family: var(--font-display);
  font-size: 14px;
}
.flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  border-radius: 999px;
  background: rgba(227,169,78,.12);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px !important;
  font-weight: 700;
}
.flow-arrow {
  color: rgba(236,237,242,.34);
  font-size: 18px;
}
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 11px;
  margin: 0 auto 24px;
  padding: 11px 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-strip > span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}
.trust-strip strong {
  display: inline;
  margin: 0;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}
.trust-strip .trust-dot {
  color: var(--gold-dim);
}
.trust-strip .trust-detail {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.landing-modes { margin: 24px 0; }

@media (max-width: 700px) {
  .share-flow {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 24px;
  }
  .flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
    margin: 0;
  }
  .trust-strip {
    gap: 6px 8px;
    padding: 10px 0;
  }
  .trust-strip .trust-dot { display: none; }
  .trust-strip > span:not(.trust-detail) {
    width: 100%;
    text-align: center;
  }
}


/* ---------- v1.2.3 final homepage refinements ---------- */
.landing-join .join-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* v1.2.10: make PDF page-range syntax obvious without adding visual clutter */
.range-help {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}
.range-help code {
  color: var(--cyan);
}


/* ---------- v1.2.11 Arcane Diamond ambient branding ---------- */
/* Keep the fantasy identity atmospheric: gold relic frame + cyan energy core,
   without turning the utility UI into a decorative fantasy interface. */
.landing-hero {
  background:
    radial-gradient(520px 340px at 50% 44%, rgba(0,229,255,.045), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 55%),
    var(--panel);
}

.beam-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(160px 180px at 50% 47%, rgba(0,229,255,.11), transparent 72%),
    radial-gradient(360px 280px at 50% -12%, rgba(212,175,55,.12), transparent 74%),
    linear-gradient(90deg,
      transparent 47.8%,
      rgba(212,175,55,.035) 49.1%,
      rgba(0,229,255,.12) 49.72%,
      rgba(224,255,255,.18) 50%,
      rgba(0,229,255,.12) 50.28%,
      rgba(212,175,55,.035) 50.9%,
      transparent 52.2%);
}

/* Ghosted arcane-diamond outline behind the hero copy. */
.beam-glow::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(212,175,55,.075);
  box-shadow:
    inset 0 0 32px rgba(0,229,255,.018),
    0 0 40px rgba(0,229,255,.018);
}

/* Narrow energy flare: cyan core, warm relic edges. */
.beam-glow::after {
  content: '';
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: 50%;
  width: 110px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(212,175,55,.025) 32%,
      rgba(0,229,255,.055) 45%,
      rgba(225,255,255,.11) 49%,
      rgba(0,229,255,.10) 50%,
      rgba(225,255,255,.11) 51%,
      rgba(0,229,255,.055) 55%,
      rgba(212,175,55,.025) 68%,
      transparent 100%);
  filter: blur(.2px);
  opacity: .9;
}

/* Flagship Room card carries the same identity, at much lower intensity. */
.mode-card.featured-mode {
  position: relative;
  overflow: hidden;
  border-color: rgba(0,229,255,.34);
  background:
    radial-gradient(180px 130px at 0% 0%, rgba(0,229,255,.055), transparent 72%),
    radial-gradient(180px 140px at 100% 100%, rgba(212,175,55,.035), transparent 76%),
    var(--panel);
}
.mode-card.featured-mode::before {
  content: '';
  position: absolute;
  width: 92px;
  height: 92px;
  right: -48px;
  top: -48px;
  transform: rotate(45deg);
  border: 1px solid rgba(212,175,55,.095);
  pointer-events: none;
}
.mode-card.featured-mode:hover {
  border-color: rgba(0,229,255,.52);
  box-shadow: 0 0 26px rgba(0,229,255,.035);
}
.mode-card.featured-mode > * { position: relative; }

/* Existing QR/header signature beam now uses the Arcane Diamond palette. */
.room-header {
  background:
    radial-gradient(130px 130px at 70px 60px, rgba(212,175,55,.11), transparent 70%),
    radial-gradient(190px 150px at 78px 72px, rgba(0,229,255,.045), transparent 78%),
    var(--panel);
}
.room-header::before {
  top: -35%;
  left: -12%;
  width: 230px;
  height: 210%;
  transform: rotate(8deg);
  background: linear-gradient(90deg,
    transparent 41%,
    rgba(212,175,55,.035) 46%,
    rgba(0,229,255,.085) 49%,
    rgba(230,255,255,.095) 50%,
    rgba(0,229,255,.07) 51%,
    rgba(212,175,55,.03) 54%,
    transparent 59%);
}

@media (max-width: 520px) {
  .beam-glow::before {
    width: 235px;
    height: 235px;
    opacity: .72;
  }
  .beam-glow::after { width: 82px; }
}


/* ---------- v1.2.13 session setup polish ---------- */
.setup-wrap {
  max-width: 700px;
  min-height: 100vh;
  padding-top: 28px;
}

.session-setup {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  padding: 38px 38px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(360px 240px at 50% -40px, rgba(79,216,208,.075), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.006)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.20);
}

.session-setup::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background:
    linear-gradient(135deg, transparent 49.75%, rgba(227,169,78,.22) 50%, transparent 50.25%),
    linear-gradient(45deg, transparent 49.75%, rgba(79,216,208,.14) 50%, transparent 50.25%);
  background-size: 410px 410px;
  background-position: center -245px;
  background-repeat: no-repeat;
}

.setup-beam {
  position: absolute;
  z-index: 0;
  top: -130px;
  left: 50%;
  width: 170px;
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .38;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(227,169,78,.08) 37%,
    rgba(79,216,208,.28) 49%,
    rgba(79,216,208,.34) 50%,
    rgba(227,169,78,.10) 63%,
    transparent 100%);
  filter: blur(7px);
}

.setup-brand,
.setup-action,
.setup-optional,
.setup-flow,
.setup-share-target,
.setup-switch { position: relative; z-index: 1; }

.setup-brand { text-align: center; }

.setup-mark {
  width: 54px;
  height: 54px;
  display: block;
  margin: 0 auto 11px;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(79,216,208,.09);
}

.setup-eyebrow {
  margin-bottom: 6px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
}

.session-setup h1 {
  display: block;
  margin: 0 0 8px;
  text-align: center;
  font-size: 30px;
  letter-spacing: -.025em;
}

.setup-lead {
  max-width: 500px;
  margin: 0 auto;
  color: var(--text);
  font-size: 15px;
  text-align: center;
}

.setup-delete-note {
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.setup-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 26px 0 22px;
}

.setup-primary {
  min-width: 210px;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 15px;
}

.setup-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  text-align: center;
}
.setup-trust span { color: var(--gold-dim); }

.setup-optional {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(7,10,15,.25);
}

.setup-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
}

.setup-toggle-row > span,
.share-mode-option span { min-width: 0; }

.setup-toggle-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
}
.setup-toggle-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}
.setup-toggle-row input { flex: 0 0 auto; }

.setup-code-input {
  margin: 13px 0 0;
  background: var(--ink);
}
.setup-error { margin: 8px 0 0; font-size: 12px; }

.setup-option-heading {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
}
.setup-option-heading span {
  margin-left: 5px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
}

.setup-mode-panel .share-mode-options {
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
}
.setup-mode-panel .share-mode-option {
  min-height: 72px;
  margin: 0;
  background: rgba(255,255,255,.016);
}
.setup-mode-panel .share-mode-option:has(input:checked) {
  border-color: rgba(79,216,208,.55);
  background: rgba(79,216,208,.055);
}

.setup-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 9px;
  max-width: 520px;
  margin: 24px auto 0;
  padding-top: 21px;
  border-top: 1px solid var(--border);
}
.setup-flow > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}
.setup-flow div > span {
  display: inline-flex;
  width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  border-radius: 999px;
  background: rgba(227,169,78,.11);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
}
.setup-flow strong {
  font-family: var(--font-display);
  font-size: 12.5px;
}
.setup-flow small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.setup-flow > b {
  color: rgba(236,237,242,.25);
  font-size: 13px;
  font-weight: 400;
}

.setup-share-target {
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}
.setup-share-target strong { color: var(--cyan); font-weight: 600; }

.setup-switch {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.setup-switch a { color: var(--gold); text-decoration: none; }
.setup-switch a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .setup-wrap { padding-top: 18px; }
  .session-setup { padding: 28px 18px 24px; border-radius: 18px; }
  .session-setup h1 { font-size: 27px; }
  .setup-mark { width: 48px; height: 48px; }
  .setup-lead { font-size: 14px; }
  .setup-mode-panel .share-mode-options { grid-template-columns: 1fr; }
  .setup-flow { gap: 5px; }
  .setup-flow small { white-space: normal; line-height: 1.25; }
  .setup-flow > b { font-size: 11px; }
}

@media (max-width: 380px) {
  .setup-flow { grid-template-columns: 1fr; gap: 10px; }
  .setup-flow > b { display: none; }
}


/* ---------- Use-case landing pages ---------- */
.use-page { max-width: 860px; margin: 0 auto; padding: 26px 22px 64px; }
.use-home { margin-bottom: 22px; }
.use-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 48px 42px 44px; border: 1px solid var(--border); border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(79,216,208,.09), transparent 34%),
    linear-gradient(315deg, rgba(227,169,78,.08), transparent 38%),
    var(--panel);
}
.use-hero::before, .use-hero::after { content:''; position:absolute; pointer-events:none; opacity:.28; transform:rotate(45deg); border:1px solid rgba(227,169,78,.25); }
.use-hero::before { width:330px; height:330px; left:calc(50% - 165px); top:-225px; }
.use-hero::after { width:220px; height:220px; left:calc(50% - 110px); bottom:-170px; border-color:rgba(79,216,208,.18); }
.use-mark { position:relative; width:58px; height:58px; margin:0 auto 14px; }
.use-mark img { width:100%; height:100%; border-radius:12px; display:block; }
.use-hero h1 { position:relative; display:block; font-size:clamp(30px,5vw,48px); line-height:1.05; max-width:700px; margin:8px auto 16px; letter-spacing:-.035em; }
.use-hero .hero-kicker { position:relative; }
.use-lead { position:relative; max-width:690px; margin:0 auto 26px; color:var(--muted); font-size:17px; line-height:1.7; }
.use-hero .landing-ctas { position:relative; justify-content:center; }
.use-proof { position:relative; color:var(--muted); font-size:12.5px; margin:18px 0 0; }
.use-section-label { font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.1em; font-size:11px; color:var(--cyan); margin-bottom:9px; }
.use-problem, .use-how, .use-materials, .use-trust { padding:42px 8px 0; }
.use-problem h2, .use-trust h2, .use-final h2 { font-family:var(--font-display); font-size:25px; margin:0 0 10px; letter-spacing:-.02em; }
.use-problem p, .use-trust p { max-width:720px; color:var(--muted); font-size:15px; line-height:1.75; margin:0; }
.use-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.use-step { background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:20px; display:flex; gap:13px; }
.use-step>span { flex:0 0 26px; height:26px; border-radius:50%; display:grid; place-items:center; background:rgba(227,169,78,.12); color:var(--gold); font-family:var(--font-mono); font-size:12px; }
.use-step h3 { font-family:var(--font-display); margin:1px 0 7px; font-size:15px; }
.use-step p { color:var(--muted); margin:0; font-size:13.5px; line-height:1.6; }
.use-pills { display:flex; gap:9px; flex-wrap:wrap; }
.use-pills span { border:1px solid var(--border); border-radius:999px; color:var(--muted); padding:7px 12px; font-size:12.5px; background:rgba(20,23,31,.55); }
.use-trust { border-top:1px solid var(--border); margin-top:42px; padding-top:32px; }
.use-trust p + p { margin-top:12px; font-size:13px; }
.use-final { text-align:center; padding:54px 20px 12px; }
.use-final h2 { margin-bottom:18px; }
.use-footer { text-align:center; display:flex; justify-content:center; gap:10px; margin-top:38px; color:var(--muted); font-size:12.5px; }
.use-footer a { color:var(--muted); text-decoration:underline; }
.use-cases a { color:inherit; text-decoration:none; }
.use-cases a:hover { color:var(--gold); border-color:rgba(227,169,78,.45); }
@media (max-width:720px) {
  .use-page { padding:18px 14px 48px; }
  .use-hero { padding:36px 20px 34px; }
  .use-lead { font-size:15px; }
  .use-steps { grid-template-columns:1fr; }
  .use-problem, .use-how, .use-materials, .use-trust { padding-left:2px; padding-right:2px; }
}


/* ---------- v1.3.9 Beam Link sharing + mobile layout ---------- */
.beam-link-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
}
.beam-link-card .room-meta { min-width: 0; }
.beam-link-card #readyName {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.beam-link-share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.beam-link-channel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
  text-align: center;
}
.beam-native-share { display: none; }

@media (max-width: 700px) {
  .beam-link-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .beam-link-card #qr {
    justify-self: center;
    width: min(180px, 58vw);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .beam-link-card .room-meta {
    width: 100%;
    gap: 10px;
  }
  .beam-link-card .beam-title,
  .beam-link-card .presence,
  .beam-link-card #readyName,
  .beam-link-card #readySize {
    text-align: center;
  }
  .beam-link-card .beam-title { font-size: 20px; }
  .beam-link-card .presence { line-height: 1.45; }
  .beam-link-card button,
  .beam-link-card .beam-link-channel { width: 100%; }
  .beam-native-share:not([hidden]) { display: block; }
}

@media (max-width: 420px) {
  .beam-link-share-row { grid-template-columns: 1fr; }
}


/* In-app image preview: keeps installed PWA/shortcut users inside RelicBeam. */
body.image-preview-open { overflow: hidden; }
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.image-preview-modal[hidden] { display: none; }
.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, .88);
  backdrop-filter: blur(8px);
}
.image-preview-panel {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 94dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: #0B0D12;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.image-preview-head,
.image-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.image-preview-head { justify-content: space-between; min-width: 0; }
.image-preview-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-preview-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  border-radius: 12px;
  background: #05070a;
}
.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(94dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.image-preview-actions { justify-content: flex-end; }
@media (max-width: 640px) {
  .image-preview-modal { padding: 0; }
  .image-preview-panel {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }
  .image-preview-stage img { max-height: calc(100dvh - 145px); }
  .image-preview-actions .primary { width: 100%; }
}

/* ---------- v1.3.11 homepage: choose the job, not the feature ---------- */
.share-choice-heading {
  position: relative;
  margin: 28px 0 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.share-choices {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

.share-choice {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11,13,18,.58);
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.share-choice:hover {
  border-color: rgba(79,216,208,.52);
  background: rgba(18,22,30,.78);
  transform: translateY(-1px);
}
.share-choice:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.share-choice-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.share-choice-desc {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.share-choice-product {
  margin-top: auto;
  padding-top: 14px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.hero-join-link {
  position: relative;
  display: inline-block;
  margin-top: 17px;
  color: var(--cyan);
  font-size: 13px;
  text-decoration: none;
}
.hero-join-link span { color: var(--muted); }
.hero-join-link:hover { text-decoration: underline; }

.room-explainer {
  margin: 30px 0 0;
  padding: 24px 0 4px;
  border-top: 1px solid var(--border);
}
.section-intro {
  text-align: center;
  margin: 0 auto 18px;
}
.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-intro h2 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 18px;
}
.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.room-explainer .share-flow { margin: 0; }

.utility-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color .15s ease, transform .1s ease;
}
.utility-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}
.utility-card > div { min-width: 0; flex: 1; }
.utility-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 16px;
}
.utility-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.utility-arrow {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 22px;
}

@media (max-width: 680px) {
  .landing-hero { padding: 42px 16px 34px; }
  .landing-tagline { margin-bottom: 24px; }
  .share-choices { grid-template-columns: 1fr; }
  .share-choice { min-height: 0; padding: 15px 16px; }
  .share-choice-product { padding-top: 10px; }
}

@media (max-width: 520px) {
  .landing { padding-left: 14px; padding-right: 14px; }
  .landing-hero { border-radius: 18px; }
  .section-intro { padding: 0 10px; }
  .utility-card { padding: 18px; }
}

/* ---------- v1.3.12 contextual Save As ---------- */
body.save-as-open { overflow: hidden; }
.save-as-modal {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.save-as-modal[hidden] { display: none; }
.save-as-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, .82);
  backdrop-filter: blur(8px);
}
.save-as-panel {
  position: relative;
  width: min(470px, 94vw);
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: #0B0D12;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.save-as-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.save-as-head .eyebrow { margin-bottom:5px; }
.save-as-head strong { font-family:var(--font-display); font-size:18px; }
.save-as-name {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.save-as-choices { display:grid; gap:10px; }
.save-as-choice {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:11px;
  background:rgba(255,255,255,.018);
  color:var(--text);
  text-align:left;
  cursor:pointer;
  font:inherit;
}
.save-as-choice:hover { border-color:var(--gold-dim); }
.save-as-choice.recommended { background:linear-gradient(180deg, rgba(227,169,78,.18), rgba(227,169,78,.10)); border-color:rgba(227,169,78,.55); }
.save-as-choice strong { font-size:13px; }
.save-as-choice span { color:var(--muted); font-size:11.5px; line-height:1.4; }
.save-as-choice:disabled, .save-as-panel button:disabled { opacity:.5; cursor:wait; }
.save-as-status { min-height:18px; margin:13px 0 0; color:var(--cyan); font-size:12px; }
.save-as-status.error { color:#ff7373; }
@media (max-width:640px) {
  .save-as-modal { padding:14px; align-items:end; }
  .save-as-panel { width:100%; border-radius:18px; padding:18px; margin-bottom:max(0px, env(safe-area-inset-bottom)); }
}

.beam-link-options-grid {
  display: grid;
  gap: 12px;
}
.beam-link-options-grid > label:not(.setup-toggle-row) {
  display: grid;
  gap: 7px;
}
.beam-link-options-grid > label:not(.setup-toggle-row) > span {
  font-family: var(--font-display);
  font-size: 13.5px;
}
.beam-link-select {
  width: 100%;
  background: var(--ink);
}
.beam-link-once-row {
  margin-top: 4px;
}

/* v1.3.17: keep Quick Beam's default path decision-free. */
.setup-direction-details {
  padding: 0;
  overflow: hidden;
}
.setup-direction-details > summary {
  padding: 13px 14px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  list-style-position: inside;
}
.setup-direction-details[open] > summary {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.setup-direction-details .share-mode-options {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}
.setup-direction-details .share-mode-option {
  min-height: 0;
  padding: 11px 12px;
}

/* Remote View */
.remote-viewer-only {
  max-width: 460px;
  padding: 12px 14px;
  border: 1px solid rgba(77,209,220,.24);
  border-radius: 12px;
  background: rgba(77,209,220,.055);
  color: var(--muted);
  line-height: 1.45;
}
.remote-viewer-only strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}
.remote-viewer-only span { font-size: 13px; }

.remote-wrap { max-width: 980px; }
.remote-session, .remote-viewer { margin-top: 22px; }
.remote-invite-card { margin-top: 10px; }
.remote-code { letter-spacing: .12em; }
.remote-approval,
.remote-sharing {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(7,10,15,.46);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.remote-approval p,
.remote-sharing p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.remote-approval-actions,
.remote-viewer-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.remote-sharing { border-color: rgba(105,211,154,.35); }
.remote-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #69d39a;
  box-shadow: 0 0 16px rgba(105,211,154,.7);
  flex: 0 0 auto;
}
.remote-sharing > div:nth-child(2) { flex: 1; }
.remote-viewer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.remote-viewer-head h1 { margin: 4px 0; }
.remote-screen-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #05070a;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.remote-screen-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070a;
  touch-action: pinch-zoom;
}
.remote-screen-stage video.remote-video-fill { object-fit: cover; }
.remote-screen-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  aspect-ratio: auto !important;
  border: 0;
  border-radius: 0;
}
.remote-screen-stage:fullscreen video { width: 100%; height: 100%; }
.remote-waiting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(77,209,220,.06), transparent 55%);
}
@media (max-width: 700px) {
  .remote-approval, .remote-sharing, .remote-viewer-head { align-items: stretch; flex-direction: column; }
  .remote-approval-actions button, .remote-sharing button { width: 100%; }
  .remote-viewer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .remote-viewer-actions .danger { grid-column: 1 / -1; }
  .remote-screen-stage { min-height: 210px; max-height: 68dvh; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .remote-viewer { margin-top: 8px; }
  .remote-viewer-head { margin-bottom: 8px; }
  .remote-viewer-head h1 { font-size: 20px; }
  .remote-screen-stage { max-height: calc(100dvh - 132px); min-height: 0; }
  .guest-trust-note { margin-top: 8px; }
}

/* ---------- Room guest upload access ---------- */
.guest-access-panel {
  margin: 6px 0 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
}
.guest-access-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 9px; }
.guest-access-head strong { font-family: var(--font-display); font-size: 13.5px; }
.guest-access-head small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.guest-access-list { display: flex; flex-direction: column; gap: 7px; }
.guest-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 9px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
}
.guest-access-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.guest-access-who strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-access-who small { color: var(--muted); font-size: 11.5px; }
.guest-access-who small.requested { color: var(--gold); }
.guest-access-action { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }

.guest-identity-card,
.guest-upload-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 18px;
}
.guest-identity-main,
.guest-upload-request,
.guest-upload-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.guest-identity-main > div,
.guest-upload-request > div,
.guest-upload-panel-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guest-identity-card strong,
.guest-upload-panel strong { font-family: var(--font-display); font-size: 14px; }
.guest-identity-card small,
.guest-upload-panel small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.guest-name-form { display: flex; gap: 8px; margin: 10px 0 4px; }
.guest-name-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--ink);
  color: var(--text);
  font: inherit;
}
.guest-name-form .secondary { padding: 8px 12px; border-radius: 9px; }
.guest-upload-request { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.guest-upload-request > small { flex: 1; color: var(--muted); }
.guest-ready-actions { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.guest-ready-actions .primary.small { width: auto; padding: 7px 12px; font-size: 12px; }
.guest-upload-request .secondary { flex: 0 0 auto; padding: 7px 11px; font-size: 12px; }
.guest-upload-panel-head { margin-bottom: 12px; }
.guest-dropzone { margin-bottom: 12px; padding: 22px; }
.guest-upload-panel .file-row { margin: 0; }

@media (max-width: 520px) {
  .guest-trust-note { display: none; }
  .guest-access-row,
  .guest-identity-main,
  .guest-upload-request,
  .guest-upload-panel-head { align-items: center; }
  .guest-access-row { flex-direction: column; align-items: flex-start; }
  .guest-access-action { width: 100%; }
  .guest-identity-card { padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; }
  .guest-identity-main small { display: none; }
  .guest-upload-request { margin-top: 8px; padding-top: 8px; gap: 8px; }
  .guest-upload-request .secondary { padding: 6px 9px; }
  .guest-upload-panel { padding: 11px 12px; margin-bottom: 12px; border-radius: 12px; }
  .guest-upload-panel-head { margin-bottom: 8px; }
  .guest-upload-panel-head small { font-size: 11.5px; }
  .guest-dropzone { margin-bottom: 9px; padding: 14px 10px; min-height: 0; }
  .guest-dropzone p { margin: 0; }
  .guest-upload-panel .file-row { padding: 10px 11px; }
  .guest-ready-actions { gap: 8px; flex-wrap: wrap; }
}


/* ---------- v1.3.29 Room + Quick Beam live-layout simplification ---------- */
.room-header-host, .quickbeam-header { align-items: center; }
.room-header-host .room-meta, .quickbeam-header .room-meta { flex: 1; min-width: 0; }
.session-expiry-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(10,12,17,.72);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  backdrop-filter: blur(8px);
}
.session-expiry-badge.ending-soon { color: var(--gold); border-color: rgba(227,169,78,.35); }
.session-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 2px; }
.session-action-row .link { padding: 0; min-height: 28px; }
.room-controls { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.room-control-toggle { margin: 0 0 8px; }
.room-controls .guest-access-panel { margin: 0; }
.session-danger-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.session-danger-row .danger { flex: 1; min-height: 38px; }
.danger-link { color: var(--danger) !important; opacity: .82; white-space: nowrap; }
.quickbeam-presence { margin-top: 1px; }
.compact-join-hint { font-size: 11.5px; }
.quickbeam-danger-row .danger { max-width: 260px; }
.quickbeam-text-security { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 2px 2px; color: var(--muted); font-size: 11.5px; }
.quickbeam-e2ee-note { margin: 0; white-space: nowrap; }
.quickbeam-password-toggle { margin: 0; width: auto; gap: 7px; white-space: nowrap; }
.quickbeam-password-toggle span { display: inline; }
.quickbeam-trust-line { color: var(--muted); font-size: 11.5px; margin: -2px 0 18px; }
.quickbeam-help-note { opacity: .82; }

@media (max-width: 700px) {
  .room-header-host, .quickbeam-header { padding-top: 46px; }
  .session-expiry-badge { top: 12px; right: 12px; }
  .session-action-row { gap: 6px 12px; }
  .session-danger-row { flex-direction: row; }
  .quickbeam-danger-row .danger { max-width: none; }
}

@media (max-width: 520px) {
  .room-header-host, .quickbeam-header { gap: 14px; }
  .room-header-host .room-meta, .quickbeam-header .room-meta { gap: 6px; }
  .room-header-host .guest-access-panel { padding: 9px; }
  .room-header-host .guest-access-head small { display: none; }
  .session-danger-row { margin-top: 5px; }
  .session-danger-row .danger { min-height: 36px; }
  .compact-join-hint { display: none; }
  .quickbeam-text-security { align-items: flex-start; flex-direction: column; gap: 7px; margin-top: 8px; }
  .quickbeam-password-toggle { width: auto; }
}

/* ---------- v1.3.36 compact share strip ---------- */
.session-share-strip {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
}
.session-share-strip[hidden] { display: none; }
.session-share-label {
  margin-right: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.share-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(10,12,17,.68);
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.share-icon-btn:hover,
.share-icon-btn:focus-visible {
  color: var(--gold);
  border-color: rgba(227,169,78,.38);
  background: rgba(227,169,78,.08);
  transform: translateY(-1px);
}
.share-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.share-icon-btn.copied {
  color: var(--cyan);
  border-color: rgba(79,216,208,.42);
  background: rgba(79,216,208,.08);
}
.room-header-host,
.quickbeam-header,
.beam-link-card {
  padding-top: 58px;
}
.beam-link-share-strip { top: 14px; }

@media (max-width: 700px) {
  .session-share-strip {
    top: 12px;
    left: 12px;
    gap: 6px;
  }
  .session-share-label { display: none; }
  .share-icon-btn {
    width: 31px;
    height: 31px;
    min-width: 31px;
    min-height: 31px;
  }
  .room-header-host,
  .quickbeam-header,
  .beam-link-card {
    padding-top: 56px;
  }
  .room-header-host .session-share-strip {
    right: 92px;
    width: auto;
  }
}

/* ---------- v1.3.37 share visibility + inline code copy ---------- */
.session-share-label {
  color: rgba(226,230,238,.72);
  font-weight: 700;
}

/* Keep the circles dark, but give each action a recognizable accent. */
.share-icon-copy { color: var(--cyan); }
.share-icon-whatsapp { color: #25D366; }
.share-icon-telegram { color: #2AABEE; }
.share-icon-email { color: var(--gold); }
.share-icon-more { color: rgba(226,230,238,.82); }

.share-icon-copy:hover,
.share-icon-copy:focus-visible {
  color: var(--cyan);
  border-color: rgba(79,216,208,.48);
  background: rgba(79,216,208,.10);
}
.share-icon-whatsapp:hover,
.share-icon-whatsapp:focus-visible {
  color: #25D366;
  border-color: rgba(37,211,102,.46);
  background: rgba(37,211,102,.10);
}
.share-icon-telegram:hover,
.share-icon-telegram:focus-visible {
  color: #2AABEE;
  border-color: rgba(42,171,238,.46);
  background: rgba(42,171,238,.10);
}
.share-icon-email:hover,
.share-icon-email:focus-visible {
  color: var(--gold);
  border-color: rgba(227,169,78,.46);
  background: rgba(227,169,78,.10);
}

.session-code-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.session-code-line .code { margin: 0; }
.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(227,169,78,.20);
  border-radius: 8px;
  background: rgba(227,169,78,.055);
  color: var(--gold);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  border-color: rgba(227,169,78,.48);
  background: rgba(227,169,78,.11);
  transform: translateY(-1px);
}
.code-copy-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 700px) {
  .session-code-line { gap: 8px; }
  .code-copy-btn { padding: 5px 7px; }
}


/* ---------- v1.3.38 session-card polish ---------- */
/* Empty guest management should read like a status row, not a full control panel. */
.room-header-host .guest-access-panel.is-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
}
.room-header-host .guest-access-panel.is-empty .guest-access-head { margin: 0; }
.room-header-host .guest-access-panel.is-empty .guest-access-head small { display: none; }
.room-header-host .guest-access-panel.is-empty #guestAccessEmpty {
  margin: 0;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Beam Link now uses the same top-left share / top-right expiry language as Rooms. */
.beam-link-card .session-expiry-badge { top: 14px; right: 16px; }

@media (max-width: 700px) {
  .beam-link-card .session-expiry-badge { top: 12px; right: 12px; }
  .beam-link-card .session-share-strip { right: 92px; width: auto; }
}

@media (max-width: 520px) {
  .room-header-host .guest-access-panel.is-empty { padding: 8px 9px; }
}
