/* NAVONAVO Widescreen 16:9 Optical Cinema Design System */
*, *::before, *::after { box-sizing: border-box; }

html, body.cinema-home {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ==================== LIGHT POLARITY (Daylight Silver Paper + Obsidian) ==================== */
body.cinema-home {
  color-scheme: light;
  --c-bar: #222326;
  --c-bar-line: rgba(255, 255, 255, 0.08);
  --c-bar-ink: #F5F5F7;
  --c-bar-muted: #A1A1A6;
  --c-bar-sub: #76767D;

  --c-ink: #141518;
  --c-ink-2: #464952;
  --c-ink-3: #757A85;

  /* ONE SINGLE UNIFIED ULTRA-TRANSLUCENT OPTICAL FROSTED GLASS MATERIAL */
  --c-glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.25) 0%, rgba(246, 248, 252, 0.14) 100%);
  --c-glass-border: rgba(255, 255, 255, 0.80);
  --c-glass-outer: rgba(17, 20, 24, 0.12);
  --c-glass-top: rgba(255, 255, 255, 0.94);
  --c-glass-bot: rgba(15, 23, 42, 0.09);
  --c-glass-shadow: 0 20px 52px rgba(15, 20, 32, 0.15), 0 2px 8px rgba(15, 20, 32, 0.06);
  --c-glass-blur: blur(18px) saturate(190%) brightness(1.04);

  --c-subtle: rgba(17, 20, 24, 0.055);
  --c-subtle-hover: rgba(17, 20, 24, 0.095);
  --c-subtle-line: rgba(17, 20, 24, 0.10);
  --c-cta-bg: #141518;
  --c-cta-fg: #FFFFFF;
  --c-bead-icon: #143B6D;
  --c-label-own: #144B96;
  --c-label-halo: 0 0 4px rgba(240, 243, 248, 0.96), 0 0 8px rgba(240, 243, 248, 0.90), 0 1px 2px rgba(240, 243, 248, 0.98);
  --c-dot-ring: #FFFFFF;
  --c-green: #34C759;
  --c-blue: #0A84FF;
  --c-amber: #FF9F0A;

  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--c-bar);
  color: var(--c-ink);
}

/* ==================== DARK POLARITY (TRUE FULL MONOCHROME INVERSION) ==================== */
html[data-universe-theme="darkroom"] body.cinema-home {
  color-scheme: dark;
  --c-bar: #111215;
  --c-bar-line: rgba(255, 255, 255, 0.075);
  --c-bar-ink: #F5F5F7;
  --c-bar-muted: #9A9AA0;
  --c-bar-sub: #6D6D74;

  --c-ink: #F4F5F8;
  --c-ink-2: #B9BEC9;
  --c-ink-3: #838996;

  /* SAME UNIFIED ULTRA-TRANSLUCENT OPTICAL GLASS IN DARK POLARITY */
  --c-glass-bg: linear-gradient(145deg, rgba(44, 48, 58, 0.28) 0%, rgba(20, 22, 28, 0.17) 100%);
  --c-glass-border: rgba(255, 255, 255, 0.24);
  --c-glass-outer: rgba(0, 0, 0, 0.55);
  --c-glass-top: rgba(255, 255, 255, 0.34);
  --c-glass-bot: rgba(0, 0, 0, 0.45);
  --c-glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.60), 0 2px 10px rgba(0, 0, 0, 0.35);
  --c-glass-blur: blur(20px) saturate(180%) brightness(1.12);

  --c-subtle: rgba(255, 255, 255, 0.08);
  --c-subtle-hover: rgba(255, 255, 255, 0.13);
  --c-subtle-line: rgba(255, 255, 255, 0.14);
  --c-cta-bg: #F4F5F8;
  --c-cta-fg: #111215;
  --c-bead-icon: #EAF4FF;
  --c-label-own: #8CC8FF;
  --c-label-halo: 0 0 5px rgba(14, 16, 20, 0.96), 0 0 10px rgba(14, 16, 20, 0.90), 0 1px 2px rgba(0, 0, 0, 0.98);
  --c-dot-ring: #181A20;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== UNIFIED OPTICAL FROSTED GLASS CLASS ==================== */
