/* Messages, communities, rooms, premium, settings, rich posts, navigation additions. */

:root { --live: #d4304f; --v-seal: #3344d0; --v-check: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --live: #ff6b86; --v-seal: #8d9bff; --v-check: #0d1413; } }
:root[data-theme="dark"] { --live: #ff6b86; --v-seal: #8d9bff; --v-check: #0d1413; }

/* ── verified check + names ─────────────────────────── */
.name-mark { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.verified { flex: none; vertical-align: -2px; }
.v-seal { fill: var(--v-seal); }
.v-check { stroke: var(--v-check); }
.profile-name .verified { margin-left: 8px; vertical-align: -1px; }

/* ── back button + page bar ─────────────────────────── */
.page-bar { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; min-height: 44px; }
.page-bar-title { font-weight: 600; font-size: var(--t-m); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1.page-bar-title { font-family: var(--f-body); }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 8px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font-weight: 600; font-size: var(--t-s);
}
.back-btn:hover { background: var(--sunk); }
.back-btn span:empty { display: none; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: var(--t-m); font-weight: 600; margin: 26px 0 12px; }

/* ── navigation additions ───────────────────────────── */
.nav-icon { position: relative; display: inline-flex; }
.nav-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--live); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 1;
}
.nav-icon .nav-badge { position: absolute; top: -6px; right: -9px; box-shadow: 0 0 0 2px var(--paper); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-left: auto; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--live) 50%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.rail { gap: 16px; overflow-y: auto; scrollbar-width: none; }
.rail-nav { gap: 2px; }
.rail-link { padding: 9px 14px; font-size: 0.98rem; }
.rail-link .nav-label { flex: 1; }

@media (max-width: 1000px) {
  .rail-link .nav-icon { display: inline-flex; }
  .rail-link .nav-badge { display: inline-grid; }
  .rail-link .nav-badge[hidden] { display: none; }
  .rail-link .nav-label { display: none; }
  .rail-link .live-dot { display: none; }
}

/* mobile tab bar + menu sheet */
@media (max-width: 720px) {
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .tab .nav-icon .nav-badge { right: -10px; }
}
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / 0.35); animation: fade 200ms var(--ease); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  max-height: 85vh; overflow-y: auto; display: grid; gap: 14px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--shadow-2);
  animation: sheet-up 260ms var(--ease);
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-handle { justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.sheet-me { display: flex; align-items: center; gap: 12px; padding: 8px; color: var(--ink); text-decoration: none; }
.sheet-me > span:last-child { display: grid; line-height: 1.3; }
.sheet-me > span span { color: var(--ink-3); font-size: var(--t-s); }
.sheet-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sheet-link {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-m);
  background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-s);
}
.sheet-link.is-active { background: var(--cobalt-soft); color: var(--cobalt); }

/* ── posts: clickable, media, polls, detail ─────────── */
.post.is-clickable { cursor: pointer; }
.post.is-clickable:hover { background: color-mix(in oklab, var(--surface) 92%, var(--sunk)); }
.post.is-clickable:focus-visible { box-shadow: var(--focus); }
.post-time { color: inherit; text-decoration: none; }
.post-time:hover { text-decoration: underline; }
.post-media { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line-soft); background: var(--sunk); }
.post-media img, .post-media video { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.post-media video { object-fit: contain; background: #000; }
.chip-community { background: var(--sunk); color: var(--ink); text-decoration: none; font-weight: 600; }
.chip-community:hover { background: var(--line-soft); color: var(--ink); }

.poll { display: grid; gap: 8px; }
.poll-opt {
  min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); text-align: left;
  border: 1.5px solid var(--cobalt); background: transparent; color: var(--cobalt); font-weight: 600;
  transition: background var(--dur);
}
.poll-opt:hover { background: var(--cobalt-soft); }
.poll-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 14px; border-radius: var(--r-s); overflow: hidden; }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: var(--sunk); border-radius: inherit; animation: grow 700ms var(--ease) both; transform-origin: left; }
.poll-row.is-top .poll-fill { background: var(--cobalt-soft); }
.poll-label, .poll-pct { position: relative; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.poll-row.is-top .poll-label, .poll-row.is-top .poll-pct { font-weight: 700; }
.poll-pct { font-variant-numeric: tabular-nums; }
.poll-meta { font-size: var(--t-xs); color: var(--ink-3); }

.post-detail { padding: 20px 22px 12px; }
.post-detail .post-body { font-size: 1.2rem; line-height: 1.55; }
.post-stamp { padding: 12px 0; border-block: 1px solid var(--line-soft); font-size: var(--t-s); color: var(--ink-3); }
.post-stamp strong { color: var(--ink); }
.thread { display: grid; gap: 4px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.reply-form { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.reply-form input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); }
.reply-form input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.reply-list { display: grid; }
.reply { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.reply-body { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.reply-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-s); color: var(--ink-3); }
.reply-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* ── composer tools ─────────────────────────────────── */
.composer-foot { flex-wrap: wrap; }
.composer-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.tool {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent; color: var(--cobalt); cursor: pointer; transition: background var(--dur);
}
.tool:hover { background: var(--cobalt-soft); }
.tool:focus-within { box-shadow: var(--focus); }
.tool.is-disabled, .tool:disabled { opacity: 0.35; pointer-events: none; }
.tool-select, .field select, .set-card select {
  height: 34px; margin-left: 6px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: var(--t-s);
}
.field select { height: 46px; margin: 0; border-radius: var(--r-m); padding: 0 12px; font-size: var(--t-base); }
.composer-note { margin-top: -4px; }
.attach { position: relative; margin-top: 8px; border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line-soft); }
.attach img, .attach video { display: block; width: 100%; max-height: 360px; object-fit: cover; background: #000; }
.attach-remove { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 0.65); color: #fff; }
.poll-edit { margin-top: 10px; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-m); }
.poll-edit input { width: 100%; min-height: 42px; padding: 8px 14px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); }
.poll-edit input:focus { outline: none; border-color: var(--cobalt); }
.poll-edit-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.poll-edit-foot select { margin-left: 0; }

