/* Encore Studio: boutique palette (Dec 2026)
   Ivory (#FAF6F4), Espresso ink (#241517), Bordeaux cherry (#8E2433), Dusty rose (#C98A97) */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  /* Boutique palette (Dec 2026): warm ivory, bordeaux cherry, dusty rose, espresso ink */
  --ink: #241517;
  --pink: #8E2433;
  --pink-hover: #74192A;
  --neon: #C98A97;
  --blush: #FAF6F4;
  --cream: #FFFFFF;
  --card: #FFFFFF;
  --card-subtle: #F6EFEE;
  --petal: #EFE1E3;
  --muted: #6B5558;
  --line: #EADFE0;
  --accent: var(--pink);
  --accent-fg: #FFFFFF;
  --success: #2F5D46;
  --success-soft: #EDF3EF;
  --warn-bg: #F8EFE8;
  --warn-ink: #8A4B22;
  --warn-line: #EBD3C2;
  --danger-bg: #F9ECEC;
  --danger-ink: #8E2433;
  --danger-line: #E8C4C8;
  --shadow: 0 1px 2px rgb(36 21 23 / 0.04), 0 10px 28px rgb(36 21 23 / 0.04);
  --surface: var(--card);
  --bg: var(--card-subtle);
  --fg: var(--ink);
  --border: var(--line);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F6EFEF;
  --pink: #E0A5B1;
  --pink-hover: #EBBDC6;
  --neon: #E0A5B1;
  --blush: #161012;
  --cream: #211719;
  --card: #211719;
  --card-subtle: #2A1D20;
  --petal: #3A282C;
  --muted: #CDB8BC;
  --line: #3A282C;
  --accent: var(--pink);
  --accent-fg: #161012;
  --success: #9FD3B5;
  --success-soft: #16291F;
  --warn-bg: #33231A;
  --warn-ink: #F0C9A8;
  --warn-line: #5A3B28;
  --danger-bg: #3A1D22;
  --danger-ink: #F3B7C2;
  --danger-line: #6B2E39;
  --shadow: 0 14px 36px rgb(0 0 0 / 0.28);
  --surface: var(--card);
  --bg: var(--card-subtle);
  --fg: var(--ink);
  --border: var(--line);
}

[hidden] {
  display: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.page-heading {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Minimal Studio Header */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--blush) 88%, transparent);
  backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0.52rem 0.95rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--petal);
}

.brand-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.tablist {
  display: flex;
  flex: none;
  gap: 0.16rem;
  background: var(--card-subtle);
  border: 1px solid var(--line);
  padding: 0.2rem;
  border-radius: 999px;
}

[role="tab"] {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
}

[role="tab"][aria-selected="true"] {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(36 21 23 / 0.08);
}

:root[data-theme="dark"] [role="tab"][aria-selected="true"] {
  background: var(--petal);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.topbar-right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.32rem;
  flex: none;
}

.topbar-right .pill-ghost {
  padding: 0.32rem 0.66rem;
  font-size: 0.79rem;
  min-height: 33px;
}

.topbar-right .icon-circle {
  width: 33px;
  height: 33px;
  font-size: 0.92rem;
  flex: none;
}

/* Main Shell */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.35rem 1.25rem 5rem;
}

.tabpanels-stack { display: block; }
[role="tabpanel"][hidden] {
  display: none !important;
  pointer-events: none;
}
[role="tabpanel"]:not([hidden]) {
  display: block;
  position: relative;
  z-index: 1;
}

.panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  min-width: 0;
  max-width: 100%;
}

.narrow-wrap {
  max-width: 660px;
  margin: 0 auto;
  width: 100%;
}

/* Tactile Studio Pills & Icon Circles */
.pill-primary,
.pill-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.4rem 0.88rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, border-color 0.14s ease;
}

.pill-primary[hidden],
.pill-ghost[hidden],
.seg-pill[hidden],
.toast-bar[hidden] {
  display: none;
}

.pill-primary {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-fg);
}
.pill-primary:hover { background: var(--pink-hover); }

.pill-ghost {
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}
.pill-ghost:hover {
  border-color: var(--accent);
  background: var(--card-subtle);
}

.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
}
.icon-circle:hover { border-color: var(--accent); }

/* Compact 1-Line Studio Toolbar */
.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0;
  min-width: 0;
  max-width: 100%;
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.live-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.toolbar-meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.toolbar-meta strong { color: var(--ink); }

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.inline-paste-bar[hidden] {
  display: none;
}

.inline-paste-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.45rem 0.4rem 1rem;
}

.clean-input {
  flex: 1 1 240px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  outline: none;
}
.inline-paste-bar .clean-input {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
}
.clean-input:focus { border-color: var(--accent); }

/* Clean Studio Cards (2-Column Grid on Desktop) */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 1.1rem;
}

