:root {
  --bg: #08111f;
  --panel: rgba(13, 23, 41, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #edf2f7;
  --muted: #a5b4ca;
  --accent: #f2002f;
  --headline-text: #202020;
  --headline-bg: #f3f3f3;
  --name-text: #ffffff;
  --name-bg: #f2002f;
  --accent-dark: #001e63;
  --headline-bg: rgba(255, 255, 255, 0.98);
  --fallback-bg: #2b2b2b;
  --ticker-text: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --headline-font: "Benton Sans Cond", "Arial Narrow", "Segoe UI", sans-serif;
  --comp-font: "Benton Sans Comp", "Arial Narrow", "Segoe UI", sans-serif;
  --ui-font: "Benton Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Benton Sans";
  src: url("./FONTS/BentonSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans";
  src: url("./FONTS/BentonSans-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans";
  src: url("./FONTS/BentonSans-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Cond";
  src: url("./FONTS/BentonSansCond-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Cond";
  src: url("./FONTS/BentonSansCond-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Cond";
  src: url("./FONTS/BentonSansCond-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Comp";
  src: url("./FONTS/BentonSansComp-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Comp";
  src: url("./FONTS/BentonSansComp-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Benton Sans Comp";
  src: url("./FONTS/BentonSansComp-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--ui-font);
}

body {
  color: var(--text);
}

.editor-body {
  background:
    radial-gradient(circle at top left, rgba(242, 0, 47, 0.24), transparent 30%),
    radial-gradient(circle at top right, rgba(0, 30, 99, 0.35), transparent 34%),
    linear-gradient(180deg, #050b14 0%, #091422 100%);
}

.editor-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100vh - 48px);
  height: calc(100vh - 48px);
  padding: 24px;
}

.editor-sidebar,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  position: sticky;
  top: 24px;
  height: fit-content;
}

.editor-brand {
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(135deg, #ff234d 0%, #da0029 100%);
  padding: 20px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-brand img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.build-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124, 255, 137, 0.16);
  color: #7cff89;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.playout-build {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: #ff8aa1;
}

h1,
h2,
p {
  margin: 0;
}

.editor-sidebar h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  line-height: 1.06;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  max-width: 100%;
}

.subcopy,
.launch-copy,
.hint-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.25;
}

.launch-card,
.hint-card,
.status-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--panel-soft);
}

.launch-title {
  font-size: 1.4rem;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.preset-button {
  border: 0;
  border-radius: 16px;
  font-family: var(--ui-font);
  font-size: 1.15rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.preset-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ff234d 0%, #da0029 100%);
  color: white;
  font-weight: 700;
}

.inline-primary-button {
  margin-top: 0;
  width: auto;
  min-width: 220px;
  justify-content: center;
}

.inline-secondary-button {
  margin-top: 0;
  width: auto;
  min-width: 220px;
  justify-content: center;
}

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

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

.tabbed-editor-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 2px 0 14px;
  background: linear-gradient(180deg, rgba(13, 23, 41, 0.98) 0%, rgba(13, 23, 41, 0.98) 82%, rgba(13, 23, 41, 0) 100%);
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 18px;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 0.98rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  user-select: none;
}

.tab-button:hover {
  transform: translateY(-1px);
}

.tab-button.is-dragging {
  opacity: 0.45;
}

.tab-button.drag-target-left {
  box-shadow: inset 4px 0 0 rgba(255, 35, 77, 0.9);
}

.tab-button.drag-target-right {
  box-shadow: inset -4px 0 0 rgba(255, 35, 77, 0.9);
}

.tab-button.is-active {
  background: linear-gradient(135deg, #ff234d 0%, #da0029 100%);
  border-color: rgba(242, 0, 47, 0.8);
  color: #ffffff;
}

.placeholder-panel {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.survey-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.survey-dropzone {
  min-height: 58px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px 18px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.survey-dropzone.is-dragover {
  border-color: rgba(242, 0, 47, 0.8);
  background: rgba(242, 0, 47, 0.1);
  color: #fff;
}

.survey-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.survey-rundown-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.survey-empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.survey-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.survey-row:hover {
  transform: translateY(-1px);
}

.survey-row.is-cued {
  border-color: rgba(255, 214, 10, 0.8);
  background: rgba(255, 214, 10, 0.08);
}

.survey-row.is-onair {
  border-color: rgba(242, 0, 47, 0.8);
  background: rgba(242, 0, 47, 0.14);
}

.survey-row.is-dragging {
  opacity: 0.55;
}

.survey-row.drag-target {
  box-shadow: inset 0 0 0 2px rgba(242, 0, 47, 0.9);
}

.survey-row-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.survey-row-order {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

.survey-row-meta {
  min-width: 0;
}

.survey-row-title {
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.survey-row-type {
  margin-top: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.survey-mini-button {
  min-width: 84px;
  padding: 10px 14px;
  font-size: 0.86rem;
}

.survey-onair-button {
  min-width: 98px;
}

.sidebar-copyright {
  margin-top: 12px;
  text-align: left;
  color: rgba(226, 233, 244, 0.52);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.preset-button,
.secondary-button {
  padding: 14px 18px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.preset-button.is-active {
  background: linear-gradient(135deg, #ff234d 0%, #da0029 100%);
}

.editor-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}

.preview-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
  position: sticky;
  top: 0;
  z-index: 10;
}

.preview-column,
.visibility-column {
  min-width: 0;
}

.preview-column,
.visibility-column {
  position: static;
  align-self: start;
}

.editor-scroll-area {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 24px;
  padding-right: 4px;
  align-content: start;
}

.panel {
  padding: 20px;
}

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

.panel-head h2 {
  font-size: 1.55rem;
  line-height: 0.95;
  text-transform: uppercase;
}

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

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

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

.visibility-live {
  grid-column: 1;
  grid-row: 1;
}

.visibility-name {
  grid-column: 1;
  grid-row: 2;
}

.visibility-pling {
  grid-column: 1;
  grid-row: 3;
}

.visibility-sidebar {
  grid-column: 2;
  grid-row: 1;
}

.visibility-insert {
  grid-column: 3;
  grid-row: 1;
}

.visibility-ticker {
  grid-column: 3;
  grid-row: 2;
}

.visibility-logo {
  grid-column: 3;
  grid-row: 3;
}

.visibility-clock {
  grid-column: 3;
  grid-row: 4;
}

.color-presets {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.color-swatch:hover {
  transform: translateY(-1px);
}

.toggle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.toggle-card:hover {
  transform: translateY(-1px);
}

.toggle-card.is-active {
  background: rgba(242, 0, 47, 0.18);
  border-color: rgba(242, 0, 47, 0.7);
}

.toggle-card input,
.toggle-inline input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

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

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

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

.form-grid label,
.toggle-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1rem;
  color: var(--muted);
}

.toggle-inline {
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.toggle-inline span {
  color: var(--text);
}

.ticker-speed-field small {
  color: rgba(237, 242, 247, 0.5);
  font-size: 0.9rem;
  line-height: 1;
}

.compact-number-field {
  max-width: 180px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 10, 22, 0.85);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

textarea {
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.button-row {
  display: flex;
  gap: 12px;
}

.preset-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-inline-actions {
  flex-wrap: nowrap;
  align-items: end;
}

.compact-inline-actions .primary-button,
.compact-inline-actions .secondary-button {
  min-width: 0;
  width: auto;
  flex: 1;
}

.preset-button-row .secondary-button {
  flex: 1;
  font-size: 0.96rem;
  padding: 12px 14px;
}

.name-presets-shell {
  display: grid;
  gap: 16px;
}

.compact-name-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.35fr) auto;
  align-items: end;
  justify-content: start;
}

.name-action-row {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
  min-width: 360px;
}

.name-presets-shell .compact-name-grid label:first-child input,
.name-presets-shell .compact-name-grid label:nth-child(2) input {
  max-width: none;
}

.name-preset-list {
  display: grid;
  gap: 10px;
}

.name-preset-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.name-preset-item.is-editing {
  padding: 8px;
  border-color: rgba(242, 0, 47, 0.72);
  background: rgba(242, 0, 47, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.name-preset-item.is-editing .name-preset-load {
  border-color: rgba(255, 28, 73, 0.5);
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

.name-preset-item.is-editing .name-preset-delete {
  border-color: rgba(255, 28, 73, 0.5);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.name-presets-shell input[type="file"],
[data-editor-panel="texte"] input[type="file"] {
  padding: 10px 12px;
}

.name-preset-load,
.name-preset-delete {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.name-preset-load {
  text-align: left;
}

.secondary-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  display: block;
  margin-top: 6px;
  color: rgba(226, 233, 244, 0.52);
  font-size: 0.88rem;
  line-height: 1.25;
}

.pling-form-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.25fr) auto;
  align-items: end;
  justify-content: start;
}

.pling-form-grid .preset-helper-row,
.pling-form-grid .name-preset-list {
  grid-column: 1 / -1;
}

.pling-action-row {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  display: grid;
  grid-template-columns: 58px minmax(150px, auto);
  gap: 10px;
  flex-wrap: nowrap;
}

.pling-action-row .primary-button,
.pling-action-row .secondary-button {
  min-width: 0;
  width: auto;
  margin-top: 0;
  padding: 12px 14px;
}

.pling-interval-field {
  grid-column: 1;
  grid-row: 2;
}

.pling-interval-field {
  max-width: 170px;
}

.pling-line1-field input,
.pling-line2-field input {
  max-width: 100%;
}

[data-editor-panel="texte"] .form-grid > label.full-width input,
[data-editor-panel="ticker"] .form-grid > label.full-width textarea {
  max-width: 920px;
}

[data-editor-panel="texte"] .form-grid > label.full-width,
[data-editor-panel="ticker"] .form-grid > label.full-width {
  justify-self: start;
  width: 100%;
}

[data-editor-panel="texte"] .form-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.45fr) minmax(220px, auto);
  align-items: end;
}

[data-editor-panel="texte"] .form-grid > label.full-width {
  grid-column: auto;
  width: 100%;
  min-width: 0;
}

[data-editor-panel="texte"] .form-grid > label.toggle-card.full-width {
  min-width: 220px;
  height: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

[data-editor-panel="texte"] .form-grid > label.full-width input {
  max-width: none;
}


[data-editor-panel="texte"] .form-grid > .preset-button-row.full-width,
[data-editor-panel="texte"] .form-grid > label:nth-last-child(-n+3),
[data-editor-panel="texte"] .form-grid > #insert-preset-list.full-width {
  grid-column: 1 / -1;
}

.pling-line1-field,
.pling-line2-field,
.pling-interval-field {
  align-self: end;
}

.sidebar-status,
.name-preset-empty,
.sidebar-empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-copy {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 14px;
}

.sidebar-copy:not(.sidebar-copy-live) {
  display: none;
}

.sidebar-refresh {
  width: auto;
  flex: 0 0 auto;
}

.compact-sidebar-controls {
  grid-template-columns: auto auto;
  align-items: end;
}

.sidebar-interval-field {
  max-width: 220px;
}

.sidebar-update-wrap {
  display: flex;
  align-items: end;
  height: 100%;
}

.sidebar-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.sidebar-tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.sidebar-tile:hover {
  transform: translateY(-1px);
}

.sidebar-tile.is-active {
  border-color: rgba(242, 0, 47, 0.8);
  background: rgba(242, 0, 47, 0.14);
}

.sidebar-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.03);
  margin: 0;
  padding: 0;
}

.sidebar-meta {
  width: 100%;
  padding: 8px 10px 10px;
  font-size: 0.86rem;
  line-height: 1.15;
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: center;
}

.button-row .secondary-button {
  flex: 1;
}

.preview-shell {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.preview-stage {
  width: min(100%, 860px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #0b0b0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

.preview-stream-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 0;
  margin-bottom: 10px;
}

.preview-volume-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.96rem;
}

.preview-volume-field input[type="range"] {
  width: 100%;
  padding: 0;
  min-height: 32px;
}

.preview-reload-button {
  white-space: nowrap;
  padding: 10px 14px;
  font-size: 0.92rem;
}

.preview-head-button {
  width: auto;
  flex: 0 0 auto;
  align-self: center;
  margin-left: 12px;
}

.preview-stream-controls > span {
  display: none;
}

.sidebar-form-grid {
  margin-bottom: 10px;
}

.compact-number-field input {
  max-width: 110px;
}

.compact-number-field small {
  max-width: 110px;
}

.file-mode-note,
.preview-file-hint {
  display: none;
}

.editor-body.file-mode .file-mode-note {
  display: block;
  margin-top: 14px;
  color: #ffd4dc;
  line-height: 1.3;
}

.editor-body.file-mode .preview-stage iframe {
  display: none;
}

.editor-body.file-mode .preview-file-hint {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #f3f6fb;
  line-height: 1.35;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #0b0b0d;
}

.playout-body {
  background: transparent;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

.playout-body.preview-playout {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 38%),
    #05070b;
}

.playout-body.popup-playout {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 42%),
    #0a0c10;
}

.playout-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: block;
  background: transparent;
}

.stage-scale {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(1);
  z-index: 1;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  z-index: 1;
  background: #00ff00;
}

.popup-playout .stage-canvas {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.media-layer,
.survey-layer,
.xxl-layer,
.overlay-root {
  position: absolute;
  inset: 0;
}

.media-layer {
  z-index: 1;
}

.survey-layer {
  z-index: 20;
  pointer-events: none;
}

.xxl-layer {
  z-index: 30;
  pointer-events: none;
}

.copyright-badge {
  position: absolute;
  left: 18px;
  bottom: 12px;
  z-index: 4;
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.media-layer video,
.media-layer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.media-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

.overlay-root {
  pointer-events: none;
  z-index: 10;
}

.overlay-root.hide-all .headline-card,
.overlay-root.hide-all .bottom-row,
.overlay-root.hide-all .logo-box,
.overlay-root.hide-all .clock-box,
.overlay-root.hide-all .live-badge,
.overlay-root.hide-all .name-insert,
.overlay-root.hide-all .pling-bar,
.overlay-root.hide-all #sidebar-overlay,
.overlay-root.hide-all #xxl-insert-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.headline-card {
  position: absolute;
  left: 53px;
  top: 836px;
  width: 1460px;
  height: 143px;
  background: var(--headline-bg);
  color: var(--headline-text);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  will-change: transform, opacity, filter;
  transition: opacity 820ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 820ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 820ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.headline-inner {
  position: absolute;
  inset: 0;
  padding: 12px 32px 12px 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.headline-card h1 {
  font-family: var(--headline-font);
  font-size: 74px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  transform-origin: left center;
  display: inline-block;
  width: max-content;
  max-width: none;
}

.headline-card p {
  font-family: var(--headline-font);
  font-size: 31px;
  margin-top: 6px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  transform-origin: left center;
  display: inline-block;
  width: max-content;
  max-width: none;
}

.headline-card.single-line .headline-inner {
  min-height: 143px;
  justify-content: center;
}

.headline-card.single-line h1 {
  font-size: 78px;
}

.headline-card.single-line p {
  display: none;
}

.live-badge {
  position: absolute;
  left: 56px;
  top: 38px;
  width: 196px;
  height: 92px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--comp-font);
  font-weight: 900;
  font-style: italic;
  font-size: 66px;
  line-height: 0.92;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  transform: skewX(-10deg);
  transform-origin: left center;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  will-change: transform, opacity, filter;
  transition: opacity 760ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 760ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.pling-bar {
  position: absolute;
  right: 62px;
  top: 38px;
  width: auto;
  height: 61px;
  display: flex;
  align-items: stretch;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  transition: opacity 760ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 760ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.pling-part {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.pling-part span {
  display: inline-block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  text-transform: uppercase;
  transform-origin: left center;
}

.pling-part-left {
  width: auto;
  padding: 0 22px;
  background: #f3f3f3;
  color: #1c1c1c;
}

.pling-part-left span {
  font-family: var(--headline-font);
  font-size: 39px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.pling-part-right {
  width: auto;
  flex: 0 0 auto;
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
  transform-origin: right center;
}

.pling-part-right span {
  font-family: var(--headline-font);
  font-size: 33px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.name-insert {
  position: absolute;
  left: 53px;
  top: 717px;
  width: auto;
  min-height: 96px;
  background: var(--name-bg);
  color: var(--name-text);
  will-change: transform, opacity, filter;
  transition: opacity 820ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 820ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 820ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.name-insert-inner {
  padding: 8px 16px 8px 16px;
}

.name-line1,
.name-line2 {
  font-family: var(--comp-font);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  display: block;
  width: max-content;
  max-width: none;
  transform-origin: left center;
}

.name-line1 {
  font-size: 50px;
  line-height: 0.98;
  letter-spacing: 0.028em;
}

.name-divider {
  height: 3px;
  margin: 8px 0 8px;
  background: rgba(255, 255, 255, 0.95);
}

.name-line2 {
  font-size: 36px;
  line-height: 0.98;
  letter-spacing: 0.022em;
}

.sidebar-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 5;
}

.survey-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 760ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.survey-background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  z-index: 0;
}

.survey-image-overlay {
  object-fit: contain;
  object-position: center center;
}

.survey-html-overlay {
  background: transparent;
}

.survey-overlay.survey-push-in {
  opacity: 0;
  transform: translate3d(86px, 0, 0);
}

.survey-overlay.survey-push-in.is-animating {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.survey-overlay.survey-push-out {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  z-index: 2;
}

.survey-overlay.survey-push-out.is-animating {
  opacity: 0;
  transform: translate3d(-86px, 0, 0);
}

.bottom-row {
  position: absolute;
  left: 53px;
  top: 977px;
  width: 1804px;
  height: 63px;
  will-change: transform, opacity, filter;
  transition: opacity 820ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 820ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 820ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  width: 247px;
  height: 63px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--comp-font);
  font-size: 41px;
  font-weight: 900;
  line-height: 1;
  font-style: normal;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: opacity 760ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 760ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.ticker-label-text {
  display: block;
}

.ticker-label-logo {
  display: none;
  width: 188px;
  max-width: 82%;
  height: auto;
}

.ticker-label.is-logo-mode .ticker-label-text {
  display: none;
}

.ticker-label.is-logo-mode .ticker-label-logo {
  display: block;
}

.fallback-bar {
  position: absolute;
  left: 247px;
  top: 0;
  width: 1213px;
  height: 63px;
  background: var(--fallback-bg);
  color: var(--ticker-text);
  font-family: var(--comp-font);
  overflow: hidden;
  letter-spacing: 0;
  transition: opacity 760ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 760ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.ticker-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  padding-left: 0;
  white-space: nowrap;
  --ticker-distance: 600px;
  --ticker-duration: 10s;
  animation: ticker-loop var(--ticker-duration) linear infinite;
  animation-delay: 0s;
}

.ticker-track span {
  display: block;
  flex: 0 0 auto;
  font-size: 36px;
  font-weight: 900;
  color: var(--ticker-text);
  font-family: var(--comp-font);
}

.clock-box {
  position: absolute;
  right: 0;
  top: 0;
  width: 338px;
  height: 63px;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #161616;
  font-family: var(--comp-font);
  font-size: 48px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: opacity 760ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 760ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.logo-box {
  position: absolute;
  left: 1519px;
  top: 836px;
  width: 338px;
  height: 151px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity, filter;
  transition: opacity 840ms cubic-bezier(0.2, 0.86, 0.2, 1), transform 840ms cubic-bezier(0.2, 0.86, 0.2, 1), filter 840ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.logo-box img {
  width: 330px;
  height: auto;
  display: block;
}

.compact .ticker-label {
  width: 247px;
}

.compact .fallback-bar {
  left: 247px;
  width: 1213px;
}

.compact .logo-box {
  top: 977px;
  left: 1519px;
  width: 338px;
  height: 63px;
}

.compact .logo-box img {
  width: 210px;
}

.headline-card.is-hidden {
  opacity: 0;
  transform: translate3d(-84px, 0, 0) skewX(-10deg);
  filter: blur(6px);
}

.bottom-row.is-hidden {
  opacity: 0;
  transform: translate3d(-90px, 0, 0) skewX(-10deg);
  filter: blur(6px);
}

.ticker-label.is-hidden,
.fallback-bar.is-hidden {
  opacity: 0;
  transform: translate3d(-52px, 0, 0);
  filter: blur(4px);
}

.clock-box.is-hidden {
  opacity: 0;
  transform: translate3d(82px, 0, 0);
  filter: blur(4px);
}

.logo-box.is-hidden {
  opacity: 0;
  transform: translate3d(120px, 0, 0) scale(0.94);
  filter: blur(6px);
}

.name-insert.is-hidden {
  opacity: 0;
  transform: translate3d(-86px, 0, 0);
  filter: blur(5px);
}

.live-badge.is-hidden {
  opacity: 0;
  transform: translate3d(-96px, 0, 0) skewX(-10deg) scale(0.96);
  filter: blur(4px);
}

.pling-bar.is-hidden {
  opacity: 0;
  transform: translate3d(-120px, 0, 0);
  filter: blur(5px);
}

.overlay-root.transition-in .headline-card:not(.is-hidden),
.overlay-root.transition-in .ticker-label:not(.is-hidden),
.overlay-root.transition-in .fallback-bar:not(.is-hidden) {
  animation: lower-third-in 1120ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.overlay-root.transition-in .logo-box:not(.is-hidden) {
  animation: logo-box-in 1180ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.overlay-root.transition-in .clock-box:not(.is-hidden) {
  animation: clock-box-in 1180ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.overlay-root.transition-in .name-insert:not(.is-hidden) {
  animation: name-insert-in 1140ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.overlay-root.transition-in .live-badge:not(.is-hidden) {
  animation: live-badge-in 1080ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.overlay-root.transition-in .pling-bar:not(.is-hidden) {
  animation: pling-bar-in 1180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pling-bar.is-rotating {
  animation: pling-rotate 5640ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

.overlay-root.transition-out .headline-card:not(.is-hidden),
.overlay-root.transition-out .ticker-label:not(.is-hidden),
.overlay-root.transition-out .fallback-bar:not(.is-hidden) {
  animation: lower-third-out 980ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

.overlay-root.transition-out .logo-box:not(.is-hidden) {
  animation: logo-box-out 920ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

.overlay-root.transition-out .clock-box:not(.is-hidden) {
  animation: clock-box-out 920ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

.overlay-root.transition-out .name-insert:not(.is-hidden) {
  animation: name-insert-out 940ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

.overlay-root.transition-out .live-badge:not(.is-hidden) {
  animation: live-badge-out 900ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

.overlay-root.transition-out .pling-bar:not(.is-hidden) {
  animation: pling-bar-out 1080ms cubic-bezier(0.24, 0.08, 0.42, 1) both;
}

@keyframes ticker-loop {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(var(--ticker-distance) * -1), 0, 0);
  }
}

@keyframes lower-third-in {
  0% {
    opacity: 0;
    transform: translate3d(-180px, 0, 0) skewX(-14deg);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(0);
    filter: blur(0);
  }
}

@keyframes lower-third-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-220px, 0, 0) skewX(-12deg);
    filter: blur(6px);
  }
}

@keyframes logo-box-in {
  0% {
    opacity: 0;
    transform: translate3d(170px, 0, 0) scale(0.92);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes logo-box-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(180px, 0, 0) scale(0.9);
    filter: blur(6px);
  }
}

@keyframes clock-box-in {
  0% {
    opacity: 0;
    transform: translate3d(170px, 0, 0) scale(0.96);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes clock-box-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(180px, 0, 0) scale(0.96);
    filter: blur(6px);
  }
}

@keyframes name-insert-in {
  0% {
    opacity: 0;
    transform: translate3d(-104px, 0, 0);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes name-insert-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-116px, 0, 0);
    filter: blur(6px);
  }
}

@keyframes live-badge-in {
  0% {
    opacity: 0;
    transform: translate3d(-110px, 0, 0) skewX(-10deg) scale(0.96);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(-10deg) scale(1);
    filter: blur(0);
  }
}

@keyframes live-badge-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(-10deg) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-118px, 0, 0) skewX(-10deg) scale(0.95);
    filter: blur(4px);
  }
}

@keyframes pling-bar-in {
  0% {
    opacity: 0;
    transform: perspective(1800px) translate3d(-120px, 8px, 0) rotateX(7deg) scale(0.992);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: perspective(1800px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes pling-bar-out {
  0% {
    opacity: 1;
    transform: perspective(1800px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: perspective(1800px) translate3d(-118px, 4px, 0) rotateX(5deg) scale(0.992);
    filter: blur(5px);
  }
}

@keyframes pling-rotate {
  0% {
    opacity: 0.76;
    transform: perspective(1800px) translate3d(0, -20px, 0) rotateX(10deg) scale(0.992);
    filter: blur(5px);
  }
  40% {
    opacity: 1;
    transform: perspective(1800px) translate3d(0, 2px, 0) rotateX(-1.5deg) scale(1);
    filter: blur(0);
  }
  72% {
    opacity: 1;
    transform: perspective(1800px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: perspective(1800px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 1240px) {
  .editor-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .editor-sidebar {
    position: static;
  }

  .editor-main {
    grid-template-rows: auto auto;
  }

  .preview-control-panel {
    position: static;
  }

  .editor-scroll-area {
    overflow: visible;
  }

  .tab-strip {
    position: static;
    padding-bottom: 0;
    background: transparent;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .preview-control-panel,
  .toggle-grid,
  .two-column,
  .form-grid,
  .color-grid,
  .sidebar-gallery {
    grid-template-columns: 1fr;
  }

  .name-action-row {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
  min-width: 360px;
}
.xxl-insert-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 322px;
  object-fit: contain;
  object-position: center bottom;
  z-index: 1;
  pointer-events: none;
}
.visibility-xxl {
  grid-column: 2;
  grid-row: 2;
}
