:root {
  --bg-sidebar: #061826;
  --bg-main: #102C3F;
  --bg-workspace: #1B4D6B;
  --bg-card: #173E55;
  --bg-panel: #121821;
  --bg-page: #08121A;
  --bg-canvas: #DCEAF0;
  --bg-canvas-soft: #EEF6F8;
  --text-primary: #EAF4F8;
  --text-secondary: #A9C1CC;
  --text-soft: #C8D8DF;
  --accent: #4FD1C5;
  --accent-hover: #2C9FA5;
  --state-success: #22c55e;
  --state-warning: #f59e0b;
  --state-danger: #ef4444;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --page: var(--bg-page);
  --panel: var(--bg-panel);
  --panel-2: #1a2330;
  --line: rgba(230, 237, 243, 0.14);
  --action: var(--accent);
  --action-dark: var(--accent-hover);
  --aqua: var(--accent);
  --text: var(--text-primary);
  --textSecondary: var(--text-secondary);
  --navy: var(--accent);
  --navy-soft: rgba(94, 234, 212, 0.15);
  --coral: var(--state-warning);
  --coral-soft: rgba(245, 158, 11, 0.14);
  --violet-soft: rgba(124, 58, 237, 0.16);
  --gold-soft: rgba(245, 158, 11, 0.16);
  --teal-soft: rgba(94, 234, 212, 0.15);
  --danger: var(--state-danger);
  --danger-soft: rgba(239, 68, 68, 0.16);
  --success: var(--state-success);
  --success-soft: rgba(34, 197, 94, 0.16);
  --secondary: #7c3aed;
  --secondary-soft: rgba(124, 58, 237, 0.18);
  --low: rgba(34, 197, 94, 0.16);
  --mid: rgba(94, 234, 212, 0.15);
  --high: rgba(245, 158, 11, 0.16);
  --low-ink: #86efac;
  --mid-ink: var(--accent);
  --high-ink: #fbbf24;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --dark-panel: #1a2330;
  --dark-panel-2: var(--bg-panel);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(94, 234, 212, 0.16), transparent 34%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-panel) 44%, var(--bg-page) 100%),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select,
input {
  font: inherit;
}

button,
select,
input {
  border-radius: 8px;
}

button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

button:hover,
a:hover {
  border-color: var(--action);
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: #0f151d;
  color: var(--ink);
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 4rem;
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 26px;
}

body.auth-locked {
  background:
    radial-gradient(circle at 50% 10%, rgba(94, 234, 212, 0.12), transparent 32%),
    linear-gradient(180deg, #12384f 0%, #0f2f44 48%, #0b2638 100%);
}

.auth-gate {
  display: none;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(720px, 100%);
  padding: 28px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 24, 33, 0.98), rgba(26, 35, 48, 0.98)),
    var(--panel);
  box-shadow: var(--shadow);
}

.app-logo-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-logo-lockup {
  justify-self: center;
}

.auth-logo {
  justify-self: center;
  width: min(220px, 58vw);
  max-height: 92px;
  object-fit: contain;
  margin-bottom: 4px;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 9px;
  border: 1px solid rgba(94, 234, 212, 0.5);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
}

.auth-card h1 {
  margin-bottom: 0;
  font-size: 2.4rem;
  text-align: center;
}

.auth-card > .lead {
  text-align: center;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--action);
}

.auth-switch {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.invite-activation-ready .auth-switch {
  display: grid;
}

.invite-only-tab[hidden] {
  display: none !important;
}

.auth-switch-button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.auth-switch-button.active {
  border-color: rgba(94, 234, 212, 0.58);
  background: rgba(94, 234, 212, 0.16);
  color: var(--action);
}

.auth-panel {
  display: none;
  gap: 12px;
}

.auth-panel.active {
  display: grid;
}

.link-button {
  border-color: transparent;
  background: transparent;
  color: var(--action);
}

body.auth-locked .hero,
body.auth-locked .mode-tabs,
body.auth-locked .mode-panel,
body.auth-locked .top-workbar,
body.auth-locked .mobile-quick-nav {
  display: none !important;
}

body.auth-locked #authGate {
  display: grid;
}

body:not(.auth-locked):not(.admin-route) .hero {
  display: none;
}

body.admin-route #authGate,
body.admin-route .hero,
body.admin-route .top-workbar,
body.admin-route .mode-tabs,
body.admin-route .mobile-quick-nav,
body.admin-route .facilitator-sidebar,
body.admin-route .mode-panel:not(#adminMode) {
  display: none !important;
}

body.admin-route #adminMode {
  display: block;
  max-width: none;
  padding: 16px 18px 32px;
}

body.admin-route .admin-board {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(27, 77, 107, 0.96), rgba(19, 52, 71, 0.96));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.hero {
  position: relative;
  min-height: 310px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #081821;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 22px 30px;
  color: #fff;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  line-height: 1.45;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.mode-tabs {
  position: static;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  background: rgba(15, 36, 48, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.top-workbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(220px, auto) minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.18);
  background: rgba(11, 15, 20, 0.94);
  backdrop-filter: blur(12px);
}

body.facilitator-shell .top-workbar {
  position: sticky;
  top: 14px;
  z-index: 18;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  max-width: none;
  margin: 18px 22px 0 0;
  padding: 12px 20px 12px 24px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(19, 52, 71, 0.98), rgba(19, 52, 71, 0.94));
  box-shadow: 0 26px 56px rgba(2, 12, 19, 0.24);
  overflow: visible;
}

body.facilitator-shell:not(.playlist-editing) .top-workbar {
  position: relative;
  top: auto;
}

body.client-shell .top-workbar {
  position: sticky;
  top: 14px;
  z-index: 18;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  max-width: none;
  margin: 18px 22px 0 0;
  padding: 12px 20px 12px 24px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(19, 52, 71, 0.98), rgba(19, 52, 71, 0.94));
  box-shadow: 0 26px 56px rgba(2, 12, 19, 0.24);
  overflow: visible;
}

body.client-shell:not(.playlist-editing) .top-workbar {
  position: relative;
  top: auto;
}

body.facilitator-shell .top-workbar::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  bottom: 0;
  width: 72px;
  border-top-left-radius: 26px;
  background: linear-gradient(180deg, rgba(19, 52, 71, 0.98), rgba(19, 52, 71, 0.94));
  border-top: 1px solid rgba(94, 234, 212, 0.14);
  border-left: 1px solid rgba(94, 234, 212, 0.14);
  pointer-events: none;
}

body.client-shell .top-workbar::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  bottom: 0;
  width: 72px;
  border-top-left-radius: 26px;
  background: linear-gradient(180deg, rgba(19, 52, 71, 0.98), rgba(19, 52, 71, 0.94));
  border-top: 1px solid rgba(94, 234, 212, 0.14);
  border-left: 1px solid rgba(94, 234, 212, 0.14);
  pointer-events: none;
}

body.facilitator-shell .top-workbar::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  width: 38px;
  height: 38px;
  background: transparent;
  border-top-left-radius: 26px;
  box-shadow: -18px -18px 0 0 rgba(6, 24, 38, 1);
  pointer-events: none;
}

body.client-shell .top-workbar::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  width: 38px;
  height: 38px;
  background: transparent;
  border-top-left-radius: 26px;
  box-shadow: -18px -18px 0 0 rgba(6, 24, 38, 1);
  pointer-events: none;
}

.top-workbar > * {
  position: relative;
  z-index: 1;
}

body.facilitator-shell .top-therapist-identity,
body.client-shell .top-therapist-identity {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

body.facilitator-shell .active-journey-bar,
body.client-shell .active-journey-bar {
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: start;
}

body.facilitator-shell .workspace-quick-nav,
body.client-shell .workspace-quick-nav {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
}

body.facilitator-shell .impersonation-topbar,
body.client-shell .impersonation-topbar {
  grid-column: 2 / 4;
  grid-row: 2;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-card);
  color: var(--action);
  border-color: rgba(94, 234, 212, 0.38);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.mobile-playlist-menu {
  display: none;
}

.mobile-playlist-menu[hidden] {
  display: none !important;
}

.mobile-playlist-menu summary {
  list-style: none;
}

.mobile-playlist-menu summary::-webkit-details-marker {
  display: none;
}

.top-therapist-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  width: fit-content;
  max-width: min(480px, 38vw);
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.52);
}

.top-therapist-identity[hidden] {
  display: none !important;
}

.top-therapist-media {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.top-therapist-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-therapist-media span {
  color: #a7fff3;
  font-size: 0.82rem;
  font-weight: 950;
}

.top-therapist-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.top-therapist-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-therapist-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-therapist-copy .top-beta-badge {
  justify-self: start;
  width: auto;
  color: var(--accent);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.active-journey-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  align-self: start;
  min-width: 0;
  cursor: pointer;
}

.active-journey-bar:not(.has-copy) {
  display: flex;
  justify-content: flex-end;
}

.active-journey-bar:not(.has-copy) .active-journey-tools {
  align-items: flex-start;
}

.active-journey-bar:not(.has-copy) .active-journey-copy {
  display: none;
}

.active-journey-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.active-journey-empty {
  min-height: 14px;
}

.active-journey-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.header-system-tools {
  align-items: flex-start;
}

.header-system-tools .secondary-button.compact-button,
.header-system-tools .autosave-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-quick-nav {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-quick-nav[hidden] {
  display: none !important;
}

.impersonation-topbar[hidden] {
  display: none !important;
}

.workspace-quick-nav button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.active-journey-tools .secondary-button.compact-button,
.active-journey-inline-shortcut,
.active-journey-status select,
.active-journey-tools .autosave-pill {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.active-journey-tools .secondary-button.compact-button:hover,
.active-journey-inline-shortcut:hover,
.active-journey-status select:hover {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.1);
}

.workspace-quick-nav button:hover {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.1);
}

.workspace-quick-nav button.active {
  border-color: var(--action);
  background: rgba(94, 234, 212, 0.14);
  color: #99f6e4;
}

.tab-language-switcher {
  display: none !important;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.active-journey-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
}

.active-journey-bar strong {
  overflow: hidden;
  color: var(--action);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-journey-status {
  display: flex;
  align-items: center;
  min-width: 0;
}

.active-journey-status span {
  display: none;
}

.active-journey-status select {
  min-height: 34px;
  min-width: 132px;
}

body.facilitator-shell:not(.playlist-editing) .close-playlist-button,
body.facilitator-shell:not(.playlist-editing) .active-journey-status,
body.client-shell:not(.playlist-editing) .close-playlist-button,
body.client-shell:not(.playlist-editing) .active-journey-status {
  display: none !important;
}

.autosave-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.autosave-pill.saved {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.autosave-pill.saving {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.14);
  color: #99f6e4;
}

.autosave-pill.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.sync-status-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.sync-status-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 5px;
  width: min(280px, 70vw);
  max-height: 260px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: var(--bg-workspace);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.sync-status-popover[hidden] {
  display: none;
}

.sync-status-popover strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.sync-status-popover small {
  color: var(--muted);
  line-height: 1.35;
}

.notifications-popover {
  width: min(360px, 82vw);
  text-align: left;
}

.notification-popover-list {
  display: grid;
  gap: 8px;
  max-height: 214px;
  overflow-y: auto;
  padding-right: 4px;
}

.notification-popover-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(19, 52, 71, 0.95);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.notification-popover-item:hover,
.notification-popover-item:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(28, 79, 104, 0.98);
  outline: none;
}

.notification-popover-item strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.notification-popover-item small,
.notification-popover-empty {
  color: #cbd5e1;
  line-height: 1.35;
}

.client-therapist-header-photo {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
}

.client-therapist-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.blog-post-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(94, 234, 212, 0.14);
}

.creator-tab {
  order: 0;
}

.active-journey-bar:hover strong {
  color: #99f6e4;
}

.tab-language-switcher {
  display: none !important;
  grid-template-columns: auto 112px;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.tab-language-switcher select {
  min-height: 38px;
  padding: 6px 8px;
}

.tab-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f4fbfb;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tab-button.active {
  border-color: var(--action);
  background: var(--action);
  color: var(--bg-page);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.18), 0 10px 24px rgba(94, 234, 212, 0.16);
}

.tab-button.locked-tab {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.tab-button[aria-disabled="true"] {
  cursor: not-allowed;
}

.creator-tab.active {
  border-color: #7af3e0;
  background: var(--accent);
  color: var(--bg-page);
}

.new-playlist-tab {
  order: 9;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.new-playlist-tab:hover {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.08);
  color: var(--ink);
}

.mode-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 38px;
}

.mode-panel.active {
  display: block;
}

.mobile-quick-nav {
  display: none;
}

body.facilitator-shell .hero,
body.facilitator-shell .mode-tabs,
body.facilitator-shell .mobile-quick-nav {
  display: none !important;
}

body.facilitator-shell #adminMode,
body.facilitator-shell #adminLogin,
body.facilitator-shell #adminWorkspace {
  display: none !important;
}

body.facilitator-shell .mode-panel.active {
  display: block !important;
}

body.facilitator-shell .top-workbar,
body.client-shell .top-workbar {
  display: grid !important;
}

body.facilitator-shell .workspace-quick-nav {
  display: flex;
}