@media (max-width: 560px) {
  .studio-grid { grid-template-columns: 1fr; }
}

.take-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0.9rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1rem;
  align-items: stretch;
}

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

/* 9:16 Rounded Video Stage + Centered Play Button */
.take-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #1E1416;
  aspect-ratio: 9 / 16;
  width: 100%;
  cursor: pointer;
}

.take-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.take-poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--card);
  padding: 0.85rem;
  display: block;
}

.stage-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgb(255 245 249 / 0.94);
  color: #241517;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.take-stage.is-playing .stage-play-btn {
  opacity: 0;
  pointer-events: none;
}
.take-stage.is-playing:hover .stage-play-btn {
  opacity: 0.9;
  pointer-events: auto;
}

.stage-time-pill {
  position: absolute;
  bottom: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #FAF6F4;
  background: rgb(36 21 23 / 0.72);
  backdrop-filter: blur(8px);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  pointer-events: none;
}

/* Right Column: Zero-Noise Studio Inspector */
.take-inspector {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

/* Micro-Stat & Strikethrough Cut Pills */
.cut-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.stat-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--card-subtle);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.cut-strike-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: var(--petal);
  color: var(--accent);
  text-decoration: line-through;
}

.status-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  white-space: nowrap;
}

.confirm-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  white-space: nowrap;
}

.paused-active {
  background: var(--danger-bg) !important;
  color: var(--danger-ink) !important;
  border-color: var(--danger-line) !important;
}

.rationale-line {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Matched Product Row */
.prod-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 3px;
  flex: none;
}

.prod-title-wrap {
  flex: 1;
  min-width: 0;
}

.prod-title {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtle-action {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.subtle-action:hover { color: var(--accent); text-decoration: underline; }

/* Crisp Payout Bar */
.payout-strip {
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.65rem 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.payout-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.payout-amount {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}

.payout-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.2rem;
}

.store-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.seg-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
}

.seg-pill.active,
.filter-chip.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

:root[data-theme="dark"] .seg-pill.active,
:root[data-theme="dark"] .filter-chip.active {
  background: var(--petal);
  color: var(--ink);
  border-color: var(--accent);
}

/* Caption Preview 1-Liner */
.caption-line {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caption-line strong { color: var(--ink); }

/* Tactile Bottom Action Bar */
.take-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.dock-tools {
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.tool-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  cursor: pointer;
}
.tool-chip:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--card-subtle);
}

/* Calendar Stack */
.calendar-stack {
  display: grid;
  gap: 0.85rem;
}

.cal-day-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.95rem 1.15rem;
  box-shadow: var(--shadow);
}

.cal-day-card.drag-over {
  border-color: var(--accent);
  background: var(--card-subtle);
}

.cal-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.cal-day-header strong {
  font-size: 0.95rem;
}

.cal-rows {
  display: grid;
  gap: 0.45rem;
}

.cal-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: var(--blush);
  border: 1px solid var(--line);
  cursor: grab;
}

.cal-item-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.cal-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px;
}

.cal-meta-top {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.cal-meta-title {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Accounts Clean List */
.clean-list-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.acc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.88rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.acc-row:last-child { border-bottom: 0; }
.acc-name { font-size: 0.92rem; font-weight: 600; }
.acc-handle { display: block; font-size: 0.8rem; color: var(--muted); }

.clean-drawer {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 1.15rem;
}
.clean-drawer summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}
.drawer-form { margin-top: 1rem; display: grid; gap: 0.85rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.drawer-form label span, .field-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
.textarea-field { width: 100%; resize: vertical; }
.check-line { display: flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; }
.drawer-actions { display: flex; justify-content: flex-end; }

/* Transcript Modal Flow */
.transcript-flow {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  line-height: 1.6;
}

.word-chip {
  font-size: 0.86rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
}

.word-chip.is-cut {
  background: var(--petal);
  color: var(--accent);
  text-decoration: line-through;
  opacity: 0.85;
}

/* Modals & Toast */
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  width: min(92vw, 500px);
  max-width: calc(100vw - 1rem);
  max-height: 90dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 24px 64px rgb(36 21 23 / 0.22);
}
dialog[open] { display: block; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  background: rgb(36 21 23 / 0.45);
  backdrop-filter: blur(5px);
  overflow: hidden;
  overscroll-behavior: contain;
}
.modal-inner {
  padding: 1.35rem 1.45rem;
  min-width: 0;
  max-width: 100%;
}
.modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.85rem; margin-bottom: 0.9rem; min-width: 0; }
.modal-top > div { min-width: 0; }
.sub-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; overflow-wrap: anywhere; }
.modal-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; min-width: 0; max-width: 100%; }
.modal-form > * { min-width: 0; max-width: 100%; }
.dm-kw-row { display: block; min-width: 0; max-width: 100%; }
.dm-kw-row .clean-input,
.modal-form input:not([type="checkbox"]):not([type="radio"]),
.modal-form select,
.modal-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.caption-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  min-width: 0;
}
.modal-channel-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.42rem; min-width: 0; max-width: 100%; }
.modal-chan-row,
.platform-schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.48rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--blush);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.modal-chan-row label,
.platform-schedule-row label {
  min-width: 150px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.48rem;
}
.platform-chan-name {
  min-width: 130px;
  display: inline-block;
}
.modal-dt-input,
input[type="datetime-local"] {
  padding: 0.34rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  width: 210px;
  flex: none;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.modal-error-banner {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  border-radius: 14px;
  padding: 0.6rem 0.85rem;
  font-size: 0.81rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}
.modal-error-banner[hidden] { display: none; }
.swap-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45rem; max-height: 310px; overflow-y: auto; }

