/* DeepRoom: Pure Focus brand baseline. Minimal, premium, dark-on-cream. */

:root {
  --bg: #FAF7F2;
  --ink: #0E0E12;
  --gold: #c9a96a;
  --gold-deep: #8a7140;
  --line: #E6DFD3;
  --cream-2: #F1ECDF;
  --muted: #5B5B66;
  --danger: #c8553d;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  --mono: "Courier New", monospace;
}

* { box-sizing: border-box; }

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.brand-mark { font-size: 22px; color: var(--gold); }
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.topnav a { color: var(--ink); }
.topnav a.cta { color: var(--bg); }
.link-button { background: none; border: none; color: var(--ink); font: inherit; cursor: pointer; padding: 0; }

/* ── Buttons ── */
.cta, .cta-primary, .cta-secondary {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.cta, .cta-primary { background: var(--ink); color: var(--bg); }
.cta:hover, .cta-primary:hover { opacity: 0.88; text-decoration: none; }
.cta-secondary { background: var(--cream-2); color: var(--ink); }
.cta-secondary:hover { background: var(--line); }
.cta-primary.small, .cta-secondary.small { padding: 6px 14px; font-size: 13px; }
.cta-primary.full { width: 100%; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.danger { background: var(--danger); color: var(--bg); border: none; padding: 10px 22px; border-radius: 999px; cursor: pointer; }

/* ── Hero ── */
.hero {
  max-width: 720px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 32px;
}
.hero-cta { display: flex; justify-content: center; gap: 14px; }

.how {
  max-width: 720px;
  margin: 80px auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}
.how h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 0 0 24px;
}
.how-steps { padding-left: 22px; line-height: 1.9; }

/* ── Auth ── */
.auth-card {
  max-width: 380px;
  margin: 80px auto;
  padding: 36px 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.auth-card h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.auth-card label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.auth-card input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  background: var(--bg);
}
.auth-card input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.muted { color: var(--muted); font-size: 14px; }
.error { background: #fef2ef; color: var(--danger); padding: 10px 14px; border-radius: 6px; font-size: 14px; }

/* ── Dashboard ── */
.dash { max-width: 760px; margin: 40px auto; padding: 0 24px; }
.dash-header { margin-bottom: 32px; }
.dash-header h1 { font-family: var(--serif); font-weight: 500; font-size: 32px; margin: 0; letter-spacing: -0.01em; }
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 22px;
}
.card h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.duration-row { display: flex; gap: 8px; margin: 18px 0 24px; }
.duration-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
}
.duration-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.result-row { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.result-row code { display: block; background: var(--cream-2); padding: 10px 14px; border-radius: 6px; font-size: 13px; margin: 8px 0; word-break: break-all; }
.result-row .cta-primary, .result-row .cta-secondary { margin-top: 8px; }
.hidden { display: none; }
table.recent { width: 100%; border-collapse: collapse; font-size: 14px; }
table.recent th, table.recent td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
table.recent th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }
.status { padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.status-waiting { background: var(--cream-2); color: var(--gold-deep); }
.status-active { background: var(--gold); color: var(--ink); }
.status-ended { background: var(--line); color: var(--muted); }

/* ── Room (in-session) ── */
body.in-room { background: var(--ink); color: var(--bg); }
body.in-room .topbar { background: var(--ink); border-bottom-color: rgba(250,247,242,0.08); }
body.in-room .brand-name { color: var(--bg); }
body.in-room .topnav a, body.in-room .link-button { color: rgba(250,247,242,0.7); }

.room-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px;
  min-height: calc(100vh - 70px);
}
.room-side { display: flex; flex-direction: column; gap: 18px; }
.room-side > div {
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 10px;
  padding: 18px;
}
.room-side .eyebrow { color: var(--gold); }
.task-box textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(0,0,0,0.3);
  color: var(--bg);
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--sans);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 8px;
}
.task-box textarea:focus { outline: 2px solid var(--gold); }
.timer-box .timer {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 6px 0 12px;
  color: var(--bg);
}
.participants-box ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.participants-box li { padding: 6px 0; border-bottom: 1px solid rgba(250,247,242,0.06); }
.room-side .small { font-size: 12px; }
.small.muted { color: rgba(250,247,242,0.55); }

.room-main { display: flex; flex-direction: column; gap: 18px; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  flex: 1;
}
.video-tile {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(250,247,242,0.08);
}
.video-tile.local { border-color: var(--gold); }
.video-el { width: 100%; height: 100%; object-fit: cover; }
.tile-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.room-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 10px;
}
.room-controls button {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,242,0.2);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  font-size: 13px;
}
.room-controls button:hover { background: rgba(250,247,242,0.08); }
.room-controls .danger { border-color: var(--danger); background: var(--danger); }

