@font-face {
  font-family: "FC Vision";
  src: url("../fonts/FCVision-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "FC Vision";
  src: url("../fonts/FCVision-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "FC Vision";
  src: url("../fonts/FCVision-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "FC Vision";
  src: url("../fonts/FCVision-Bold.ttf") format("truetype");
  font-weight: 700 800;
  font-style: normal;
}

:root {
  --bg: #07111f;
  --bg-deep: #030914;
  --panel: rgba(10, 21, 40, 0.72);
  --panel-edge: rgba(255, 255, 255, 0.12);
  --text: #f7fbff;
  --muted: rgba(231, 239, 255, 0.72);
  --accent: #5cf3c8;
  --accent-2: #23a6ff;
  --danger: #ff647c;
  --warning: #ffd166;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font-display: "FC Vision", "Sarabun", sans-serif;
  --font-body: "FC Vision", "Sarabun", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(35, 166, 255, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(92, 243, 200, 0.2), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

body.transparent {
  background: transparent;
}

html.transparent-root,
html.transparent-root body {
  background: transparent !important;
}

button,
input,
textarea,
select {
  font: inherit;
}

.admin-body {
  padding: 20px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 40px);
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.admin-sidebar,
.hero-panel,
.control-panel {
  border-radius: 28px;
}

.admin-sidebar {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1;
}

h1 {
  font-size: 1.85rem;
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 8px;
}

h3 {
  font-size: 1.35rem;
}

.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.status-stack,
.quick-links,
.sidebar-actions,
.button-row,
.url-list {
  display: grid;
  gap: 12px;
}

.status-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-label {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(35, 166, 255, 0.22), rgba(92, 243, 200, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-main {
  display: grid;
  gap: 20px;
}

.hero-panel {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.monitor-panel {
  padding: 22px;
  border-radius: 28px;
  display: grid;
  gap: 18px;
}

.monitor-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.monitor-status-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.monitor-status-chip {
  min-width: 130px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.monitor-status-chip span,
.monitor-status-chip strong {
  display: block;
}

.monitor-status-chip span {
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.admin-monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 16px;
}

.admin-monitor-card {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-monitor-main {
  grid-row: span 2;
}

.admin-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-monitor-head span {
  font-weight: 700;
}

.admin-monitor-head a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.admin-monitor-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(180deg, rgba(5, 12, 20, 0.96), rgba(13, 24, 40, 0.92));
  background-position: 0 0, 12px 12px, 0 0;
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-monitor-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.hero-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-badge {
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-badge span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

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

.control-panel {
  padding: 22px;
  min-height: 260px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.drag-handle {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.field,
.switch-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span,
.switch-field span {
  font-weight: 600;
  color: rgba(247, 251, 255, 0.88);
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 18px;
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(92, 243, 200, 0.82);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

.switch-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

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

input[type="color"] {
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px;
}

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

.lower-third-theme-grid {
  margin-bottom: 14px;
}

.lower-third-assets-grid {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: rgba(247, 251, 255, 0.88);
}

.asset-preview {
  min-height: 110px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 12px;
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lower-third-actions {
  margin-bottom: 10px;
}

.preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 10px;
}

.preset-header span {
  font-weight: 700;
}

.compact-button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
}

.preset-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.preset-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preset-swatch {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.preset-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.preset-copy strong,
.preset-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-copy span {
  color: var(--muted);
  font-size: 0.94rem;
}

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

.preset-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.photo-preview {
  min-height: 170px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-bottom: 14px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview.empty {
  padding: 18px;
  text-align: center;
}

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

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  appearance: none;
  border: 0;
  min-height: 58px;
  border-radius: 18px;
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041321;
  font-weight: 800;
  box-shadow: 0 18px 38px rgba(35, 166, 255, 0.32);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.danger-button {
  background: linear-gradient(135deg, rgba(255, 100, 124, 0.95), rgba(255, 162, 106, 0.82));
  font-weight: 800;
}

.ghost-button {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.disabled-panel {
  opacity: 0.54;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(3, 9, 20, 0.92);
  border: 1px solid rgba(92, 243, 200, 0.28);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.overlay-body {
  overflow: hidden;
  background: transparent;
}

.output-stage-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}

.output-stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
}

.overlay-canvas,
.photo-scene,
.countdown-scene {
  position: relative;
  width: 100%;
  height: 100%;
}

.brand-bug {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 82px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(6, 14, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  animation: floatIn 320ms ease;
  overflow: hidden;
}

.brand-bug::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.22) 46%, transparent 68%);
  transform: translateX(-130%);
  animation: sheenSweep 5s ease-in-out infinite;
}

.brand-bug img {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
}

.lower-third {
  --lt-primary: #5cf3c8;
  --lt-secondary: #23a6ff;
  --lt-accent: #ffd166;
  position: absolute;
  left: 32px;
  bottom: 30px;
  display: grid;
  grid-template-columns: auto 8px minmax(0, auto);
  min-width: min(560px, calc(100vw - 64px));
  max-width: min(760px, calc(100vw - 64px));
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 16, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transform-origin: left bottom;
}

.lower-third-manual-art {
  width: 104px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.lower-third-manual-art img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.lower-third-bar {
  width: 6px;
  background: linear-gradient(180deg, var(--lt-primary), var(--lt-secondary));
}

.lower-third-content {
  position: relative;
  padding: 16px 18px 16px 18px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 24%),
    rgba(8, 16, 28, 0.9);
}

.lower-third-program-logo {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.lower-third-program-logo img {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.lower-third-glow {
  position: absolute;
  top: -50px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, color-mix(in srgb, var(--lt-primary) 22%, transparent), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
}

.lower-third-stripe {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(255, 255, 255, 0.04) 58% 60%, transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

.lower-third-motion {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lt-secondary) 14%, transparent), transparent);
  opacity: 0;
  transform: skewX(-24deg) translateX(-150%);
}

.motion-a {
  left: 0;
}

.motion-b {
  right: 16%;
  width: 90px;
  animation-delay: 0.14s;
}

.lower-third-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--lt-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lt-accent) 40%, transparent);
}

.lower-third-name {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-right: 72px;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.lower-third-title {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  padding-right: 72px;
  font-size: clamp(0.78rem, 1.2vw, 1rem);
  color: rgba(247, 251, 255, 0.66);
}

.lower-third:not(.has-program-logo) .lower-third-name,
.lower-third:not(.has-program-logo) .lower-third-title {
  padding-right: 0;
}

.lower-third:not(.has-chip) .lower-third-title {
  margin-top: 4px;
}

.lower-third:not(.has-manual-art) {
  grid-template-columns: 6px minmax(0, auto);
}

.lower-third:not(.has-manual-art) .lower-third-manual-art {
  display: none !important;
}

.lower-third[data-variant="event"] .lower-third-content {
  background:
    linear-gradient(120deg, rgba(255, 208, 125, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(26, 11, 18, 0.96), rgba(73, 25, 39, 0.9));
}

.lower-third[data-variant="sport"] .lower-third-content {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(4, 20, 23, 0.96), rgba(9, 70, 61, 0.9));
}

.lower-third[data-variant="news"] .lower-third-content {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(5, 12, 28, 0.96), rgba(7, 42, 84, 0.9));
}

.lower-third[data-variant="mono"] .lower-third-content {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(12, 15, 20, 0.96), rgba(46, 52, 60, 0.9));
}

.lower-third-enter {
  animation: lowerThirdEnter 560ms cubic-bezier(0.18, 0.84, 0.22, 1) both;
}

.lower-third-enter .lower-third-motion,
.lower-third-refresh .lower-third-motion {
  animation: lowerThirdSweep 780ms ease both;
}

.lower-third-refresh {
  animation: lowerThirdRefresh 420ms ease both;
}

.lower-third-exit {
  animation: lowerThirdExit 420ms cubic-bezier(0.4, 0, 0.6, 1) both;
}

.ticker {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 14px;
  min-height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(7, 16, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.ticker-track {
  display: flex;
  gap: 48px;
  width: max-content;
  min-width: 100%;
  padding: 10px 0;
  white-space: nowrap;
  animation: tickerMove 24s linear infinite;
}

.ticker-track span {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.countdown-scene {
  display: grid;
  place-items: center;
  background: transparent;
}

.countdown-orbit,
.countdown-orbit::before,
.countdown-orbit::after,
.orbit-left,
.orbit-right {
  display: none;
}

.countdown-panel {
  position: relative;
  z-index: 1;
  min-width: min(560px, calc(100vw - 40px));
  padding: 18px 24px;
  border-radius: 20px;
  text-align: center;
  background: rgba(7, 16, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  animation: scaleIn 360ms ease;
  overflow: hidden;
}

.countdown-panel::before,
.countdown-panel::after {
  display: none;
}

.countdown-panel h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(3.4rem, 11vw, 6.8rem);
  margin: 4px 0;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.countdown-label {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: rgba(247, 251, 255, 0.68);
}

.photo-scene {
  display: grid;
  place-items: center;
}

.photo-frame {
  position: relative;
  width: min(66vw, 900px);
  aspect-ratio: 16 / 9;
  padding: 10px;
  border-radius: 18px;
  background: rgba(7, 16, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  animation: scaleIn 320ms ease;
}

.photo-frame-accent {
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 18%);
  pointer-events: none;
}

.photo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.preview-shell {
  display: grid;
  gap: 18px;
}

.preview-hero {
  padding: 22px 24px;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.preview-hero-note {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-hero-note strong,
.preview-hero-note span {
  display: block;
}

.preview-hero-note strong {
  margin-bottom: 6px;
}

.preview-hero-note span {
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.preview-card {
  padding: 16px;
  border-radius: 22px;
}

.preview-card-main {
  grid-row: span 2;
}

.preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-card-head span {
  font-weight: 700;
  font-size: 1rem;
}

.preview-card-head a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(180deg, rgba(5, 12, 20, 0.96), rgba(13, 24, 40, 0.92));
  background-position: 0 0, 12px 12px, 0 0;
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.preview-frame::after {
  content: "16:9";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: rgba(247, 251, 255, 0.72);
}

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

.hidden {
  display: none !important;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes sheenSweep {
  0%,
  68%,
  100% {
    transform: translateX(-130%);
  }
  82% {
    transform: translateX(130%);
  }
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes lowerThirdEnter {
  from {
    opacity: 0;
    transform: translateY(24px) translateX(-18px) scale(0.96);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lowerThirdRefresh {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1.015);
    filter: brightness(1.14);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes lowerThirdExit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
    filter: blur(10px);
  }
}

@keyframes lowerThirdSweep {
  0% {
    opacity: 0;
    transform: skewX(-24deg) translateX(-150%);
  }
  20% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: skewX(-24deg) translateX(520%);
  }
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .admin-body {
    padding: 12px;
  }

  .hero-panel,
  .control-panel,
  .admin-sidebar {
    border-radius: 22px;
  }

  .hero-panel {
    flex-direction: column;
    align-items: start;
    padding: 22px;
  }

  .button-row,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .monitor-panel-head {
    flex-direction: column;
    align-items: start;
  }

  .admin-monitor-grid {
    grid-template-columns: 1fr;
  }

  .admin-monitor-main {
    grid-row: auto;
  }

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

  .preview-card-main {
    grid-row: auto;
  }

  .preview-hero {
    flex-direction: column;
    align-items: start;
  }

  .lower-third {
    left: 14px;
    right: 14px;
    bottom: 14px;
    min-width: auto;
    max-width: none;
  }

  .lower-third-manual-art {
    width: 68px;
  }

  .lower-third-program-logo {
    width: 44px;
    height: 44px;
    right: 10px;
    top: 10px;
    border-radius: 10px;
  }

  .lower-third-name,
  .lower-third-title {
    padding-right: 54px;
  }

  .brand-bug {
    width: 68px;
    top: 12px;
    right: 12px;
    border-radius: 12px;
  }

  .ticker-track span {
    font-size: 0.84rem;
  }

  .ticker {
    left: 14px;
    right: 14px;
    bottom: 12px;
  }

  .countdown-panel {
    min-width: calc(100vw - 24px);
    padding: 14px 18px;
    border-radius: 16px;
  }

  .photo-frame {
    width: min(calc(100vw - 24px), 520px);
    padding: 8px;
    border-radius: 14px;
  }
}