.navo-glass {
  position: relative;
  background: var(--c-glass-bg);
  -webkit-backdrop-filter: var(--c-glass-blur);
  backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-glass-border);
  box-shadow:
    var(--c-glass-shadow),
    0 0 0 0.5px var(--c-glass-outer),
    inset 0 1.5px 0.5px var(--c-glass-top),
    inset 1px 0 0.5px var(--c-glass-top),
    inset 0 -1px 1px var(--c-glass-bot);
}

.navo-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ==================== 16:9 AUTOMATIC CINEMA LETTERBOX FRAME ==================== */
.cinema-bar-top {
  flex: 1 0 54px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  background: var(--c-bar);
  border-bottom: 1px solid var(--c-bar-line);
  color: var(--c-bar-ink);
  z-index: 40;
}

.cinema-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}
.cinema-brand:hover { opacity: 0.88; }
.cinema-logo {
  display: block;
  height: 23px;
  width: auto;
}

.cinema-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.cinema-nav a {
  color: var(--c-bar-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.cinema-nav a:hover { color: var(--c-bar-ink); }

.cinema-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cinema-lang {
  color: var(--c-bar-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}
.cinema-lang:hover {
  color: var(--c-bar-ink);
  background: rgba(255, 255, 255, 0.08);
}

.cinema-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: var(--c-bar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.cinema-icon-btn:hover {
  color: var(--c-bar-ink);
  background: rgba(255, 255, 255, 0.16);
}
.cinema-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.cinema-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: #F5F5F7;
  color: #141518;
  font: 500 12px/1 inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.cinema-auth-btn:hover { opacity: 0.9; }
.cinema-auth-btn[data-signed-in="true"] {
  padding: 0 12px 0 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #F5F5F7;
}

/* Center Exact 16:9 Stage Wrapper */
.cinema-stage-wrap {
  flex: 0 0 auto;
  width: 100%;
  height: min(calc(100dvh - 122px), calc(100vw * 9 / 16));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bar);
  overflow: hidden;
}

.cinema-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cinema-stage[data-focus-dragging="true"] { cursor: grabbing; }
.cinema-stage [data-overlay-scroll] { touch-action: pan-y; }
.cinema-stage .cinema-bead-track { touch-action: pan-x; }

.cinema-bar-bottom {
  flex: 1.35 0 68px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 24px;
  background: var(--c-bar);
  border-top: 1px solid var(--c-bar-line);
  z-index: 40;
}
.cinema-manifesto-main {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #B4B4BA;
}
.cinema-manifesto-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--c-bar-sub);
}

/* Canvas & Interactive Hit Layer */
.focus-universe-canvas,
.focus-universe-targets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.focus-universe-canvas { display: block; }
.focus-universe-targets { z-index: 2; pointer-events: none; }

.cinema-hit {
  position: absolute;
  left: var(--node-x);
  top: var(--node-y);
  width: var(--node-hit, 28px);
  height: var(--node-hit, 28px);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}
.cinema-hit:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

/* ==================== TRANSLUCENT CRYSTAL GLASS BEAD (Own Nodes) ==================== */
.crystal-bead {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.36) 28%, rgba(152, 202, 255, 0.22) 64%, rgba(74, 144, 226, 0.36) 100%);
  border: 1.4px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 8px 22px rgba(24, 92, 184, 0.24),
    inset 0 2px 5px rgba(255, 255, 255, 0.98),
    inset 0 -3px 8px rgba(48, 122, 220, 0.30);
  color: var(--c-bead-icon);
}
html[data-universe-theme="darkroom"] .crystal-bead {
  background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85) 0%, rgba(135, 200, 255, 0.28) 32%, rgba(45, 118, 216, 0.24) 68%, rgba(24, 84, 178, 0.42) 100%);
  border-color: rgba(178, 224, 255, 0.78);
  box-shadow:
    0 0 20px rgba(84, 172, 255, 0.42),
    0 8px 20px rgba(0, 0, 0, 0.55),
    inset 0 2px 5px rgba(255, 255, 255, 0.75),
    inset 0 -3px 8px rgba(56, 146, 255, 0.38);
}
.crystal-bead-sm {
  width: 20px;
  height: 20px;
}