/* side rail extras */
.side-rooms { display: grid; gap: 10px; }
.side-rooms a { display: grid; gap: 2px; color: var(--ink); text-decoration: none; font-size: var(--t-s); line-height: 1.35; }
.side-rooms a:hover strong { text-decoration: underline; }
.side-title { display: flex; align-items: center; gap: 8px; }
.side-title .live-dot { margin-left: 0; }
.side-premium { background: linear-gradient(140deg, var(--cobalt-soft), var(--surface) 70%); }
.side-premium .btn { justify-self: start; }

/* ── messages ───────────────────────────────────────── */
.dm { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; height: calc(100vh - 110px); min-height: 480px; border: 1px solid var(--line-soft); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.dm-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.dm-pane-list { border-right: 1px solid var(--line-soft); overflow-y: auto; }
.dm-pane-list .page-head { padding: 16px 16px 4px; margin: 0; }
.dm-pane-list .h1 { font-size: 1.5rem; }
.dm-list { display: grid; padding: 6px; gap: 2px; }
.dm-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-m); color: var(--ink); text-decoration: none; }
.dm-item:hover { background: var(--sunk); color: var(--ink); }
.dm-item.is-active { background: var(--cobalt-soft); }
.dm-item-text { display: grid; min-width: 0; flex: 1; }
.dm-item-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: var(--t-s); }
.dm-item-top time { font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); flex: none; }
.dm-preview { font-size: var(--t-s); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item.is-unread .dm-preview { color: var(--ink); font-weight: 600; }
.dm-empty { display: grid; gap: 8px; justify-items: start; padding: 16px; }
.dm-placeholder { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px; color: var(--ink-3); }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.dm-back { display: none; }
.dm-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.dm-who > span { display: grid; min-width: 0; line-height: 1.3; }
.dm-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.dm-day { align-self: center; font-size: var(--t-xs); color: var(--ink-3); margin: 10px 0 4px; }
.bubble { max-width: 78%; align-self: flex-start; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--sunk); overflow-wrap: anywhere; animation: view-in 220ms var(--ease); }
.bubble p { font-size: var(--t-base); line-height: 1.45; }
.bubble time { display: block; margin-top: 2px; font-size: 0.6875rem; color: var(--ink-3); }
.bubble.is-mine { align-self: flex-end; background: var(--cobalt); color: var(--on-cobalt); border-radius: 18px 18px 6px 18px; }
.bubble.is-mine time { color: color-mix(in oklab, var(--on-cobalt) 70%, transparent); text-align: right; }
.dm-start { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 280px; }
.dm-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.dm-compose textarea { flex: 1; min-width: 0; resize: none; min-height: 42px; max-height: 160px; padding: 10px 16px; border-radius: 21px; border: 1px solid var(--line); background: var(--paper); line-height: 1.4; }
.dm-compose textarea:focus { outline: none; border-color: var(--cobalt); }
.dm-send { width: 42px; height: 42px; min-height: 42px; padding: 0; }
.dm-note { padding: 0 14px 10px; }

@media (max-width: 900px) {
  .dm { grid-template-columns: minmax(0, 1fr); }
  .dm.has-thread .dm-pane-list { display: none; }
  .dm:not(.has-thread) .dm-pane-thread { display: none; }
  .dm-back { display: inline-flex; }
}
@media (max-width: 720px) {
  .dm { height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - 70px); border-radius: var(--r-m); }
}