/* ── Phase 4g: Video grid layouts ── */
.video-grid {
  display: grid;
  gap: 14px;
  width: 100%;
  height: 100%;
}
.video-grid.layout-focus {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}
.video-grid.layout-focus .video-tile.local {
  position: absolute;
  bottom: 90px;
  right: 30px;
  width: 200px;
  height: 130px;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  z-index: 5;
  aspect-ratio: auto;
}
.video-grid.layout-focus .video-tile.local .video-avatar { font-size: 36px; }
.video-grid.layout-side {
  grid-template-columns: 1fr 1fr;
}

/* ── Phase 4d-f: Video tile chrome (mute icons, avatar, mirror, task ribbon) ── */
.video-tile {
  position: relative;
  background: rgba(14,14,18,0.6);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-slot { position: absolute; inset: 0; }
.video-slot.mirror { transform: scaleX(-1); }
.video-slot video, .video-slot .video-el {
  width: 100%; height: 100%; object-fit: cover;
}
.video-avatar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 64px;
  color: var(--gold);
  background: linear-gradient(135deg, #1a1a22 0%, #0E0E12 100%);
  z-index: 1;
}
.video-tile.cam-off .video-slot { display: none; }
.video-tile:not(.cam-off) .video-avatar { display: none; }

/* Tile bottom bar */
.tile-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  color: var(--bg);
  font-size: 13px;
  z-index: 2;
}
.tile-label { font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.tile-icons { display: flex; gap: 6px; }
.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(200,85,61,0.85);
  color: white;
}

/* Top ribbon showing declared task */
.tile-task-ribbon {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  background: rgba(14,14,18,0.78);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201,169,106,0.35);
  z-index: 2;
  backdrop-filter: blur(8px);
}
.tile-task-ribbon.hidden { display: none; }
.tile-task-ribbon .ribbon-emoji { font-size: 16px; }
.tile-task-ribbon .ribbon-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Task emoji picker row */
.task-emoji-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
}
.task-emoji {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(250,247,242,0.1);
  background: rgba(250,247,242,0.04);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.task-emoji:hover { background: rgba(201,169,106,0.18); }
.task-emoji.active {
  background: rgba(201,169,106,0.25);
  border-color: var(--gold);
}
.task-emoji:disabled { opacity: 0.5; cursor: default; }

/* Dashboard delete button */
.session-actions { display: flex; align-items: center; gap: 10px; }
.session-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.session-delete:hover { color: var(--danger); background: rgba(200,85,61,0.08); }
.session-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.session-when { font-weight: 500; }
.session-meta { color: var(--muted); flex: 1; font-size: 14px; }
.session-rejoin { font-size: 14px; }

/* ── Phase 2: Partner focus HUD ── */
.partner-focus-box {
  padding: 16px;
  background: rgba(201,169,106,0.06);
  border: 1px solid rgba(201,169,106,0.18);
  border-radius: 10px;
  color: var(--bg);
}
.partner-focus-box .eyebrow {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
}
.partner-focus-box .hud-name {
  font-family: var(--serif);
  font-size: 16px;
  margin: 0 0 8px;
}
.partner-focus-box .hud-score {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  margin: 0;
  color: var(--bg);
}
.partner-focus-box .hud-unit {
  font-size: 18px;
  color: var(--gold);
  margin-left: 2px;
}
.partner-focus-box .hud-bar {
  width: 100%;
  height: 4px;
  background: rgba(250,247,242,0.1);
  border-radius: 2px;
  margin: 10px 0 8px;
  overflow: hidden;
}
.partner-focus-box .hud-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.5s ease;
}
.partner-focus-box .hud-detail {
  margin: 0;
  color: rgba(250,247,242,0.6);
}

