:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-2: #eef3f2;
  --ink: #202524;
  --muted: #66706d;
  --line: #dce3e1;
  --brand: #247a7a;
  --brand-2: #d8644a;
  --accent: #d19a2e;
  --ok: #27845f;
  --warn: #ba7b18;
  --bad: #b94747;
  --radius: 8px;
  --shadow: 0 18px 40px rgba(32, 37, 36, .08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: #202524;
  color: #f7fbfa;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-weight: 800;
  line-height: 1.1;
}

.brand-sub {
  color: rgba(255,255,255,.62);
  font-size: 12px;
  margin-top: 4px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav button,
.sidebar-action {
  color: rgba(255,255,255,.78);
  background: transparent;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 10px;
  border-radius: 8px;
  text-align: left;
}

.nav button.active,
.nav button:hover,
.sidebar-action:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247,248,250,.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.mobile-menu {
  display: none;
}

.page-title h1 {
  font-size: 24px;
  margin: 0;
  letter-spacing: 0;
}

.page-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  padding: 26px 28px 42px;
  width: min(1500px, 100%);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel, .card, .stat, .table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

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

.section-head h2 {
  font-size: 16px;
  margin: 0;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat {
  padding: 16px;
  min-height: 112px;
  display: grid;
  gap: 12px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.stat-foot {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.danger {
  background: #fff0ef;
  border-color: #f4c2bd;
  color: var(--bad);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  cursor: wait;
  opacity: .65;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

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

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #fbfcfc;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok { background: #e7f5ee; color: var(--ok); }
.pill.warn { background: #fff4df; color: var(--warn); }
.pill.bad { background: #fff0ef; color: var(--bad); }
.pill.neutral { background: var(--panel-2); color: var(--muted); }
.pill.brand { background: #e4f3f3; color: var(--brand); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.media-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.thumb {
  aspect-ratio: 16 / 10;
  background: #27302e;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 4px;
  background:
    linear-gradient(135deg, rgba(0,0,0,.18), rgba(255,255,255,.06)),
    #27302e;
  color: #fff;
  font-weight: 800;
}

.video-thumb .icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.video-thumb small {
  font-size: 11px;
  opacity: .78;
}

.media-info {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.media-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.playlist-builder {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.listbox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child { border-bottom: 0; }
.list-row.active { background: #e4f3f3; }
.list-row[data-select-playlist-row] { cursor: pointer; }
.list-row[data-select-playlist-row]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}
.playlist-select-link {
  text-decoration: none;
  width: 100%;
}

.playlist-rename input {
  flex: 1 1 220px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.tiny-thumb {
  width: 54px;
  height: 42px;
  border-radius: 6px;
  background: #27302e;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
  font-size: 12px;
}

.tiny-thumb img,
.tiny-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented button {
  min-height: 36px;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--brand); color: #fff; }

.player-shell {
  min-height: 100vh;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.player-frame {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  background: #111;
}

.smooth-player {
  overflow: hidden;
}

.player-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: #111;
  transition: opacity .18s linear;
}

.player-layer.active {
  opacity: 1;
  z-index: 1;
}

.player-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.player-template-frame {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: #050505;
  overflow: hidden;
}

.player-template-stage {
  width: 100vw;
  height: auto;
  max-height: 100vh;
  position: relative;
  background: #050505;
  overflow: hidden;
}

.player-template-frame.portrait .player-template-stage {
  width: auto;
  height: 100vh;
  max-width: 100vw;
}

.player-zone {
  position: absolute;
  overflow: hidden;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}

.player-zone .player-media {
  object-fit: cover;
}

.player-zone video,
.player-zone img {
  display: block;
}

.text-zone,
.empty-zone {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(18px, 3vw, 46px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--zone-color) 80%, #111), #111);
}

.text-zone span {
  font-size: clamp(14px, 1.8vw, 28px);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}

.text-zone strong,
.empty-zone strong,
.live-zone strong {
  font-size: clamp(30px, 5vw, 92px);
  line-height: 1;
}

.text-zone p,
.empty-zone p,
.live-zone p {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 38px);
  color: rgba(255,255,255,.72);
}

.ticker-zone {
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--zone-color) 86%, #111);
  border: 0;
}

.ticker-zone div {
  white-space: nowrap;
  font-size: clamp(24px, 3.2vw, 64px);
  font-weight: 850;
  animation: ticker-scroll 18s linear infinite;
}

.live-zone iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.live-zone {
  display: block;
  padding: 0;
  background: #050505;
}

.live-zone.empty-zone {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(18px, 3vw, 46px);
}

.native-clock {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: clamp(14px, 2vw, 32px);
  padding: clamp(28px, 5vw, 92px);
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(36, 122, 122, .22), transparent 34%), #050505;
}

.native-clock span {
  font-size: clamp(18px, 2vw, 38px);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.native-clock strong {
  font-size: clamp(70px, 12vw, 220px);
  line-height: .9;
  font-weight: 900;
}

.native-clock p {
  margin: 0;
  font-size: clamp(24px, 3vw, 58px);
  color: rgba(255, 255, 255, .78);
}

@keyframes ticker-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.player-empty {
  text-align: center;
  max-width: 620px;
  padding: 30px;
}

.pair-code {
  font-size: clamp(42px, 9vw, 100px);
  font-weight: 900;
  letter-spacing: 8px;
  margin: 18px 0;
}

.player-badge {
  position: fixed;
  left: 18px;
  bottom: 18px;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16,20,19,.52);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
}

.modal {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 18px;
}

.form-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f4c2bd;
  border-radius: 8px;
  background: #fff0ef;
  color: var(--bad);
  font-size: 13px;
  font-weight: 700;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #202524;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 60;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
}

.dropzone {
  border: 1px dashed var(--line);
  background: #fbfcfc;
  border-radius: var(--radius);
  min-height: 142px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
}

.dropzone input {
  display: none;
}

.progress {
  height: 8px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: var(--brand);
}

.two-line {
  display: grid;
  gap: 2px;
}

.nowrap {
  white-space: nowrap;
}

.hide {
  display: none !important;
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playlist-builder { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    padding: 14px;
  }
  .content { padding: 16px 14px 32px; }
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .form-grid { grid-template-columns: 1fr; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .topbar { flex-wrap: wrap; }
  .timeline-item { grid-template-columns: 46px 1fr auto; }
  .timeline-item .meta-actions { grid-column: 1 / -1; }
}

/* PosterBooking-inspired application skin */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #f8f9fd;
  --ink: #526078;
  --muted: #a6afc0;
  --line: #e8edf8;
  --brand: #6874df;
  --brand-2: #8d69c9;
  --accent: #8bdcf2;
  --ok: #22c38a;
  --warn: #ff9c2a;
  --bad: #e55757;
  --shadow: 0 18px 48px rgba(45, 55, 96, .10);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
  background: linear-gradient(90deg, #eef2f7 0, #f8f9fd 210px, #fff 210px);
  color: var(--ink);
}

.app-shell {
  grid-template-columns: 190px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,250,253,.92)),
    radial-gradient(circle at 50% 100%, rgba(210, 220, 231, .55), transparent 42%);
  color: #607088;
  padding: 14px 10px;
  box-shadow: 8px 0 28px rgba(35, 45, 70, .13);
  border-right: 1px solid #e7ebf2;
}

.brand-block {
  display: block;
  padding: 8px 10px 18px;
  border-bottom: 1px solid #dce2eb;
}

.brand-mark {
  width: 142px;
  height: 76px;
  margin: 0 auto;
  border: 1px dashed #cbd3df;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  color: #174c84;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0;
  box-shadow: none;
}

.brand-name {
  display: none;
}

.brand-sub {
  color: #2862a0;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  margin-top: -24px;
  position: relative;
}

.nav {
  gap: 2px;
  margin-top: 10px;
}

.nav button,
.sidebar-action {
  color: #627089;
  min-height: 36px;
  padding: 8px 4px;
  border-radius: 5px;
  font-size: 12px;
  gap: 8px;
}

.nav button::after,
.sidebar-action::after {
  content: "";
  width: 14px;
  height: 10px;
  margin-left: auto;
  border-radius: 3px;
  background: #aeb8c8;
}

.nav button.active,
.nav button:hover,
.sidebar-action:hover {
  color: #4d5ed8;
  background: rgba(105, 116, 223, .08);
}

.nav .icon,
.sidebar-action .icon {
  color: #aeb8c8;
}

.live-help {
  color: #ff9c2a;
}

.main {
  background: #f7f8fc;
}

.topbar {
  min-height: 44px;
  padding: 4px 14px;
  justify-content: flex-end;
  background: #f3f4f7;
  box-shadow: 0 8px 24px rgba(40, 50, 70, .10);
  border-bottom: 0;
}

.page-title {
  display: none;
}

.top-actions {
  margin-left: auto;
  gap: 7px;
}

.top-actions .btn,
.top-actions .pill {
  min-height: 32px;
  font-size: 11px;
  box-shadow: none;
}

.content {
  width: 100%;
  padding: 20px 28px 62px;
}

.panel,
.card,
.stat,
.table-wrap,
.media-card,
.listbox,
.mini-card,
.tour-card,
.upload-option,
.example-playlist {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(43, 54, 86, .07);
}

.panel {
  padding: 22px;
}

.btn,
.icon-btn {
  border-radius: 3px;
  border-color: #dbe2f2;
  color: #6874df;
  background: #fff;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 11px;
}

.btn.primary {
  background: #fff;
  color: #5265ff;
  border: 2px solid #5265ff;
}

.pill {
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(80, 90, 130, .06);
}

.pill.brand {
  background: #f4f5ff;
  color: #5966d8;
}

.pill.ok {
  background: #ddfbf1;
  color: #22b889;
}

.wizard-hero {
  min-height: 335px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(104, 116, 223, .10), transparent 26%), #fbf9ff;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 20px 55px rgba(43, 54, 86, .11);
  margin: -20px -8px 44px;
}

.wizard-hero .rocket {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5d6bd8, #7357c3);
  border-radius: 22px;
  transform: rotate(-5deg);
  box-shadow: 0 18px 34px rgba(88, 93, 190, .24);
}

.wizard-hero .rocket .icon {
  width: 42px;
  height: 42px;
}

.wizard-hero h1 {
  margin: 0;
  color: #46578f;
  font-size: 31px;
}

.wizard-hero p {
  width: min(560px, 90%);
  margin: 0;
  color: #8e9bb1;
  line-height: 1.6;
}

.hero-pills {
  display: flex;
  gap: 16px;
}

.wizard-progress {
  margin-bottom: 40px;
  border-color: #dfe6ff;
}

.wizard-progress strong {
  color: #16bf85;
  font-size: 25px;
}

.progress {
  height: 8px;
  background: #dbdde3;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.16);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: #a7b0c0;
  font-size: 11px;
  margin-top: 14px;
}

.tour-card {
  position: relative;
  background: rgba(255,255,255,.92);
  padding: 28px 64px 44px;
  margin: 0 36px 42px;
  min-height: 220px;
  border-top: 4px solid transparent;
}

.tour-card::before {
  content: "";
  position: absolute;
  left: -18px;
  top: -46px;
  bottom: -42px;
  width: 2px;
  background: #c7d0ff;
}

.tour-card.active-step {
  border-top-color: #6874df;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.step-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #7f8da4;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(89, 105, 135, .32);
}

.step-head h2 {
  color: #8a96b5;
  font-size: 21px;
  margin: 0;
}

.tour-body {
  color: #9aa5b8;
}

.tour-body h3 {
  color: #46546c;
}

.feature-list {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.feature-list div {
  display: flex;
  gap: 14px;
  align-items: center;
}

.feature-list .icon {
  color: #7675e3;
}

.info-strip,
.success-strip {
  border: 2px solid #75c6ef;
  border-radius: 8px;
  padding: 14px 18px;
  background: #f3fbff;
  color: #7083a5;
  font-weight: 800;
  margin: 18px 0;
  box-shadow: 0 10px 18px rgba(85, 180, 226, .14);
}

.success-strip {
  border-color: #76d7c0;
  background: #effcf7;
  color: #6abfae;
}

.mini-card,
.upload-option,
.example-playlist {
  background: #fff;
  padding: 24px;
}

.mini-card h3 {
  color: #a0a9cc;
}

.mini-card p {
  color: #9da7b8;
  line-height: 1.7;
}

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

.upload-option {
  min-height: 148px;
  display: grid;
  place-items: center;
  align-content: center;
  color: #a6a2d2;
}

.upload-option .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
}

.upload-option span {
  font-size: 11px;
  color: #aeb7c6;
}

.example-playlist {
  align-self: start;
  padding: 30px;
}

.example-playlist small {
  display: block;
  margin-bottom: 16px;
  color: #8d94a5;
}

.example-playlist div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fbfbfd;
  padding: 12px 14px;
  margin: 9px 0;
  color: #a3acbb;
}

  .example-playlist b {
  background: #8ddcf3;
  color: #fff;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 11px;
}

/* DigiComm Beacon redesign */
:root {
  --bg: #fafaf7;
  --panel: #ffffff;
  --panel-2: #f4f2ec;
  --ink: #0f0f10;
  --muted: #6b6963;
  --subtle: #9e9a90;
  --line: #ece8de;
  --line-strong: #dcd6c5;
  --brand: #4f46e5;
  --brand-soft: #eeebff;
  --brand-2: #ff5b2e;
  --accent: #c68b1a;
  --ok: #2f9e6e;
  --warn: #c68b1a;
  --bad: #d8492c;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(15, 15, 16, .08);
  --font: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  font-family: var(--font);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  background: var(--panel);
  color: var(--ink);
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  box-shadow: none;
  gap: 14px;
}

.brand-block {
  display: block;
  padding: 4px 6px 18px;
  border-bottom: 0;
}

.brand-logo {
  display: block;
  width: min(178px, 100%);
  height: auto;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  width: 34px;
  height: 34px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  box-shadow: none;
  font-size: 19px;
  font-style: normal;
  letter-spacing: 0;
  font-weight: 900;
}

.brand-mark img {
  padding: 0;
  object-fit: contain;
  background: #fff;
}

.brand-name {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: .95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-sub {
  position: static;
  margin-top: 3px;
  text-align: left;
  color: var(--ink);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.side-search .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.side-search kbd {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--subtle);
  font: 10px/1.2 ui-monospace, "Geist Mono", monospace;
}

.nav {
  gap: 1px;
  margin-top: 0;
}

.nav button,
.sidebar-action {
  min-height: 35px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  gap: 10px;
}

.nav button::after,
.sidebar-action::after {
  display: none;
}

.nav button.active,
.nav button:hover,
.sidebar-action:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav .icon,
.sidebar-action .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.nav button.active .icon,
.nav button:hover .icon {
  color: var(--brand);
}

.side-section-label {
  margin: 8px 6px 0;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.side-groups {
  display: grid;
  gap: 2px;
}

.side-groups button {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.side-groups button:hover {
  background: var(--panel-2);
}

.side-groups span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--group-color);
}

.side-groups strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.side-groups small {
  font: 10px ui-monospace, "Geist Mono", monospace;
  color: var(--subtle);
}

.side-insight {
  margin-top: auto;
  padding: 12px;
  border-radius: 14px;
  background: #ffe9df;
  color: var(--ink);
}

.side-insight small {
  display: block;
  color: #a73318;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.side-insight strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.side-insight button {
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sidebar-foot {
  margin-top: 0;
}

.main {
  background: var(--bg);
}

.topbar {
  min-height: 55px;
  padding: 12px 22px;
  justify-content: space-between;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.breadcrumb strong {
  color: var(--ink);
}

.top-actions {
  margin-left: 0;
  gap: 8px;
}

.top-actions .btn,
.top-actions .pill,
.btn,
.icon-btn {
  border-radius: 11px;
  border: 1px solid var(--line);
  box-shadow: none;
  text-transform: none;
  font-size: 12px;
  font-weight: 800;
}

.top-actions .pill {
  min-height: 30px;
  padding: 5px 10px;
}

.btn {
  min-height: 38px;
  background: var(--panel);
  color: var(--ink);
}

.btn:hover,
.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn.danger {
  background: #fbe0d6;
  border-color: #fbe0d6;
  color: #8a2c18;
}

.icon-btn {
  background: var(--panel-2);
  color: var(--ink);
}

.mobile-menu {
  display: none;
}

.notification-dot {
  position: relative;
}

.notification-dot::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-2);
  border: 2px solid var(--panel-2);
}

.avatar {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5b2e, #ffb084);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.content {
  width: min(1380px, 100%);
  padding: 22px 22px 42px;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--muted);
  font: 11px/1.2 ui-monospace, "Geist Mono", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

.page-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-metric {
  min-width: 150px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.hero-metric strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.hero-metric span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.network-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(155deg, var(--brand) 0%, #7c75f0 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.network-hero::before,
.network-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}

.network-hero::before {
  right: -58px;
  bottom: -64px;
  width: 220px;
  height: 220px;
}

.network-hero::after {
  right: 130px;
  top: -56px;
  width: 130px;
  height: 130px;
  opacity: .7;
}

.network-hero > * {
  position: relative;
}

.network-hero .eyebrow {
  color: rgba(255,255,255,.82);
}

.network-hero h2 {
  margin: 4px 0 0;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.network-hero p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}

.network-rings {
  display: flex;
  gap: 12px;
}

.network-rings span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 24px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
}

.network-rings strong {
  font-size: 22px;
}

.network-rings small {
  margin-top: 2px;
  color: rgba(255,255,255,.74);
  font-size: 11px;
  font-weight: 800;
}

.panel,
.card,
.stat,
.table-wrap,
.media-card,
.listbox,
.mini-card,
.tour-card,
.upload-option,
.example-playlist {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
}

.panel {
  padding: 18px;
}

.grid {
  gap: 12px;
}

.stat {
  min-height: 132px;
  padding: 16px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.stat-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.stat-icon .icon {
  width: 17px;
  height: 17px;
}

.sparkline {
  display: grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 3px;
  height: 24px;
}

.sparkline span {
  width: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.sparkline span:nth-child(1) { height: 10px; }
.sparkline span:nth-child(2) { height: 18px; background: var(--brand); }
.sparkline span:nth-child(3) { height: 14px; background: var(--brand-2); }
.sparkline span:nth-child(4) { height: 22px; background: var(--ok); }

.stat-label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-value {
  color: var(--ink);
  font-size: 32px;
  letter-spacing: 0;
}

.stat-foot,
.section-head p,
.meta {
  color: var(--muted);
}

.section-head h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.listbox {
  background: var(--panel);
  overflow: hidden;
}

.list-row {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.list-row.active {
  background: var(--brand-soft);
}

.table-wrap {
  background: var(--panel);
}

table {
  min-width: 820px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}

.pill {
  border-radius: 999px;
  font-weight: 800;
  box-shadow: none;
}

.pill.ok { background: #def3e7; color: #1f6f4d; }
.pill.warn { background: #fbebc8; color: #7a5a0f; }
.pill.bad { background: #fbe0d6; color: #8a2c18; }
.pill.neutral { background: var(--panel-2); color: var(--muted); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

.segmented {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.segmented button {
  color: var(--muted);
  border-color: var(--line);
  font-weight: 800;
}

.segmented button.active {
  background: var(--ink);
  color: #fff;
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.media-card {
  overflow: hidden;
}

.thumb,
.tiny-thumb {
  background: #151515;
}

.dropzone {
  border-color: var(--line-strong);
  background: linear-gradient(155deg, #fff, var(--panel-2));
  border-radius: 16px;
}

.playlist-builder {
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: 12px;
}

.timeline-item {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.btn.danger {
  color: #b33a25;
  background: #fff3ef;
  border-color: #f1ddd7;
}

.schedule-board {
  display: grid;
  gap: 16px;
}

.schedule-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.schedule-head h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: .95;
  letter-spacing: 0;
}

.schedule-actions,
.schedule-detail-head,
.schedule-detail-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented.compact {
  min-height: 50px;
}

.segmented.compact button {
  min-width: 82px;
  padding: 13px 18px;
}

.schedule-timeline {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.schedule-grid-head,
.schedule-lane {
  display: grid;
  grid-template-columns: 260px minmax(820px, 1fr);
}

.schedule-grid-head {
  min-width: 1080px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.hour-row,
.lane-track {
  display: grid;
  grid-template-columns: repeat(18, minmax(46px, 1fr));
}

.hour-row span,
.lane-label {
  padding: 16px 18px;
}

.hour-row span {
  border-left: 1px solid var(--line);
  text-align: center;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.schedule-lane {
  min-width: 1080px;
  min-height: 104px;
  border-top: 1px solid var(--line);
}

.lane-label {
  display: grid;
  align-content: center;
  gap: 3px;
  border-right: 1px solid var(--line);
}

.lane-label strong {
  font-size: 20px;
}

.lane-label span {
  color: var(--muted);
}

.lane-track {
  position: relative;
  min-height: 104px;
}

.hour-line {
  border-left: 1px solid var(--line);
}

.schedule-block {
  position: absolute;
  top: 14px;
  height: calc(100% - 28px);
  border: 0;
  border-radius: 12px;
  background: var(--schedule-color);
  color: #fff;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 10px;
  padding: 12px 18px;
  text-align: left;
  box-shadow: 0 16px 34px rgba(33, 28, 20, .12);
  cursor: pointer;
  overflow: hidden;
}

.schedule-block.selected {
  outline: 3px solid rgba(255,255,255,.78);
  outline-offset: -6px;
}

.schedule-block span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.22);
}

.schedule-block strong {
  align-self: end;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
}

.schedule-block small {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.82);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.add-lane {
  width: 100%;
  min-width: 1080px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 18px 260px 18px 18px;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.schedule-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: start;
}

.schedule-detail,
.schedule-library {
  border-radius: 18px;
}

.schedule-detail-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.schedule-detail-head strong {
  font-size: 22px;
}

.schedule-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--schedule-color);
}

.schedule-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.schedule-facts div {
  display: grid;
  gap: 3px;
}

.schedule-facts small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.schedule-facts strong {
  font-size: 25px;
  line-height: 1;
}

.schedule-facts span {
  color: var(--muted);
}

.conflict-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #ffedc7;
  color: #7c5a0e;
  font-weight: 900;
}

.conflict-card span {
  flex: 1;
}

.schedule-library-list {
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow: auto;
}

.library-loop {
  display: grid;
  grid-template-columns: 58px 1fr 42px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel-2);
}

.loop-thumb {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--schedule-color) 80%, #111), var(--schedule-color)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 2px, transparent 2px 6px);
}

.field label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.field input,
.field select,
.field textarea {
  border-color: var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand-soft);
  border-color: var(--brand);
}

.modal-backdrop {
  background: rgba(15,15,16,.46);
}

.modal {
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15,15,16,.24);
}

.modal-head,
.modal-foot {
  border-color: var(--line);
}

.modal-head h2 {
  font-weight: 900;
}

.toast {
  border-radius: 12px;
  background: var(--ink);
}

.wizard-hero {
  background: linear-gradient(155deg, var(--brand) 0%, #7c75f0 100%);
  color: #fff;
  border-radius: 22px;
  box-shadow: none;
  margin: 0 0 18px;
}

.wizard-hero h1,
.wizard-hero p {
  color: #fff;
}

.wizard-hero .rocket {
  background: rgba(255,255,255,.14);
}

.tour-card {
  margin: 0 0 16px;
  padding: 24px;
}

.tour-card::before {
  display: none;
}

.step-head h2 {
  color: var(--ink);
}

.step-number {
  border-radius: 12px;
  background: var(--ink);
  box-shadow: none;
}

.info-strip,
.success-strip {
  border-radius: 12px;
  box-shadow: none;
}

.empty-state {
  background: var(--panel);
  border-color: var(--line);
}

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

  .sidebar {
    width: 280px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 10px 14px;
  }

  .breadcrumb {
    display: none;
  }

  .content {
    padding: 16px 14px 32px;
  }

  .page-hero,
  .network-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .page-hero {
    display: grid;
  }

  .hero-metric {
    width: 100%;
  }

  .network-rings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .network-rings span {
    width: auto;
  }

  .top-actions .pill,
  .top-actions .notification-dot,
  .avatar {
    display: none;
  }

  .playlist-builder {
    grid-template-columns: 1fr;
  }
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e5e9f2;
  padding: 25px 20px 32px;
}

body::after {
  content: "Live Help!";
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #2f96ff;
  color: #fff;
  border-radius: 16px;
  padding: 11px 18px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(47, 150, 255, .25);
  z-index: 70;
}

body::before {
  content: "Help";
  position: fixed;
  left: 12px;
  bottom: 16px;
  background: #43b34f;
  color: #fff;
  border-radius: 18px;
  padding: 8px 18px;
  font-size: 12px;
  z-index: 70;
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .upload-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-card { margin-left: 0; margin-right: 0; padding: 22px; }
}

@media (max-width: 680px) {
  .wizard-hero { margin-left: 0; margin-right: 0; }
  .upload-options { grid-template-columns: 1fr; }
}

/* Final Beacon polish over the older prototype skin */
body::before,
body::after {
  display: none !important;
}

@media (max-width: 1050px) {
  .sidebar {
    width: 280px;
  }

  .mobile-menu {
    display: inline-grid;
  }
}

/* Templates and layout zone builder */
.templates-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
  gap: 16px;
  align-items: start;
}

.template-editor {
  min-height: 620px;
}

.layout-canvas-wrap {
  padding: 24px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.05) 1px, transparent 1px),
    #050505;
  background-size: 48px 48px;
}

.layout-canvas-wrap.portrait {
  display: grid;
  place-items: center;
}

.layout-canvas {
  position: relative;
  width: 100%;
  max-height: 560px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.layout-canvas-wrap.portrait .layout-canvas {
  width: min(360px, 100%);
}

.layout-zone {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.35);
  border-radius: 10px;
  background: color-mix(in srgb, var(--zone-color) 88%, #111);
  color: #fff;
  text-align: left;
  overflow: hidden;
}

.layout-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.32));
}

.layout-zone span,
.layout-zone strong {
  position: relative;
  z-index: 1;
}

.layout-zone span {
  font: 11px/1.1 ui-monospace, "Geist Mono", monospace;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}

.layout-zone strong {
  font-size: 20px;
  line-height: 1.1;
}

.layout-zone.active {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-color: rgba(255,255,255,.75);
}

.layout-zone i {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #fff;
  border: 3px solid var(--brand);
}

.layout-zone i:nth-of-type(1) { left: -7px; top: -7px; }
.layout-zone i:nth-of-type(2) { right: -7px; top: -7px; }
.layout-zone i:nth-of-type(3) { left: -7px; bottom: -7px; }
.layout-zone i:nth-of-type(4) { right: -7px; bottom: -7px; }

.zone-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--panel-2);
}

.zone-tools button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.zone-tools button:hover {
  background: var(--panel);
}

.zone-tools span {
  margin-left: auto;
  color: var(--muted);
  font: 12px ui-monospace, "Geist Mono", monospace;
}

.template-side {
  display: grid;
  gap: 16px;
}

.zone-inspector .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zone-inspector .field:nth-child(1),
.zone-inspector .field:nth-child(2),
.zone-inspector .field:nth-child(7) {
  grid-column: 1 / -1;
}

.inspector-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

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

.template-picker {
  min-width: 190px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.template-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.template-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(79,70,229,.12);
}

.template-card:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.template-card:focus-visible {
  outline: 3px solid var(--brand-soft);
  border-color: var(--brand);
}

.template-mini {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: #111;
  border: 5px solid #111;
  overflow: hidden;
}

.template-mini i {
  position: absolute;
  border-radius: 4px;
  background: var(--zone-color);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.template-card strong {
  font-size: 13px;
}

.template-card small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.template-card em {
  font-style: normal;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .layout-zone {
    background: var(--zone-color);
  }
}

@media (max-width: 1180px) {
  .templates-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .layout-canvas-wrap {
    padding: 12px;
  }

  .layout-zone {
    padding: 10px;
  }

  .layout-zone strong {
    font-size: 13px;
  }

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