body.facilitator-shell .app-shell {
  padding-left: 286px;
  background:
    radial-gradient(circle at 8% 0%, rgba(79, 209, 197, 0.14), transparent 30%),
    linear-gradient(180deg, var(--bg-canvas-soft) 0%, var(--bg-canvas) 44%, #c9dce4 100%);
}

body.client-shell .app-shell {
  padding-left: 286px;
  background:
    radial-gradient(circle at 8% 0%, rgba(79, 209, 197, 0.14), transparent 30%),
    linear-gradient(180deg, var(--bg-canvas-soft) 0%, var(--bg-canvas) 44%, #c9dce4 100%);
}

body.facilitator-sidebar-collapsed.facilitator-shell .app-shell,
body.facilitator-sidebar-collapsed.client-shell .app-shell {
  padding-left: 86px;
}

body.facilitator-shell .mode-panel.active,
body.client-shell .mode-panel.active {
  max-width: none;
  margin: 0 22px 24px 0;
  padding: 20px 26px 34px 34px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-top: 0;
  border-radius: 0 0 30px 30px;
  background: var(--bg-workspace);
  box-shadow: 0 26px 56px rgba(2, 12, 19, 0.24);
}

body.facilitator-shell .profile-card,
body.facilitator-shell .history-entry,
body.facilitator-shell .workspace-context-box,
body.facilitator-shell .diary-board,
body.facilitator-shell .timeline-summary,
body.facilitator-shell .service-item {
  background: var(--bg-card);
}

body.client-shell .profile-card,
body.client-shell .history-entry,
body.client-shell .workspace-context-box,
body.client-shell .diary-board,
body.client-shell .timeline-summary,
body.client-shell .service-item {
  background: var(--bg-card);
}

body.client-shell .hero,
body.client-shell .mobile-quick-nav,
body.client-shell .mode-tabs {
  display: none !important;
}

.facilitator-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 24;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: 270px;
  min-height: 0;
  padding: 18px 14px 16px;
  border-right: 1px solid rgba(94, 234, 212, 0.24);
  background:
    linear-gradient(180deg, rgba(6, 24, 38, 0.98), rgba(4, 17, 29, 0.98)),
    var(--bg-sidebar);
  box-shadow: 16px 0 44px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

body.facilitator-sidebar-collapsed .facilitator-sidebar {
  width: 72px;
  padding: 12px 8px;
}

.facilitator-sidebar-head {
  display: grid;
  gap: 12px;
}

.facilitator-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: rgba(18, 44, 63, 0.96);
  color: var(--action);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  min-width: 22px;
  font-size: 0.92rem;
  line-height: 1;
}

.nav-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 47, 68, 0.98), rgba(10, 31, 46, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.facilitator-sidebar-collapsed .sidebar-brand {
  grid-template-columns: 1fr;
  min-height: 54px;
  padding: 7px;
}

body.facilitator-sidebar-collapsed .sidebar-brand-copy,
body.facilitator-sidebar-collapsed .nav-label,
body.facilitator-sidebar-collapsed .sidebar-group summary::after {
  display: none;
}

body.facilitator-sidebar-collapsed .sidebar-brand-media {
  width: 42px;
  height: 42px;
}

.sidebar-brand-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-brand-copy strong,
.sidebar-brand-copy span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.16;
}

.sidebar-brand-copy strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.12;
}

.sidebar-brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.sidebar-beta-badge {
  justify-self: start;
  margin-top: 2px;
}

.sidebar-brand-media {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: radial-gradient(circle at 38% 42%, rgba(94, 234, 212, 0.22), rgba(255, 255, 255, 0.05) 62%);
  overflow: hidden;
}

.sidebar-brand-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-logo-fallback {
  font-size: 1.4rem;
}

.sidebar-impersonation {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
}

.sidebar-impersonation strong {
  color: #fde68a;
}

.sidebar-impersonation span {
  color: #fcd34d;
  font-size: 0.82rem;
}

.facilitator-sidebar-groups,
.facilitator-sidebar-footer {
  display: grid;
  gap: 10px;
}

.facilitator-sidebar-groups {
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  padding: 0 4px 16px 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 234, 212, 0.46) rgba(255, 255, 255, 0.04);
}

.sidebar-group {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 16px;
  background: rgba(16, 44, 63, 0.94);
  overflow: visible;
}

.sidebar-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

body.facilitator-sidebar-collapsed .sidebar-group summary,
body.facilitator-sidebar-collapsed .sidebar-group button,
body.facilitator-sidebar-collapsed .facilitator-sidebar-footer button {
  justify-content: center;
  padding: 11px 8px;
}

body.facilitator-sidebar-collapsed .sidebar-group[open] button {
  display: none;
}

.sidebar-group summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 0.9rem;
  color: var(--action);
}

.sidebar-group[open] summary::after {
  content: "−";
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-group button,
.facilitator-sidebar-footer button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid rgba(94, 234, 212, 0.08);
  border-radius: 0;
  background: rgba(6, 24, 38, 0.18);
  color: var(--muted);
  text-align: left;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

.sidebar-group[data-sidebar-group="music"] button {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.86rem;
  line-height: 1.2;
  overflow-wrap: normal;
}

.sidebar-group[data-sidebar-group="clients"] button {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.86rem;
  line-height: 1.2;
  overflow-wrap: normal;
}

.sidebar-group button:last-child {
  padding-bottom: 12px;
}

body.facilitator-shell .section-heading,
body.client-shell .section-heading {
  margin-bottom: 12px;
}

body.facilitator-shell .section-heading h2,
body.client-shell .section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.05;
}

body.facilitator-shell .section-heading .lead,
body.client-shell .section-heading .lead {
  max-width: 860px;
  color: rgba(230, 237, 243, 0.82);
}

body.facilitator-shell .profile-card,
body.client-shell .profile-card,
body.facilitator-shell .history-entry,
body.client-shell .history-entry,
body.facilitator-shell .workspace-context-box,
body.client-shell .workspace-context-box {
  border-radius: 18px;
  border-color: rgba(94, 234, 212, 0.12);
}

.workspace-summary-card {
  align-content: start;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(94, 234, 212, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.workspace-summary-card strong {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--ink);
}

.workspace-summary-card span {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
}

.workspace-summary-card small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.sidebar-group button:hover,
.facilitator-sidebar-footer button:hover,
.sidebar-group button.active,
.facilitator-sidebar-footer button.active {
  background: #1c4f68;
  color: var(--action);
}

.sidebar-group button[disabled],
.facilitator-sidebar-footer button[disabled] {
  cursor: not-allowed;
  color: rgba(139, 148, 158, 0.6);
}

.facilitator-board {
  display: grid;
  gap: 16px;
}

.facilitator-workview-stack {
  display: grid;
  gap: 16px;
}

.facilitator-view {
  display: none;
}

.facilitator-view.active {
  display: grid;
}

.client-view {
  display: none;
}

.client-view.active {
  display: grid;
}

.facilitator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.facilitator-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: 16px;
  align-items: start;
}

.facilitator-card,
.facilitator-subcard {
  align-content: start;
}

.facilitator-column-list,
.compact-list,
.facilitator-detail-columns {
  display: grid;
  gap: 12px;
}

.facilitator-detail-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-heading {
  margin-bottom: 6px;
}

.filter-grid {
  align-items: end;
}

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

.history-entry {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.compact-history {
  padding: 10px;
}

.history-entry > div {
  min-width: 0;
}

.history-entry strong,
.history-entry span,
.history-entry small {
  display: block;
}

.history-entry span,
.history-entry small {
  color: var(--muted);
}

.manual-invite-link-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.44);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.10);
}

.manual-invite-link-box strong,
.manual-invite-link-box span {
  display: block;
}

.manual-invite-link-box span {
  color: var(--muted);
}

.manual-invite-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.manual-invite-link-row input {
  width: 100%;
  min-width: 0;
}

.inline-help-card {
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
}

.inline-help-card summary {
  cursor: pointer;
  color: var(--action);
  font-weight: 900;
}

.inline-help-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.client-entry.selected {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.12);
}

.client-management-list {
  gap: 10px;
}

.client-record {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
}

.client-record.selected {
  border-color: rgba(94, 234, 212, 0.42);
}

.client-record summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
}

.client-record summary::-webkit-details-marker {
  display: none;
}

.client-record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.client-record-summary strong,
.client-record-summary span,
.client-record-summary small {
  display: block;
}

.client-record-summary span,
.client-record-summary small {
  color: var(--muted);
}

.client-record-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.client-record-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.empty-state-card {
  min-height: 180px;
  place-items: center;
  text-align: center;
}

.facilitator-client-detail {
  display: grid;
  gap: 14px;
}

.playlist-manage-card {
  gap: 12px;
}

.library-playlist-card {
  padding: 0;
}

.library-playlist-card[open] {
  padding-bottom: 16px;
}

.library-playlist-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.library-playlist-summary::-webkit-details-marker {
  display: none;
}

.library-playlist-summary::after {
  content: "+";
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  color: #a7fff3;
  font-weight: 950;
}

.library-playlist-card[open] .library-playlist-summary::after {
  content: "−";
}

.library-playlist-card > .workspace-badges,
.library-playlist-card > .playlist-manage-actions,
.library-playlist-card > .library-edit-form {
  margin-right: 16px;
  margin-left: 16px;
}

.playlist-manage-head,
.playlist-manage-actions,
.playlist-access-form,
.brand-preview-row {
  display: grid;
  gap: 10px;
}

.playlist-manage-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.playlist-manage-actions {
  grid-auto-flow: column;
  justify-content: start;
}

.playlist-access-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.followup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.followup-clients-field {
  grid-row: span 2;
}

.followup-client-picker {
  position: relative;
  display: grid;
  gap: 6px;
}

.followup-client-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.followup-selected-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.followup-selected-chip {
  padding: 4px 8px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  color: #d9fffa;
  font-size: 0.76rem;
  font-weight: 850;
}

.followup-client-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 18;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.97);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28);
}

.followup-client-search {
  display: grid;
  gap: 6px;
}

.followup-client-options {
  display: grid;
  gap: 6px;
  max-height: 184px;
  overflow: auto;
}

.followup-client-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.followup-client-option span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.followup-client-option strong,
.followup-client-option small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.followup-client-option strong {
  color: var(--ink);
  font-size: 0.79rem;
}

.followup-client-option small {
  color: var(--muted);
  font-size: 0.71rem;
}

.followup-client-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.followup-form-grid .wide-field,
.followup-submit-row {
  grid-column: 1 / -1;
}

.therapist-review-create-card {
  margin-bottom: 16px;
}

.therapist-review-create-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.therapist-review-create-card > summary strong,
.therapist-review-create-card > summary span {
  display: block;
}

.therapist-review-create-card > summary span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.therapist-review-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.therapist-review-create-grid .wide-field {
  grid-column: 1 / -1;
}

.review-import-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 209, 197, 0.32);
  border-radius: 8px;
  background: rgba(18, 24, 33, 0.6);
  color: var(--text-soft);
  font-weight: 800;
}

.review-import-checkbox input {
  width: 18px;
  height: 18px;
}

.review-media-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 209, 197, 0.28);
  border-radius: 8px;
  background: rgba(18, 24, 33, 0.56);
}

.review-media-status {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.review-media-status.ready {
  color: #bbf7d0;
}

.review-media-status.warning {
  color: #fde68a;
}

.review-media-status.external {
  color: var(--accent);
}

.form-hint {
  align-self: center;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 800;
}

.followup-form-grid select[multiple] {
  min-height: 118px;
}

.followup-assignment-list {
  display: grid;
  gap: 12px;
}

.followup-assignment-card {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.followup-assignment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.followup-assignment-summary::-webkit-details-marker {
  display: none;
}

.followup-assignment-summary strong {
  display: block;
  color: var(--ink);
}

.followup-assignment-summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.followup-assignment-summary small {
  color: #a7fff3;
  font-weight: 850;
  text-align: right;
}

.followup-assignment-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.playlist-report-sheet {
  display: grid;
  gap: 18px;
}

.playlist-report-brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.playlist-report-kicker {
  color: #8bd9ff;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.playlist-report-brand h3 {
  margin: 6px 0 4px;
}

.playlist-report-brand p,
.playlist-report-meta span,
.playlist-report-empty {
  color: var(--muted);
}

.playlist-report-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.playlist-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.playlist-report-stat {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.playlist-report-stat strong {
  font-size: 1.8rem;
  color: var(--ink);
}

.playlist-report-stat span {
  color: var(--muted);
}

.inline-label-card {
  display: grid;
  gap: 10px;
}

.inline-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-plain {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.session-quick-client-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.42);
}

.compact-form-grid {
  gap: 10px;
}

.followup-assignment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.followup-assignment-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.followup-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.followup-status-badge.waiting {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.followup-status-badge.feedback {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.followup-status-badge.ended {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.playlist-report-section {
  display: grid;
  gap: 12px;
}

.playlist-report-bar {
  display: grid;
  gap: 6px;
}

.playlist-report-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.playlist-report-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.playlist-report-meter-fill {
  height: 100%;
  background: var(--accent);
}

.external-link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.library-edit-form,
.followup-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
}

.compact-report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.session-rating-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.session-rating-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
}

.session-rating-body select {
  margin-top: 6px;
}

.brand-preview-row {
  grid-template-columns: 72px 1fr;
  align-items: center;
}

.profile-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.professional-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-preview-row img,
.empty-brand-logo {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.brand-preview-row img {
  object-fit: cover;
}

.brand-preview-row .header-photo-preview {
  width: min(220px, 100%);
  height: 72px;
}

.brand-preview-row .profile-photo-preview {
  border-radius: 50%;
}

.empty-brand-logo {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.facilitator-sidebar-footer {
  align-content: end;
  position: static;
  min-height: 0;
  padding-top: 8px;
  background: var(--bg-sidebar);
}

.sidebar-language-picker {
  display: none !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 4px 8px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 8px;
  background: rgba(19, 52, 71, 0.9);
  max-width: none;
}

.sidebar-language-picker span {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.sidebar-language-picker select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 3px 8px;
  font-size: 0.8rem;
}

.active-journey-bar {
  min-height: 42px;
}

.active-journey-copy {
  margin-right: 0;
}

.active-journey-tools {
  gap: 10px;
}

.workspace-priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(620px, 54vw);
  padding: 8px 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: left;
}

.workspace-priority-pill strong {
  color: var(--action);
  white-space: nowrap;
}

.workspace-priority-pill span {
  min-width: 0;
}

.upcoming-session-card {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upcoming-session-card:hover {
  border-color: rgba(94, 234, 212, 0.3);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.upcoming-session-card .playlist-manage-actions {
  margin-top: 8px;
}

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

.impersonation-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.password-field button {
  position: absolute;
  right: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(94, 234, 212, 0.12);
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.phone-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}

.wizard,
.register-gate,
.journey-output,
.recipe-card,
.state-card,
.search-panel,
.library-list,
.admin-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.register-gate {
  display: grid;
  gap: 18px;
  padding: 22px;
  margin-bottom: 16px;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--bg-panel), #1a2330);
  color: #f7fbfa;
}

.register-gate .eyebrow,
.register-gate .lead,
.register-gate label {
  color: rgba(247, 251, 250, 0.84);
}

.register-gate h2 {
  color: #fff;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.terms-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
}

.terms-field input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.admin-tab[hidden] {
  display: none;
}

.register-gate,
.creatorMode-placeholder {
  display: none;
}

#creatorMode.needs-register .register-gate {
  display: grid;
}

#creatorMode.needs-register .wizard,
#creatorMode.needs-register .journey-output,
#creatorMode.brief-only .journey-output,
#creatorMode.journey-created .wizard,
#creatorMode.journey-created .register-gate {
  display: none;
}

#creatorMode.brief-only .wizard,
#creatorMode.journey-created .journey-output {
  display: grid;
}

.wizard {
  display: grid;
  gap: 18px;
  padding: 20px;
  margin-bottom: 16px;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.98), rgba(26, 35, 48, 0.98));
  color: #f7fbfa;
}