.toast-bar {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink);
  color: var(--blush);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgb(36 21 23 / 0.25);
}

/* Coverage Matrix 2.0 Micro-Pills (IG · YT · FB · Pin · LTK) */
.filter-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
}

.coverage-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.cov-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.3;
}
.cov-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.cov-pill.is-live {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}
.cov-pill.is-queued {
  background: var(--petal);
  color: var(--accent);
  border-color: transparent;
}
.cov-pill.is-open {
  background: var(--card-subtle);
  color: var(--ink);
  border-color: var(--accent);
}
.cov-pill.is-skipped {
  opacity: 0.48;
  border-style: dashed;
}

.fit-strategy-box {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.42rem 0.65rem;
  display: grid;
  gap: 0.14rem;
}
.fit-strategy-head {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}
.fit-strategy-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.rank-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--blush);
  white-space: nowrap;
}

.subgrades-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.grade-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.12rem 0.44rem;
  border-radius: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--muted);
}
.grade-chip strong {
  color: var(--success);
}

.scanner-hero-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  width: min(100%, 720px);
  margin-top: 0.35rem;
}
.scanner-hero-form .clean-input {
  flex: 1 1 180px;
}

/* Connection Guardian Strip & Banner */
.guardian-banner {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  border-radius: 16px;
  padding: 0.65rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.guardian-banner[hidden] { display: none; }

.guardian-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Pricing & >=75-80% Margin Sheet */
dialog.wide-dialog {
  width: min(94vw, 680px);
}

.pricing-sheet-body {
  display: grid;
  gap: 1rem;
}

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.75rem;
}

.plan-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.42rem;
}
.plan-card.featured {
  background: var(--card-subtle);
  border-color: var(--accent);
}

.plan-price {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
}
.plan-price span {
  font-family: "Figtree", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.plan-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.comp-table th,
.comp-table td {
  text-align: left;
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.comp-table th {
  color: var(--muted);
  font-weight: 700;
}
.comp-table tr:first-child td {
  font-weight: 700;
  color: var(--accent);
}

/* Clean Analytics View & Visual Match Proof */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.85rem;
}

.kpi-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.32rem;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-value {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--ink);
}

.kpi-value.accent {
  color: var(--accent);
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.analytics-funnel-card,
.analytics-panel-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}

.funnel-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.funnel-step {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
}

.funnel-step strong {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--ink);
}

.funnel-step span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.analytics-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}

.analytics-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.analytics-card-head h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
}

.analytics-rows {
  display: grid;
  gap: 0.55rem;
}

.an-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 0.75rem;
  border-radius: 14px;
  background: var(--blush);
  border: 1px solid var(--line);
}

.an-bar-track {
  height: 5px;
  border-radius: 999px;
  background: var(--petal);
  overflow: hidden;
  margin-top: 0.28rem;
  width: 140px;
}

.an-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

/* 0.5-Second Side-by-Side Visual Match Proof */
.proof-body {
  display: grid;
  gap: 0.9rem;
}

.proof-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

@media (max-width: 480px) {
  .proof-side-by-side {
    grid-template-columns: 1fr;
  }
}

.proof-pane {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.65rem;
  text-align: center;
  display: grid;
  gap: 0.45rem;
}

.proof-pane img,
.proof-pane video {
  width: 100%;
  height: 170px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}
.proof-pane video {
  object-fit: cover;
  background: #1E1416;
}

.proof-pane-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

/* Studio Keyboard Accessibility Rings & Shortcuts Sheet */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.take-card.is-kbd-focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--petal), var(--shadow);
}

.shortcuts-grid {
  display: grid;
  gap: 0.45rem;
}

.sc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.52rem 0.75rem;
  border-radius: 12px;
  background: var(--blush);
  border: 1px solid var(--line);
  font-size: 0.83rem;
}

kbd {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.14rem 0.48rem;
  border-radius: 7px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(36 21 23 / 0.08);
}