/* ── Phase 2: Integrations page ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px;
}
.page-title {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.page-sub {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 15px;
}
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.flash-error { background: #fde9e4; color: #8a2b1c; border: 1px solid #f0b6a8; }
.flash-success { background: #ecf3e7; color: #2f5a1b; border: 1px solid #b5d6a0; }
.integration-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.integration-card-soon { opacity: 0.55; }
.integration-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.integration-header h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 4px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-on { background: #def0d6; color: #2f5a1b; }
.badge-off { background: var(--cream-2); color: var(--muted); }
.badge-soon { background: var(--cream-2); color: var(--muted); }
.step-list {
  margin: 16px 0;
  padding-left: 22px;
  font-size: 14px;
  color: var(--muted);
}
.step-list strong, .step-list em { color: var(--ink); }
.connect-form {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}
.connect-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
}
button.danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
button.danger:hover { background: #a8442e; }
button.small { padding: 8px 16px; font-size: 13px; }

/* ── Phase 3: Reflection + summary modal ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg);
  color: var(--ink);
  padding: 32px;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-card-wide { max-width: 680px; }
.modal-card .eyebrow {
  color: var(--gold-deep);
  font-size: 11px;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.modal-title {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.modal-card textarea {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 110px;
  background: white;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.modal-actions .link-button {
  color: var(--muted);
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 4px;
}
.modal-actions .link-button:hover { color: var(--ink); }

/* AI summary markdown styling */
.summary-md {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  max-height: 60vh;
  overflow-y: auto;
}
.summary-md h1, .summary-md h2, .summary-md h3 {
  font-family: var(--serif);
  margin: 16px 0 8px;
}
.summary-md h1 { font-size: 24px; }
.summary-md h2 { font-size: 19px; }
.summary-md h3 { font-size: 16px; }
.summary-md p { margin: 0 0 14px; }
.summary-md ul, .summary-md ol { margin: 0 0 14px 22px; padding: 0; }
.summary-md li { margin-bottom: 6px; }
.summary-md strong { color: var(--ink); }
.summary-md p:first-child strong:first-child {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: normal;
  margin-bottom: 12px;
  color: var(--gold-deep);
}

/* Dashboard recent-sessions summary preview */
.session-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: none; }
.session-summary-preview {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--cream-2);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.session-summary-preview strong { color: var(--ink); }