.wizard .eyebrow,
.wizard label,
.wizard .source-policy {
  color: rgba(247, 251, 250, 0.84);
}

.wizard h2 {
  color: #fff;
}

.wizard .source-policy {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wide-field {
  grid-column: 1 / -1;
}

.profile-guidance {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--action);
  line-height: 1.4;
}

.profile-guidance strong {
  color: var(--ink);
}

.profile-label {
  display: inline-flex;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--action);
  color: var(--bg-page);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.source-policy {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  line-height: 1.45;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.5;
}

.guide-steps strong {
  color: var(--action);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.field-hint {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}

.compatibility-hidden {
  display: none !important;
}

.compatibility-hidden * {
  display: none !important;
}

.primary-button {
  width: fit-content;
  min-width: 180px;
  border-color: var(--navy);
  background: var(--navy);
  color: var(--bg-page);
}

.primary-button:hover {
  background: var(--action-dark);
}

.secondary-button {
  background: #0f151d;
  color: var(--ink);
}

.journey-output {
  padding: 18px;
  border-color: var(--line);
  background: rgba(18, 24, 33, 0.96);
}

.section-heading,
.state-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading > div,
.state-header > div {
  min-width: 0;
}

.button-row,
.quick-actions,
.tags,
.phrase-grid,
.source-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-summary {
  margin-bottom: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 850;
  line-height: 1.45;
}

.journey-progress {
  display: grid;
  gap: 7px;
  max-width: 560px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
}

.workspace-guide {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.workspace-guide-panel {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.06), rgba(18, 24, 33, 0.72));
  overflow: hidden;
}

.workspace-guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.workspace-guide-summary::-webkit-details-marker {
  display: none;
}

.workspace-guide-summary strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.workspace-guide-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: right;
}

.workspace-guide-inner {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.workspace-guide-top {
  display: grid;
  gap: 4px;
}

.workspace-guide-top strong {
  color: var(--ink);
  font-size: 1rem;
}

.workspace-guide-top span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.workspace-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workspace-guide-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.workspace-guide-card strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.workspace-guide-card span,
.workspace-guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.journey-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 950;
}

.journey-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.journey-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--action), var(--success));
}

.journey-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.progress-pill.completed {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.progress-pill.progress {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.11);
  color: #fbbf24;
}

.progress-pill.pending {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

#timelineTitle {
  width: fit-content;
  cursor: pointer;
}

.editable-journey-title:hover {
  color: var(--action);
}

.journey-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.journey-status-row {
  margin-top: 10px;
}

.journey-status-label {
  width: fit-content;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.journey-status-label select {
  min-width: 190px;
}

.journey-status-label.building {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.08);
}

.journey-status-label.review {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.09);
}

.journey-status-label.done {
  border-color: rgba(139, 148, 158, 0.28);
  background: rgba(139, 148, 158, 0.08);
}

.playlist-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.playlist-status-pill.building {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.12);
  color: #99f6e4;
}

.playlist-status-pill.review {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.playlist-status-pill.done {
  border-color: rgba(139, 148, 158, 0.34);
  background: rgba(139, 148, 158, 0.12);
  color: #d1d5db;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: block;
  padding: 0;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-left-width: 8px;
  border-left-color: rgba(94, 234, 212, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, #102432 0%, #0f1f2b 100%);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.timeline-item[open] {
  border-color: rgba(94, 234, 212, 0.58);
  border-left-color: rgba(94, 234, 212, 1);
  background: linear-gradient(180deg, var(--bg-card) 0%, #112d3e 100%);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.14), 0 18px 38px rgba(0, 0, 0, 0.22);
}

.timeline-item.return-highlight {
  outline: 3px solid rgba(94, 234, 212, 0.6);
  box-shadow: 0 0 0 8px rgba(94, 234, 212, 0.15), var(--shadow);
}

.timeline-item.energy-low,
.timeline-item.energy-mid,
.timeline-item.energy-high {
  border-left-color: rgba(94, 234, 212, 0.78);
}

.timeline-item.workflow-pending {
  border-left-color: rgba(94, 234, 212, 0.66);
}

.timeline-item.workflow-in-progress {
  border-left-color: rgba(94, 234, 212, 0.9);
}

.timeline-item.workflow-completed {
  border-left-color: rgba(94, 234, 212, 1);
}

.timeline-item-summary {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.timeline-item-summary::-webkit-details-marker {
  display: none;
}

.timeline-heading-block {
  min-width: 0;
}

.timeline-summary-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.timeline-content {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px 14px;
}

.time-block {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 48px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.15);
  color: #a7fff3;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.timeline-kicker {
  margin-bottom: 0;
  color: #8bd9ff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-purpose {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.timeline-next-step {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 7px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.07);
}

.timeline-next-step strong {
  color: #a7fff3;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.timeline-next-step span {
  color: var(--ink);
  font-weight: 850;
}

.timeline-next-step small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.timeline-title {
  margin-bottom: 0;
  font-size: 1.04rem;
  font-weight: 950;
}

.state-title-chip {
  display: inline-flex;
  width: fit-content;
  min-height: auto;
  margin-top: 0;
  margin-bottom: 4px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  text-align: left;
}

.state-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.diary-shortcut-button {
  min-width: auto;
  padding: 7px 10px;
  border-color: rgba(94, 234, 212, 0.26);
  background: rgba(94, 234, 212, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.diary-shortcut-button:hover {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.16);
}

.timeline-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.timeline-status-badge.pending {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.timeline-status-badge.progress {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.timeline-status-badge.completed {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.timeline-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.timeline-action-copy {
  display: grid;
  gap: 4px;
}

.timeline-action-copy strong {
  color: #a7fff3;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.timeline-action-copy span {
  color: var(--ink);
  font-weight: 900;
}

.timeline-action-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.timeline-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.player-strip .preview-trigger {
  min-height: 46px;
  border-color: transparent;
  color: var(--bg-page);
}

.player-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.player-panel.music-panel {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.08);
}

.player-panel.sound-panel {
  border-color: rgba(124, 58, 237, 0.34);
  background: rgba(124, 58, 237, 0.12);
}

.player-panel.manual-panel {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.09);
}

.player-panel-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.goal-marker {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
}

.goal-marker.ok {
  border-color: rgba(34, 197, 94, 0.62);
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.goal-marker.warning {
  border-color: rgba(250, 204, 21, 0.62);
  background: rgba(250, 204, 21, 0.14);
  color: #fef08a;
}

.goal-marker.pending {
  color: var(--muted);
}

.player-panel.music-panel .preview-trigger {
  background: var(--action);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.player-panel.sound-panel .preview-trigger {
  background: #a78bfa;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.player-panel.music-panel .preview-trigger:hover {
  background: #99f6e4;
  box-shadow: 0 10px 24px rgba(94, 234, 212, 0.22);
  transform: translateY(-1px);
}

.player-panel.sound-panel .preview-trigger:hover {
  background: #c4b5fd;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.24);
  transform: translateY(-1px);
}

.manual-panel small {
  color: var(--muted);
  font-size: 0.82rem;
}

.sound-select {
  display: grid;
  gap: 4px;
  margin: 0;
  color: rgba(247, 251, 250, 0.82);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sound-select select {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.28);
  background: #0f151d;
  color: var(--ink);
}

.state-sequence {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid #b7c9d2;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
}

.timeline-summary-actions .state-sequence {
  width: auto;
  margin: 0;
  padding: 7px 9px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.timeline-summary-actions .state-sequence:not(.empty) {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-sequence.empty {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.state-sequence.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
  color: #86efac;
}

.state-sequence.warning {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--gold-soft);
  color: #fbbf24;
}

.state-sequence.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: var(--danger-soft);
  color: var(--danger);
}

.timeline-notes {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.state-brief-list {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.state-brief-row {
  display: grid;
  grid-template-columns: 28px minmax(82px, 116px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.history-link-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.history-link-box audio {
  width: 100%;
}

.library-state-modal-card {
  max-width: 880px;
}

.state-brief-row strong {
  color: var(--navy);
}

.state-brief-row em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.timeline-item .rule-grid {
  max-height: 70px;
  overflow: hidden;
}

.rule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.rule-chip {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.daw-guide {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.daw-step {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.daw-step.main {
  border-left-color: var(--navy);
}

.daw-step.ambient {
  border-left-color: var(--success);
}

.daw-step.bridge {
  border-left-color: var(--coral);
}

.daw-step strong {
  color: var(--ink);
}

.daw-step span {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
}

.daw-step em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.quick-actions a,
.quick-actions button,
.tag,
.phrase,
.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.quick-actions a,
.quick-actions button {
  background: var(--navy-soft);
  color: var(--navy);
}

.quick-actions a.free,
.quick-actions button.free,
.source-link.free,
.free-source {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
  color: #86efac;
}

.quick-actions a.commercial-source,
.quick-actions button.commercial-source,
.source-link.commercial-source {
  border-color: rgba(94, 234, 212, 0.28);
  background: var(--navy-soft);
  color: var(--navy);
}

.quick-actions a.mixed-source,
.quick-actions button.mixed-source,
.source-link.mixed-source {
  border-color: rgba(124, 58, 237, 0.42);
  background: var(--secondary-soft);
  color: #c4b5fd;
}

.preview-trigger {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.mini-details,
.source-dock {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-details summary,
.source-dock summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--navy);
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}

.mini-details summary::-webkit-details-marker,
.source-dock summary::-webkit-details-marker {
  display: none;
}

.mini-details summary::after,
.source-dock summary::after {
  content: "+";
  color: var(--coral);
  font-weight: 950;
}

.mini-details[open] summary::after,
.source-dock[open] summary::after {
  content: "-";
}

.source-dock summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.mini-details .daw-guide {
  padding: 0 10px 10px;
}

.basic-advice .state-brief-list {
  padding: 0 10px 10px;
}

.source-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 10px 10px;
}

.inline-source-dock {
  margin: 0;
}

.source-groups.compact {
  grid-template-columns: 1fr;
  padding: 0 8px 8px;
}

.source-groups.compact .source-group {
  padding: 8px;
}

.source-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.source-group.priority {
  border-color: rgba(124, 58, 237, 0.42);
  background: var(--secondary-soft);
}

.source-group.listen-source {
  border-color: rgba(124, 58, 237, 0.42);
  background: var(--violet-soft);
}

.source-group.download-source {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
}

.source-group.license-source {
  border-color: #91a9b7;
  background: #e9f1f5;
}

.source-group.ambient-source {
  border-color: #8cc8b1;
  background: #f2fbf5;
}

.source-group-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.source-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.audition-panel {
  display: none;
  position: fixed;
  right: 18px;
  top: max(18px, env(safe-area-inset-top));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  z-index: 55;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(94, 234, 212, 0.65);
  border-left: 8px solid rgba(94, 234, 212, 1);
  border-radius: 8px;
  background: var(--bg-workspace);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.15), 0 18px 44px rgba(21, 23, 24, 0.28);
  overflow: auto;
  overscroll-behavior: contain;
}

.audition-sticky {
  position: sticky;
  top: -14px;
  z-index: 4;
  margin: -14px -14px 10px;
  padding: 8px 14px 7px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.18);
  background: color-mix(in srgb, var(--bg-workspace) 94%, #000 6%);
  backdrop-filter: blur(12px);
}

.audition-panel.active {
  display: block;
}

.audition-panel.panel-front {
  z-index: 72;
}

.satellite-audition-panel {
  border-color: rgba(34, 197, 94, 0.68);
  border-left-color: rgba(34, 197, 94, 0.96);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18), 0 18px 48px rgba(0, 0, 0, 0.38);
}

.audition-panel.split-left {
  left: 18px;
  right: auto;
  width: calc(64vw - 26px);
  max-width: none;
}

.satellite-audition-panel.split-right {
  left: auto;
  right: 18px;
  top: max(18px, env(safe-area-inset-top));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: calc(36vw - 26px);
  max-width: none;
  margin: 0;
  z-index: 68;
}

.audition-panel.split-left.panel-front,
.satellite-audition-panel.split-right.panel-front {
  z-index: 72;
}

.satellite-audition-panel .preview-grid {
  grid-template-columns: 1fr;
}

.sound-layer-toggle {
  border-color: rgba(34, 197, 94, 0.45) !important;
  background: rgba(34, 197, 94, 0.14) !important;
  color: #bbf7d0 !important;
}

.audition-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-right: 50px;
}

.audition-header h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.18;
}

.audition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.audition-header a,
.preview-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.audition-header a,
.preview-actions a {
  border-color: rgba(94, 234, 212, 0.35);
  background: var(--navy-soft);
  color: #a7fff3;
}

.audition-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.audition-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-color: #ef9a90;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 950;
  line-height: 1;
}

.audition-header a.commercial-source {
  border-color: #91a9b7;
  background: var(--navy-soft);
  color: var(--navy);
}

.audition-header a.mixed-source {
  border-color: rgba(124, 58, 237, 0.42);
  background: var(--secondary-soft);
  color: #c4b5fd;
}

.external-search-picker {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: min(360px, 100%);
}

.external-search-picker label {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.external-search-picker label span {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.external-search-picker select {
  min-height: 38px;
  border-radius: 8px;
}

.external-search-picker a {
  min-height: 38px;
  white-space: nowrap;
}

.audition-actions .external-search-picker {
  max-width: 430px;
}

.audition-help,
.preview-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 10px;
}

.preview-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  content-visibility: auto;
  contain-intrinsic-size: 180px;
}

.preview-card.is-playing {
  border-color: rgba(250, 204, 21, 0.92) !important;
  box-shadow: inset 6px 0 0 rgba(250, 204, 21, 0.96) !important;
}

.preview-card.fresh-option,
.preview-card.usage-fresh {
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.55);
}

.preview-card.used-before,
.preview-card.usage-other {
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: inset 4px 0 0 rgba(245, 158, 11, 0.72);
}

.preview-card.usage-same {
  border-color: rgba(239, 68, 68, 0.68);
  box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.8);
}

.preview-fit-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.preview-fit-rating span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.preview-fit-rating button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 900;
}

.preview-fit-rating button:hover,
.preview-fit-rating button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #061826;
}

.used-before-note {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: #fbbf24 !important;
  font-weight: 950;
}

.used-before-note.same {
  background: var(--danger-soft);
  color: #fca5a5 !important;
}

.used-before-note.other {
  background: var(--gold-soft);
  color: #fbbf24 !important;
}

.preview-cover {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--navy-soft);
}

.preview-cover.placeholder {
  border: 1px solid var(--line);
}

.preview-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.preview-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.preview-body strong,
.preview-body span,
.preview-body em,
.preview-body small {
  overflow-wrap: anywhere;
}

.preview-title {
  min-width: 0;
  max-width: 100%;
  display: block;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
  line-height: 1.3;
}

.preview-artist,
.preview-album,
.preview-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-filetype,
.preview-duration {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: lowercase;
}

.preview-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  pointer-events: none;
}

.access-badge.download {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.access-badge.purchase {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.12);
  color: var(--action);
}

.access-badge.subscription {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.access-badge.license,
.access-badge.reference {
  border-color: rgba(124, 58, 237, 0.42);
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
}

.preview-body span,
.preview-body em,
.preview-body small {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.preview-audio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: stretch;
}

.preview-audio-shell audio {
  display: none;
}

.preview-transport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.preview-play-toggle {
  min-width: 58px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.1);
  color: #a7fff3;
  font-size: 0.74rem;
  font-weight: 950;
}

.preview-seek-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.preview-time {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.preview-time-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.preview-seek-control input[type="range"] {
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.preview-seek-control input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.22);
}

.preview-seek-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--action);
}