/* Customer Welcome & 1-2-3-4 How-To Introduction Card */
.howto-banner-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}
.howto-banner-card[hidden] {
  display: none;
}

.howto-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.howto-heading {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.18;
  margin-top: 0.25rem;
}

.howto-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.howto-step {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.howto-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.howto-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.howto-num.is-done {
  background: var(--success);
  color: #FFFFFF;
}
:root[data-theme="dark"] .howto-num.is-done {
  color: #0D2E1E;
}

.howto-step strong {
  font-size: 0.88rem;
  display: block;
  margin-top: 0.35rem;
}

.howto-step p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.42;
}

.vip-pass-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  white-space: nowrap;
}

.vip-topbar-btn {
  background: var(--success-soft) !important;
  color: var(--success) !important;
  border-color: transparent !important;
}

/* Full Guide Modal Sections & Empty Studio Ready Card */
.guide-sections {
  display: grid;
  gap: 0.75rem;
}

.guide-step-block {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  background: var(--blush);
  border: 1px solid var(--line);
}

.guide-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.guide-callout-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--card-subtle);
  border: 1px solid var(--line);
}

.empty-studio-card {
  grid-column: 1 / -1;
  background: var(--cream);
  border: 1px dashed var(--accent);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.empty-studio-card h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.65rem;
}

.empty-studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

/* 2-Beat Visual Instagram Phone Comment-to-DM Preview */
.dm-phone-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.6rem;
}
.dm-beat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dm-comment-row {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  display: grid;
  gap: 0.22rem;
}
.dm-reply-sub {
  font-size: 0.76rem;
  color: var(--success);
  padding-left: 0.65rem;
  border-left: 2px solid var(--petal);
}
.dm-bubble-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.dm-bubble-prod {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.dm-bubble-prod img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--line);
}
.dm-cta-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

/* Recommended Calendar Slots & Analytics Takeaways */
.today-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  margin-left: 0.4rem;
}
.cal-suggested-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}
.cal-slot-pill {
  appearance: none;
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.26rem 0.7rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.cal-slot-pill:hover {
  background: var(--card-subtle);
  color: var(--ink);
}

.takeaways-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}
.takeaways-strip:empty {
  display: none;
}
.takeaway-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
}

/* Live 4-Stage Editorial Page Sync Progress Stepper */
.sync-progress-card {
  background: var(--cream);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.6rem;
}
.sync-progress-card[hidden] {
  display: none;
}
.sync-progress-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}
.sync-steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sync-step-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  background: var(--blush);
  color: var(--muted);
  border: 1px solid var(--line);
}
.sync-step-pill.is-active {
  background: var(--petal);
  color: var(--accent);
  border-color: var(--accent);
}
.sync-step-pill.is-done {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

/* Tabular Numbers & Wrapping Hygiene */
body {
  overflow-x: clip;
}
.kpi-value,
.payout-amount,
.stat-pill,
.status-chip,
.rank-pill,
.plan-price {
  font-variant-numeric: tabular-nums;
}
.toolbar-left,
.dock-tools,
.filter-seg {
  flex-wrap: wrap;
}
button:disabled {
  opacity: 0.68;
  cursor: wait;
}

/* Mobile & Tablet Responsive Polish (iPhone 375px - iPad 980px) */
@media (max-width: 1120px) {
  #btnHowItWorks {
    display: none;
  }
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 0.6rem 0.95rem;
    row-gap: 0.5rem;
  }
  .tablist {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }
  [role="tab"] {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.42rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.32rem;
  }
  .topbar-right .pill-ghost {
    padding: 0.34rem 0.68rem;
    font-size: 0.78rem;
    min-height: 32px;
  }
  .icon-circle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 0.95rem 0.8rem 4rem;
  }
  .topbar-inner {
    padding: 0.55rem 0.75rem;
    gap: 0.4rem;
  }
  .tablist {
    gap: 0.12rem;
    padding: 0.18rem;
  }
  [role="tab"] {
    padding: 0.36rem 0.44rem;
    font-size: 0.76rem;
  }
  .brand-title {
    font-size: 1.38rem;
  }
  .topbar-right {
    gap: 0.25rem;
  }
  .topbar-right .pill-ghost {
    padding: 0.28rem 0.52rem;
    font-size: 0.74rem;
    min-height: 30px;
  }
  .topbar-right .icon-circle {
    width: 30px;
    height: 30px;
    font-size: 0.84rem;
  }
  #btnHowItWorks,
  #btnOpenConciergeTop,
  #btnShortcutsModal {
    display: none;
  }
  dialog,
  dialog.wide-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    border-radius: 20px;
  }
  .modal-inner {
    padding: 1rem 0.9rem;
  }
  .modal-chan-row,
  .platform-schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0.4rem;
  }
  .modal-dt-input,
  input[type="datetime-local"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .modal-actions-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }
  .modal-actions-split #btnSaveAndSchedule {
    grid-column: 1 / -1;
    width: 100%;
  }
  .inline-paste-bar {
    border-radius: 18px;
    padding: 0.55rem 0.65rem;
  }
  .inline-paste-bar .clean-input {
    flex: 1 1 100%;
    min-width: 0;
  }
  .inline-paste-bar .pill-primary {
    width: 100%;
  }
  .takeaway-card {
    flex-wrap: wrap;
  }
}