/* ── Phase 5a: Focus Battery ── */
.focus-battery {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 12px;
  color: var(--bg);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease;
}
.focus-battery:hover { border-color: rgba(201,169,106,0.4); }
.focus-battery:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fb-timer {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bg);
  line-height: 1;
  min-width: 88px;
}
.fb-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: #0E0E12;
  border: none;
  cursor: pointer;
  padding: 0;
}
.fb-start:hover { background: #e0c179; }
.fb-track {
  position: relative;
  height: 22px;
  background: rgba(250,247,242,0.06);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(250,247,242,0.08);
}
.fb-fill {
  height: 100%;
  transition: width 0.6s ease, background 0.6s ease;
  background: linear-gradient(90deg, #5fb878 0%, #87d49b 100%);
}
.fb-fill.level-high { background: linear-gradient(90deg, #5fb878 0%, #87d49b 100%); }
.fb-fill.level-mid  { background: linear-gradient(90deg, #e0a85c 0%, #f0c989 100%); }
.fb-fill.level-low  { background: linear-gradient(90deg, #c8553d 0%, #e07a64 100%); }
.fb-pct {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(250,247,242,0.7);
  min-width: 48px;
  text-align: right;
}

/* ── Phase 5a: Task list (sidebar) ── */
.task-list { list-style: none; padding: 0; margin: 0 0 12px; }
.task-list .task-empty { padding: 8px 0; }
.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(250,247,242,0.08);
  color: var(--bg);
  font-size: 14px;
}
.task-item.done { opacity: 0.55; }
.task-item.done .task-text { text-decoration: line-through; }
.task-check {
  background: none;
  border: none;
  color: var(--bg);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
}
.task-item.done .task-check { color: var(--gold); }
.task-icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(201,169,106,0.16);
  color: var(--gold);
}
.task-text { flex: 1; word-break: break-word; }
.task-delete {
  background: none;
  border: none;
  color: rgba(250,247,242,0.4);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.task-delete:hover { color: var(--danger); background: rgba(200,85,61,0.1); }

.task-add {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
}
.task-add input {
  background: rgba(0,0,0,0.3);
  color: var(--bg);
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 14px;
}
.task-add input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.task-icon-btn, .task-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: rgba(201,169,106,0.16);
  color: var(--gold);
  border: 1px solid rgba(201,169,106,0.32);
  border-radius: 6px;
  cursor: pointer;
}
.task-icon-btn { gap: 4px; padding: 6px 8px; }
.task-icon-btn:hover, .task-add-btn:hover { background: rgba(201,169,106,0.28); }
.task-icon-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 8px 0;
  padding: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(250,247,242,0.1);
  border-radius: 8px;
}
.task-icon-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: rgba(250,247,242,0.06);
  color: var(--bg);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.task-icon-opt:hover { background: rgba(201,169,106,0.2); color: var(--gold); }
.task-icon-opt.active {
  background: rgba(201,169,106,0.28);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Phase 5a: Tile bar restructure (name + icons inline) ── */
.tile-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  z-index: 2;
}
.tile-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}
.tile-name-row .tile-label {
  position: static;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  text-shadow: none;
}
.tile-name-row .tile-icons { display: inline-flex; gap: 4px; }
.tile-name-row .tile-icon {
  width: 20px; height: 20px;
  background: rgba(200,85,61,0.85);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tile-name-row .tile-icon svg { width: 12px; height: 12px; }

/* Task pills on partner tile (replaces ribbon) */
.tile-task-list {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}
.tile-task-list.hidden { display: none; }
.tile-task-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(14,14,18,0.78);
  color: var(--bg);
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,106,0.4);
  backdrop-filter: blur(8px);
  max-width: 60%;
}
.tile-task-pill.done {
  opacity: 0.6;
  border-color: rgba(95,184,120,0.5);
}
.tile-task-pill.done .pill-text { text-decoration: line-through; }
.tile-task-pill .pill-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.tile-task-pill svg { color: var(--gold); flex-shrink: 0; }
.tile-task-pill.done svg { color: #87d49b; }

/* ── Phase 5a: Controls bar refactor ── */
.room-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(250,247,242,0.04);
  border: 1px solid rgba(250,247,242,0.08);
  border-radius: 12px;
  position: relative;
}
.ctrl-split {
  display: inline-flex;
  align-items: stretch;
  background: rgba(250,247,242,0.06);
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.ctrl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  color: var(--bg);
  cursor: pointer;
  padding: 0;
}
.ctrl-icon.ctrl-solo {
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: 999px;
  background: rgba(250,247,242,0.06);
}
.ctrl-icon:hover { background: rgba(250,247,242,0.1); }
.ctrl-icon.off { background: rgba(200,85,61,0.22); color: #ffb4a0; }
.ctrl-icon.off:hover { background: rgba(200,85,61,0.32); }
.ctrl-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(250,247,242,0.12);
  color: rgba(250,247,242,0.7);
  cursor: pointer;
  padding: 0;
}
.ctrl-chev:hover { background: rgba(250,247,242,0.1); color: var(--bg); }
.ctrl-spacer { flex: 1; }
.ctrl-leave {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 44px;
  background: var(--danger);
  color: white;
  border: 1px solid var(--danger);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.ctrl-leave:hover { background: #b04a35; }
.ctrl-end {
  padding: 0 16px;
  height: 44px;
  background: transparent;
  color: #ffb4a0;
  border: 1px solid rgba(200,85,61,0.55);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ctrl-end:hover { background: rgba(200,85,61,0.18); color: white; }

/* Device dropdown */
.ctrl-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  background: #1a1a22;
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: 10px;
  min-width: 280px;
  max-width: 360px;
  padding: 10px;
  color: var(--bg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  z-index: 10;
}
.ctrl-dropdown.hidden { display: none; }
#mic-dropdown { left: 0; }
#cam-dropdown { left: 92px; }
.ctrl-dropdown-header {
  margin: 4px 4px 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
}
.ctrl-device-list { list-style: none; padding: 0; margin: 0 0 8px; }
.ctrl-device-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.ctrl-device-item:hover { background: rgba(250,247,242,0.06); }
.ctrl-device-item.active { background: rgba(201,169,106,0.18); color: var(--gold); }
.device-tick { width: 14px; display: inline-flex; }
.device-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctrl-dropdown-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--gold);
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  border-top: 1px solid rgba(250,247,242,0.08);
  margin-top: 4px;
}
.ctrl-dropdown-link:hover { background: rgba(201,169,106,0.1); }

/* ── Phase 5a: Settings modal ── */
.setting-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.setting-label { color: var(--muted); font-size: 13px; }
.setting-select {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}
.setting-toggle input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}
.setting-divider {
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

/* ── Phase 5d: Landing page rebuild ── */
.lp-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 96px 32px 56px;
  text-align: center;
}
.lp-hero-eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.24em;
  font-weight: 600;
  margin: 0 0 24px;
}
.lp-hero-h1 {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
}
.lp-hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 32px;
}
.lp-hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.lp-hero-proof {
  font-size: 13px;
  color: var(--muted);
  margin: 28px auto 0;
  letter-spacing: 0.02em;
}

/* Stats band: dark, premium */
.lp-stats {
  background: var(--ink);
  color: var(--bg);
  padding: 96px 32px;
  text-align: center;
}
.lp-stats-eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.24em;
  font-weight: 600;
  margin: 0 0 18px;
}
.lp-stats-h2 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 820px;
  margin: 0 auto 56px;
  color: var(--bg);
}
.lp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto 56px;
}
.lp-stat { text-align: center; }
.lp-stat-number {
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--gold);
  margin-bottom: 12px;
}
.lp-stat-unit {
  font-size: 28px;
  margin-left: 6px;
  color: rgba(201,169,106,0.7);
  letter-spacing: -0.01em;
}
.lp-stat-label {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(250,247,242,0.85);
  margin: 0;
}
.lp-stat-cite {
  font-size: 11px;
  color: rgba(250,247,242,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lp-stats-closer {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  font-style: italic;
  color: rgba(250,247,242,0.85);
  max-width: 720px;
  margin: 0 auto;
}

/* How it works */
.lp-how, .lp-edge, .lp-faq, .lp-final-cta {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 32px;
}
.lp-how { text-align: center; }
.lp-h2 {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 12px 0 56px;
  color: var(--ink);
}
.lp-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: left;
}
.lp-how-step {
  background: var(--cream-2);
  border-radius: 14px;
  padding: 36px 32px;
  border: 1px solid var(--line);
}
.lp-how-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.lp-how-step h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lp-how-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

/* The edge: 4-card stack */
.lp-edge { background: var(--cream-2); text-align: center; max-width: none; padding-left: 0; padding-right: 0; }
.lp-edge .eyebrow,
.lp-edge .lp-h2,
.lp-edge .lp-edge-grid {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}
.lp-edge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}
.lp-edge-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
}
.lp-edge-icon {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 16px;
  font-family: var(--serif);
}
.lp-edge-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lp-edge-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Founder note: dark, narrow centered */
.lp-founder {
  background: var(--ink);
  color: var(--bg);
  padding: 96px 32px;
  text-align: center;
}
.lp-founder-eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.24em;
  font-weight: 600;
  margin: 0 0 28px;
}
.lp-founder-quote {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
  max-width: 760px;
  margin: 0 auto 28px;
  color: var(--bg);
  border-left: 2px solid var(--gold);
  padding-left: 28px;
  text-align: left;
}
.lp-founder-attrib {
  font-size: 14px;
  color: rgba(250,247,242,0.7);
  letter-spacing: 0.04em;
  margin: 0;
}