.preview-seek-control input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.22);
}

.preview-seek-control input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--action);
}

.preview-volume-control {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 34px;
  padding: 6px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.preview-volume-control span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.preview-volume-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-height: 88px;
  overflow: hidden;
}

.preview-volume-fader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 88px;
  min-height: 88px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: ns-resize;
  overflow: hidden;
}

.preview-volume-fader:hover,
.preview-volume-fader:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.preview-volume-track {
  position: relative;
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: visible;
}

.preview-volume-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 85%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.92), rgba(94, 234, 212, 0.68));
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.14);
}

.preview-volume-thumb {
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--action);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
  transform: translateX(-50%);
  pointer-events: none;
}

.preview-actions {
  display: grid;
  gap: 7px;
}

.preview-mixer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.track-toggle {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.track-toggle.active {
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.14);
  color: #c6fff7;
}

.track-toggle.active.danger {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.track-toggle.active.action {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.preview-tags span {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.07);
  color: #c6fff7;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.25;
}

.preview-card-sound .preview-cover {
  background: rgba(34, 197, 94, 0.08);
}

.preview-card-sound .preview-tags span {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
}

.satellite-filter-row {
  margin: 0;
}

.satellite-filter-row,
.preview-access-filter,
.preview-format-filter,
.preview-duration-filter,
.preview-filter-strip label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.satellite-filter-row span,
.preview-access-filter span,
.preview-format-filter span,
.preview-duration-filter span,
.preview-filter-strip label span {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.satellite-filter-row select,
.preview-access-filter select,
.preview-format-filter select,
.preview-duration-filter input,
.preview-filter-strip input,
.preview-filter-strip select {
  min-height: 38px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #d8fff2;
  padding: 0 10px;
}

.preview-filter-strip {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(18, 24, 33, 0.72);
  align-items: end;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.preview-filter-strip.track-search {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.preview-filter-strip.has-satellite {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.preview-filter-strip .preview-query-filter {
  grid-column: auto;
}

.preview-filter-strip .preview-search-submit {
  min-height: 38px;
  align-self: end;
  justify-self: stretch;
  white-space: nowrap;
  order: 20;
}

.preview-duration-filter {
  width: auto;
}

.preview-format-filter,
.preview-access-filter,
.satellite-filter-row {
  width: 100%;
}

.preview-panel-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 24px;
  align-items: start;
  margin: 0 0 8px;
}

.preview-mobile-tools {
  min-width: 0;
  width: 100%;
}

.preview-mobile-tools summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.1);
  color: var(--action);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.preview-mobile-tools summary::-webkit-details-marker {
  display: none;
}

.preview-mobile-tools summary::after {
  content: "+";
  font-weight: 950;
}

.preview-mobile-tools[open] summary::after {
  content: "-";
}

.preview-filter-strip > * {
  min-width: 0;
}

.preview-mixer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.preview-mixer-bar.compact-mixer {
  width: 100%;
  min-width: 250px;
  margin: 0;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
}

.preview-mixer-bar strong {
  display: block;
  margin-bottom: 2px;
}

.preview-mixer-bar span {
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-master-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: min(100%, 300px);
}

.stop-all-play-button {
  width: 100%;
  justify-content: center;
  text-transform: uppercase;
}

.preview-master-control span {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-master-control input[type="range"] {
  width: 100%;
  margin: 0;
}

.preview-source-button {
  display: grid;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.06);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.preview-source-button:hover,
.preview-source-button:focus-visible {
  border-color: rgba(94, 234, 212, 0.52);
  background: rgba(94, 234, 212, 0.14);
  box-shadow: 0 8px 18px rgba(94, 234, 212, 0.14);
  outline: none;
}

.preview-quality-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.preview-quality-badge.quality-high {
  border-color: rgba(34, 197, 94, 0.46);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.preview-quality-badge.quality-mid {
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.12);
  color: #fef08a;
}

.preview-quality-badge.quality-low {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.preview-access-badge-link {
  text-decoration: none;
}

.satellite-audition-panel .preview-panel-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  align-items: start;
}

.satellite-audition-panel.split-right .preview-panel-toolbar {
  grid-template-columns: 1fr;
  gap: 12px;
}

.satellite-audition-panel .preview-filter-strip {
  gap: 10px;
  align-items: end;
}

.satellite-audition-panel .preview-mixer-bar.compact-mixer {
  min-width: 220px;
}

.inbox-message-card.unread {
  border-color: rgba(94, 234, 212, 0.28);
}

.inbox-thread-card {
  gap: 14px;
}

.inbox-thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.inbox-thread-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.inbox-chat-list {
  display: grid;
  gap: 10px;
}

.inbox-chat-bubble {
  display: grid;
  gap: 6px;
  width: min(82%, 720px);
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.inbox-chat-bubble.client {
  justify-self: start;
  background: rgba(27, 77, 107, 0.72);
}

.inbox-chat-bubble.therapist {
  justify-self: end;
  border-color: rgba(94, 234, 212, 0.36);
  background: rgba(94, 234, 212, 0.12);
}

.inbox-chat-bubble.admin {
  justify-self: end;
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.11);
}

.client-conversation-card {
  margin-top: 10px;
  background: rgba(8, 18, 26, 0.28);
}

.inbox-chat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.inbox-chat-meta strong {
  color: var(--text-primary);
}

.inbox-chat-bubble p {
  margin: 0;
  color: var(--text-soft);
  white-space: pre-wrap;
}

.attention-pulse {
  animation: attentionPulse 1.5s ease;
}

@keyframes attentionPulse {
  0% {
    border-color: rgba(94, 234, 212, 0.24);
    box-shadow: none;
  }
  28% {
    border-color: rgba(94, 234, 212, 0.86);
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18), 0 0 28px rgba(94, 234, 212, 0.18);
  }
  100% {
    border-color: rgba(94, 234, 212, 0.24);
    box-shadow: none;
  }
}

@media (max-width: 980px) {
  .preview-panel-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .preview-mixer-bar.compact-mixer {
    width: 100%;
    min-width: 0;
  }

  .preview-filter-strip,
  .satellite-audition-panel .preview-filter-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.satellite-audition-panel .preview-card {
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 8px;
}

.satellite-audition-panel .preview-cover {
  width: 42px;
  height: 42px;
}

.satellite-audition-panel .preview-body {
  gap: 4px;
}

.preview-actions button,
.preview-actions a {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.preview-save-button {
  width: 100%;
  border-color: var(--action) !important;
  background: var(--action) !important;
  color: var(--bg-page) !important;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(94, 234, 212, 0.18);
}

.preview-save-button:disabled {
  border-color: rgba(139, 148, 158, 0.22) !important;
  background: rgba(139, 148, 158, 0.16) !important;
  color: var(--muted) !important;
  box-shadow: none;
}

.preview-external-link {
  justify-self: start;
  border: 1px solid rgba(94, 234, 212, 0.34) !important;
  background: rgba(94, 234, 212, 0.08) !important;
  color: #f8ffff !important;
  font-weight: 800;
  font-size: 0.76rem !important;
  text-decoration: none;
}

.preview-external-link.download-action {
  min-height: 24px;
  padding: 3px 7px;
  border-color: rgba(34, 197, 94, 0.48) !important;
  background: rgba(34, 197, 94, 0.14) !important;
  color: #86efac !important;
  font-size: 0.68rem !important;
  font-weight: 950;
  text-transform: uppercase;
}

.preview-source-action-button,
.preview-source-action-button.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-color: rgba(94, 234, 212, 0.34) !important;
  background: rgba(94, 234, 212, 0.08) !important;
  color: #f8ffff !important;
  font-size: 0.82rem !important;
  font-weight: 900;
  text-align: center;
  text-transform: none;
}

.preview-external-link:hover,
.preview-external-link:focus-visible,
a.preview-external-link.free-source:hover,
a.preview-external-link.mixed-source:hover,
a.preview-external-link.commercial-source:hover {
  background: var(--accent) !important;
  color: var(--bg-page) !important;
  border-color: rgba(94, 234, 212, 0.62) !important;
  outline: none;
}

.preview-license-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(169, 193, 204, 0.42);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(18, 24, 33, 0.42);
  font-size: 0.68rem;
  font-weight: 850;
  text-decoration: none;
}

.preview-license-link:hover,
.preview-license-link:focus-visible {
  border-color: var(--accent);
  color: var(--bg-page);
  background: var(--accent);
  outline: none;
}

.load-more-button {
  width: 100%;
  margin-top: 12px;
  border-color: rgba(94, 234, 212, 0.35);
  background: var(--navy-soft);
  color: #a7fff3;
}

.load-more-button:hover {
  background: rgba(94, 234, 212, 0.24);
}

.no-preview-note {
  display: block;
  padding: 9px 10px;
  border: 1px dashed rgba(94, 234, 212, 0.32);
  border-radius: 8px;
  color: var(--muted);
}

.admin-board {
  padding: 22px;
}

.admin-login,
.admin-workspace {
  display: grid;
  gap: 16px;
}

.admin-login {
  max-width: 520px;
}

.two-factor-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
}

.two-factor-setup {
  margin: 0;
  padding: 9px 10px;
  border: 1px dashed rgba(245, 158, 11, 0.42);
  border-radius: 8px;
  color: #fbbf24;
  overflow-wrap: anywhere;
}

.admin-workspace {
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 18px;
}

.admin-menu-toggle {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

body.admin-sidebar-collapsed .admin-workspace {
  grid-template-columns: 72px minmax(0, 1fr);
}

.admin-side-nav {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 14px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 8px;
  background: var(--bg-sidebar);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.admin-content {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

body.admin-sidebar-collapsed .admin-side-nav {
  padding: 8px;
}

body.admin-sidebar-collapsed .admin-side-nav .nav-label {
  display: none;
}

body.admin-sidebar-collapsed .admin-menu-toggle .nav-label {
  display: none;
}

.admin-nav-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

body.admin-sidebar-collapsed .admin-nav-button {
  justify-content: center;
  padding-inline: 8px;
}

.admin-nav-button.active {
  border-color: rgba(94, 234, 212, 0.45);
  background: #1c4f68;
  color: var(--action);
}

.admin-content {
  min-width: 0;
}

.admin-content .admin-card {
  background: var(--bg-card);
}

.admin-nav-button.danger-nav {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.admin-nav-kicker {
  padding: 0 4px 4px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-nav-group {
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.admin-nav-group summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 10px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-weight: 950;
}

.admin-nav-group[open] summary::after {
  content: "-";
}

.admin-nav-group:has(.admin-nav-button.active) {
  border-color: rgba(94, 234, 212, 0.36);
  background: rgba(94, 234, 212, 0.055);
}

.admin-nav-group .admin-nav-button {
  min-height: 40px;
  border: 0;
  border-top: 1px solid rgba(94, 234, 212, 0.1);
  border-radius: 0;
  background: transparent;
}

.admin-nav-group .admin-nav-button.active {
  border-left: 3px solid var(--accent);
  background: rgba(94, 234, 212, 0.13);
  color: var(--accent);
}

.admin-nav-footer {
  padding-top: 4px;
}

body.admin-sidebar-collapsed .admin-nav-kicker,
body.admin-sidebar-collapsed .admin-nav-group summary .nav-label,
body.admin-sidebar-collapsed .admin-nav-group summary::after {
  display: none;
}

body.admin-sidebar-collapsed .admin-nav-group {
  display: grid;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  overflow: visible;
}

body.admin-sidebar-collapsed .admin-nav-group summary {
  justify-content: center;
  min-height: 0;
  padding: 0;
}

body.admin-sidebar-collapsed .admin-nav-group .admin-nav-button {
  justify-content: center;
  min-height: 42px;
  padding-inline: 8px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 8px;
}

.email-template-list,
.support-ticket-list {
  display: grid;
  gap: 12px;
}

.email-template-card,
.support-ticket-row {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.32);
  overflow: hidden;
}

.email-template-card summary,
.support-ticket-row summary,
.support-ticket-head {
  display: grid;
  grid-template-columns: 1.1fr 1.8fr 0.8fr 0.8fr 1fr 0.7fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.email-template-card summary {
  grid-template-columns: 1fr auto;
  cursor: pointer;
}

.email-template-editor-shell {
  display: grid;
  gap: 16px;
  margin: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19, 52, 71, 0.74), rgba(6, 24, 38, 0.72));
}

.email-template-pill {
  justify-self: start;
  padding: 9px 18px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  color: #99f6e4;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.email-template-subject {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.email-template-subject input {
  min-height: 58px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
}

.email-template-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.email-mode-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(8, 16, 28, 0.72);
}

.email-mode-toggle button {
  min-width: 86px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
}

.email-mode-toggle button.active {
  background: rgba(94, 234, 212, 0.18);
  color: #dffefa;
}

.email-editor-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, auto));
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.email-editor-toolbar button,
.email-editor-toolbar select,
.email-color-control {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(8, 16, 28, 0.74);
  color: #dbeafe;
  font-weight: 900;
}

.email-editor-toolbar button,
.email-editor-toolbar select {
  white-space: nowrap;
}

.email-color-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.email-color-control input[type="color"] {
  width: 32px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.email-editor-surface,
.email-editor-html {
  width: 100%;
  min-height: 300px;
  padding: 24px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(3, 10, 18, 0.82);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  overflow: auto;
}

.email-editor-html {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.email-editor-surface table {
  width: 100%;
  border-collapse: collapse;
}

.email-editor-surface td {
  border: 1px solid rgba(94, 234, 212, 0.22);
  padding: 6px;
}

.email-editor-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: -16px;
  padding: 11px 16px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 900;
}

.email-template-variables {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.support-ticket-table {
  display: grid;
  gap: 8px;
}

.support-ticket-head {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.support-ticket-row summary {
  cursor: pointer;
}

.support-ticket-messages {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.support-ticket-messages > article {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.support-ticket-chat-list {
  padding-top: 2px;
}

.support-ticket-bubble {
  width: min(86%, 760px);
}

.admin-content {
  min-width: 0;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-stat {
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
}

.admin-stat strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--action);
}

.admin-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.admin-stat.privacy-ok {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(74, 222, 128, 0.1);
}

.admin-stat.privacy-warning {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.12);
}

.admin-stat.privacy-warning strong {
  color: #fbbf24;
}

.admin-overview-note {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-control-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.admin-control-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.24);
  color: var(--text-primary);
  text-align: left;
}

.admin-control-shortcut:hover,
.admin-control-shortcut:focus-visible {
  border-color: rgba(94, 234, 212, 0.5);
  background: rgba(94, 234, 212, 0.11);
  color: var(--text-primary);
}

.admin-control-shortcut .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
}

.admin-control-shortcut strong {
  display: block;
  color: var(--text-primary);
}

.admin-control-shortcut span:not(.nav-icon),
.admin-control-shortcut small {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
}

.workspace-context-box {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.06);
}

.workspace-context-box strong {
  color: var(--ink);
}

.workspace-context-box span,
.workspace-context-box small {
  color: var(--muted);
}

.privacy-consent-box.pending {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.1);
}

.privacy-consent-box.accepted {
  border-color: rgba(94, 234, 212, 0.44);
}

.privacy-consent-status {
  font-weight: 800;
  text-transform: uppercase;
}

.workspace-badges,
.saas-plan-list,
.saas-tenant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-badges span,
.saas-plan-pill,
.saas-tenant-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.legal-source-badges {
  margin-top: 8px;
}

.workspace-badges .legal-source-badge,
.legal-source-badge {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.08);
  color: #cffff8;
}