/* ── communities ────────────────────────────────────── */
.comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.comm { overflow: hidden; display: grid; }
.comm-cover { position: relative; display: block; height: 84px; overflow: hidden; }
.comm-cover-lg { height: 130px; border-radius: var(--r-l) var(--r-l) 0 0; }
.comm-ring { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 1.5px solid color-mix(in oklab, var(--ink) 25%, transparent); right: 60px; top: -30px; }
.comm-ring-b { right: 0; top: -10px; background: color-mix(in oklab, var(--surface) 30%, transparent); }
.comm-body { padding: 16px 18px 18px; display: grid; gap: 8px; }
.comm-name { font-size: var(--t-m); font-weight: 600; }
.comm-name a { color: var(--ink); text-decoration: none; }
.comm-name a:hover { text-decoration: underline; }
.comm-about { color: var(--ink-2); font-size: var(--t-s); }
.comm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.comm-foot .btn { margin-left: auto; }
.faces { display: inline-flex; }
.faces .avatar { width: 28px; height: 28px; font-size: 0.625rem; box-shadow: 0 0 0 2px var(--surface); }
.faces .avatar + .avatar { margin-left: -8px; }
.comm-hero { overflow: hidden; margin-bottom: 8px; }
.comm-hero-body { padding: 18px 20px 20px; display: grid; gap: 8px; }

/* ── rooms ──────────────────────────────────────────── */
.rooms-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.rooms-head > div { display: grid; gap: 4px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.room-card { display: grid; gap: 12px; padding: 18px; color: var(--ink); text-decoration: none; transition: border-color var(--dur), transform var(--dur) var(--ease); }
.room-card:hover { border-color: var(--line); transform: translateY(-2px); color: var(--ink); }
.room-card.is-live { background: linear-gradient(160deg, color-mix(in oklab, var(--live) 7%, var(--surface)), var(--surface) 60%); }
.room-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-pill, .soon-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; }
.live-pill { background: var(--live); color: #fff; }
.live-pill svg { animation: pulse-op 1.4s ease-in-out infinite; }
@keyframes pulse-op { 50% { opacity: 0.45; } }
.soon-pill { background: var(--sunk); color: var(--ink-2); }
.room-kind { font-size: var(--t-xs); font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink-2); }
.kind-learn { background: var(--cobalt-soft); color: var(--cobalt); }
.kind-discuss { background: var(--overlap-soft); color: var(--overlap); }
.kind-pitch { background: var(--marigold-soft); color: var(--cat-values); }
.kind-openmic { background: var(--cat-topics-bg); color: var(--cat-topics); }
.room-title { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.3; text-wrap: balance; }
.room-foot { display: flex; align-items: center; gap: 10px; }
.new-room { padding: 20px; display: grid; gap: 14px; margin-bottom: 8px; }
.field-label { font-size: var(--t-s); font-weight: 600; }

.room { position: relative; padding: 22px; display: grid; gap: 14px; overflow: hidden; }
.room.is-live { background: radial-gradient(circle at 15% 0%, var(--cobalt-soft), transparent 45%), radial-gradient(circle at 100% 100%, var(--marigold-soft), transparent 45%), var(--surface); }
.room-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.room-h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; text-wrap: balance; }
.stage { display: flex; flex-wrap: wrap; gap: 22px; padding: 6px 0 8px; }
.speaker { display: grid; justify-items: center; gap: 4px; text-align: center; width: 112px; }
.speaker-av { position: relative; display: block; border-radius: 50%; }
.speaker .avatar-xl { width: 88px; height: 88px; font-size: 1.6rem; box-shadow: none; }
.speaker.is-talking .speaker-av::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--overlap);
  opacity: 0; animation: talk 5.1s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes talk { 0%, 100% { opacity: 0; transform: scale(0.96); } 8%, 28% { opacity: 1; transform: scale(1.04); } 18% { transform: scale(1); } 34% { opacity: 0; } }
