/* Frittomatic workspace: shared visual system for all webinterface pages. */
:root {
  color-scheme: dark;
  --bg-body: #0e0e10;
  --bg-rail: #18181b;
  --bg-panel: #18181b;
  --bg-surface: #18181b;
  --bg-surface-hover: #26262c;
  --bg-control: #101013;
  --surface-2: #26262c;
  --border: #303036;
  --border-strong: #686173;
  --text-1: #efeff1;
  --text-2: #d3d0d9;
  --text-3: #b0aab9;
  --text-4: #9b94a4;
  --cyan: #a970ff;
  --violet: #bf94ff;
  --pink: #d6b7ff;
  --lime: #65dca4;
  --accent: #bf94ff;
  --accent-solid: #9146ff;
  --red: #ff828b;
  --cyan-a15: #281b3c;
  --cyan-a25: #59407c;
  --violet-a15: #2c2040;
  --violet-a25: #62468b;
  --pink-a15: #30203f;
  --pink-a25: #684a81;
  --lime-a15: #162e25;
  --lime-a25: #305b47;
  --accent-a15: #291c40;
  --accent-a25: #674494;
  --brand-gradient: linear-gradient(100deg, #bf94ff, #a970ff);
  --headline-gradient: linear-gradient(100deg, #efeff1, #d3d0d9);
  --glow-color: var(--accent);
  --glow-border: var(--accent-a25);
  --glow-card-shadow: transparent;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-1);
}
.glow-cyan { --glow-color: var(--cyan); --glow-border: var(--cyan-a25); --glow-bg: var(--cyan-a15); }
.glow-violet { --glow-color: var(--violet); --glow-border: var(--violet-a25); --glow-bg: var(--violet-a15); }
.glow-pink { --glow-color: var(--pink); --glow-border: var(--pink-a25); --glow-bg: var(--pink-a15); }
.glow-lime { --glow-color: var(--lime); --glow-border: var(--lime-a25); --glow-bg: var(--lime-a15); }
.glow-accent { --glow-color: var(--accent); --glow-border: var(--accent-a25); --glow-bg: var(--accent-a15); }
html, body { min-height: 100%; background: var(--bg-body); }
body { margin: 0; color: var(--text-1); font-size: 0.9375rem; line-height: 1.6; }
body.modal-open { overflow: hidden; }
::selection { background: var(--accent-a25); color: var(--text-1); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
[hidden] { display: none !important; }
.app { min-height: 100vh; }
.app-main { display: flex; flex-direction: column; min-height: calc(100vh - 132px); }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 200; padding: 0.7rem 1rem; border-radius: 8px; background: var(--bg-surface); color: var(--accent); }
.skip-link:focus { top: 1rem; }
.site-header { position: relative; z-index: 40; background: var(--bg-rail); color: #efeff1; }
.header-main { display: flex; align-items: center; gap: 1.4rem; max-width: 1480px; height: 80px; margin: auto; padding: 0 2.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0; color: #fff; font: 800 1.5rem "Manrope", sans-serif; letter-spacing: -0.07em; text-decoration: none; }
.brand-symbol { display: grid; place-items: center; width: 35px; height: 38px; border-radius: 11px; color: #ffffff; background: var(--accent-solid); font-size: 1.2rem; transform: rotate(-6deg); }
.brand-dot { color: var(--accent-solid); }
.header-divider { width: 1px; height: 24px; background: var(--border); }
.header-caption { color: var(--text-3); font-size: 0.78rem; }
.header-actions { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; min-width: 0; }
.header-user { flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 0.65rem; font-size: 0.8rem; font-weight: 600; }
.user-chip a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); }
.user-chip a:hover { background: var(--bg-surface-hover); color: white; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.primary-navigation { border-top: 1px solid var(--border); }
.nav-links { display: flex; align-items: center; gap: 0.2rem; max-width: 1480px; padding: 0 2.5rem; margin: auto; }
.nav-link { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 52px; padding: 0 0.85rem; white-space: nowrap; color: var(--text-3); font-size: 0.78rem; font-weight: 500; text-decoration: none; transition: color 150ms, background 150ms; }
.nav-link i { font-size: 0.93rem; opacity: 0.8; }
.nav-link:hover { color: white; background: #291e3c; }
.nav-link.active { color: #e0caff; background: #291e3c; }
.nav-link.active::after { position: absolute; bottom: 0; left: 0.85rem; right: 0.85rem; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent-solid); content: ""; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; color: white; background: transparent; font-size: 1.5rem; cursor: pointer; }
.channel-switcher { position: relative; min-width: 0; }
.channel-switcher__current { display: flex; align-items: center; gap: 0.65rem; padding: 0.45rem 0.65rem; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; list-style: none; }
.channel-switcher__current::-webkit-details-marker { display: none; }
.channel-switcher__avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; object-fit: cover; }
.channel-switcher__avatar--fallback { display: grid; place-items: center; background: var(--accent-a15); color: var(--accent); }
.channel-switcher__meta { display: grid; min-width: 0; line-height: 1.35; }
.channel-switcher__meta strong { overflow: hidden; text-overflow: ellipsis; max-width: 150px; font-size: 0.8rem; font-weight: 600; }
.channel-switcher__eyebrow, .channel-switcher__meta span { color: var(--text-3); font-size: 0.62rem; }
.channel-switcher__chevron { margin-left: 0.75rem; font-size: 0.65rem; }
.channel-switcher[open] .channel-switcher__chevron { transform: rotate(180deg); }
.channel-switcher__panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 320px; max-width: calc(100vw - 32px); padding: 0.8rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); color: var(--text-1); box-shadow: 0 16px 50px #00000066; }
.channel-switcher__panel-head { margin: 0.2rem 0.3rem 0.8rem; font-size: 0.8rem; }
.channel-switcher__search { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text-3); background: var(--bg-control); }
.channel-switcher__search input { min-width: 0; width: 100%; border: 0; outline: none; color: var(--text-1); background: transparent; font-size: 0.8rem; }
.channel-switcher__search:focus-within { outline: 2px solid var(--accent); }
.channel-switcher__list { display: grid; gap: 0.3rem; max-height: 300px; margin-top: 0.6rem; overflow-y: auto; }
.channel-switcher__option { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: 8px; text-decoration: none; color: var(--text-1); }
.channel-switcher__option:hover, .channel-switcher__option.active { background: var(--accent-a15); }
.channel-switcher__option .channel-switcher__meta span { color: var(--text-3); }
.channel-switcher__badge { margin-left: auto; font-size: 0.6rem; color: var(--accent); }
#main-content { width: 100%; max-width: 1400px; margin: auto; padding: 2rem 2.5rem 4rem; flex: 1; outline: none; }
.workspace-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; color: var(--text-3); font-size: 0.72rem; }
.workspace-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.workspace-label__end { margin-left: auto; color: var(--text-4); }
.content-shell > div { margin-inline: auto; }
.content-shell section { min-width: 0; }
main h1, main h2, main h3 { font-family: "Manrope", "DM Sans", sans-serif; letter-spacing: -0.04em; }
main h1 { font-weight: 800; line-height: 1.25; }
main h1 i { color: var(--accent); font-size: 0.75em; }
.gradient-text { color: var(--text-1); }
.page-title-icon { margin-right: 0.35rem; vertical-align: 0.03em; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; width: calc(100% - 5rem); max-width: 1320px; padding: 1.5rem 0; margin: 0 auto; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.72rem; }
.site-footer > span { grid-column: 2; text-align: center; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer .footer-brand { justify-self: start; font: 800 1.1rem "Manrope", sans-serif; letter-spacing: -0.06em; }
.footer-heart { color: #d6b7ff; }
/* Overview */
.overview-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.7rem; }
.overview-heading h1 { margin-bottom: 0.5rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.overview-heading p { color: var(--text-3); font-size: 0.9rem; }
.overview-tag { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 100px; color: var(--text-2); font-size: 0.7rem; background: var(--bg-surface); }
.hero-panel { position: relative; display: grid; grid-template-columns: 1.25fr 0.85fr; overflow: hidden; min-height: 340px; padding: 3rem; border: 1px solid #49345f; border-radius: 20px; background: radial-gradient(ellipse at 85% 45%, #3b1c5a 0%, transparent 60%), #1c1526; }
.hero-content { position: relative; z-index: 2; align-self: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.3rem; color: #bf94ff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-title { max-width: 620px; color: #f5efff; font-size: clamp(2.1rem, 4.6vw, 3.8rem); font-weight: 800; letter-spacing: -0.065em; line-height: 1.08; }
.hero-title span { color: #bf94ff; }
.hero-copy { max-width: 410px; margin-top: 1.3rem; color: #c3b7d1; font-size: 0.9rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.8rem; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 270px; }
.orbit { position: absolute; width: 260px; height: 260px; border: 1px solid #61427c; border-radius: 50%; transform: rotate(-22deg) scaleX(1.25); }
.orbit--outer { width: 350px; height: 350px; opacity: 0.5; }
.orbit-center { display: grid; place-items: center; width: 126px; height: 126px; border: 9px solid #3b2851; border-radius: 34px; background: #9146ff; color: #ffffff; font-size: 3.4rem; box-shadow: 0 20px 40px #00000040; transform: rotate(-12deg); }
.orbit-card { position: absolute; display: flex; align-items: center; gap: 0.65rem; padding: 0.8rem 1rem; border: 1px solid #49345f; border-radius: 12px; background: #261d33f2; color: #e6dbf5; box-shadow: 0 8px 20px #00000026; font-size: 0.77rem; font-weight: 600; }
.orbit-card i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #3b2851; color: #bf94ff; }
.orbit-card--chat { top: 10%; left: 0; transform: rotate(-5deg); }
.orbit-card--community { top: 46%; right: -5%; transform: rotate(6deg); }
.orbit-card--stream { bottom: 0; left: 10%; transform: rotate(-4deg); }
.overview-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0 3rem; }
.overview-strip__item { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface); }
.overview-strip__item > i { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--accent-a15); color: var(--accent); font-size: 1.1rem; }
.overview-strip__item strong { display: block; font-size: 0.85rem; font-weight: 700; }
.overview-strip__item span { color: var(--text-3); font-size: 0.72rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-code { display: block; margin-bottom: 0.4rem; color: var(--accent); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.section-title { font-size: 1.5rem; font-weight: 800; }
.section-copy { max-width: 380px; color: var(--text-3); font-size: 0.82rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { position: relative; display: flex; flex-direction: column; align-items: start; min-width: 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); text-decoration: none; color: var(--text-1); transition: border-color 180ms, transform 180ms, box-shadow 180ms; }
a.feature-card:hover { border-color: var(--glow-border); transform: translateY(-3px); box-shadow: 0 8px 22px #00000033; }
.feature-icon, .card-icon, .channel-stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--glow-color); background: var(--glow-bg, var(--accent-a15)); font-size: 1.15rem; }
.feature-card h3 { margin-top: 1.1rem; font-size: 1rem; font-weight: 800; }
.feature-card p { margin: 0.55rem 0 1.2rem; color: var(--text-3); font-size: 0.8rem; line-height: 1.75; }
.feature-card__link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--glow-color); font-size: 0.72rem; font-weight: 700; }
.feature-number { position: absolute; top: 1.6rem; right: 1.5rem; font-size: 0.65rem; color: var(--text-4); }
.overview-note { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: 1.25rem 1.5rem; border: 1px dashed #584368; border-radius: 12px; color: var(--text-2); font-size: 0.8rem; }
.overview-note > i { color: var(--accent); font-size: 1.4rem; }
.overview-note a { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }
/* Surfaces, actions, forms and data */
.glass, .card, .connect-row { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); box-shadow: 0 2px 3px #0000001a; }
.card { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.65rem; min-height: 10rem; padding: 1.5rem; color: var(--text-1); text-decoration: none; transition: border-color 180ms, transform 180ms; }
a.card:hover { transform: translateY(-2px); border-color: var(--glow-border); }
.card-title { font-size: 1rem; font-weight: 700; }
.card-desc { color: var(--text-3); font-size: 0.82rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 40px; padding: 0.6rem 1rem; border: 1px solid transparent; border-radius: 9px; font-size: 0.8rem; font-weight: 600; line-height: 1.25; text-decoration: none; cursor: pointer; transition: background 150ms, box-shadow 150ms; }
.btn-primary { background: var(--accent-solid); color: white; box-shadow: 0 2px 3px #00000033; }
.btn-primary:hover { background: #772ce8; box-shadow: 0 3px 9px #9146ff33; }
.btn-ghost { background: var(--bg-surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-surface-hover); border-color: #674494; color: var(--accent); }
.nav-login { min-height: 36px; background: var(--accent-solid); color: #ffffff; }
.nav-login:hover { background: #a970ff; }
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border: 1px solid var(--accent-a25); border-radius: 6px; color: var(--accent); background: var(--accent-a15); font-size: 0.69rem; font-weight: 600; }
.fm-input, .fm-textarea { width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #424249; border-radius: 8px; outline: none; background: var(--bg-control); color: var(--text-1); font-size: 0.85rem; transition: border-color 150ms, box-shadow 150ms; }
.fm-textarea { min-height: 10rem; resize: vertical; line-height: 1.7; }
.fm-input:focus, .fm-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-a15); background: var(--bg-surface); }
.fm-input::placeholder, .fm-textarea::placeholder { color: var(--text-4); }
.fm-label { display: block; margin-bottom: 0.45rem; color: var(--text-2); font-size: 0.77rem; font-weight: 600; }
.alert { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border: 1px solid; border-radius: 10px; font-size: 0.85rem; }
.alert-error { background: #331b23; border-color: #693440; color: #ff9ca4; }
.alert-success { background: var(--lime-a15); border-color: var(--lime-a25); color: #65dca4; }
.glass-table { position: relative; isolation: isolate; border-radius: 12px; }
.glass-table::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border: 1px solid var(--border); border-radius: inherit; background: var(--bg-surface); }
.glass-table__viewport { position: relative; z-index: 1; border-radius: inherit; overflow: hidden; }
.glass-table__viewport--scroll { overflow-x: auto; overflow-y: hidden; }
.glass-table__viewport--no-clip { overflow: visible; }
.glass-table table { width: 100%; border-collapse: collapse; }
.glass-table thead { border-bottom: 1px solid var(--border); background: #202024; }
.glass-table th { padding: 0.9rem 1.2rem; color: var(--text-3); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.glass-table td { padding: 1rem 1.2rem; font-size: 0.82rem; }
.glass-table tbody tr { border-bottom: 1px solid var(--border); transition: background 150ms; }
.glass-table tbody tr:last-child { border-bottom: 0; }
.glass-table tbody tr:hover { background: #222127; }
.glass-table .custom-command-schedule-column { min-width: 10.5rem; white-space: nowrap; }
.custom-command-schedule-badge { white-space: nowrap; }
.glass-table .rank-cell { width: 4rem; text-align: center; }
.rank-value { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; line-height: 1; }
.rank-value--number { color: var(--text-3); font-variant-numeric: tabular-nums; }
.rank-value--icon { font-size: 1.2rem; }
.rank-value--1 { color: #eac269; background: #352d1b; }
.rank-value--2 { color: #c4c3d0; background: #2d2d36; }
.rank-value--3 { color: #e4a97e; background: #35261e; }
.currency-icon { color: #eac269; font-size: 0.85em; vertical-align: 0.02em; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pagination a { display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-surface); color: var(--text-2); font-size: 0.78rem; text-decoration: none; }
.pagination a:hover { background: var(--accent-a15); }
.pagination a.active { background: var(--accent-solid); color: white; border-color: var(--accent); }
.breadcrumb { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1rem; color: var(--text-3); font-size: 0.8rem; text-decoration: none; }
.breadcrumb:hover { color: var(--accent); }
.page-tabs { position: relative; display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 0.35rem; padding: 0.25rem; border: 1px solid var(--border); border-radius: 10px; background: #111114; overflow-x: auto; }
.page-tab-indicator { position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0; z-index: 0; width: 0; opacity: 0; border-radius: 7px; background: var(--bg-surface); box-shadow: 0 1px 4px #00000033; transition: opacity 120ms, transform 220ms, width 220ms; }
.page-tab { position: relative; z-index: 1; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 0.4rem; min-height: 34px; padding: 0.45rem 0.85rem; border-radius: 7px; color: var(--text-3); font-size: 0.8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-tab:hover, .page-tab.active { color: var(--accent); }
.connect-row { display: flex; align-items: center; gap: 1rem; padding: 1.3rem; color: var(--text-1); text-decoration: none; transition: border-color 150ms, background 150ms; }
.connect-row:hover { border-color: var(--accent-a25); background: var(--bg-surface-hover); }
.error-status-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1.3rem; border-radius: 18px; background: var(--accent-a15); color: var(--accent); font-size: 2rem; }
.eyebrow { color: var(--accent); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.empty-panel { padding: 2rem; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--text-3); background: var(--bg-control); text-align: center; }
.tip { position: relative; }
.tip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; z-index: 50; padding: 0.4rem 0.6rem; border-radius: 6px; background: #303036; color: white; font-size: 0.68rem; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%); }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }

/* Stream planning and image preview */
.stream-plan-days {
  display: grid;
  gap: 1rem;
}

.stream-plan-days--compact {
  gap: 0.75rem;
}

.stream-plan-day {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 4px #0000001a;
}

.stream-plan-day--today {
  border-color: var(--accent-a25);
  background:
    linear-gradient(90deg, var(--accent-a15), transparent 42%),
    var(--bg-surface);
}

.stream-plan-day__header h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  color: var(--text-1);
  font-size: 1.1rem;
  font-weight: 800;
}

.stream-plan-today-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--accent-a25);
  border-radius: 0.28rem;
  background: var(--accent-a15);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stream-plan-slots {
  display: grid;
  gap: 0.6rem;
}

.stream-plan-slot {
  display: grid;
  grid-template-columns: max-content 3.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 4.8rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-control);
}

.stream-plan-slot--manage {
  grid-template-columns: max-content 3.4rem minmax(0, 1fr) auto;
}

.stream-plan-slot--editing {
  border-color: var(--accent-a25);
  background: var(--accent-a15);
}

.stream-plan-slot__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stream-plan-slot__time {
  display: grid;
  gap: 0.1rem;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stream-plan-slot__time span:last-child {
  color: var(--text-4);
}

.stream-plan-slot__cover {
  width: 3.4rem;
  aspect-ratio: 3 / 4;
  border-radius: 0.28rem;
  object-fit: cover;
  background: var(--bg-control);
}

.stream-plan-slot__cover--empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 1.3rem;
}

.stream-plan-slot__body {
  min-width: 0;
}

.stream-plan-slot__body h3 {
  overflow-wrap: anywhere;
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 800;
}

.stream-plan-slot__body p {
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
  color: var(--text-3);
  font-size: 0.82rem;
}

.stream-plan-empty-day {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 4.8rem;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--text-4);
  font-size: 0.86rem;
  font-weight: 700;
}

.stream-plan-empty-day--free {
  border-color: var(--accent-a25);
  background: var(--accent-a15);
  color: var(--text-2);
}

.stream-plan-empty-day--manage {
  justify-content: space-between;
}

.stream-plan-empty-day--manage span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.stream-plan-export-preview {
  position: relative;
  display: grid;
  align-self: start;
}

.stream-plan-export-preview__image-link {
  display: grid;
  aspect-ratio: 4 / 5;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 4px #0000001a;
  cursor: zoom-in;
  overflow: hidden;
}

.stream-plan-export-preview__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-control);
}

.stream-plan-export-preview__download {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  background: var(--bg-surface);
}

.stream-plan-preview-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.stream-plan-preview-modal[hidden] {
  display: none;
}

.stream-plan-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: zoom-out;
}

.stream-plan-preview-modal__content {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: min(78vw, 58rem);
  max-height: calc(100vh - 4rem);
}

.stream-plan-preview-modal__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  border: 1px solid var(--border);
  border-radius: 14px;
  object-fit: contain;
  background: var(--bg-control);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.stream-plan-preview-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: var(--bg-surface);
}

@media (min-width: 1280px) {
  .stream-plan-export-preview {
    position: sticky;
    top: 1rem;
  }
}

.game-search {
  position: relative;
}

.game-search-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  box-shadow: 0 10px 30px #00000055;
}

.game-search-result {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.game-search-result:last-child {
  border-bottom: 0;
}

.game-search-result:hover {
  background: var(--bg-surface-hover);
  color: var(--text-1);
}

.game-search-result img,
.game-search-result__fallback {
  width: 2.4rem;
  aspect-ratio: 3 / 4;
  border-radius: 0.22rem;
  object-fit: cover;
  background: var(--bg-control);
}

.game-search-result__fallback {
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.selected-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
  padding: 0.5rem 0.6rem 0.5rem 0.85rem;
  border: 1px solid var(--lime-a25);
  border-radius: 10px;
  background: var(--lime-a15);
  color: var(--text-1);
  font-size: 0.86rem;
  font-weight: 800;
}

@media (max-width: 760px) {
  .stream-plan-day {
    grid-template-columns: 1fr;
  }

  .stream-plan-slot,
  .stream-plan-slot--manage {
    grid-template-columns: max-content 3.4rem minmax(0, 1fr);
  }

  .stream-plan-slot__actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .stream-plan-empty-day--manage {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Channel metrics and emotes */
.channel-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.channel-stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.3rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); }
.channel-stat-value { font: 800 1.8rem "Manrope", sans-serif; font-variant-numeric: tabular-nums; }
.channel-stat-label { color: var(--text-3); font-size: 0.75rem; }
.channel-emote-sections { display: grid; gap: 1.5rem; }
.emote-box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.emote-big-box { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface); }
.emote-box { display: flex; align-items: center; justify-content: center; min-height: 70px; }
.emote-box img { max-width: 80px; max-height: 70px; object-fit: contain; }
/* Shared treatments for page-specific components. */
.content-shell .admin-tabs { border-radius: 10px; background: #111114; }
.content-shell .admin-tab-indicator { border-radius: 7px; background: var(--bg-surface); box-shadow: 0 1px 4px #00000033; }
.content-shell .admin-tab.active { color: var(--accent); }
.content-shell .admin-tab:hover { background: #322443; color: var(--accent); }
.content-shell .admin-stat, .content-shell .stat-card { border-radius: 12px; background: var(--bg-surface); }
.content-shell .stat-card { min-width: 0; overflow-x: auto; }
.content-shell .page-toggle-track { background: #424249; }
.content-shell .page-toggle input:checked + .page-toggle-track { background: var(--accent-solid); border-color: var(--accent-solid); box-shadow: none; }
.content-shell .page-toggle input:checked + .page-toggle-track .page-toggle-knob { background: #fff; }
.content-shell .stats-table td { border-color: var(--border); }
.content-shell .stat-value { color: var(--text-1); font-size: clamp(1.15rem, 3vw, 1.75rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 1199px) {
  .header-caption, .header-divider { display: none; }
  .nav-links { gap: 0; padding-inline: 1.5rem; }
  .nav-link { gap: 0.35rem; padding-inline: 0.6rem; font-size: 0.72rem; }
  .nav-link i { font-size: 0.8rem; }
  .hero-panel { padding: 2.5rem; }
  .hero-visual { transform: scale(0.85); }
}
@media (max-width: 959px) {
  .header-main { height: 72px; padding-inline: 1.5rem; }
  .header-actions { gap: 0.75rem; }
  .menu-toggle { display: flex; flex-shrink: 0; }
  .primary-navigation { display: none; }
  .primary-navigation.is-open { display: block; }
  .nav-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0.75rem 1.5rem; gap: 0.3rem; }
  .nav-link { min-height: 44px; padding: 0.5rem; justify-content: start; border-radius: 8px; font-size: 0.78rem; }
  .nav-link.active::after { display: none; }
  .header-user .user-chip > span { display: none; }
  .app-main { min-height: calc(100vh - 72px); }
  #main-content { padding: 1.5rem 1.5rem 3rem; }
  .site-footer { width: calc(100% - 3rem); grid-template-columns: 1fr; }
  .site-footer > span { grid-column: 1; }
  .hero-panel { grid-template-columns: 1fr 0.6fr; padding: 2rem; }
  .hero-visual { transform: scale(0.72); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-strip { gap: 0.65rem; }
  .overview-strip__item { padding: 1rem; gap: 0.6rem; }
  .overview-strip__item > i { width: 30px; height: 30px; }
}
@media (max-width: 639px) {
  .header-main { gap: 0.5rem; padding-inline: 1rem; }
  .brand { font-size: 1.15rem; gap: 0.4rem; }
  .brand-symbol { width: 28px; height: 31px; font-size: 1rem; border-radius: 8px; }
  .header-actions { gap: 0.5rem; }
  .header-user .user-chip > .avatar { display: none; }
  .header-user .user-chip { gap: 0; }
  .channel-switcher__current { gap: 0.4rem; padding: 0.3rem 0.4rem; }
  .channel-switcher__current .channel-switcher__avatar { display: none; }
  .channel-switcher__meta strong { max-width: 85px; font-size: 0.7rem; }
  .channel-switcher__eyebrow { font-size: 0.5rem; }
  .channel-switcher__chevron { margin-left: 0; }
  .channel-switcher__panel { position: fixed; top: 68px; right: 1rem; }
  .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.75rem 1rem; }
  #main-content { padding: 1.25rem 1rem 2.5rem; }
  .workspace-label { margin-bottom: 1.5rem; font-size: 0.65rem; }
  .workspace-label__end { display: none; }
  .overview-heading { align-items: start; }
  .overview-tag { display: none; }
  .hero-panel { grid-template-columns: 1fr; min-height: 0; padding: 1.8rem 1.5rem; border-radius: 16px; }
  .hero-title { font-size: 2.5rem; }
  .hero-visual { display: none; }
  .hero-copy { font-size: 0.85rem; }
  .overview-strip { grid-template-columns: 1fr; margin-bottom: 2rem; }
  .overview-strip__item { padding: 0.85rem 1rem; }
  .section-heading { align-items: start; flex-direction: column; gap: 0.6rem; }
  .section-title { font-size: 1.4rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 1.3rem; }
  .overview-note { flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
  .overview-note a { margin-left: 0; }
  .channel-stats-grid { grid-template-columns: 1fr; }
  .site-footer { width: calc(100% - 2rem); gap: 0.6rem; }
  .site-footer > span:first-of-type { width: 100%; }
  .stream-plan-preview-modal { padding: 1rem; }
  .stream-plan-preview-modal__content { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 379px) {
  .header-main { padding-inline: 0.75rem; }
  .brand { font-size: 1rem; }
  .brand-symbol { width: 25px; height: 28px; }
  .header-actions { gap: 0.35rem; }
  .channel-switcher__meta strong { max-width: 65px; }
  .channel-switcher__eyebrow { font-size: 0.46rem; }
  .menu-toggle { width: 32px; height: 34px; }
  .user-chip a { width: 25px; }
}

/* Content themes are scoped below the header so navigation keeps its palette. */
.app-main { background: var(--bg-body); color: var(--text-1); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; margin-left: 0; padding: 0.3rem; flex-shrink: 0; border: 0; border-radius: 8px; color: var(--text-3); background: transparent; cursor: pointer; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle__track { width: 30px; height: 18px; padding: 3px; border-radius: 100px; background: var(--border-strong); }
.theme-toggle__knob { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 150ms; }
.theme-toggle[aria-checked="true"] .theme-toggle__track { background: var(--accent-solid); }
.theme-toggle[aria-checked="true"] .theme-toggle__knob { transform: translateX(12px); }
@media (max-width: 639px) {
  .header-main { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 0.75rem; }
  .theme-toggle { gap: 0; padding-inline: 0; }
  .theme-toggle > i { display: none; }
}
:root[data-content-theme="light"] .app-main {
  color-scheme: light;
  --bg-body: #f7f7f8;
  --bg-panel: #fff;
  --bg-surface: #fff;
  --bg-surface-hover: #f1edf8;
  --bg-control: #f7f7f9;
  --surface-2: #eeedf2;
  --border: #e3e0e9;
  --border-strong: #a9a0b6;
  --text-1: #24202d;
  --text-2: #51495f;
  --text-3: #6d637c;
  --text-4: #786e85;
  --accent: #772ce8;
  --cyan: #772ce8;
  --violet: #772ce8;
  --pink: #8650a8;
  --lime: #25774f;
  --red: #bd354a;
  --cyan-a15: #f0e8ff;
  --cyan-a25: #d1b8f6;
  --violet-a15: #f0e8ff;
  --violet-a25: #d1b8f6;
  --pink-a15: #f5edf9;
  --pink-a25: #dfc3ed;
  --lime-a15: #eaf5ed;
  --lime-a25: #bedbc9;
  --accent-a15: #f0e8ff;
  --accent-a25: #d1b8f6;
}
:root[data-content-theme="light"] .app-main .hero-panel { border-color: #ddd0ed; background: radial-gradient(ellipse at 85% 45%, #e5d2ff 0%, transparent 60%), #f1ebf8; }
:root[data-content-theme="light"] .app-main .hero-kicker,
:root[data-content-theme="light"] .app-main .hero-title span { color: var(--accent); }
:root[data-content-theme="light"] .app-main .hero-title { color: var(--text-1); }
:root[data-content-theme="light"] .app-main .hero-copy { color: var(--text-2); }
:root[data-content-theme="light"] .app-main .orbit { border-color: #c6a9e8; }
:root[data-content-theme="light"] .app-main .orbit-center { border-color: #e4d6f5; }
:root[data-content-theme="light"] .app-main .orbit-card { border-color: #e1d5ef; background: #ffffffed; color: var(--text-1); }
:root[data-content-theme="light"] .app-main .orbit-card i { background: var(--accent-a15); color: var(--accent); }
:root[data-content-theme="light"] .app-main .overview-note { border-color: var(--accent-a25); }
:root[data-content-theme="light"] .app-main .fm-input,
:root[data-content-theme="light"] .app-main .fm-textarea { border-color: #d5cede; }
:root[data-content-theme="light"] .app-main .glass-table thead { background: #f1eef5; }
:root[data-content-theme="light"] .app-main .glass-table tbody tr:hover { background: #f7f4fb; }
:root[data-content-theme="light"] .app-main .page-tabs,
:root[data-content-theme="light"] .app-main .admin-tabs { background: #ede9f3; }
:root[data-content-theme="light"] .app-main .admin-tab:hover { background: #e5dbf3; }
:root[data-content-theme="light"] .app-main .page-toggle-track { background: #d5cede; }
:root[data-content-theme="light"] .app-main .page-toggle input:checked + .page-toggle-track { background: var(--accent-solid); }
:root[data-content-theme="light"] .app-main .alert-error { background: #fff0f2; border-color: #efc2ca; color: var(--red); }
:root[data-content-theme="light"] .app-main .alert-success { color: var(--lime); }
:root[data-content-theme="light"] .app-main .rank-value--1 { color: #946708; background: #fcf2d8; }
:root[data-content-theme="light"] .app-main .rank-value--2 { color: #626275; background: #ededf3; }
:root[data-content-theme="light"] .app-main .rank-value--3 { color: #a25d2c; background: #fbefe6; }
:root[data-content-theme="light"] .app-main .currency-icon { color: #946708; }
:root[data-content-theme="light"] .app-main .footer-heart { color: var(--accent); }

/* Commands use the full content width; creation expands only when needed. */
.command-create__summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; font-weight: 700; }
.command-create__summary::-webkit-details-marker { display: none; }
.command-create__summary > span { display: inline-flex; align-items: center; gap: 0.65rem; }
.command-create__summary i { color: var(--accent); }
.command-create[open] .command-create__summary > .bi-chevron-down { transform: rotate(180deg); }
.customcommands-table th, .customcommands-table td { padding: 0.9rem 0.75rem; }
.customcommands-table td { overflow-wrap: anywhere; }
.customcommands-table .custom-command-schedule-column { min-width: 8rem; }
.customcommands-table .badge { white-space: normal; }
@media (min-width: 1024px) {
  .customcommands-table table { table-layout: fixed; }
  .customcommands-table th:nth-child(1) { width: 3.5rem; }
  .customcommands-table th:nth-child(2) { width: 14%; }
  .customcommands-table th:nth-child(4) { width: 12%; }
  .customcommands-table th:nth-child(5) { width: 6rem; }
  .customcommands-table th:nth-child(6) { width: 8rem; }
  .customcommands-table th:nth-child(7) { width: 8rem; }
  .customcommands-table th:nth-child(8) { width: 8rem; }
}

/* A little chat culture on the overview, without competing with the controls. */
.chat-greeting { display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem; }
.chat-greeting img { width: 36px; height: 36px; object-fit: contain; }
.overview-tag img { max-height: 24px; object-fit: contain; }
.hero-visual--chat { isolation: isolate; min-height: 330px; }
.hero-peepo { position: relative; z-index: 1; width: min(100%, 350px); height: auto; filter: drop-shadow(0 18px 20px #00000040); }
.hero-visual--chat .orbit-card { z-index: 2; gap: 0.65rem; padding: 0.65rem 0.85rem; }
.hero-visual--chat .orbit-card > img { flex-shrink: 0; object-fit: contain; }
.hero-visual--chat .orbit-card small { display: block; margin-bottom: 0.15rem; font-size: 0.6rem; font-weight: 400; opacity: 0.8; }
.hero-visual--chat .orbit-card--chat { top: -0.4rem; left: -1rem; }
.hero-visual--chat .orbit-card--community { top: 43%; right: -1rem; }
.hero-visual--chat .orbit-card--stream { bottom: -0.5rem; left: 0; }
.feature-emote { position: absolute; top: 1.5rem; right: 1.5rem; object-fit: contain; }
@media (min-width: 640px) and (max-width: 959px) {
  .hero-visual--chat { transform: scale(0.8); }
}
@media (max-width: 639px) {
  .chat-greeting { gap: 0.4rem; }
  .chat-greeting img { width: 30px; height: 30px; }
  .hero-visual--chat { display: grid; min-height: 230px; max-width: 300px; width: 100%; margin: 2rem auto 0; transform: none; }
  .hero-peepo { width: 230px; }
  .hero-visual--chat .orbit { width: 180px; height: 180px; }
  .hero-visual--chat .orbit--outer { width: 230px; height: 230px; }
  .hero-visual--chat .orbit-card { padding: 0.45rem 0.6rem; font-size: 0.65rem; gap: 0.4rem; }
  .hero-visual--chat .orbit-card > img { width: 24px; height: 24px; }
  .hero-visual--chat .orbit-card small { font-size: 0.5rem; }
  .hero-visual--chat .orbit-card--chat { top: 0; left: -0.5rem; }
  .hero-visual--chat .orbit-card--community { top: 40%; right: -0.5rem; }
  .hero-visual--chat .orbit-card--stream { bottom: -0.3rem; left: -0.5rem; }
}

/* Consistent create/edit forms, shared by commands, Sentry, responses and quotes. */
.editor-page { width: 100%; }
.editor-heading { display: flex; align-items: start; gap: 1rem; margin-bottom: 1.75rem; }
.editor-heading__icon { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border: 1px solid var(--accent-a25); border-radius: 14px; background: var(--accent-a15); color: var(--accent); font-size: 1.3rem; }
.editor-heading__title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.editor-heading h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.editor-heading p { margin: 0.4rem 0 0; color: var(--text-3); font-size: 0.85rem; }
.editor-card { padding: 1.75rem; }
.editor-sections { display: grid; gap: 1.75rem; min-width: 0; }
.editor-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.editor-section legend { padding: 0; color: var(--text-1); font-family: "Manrope", sans-serif; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em; }
.editor-section > :not(legend) + * { margin-top: 1rem; }
.editor-section__intro { margin: 0.4rem 0 1.2rem; color: var(--text-3); font-size: 0.8rem; }
.editor-sections .editor-section + .editor-section { padding-top: 1.5rem; border-top: 1px solid var(--border); }
.editor-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.editor-field-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-help { margin: 0.45rem 0 0; color: var(--text-3); font-size: 0.72rem; line-height: 1.65; }
.field-help code { padding: 0.1rem 0.25rem; border-radius: 4px; background: var(--accent-a15); color: var(--accent); }
.field-optional { margin-left: 0.35rem; color: var(--text-4); font-size: 0.65rem; font-weight: 400; }
.code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.editor-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-control); cursor: pointer; }
.editor-toggle__copy { display: grid; gap: 0.3rem; min-width: 0; }
.editor-toggle__copy strong { font-size: 0.82rem; font-weight: 600; }
.editor-toggle__copy > span { color: var(--text-3); font-size: 0.72rem; line-height: 1.6; }
.editor-switch { position: relative; display: block; flex-shrink: 0; width: 42px; height: 24px; }
.editor-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.editor-switch__track { display: block; width: 42px; height: 24px; padding: 3px; border: 1px solid var(--border-strong); border-radius: 100px; background: var(--surface-2); }
.editor-switch__track > span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform 150ms; }
.editor-switch input:checked + .editor-switch__track { border-color: var(--accent-solid); background: var(--accent-solid); }
.editor-switch input:checked + .editor-switch__track > span { background: #fff; transform: translateX(18px); }
.editor-switch input:focus-visible + .editor-switch__track { outline: 3px solid var(--accent); outline-offset: 4px; }
.editor-interval { max-width: 16rem; }
.editor-callout { display: flex; align-items: start; gap: 0.75rem; padding: 1rem; border: 1px solid var(--accent-a25); border-radius: 10px; background: var(--accent-a15); color: var(--text-2); font-size: 0.78rem; line-height: 1.7; }
.editor-callout > i { color: var(--accent); font-size: 1.2rem; }
.editor-callout strong { display: block; color: var(--text-1); }
.command-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); align-items: start; gap: 2rem; }
.command-preview { position: sticky; top: 1.5rem; min-width: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-control); }
.command-preview__trigger { margin-top: 1.25rem; color: var(--accent); font-family: ui-monospace, monospace; font-size: 0.8rem; overflow-wrap: anywhere; }
.command-preview__message { margin-top: 0.65rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-surface); }
.command-preview__message.is-announcement { border-color: var(--accent); background: var(--accent-a15); }
.command-preview__bot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; color: var(--accent); font-size: 0.72rem; font-weight: 700; }
.command-preview__bot .badge { font-size: 0.58rem; }
.command-preview__message > p { margin-top: 0.6rem; font-size: 0.8rem; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.command-preview__settings { display: grid; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.7rem; }
.editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.editor-actions__hint { max-width: 24rem; color: var(--text-3); font-size: 0.7rem; }
.editor-actions__buttons { display: flex; justify-content: end; gap: 0.75rem; flex-shrink: 0; }
.editor-error { margin-bottom: 1.5rem; align-items: start; }
.editor-error strong { display: block; margin-bottom: 0.25rem; font-weight: 600; }
.btn-danger { background: #bc3049; color: #fff; }
.btn-danger:hover { background: #a4263d; }
.editor-dialog { width: min(28rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.75rem; overflow-y: auto; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-panel); color: var(--text-1); box-shadow: 0 24px 80px #00000066; }
.editor-dialog::backdrop { background: #08080cb3; backdrop-filter: blur(4px); }
.editor-dialog__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border-radius: 12px; background: var(--accent-a15); color: var(--accent); font-size: 1.2rem; }
.editor-dialog h2 { font: 800 1.35rem "Manrope", sans-serif; letter-spacing: -0.03em; }
.editor-dialog p { margin-top: 0.65rem; color: var(--text-3); font-size: 0.82rem; line-height: 1.7; }
.editor-dialog .editor-dialog__target { max-height: 7rem; overflow-y: auto; padding: 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-control); color: var(--text-1); overflow-wrap: anywhere; white-space: pre-wrap; }
.editor-dialog__actions { display: flex; justify-content: end; gap: 0.75rem; margin-top: 1.5rem; }
@media (max-width: 959px) {
  .command-editor-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .command-preview { position: static; }
}
@media (max-width: 639px) {
  .editor-card { padding: 1.1rem; }
  .editor-heading { gap: 0.7rem; }
  .editor-heading__icon { width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; }
  .editor-field-grid, .editor-field-grid--three { grid-template-columns: 1fr; }
  .editor-toggle { gap: 0.75rem; padding: 0.85rem; }
  .editor-actions { flex-direction: column; align-items: stretch; }
  .editor-actions__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .editor-actions__buttons .btn { padding-inline: 0.65rem; }
  .editor-dialog { padding: 1.25rem; }
}
.editor-simple { max-width: 52rem; }
.badge-muted { border-color: var(--border); background: var(--surface-2); color: var(--text-3); }
.fm-input:user-invalid, .fm-textarea:user-invalid { border-color: var(--red); }