.legal-policy-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.055);
  color: var(--ink);
  font-weight: 800;
}

.legal-policy-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.legal-policy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.legal-policy-panel p {
  margin: 0;
  color: var(--muted);
}

.copyright-report-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.copyright-report-card p {
  margin: 6px 0 0;
  color: var(--ink);
}

.legal-page {
  min-height: 100vh;
  padding: 32px;
  background: var(--bg-main);
  color: var(--ink);
}

.legal-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.legal-header,
.legal-card {
  padding: 22px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.legal-header h1,
.legal-card h2,
.legal-card h3 {
  margin: 0 0 10px;
}

.legal-header p,
.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.55;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-nav a,
.legal-card a {
  color: var(--accent);
}

.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-legal-links a,
.terms-field a {
  color: var(--accent);
}

.auth-legal-links .auth-legal-primary {
  padding: 7px 10px;
  border: 1px solid rgba(79, 209, 197, 0.45);
  border-radius: 8px;
  background: rgba(79, 209, 197, 0.09);
  text-decoration: none;
}

.legal-form {
  display: grid;
  gap: 12px;
}

.legal-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 850;
}

.legal-form input,
.legal-form select,
.legal-form textarea {
  width: 100%;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--ink);
  padding: 12px;
}

.legal-form textarea {
  min-height: 150px;
  resize: vertical;
}

.legal-status {
  min-height: 22px;
  color: var(--accent);
  font-weight: 850;
}

.admin-card {
  border-color: rgba(94, 234, 212, 0.2);
}

.admin-saas-overview {
  display: grid;
  gap: 14px;
}

.saas-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.saas-section h4 {
  margin: 0;
}

.saas-tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.saas-therapist-list {
  display: grid;
  gap: 10px;
}

.saas-tenant-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
}

.saas-tenant-card strong {
  color: var(--ink);
}

.saas-tenant-card span,
.saas-tenant-card small {
  color: var(--muted);
}

.saas-therapist-card {
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  overflow: hidden;
}

.saas-therapist-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.saas-therapist-card summary::-webkit-details-marker {
  display: none;
}

.saas-therapist-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saas-therapist-summary strong {
  color: var(--ink);
}

.saas-therapist-summary span,
.saas-therapist-summary small {
  color: var(--muted);
}

.saas-therapist-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

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

.tenant-override-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tenant-override-option {
  display: grid;
  gap: 6px;
}

.tenant-override-option span {
  color: var(--textSecondary);
  font-size: 0.82rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-form-grid .wide-field {
  grid-column: 1 / -1;
}

.admin-settings {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-settings label {
  display: grid;
  gap: 8px;
}

.admin-settings label:has(input[type="checkbox"]) {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.knowledge-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.knowledge-admin-card,
.knowledge-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.knowledge-card-list,
.knowledge-mini-list,
.admin-knowledge-overview {
  display: grid;
  gap: 12px;
}

.knowledge-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.knowledge-card-head span,
.knowledge-card p,
.knowledge-rule-item span,
.knowledge-rule-item small {
  color: var(--muted);
}

.knowledge-rule-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.knowledge-rule-item.info {
  border-color: rgba(94, 234, 212, 0.22);
}

.knowledge-rule-item.medium {
  border-color: rgba(245, 158, 11, 0.35);
}

.knowledge-rule-item.high {
  border-color: rgba(239, 68, 68, 0.35);
}

.upgrade-hint-card {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.upgrade-hint-card strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.upgrade-hint-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-settings input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.plan-matrix {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.06);
}

.plan-matrix > strong {
  color: var(--action);
}

.plan-matrix-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(3, 56px);
  gap: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-matrix-grid > span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.plan-matrix-grid > span,
.plan-matrix-grid label {
  min-height: 34px;
  padding: 6px 8px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.028);
}

.plan-matrix-grid > :nth-child(4n) {
  border-right: 0;
}

.plan-matrix-grid > :nth-child(-n + 4) {
  min-height: 30px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--action);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.plan-matrix-grid > :nth-child(8n + 5),
.plan-matrix-grid > :nth-child(8n + 6),
.plan-matrix-grid > :nth-child(8n + 7),
.plan-matrix-grid > :nth-child(8n + 8) {
  background: rgba(255, 255, 255, 0.04);
}

.plan-matrix-grid > :nth-child(8n + 9),
.plan-matrix-grid > :nth-child(8n + 10),
.plan-matrix-grid > :nth-child(8n + 11),
.plan-matrix-grid > :nth-child(8n + 12) {
  background: rgba(94, 234, 212, 0.045);
}

.plan-matrix-grid label {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.plan-matrix-grid label:hover,
.plan-matrix-grid > span:hover {
  background: rgba(94, 234, 212, 0.09);
}

.admin-list {
  display: grid;
  gap: 10px;
}

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

.admin-user-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.admin-user-column h4 {
  margin: 0;
  color: var(--text);
}

.admin-user-search {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-search input {
  min-height: 38px;
  font-size: 0.92rem;
  text-transform: none;
}

.admin-create-user-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-create-user-panel h4,
.admin-create-user-panel p {
  margin: 0;
}

.admin-create-user-panel p {
  color: var(--textSecondary);
}

.admin-search-note {
  margin: 0 0 10px;
  color: var(--action);
  font-weight: 800;
}

.admin-user-card {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.admin-user-card[open] {
  border-color: rgba(94, 234, 212, 0.42);
}

.admin-user-card.summary-deleted,
.admin-user-card.summary-suspended {
  border-color: rgba(239, 68, 68, 0.35);
}

.admin-user-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
}

.admin-user-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-summary strong,
.admin-user-summary span,
.admin-user-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-summary span,
.admin-user-summary small {
  color: var(--muted);
}

.admin-user-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  color: var(--aqua);
  background: rgba(94, 234, 212, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-status-pill.suspended,
.account-status-pill.deleted {
  border-color: rgba(239, 68, 68, 0.32);
  color: #fecaca;
  background: var(--danger-soft);
}

.admin-list-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-list-item span,
.admin-list-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-item-actions a,
.admin-item-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.error-report {
  border-color: rgba(239, 68, 68, 0.32);
}

.layer-search {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.layer-search label {
  margin: 0;
}

.free-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #8cc8b1;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.track-box {
  display: grid;
  gap: 7px;
  grid-column: 2;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.compact-button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.diary-board,
.profile-board {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.diary-list {
  display: grid;
  gap: 12px;
}

.empty-diary {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 850;
}

.sound-select.is-disabled,
.player-panel button:disabled,
.service-item button:disabled {
  opacity: 0.6;
}

.diary-state {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--navy);
  border-radius: 8px;
  background: var(--bg-panel);
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.diary-state header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.diary-state h3 {
  margin-bottom: 0;
}

.diary-state-return {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  text-align: left;
}

.diary-state-return:hover {
  color: var(--action-dark);
  text-decoration: underline;
}

.diary-state header > span {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
}

.diary-entry-list {
  display: grid;
  gap: 8px;
}

.diary-duration-summary,
.manual-diary-box {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.4;
}

.diary-duration-summary.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
  color: #86efac;
}

.diary-duration-summary.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: var(--danger-soft);
  color: #fca5a5;
}

.diary-duration-summary.warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: var(--gold-soft);
  color: #fbbf24;
}

.manual-diary-box {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.manual-diary-box > strong {
  color: #fbbf24;
}

.diary-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.diary-entry.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--success-soft);
}

.diary-entry.warning,
.diary-entry.unknown {
  border-color: #e3bd5b;
  background: var(--gold-soft);
}

.diary-entry.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: var(--danger-soft);
}

.diary-entry-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.diary-entry-main strong,
.diary-entry-main span,
.diary-entry-main small,
.diary-entry-main em {
  overflow-wrap: anywhere;
}

.diary-entry-main span,
.diary-entry-main small,
.diary-entry-main em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.diary-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.diary-entry-actions a,
.diary-entry-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f151d;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.4fr);
  gap: 14px;
  align-items: start;
}

