:root {
  --bg: #050505;
  --bg-elev: #0c0d12;
  --bg-soft: #14161f;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #a78bfa;
  --accent-2: #34d399;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  --brand: #a78bfa;
  --mission-gold: #e8c547;
}

/* Brand chroma — Mission Control */
body[data-brand="thebrights"] {
  --brand: #22d3ee;
  --accent: #22d3ee;
}
body[data-brand="honeybadger"] {
  --brand: #f59e0b;
  --accent: #f59e0b;
}
body[data-brand="friedenstaube"] {
  --brand: #e8c547;
  --accent: #e8c547;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(167, 139, 250, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(52, 211, 153, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
}

button,
a {
  font-family: inherit;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 14px 72px;
}

/* —— Mission Forge (Phase 2 T-1 Wizard) —— */
.forge-panel {
  margin: 0 0 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, rgba(255, 255, 255, 0.1));
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 60%),
    rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.forge-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
}

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

.forge-summary__badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.forge-summary__badge.go {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}

.forge-summary__badge.hold {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

.forge-body {
  padding: 0 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.forge-lead {
  margin: 0;
  font-size: 0.82rem;
}

.forge-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.forge-stat {
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.forge-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.forge-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
}

.forge-steps li.done {
  color: #bbf7d0;
}

.forge-check {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  cursor: pointer;
  color: #4ade80;
  padding: 0;
  line-height: 1;
}

.forge-check[aria-pressed="true"] {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.55);
}

.forge-check[aria-pressed="true"]::after {
  content: "✓";
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

.forge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.forge-cli {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.45;
  white-space: pre-wrap;
  color: #d1d5db;
  max-height: 9rem;
  overflow: auto;
}

.forge-issues {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  max-height: 7rem;
  overflow: auto;
}

@media (max-width: 640px) {
  .forge-status-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Mission Strip (Phase 1 Mission Control Skin) —— */
.mission-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%),
    rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
}

.mission-strip__cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.mission-strip__cell--center {
  text-align: center;
  align-items: center;
}

.mission-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.mission-value {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mission-countdown {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.mission-countdown.hold {
  color: #f87171;
  text-shadow: 0 0 18px rgba(248, 113, 113, 0.35);
}

.mission-countdown.go {
  color: #4ade80;
}

.mission-sub {
  font-size: 0.7rem;
}

.mission-stock {
  font-family: var(--mono);
  font-size: 0.85rem;
}

.truth-hold {
  margin: 0.35rem 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  font-size: 0.82rem;
  font-weight: 600;
}

.truth-hold.hidden {
  display: none;
}

.telemetry-panel {
  margin: 0 0 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.telemetry-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
}

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

.telemetry-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry-body {
  padding: 0 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.telemetry-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.telemetry-field input {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  font: inherit;
}

.telemetry-tagline {
  font-size: 0.78rem;
  margin: 0;
}

.telemetry-hint {
  font-size: 0.72rem;
  margin: 0;
}

.telemetry-week {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
}

.telemetry-week-row {
  display: grid;
  grid-template-columns: 5.5rem 4rem 1fr 3rem;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.telemetry-week-row:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

.telemetry-week-row .sess {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--brand);
  text-align: right;
}

.telemetry-week-empty {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.telemetry-ch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.telemetry-ch-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.65rem;
  color: var(--muted);
  font-family: var(--mono);
}

.telemetry-ch-grid input {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 0.3rem 0.35rem;
  font: inherit;
  width: 100%;
}

@media (max-width: 520px) {
  .telemetry-ch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .telemetry-week-row {
    grid-template-columns: 4.5rem 3.2rem 1fr 2.5rem;
  }
}

@media (max-width: 640px) {
  .mission-strip {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sticky top-left: cool brand FAB → scroll to top */
.fab-top {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 60;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: #f3f4f6;
  background:
    linear-gradient(145deg, rgba(167, 139, 250, 0.95), rgba(52, 211, 153, 0.75) 55%, rgba(59, 130, 246, 0.85));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 24px rgba(167, 139, 250, 0.35);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.fab-top:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 0 32px rgba(52, 211, 153, 0.35);
}

.fab-top:active {
  transform: scale(0.96);
}

.fab-top__ring {
  position: absolute;
  inset: -3px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.8;
  pointer-events: none;
}

.fab-top__core {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.fab-top__logo,
.fab-top__up {
  grid-area: 1 / 1;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.fab-top__up {
  opacity: 0;
  transform: translateY(6px);
}

/* After scroll: show chevron-up, hide logo mark */
.fab-top.is-scrolled .fab-top__logo {
  opacity: 0;
  transform: translateY(-6px);
}

.fab-top.is-scrolled .fab-top__up {
  opacity: 1;
  transform: translateY(0);
}

.fab-top.is-scrolled {
  background:
    linear-gradient(145deg, rgba(52, 211, 153, 0.95), rgba(167, 139, 250, 0.85));
}

/* Room for FAB so header text isn't covered on narrow screens */
@media (max-width: 920px) {
  .app {
    padding-left: max(14px, calc(12px + env(safe-area-inset-left)));
  }

  .top .brand-mark {
    padding-left: 52px; /* clear sticky FAB */
  }
}

@media (min-width: 921px) {
  .fab-top {
    top: 18px;
    /* Avoid 100vw (scrollbar gutter → horizontal jitter) */
    left: max(18px, calc((100% - min(960px, 100%)) / 2 + 6px));
  }
}

/* Fallback: pin FAB to content column edge when possible */
@supports (width: 100dvw) {
  @media (min-width: 921px) {
    .fab-top {
      left: max(18px, calc((100dvw - 960px) / 2 - 8px));
    }
  }
}

/* Sales onboarding */
.onboard {
  margin-bottom: 12px;
}

.onboard-inner {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.onboard-title {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 0.95rem;
}

.onboard-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  color: #d1d5db;
}

.onboard-list strong {
  color: #fff;
}

/* Today strip — primary sales entry */
.today-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent-2) 40%, var(--border));
  background:
    radial-gradient(600px 120px at 10% 0%, rgba(52, 211, 153, 0.12), transparent 60%),
    var(--bg-elev);
  box-shadow: var(--shadow);
}

.today-strip-title {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.today-strip-meta {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Always-visible language switch: DE · EN · HI */
.lang-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-bar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-seg button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
  min-width: 52px;
  transition: 0.15s ease;
}

.lang-seg button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.lang-seg button.active {
  background: color-mix(in srgb, var(--accent) 28%, var(--bg-soft));
  color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cal-brand-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
}

.suggestions-panel {
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 6%, var(--bg-elev));
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggest-chip {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: 0.15s ease;
}

.suggest-chip:hover {
  border-color: color-mix(in srgb, var(--accent-2) 50%, transparent);
  background: color-mix(in srgb, var(--accent-2) 12%, var(--bg-soft));
}

.suggest-chip .reason {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.suggest-hook {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.locale-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

.locale-pill.inline {
  margin-left: 6px;
  vertical-align: middle;
}

.locale-pill.fallback {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.locale-fallback {
  margin: 0;
  font-size: 0.78rem;
  color: #fde68a;
}

.locale-fallback.hidden {
  display: none !important;
}

/* —— Calendar —— */
.calendar-panel {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.calendar-panel.collapsed {
  display: none;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cal-month-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.72rem;
  color: var(--muted);
}

.cal-legend .leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cal-legend .leg i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cal-legend .leg.ready i {
  background: #22c55e;
  border-color: #4ade80;
}
.cal-legend .leg.partial i {
  background: #eab308;
  border-color: #facc15;
}
.cal-legend .leg.planned i {
  background: #a78bfa;
  border-color: #c4b5fd;
}
.cal-legend .leg.postday i,
.cal-legend .leg.cadence i {
  background: #0ea5e9;
  border-color: #38bdf8;
}
.cal-legend .leg.empty i {
  background: #1f2937;
  border-color: #374151;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-cell {
  position: relative;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 6px 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: inherit;
}

.cal-cell:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.cal-cell.out {
  opacity: 0.35;
}

.cal-cell .dnum {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cal-cell .dtheme {
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cal-cell .dnum {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-cell .dsrc {
  font-size: 0.65rem;
  opacity: 0.75;
}

.cal-cell .dsrc.team {
  color: #c4b5fd;
}

.cal-cell.has-auto .dtheme {
  color: #7dd3fc;
}

.cal-cell.status-postday .dtheme {
  color: #bae6fd;
}

/* Team plan under calendar */
.team-plan {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.team-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.team-plan-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-plan-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s ease;
}

.team-plan-item:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tp-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.tp-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.tp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
}

.tp-badge.fertig {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.tp-badge.team {
  background: rgba(167, 139, 250, 0.2);
  color: #ddd6fe;
}

.tp-badge.teilweise {
  background: rgba(234, 179, 8, 0.18);
  color: #fde68a;
}

/* Plan + ideas panel */
.plan-panel {
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev));
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  margin-bottom: 14px;
}

.plan-panel.hidden {
  display: none !important;
}

.plan-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 12px;
}

.plan-title {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-topic,
.plan-source {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.plan-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-alt {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.plan-chip {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 40px;
}

.plan-chip .reason {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.plan-chip.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-soft));
}

.idea-box {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.idea-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .idea-row {
    grid-template-columns: 1fr;
  }
  .team-plan-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.idea-row input {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  min-height: 42px;
}

.idea-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idea-list li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.theme-form {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.theme-form.hidden {
  display: none !important;
}

.theme-form h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.theme-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.theme-form .field input[type="text"] {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
}

.theme-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
}

.cal-cell.status-ready {
  background: rgba(34, 197, 94, 0.22);
  border: 2px solid #22c55e;
}
.cal-cell.status-partial {
  background: rgba(234, 179, 8, 0.2);
  border: 2px solid #eab308;
}
.cal-cell.status-planned {
  background: rgba(167, 139, 250, 0.22);
  border: 2px solid #a78bfa;
}
.cal-cell.status-postday,
.cal-cell.status-cadence {
  background: rgba(14, 165, 233, 0.14);
  border: 2px solid #0ea5e9;
}
.cal-cell.status-empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cal-cell.today .dnum {
  color: #a78bfa;
}
.cal-cell.today {
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.5);
}

.cal-cell.past {
  opacity: 0.42;
}

.cal-cell.past .dtheme {
  color: transparent;
  font-size: 0;
}

.cal-cell.selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 80%, white);
  border-color: transparent;
}

.cal-cell .dots {
  display: flex;
  gap: 3px;
  margin-top: auto;
  padding-top: 4px;
}

.cal-cell .dot-b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0.85;
}

/* Day banner + theme */
.day-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.day-banner-text {
  flex: 1;
  min-width: 180px;
}

.day-theme-line {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #c4b5fd;
}

.day-theme-line:empty {
  display: none;
}

.theme-editor {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.theme-editor.hidden {
  display: none !important;
}

.theme-editor-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.theme-editor-head h3 {
  margin: 0;
  font-size: 1rem;
}

.theme-editor .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-editor .field.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.theme-editor input[type="text"] {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
}

.theme-editor input[type="text"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-color: transparent;
}

.theme-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-hint {
  margin: 0;
  font-size: 0.78rem;
}

@media (max-width: 560px) {
  .cal-cell {
    min-height: 52px;
    padding: 4px;
  }
  .cal-cell .dtheme {
    display: none;
  }
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.brand-mark .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.7);
}

.brand-mark h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.day-nav {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.day-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s ease;
}

.day-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.day-btn.active {
  background: color-mix(in srgb, var(--brand) 22%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}

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

.btn {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-color: transparent;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
}

.btn.sm {
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn.xs {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.day-banner {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elev), transparent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.day-banner-inner h2 {
  margin: 8px 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(167, 139, 250, 0.15);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.muted {
  color: var(--muted);
}

.brand-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

/* Logo-only brand picker */
.brand-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  transition: 0.18s ease;
  min-width: 0;
  width: auto;
  min-height: 56px;
}

.brand-tab img {
  width: 96px;
  height: 36px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
  pointer-events: none;
}

.brand-tab.active {
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
  background: color-mix(in srgb, var(--brand) 14%, var(--bg-elev));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}

.brand-tab:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

.workspace {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  min-height: 0;
}

.platform-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 12px;
  text-align: left;
  cursor: pointer;
  transition: 0.15s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.platform-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.platform-btn.active {
  background: color-mix(in srgb, var(--brand) 18%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
}

.platform-btn.posted {
  border-color: rgba(52, 211, 153, 0.45);
}

.platform-btn .tick {
  color: #34d399;
  font-weight: 700;
  margin-left: 4px;
}

.posted-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

.posted-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}

/* —— Olymp meta pills —— */
.olymp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.olymp-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}
.olymp-pill.video.ready {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.45);
}
.olymp-pill.video.keyframe {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.45);
}
.carousel-beats {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}
.carousel-beats li {
  margin-bottom: 4px;
}

/* —— Fr-Review —— */
.review-panel {
  margin: 0 18px 14px;
  border-radius: 14px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), var(--bg-soft));
}
.review-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
}
.review-summary::-webkit-details-marker {
  display: none;
}
.review-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.review-field input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.review-hint {
  font-size: 0.75rem;
  margin: 0;
}
@media (max-width: 560px) {
  .review-panel {
    margin: 0 12px 12px;
  }
}

/* —— Stock / Vorrat warn —— */
.stock-warn {
  margin: 6px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fcd34d;
}
.stock-warn.hidden {
  display: none;
}
.stock-warn.ok {
  color: #a7f3d0;
}

/* —— Engagement panel —— */
.engage-panel {
  margin: 0 18px 12px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), var(--bg-soft));
  overflow: hidden;
}
.engage-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  user-select: none;
}
.engage-summary::-webkit-details-marker {
  display: none;
}
.engage-badge {
  margin-left: auto;
  font-size: 0.85rem;
  color: #a7f3d0;
}
.engage-badge.hidden {
  display: none;
}
.engage-list {
  margin: 0;
  padding: 0 14px 8px 32px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.engage-hint {
  margin: 0 14px 10px;
  font-size: 0.78rem;
}
.engage-panel .btn {
  margin: 0 14px 12px;
}
.engage-panel.is-done {
  border-color: rgba(52, 211, 153, 0.45);
}
@media (max-width: 560px) {
  .engage-panel {
    margin: 0 12px 10px;
  }
}

/* —— 5-Min Ampel Gate —— */
.ampel {
  margin: 0 18px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
}

.ampel.hidden {
  display: none;
}

.ampel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.ampel-light {
  font-size: 1.15rem;
  line-height: 1;
}

.ampel-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.ampel-score {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: auto;
}

.ampel-details-hint {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ampel--green {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), var(--bg-soft));
}

.ampel--yellow {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), var(--bg-soft));
}