/* FAQ */
.lp-faq { text-align: center; }
.lp-faq-list {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.lp-faq-row {
  border-top: 1px solid var(--line);
  padding: 22px 4px;
}
.lp-faq-row:last-child { border-bottom: 1px solid var(--line); }
.lp-faq-row summary {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-faq-row summary::-webkit-details-marker { display: none; }
.lp-faq-row summary::after {
  content: "+";
  font-size: 24px;
  color: var(--gold-deep);
  font-weight: 300;
  margin-left: 18px;
  transition: transform 0.2s ease;
}
.lp-faq-row[open] summary::after { content: "−"; }
.lp-faq-row p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

/* Final CTA */
.lp-final-cta {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 120px;
}
.lp-final-h2 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 16px;
}
.lp-final-sub {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
}
.lp-final-cta-btn {
  font-size: 16px;
  padding: 16px 36px;
}
.lp-final-foot {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 0;
  letter-spacing: 0.02em;
}

@media (max-width: 920px) {
  .lp-hero-h1 { font-size: 52px; }
  .lp-stats-h2, .lp-h2, .lp-final-h2 { font-size: 32px; }
  .lp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .lp-stat-number { font-size: 64px; }
  .lp-how-grid { grid-template-columns: 1fr; }
  .lp-edge-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-founder-quote { font-size: 20px; padding-left: 18px; }
}
@media (max-width: 560px) {
  .lp-hero { padding: 64px 24px 32px; }
  .lp-hero-h1 { font-size: 40px; }
  .lp-stats, .lp-how, .lp-edge, .lp-founder, .lp-faq, .lp-final-cta { padding: 64px 20px; }
  .lp-edge-grid { grid-template-columns: 1fr; }
  .lp-stats-grid { grid-template-columns: 1fr; }
}

/* ── Phase 5b: 3-button reflection modal ── */
.modal-actions-3col {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.modal-actions-3col .link-button { color: var(--muted); }
.modal-actions-3col .link-button:hover { color: var(--ink); }

/* ── Phase 5a: Session ended banner ── */
.session-ended-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14,14,18,0.96);
  color: var(--bg);
  border: 1px solid var(--gold);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

@media (max-width: 720px) {
  .room-shell { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .focus-battery { grid-template-columns: auto 1fr; }
  .fb-pct, .fb-start { display: none; }
  .task-icon-picker { grid-template-columns: repeat(4, 1fr); }
  .setting-row { grid-template-columns: 1fr; }
}