.host-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 1px 8px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-size: 0.625rem; font-weight: 700; }
.speaker-name { font-weight: 600; font-size: var(--t-s); margin-top: 6px; }
.listeners { display: flex; flex-wrap: wrap; gap: 12px; }
.listeners li { display: grid; justify-items: center; gap: 2px; width: 52px; text-align: center; color: var(--ink-2); }
.listeners li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.more-listeners { align-self: start; height: 34px; display: grid !important; place-items: center; border-radius: var(--r-pill); background: var(--sunk); font-size: var(--t-xs); font-weight: 600; }
.room-controls { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ctrl {
  display: grid; justify-items: center; gap: 4px; min-width: 76px; padding: 10px 12px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: var(--t-xs); font-weight: 600; text-decoration: none;
  transition: background var(--dur), border-color var(--dur);
}
.ctrl:hover { border-color: var(--ink-3); color: var(--ink); }
.ctrl.is-on { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }
.ctrl:disabled { opacity: 0.45; }
.ctrl-leave { margin-left: auto; color: var(--live); }
.ctrl-leave:hover { color: var(--live); border-color: var(--live); }
.reactions { position: absolute; inset: auto 0 70px 0; height: 0; pointer-events: none; }
.float-heart { position: absolute; bottom: 0; color: var(--heart); animation: float-up 1.6s var(--ease) forwards; }
@keyframes float-up { from { transform: translateY(0) scale(0.6); opacity: 1; } to { transform: translateY(-160px) scale(1.2); opacity: 0; } }
.room-questions { margin-top: 14px; padding: 20px; display: grid; gap: 12px; }
.q-feed { display: grid; gap: 10px; }
.q-feed li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-s); }

/* ── premium ────────────────────────────────────────── */
.prem-hero { display: grid; gap: 12px; justify-items: start; padding: 10px 0 24px; }
.prem-mark { animation: rise 600ms var(--ease) both; }
.prem-title { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 15em; }
.prem-preview { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.prem-preview > span:nth-child(2) { display: grid; line-height: 1.3; }
.prem-preview-label { margin-left: auto; }
.perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-bottom: 24px; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line-soft); }
.perk h3 { font-size: var(--t-base); font-weight: 600; }
.perk p { font-size: var(--t-s); color: var(--ink-2); }
.perk .use-icon { flex: none; margin: 0; }
.plans { display: grid; gap: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan { display: grid; gap: 2px; justify-items: start; padding: 18px; text-align: left; cursor: pointer; border-width: 1.5px; transition: border-color var(--dur), box-shadow var(--dur); }
.plan.is-on { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.plan-label { font-weight: 600; }
.plan-price { font-family: var(--f-display); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plan-note { margin-top: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--overlap); }
.confirm { padding: 18px; display: grid; gap: 8px; border-color: var(--cobalt); }
.prem-status { padding: 20px; display: grid; gap: 8px; justify-items: start; }
.prem-status .h3 { display: flex; align-items: center; gap: 8px; color: var(--overlap); }
.prem-fine { text-align: center; }

/* ── settings ───────────────────────────────────────── */
.set-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; padding: 6px 0; background: var(--paper); }
.set-nav-link { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--t-s); font-weight: 600; text-decoration: none; }
.set-nav-link:hover { color: var(--ink); }
.set-nav-link.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.set-card { padding: 20px 22px; margin-bottom: 14px; display: grid; gap: 4px; scroll-margin-top: 70px; }
.set-title { display: flex; align-items: center; gap: 8px; font-size: var(--t-m); font-weight: 600; margin-bottom: 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.set-title + .set-row { border-top: 0; }
.set-row-col { display: grid; justify-content: stretch; gap: 10px; }
.set-label { font-weight: 600; font-size: var(--t-base); display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.set-desc { font-size: var(--t-s); color: var(--ink-3); display: block; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: var(--r-pill); border: 0; background: var(--line); transition: background var(--dur); }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease); }
.switch[aria-checked="true"] { background: var(--overlap); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
.seg-control { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--sunk); justify-self: start; }
.seg-opt { padding: 7px 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-size: var(--t-s); font-weight: 600; }
.seg-opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.set-links { display: grid; }
.set-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.set-link > span { display: grid; }
.set-link:hover strong { text-decoration: underline; }
.danger-text { color: var(--danger) !important; }
.btn-danger { background: var(--danger); color: var(--surface); }
.btn-danger:hover { filter: brightness(1.08); color: var(--surface); }
.inline-confirm { display: flex; gap: 6px; flex: none; }

/* ── onboarding role groups ─────────────────────────── */
.role-search { position: relative; margin-bottom: 4px; }
.role-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.role-search input { width: 100%; min-height: 44px; padding: 8px 14px 8px 40px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); }
.role-search input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.role-group { display: grid; gap: 8px; margin-top: 10px; }
.role-group-label { font-size: var(--t-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }

@media (max-width: 720px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .speaker { width: 92px; }
  .speaker .avatar-xl { width: 72px; height: 72px; font-size: 1.3rem; }
  .ctrl { min-width: 0; flex: 1; }
  .ctrl-leave { margin-left: 0; }
  .set-row { align-items: flex-start; }
  .page-bar { margin-top: -4px; }
}
.poll-row { background: color-mix(in oklab, var(--sunk) 45%, transparent); }
.poll-fill { background: color-mix(in oklab, var(--ink-3) 28%, var(--sunk)); }