.ampel--red {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), var(--bg-soft));
}

.ampel-list {
  margin: 0;
  padding: 0 14px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ampel-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.ampel-item span:first-child {
  font-weight: 800;
  min-width: 1rem;
}

.ampel-item.ok {
  color: #a7f3d0;
}

.ampel-item.soft {
  color: #fcd34d;
}

.ampel-item.fail {
  color: #fca5a5;
}

@media (max-width: 560px) {
  .ampel {
    margin: 0 12px 8px;
  }
  .ampel-summary {
    padding: 9px 12px;
  }
}

/* —— Team Post Pack —— */
.post-pack {
  margin: 0 18px;
  padding: 14px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 12%, var(--bg-soft)),
    var(--bg-soft)
  );
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-pack-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.post-pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pack-progress {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.28);
  color: #f5e6a3;
}

.post-checklist.live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.post-checklist.live li {
  font-size: 0.78rem;
  opacity: 0.72;
  padding: 0.25rem 0.4rem 0.25rem 1.4rem;
  position: relative;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
}

.post-checklist.live li::before {
  content: "○";
  position: absolute;
  left: 0.35rem;
  opacity: 0.6;
}

.post-checklist.live li.done {
  opacity: 1;
  color: #9be7a8;
  background: rgba(80, 180, 100, 0.12);
}