/* ==================== BOTTOM STACK: AI CONCIERGE BAR + GLASS BEAD FILMSTRIP ==================== */
.cinema-bottom-stack {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(540px, calc(100% - 32px));
  pointer-events: none;
}

.cinema-ai-bar {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
}

.cinema-sparkle-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--c-subtle);
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cinema-sparkle-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.cinema-ai-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.cinema-ai-bar input::placeholder { color: var(--c-ink-3); opacity: 1; }

.cinema-send-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--c-cta-bg);
  color: var(--c-cta-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.cinema-send-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.cinema-send-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.cinema-send-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* Plan A: Bottom Crystal Glass Bead Filmstrip (Label STRICTLY BELOW each bead!) */
.cinema-beads-wrap {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.cinema-beads-wrap[hidden] { display: none; }

.cinema-bead-track {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 22px;
  overflow-x: auto;
  max-width: min(460px, calc(100vw - 96px));
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cinema-bead-track::-webkit-scrollbar { display: none; }

.cinema-bead-item {
  flex: 0 0 auto;
  width: 66px;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  opacity: 0.68;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cinema-bead-item:hover,
.cinema-bead-item[aria-pressed="true"] {
  opacity: 1;
}
.cinema-bead-item[aria-pressed="true"] {
  transform: translateY(-2px);
}
.cinema-bead-orb {
  width: 28px;
  height: 28px;
  transition: width 0.22s ease, height 0.22s ease;
}
.cinema-bead-item[aria-pressed="true"] .cinema-bead-orb {
  width: 35px;
  height: 35px;
  outline: 2px solid rgba(10, 132, 255, 0.38);
  outline-offset: 2px;
}
.cinema-bead-orb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.cinema-bead-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--c-dot-ring);
}
.cinema-bead-dot[data-vis="public"] { background: var(--c-green); }
.cinema-bead-dot[data-vis="private"] { background: var(--c-blue); }
.cinema-bead-dot[data-vis="draft"] { background: var(--c-amber); }

.cinema-bead-label {
  display: block;
  width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--c-ink-2);
  text-shadow: var(--c-label-halo);
}
.cinema-bead-item[aria-pressed="true"] .cinema-bead-label {
  color: var(--c-label-own);
  font-weight: 600;
}

.cinema-all-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.cinema-all-btn:hover { transform: scale(1.06); }
.cinema-all-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Zoom Pill */
.cinema-zoom {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--c-ink-2);
}
.cinema-zoom button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cinema-zoom button:hover { background: var(--c-subtle); }
.cinema-zoom span {
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ==================== UNIFIED FROSTED NAMECARD CALLOUT (ANCHORED BESIDE NODE) ==================== */
.cinema-callout {
  position: absolute;
  left: var(--callout-x, 28px);
  top: var(--callout-y, 24px);
  z-index: 30;
  width: min(336px, calc(100% - 32px));
  max-height: calc(100% - 136px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  padding: 18px 20px;
  color: var(--c-ink);
  user-select: text;
  -webkit-user-select: text;
}
.cinema-callout[hidden] { display: none; }

.cinema-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cinema-concierge-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.cinema-panel-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cinema-type-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-ink);
}
.cinema-type-badge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.cinema-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cinema-callout h2,
.cinema-modal-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-ink);
}
.cinema-subline {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--c-ink-3);
}
.cinema-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cinema-status-dot[data-vis="public"] { background: var(--c-green); }
.cinema-status-dot[data-vis="private"] { background: var(--c-blue); }
.cinema-status-dot[data-vis="draft"] { background: var(--c-amber); }