/* Beta Gate & Ready-to-Post Export Kit Cards */
.beta-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0.85rem;
}
.beta-gate-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
}
.beta-gate-card.is-accent {
  background: var(--card-subtle);
  border-color: var(--accent);
}

.export-kit-step {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
}
.export-kit-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.export-url-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  word-break: break-all;
  color: var(--ink);
}

/* 1-2-3 Guided Stepper Pills & Muscle-Memory Fixed Primary Action Bar */
.guided-stepper-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
}
.step-track-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--blush);
  color: var(--muted);
  border: 1px solid var(--line);
}
.step-track-pill.is-current {
  background: var(--petal);
  color: var(--accent);
  border-color: var(--accent);
}
.step-track-pill.is-done {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.card-more-drawer {
  font-size: 0.76rem;
  color: var(--muted);
}
.card-more-drawer summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.15rem 0;
  user-select: none;
}
.card-more-drawer summary:hover {
  color: var(--ink);
}
.more-drawer-body {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.45rem;
}

.fixed-primary-bar {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: center;
}
.fixed-cta-btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  font-size: 0.85rem;
}
.studio-toolbar[hidden] {
  display: none;
}

/* ==========================================================================
   DISCOVER TAB, TRYBE CAMPAIGNS, CASH-FLOW RADAR & SAFE-ZONE COACH (v2.1)
   ========================================================================== */
.discover-hero-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.discover-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.discover-trybe-section {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}
.discover-trybe-section[hidden] {
  display: none;
}

.trybe-campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 0.85rem;
}

.trybe-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.trybe-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.trybe-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.trybe-select {
  width: 100%;
  min-width: 0;
  padding: 0.36rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}

.discover-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  min-width: 0;
}

.discover-daily-banner {
  background: linear-gradient(135deg, var(--cream) 0%, var(--card-subtle) 100%);
  border: 1px solid var(--accent);
  border-radius: 24px;
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.discover-daily-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.discover-matched-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.65rem;
}
.discover-matched-box[hidden] {
  display: none;
}

.discover-match-row {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hook-tip-line {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.42rem 0.68rem;
  line-height: 1.35;
}

.discover-store-pills {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
}

.discover-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
}

.discover-thumb-box {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 4px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.discover-thumb-box.is-fallback {
  background: var(--card-subtle);
}
.discover-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.discover-thumb-fallback {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
  color: var(--accent);
}

.discover-offers-list {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.5rem 0.65rem;
  display: grid;
  gap: 0.38rem;
}

.discover-offer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.77rem;
  padding-bottom: 0.32rem;
  border-bottom: 1px solid var(--line);
}
.discover-offer-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.promo-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  background: var(--petal);
  color: var(--accent);
  border: 1px dashed var(--accent);
  cursor: pointer;
}
.promo-code-pill:hover {
  background: var(--card-subtle);
}

/* Cash-Flow Timeline Card */
.cashflow-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}
.cashflow-card:empty {
  display: none;
}

.cashflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.75rem;
}