.post-checklist.live li.done::before {
  content: "✓";
  opacity: 1;
}

.post-checklist.live li.skip {
  opacity: 0.45;
  text-decoration: line-through;
}

.post-checklist.live li.skip::before {
  content: "–";
}

.post-pack-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.55rem 0 0.25rem;
}

@media (max-width: 520px) {
  .post-checklist.live {
    grid-template-columns: 1fr;
  }
}

.post-pack-step {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--brand) 70%, white);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.post-checklist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-checklist li {
  font-size: 0.72rem;
  line-height: 1.3;
  padding: 8px 8px 8px 28px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  color: var(--muted);
  position: relative;
}

.post-checklist li::before {
  content: "☐";
  position: absolute;
  left: 8px;
  top: 7px;
  font-size: 0.85rem;
}

.post-checklist li.done {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.post-checklist li.done::before {
  content: "☑";
  color: #34d399;
}

.post-checklist li.skip {
  opacity: 0.45;
  text-decoration: line-through;
}

.post-checklist li.skip::before {
  content: "—";
}

.post-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .post-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}

.btn.action {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.15s ease;
}

.btn.action.big {
  min-height: 52px;
  font-size: 0.95rem;
}

.btn.action .n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 800;
}

.btn.action.primary {
  background: color-mix(in srgb, var(--brand) 28%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}

.btn.action.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 40%, var(--bg-elev));
}