.profile-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.profile-side-nav {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-nav-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

.profile-nav-button.active {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.14);
  color: var(--action);
}

.account-status {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 0.86rem;
  font-weight: 850;
}

.account-status.verified {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.profile-content {
  min-width: 0;
}

.profile-content-wide {
  display: grid;
  gap: 16px;
}

.profile-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-card.facilitator-view {
  display: none;
}

.profile-card.facilitator-view.active {
  display: grid;
}

.profile-card.client-view {
  display: none;
}

.profile-card.client-view.active {
  display: grid;
}

.profile-card.profile-section,
.profile-card.admin-section {
  display: none;
}

.profile-card.profile-section.active,
.profile-card.admin-section.active {
  display: grid;
}

.service-card,
.history-card {
  grid-row: span 2;
}

.service-list,
.history-list {
  display: grid;
  gap: 10px;
}

.history-section-title {
  margin-top: 6px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.service-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(26, 35, 48, 0.95), rgba(18, 24, 33, 0.98));
}

.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.13);
  color: var(--action);
  font-size: 1.3rem;
}

.service-item strong,
.service-item span,
.service-item button {
  display: block;
}

.service-item span {
  margin: 4px 0;
  color: var(--action);
  font-weight: 950;
}

.service-item p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.42;
}

.service-item button {
  width: fit-content;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.16);
  color: var(--bg-page);
  color: var(--action);
  font-size: 0.84rem;
  font-weight: 850;
}

.admin-review-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.admin-marker-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(180px, 1fr) minmax(220px, 0.7fr);
  gap: 8px;
}

.marker-edit-context {
  grid-column: 1 / -1;
  width: fit-content;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(245, 158, 11, 0.44);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.marker-edit-context[hidden] {
  display: none !important;
}

.admin-marker-form select[data-marker-color] {
  min-width: 220px;
  padding-right: 34px;
  border-color: rgba(245, 158, 11, 0.34);
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 21, 29, 0.98)),
    #0f151d;
  color: var(--text-primary);
  font-weight: 850;
}

.admin-marker-form .marker-note-input,
.admin-marker-form button {
  grid-column: 1 / -1;
}

.review-admin-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.review-admin-summary {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) auto auto 20px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.review-admin-summary::-webkit-details-marker {
  display: none;
}

.review-admin-summary::after {
  content: "+";
  color: var(--action);
  font-weight: 950;
}

.review-admin-card[open] .review-admin-summary::after {
  content: "-";
}

.review-admin-header,
.review-status-row,
.review-admin-actions,
.review-audio-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.review-status-row label {
  min-width: 180px;
  flex: 1;
}

.review-audio-workspace {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.review-landscape-hint {
  display: none;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(79, 209, 197, 0.28);
  border-radius: 8px;
  background: rgba(79, 209, 197, 0.1);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.review-audio {
  width: 100%;
}

.native-review-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
}

.review-audio-hint,
.review-audio-error {
  display: block;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
}

.review-audio-error {
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.42);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(239, 68, 68, 0.12);
}

.review-create-status {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid rgba(79, 209, 197, 0.26);
  border-radius: 8px;
  background: rgba(79, 209, 197, 0.1);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.review-create-status.error {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: wait;
  opacity: 0.88;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: buttonSpinner 720ms linear infinite;
}

@keyframes buttonSpinner {
  to {
    transform: rotate(360deg);
  }
}

.expanding-textarea {
  min-height: 190px;
  overflow: hidden;
}

.marker-note-input {
  min-height: 120px;
}

.admin-marker-inspector {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.06);
}

.admin-marker-detail-list {
  display: grid;
  gap: 8px;
}

.admin-marker-detail {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 10px;
  text-align: left;
  border-left-width: 4px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-marker-detail.green {
  border-left-color: var(--success);
}

.admin-marker-detail.orange {
  border-left-color: var(--coral);
}

.admin-marker-detail.red {
  border-left-color: var(--danger);
}

.admin-marker-detail small {
  color: var(--muted);
  line-height: 1.35;
}

.admin-marker-detail.selected {
  border-color: var(--action);
  box-shadow: inset 4px 0 0 var(--action);
}

.marker-edit-menu {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.marker-edit-menu strong {
  padding: 2px 4px;
  color: var(--text-primary);
  font-size: 0.74rem;
  letter-spacing: 0;
}

.marker-edit-menu button {
  min-height: 34px;
  padding: 7px 10px;
  background: rgba(94, 234, 212, 0.14);
  color: var(--action);
}

.marker-edit-menu .danger-button {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.timeline-marker.marker-editing {
  outline: 3px solid rgba(94, 234, 212, 0.65);
  cursor: grabbing;
}

.clarification-admin-box,
.clarification-marker-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.clarification-admin-box article {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.clarification-admin-box p {
  margin: 6px 0 0;
}

.clarification-answer {
  padding: 8px;
  border-left: 4px solid var(--success);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
}

.clarification-answer-input {
  min-height: 90px;
}

.clarification-marker-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.help-board {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 8px;
  background: var(--bg-workspace);
  box-shadow: var(--shadow);
}

.review-modal-card {
  width: min(1180px, 100%);
}

.app-confirm-overlay {
  z-index: 150;
}

.app-confirm-card {
  width: min(560px, 100%);
  border-color: rgba(245, 158, 11, 0.42);
  background:
    linear-gradient(135deg, rgba(23, 62, 85, 0.96), rgba(18, 24, 33, 0.98));
}

.app-confirm-card p {
  color: var(--text-soft);
}

.app-confirm-actions {
  align-items: center;
  justify-content: flex-end;
  padding-top: 4px;
}

.app-confirm-actions button {
  min-width: 150px;
}

.plan-modal-card {
  width: min(1080px, 100%);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}

.review-request-list,
.review-timeline,
.review-marker-list {
  display: grid;
  gap: 10px;
}

.review-waveform-player {
  display: grid;
  grid-template-columns: auto minmax(70px, auto) auto minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(79, 209, 197, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 52, 71, 0.72), rgba(8, 18, 26, 0.5)),
    rgba(8, 18, 26, 0.48);
}

.review-waveform-play {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(79, 209, 197, 0.62);
  background: rgba(79, 209, 197, 0.14);
  color: var(--text-primary);
}

.review-waveform-marker-button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text-primary);
}

.review-waveform-marker-button:hover,
.review-waveform-marker-button:focus-visible {
  background: rgba(245, 158, 11, 0.22);
  color: var(--text-primary);
}

.review-waveform-play.is-playing {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(245, 158, 11, 0.16);
}

.review-waveform-play-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  margin-right: 6px;
  color: var(--accent);
}

.review-waveform-clock {
  min-width: 74px;
  padding: 7px 10px;
  border: 1px solid rgba(79, 209, 197, 0.38);
  border-radius: 8px;
  background: rgba(8, 18, 26, 0.7);
  color: var(--text-primary);
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.review-waveform-duration {
  justify-self: end;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.review-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.review-status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--action);
  font-size: 0.82rem;
  font-weight: 950;
}

.timeline-rail {
  position: relative;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.16), rgba(124, 58, 237, 0.16), rgba(245, 158, 11, 0.16));
}

.waveform-rail {
  display: flex;
  align-items: center;
  min-height: 142px;
  padding: 12px;
  overflow: visible;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}

.waveform-rail.is-dragging {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}

.waveform-rail.is-marker-target {
  border-color: rgba(79, 209, 197, 0.82);
  box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.2);
}

.waveform-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 70px;
  pointer-events: none;
}

.waveform-bars span {
  flex: 1;
  min-width: 2px;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.45);
}

.timeline-cursor {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e6edf3;
  box-shadow: 0 0 0 3px rgba(230, 237, 243, 0.16);
  pointer-events: none;
}

.timeline-marker {
  position: absolute;
  top: calc(12px + (var(--marker-lane, 0) * 13px));
  width: 9px;
  height: 48px;
  border: 2px solid var(--bg-page);
  border-radius: 8px;
  background: var(--coral);
  transform: translateX(-50%);
  cursor: pointer;
  transition: top 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.timeline-marker::before {
  content: "";
  position: absolute;
  inset: -8px -9px;
}

.timeline-marker.green {
  background: var(--success);
}

.timeline-marker.orange {
  background: var(--coral);
}

.timeline-marker.red {
  background: var(--danger);
}

.timeline-marker-number {
  position: absolute;
  top: -9px;
  left: 50%;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(230, 237, 243, 0.56);
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.admin-marker-form.marker-form-editing {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: inset 4px 0 0 rgba(245, 158, 11, 0.62);
}

.timeline-marker span {
  position: absolute;
  top: -32px;
  left: 50%;
  max-width: 118px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.92);
  color: var(--ink);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 4;
}

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

.history-card .lead {
  margin-bottom: 14px;
}

.history-groups,
.plan-groups {
  display: grid;
  gap: 12px;
}

.history-group,
.plan-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-left-width: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.plan-group.plan-phase-1 {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.055);
}

.plan-group.plan-phase-2 {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(125, 211, 252, 0.055);
}

.plan-group.plan-phase-3 {
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(167, 139, 250, 0.055);
}

.plan-group.plan-phase-4 {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(250, 204, 21, 0.052);
}

.plan-group.plan-phase-5 {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(45, 212, 191, 0.052);
}

.plan-group.plan-phase-6 {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.045);
}

.history-group-header,
.plan-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.history-group-meta,
.plan-group-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-group-list,
.plan-step-list {
  display: grid;
  gap: 8px;
}

.danger-button {
  border-color: rgba(239, 68, 68, 0.5);
  background: var(--danger-soft);
  color: #fecaca;
}

.danger-zone {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.09);
}

.danger-zone strong {
  color: #fecaca;
}

.danger-zone span {
  color: var(--muted);
}

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

@media (max-width: 900px) {
  .admin-user-columns,
  .admin-user-controls {
    grid-template-columns: 1fr;
  }
}

.timeline-marker:hover span,
.timeline-marker:focus span,
.timeline-marker.selected span {
  opacity: 1;
}

.timeline-marker:hover,
.timeline-marker:focus,
.timeline-marker.selected {
  transform: translateX(-50%) scale(1.08);
  z-index: 80 !important;
}