.cashflow-bucket {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.22rem;
}
.cashflow-bucket strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.08;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Platform Safe-Zone & Native Upload Coach */
.safezone-coach-box {
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem 0.78rem;
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.safezone-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.safezone-tip {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Modal Multi-Column Responsive Grids */
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 560px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .form-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .trybe-controls-row {
    grid-template-columns: 1fr;
  }
  .discover-hero-card,
  .discover-trybe-section,
  .discover-daily-banner,
  .discover-matched-box,
  .cashflow-card {
    padding: 0.95rem 0.9rem;
  }
  .discover-daily-banner .pill-primary {
    width: 100%;
  }
  .pill-primary,
  .fixed-cta-btn,
  .inline-paste-bar .clean-input,
  .beta-gate-card .clean-input {
    min-height: 44px;
  }
  .fixed-primary-bar .pill-ghost {
    min-height: 44px;
  }
  [role="tab"] {
    min-height: 40px;
    padding: 0.4rem 0.36rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* ==========================================================================
   LAUNCH POLISH (v2.1.1): TOUR SPOTLIGHT, GUIDED STORE CARDS, FOOTER & CRUD
   ========================================================================== */
.tour-spotlight-card {
  background: linear-gradient(135deg, var(--cream) 0%, var(--card-subtle) 100%);
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.handle-prefix-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  overflow: hidden;
}
.handle-prefix-box:focus-within {
  border-color: var(--accent);
}
.handle-prefix-text {
  padding: 0.55rem 0.2rem 0.55rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  user-select: none;
}
.handle-prefix-box .clean-input {
  border: 0;
  border-radius: 0;
  padding-left: 0.25rem;
}

.link-feedback-banner {
  border-radius: 14px;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
}
.link-feedback-banner.is-ok {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.guided-stores-stack {
  display: grid;
  gap: 0.65rem;
}

.guided-store-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.55rem;
}

.guided-store-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.guided-store-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.28rem;
  font-size: 0.81rem;
  color: var(--ink);
  line-height: 1.45;
}
.guided-store-steps a {
  color: var(--accent);
  font-weight: 600;
}

.helper-keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.helper-key-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.4rem;
}

.workspace-data-bar {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.danger-ghost-btn:hover {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.gate-footer-links {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
}
.gate-footer-links a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.gate-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.studio-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.studio-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.82rem;
}
.studio-footer-links a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.studio-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 560px) {
  #btnTopbarFeedback {
    display: none;
  }
  .seg-pill,
  .pill-ghost,
  .tool-chip {
    min-height: 36px;
    padding: 0.42rem 0.72rem;
    display: inline-flex;
    align-items: center;
  }
  .studio-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   CONNECTED CHANNELS STRIP, PLATFORM COVERAGE GRID & 7-DAY BEST-TIME PLANNER
   ========================================================================== */
.connected-hub-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.52rem 0.85rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.connected-hub-strip:empty {
  display: none;
}

.hub-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.hub-cluster-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-right: 0.15rem;
}

.hub-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.hub-pills-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.hub-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.55rem 0.24rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--blush);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}
.hub-channel-pill:hover {
  border-color: var(--accent);
  background: var(--card-subtle);
}
.hub-channel-pill.is-connected {
  border-color: var(--success);
  background: var(--success-soft);
}

.hub-badge-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.28rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.hub-state-mark {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}
.hub-channel-pill.is-connected .hub-state-mark {
  color: var(--success);
}

/* Platform Coverage Matrix Table */
.coverage-matrix-shell {
  display: block;
}

.coverage-matrix-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}

.coverage-matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.coverage-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.coverage-matrix-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.coverage-matrix-table th {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.coverage-matrix-table td {
  padding: 0.68rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.coverage-matrix-table tbody tr:last-child td {
  border-bottom: 0;
}

.matrix-vid-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 220px;
}

.matrix-vid-thumb {
  width: 44px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--card-subtle);
  flex-shrink: 0;
}
.matrix-vid-thumb.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.9rem;
}

.matrix-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 30px;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--blush);
  color: var(--ink);
}
button.matrix-pill {
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
button.matrix-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.matrix-pill.is-live {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}
.matrix-pill.is-queued {
  background: var(--petal);
  color: var(--accent);
  border-color: var(--accent);
}
.matrix-pill.is-open {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.matrix-pill.is-optional {
  background: var(--blush);
  color: var(--muted);
  border-style: dashed;
}
.matrix-pill.is-needs-link {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-line);
}
.matrix-pill.is-skipped {
  background: var(--card-subtle);
  color: var(--muted);
}

/* 7-Day Visual Week Grid & Pink Best-Time Heatmap */
.cal-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.heatmap-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--petal);
  flex-shrink: 0;
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.cal-day-col {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 250px;
  min-width: 0;
}
.cal-day-col.is-today-col {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cal-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  padding-bottom: 0.42rem;
  border-bottom: 1px solid var(--line);
}
.cal-col-wk {
  display: block;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.cal-col-num {
  font-size: 0.86rem;
  color: var(--ink);
}

.cal-col-posts {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  flex: 1;
}

.cal-grid-post {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0.48rem;
  display: grid;
  gap: 0.35rem;
  cursor: grab;
}
.cal-grid-post:hover {
  border-color: var(--accent);
}
.cal-grid-post-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
}
.cal-chan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}
.cal-mini-del {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-mini-del:hover {
  border-color: var(--danger-line);
  color: var(--danger-ink);
}
.cal-grid-post-body {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.cal-grid-thumb {
  width: 32px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.cal-grid-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-grid-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.cal-heatmap-slots {
  display: grid;
  gap: 0.28rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
}
.cal-peak-slot {
  width: 100%;
  text-align: left;
  padding: 0.28rem 0.48rem;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: var(--card-subtle);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.69rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cal-peak-slot.is-hot {
  background: var(--petal);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.cal-peak-slot:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Social Channels & Metricool 2x3 Hub inside Accounts */
.social-integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.social-int-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.5rem;
}
.social-int-card.is-connected {
  border-color: var(--success);
}

.social-int-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}

.social-brand-circle {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-int-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.social-int-form .clean-input {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

@media (max-width: 1080px) {
  .cal-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .cal-week-grid,
  .social-integrations-grid {
    grid-template-columns: 1fr;
  }
  .hub-divider {
    display: none;
  }
  .hub-channel-pill {
    min-height: 34px;
  }
}


/* ============================================================================
   Click-by-Click Visual Spotlight Ring, Encore Concierge Bot & Creator Toolkit
   ============================================================================ */
[data-tour-spotlight="active"] {
  position: relative;
  outline: 2.5px solid var(--accent) !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 28px rgba(142, 36, 51, 0.14) !important;
  border-radius: 14px;
  transition: box-shadow 0.25s ease, outline-color 0.25s ease;
  animation: coutureSpotlightPulse 2s ease-in-out infinite;
}

@keyframes coutureSpotlightPulse {
  0%, 100% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), 0 10px 24px rgba(142, 36, 51, 0.12);
  }
  50% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 26%, transparent), 0 14px 32px rgba(142, 36, 51, 0.2);
  }
}

.tour-card-main {
  flex: 1 1 340px;
  min-width: 0;
}

.tour-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
}