.btn.action.accent {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
  color: #d1fae5;
}

.btn.action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.posted-on {
  background: rgba(52, 211, 153, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #a7f3d0 !important;
}

.post-pack-hint {
  margin: 0;
  font-size: 0.78rem;
}

.post-text.comment {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
  max-height: 120px;
  font-size: 0.88rem;
}

.hashtag-line {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #c4b5fd;
  word-break: break-word;
}

/* collapsible BP */
.bp-panel {
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background: color-mix(in srgb, var(--brand) 8%, var(--bg-soft));
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}

.bp-panel > summary.bp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.bp-panel > summary::-webkit-details-marker {
  display: none;
}

.bp-panel .bp-body {
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* sticky mobile bar */
.sticky-actions {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 8, 12, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  gap: 8px;
  justify-content: stretch;
}

.sticky-actions .btn.action {
  flex: 1;
  justify-content: center;
  min-height: 48px;
  font-size: 0.82rem;
  padding: 10px 6px;
}

.sticky-actions.hidden {
  display: none !important;
}

/* —— Tablet / Mobile —— */
@media (max-width: 920px) {
  .day-nav,
  .kbd-hint,
  #btnBrandPack,
  #btnShareLink {
    display: none !important;
  }

  .app {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
    max-width: 100%;
  }

  /* Header: brand + controls stack cleanly */
  .top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .brand-mark h1 {
    font-size: 1.05rem;
  }

  .brand-mark .sub {
    font-size: 0.78rem;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
  }

  .lang-bar {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .lang-seg {
    flex: 1;
    display: flex;
  }

  .lang-seg button {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.85rem;
  }

  .top-actions .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 10px;
  }

  /* Today strip full-width CTA */
  .today-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .today-strip-title {
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .today-strip .btn {
    width: 100%;
    min-height: 46px;
  }

  .onboard-inner {
    flex-direction: column;
    padding: 12px;
  }

  .onboard-list {
    font-size: 0.82rem;
  }

  .onboard .btn {
    width: 100%;
  }

  /* Calendar compact */
  .calendar-panel {
    padding: 10px;
    margin-bottom: 12px;
  }

  .cal-brand-hint {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .cal-legend {
    gap: 6px 10px;
    font-size: 0.65rem;
  }

  .cal-toolbar {
    gap: 6px;
  }

  .cal-month-title {
    font-size: 0.92rem;
  }

  .cal-weekdays,
  .cal-grid {
    gap: 3px;
  }

  .cal-weekdays span {
    font-size: 0.62rem;
  }

  .cal-cell {
    min-height: 44px;
    padding: 4px 3px;
    border-radius: 8px;
  }

  .cal-cell .dnum {
    font-size: 0.75rem;
  }

  .cal-cell .dtheme {
    font-size: 0.5rem;
    -webkit-line-clamp: 2;
    line-height: 1.15;
  }

  .team-plan {
    margin-top: 10px;
  }

  .team-plan-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
  }

  .tp-date {
    font-size: 0.72rem;
  }

  .tp-title {
    font-size: 0.85rem;
  }

  /* Day banner */
  .day-banner {
    margin-bottom: 10px;
  }

  .day-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .day-banner-text h2 {
    font-size: 1.05rem;
    line-height: 1.25;
    word-break: break-word;
  }

  .day-theme-line {
    font-size: 0.9rem;
  }

  .day-banner .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Plan panel */
  .plan-panel {
    padding: 12px;
    margin-bottom: 12px;
  }

  .plan-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .plan-title {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .plan-panel-actions {
    width: 100%;
  }

  .plan-panel-actions .btn {
    flex: 1;
    min-height: 44px;
  }

  .plan-alt {
    gap: 6px;
  }

  .plan-chip {
    font-size: 0.75rem;
    padding: 8px 10px;
    min-height: 44px;
  }

  .idea-row {
    grid-template-columns: 1fr;
  }

  .idea-row .btn {
    width: 100%;
    min-height: 46px;
  }

  /* Brands: three equal logo chips */
  .brand-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 4px;
    margin-bottom: 12px;
  }

  .brand-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    padding: 10px 8px;
  }

  .brand-tab img {
    width: 100%;
    max-width: 100px;
    height: 32px;
  }

  /* Workspace single column */
  .workspace {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
  }

  .platform-rail {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .platform-btn {
    white-space: nowrap;
    min-height: 44px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .stage {
    min-height: 0;
    border-radius: 14px;
  }

  .stage-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px;
  }

  .stage-head {
    padding: 12px 10px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .stage-head-left {
    min-width: 0;
  }

  .stage-head h3 {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .meta-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Media / visual — readable on phone */
  .media-frame {
    max-height: none;
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 12px;
  }

  .visual-stack {
    min-height: 0;
  }

  .visual-stack__media {
    flex: 0 0 56%;
  }

  .visual-stack__panel,
  .visual-stack__overlay {
    flex: 1 1 44%;
    padding: 12px 12px 14px;
    gap: 8px;
  }

  .vo-headline {
    font-size: clamp(0.95rem, 4.2vw, 1.2rem);
  }

  .vo-body {
    font-size: 0.78rem;
  }

  .vo-row {
    min-height: 44px;
    padding: 8px 10px;
    grid-template-columns: 28px 1fr;
    gap: 8px;
  }

  .vo-icon {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  /* Post pack */
  .post-pack {
    margin: 0 10px 8px;
    padding: 12px;
  }

  .post-pack-hint {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .post-text,
  .post-text.comment,
  .post-text.script,
  .hashtag-line {
    font-size: 0.88rem;
    max-height: 36vh;
    overflow: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
  }

  .stage-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .stage-footer .btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }

  .progress {
    width: 100%;
    text-align: center;
    order: -1;
  }

  .text-panel {
    gap: 8px;
    min-width: 0;
  }

  .text-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .theme-form {
    padding: 12px;
  }

  .theme-form-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }

  .plan-alt {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .plan-chip {
    flex: 0 0 auto;
  }

  /* Visual panel scroll if copy long */
  .visual-stack__panel,
  .visual-stack__overlay {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Tablet (561–920): roomier, no sticky dual-UI —— */
@media (min-width: 561px) and (max-width: 920px) {
  .app {
    padding: 14px 16px 28px;
    max-width: 100%;
    overflow-x: clip;
  }

  .brand-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 10px;
    justify-content: stretch;
  }

  /* 3 equal brand chips — no horizontal force */
  .brand-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 56px;
    padding: 12px 10px;
  }

  .brand-tab img {
    width: 100%;
    max-width: 120px;
    height: 36px;
    object-fit: contain;
  }

  .platform-rail {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
  }

  .platform-btn {
    flex: 0 0 auto;
  }

  .post-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .post-actions .btn.action {
    min-height: 50px;
    font-size: 0.9rem;
  }

  .sticky-actions {
    display: none !important;
  }

  .olymp-meta {
    gap: 8px;
  }

  .review-field input {
    min-height: 44px;
  }

  .media-frame {
    max-height: min(70vh, 640px);
    aspect-ratio: 3 / 4;
    margin: 0 auto;
  }

  .visual-stack__media {
    flex: 0 0 58%;
  }

  .visual-stack__panel,
  .visual-stack__overlay {
    flex: 1 1 42%;
    padding: 16px 18px;
  }

  .cal-cell .dtheme {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    font-size: 0.58rem;
  }

  .cal-cell {
    min-height: 52px;
  }

  .stage-footer .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .team-plan-item {
    grid-template-columns: 7.5rem 1fr auto;
  }

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

/* —— Phone (≤560): sticky post bar, minimal chrome —— */
@media (max-width: 560px) {
  .app {
    padding: 8px 8px calc(96px + env(safe-area-inset-bottom));
    max-width: 100%;
    overflow-x: clip;
  }

  h1 {
    font-size: 0.98rem;
  }

  .lang-bar-label {
    display: none;
  }

  .top-actions {
    grid-template-columns: 1fr auto auto auto;
  }

  #btnToggleCal {
    font-size: 0.8rem;
    padding: 8px;
  }

  .cal-legend .leg.empty,
  .cal-legend .leg.partial {
    display: none;
  }

  .cal-cell {
    min-height: 40px;
  }

  .cal-cell .dtheme {
    display: none;
  }

  .cal-cell.selected .dtheme,
  .cal-cell.today .dtheme,
  .cal-cell.status-ready .dtheme {
    display: -webkit-box;
  }

  .brand-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: none;
  }

  .brand-tabs::-webkit-scrollbar {
    display: none;
  }

  .brand-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 6px;
  }

  .brand-tab img {
    width: 100%;
    max-width: 96px;
    height: 30px;
    object-fit: contain;
  }

  /* 7 channels: swipe, last pill reachable above sticky */
  .platform-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding: 2px 4px 10px;
    margin: 0 -4px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 8px;
  }

  .platform-btn {
    min-height: 44px;
    min-width: max-content;
    padding: 10px 12px;
    scroll-snap-align: start;
  }

  .media-frame {
    aspect-ratio: 4 / 5;
    max-height: min(68vh, 480px);
    max-width: 100%;
  }

  .visual-stack__media {
    flex: 0 0 56%;
  }

  .visual-stack.mode-theme .visual-stack__media {
    flex: 0 0 36%;
  }

  .visual-stack__panel,
  .visual-stack__overlay {
    flex: 1 1 44%;
    padding: 10px 11px 12px;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vo-headline {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    overflow-wrap: anywhere;
  }

  .vo-row {
    min-height: 42px;
  }

  .team-plan {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .team-plan-head {
    flex-direction: column;
    gap: 2px;
  }

  .plan-chip .reason {
    display: none;
  }

  /* Sticky is primary CTA on phone */
  .post-actions {
    display: none !important;
  }

  .sticky-actions {
    display: flex !important;
    gap: 6px;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-right));
    z-index: 50;
  }

  .sticky-actions.hidden {
    display: none !important;
  }

  .sticky-actions .btn.action {
    font-size: 0.7rem;
    border-radius: 12px;
    padding: 8px 2px;
    min-height: 48px;
    min-width: 0;
    line-height: 1.15;
  }

  .post-checklist {
    grid-template-columns: 1fr;
  }

  .stage-footer .btn {
    flex: 1 1 100%;
  }

  .today-strip-meta {
    font-size: 0.78rem;
  }

  .stock-warn {
    font-size: 0.75rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  /* Olymp panels: touch + margins match 8px app pad */
  .ampel,
  .engage-panel,
  .review-panel,
  .post-pack {
    margin-left: 0;
    margin-right: 0;
  }

  .ampel-summary,
  .engage-summary,
  .review-summary {
    min-height: 44px;
  }

  .review-field input {
    min-height: 44px;
    font-size: 16px; /* iOS zoom prevent */
  }

  .olymp-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .olymp-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .carousel-beats {
    font-size: 0.82rem;
    padding-left: 1.1rem;
  }

  .post-text,
  .post-text.comment,
  .post-text.script {
    max-height: 32vh;
    font-size: 0.86rem;
  }
}

/* —— Short landscape (phone/tablet rotate) —— */
@media (max-width: 920px) and (max-height: 500px) {
  .app {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* Post first: collapse calendar block if open */
  .calendar-panel:not(.collapsed) {
    max-height: 32vh;
    overflow: auto;
  }

  .media-frame {
    max-height: min(52vh, 300px);
  }

  .visual-stack__media {
    flex: 0 0 52%;
  }

  .cal-grid {
    max-height: 22vh;
    overflow-y: auto;
  }

  .cc-panel {
    display: none; /* reclaim height; captions still in video burn-in */
  }

  .sticky-actions .btn.action {
    min-height: 44px;
    font-size: 0.68rem;
  }

  .today-strip {
    padding: 8px 10px;
  }

  .onboard {
    display: none; /* reclaim height after first sessions */
  }
}

/* Desktop: never sticky */
@media (min-width: 921px) {
  .sticky-actions {
    display: none !important;
  }

  .post-actions {
    display: grid;
  }
}

.stage {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 0;
}

.stage-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

.stage-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: fadeIn 0.22s ease;
}

.stage-content.hidden,
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.stage-head-left {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.brand-logo {
  width: 88px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1220;
  border: 1px solid var(--border);
}

.meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.cb-pill,
.platform-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.platform-pill {
  color: color-mix(in srgb, var(--brand) 80%, white);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}

.stage-head h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.stage-head-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) 1fr;
  gap: 18px;
  padding: 16px 18px;
  flex: 1;
}

.media-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: min(620px, 85vh);
  min-height: 280px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

/* —— Inclusive video: captions overlay (CEO 2026-07-20) —— */
.video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
  display: block;
}

.video-cc {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  max-width: 92%;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fffef9;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.8cqi, 1.15rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.video-cc.hidden {
  display: none;
}

.cc-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-panel .post-text {
  max-height: 8rem;
  overflow-y: auto;
  font-size: 0.82rem;
}

/* —— Premium Visual Stack —— */
.visual-stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  background: #050608;
  container-type: size;
  container-name: visual;
}

.visual-stack__media {
  position: relative;
  /* Default split (plan mode / legacy); cinema-box overrides to full-bleed */
  flex: 0 0 60%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

/* —— Cinema textbox ON image (CEO 2026-07-20) —— */
.visual-stack.template-cinema-box.mode-pack {
  display: block;
}

.visual-stack.template-cinema-box.mode-pack .visual-stack__media {
  position: absolute;
  inset: 0;
  flex: none;
  width: 100%;
  height: 100%;
}

.visual-stack.template-cinema-box.mode-pack .visual-stack__bg {
  object-fit: cover;
  object-position: center 28%;
}

.visual-stack.template-cinema-box.mode-pack .visual-stack__scrim {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.08) 42%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.visual-stack.template-cinema-box.mode-pack .vo-cinema-layer,
.visual-stack.template-cinema-box.mode-pack .visual-stack__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  flex: none;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
  padding: clamp(12px, 3.5cqi, 20px);
  background: transparent !important;
  border: none;
  overflow: visible;
  pointer-events: none;
}

.vo-textbox {
  width: 100%;
  max-width: 100%;
  padding: clamp(14px, 3.8cqi, 20px) clamp(16px, 4cqi, 22px);
  border-radius: clamp(14px, 3.5cqi, 22px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 42%),
    rgba(8, 12, 18, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
}

.vo-textbox::before {
  content: "";
  display: block;
  width: 42%;
  max-width: 120px;
  height: 3px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: var(--vo-accent, #2b9fd9);
  box-shadow: 0 0 12px color-mix(in srgb, var(--vo-accent, #2b9fd9) 60%, transparent);
}

.vo-textbox .vo-headline {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 5.4cqi, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fffef9;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.vo-textbox .vo-line {
  margin: 0 0 4px;
  font-size: clamp(0.78rem, 3.2cqi, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  color: #e5e7eb;
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.vo-textbox .vo-footer {
  margin: 8px 0 0;
  font-size: clamp(0.7rem, 2.8cqi, 0.82rem);
  color: #c4c9d4;
}

.vo-textbox .vo-url {
  margin: 8px 0 0;
  font-size: clamp(0.62rem, 2.4cqi, 0.72rem);
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
}

.visual-stack__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.visual-stack__scrim {
  display: none;
}

/* Opaque cinema panel — guaranteed contrast for DE/EN/HI */
.visual-stack__panel,
.visual-stack__overlay {
  flex: 1 1 40%;
  min-height: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.8cqi, 12px);
  padding: clamp(12px, 3.5cqi, 20px) clamp(12px, 4cqi, 18px) clamp(14px, 3cqi, 18px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.55) 0%, rgba(8, 10, 14, 0.97) 18%),
    #0a0c10;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: none;
}

.vo-row--no-icon {
  grid-template-columns: 1fr;
}

.visual-stack.mode-theme .visual-stack__media {
  flex: 0 0 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--vo-accent, #a78bfa) 35%, transparent), transparent 65%),
    #080a0e;
}

.visual-stack.mode-theme .visual-stack__bg {
  width: auto;
  height: 58%;
  max-width: 42%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

.visual-stack.mode-theme .visual-stack__panel {
  flex: 1 1 62%;
  text-align: center;
  align-items: center;
}

/* Shared type */
.vo-headline {
  margin: 0;
  font-size: clamp(1.05rem, 5.2cqi, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: #fffef9;
  max-width: 100%;
}

.vo-sub {
  margin: 0;
  font-size: clamp(0.8rem, 3.4cqi, 0.98rem);
  font-weight: 500;
  line-height: 1.35;
  color: #d1d5db;
  white-space: pre-line;
  text-wrap: balance;
}

.vo-footer {
  margin: 4px 0 0;
  font-size: clamp(0.72rem, 2.8cqi, 0.85rem);
  font-weight: 500;
  color: #c4c9d4;
  text-wrap: balance;
}

.vo-url {
  margin: 2px 0 0;
  font-size: clamp(0.62rem, 2.4cqi, 0.72rem);
  color: #8b93a7;
  letter-spacing: 0.02em;
  word-break: break-all;
}

/* Bars template (Friedenstaube) */
.visual-overlay--bars,
.template-bars .visual-stack__panel,
.template-stack-bars .visual-stack__panel {
  gap: clamp(8px, 2cqi, 12px);
}

.vo-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.6cqi, 10px);
  width: 100%;
}

.vo-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  background: color-mix(in srgb, var(--vo-accent, #2b9fd9) 88%, #041018);
  border: 1px solid color-mix(in srgb, var(--vo-accent, #2b9fd9) 55%, #fff);
  border-radius: 12px;
  padding: 9px 11px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  min-height: 48px;
}

.vo-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.vo-row-text {
  min-width: 0;
  text-align: left;
}

.vo-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.vo-body {
  display: block;
  font-size: clamp(0.75rem, 3.1cqi, 0.88rem);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2px;
  color: #fff;
  overflow-wrap: anywhere;
}

.visual-overlay--bars .vo-headline,
.template-bars .vo-headline,
.template-stack-bars .vo-headline {
  text-align: center;
  width: 100%;
}

.visual-overlay--bars .vo-footer,
.visual-overlay--bars .vo-url {
  text-align: center;
  width: 100%;
}

/* Brights hero-left — panel still solid, left-aligned type */
.template-hero-left .visual-stack__panel,
.visual-overlay--hero-left {
  align-items: flex-start;
  text-align: left;
  justify-content: flex-end;
  padding-bottom: clamp(16px, 4cqi, 24px);
}

.template-hero-left .visual-stack__media {
  flex: 0 0 62%;
}

.template-hero-left .visual-stack__bg {
  object-position: center 25%;
}

.template-hero-left .vo-headline {
  font-size: clamp(1.2rem, 6cqi, 1.75rem);
  white-space: pre-line;
}

.template-hero-left .vo-url {
  align-self: stretch;
  text-align: center;
  margin-top: 8px;
}

/* Hero-center (Honeybadger + Friedenstaube flyer/hero packs) */
.template-hero-center .visual-stack__panel,
.visual-overlay--hero-center {
  align-items: center;
  text-align: center;
  justify-content: flex-end;
  padding: 8% 8% 10%;
  gap: 0.35rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.55) 72%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.template-hero-center .visual-stack__media {
  flex: 0 0 60%;
}

.template-hero-center .visual-stack__bg {
  object-position: center 40%;
}

.template-hero-center .vo-headline {
  color: var(--vo-accent, #e0b33a);
  font-size: clamp(1.25rem, 6cqi, 1.85rem);
  white-space: pre-line;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.template-hero-center .vo-sub {
  color: #e8eaef;
  font-size: clamp(0.78rem, 3.2cqi, 0.95rem);
  line-height: 1.35;
  white-space: pre-line;
  max-width: 92%;
  opacity: 0.95;
}

.template-hero-center .vo-url {
  color: #9aa3b5;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.vo-rule {
  width: min(36%, 120px);
  height: 2px;
  margin: 2px 0;
  border: none;
  background: linear-gradient(90deg, transparent, var(--vo-accent, #d4a017), transparent);
}

/* Theme card (PLAN mode — no wrong campaign story) */
.theme-card-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--vo-accent, #a78bfa) 80%, #fff);
}

.theme-card-title {
  margin: 0;
  font-size: clamp(1.2rem, 5.5cqi, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
  color: #fffef9;
}

.theme-card-topic {
  margin: 0;
  font-size: clamp(0.85rem, 3.4cqi, 1rem);
  color: #c8ceda;
  text-wrap: balance;
}

.theme-card-note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #8b93a7;
  line-height: 1.35;
  max-width: 28ch;
}

.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.media-frame .visual-stack.hidden,
.media-frame video.hidden {
  display: none !important;
}

.media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.media-hint {
  font-size: 0.8rem;
}

.text-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.bp-format-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  color: #f3f4f6;
  max-width: 100%;
}

.bp-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.78rem;
  color: #d1d5db;
}

.bp-specs .bp-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bp-specs .bp-spec strong {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.bp-do,
.bp-avoid {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #e5e7eb;
}

.bp-do {
  color: #bbf7d0;
}

.bp-avoid {
  color: #fecaca;
}

.bp-do li::marker {
  content: "✓ ";
  color: #34d399;
}

.bp-avoid li::marker {
  content: "✗ ";
  color: #f87171;
}

.bp-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.bp-hint.ok {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
}

.bp-hint.warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.bp-hint.info {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.28);
  color: #ddd6fe;
}

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

.text-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  max-height: 340px;
  overflow: auto;
}

.post-text.script {
  font-family: var(--mono);
  font-size: 0.82rem;
  max-height: 160px;
  color: #d1d5db;
}

.notes {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: #d1fae5;
  font-size: 0.9rem;
}

.stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
}

.progress {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 50;
  font-weight: 600;
  font-size: 0.9rem;
}

.toast.hidden {
  display: none;
}

.kbd-hint {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 18px;
}

/* Note: phone/tablet/desktop layout lives in structured blocks above.
   Do not re-override .app padding or .media-frame max-height here —
   that broke sticky clearance (≤560) and tablet stage height. */