.cinema-close-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--c-subtle);
  color: var(--c-ink-2);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.cinema-close-btn:hover { background: var(--c-subtle-hover); color: var(--c-ink); }

.cinema-quote {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 2px solid var(--c-subtle-line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-ink-2);
  overflow-wrap: anywhere;
}

.cinema-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.cinema-fact-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-subtle);
  font-size: 11px;
  color: var(--c-ink-2);
}

.cinema-owner-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--c-subtle);
  border: 1px solid var(--c-subtle-line);
  font-size: 11.5px;
  color: var(--c-ink-2);
  margin-bottom: 14px;
}

.cinema-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cinema-btn-primary {
  flex: 1;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--c-cta-bg);
  color: var(--c-cta-fg);
  font: 500 12.5px/1 inherit;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.16s ease;
}
.cinema-btn-primary:hover { opacity: 0.88; }
.cinema-btn-primary:disabled { opacity: 0.45; cursor: default; }

.cinema-btn-ghost {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--c-subtle-line);
  border-radius: 999px;
  background: var(--c-subtle);
  color: var(--c-ink);
  font: 500 12px/1 inherit;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.16s ease;
}
.cinema-btn-ghost:hover { background: var(--c-subtle-hover); }
.cinema-btn-ghost svg, .cinema-btn-primary svg { width: 14px; height: 14px; flex-shrink: 0; }
.cinema-stage [hidden], .cinema-modal [hidden] { display: none !important; }

/* Inline Edit Form Inside Callout */
.cinema-field {
  width: 100%;
  border: 1px solid var(--c-subtle-line);
  border-radius: 14px;
  background: var(--c-subtle);
  color: var(--c-ink);
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
  margin-bottom: 10px;
}
.cinema-field:focus { border-color: var(--c-ink); }
.cinema-field-title { font-size: 15px; font-weight: 600; }

/* ==================== EXPANDABLE FROSTED AI CONCIERGE PANEL ==================== */
.cinema-concierge {
  position: absolute;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  z-index: 32;
  width: min(540px, calc(100% - 32px));
  max-height: calc(100% - 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  padding: 18px 20px;
  color: var(--c-ink);
  user-select: text;
  -webkit-user-select: text;
}
.cinema-concierge[data-has-beads="true"] { bottom: 146px; max-height: calc(100% - 172px); }
.cinema-concierge[hidden] { display: none; }

.cinema-trial-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cinema-trial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-subtle-line);
}
.cinema-trial-dot[data-lit="true"] { background: var(--c-ink); }

.cinema-starters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.cinema-starter {
  border: 1px solid var(--c-subtle-line);
  border-radius: 16px;
  background: var(--c-subtle);
  color: var(--c-ink);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: 500 12px/1.2 inherit;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
.cinema-starter:hover { background: var(--c-subtle-hover); transform: translateY(-1px); }
.cinema-starter svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.cinema-chat-log {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 220px;
}
.cinema-msg {
  font-size: 13px;
  line-height: 1.55;
  padding: 9px 13px;
  border-radius: 16px;
  max-width: 88%;
  overflow-wrap: anywhere;
}
.cinema-msg[data-role="user"] {
  align-self: flex-end;
  background: var(--c-cta-bg);
  color: var(--c-cta-fg);
  border-bottom-right-radius: 5px;
}
.cinema-msg[data-role="assistant"] {
  align-self: flex-start;
  background: var(--c-subtle);
  color: var(--c-ink);
  border: 1px solid var(--c-subtle-line);
  border-bottom-left-radius: 5px;
}
.cinema-msg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.cinema-msg-links a {
  font-size: 11.5px;
  color: var(--c-label-own);
  text-decoration: none;
}
.cinema-msg-links a:hover { text-decoration: underline; }

.cinema-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cinema-option-btn {
  border: 1px solid var(--c-subtle-line);
  border-radius: 999px;
  background: var(--c-subtle);
  color: var(--c-ink);
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.cinema-option-btn:hover { background: var(--c-subtle-hover); }

.cinema-draft-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--c-subtle);
  border: 1px solid var(--c-subtle-line);
}
.cinema-status-line {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--c-ink-3);
}