.tour-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tour-step-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tour-step-pill:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.tour-step-pill.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.tour-step-pill.is-done {
  border-color: color-mix(in srgb, #1E6B47 35%, var(--border));
  color: #1E6B47;
}

[data-theme="dark"] .tour-step-pill.is-done {
  color: #7CE0B3;
  border-color: rgba(124, 224, 179, 0.35);
}

/* Floating Encore Concierge Assistant */
.concierge-root {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 980;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  max-width: calc(100vw - 1.5rem);
  pointer-events: none;
}

.concierge-root > * {
  pointer-events: auto;
}

.concierge-launcher-pill {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.45rem 0.95rem 0.45rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(36, 21, 23, 0.22);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.concierge-launcher-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(142, 36, 51, 0.28);
}

.concierge-launcher-pill.is-open {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
}

.concierge-launcher-badge {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.concierge-launcher-pill.is-open .concierge-launcher-badge {
  background: var(--petal);
  color: var(--accent);
}

.concierge-nudge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 999px;
  padding: 0.32rem 0.45rem 0.32rem 0.8rem;
  box-shadow: 0 10px 26px rgba(36, 21, 23, 0.14);
  max-width: min(340px, calc(100vw - 1.5rem));
}

.concierge-nudge-text {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.concierge-nudge-text strong {
  color: var(--accent);
}

.concierge-nudge-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.concierge-panel {
  width: min(400px, calc(100vw - 1.5rem));
  max-height: min(580px, calc(100dvh - 5.5rem));
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(36, 21, 23, 0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.concierge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.78rem 0.95rem 0.62rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--petal) 35%, var(--surface));
}

.concierge-progress-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.concierge-step-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.18rem 0.56rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.concierge-step-chip.is-done {
  color: #1E6B47;
  border-color: color-mix(in srgb, #1E6B47 35%, var(--border));
}

[data-theme="dark"] .concierge-step-chip.is-done {
  color: #7CE0B3;
}

.concierge-step-chip.is-next {
  border-color: var(--accent);
  color: var(--accent);
}

.concierge-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.8rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 180px;
}

.concierge-msg {
  font-size: 0.83rem;
  line-height: 1.48;
  border-radius: 14px;
  padding: 0.68rem 0.82rem;
  max-width: 94%;
  word-break: break-word;
}

.concierge-msg.is-bot {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
}

.concierge-msg.is-user {
  align-self: flex-end;
  background: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.concierge-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.55rem;
}

.concierge-chip-btn {
  min-height: 30px !important;
  padding: 0.24rem 0.68rem !important;
  font-size: 0.76rem !important;
}

.concierge-quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  padding: 0.42rem 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.concierge-input-bar {
  display: flex;
  gap: 0.42rem;
  padding: 0.62rem 0.8rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.concierge-input-bar .clean-input {
  min-height: 38px;
  font-size: 0.82rem;
  padding: 0.38rem 0.7rem;
}

/* Creator Toolkit Tab */
.toolkit-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.toolkit-stack .form-grid-4 > label {
  min-width: 0;
}

.toolkit-stack .form-grid-4 .clean-input {
  width: 100%;
  min-width: 0;
}

.toolkit-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.calc-kpi-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.calc-big-num {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
}

.toolkit-prog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.toolkit-prog-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toolkit-template-row,
.toolkit-engine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  flex-wrap: wrap;
}

.toolkit-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.toolkit-engines-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 860px) {
  .toolkit-calc-grid,
  .toolkit-prog-grid {
    grid-template-columns: 1fr;
  }
  .tour-card-actions {
    align-items: stretch;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .concierge-root {
    right: 0.65rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
  }
  .concierge-nudge {
    display: none;
  }
}


/* ============================================================================
   Intentional Platform Matchmaker & "Best Right Now With Your Products" Strip
   ============================================================================ */
.right-now-strip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.right-now-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.right-now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.8rem;
}