.marker-cluster-menu {
  position: fixed;
  z-index: 180;
  display: grid;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.42);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.marker-cluster-menu strong {
  color: var(--text-primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.marker-cluster-menu div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.marker-cluster-menu button {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid rgba(94, 234, 212, 0.48);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--text-primary);
  font-weight: 900;
}

.marker-cluster-menu button:hover,
.marker-cluster-menu button:focus-visible {
  background: var(--accent);
  color: var(--bg-page);
  outline: none;
}

.review-marker-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.marker-text.selected {
  border-color: var(--success);
  box-shadow: inset 4px 0 0 var(--success);
}

.marker-text.green {
  border-left: 4px solid var(--success);
}

.marker-text.orange {
  border-left: 4px solid var(--coral);
}

.marker-text.red {
  border-left: 4px solid var(--danger);
}

.completed-review-button {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.completed-review-button:disabled {
  border-color: rgba(139, 148, 158, 0.35);
  background: rgba(139, 148, 158, 0.12);
  color: var(--muted);
  cursor: not-allowed;
}

.review-card button:disabled {
  border-color: rgba(139, 148, 158, 0.35);
  background: rgba(139, 148, 158, 0.12);
  color: var(--muted);
  cursor: not-allowed;
}

.history-journey-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  content-visibility: auto;
  contain-intrinsic-size: 240px;
}

.history-journey-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.history-journey-block summary::-webkit-details-marker {
  display: none;
}

.history-journey-block summary::after {
  content: "+";
  color: var(--action);
  font-weight: 950;
}

.history-journey-block[open] summary::after {
  content: "-";
}

.history-journey-block summary span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.history-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-item-link {
  justify-self: end;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  color: #f8ffff;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.history-item-link:hover,
.history-item-link:focus-visible,
a.history-item-link.free-source:hover,
a.history-item-link.mixed-source:hover,
a.history-item-link.commercial-source:hover {
  border-color: rgba(94, 234, 212, 0.62) !important;
  background: var(--accent) !important;
  color: var(--bg-page);
  box-shadow: 0 8px 18px rgba(94, 234, 212, 0.14);
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
  min-height: 44px;
  border-radius: 8px;
}

#licenseNoticeModal .modal-card {
  border-color: rgba(94, 234, 212, 0.42);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

#licenseNoticeProceed.primary-button {
  background: var(--accent);
  color: var(--bg-page);
}

.plan-overview {
  display: grid;
  gap: 12px;
}

.plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.plan-summary-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.plan-step {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.plan-step small,
.plan-step span,
.plan-step em {
  color: var(--muted);
}

.plan-step.main {
  border-color: rgba(94, 234, 212, 0.48);
  background: rgba(94, 234, 212, 0.08);
}

.plan-step.ambient {
  border-color: rgba(167, 139, 250, 0.46);
  background: rgba(167, 139, 250, 0.08);
}

.plan-step.bridge {
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(245, 158, 11, 0.08);
}

.journey-history {
  border-color: rgba(94, 234, 212, 0.28);
  background: var(--navy-soft);
}

.notice-toast {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  max-width: min(460px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--success);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: 0 18px 44px rgba(21, 23, 24, 0.22);
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
  cursor: pointer;
}

.notice-toast.success {
  border-left-color: var(--success);
}

.notice-toast.error {
  border-left-color: var(--danger);
}

.notice-toast.active {
  display: block;
}

.notice-toast.important {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  max-width: none;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: rgba(15, 28, 35, 0.42);
  box-shadow: none;
  cursor: default;
}

.notice-dialog {
  width: min(460px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--danger);
  border-radius: 8px;
  background: var(--bg-workspace);
  box-shadow: 0 18px 44px rgba(21, 23, 24, 0.22);
}

.notice-toast.important.success .notice-dialog {
  border-left-color: var(--success);
}

.notice-toast.important.success .notice-dialog strong {
  color: #bbf7d0;
}

.notice-toast.important.success .notice-dialog button {
  border-color: var(--accent);
  background: var(--accent);
  color: #061826;
}

.notice-dialog strong {
  display: block;
  margin-bottom: 8px;
  color: #fca5a5;
  font-size: 1.06rem;
}

.notice-dialog p {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.notice-dialog button {
  width: 100%;
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.track-box span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.track-box small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.evaluation {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #e4f3ed;
  line-height: 1.55;
}

.evaluation.active {
  display: block;
}

.mix-plan {
  display: grid;
  gap: 10px;
}

.mix-segment {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left-width: 8px;
  border-radius: 8px;
  background: var(--bg-panel);
}

.mix-segment.main {
  border-left-color: var(--navy);
}

.mix-segment.ambient {
  border-left-color: var(--success);
}

.mix-segment.bridge {
  border-left-color: var(--coral);
}

.mix-time {
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 8px;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 950;
  text-align: center;
}

.mix-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.library-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 16px;
  align-items: start;
}

.library-list {
  position: sticky;
  top: 84px;
  padding: 16px;
  border: 1px solid rgba(94, 234, 212, 0.14);
}

.state-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.state-button {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  text-align: left;
}

.state-button.active {
  border-color: rgba(94, 234, 212, 0.4);
  background: var(--navy-soft);
  box-shadow: inset 4px 0 0 rgba(94, 234, 212, 0.95);
}

.state-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--action);
  color: var(--page);
  font-weight: 950;
}

.state-name {
  display: block;
  font-weight: 950;
}

.state-emotion {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-energy,
.score-pill {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.recipe-card,
.search-panel {
  padding: 16px;
}

.recipe-card {
  margin-bottom: 14px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.highlight-card {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--navy-soft);
}

.accordion-stack .accordion {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(12, 24, 34, 0.9);
  overflow: hidden;
}

.accordion-stack .accordion[open] {
  box-shadow: inset 4px 0 0 rgba(94, 234, 212, 0.95);
  border-color: rgba(94, 234, 212, 0.34);
}

.accordion-stack .accordion summary {
  color: var(--ink);
}

.accordion-stack .accordion-body {
  background: rgba(8, 20, 30, 0.92);
  color: #d7e8f0;
}

.accordion-stack .accordion.warning summary {
  background: rgba(12, 24, 34, 0.9);
  color: var(--ink);
}

.accordion-stack .accordion.warning .accordion-body {
  background: rgba(8, 20, 30, 0.92);
  color: #d7e8f0;
}

.search-panel {
  border: 1px solid rgba(94, 234, 212, 0.18);
  background: rgba(7, 22, 32, 0.92);
}

.search-panel .eyebrow,
.search-panel h3 {
  color: var(--ink);
}

.phrase-grid .phrase {
  border: 1px solid rgba(94, 234, 212, 0.18);
  background: rgba(10, 24, 36, 0.92);
  color: #dcecf2;
}

.wave-group-card {
  margin-bottom: 14px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  background: rgba(9, 22, 31, 0.9);
  overflow: hidden;
}

.wave-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  color: var(--ink);
}

.wave-group-summary::-webkit-details-marker {
  display: none;
}

.wave-group-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.wave-group-body {
  display: grid;
  gap: 12px;
  padding: 0 10px 10px;
}

.wave-group-card.wave-aqua {
  border-color: rgba(94, 234, 212, 0.32);
  box-shadow: inset 4px 0 0 rgba(94, 234, 212, 0.95);
}

.wave-group-card.wave-cyan {
  border-color: rgba(103, 232, 249, 0.32);
  box-shadow: inset 4px 0 0 rgba(103, 232, 249, 0.95);
}

.wave-group-card.wave-emerald {
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: inset 4px 0 0 rgba(52, 211, 153, 0.95);
}

.wave-group-card.wave-sky {
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: inset 4px 0 0 rgba(56, 189, 248, 0.95);
}

.wave-group-card.wave-teal {
  border-color: rgba(45, 212, 191, 0.32);
  box-shadow: inset 4px 0 0 rgba(45, 212, 191, 0.95);
}

.wave-group-card.wave-mint {
  border-color: rgba(110, 231, 183, 0.32);
  box-shadow: inset 4px 0 0 rgba(110, 231, 183, 0.95);
}

.search-panel p,
.phrase-grid .phrase strong,
.phrase-grid .phrase span,
.phrase-grid .phrase small {
  color: #dcecf2;
}

.highlight-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.highlight-card strong {
  color: var(--navy);
  line-height: 1.25;
}

.accordion-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: 0 8px 18px rgba(21, 23, 24, 0.05);
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.accordion.warning {
  border-color: #efc2b7;
}

.accordion summary {
  min-height: 48px;
  padding: 13px 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  float: right;
  color: var(--action);
  font-weight: 950;
}

.accordion[open] summary::after {
  content: "-";
}

.accordion-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.accordion-body p {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #cfd8e3;
  line-height: 1.45;
}

.accordion.warning .accordion-body p {
  background: var(--coral-soft);
  color: #7f2d1d;
}

.lead {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.meta-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-value {
  font-weight: 850;
  line-height: 1.35;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.42;
}

.warning-list li {
  background: var(--danger-soft);
  color: var(--high-ink);
}

.search-panel .section-heading {
  margin-bottom: 12px;
}

.phrase-grid {
  margin-bottom: 12px;
}

.phrase {
  background: var(--low);
  color: var(--low-ink);
}

.phrase.music-query {
  background: #ffe9e2;
  color: var(--high-ink);
}

.phrase.sound-query {
  background: var(--low);
  color: var(--low-ink);
}

.source-link {
  background: var(--mid);
  color: var(--mid-ink);
}

.training-layer-builder {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.training-layer-card {
  border: 1px solid rgba(102, 239, 224, 0.28);
  border-radius: 8px;
  background: rgba(6, 24, 38, 0.38);
  padding: 14px;
}

.training-layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.compact-form-grid {
  gap: 10px;
}

@media (max-width: 980px) {
  body.facilitator-shell .app-shell {
    padding-left: 0;
  }

  body.client-shell .app-shell {
    padding-left: 0;
  }

  body.facilitator-sidebar-collapsed.facilitator-shell .app-shell,
  body.facilitator-sidebar-collapsed.client-shell .app-shell {
    padding-left: 0;
  }

  .satellite-audition-panel {
    left: 18px;
    right: 18px;
    top: max(26px, env(safe-area-inset-top));
    width: auto;
    max-width: none;
  }

  .audition-panel.split-left,
  .satellite-audition-panel.split-right {
    left: 18px;
    right: 18px;
    width: auto;
    max-width: none;
  }

  .facilitator-sidebar {
    left: 0;
    width: min(88vw, 320px);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.facilitator-sidebar-collapsed .facilitator-sidebar {
    width: min(88vw, 320px);
    padding: 18px 14px 16px;
  }

  body.facilitator-sidebar-collapsed .sidebar-brand-copy,
  body.facilitator-sidebar-collapsed .nav-label {
    display: grid;
  }

  body.facilitator-sidebar-collapsed .sidebar-group summary::after {
    display: inline;
  }

  .facilitator-sidebar.open {
    transform: translateX(0);
  }

  body.facilitator-shell .top-workbar::before,
  body.facilitator-shell .top-workbar::after,
  body.client-shell .top-workbar::before,
  body.client-shell .top-workbar::after {
    display: none;
  }

  body.facilitator-shell .top-workbar,
  body.client-shell .top-workbar {
    top: 0;
    grid-template-columns: auto minmax(220px, max-content) minmax(260px, 1fr);
    grid-template-rows: auto;
    align-items: center;
    margin: 0;
    padding: 12px 16px 10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.facilitator-shell .mobile-menu-toggle,
  body.client-shell .mobile-menu-toggle {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 44px;
    background: var(--bg-card);
    color: var(--action);
  }

  body.facilitator-shell .top-therapist-identity,
  body.client-shell .top-therapist-identity {
    grid-column: 2;
    grid-row: 1;
    max-width: min(440px, 48vw);
  }

  body.facilitator-shell .active-journey-bar,
  body.client-shell .active-journey-bar {
    grid-column: 3 / -1;
    grid-row: 1;
    align-self: center;
  }

  body.facilitator-shell .workspace-quick-nav,
  body.client-shell .workspace-quick-nav {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
  }

  body.facilitator-shell .mode-panel.active,
  body.client-shell .mode-panel.active {
    margin: 0;
    padding: 14px 16px 24px;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .facilitator-sidebar-toggle {
    display: inline-flex;
    justify-content: center;
    background: rgba(94, 234, 212, 0.14);
    color: var(--action);
  }

  .sidebar-brand {
    min-height: 76px;
    padding: 10px 12px;
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .sidebar-brand-media {
    width: 52px;
    height: 52px;
  }

  .wizard-grid,
  .register-grid,
  .library-layout,
  .timeline-item,
  .layer-search,
  .mix-segment,
  .source-groups,
  .profile-grid,
  .diary-entry,
  .service-item {
    grid-template-columns: 1fr;
  }

  .facilitator-grid,
  .facilitator-split,
  .facilitator-detail-columns,
  .client-record-columns,
  .client-record-summary,
  .playlist-access-form,
  .brand-preview-row,
  .profile-media-grid,
  .followup-form-grid,
  .therapist-review-create-grid,
  .followup-assignment-summary,
  .session-rating-body {
    grid-template-columns: 1fr;
  }

  .followup-assignment-summary {
    display: grid;
  }

  .review-media-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-media-actions .button-row {
    width: 100%;
  }

  .review-media-actions .button-row button {
    flex: 1 1 auto;
  }

  .followup-assignment-meta {
    justify-items: start;
  }

  .wide-field {
    grid-column: auto;
  }

  .track-box {
    grid-column: auto;
  }

  .library-list {
    position: static;
  }

  .state-list {
    max-height: none;
  }
}

@media (max-width: 680px) {
  body.auth-locked {
    overflow-x: hidden;
  }

  .auth-gate {
    align-items: start;
    justify-items: center;
    width: 100%;
    padding: 16px 12px;
    box-sizing: border-box;
  }

  .auth-card {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 20px 16px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .auth-card *,
  .password-field,
  .password-field input {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .auth-card h1 {
    font-size: clamp(1.75rem, 9vw, 2.2rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .auth-card > .lead {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .auth-legal-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.78rem;
  }

  .auth-legal-links .auth-legal-primary {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .hero {
    min-height: 260px;
  }

  .mode-tabs,
  .mode-panel,
  .top-workbar,
  .hero-overlay {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.facilitator-shell .top-workbar,
  body.facilitator-shell .mode-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.facilitator-shell .section-heading h2,
  body.client-shell .section-heading h2 {
    font-size: clamp(1.55rem, 7.5vw, 1.95rem);
    line-height: 1.04;
  }

  body.facilitator-shell .section-heading .lead,
  body.client-shell .section-heading .lead {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  body.facilitator-shell .profile-card,
  body.client-shell .profile-card,
  body.facilitator-shell .history-entry,
  body.client-shell .history-entry,
  body.facilitator-shell .workspace-context-box,
  body.client-shell .workspace-context-box {
    border-radius: 8px;
  }

  .workspace-summary-card {
    min-height: 132px;
    padding: 16px;
  }

  .workspace-summary-card strong {
    font-size: 2.15rem;
  }

  .workspace-summary-card small {
    line-height: 1.35;
  }

  body.admin-route .admin-board {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 14px;
    overflow: hidden;
  }

  body.admin-route #adminMode {
    padding: 12px;
  }

  body.admin-route .admin-workspace {
    gap: 12px;
  }

  body.admin-route .admin-login {
    width: min(100%, calc(100vw - 52px));
    max-width: 100%;
  }

  body.admin-route #adminTitle {
    font-size: clamp(2rem, 12vw, 2.45rem);
    line-height: 0.98;
  }

  body.admin-route .section-heading {
    gap: 8px;
    margin-bottom: 12px;
  }

  body.admin-route .section-heading .lead {
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .workspace-guide-summary {
    flex-direction: row;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(94, 234, 212, 0.26);
    border-radius: 8px;
    background: rgba(94, 234, 212, 0.08);
  }

  .workspace-guide-summary span {
    display: none;
  }

  .workspace-guide-summary strong {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  body.facilitator-shell .top-workbar,
  body.client-shell .top-workbar,
  .top-workbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  body.facilitator-shell:not(.playlist-editing) .top-workbar {
    grid-template-rows: auto auto;
  }

  body.facilitator-shell .mobile-menu-toggle,
  body.client-shell .mobile-menu-toggle,
  .mobile-menu-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  body.facilitator-shell:not(.playlist-editing) .mobile-menu-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  body.facilitator-shell .top-therapist-identity,
  body.client-shell .top-therapist-identity,
  .top-therapist-identity {
    display: none !important;
  }

  body.facilitator-shell .workspace-quick-nav,
  body.client-shell .workspace-quick-nav,
  .workspace-quick-nav {
    grid-column: 1 / -1;
    grid-row: 5;
    order: 5;
    justify-content: flex-start;
  }

  .workspace-quick-nav button {
    width: 100%;
  }

  .impersonation-topbar {
    grid-column: 1 / -1;
    grid-row: 4;
    order: 4;
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 44px;
    background: rgba(94, 234, 212, 0.16);
    color: var(--action);
    width: 100%;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-bar {
    grid-column: 2 / -1;
    grid-row: 1;
    order: 0;
    align-self: stretch;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-copy,
  body.facilitator-shell:not(.playlist-editing) .workspace-priority-pill {
    display: none !important;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    height: 100%;
    gap: 8px;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-tools .sync-status-wrap {
    width: 100%;
    min-width: 0;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-tools [data-open-notifications],
  body.facilitator-shell:not(.playlist-editing) .active-journey-tools [data-open-sync-status] {
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
    justify-content: center;
  }

  body.facilitator-shell:not(.playlist-editing) .active-journey-tools .sync-status-popover,
  body.facilitator-shell:not(.playlist-editing) .active-journey-tools .notifications-popover {
    left: auto;
    right: 0;
  }

  .mobile-playlist-menu:not([hidden]) {
    display: block;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: stretch;
    min-width: 0;
    position: relative;
    z-index: 80;
    width: 100%;
  }

  .mobile-playlist-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(94, 234, 212, 0.38);
    border-radius: 8px;
    background: rgba(94, 234, 212, 0.16);
    color: var(--action);
    font-weight: 950;
    cursor: pointer;
    width: 100%;
  }

  .mobile-playlist-menu-body {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 42;
    display: grid;
    width: min(268px, calc(100vw - 36px));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 8px;
    background: #121821;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  }

  .mobile-playlist-menu-body button,
  .mobile-playlist-menu-body select {
    width: 100%;
  }

  .mobile-playlist-menu-body .secondary-button,
  .mobile-playlist-menu-body .autosave-pill,
  .mobile-playlist-menu-body select {
    border-color: rgba(94, 234, 212, 0.34);
    background: #0f151d;
    color: var(--text-primary);
  }

  .mobile-playlist-status {
    display: grid;
    gap: 5px;
  }

  .mobile-playlist-status span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .active-journey-bar strong {
    font-size: 0.82rem;
  }

  body.facilitator-shell .active-journey-bar,
  body.client-shell .active-journey-bar,
  .active-journey-bar {
    grid-template-columns: 1fr;
    order: 3;
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .active-journey-tools {
    justify-content: flex-start;
  }

  body.playlist-editing .active-journey-bar {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    order: 0;
  }

  body.playlist-editing .active-journey-copy {
    display: none;
  }

  body.playlist-editing .active-journey-tools {
    height: 100%;
  }

  body.playlist-editing .active-journey-tools .sync-status-wrap:first-of-type {
    width: 100%;
    height: 100%;
  }

  body.playlist-editing .active-journey-tools [data-open-notifications] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
    border: 1px solid rgba(94, 234, 212, 0.38);
    border-radius: 8px;
    background: rgba(94, 234, 212, 0.16);
    color: var(--action);
    box-shadow: none;
  }

  .workspace-priority-pill {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    max-width: 100%;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
  }

  .workspace-priority-pill strong,
  .workspace-priority-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notifications-popover,
  .sync-status-popover {
    left: 0;
    right: auto;
    width: min(300px, calc(100vw - 40px));
    max-height: min(340px, calc(100dvh - 180px));
    overflow: hidden;
    background: var(--bg-panel);
    isolation: isolate;
  }

  .notification-popover-list {
    display: grid;
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 2px;
    isolation: isolate;
  }

  .notification-popover-item {
    position: relative;
    display: grid;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    text-align: left;
    background: var(--bg-card);
    opacity: 1;
  }

  .notification-popover-item strong,
  .notification-popover-item small {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .mode-tabs {
    display: none;
    overflow-x: visible;
    border-bottom: 1px solid rgba(94, 234, 212, 0.16);
  }

  .mode-tabs.open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-language-switcher {
    display: none !important;
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .audition-panel {
    right: 10px;
    top: max(10px, env(safe-area-inset-top));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: none;
    padding-bottom: 20px;
    overflow-x: hidden;
  }

  .audition-sticky {
    position: static;
    top: auto;
    margin: -12px -12px 10px;
    padding: 8px 12px 7px;
  }

  .load-more-button {
    margin-bottom: 28px;
  }

  .mobile-quick-nav {
    display: none !important;
  }

  .mode-tabs,
  .section-heading,
  .audition-header,
  .diary-state header,
  .state-header {
    align-items: stretch;
    flex-direction: column;
  }

  .audition-panel {
    right: 10px;
    top: max(10px, env(safe-area-inset-top));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: none;
    padding: 12px;
    padding-bottom: 20px;
    overflow-x: hidden;
  }

  .workspace-guide-grid {
    grid-template-columns: 1fr;
  }

  .audition-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    position: sticky;
    bottom: 76px;
    z-index: 9;
    padding: 8px;
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.24);
  }

  .audition-actions a,
  .audition-actions button,
  .audition-actions .external-search-picker,
  .audition-actions .external-search-picker label,
  .diary-entry-actions a,
  .diary-entry-actions button {
    width: 100%;
  }

  .audition-actions .external-search-picker {
    max-width: none;
  }

  .audition-actions .audition-close {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: 18px;
    z-index: 12;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .primary-button {
    width: 100%;
  }

  .state-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-summary-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-item-summary {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .player-strip {
    grid-template-columns: 1fr;
  }

  .state-title-chip,
  .player-strip .preview-trigger {
    width: 100%;
  }

  .time-block {
    min-height: 46px;
    padding: 6px;
    font-size: 0.72rem;
  }

  .timeline-title {
    font-size: 0.92rem;
  }

  .timeline-kicker {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .timeline-content {
    padding: 0 10px 10px 10px;
  }

  .timeline-action-bar {
    grid-template-columns: 1fr;
  }

  #creatorMode.journey-created .journey-output {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #creatorMode.journey-created .journey-output > .section-heading,
  #creatorMode.journey-created .journey-output .journey-progress {
    display: none;
  }

  .timeline-phase-group,
  .timeline-item,
  .timeline-content,
  .timeline-action-bar,
  .timeline-action-copy,
  .timeline-action-buttons,
  .player-strip,
  .state-title-row,
  .timeline-summary-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .timeline-content *,
  .timeline-action-bar *,
  .player-strip * {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .timeline-action-buttons,
  .state-title-row,
  .timeline-summary-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .timeline-status-badge,
  .diary-shortcut-button,
  .used-before-note {
    width: 100%;
  }

  .timeline-action-buttons .primary-button {
    width: 100%;
  }

  .state-brief-row {
    grid-template-columns: 28px 1fr;
  }

  .state-brief-row em {
    grid-column: 2;
  }

  .meta-grid,
  .detail-grid,
  .highlight-grid,
  .profile-shell,
  .admin-workspace,
  .admin-stat-grid,
  .admin-marker-form,
  .admin-form-grid,
  .preview-card {
    grid-template-columns: 1fr;
  }

  .preview-grid,
  .preview-card,
  .preview-body,
  .preview-topline,
  .preview-meta-row,
  .preview-source-button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .preview-card {
    overflow: hidden;
    padding: 8px;
  }

  .preview-cover {
    max-width: 100%;
  }

  .preview-panel-toolbar {
    position: sticky;
    bottom: 0;
    z-index: 8;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 8px;
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.28);
  }

  .preview-mobile-tools {
    width: 100%;
  }

  .preview-mobile-tools summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(94, 234, 212, 0.26);
    border-radius: 8px;
    background: rgba(94, 234, 212, 0.12);
    color: var(--action);
    font-weight: 950;
    cursor: pointer;
  }

  .preview-mobile-tools summary::after {
    content: "+";
    font-weight: 950;
  }

  .preview-mobile-tools[open] summary::after {
    content: "-";
  }

  .preview-filter-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    overflow: hidden;
  }

  .preview-format-filter,
  .preview-access-filter,
  .satellite-filter-row,
  .preview-duration-filter,
  .preview-search-submit {
    width: 100%;
  }

  .preview-mixer-bar.compact-mixer {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .preview-mixer-bar.compact-mixer > div {
    display: none;
  }

  .preview-mixer-bar.compact-mixer strong {
    margin-bottom: 0;
    font-size: 0.84rem;
  }

  .preview-mixer-bar.compact-mixer [data-preview-mixer-summary] {
    display: none;
  }

  .preview-master-control {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .preview-master-control span {
    font-size: 0;
  }

  .preview-master-control span::after {
    content: "VOL";
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 950;
  }

  .preview-audio-shell {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  body.playlist-editing .active-journey-tools .close-playlist-button,
  body.playlist-editing .active-journey-tools .active-journey-status,
  body.playlist-editing .active-journey-tools .active-journey-inline-shortcut,
  body.playlist-editing .active-journey-tools [data-open-sync-status],
  body.playlist-editing .workspace-quick-nav {
    display: none !important;
  }

  body.playlist-editing .active-journey-tools .sync-status-wrap:first-of-type {
    width: 100%;
  }

  body.playlist-editing .active-journey-tools .sync-status-wrap:last-of-type {
    display: none;
  }

  .facilitator-sidebar .sidebar-brand {
    display: grid;
    order: -1;
    margin-top: 8px;
    min-height: 72px;
    grid-template-columns: 52px minmax(0, 1fr);
    border-radius: 8px;
  }

  .facilitator-sidebar {
    overflow-x: hidden;
  }

  body.facilitator-shell .mode-panel,
  body.client-shell .mode-panel {
    padding-left: 8px;
    padding-right: 8px;
  }

  body.facilitator-shell .profile-board.facilitator-board,
  body.client-shell .profile-board.facilitator-board,
  .facilitator-workview-stack,
  .facilitator-card,
  .profile-card,
  .history-entry,
  .playlist-manage-card,
  .followup-assignment-card,
  .followup-assignment-body,
  .followup-assignment-summary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .followup-assignment-body *,
  .followup-assignment-summary *,
  .facilitator-card *,
  .profile-card * {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .followup-assignment-body input,
  .followup-assignment-body textarea,
  .followup-assignment-body select,
  .followup-assignment-body button,
  .facilitator-card textarea,
  .facilitator-card input,
  .facilitator-card button {
    width: 100%;
  }

  .followup-assignment-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .followup-assignment-summary small {
    text-align: left;
  }

  .preview-volume-slider {
    min-height: 88px;
  }

  .preview-volume-fader {
    width: 18px;
    height: 88px;
  }

  .profile-side-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facilitator-sidebar-footer,
  .facilitator-sidebar-groups {
    gap: 8px;
  }

  .admin-menu-toggle {
    display: flex;
    justify-content: center;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .admin-menu-toggle,
  .admin-side-nav,
  .admin-content {
    grid-column: auto;
    grid-row: auto;
  }

  .email-template-editor-shell {
    padding: 14px;
  }

  .email-template-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .email-mode-toggle {
    width: 100%;
  }

  .email-mode-toggle button {
    flex: 1 1 50%;
  }

  .email-editor-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .email-editor-toolbar button,
  .email-editor-toolbar select,
  .email-color-control {
    width: 100%;
  }

  .email-editor-surface,
  .email-editor-html {
    min-height: 240px;
    padding: 16px;
  }

  .admin-side-nav {
    display: none;
    position: static;
    grid-template-columns: 1fr;
  }

  .admin-side-nav.open {
    display: grid;
  }

  .review-admin-summary {
    grid-template-columns: 1fr;
  }

  .review-waveform-player {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .review-waveform-duration {
    justify-self: stretch;
    grid-column: 1 / -1;
    text-align: center;
  }

  .timeline-marker {
    width: 9px;
    height: 48px;
  }

  .timeline-marker span {
    top: -24px;
    max-width: 96px;
    font-size: 0.62rem;
  }

  .review-admin-header,
  .review-admin-summary,
  .review-status-row,
  .review-admin-actions,
  .review-audio-tools,
  .history-journey-block summary {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-cover {
    width: 100%;
    height: 120px;
  }
}

@media (max-width: 780px) and (orientation: portrait) {
  .review-landscape-hint {
    display: block;
  }
}

/* Workspace surface trial: remove the extra dark container shell. */
body.facilitator-shell .mode-panel.active,
body.client-shell .mode-panel.active {
  background: var(--bg-workspace) !important;
}

body.facilitator-shell .profile-board,
body.client-shell .profile-board,
body.facilitator-shell .diary-board,
body.client-shell .diary-board,
body.facilitator-shell .profile-board.facilitator-board,
body.client-shell .profile-board.facilitator-board {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .inbox-chat-bubble {
    width: 100%;
  }

  .inbox-chat-bubble.therapist,
  .inbox-chat-bubble.client,
  .inbox-chat-bubble.admin {
    justify-self: stretch;
  }

  .app-confirm-card {
    width: 100%;
    padding: 18px;
  }

  .app-confirm-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .app-confirm-actions button {
    width: 100%;
  }
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