/* ==================== UNIFIED FROSTED MODALS (NO DARK MUDDY DIMMER!) ==================== */
.cinema-modal {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
}
.cinema-modal[hidden] { display: none; }

.cinema-modal-card {
  width: min(680px, 100%);
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  padding: 22px;
  color: var(--c-ink);
  user-select: text;
  -webkit-user-select: text;
}
.cinema-modal-card.narrow {
  width: min(540px, calc(100% - 32px));
  padding: 28px 30px;
  text-align: center;
}

/* Full-Width Horizontal Single-Column My Nodes List */
.cinema-nodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 330px;
  padding-right: 4px;
}
.cinema-node-row {
  width: 100%;
  border: 1px solid var(--c-subtle-line);
  border-radius: 18px;
  background: var(--c-subtle);
  color: var(--c-ink);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
.cinema-node-row:hover { background: var(--c-subtle-hover); transform: translateY(-1px); }
.cinema-node-row-main { flex: 1; min-width: 0; }
.cinema-node-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.cinema-node-row-desc {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--c-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cinema-node-row-meta {
  font-size: 11.5px;
  color: var(--c-ink-3);
  white-space: nowrap;
}

/* Login Modal Controls */
.cinema-oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.cinema-oauth-stack .cinema-btn-primary,
.cinema-oauth-stack .cinema-btn-ghost {
  flex: 0 0 auto;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  gap: 10px;
  line-height: 1;
}
.cinema-oauth-stack svg {
  width: 17px;
  height: 17px;
}
.cinema-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--c-ink-3);
}
.cinema-divider::before, .cinema-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--c-subtle-line);
}
.cinema-email-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 5px 6px 5px 18px;
  border-radius: 999px;
  background: var(--c-subtle);
  border: 1px solid var(--c-subtle-line);
}
.cinema-email-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.cinema-email-pill input::placeholder { color: var(--c-ink-3); }
.cinema-email-pill .cinema-send-btn {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.cinema-remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--c-ink-3);
  cursor: pointer;
}
.cinema-login-foot {
  margin: 16px 0 0;
  font-size: 11px;
  color: var(--c-ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cinema-login-foot a { color: inherit; text-decoration: none; }
.cinema-login-foot a:hover { text-decoration: underline; }

/* Toast */
.cinema-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--c-cta-bg);
  color: var(--c-cta-fg);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.cinema-toast[hidden] { display: none; }

/* Scrollbars */
.cinema-nodes-list::-webkit-scrollbar,
.cinema-inbox-view::-webkit-scrollbar,
.cinema-callout::-webkit-scrollbar,
.cinema-chat-log::-webkit-scrollbar { width: 4px; }
.cinema-nodes-list::-webkit-scrollbar-thumb,
.cinema-inbox-view::-webkit-scrollbar-thumb,
.cinema-callout::-webkit-scrollbar-thumb,
.cinema-chat-log::-webkit-scrollbar-thumb { background: var(--c-subtle-line); border-radius: 999px; }

/* H2-T5 Minimalist Inquiry & Frosted Inbox */
.cinema-tab-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--c-subtle);
  border: 1px solid var(--c-subtle-line);
}
.cinema-tab-pill {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-ink-2);
  padding: 5px 14px;
  font: 500 12.5px/1.2 inherit;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.cinema-tab-pill[aria-selected="true"] {
  background: var(--c-cta-bg);
  color: var(--c-cta-fg);
}

.cinema-inquiry-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-subtle-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cinema-inquiry-box .cinema-field {
  margin-bottom: 0;
}
.cinema-inquiry-box textarea.cinema-field {
  resize: vertical;
  min-height: 62px;
}
.cinema-inquiry-box .cinema-field.cinema-field-sm {
  height: 32px;
  min-height: 32px;
  margin-bottom: 0;
  padding: 0 10px;
}
.cinema-inbox-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 360px;
  padding-right: 4px;
}
.cinema-inbox-view[hidden] { display: none; }
.cinema-inbox-section-title {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-ink-3);
  letter-spacing: 0.03em;
}
.cinema-inbox-item {
  border: 1px solid var(--c-subtle-line);
  border-radius: 16px;
  background: var(--c-subtle);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}