.right-now-card {
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.right-now-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.right-now-prod-row {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.right-now-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.right-now-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.right-now-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 0.12rem;
}

.right-now-why {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.right-now-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.fit-strategy-box.is-intentional-fit {
  display: grid;
  gap: 0.32rem;
}

.fit-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.fit-recommended-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  line-height: 1.25;
}

.fit-recommended-pill.is-chan-pinterest {
  background: #B8004E;
  color: #ffffff;
}

.fit-recommended-pill.is-chan-fb_reels {
  background: #1E4E8C;
  color: #ffffff;
}

.fit-recommended-pill.is-chan-yt_shorts {
  background: #9E1B46;
  color: #ffffff;
}

.fit-recommended-pill.is-chan-ltk_post {
  background: #241517;
  color: #ffffff;
}

:root[data-theme="dark"] .fit-recommended-pill.is-chan-ltk_post {
  background: var(--petal);
  color: var(--ink);
}

.fit-strategy-dm {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.22rem;
  border-top: 1px dashed var(--line);
}

@media (max-width: 680px) {
  .right-now-grid {
    grid-template-columns: 1fr;
  }
  .right-now-strip {
    padding: 0.85rem 0.85rem;
  }
}

/* ============================================================================
   Beta Readiness Polish: In-App WebView Escape Banner & Pre-Post Audio Check
   ============================================================================ */
.inapp-browser-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.95rem;
  margin-bottom: 0.85rem;
  border-radius: 16px;
  background: var(--card);
  border: 1.5px solid var(--accent);
  box-shadow: 0 8px 22px rgba(142, 36, 51, 0.08);
}

.inapp-browser-banner[hidden] {
  display: none !important;
}

.inapp-browser-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink);
  min-width: 0;
  flex: 1 1 240px;
}

.inapp-browser-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

.export-audio-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  background: var(--card-subtle);
  border: 1px solid var(--accent);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink);
}


/* Beta polish (Dec 2026): calmer first screen and nothing hidden behind the Guide Me button on phones */
.connected-hub-strip[hidden] { display: none; }
@media (max-width: 640px) {
  .toast-bar {
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 2rem);
    text-align: center;
  }
  main, .tabpanels-stack { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
  .concierge-launcher-pill {
    min-height: 44px;
    padding: 0.4rem 0.8rem 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
}


/* Boutique finish (Dec 2026): editorial wordmark, quieter shapes, hairline borders */
.brand-dot { display: none; }
.brand-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.38em;
  margin-right: -0.38em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}
.brand-tag {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 0.65rem;
  margin-left: 0.2rem;
}
.topbar {
  background: color-mix(in srgb, var(--blush) 92%, transparent);
  border-block-end: 1px solid var(--line);
}
.pill-primary,
.pill-ghost,
.concierge-launcher-pill {
  border-radius: 10px;
  letter-spacing: 0.01em;
}
.pill-primary {
  font-weight: 600;
  box-shadow: none;
}
.pill-ghost { box-shadow: none; }
.howto-banner-card,
.beta-gate-card {
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.concierge-launcher-pill {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgb(36 21 23 / 0.18);
}
:root[data-theme="dark"] .concierge-launcher-pill { color: #161012; background: var(--ink); }
dialog::backdrop {
  background: rgb(36 21 23 / 0.5);
  backdrop-filter: blur(6px);
}
.stat-pill,
.stage-time-pill,
.cov-pill,
.rank-pill,
.grade-chip {
  font-family: "Figtree", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  font-weight: 600;
  border-radius: 6px;
}
.topbar-right .pill-ghost { border-radius: 10px; }
.tablist { border-radius: 12px; }
.tablist [role="tab"] { border-radius: 9px; }
.step-track-pill { border-radius: 8px; }
@media (max-width: 640px) {
  .brand-tag { display: none; }
}


/* Consistency pass (Dec 2026): one shape language, one font, thumb sized tap targets on phones */
button, input, select, textarea { font-family: inherit; }
.status-chip,
.confirm-chip,
.seg-pill,
.tool-chip,
.hub-channel-pill { border-radius: 8px; }
.fit-recommended-pill,
.fit-recommended-pill.is-chan-pinterest,
.fit-recommended-pill.is-chan-fb_reels,
.fit-recommended-pill.is-chan-yt_shorts,
.fit-recommended-pill.is-chan-ltk_post {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 8px;
}
@media (max-width: 640px) {
  .pill-primary,
  .pill-ghost,
  .tool-chip,
  .seg-pill,
  .hub-channel-pill { min-height: 44px; }
  .subtle-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.15rem;
  }
}