.cinema-inbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--c-ink-3);
}
.cinema-inbox-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cinema-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cinema-btn-xs {
  height: 28px;
  padding: 0 11px;
  font-size: 11.5px;
}
.cinema-actions-wrap {
  flex-wrap: wrap;
}
.cinema-graph-card {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--c-subtle-line);
  background: var(--c-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cinema-graph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-ink-3);
  letter-spacing: 0.02em;
}
.cinema-graph-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.48;
  color: var(--c-ink-2);
}
.cinema-trial-card {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(52, 199, 89, 0.28);
  background: linear-gradient(155deg, rgba(52, 199, 89, 0.08), transparent 72%), var(--c-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cinema-trial-card[data-trial-mode="exploratory_quote_sample"] {
  border-color: rgba(10, 132, 255, 0.26);
  background: linear-gradient(155deg, rgba(10, 132, 255, 0.07), transparent 72%), var(--c-subtle);
}
.cinema-trial-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: 0.015em;
}
.cinema-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cinema-trial-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c-ink-3);
}
.cinema-trial-dot[data-state="online"] {
  background: var(--c-green);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}
.cinema-trial-dot[data-state="quote"] {
  background: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.18);
}
.cinema-trial-state {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--c-ink-3);
}
.cinema-trial-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.48;
  color: var(--c-ink-2);
  overflow-wrap: anywhere;
}
.cinema-trial-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--c-ink-3);
}
.cinema-trial-foot a {
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 500;
}
.cinema-trial-foot a:hover {
  text-decoration: underline;
}
.cinema-field-sm {
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 10px;
}
.cinema-outcome-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.cinema-claim-foot {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--c-subtle-line);
  font-size: 11.5px;
  text-align: right;
}
.cinema-claim-foot a {
  color: var(--c-ink-3);
  text-decoration: none;
  transition: color 0.16s ease;
}
.cinema-claim-foot a:hover {
  color: var(--c-ink);
  text-decoration: underline;
}

/* Portrait / tablet stage fill */
@media (orientation: portrait), (max-width: 760px) {
  .cinema-nav { display: none; }
  .cinema-stage-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
  .cinema-stage { width: 100%; height: 100%; }
  .cinema-bar-top { flex: 0 0 52px; min-height: 52px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  .cinema-bar-bottom { flex: 0 0 auto; min-height: 56px; padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .cinema-starters { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile portrait & narrow screens (e.g. 390x844) */
@media (max-width: 760px) {
  .cinema-bar-top { flex: 0 0 50px; min-height: 50px; gap: 8px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
  .cinema-logo { height: 19px; }
  .cinema-bar-right { gap: 6px; }
  .cinema-auth-btn { height: 30px; padding: 0 12px; font-size: 11.5px; }
  .cinema-auth-btn[data-signed-in="true"] { padding: 0 10px 0 5px; }
  .cinema-bar-bottom { min-height: 44px; padding: 7px max(14px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .cinema-manifesto-main { font-size: 11px; line-height: 1.4; }
  .cinema-manifesto-sub { display: none; }

  /* Keep zoom pill clear of bottom AI bar & bead filmstrip */
  .cinema-zoom { top: 12px; right: 12px; bottom: auto; padding: 3px 5px; }
  .cinema-toast { top: 52px; max-width: calc(100% - 24px); text-align: center; }

  .cinema-bottom-stack { bottom: 12px; width: calc(100% - 24px); gap: 8px; }
  .cinema-ai-bar { padding: 5px 5px 5px 10px; gap: 8px; }
  .cinema-ai-bar input { font-size: 14px; }
  .cinema-bead-track { max-width: calc(100vw - 78px); padding: 6px 12px; gap: 10px; }
  .cinema-bead-item { width: 58px; gap: 4px; }
  .cinema-bead-label { width: 58px; font-size: 10px; }
  .cinema-all-btn { width: 38px; height: 38px; }

  /* Bottom-anchored frosted Namecard & Concierge leaving upper sky for selected sphere + zoom pill */
  .cinema-callout {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 70px;
    transform: none;
    width: auto;
    max-height: min(58%, calc(100% - 124px));
    padding: 16px;
    border-radius: 22px;
  }
  .cinema-callout[data-has-beads="true"] {
    bottom: 138px;
    max-height: min(54%, calc(100% - 192px));
  }
  .cinema-concierge {
    left: 12px;
    right: 12px;
    bottom: 70px;
    transform: none;
    width: auto;
    max-height: calc(100% - 124px);
    padding: 15px 16px;
    border-radius: 22px;
  }
  .cinema-concierge[data-has-beads="true"] {
    bottom: 138px;
    max-height: calc(100% - 192px);
  }

  .cinema-modal { padding: 10px; }
  .cinema-modal-card,
  .cinema-modal-card.narrow {
    width: 100%;
    max-height: calc(100% - 8px);
    padding: 16px;
    border-radius: 22px;
  }
  .cinema-nodes-list,
  .cinema-inbox-view {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  .cinema-node-row { padding: 10px 12px; gap: 10px; }
  .cinema-inbox-item { padding: 10px 12px; }
}

@media (max-width: 359px) {
  .cinema-outcome-row { grid-template-columns: 1fr; }
}

/* Mobile landscape (e.g. 844x390) — maximize live stage height, zero clipping */
@media (max-height: 500px) and (orientation: landscape) {
  .cinema-bar-top { flex: 0 0 42px; min-height: 42px; gap: 10px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .cinema-logo { height: 18px; }
  .cinema-nav { gap: 14px; font-size: 12px; }
  .cinema-auth-btn { height: 28px; padding: 0 12px; font-size: 11.5px; }
  .cinema-stage-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
  .cinema-bar-bottom { flex: 0 0 auto; min-height: 28px; padding: 4px max(16px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .cinema-manifesto-main { font-size: 11px; line-height: 1.3; }
  .cinema-manifesto-sub { display: none; }

  .cinema-bottom-stack { bottom: 8px; gap: 6px; width: min(440px, calc(100% - 160px)); }
  .cinema-ai-bar { padding: 4px 4px 4px 10px; gap: 8px; }
  .cinema-sparkle-btn { width: 26px; height: 26px; }
  .cinema-send-btn { width: 30px; height: 30px; }
  .cinema-bead-track { padding: 4px 12px; gap: 8px; }
  .cinema-bead-item { width: 56px; gap: 3px; }
  .cinema-bead-orb { width: 24px; height: 24px; }
  .cinema-bead-item[aria-pressed="true"] .cinema-bead-orb { width: 28px; height: 28px; }
  .cinema-all-btn { width: 34px; height: 34px; }
  .cinema-zoom { right: 12px; bottom: 8px; padding: 3px 5px; }

  .cinema-callout {
    width: min(320px, calc(100% - 24px));
    max-height: calc(100% - 68px);
    padding: 12px 14px;
    border-radius: 18px;
  }
  .cinema-callout[data-has-beads="true"] { max-height: calc(100% - 116px); }
  .cinema-concierge { bottom: 56px; max-height: calc(100% - 66px); padding: 12px 14px; border-radius: 18px; }
  .cinema-concierge[data-has-beads="true"] { bottom: 112px; max-height: calc(100% - 122px); }

  .cinema-modal { padding: 8px 14px; }
  .cinema-modal-card,
  .cinema-modal-card.narrow {
    max-height: calc(100% - 8px);
    padding: 14px 16px;
    border-radius: 20px;
  }
  .cinema-nodes-list,
  .cinema-inbox-view {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .navo-glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #F4F5F8;
  }
  html[data-universe-theme="darkroom"] .navo-glass { background: #1A1C22; }
}
