:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #16212f;
  --muted: #607086;
  --primary: #0e5cf6;
  --danger: #d03535;
  --border: #d7e0eb;
  --radius: 20px;
  --shadow: 0 14px 35px rgba(20, 36, 64, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
body { min-height: 100vh; overflow-x: hidden; }

.container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.main { padding: 26px 0 40px; }
.topbar {
  background: #0f1824;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.1rem; }
.link-button {
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
  font: inherit;
}
.menu-button { color: var(--text); }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
}
.user-menu-panel a,
.user-menu-panel form,
.user-menu-panel .menu-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
}
.user-menu-panel a:hover,
.user-menu-panel .menu-button:hover { background: #f3f6fb; }

.card, .mini-card, .soft-card, .public-card, .ad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.soft-card { background: #f9fbfe; }
.mini-card { padding: 14px; }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-public { grid-template-columns: 2fr 1fr; }
.grid-ad-edit { grid-template-columns: 220px 1fr; gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.kpi {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fbfcff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi strong { font-size: 1.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #edf3ff;
  border-radius: 999px;
  color: #204492;
  font-size: .9rem;
}
.badge-status { background: #f1f4fa; color: #334761; }
.flash {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.flash-success { background: #e8f8ed; color: #1b6b36; }
.flash-error { background: #fdeaea; color: #7c1e1e; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.break-all { word-break: break-all; }
.wrap-gap { gap: 12px; }
.align-start { align-items: flex-start; }
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label { display: grid; gap: 6px; }
input, select, button { font: inherit; }
input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; }
.checkbox.inline { display: inline-flex; }
.button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #b9c7dc;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-weight: 600;
}
.button-small { width: auto; padding: 10px 14px; }
.button-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.button-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
}
.inline-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.button-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.button-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.plain-list { padding-left: 18px; margin: 0; }
.public-links-box { max-width: 520px; }
.business-title-row { display: flex; gap: 12px; align-items: center; }
.business-title-row.large { align-items: flex-start; }
.business-title-row.compact { gap: 10px; }
.logo-small { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; border: 1px solid var(--border); background: white; }
.logo-large { width: 92px; height: 92px; border-radius: 18px; object-fit: cover; border: 1px solid var(--border); background: white; }
.logo-tiny { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); background: white; }
.turn-big {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
}
.turn-medium {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
}
.turn-mobile {
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  font-weight: 800;
}
.poster-column { display: grid; gap: 16px; align-content: start; }
.poster-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  padding: 10px;
}
.poster-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  border: 0;
  background: #ffffff;
}
.poster-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}
.ad-placeholder {
  min-height: 220px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--border);
  color: var(--muted);
}
.business-grid { grid-template-columns: 2fr 1fr; }

.business-dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}
.business-dashboard-left {
  min-width: 0;
}
.business-dashboard-shell .business-others-card {
  margin-top: 0;
}
.business-dashboard-shell .business-ads-card-end {
  align-self: start;
  position: sticky;
  top: 88px;
}
.small-turn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.mini-turn-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fbfcff;
}
.mini-turn {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 10px 0 6px;
}
.public-card { padding: 18px; }
.public-card-featured { border-color: #9fc1ff; background: linear-gradient(180deg, #eef5ff, #ffffff); }
.mobile-body { background: #eef3f8; }
.mobile-wrap { width: min(680px, calc(100% - 24px)); margin: 12px auto 20px; }
.mobile-business-card { padding-bottom: 18px; }
.public-main { padding-top: 8px; padding-bottom: 12px; }
.auth-wrap { min-height: 70vh; display: grid; place-items: center; }
.auth-card { width: min(460px, 100%); }

.tv-body {
  background: #06101a;
  color: white;
}
.tv-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 100vh;
}
.tv-main { padding: 0; }
.tv-ads { padding: 0; }
.tv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.tv-badge { background: rgba(255,255,255,0.12); color: white; }
.tv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tv-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 18px 24px;
}
.tv-card-featured {
  grid-column: span 2;
  background: linear-gradient(135deg, #0057ff, #00a3ff);
}
.tv-business-row .logo-small { border-color: rgba(255,255,255,0.25); }
.tv-ticket {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 900;
  margin: 18px 0;
}
.tv-ad-stack { display: grid; gap: 20px; height: 100%; align-content: start; }
.tv-ad-box {
  background: rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 14px;
  min-height: calc((100vh - 110px) / 2 - 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tv-ad-empty { display: grid; place-items: center; }
.tv-ad-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  background: #ffffff;
}

@media (max-width: 1080px) {
  .business-dashboard-shell { grid-template-columns: 1fr; }
  .business-dashboard-shell .business-ads-card-end { position: static; }
  .grid-3, .grid-2, .grid-public, .grid-ad-edit, .business-grid, .small-turn-grid, .button-grid, .kpi-grid, .tv-grid { grid-template-columns: 1fr; }
  .tv-layout:not(.business-tv-layout) { grid-template-columns: 1fr; }
  .tv-ads { padding: 0 28px 28px; }
  .tv-card-featured { grid-column: span 1; }
  .business-tv-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
    align-items: start;
  }
}

@media (max-width: 860px) {
  .business-tv-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 20px, 1280px); }
  .topbar-inner, .between { align-items: flex-start; }
  .turn-big { font-size: clamp(2.2rem, 12vw, 4rem); }
  .public-links-box { max-width: none; }
}

.device-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.muted-tv {
  color: rgba(255,255,255,0.82);
}

.business-tv-layout .tv-grid {
  grid-template-columns: 1fr 1fr;
}

.business-tv-featured {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tv-logo-large {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.15);
}

.tv-ticket-primary {
  font-size: clamp(4rem, 9vw, 8rem);
}

.tv-ticket-secondary {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}


body.theme-dark {
  --bg: #06101a;
  --card: #0f1b29;
  --text: #f3f7fb;
  --muted: #b8c8d8;
  --border: rgba(255,255,255,0.16);
  --shadow: 0 10px 25px rgba(0,0,0,0.24);
}

body.theme-dark .button-link,
body.theme-dark .button,
body.theme-dark input,
body.theme-dark select {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
}

body.theme-dark .badge-status,
body.theme-dark .badge {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

body.theme-dark .ad-placeholder { border-color: rgba(255,255,255,0.18); }
body.theme-dark .public-card-featured { background: linear-gradient(180deg, rgba(0,87,255,0.2), rgba(255,255,255,0.06)); border-color: rgba(102,159,255,0.65); }
body.theme-light.tv-body {
  background: #edf3fa;
  color: #16212f;
}
body.theme-light.tv-body .tv-card {
  background: white;
  border-color: #d7e0eb;
  color: #16212f;
}
body.theme-light.tv-body .tv-card-featured {
  background: linear-gradient(135deg, #0057ff, #00a3ff);
  color: white;
}
body.theme-light.tv-body .tv-badge,
body.theme-light.tv-body .tv-ad-box {
  background: white;
  color: #16212f;
  border: 1px solid #d7e0eb;
}
body.theme-light.tv-body .muted-tv { color: rgba(255,255,255,0.88); }
body.theme-light.mobile-body {
  background: #eef3f8;
}
body.theme-dark.mobile-body {
  background: #06101a;
}

.public-page-shell,
.tv-body,
.mobile-body {
  font-size: calc(16px * var(--ui-scale, 1));
}

.density-compact { --public-card-min: 220px; --tv-card-min: 240px; }
.density-auto { --public-card-min: 280px; --tv-card-min: 320px; }
.density-comfortable { --public-card-min: 360px; --tv-card-min: 420px; }

.public-layout-responsive {
  align-items: start;
  grid-template-columns: minmax(0, 1.9fr) minmax(260px, 360px);
}

.public-business-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--public-card-min, 280px), 1fr));
  gap: 14px;
}

.public-business-list .public-card-featured {
  grid-column: 1 / -1;
}

.tv-grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(var(--tv-card-min, 320px), 1fr));
}

.config-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.config-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.config-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 4px;
}

.is-active {
  outline: 2px solid rgba(14,92,246,0.25);
  border-color: var(--primary);
}

body.theme-dark .is-active {
  outline-color: rgba(255,255,255,0.15);
}

.public-controls-card {
  position: static;
  z-index: 1;
  padding: 16px 18px;
}

.public-controls-card h1 {
  margin: 0;
  line-height: 1.08;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.public-controls-card p {
  margin: 6px 0 0;
}

.mobile-business-link {
  display: block;
}

.clickable-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.clickable-card:hover {
  transform: translateY(-2px);
}

.tv-config-strip .button-link,
.tv-config-strip .config-label {
  color: inherit;
}

@media (max-width: 900px) {
  .public-controls-card { position: static; }
}

.public-ads-column { align-self: start; }

@media (max-height: 900px) {
  .public-controls-card { padding: 14px 16px; }
  .public-card { padding: 16px; }
  .turn-medium { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
  .tv-main, .tv-ads { padding-top: 18px; }
}


.public-header-card { padding: 14px 18px; }
.public-footer-controls { padding: 10px 14px; }
.public-footer-controls-mobile { margin-bottom: 8px; }
.config-strip-compact { gap: 8px 12px; }
.config-strip-footer { justify-content: center; }
.button-link-small { padding: 7px 10px; font-size: 0.92rem; border-radius: 10px; }
.card-lite-tv {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 12px 16px;
}
.tv-layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(260px, 0.72fr);
  grid-template-areas:
    "header header"
    "main ads"
    "footer footer";
  gap: 14px;
  min-height: 100vh;
  padding: 12px;
}
.tv-header-full { grid-area: header; margin-bottom: 0; }
.tv-main-shell { grid-area: main; }
.tv-ads-align-top { grid-area: ads; align-self: start; }
.tv-footer-controls { grid-area: footer; }
.tv-grid-auto { grid-template-columns: repeat(auto-fit, minmax(var(--tv-card-min, 320px), 1fr)); }
.tv-business-row strong { font-size: 1.42rem; line-height: 1.15; }
.tv-business-row [data-status-label],
.tv-business-row .small.muted-tv { font-size: 1.02rem; line-height: 1.2; }
.tv-ticket { margin: 12px 0 0; }
.tv-ad-box { min-height: 0; height: 100%; }
.tv-carousel-box {
  min-height: 100%;
  align-items: stretch;
  justify-content: stretch;
}
.tv-carousel-box .carousel-frame,
.tv-carousel-box .poster-link {
  width: 100%;
  height: 100%;
  min-height: 520px;

  max-width: 100%;
  max-height: calc(100vh - 180px);
  margin: 0 auto;
}
.poster-carousel { display: grid; gap: 10px; align-content: start; }
.carousel-frame { position: relative; }
.carousel-meta { display: flex; justify-content: flex-end; }
.carousel-badge { min-width: 56px; }
.poster-link.is-disabled { cursor: default; }
.public-ads-column .poster-link,
.tv-carousel-box .poster-link,
.mobile-wrap .poster-link { padding: 8px; }
.public-ads-column .poster-image,
.tv-carousel-box .poster-image,
.mobile-wrap .poster-image,
.tv-ad-image {
  object-fit: contain;
  object-position: center;
}
.public-layout-responsive {
  align-items: start;
  grid-template-columns: minmax(0, 1.95fr) minmax(250px, 330px);
  gap: 14px;
}
.public-business-list { gap: 12px; }
.public-card { padding: 16px 18px; }
.public-card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.public-controls-card { padding: 14px 16px; }
@media (max-width: 1080px) {
  .business-dashboard-shell { grid-template-columns: 1fr; }
  .business-dashboard-shell .business-ads-card-end { position: static; }
  .tv-layout-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "ads"
      "footer";
  }
  .tv-carousel-box .carousel-frame, .tv-carousel-box .poster-link { min-height: 360px; }
}
@media (max-height: 900px) {
  .tv-layout-shell { padding: 10px; gap: 10px; }
  .tv-header h1, .public-header-card h1 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
  .tv-card { padding: 16px 20px; }
  .tv-ticket { font-size: clamp(2.3rem, 4.5vw, 4.4rem); }
  .tv-ticket-primary { font-size: clamp(3.2rem, 8vw, 7rem); }
  .tv-ticket-secondary { font-size: clamp(2rem, 3.6vw, 3.2rem); }
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-tabs .button-link.is-active,
.config-strip .button-link.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14,92,246,.12) inset;
}
.admin-section-grid { align-items: start; }
.pad-top-sm { padding-top: 12px; }
.poster-link-preview { padding: 6px; }

.business-grid-tablet-aware { align-items: start; }
.business-main-card { order: 1; }
.business-ads-card-end { order: 2; }
.business-others-card { order: 3; }
.tablet-two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tablet-body {
  background: #0f1724;
  color: #f6f8fc;
  min-height: 100vh;
}
.tablet-body.theme-light {
  background: #eef3f8;
  color: var(--text);
}
.tablet-shell {
  width: min(1200px, calc(100% - 20px));
  margin: 10px auto;
  transform: scale(var(--ui-scale, 1));
  transform-origin: top center;
}
.tablet-pane { display: none; gap: 14px; }
.tablet-pane.is-active { display: grid; }
.tablet-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.tablet-body.theme-light .tablet-header {
  background: rgba(255,255,255,.9);
  border-color: var(--border);
}
.tablet-featured {
  padding: 20px;
}
.tablet-turn {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 900;
  line-height: 1;
  margin-top: 12px;
}
.tablet-other-grid {
  display: grid;
  grid-template-columns: repeat(var(--tablet-columns, 2), minmax(0, 1fr));
  gap: 14px;
}
.tablet-other-grid .mini-turn-card { min-height: 150px; }
.tablet-ad-stage {
  min-height: 620px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.tablet-body.theme-light .tablet-ad-stage {
  background: rgba(255,255,255,.9);
  border-color: var(--border);
}
.tablet-ad-stage .poster-link,
.tablet-ad-stage .carousel-frame {
  min-height: 620px;
  aspect-ratio: auto;
}
.tablet-ad-stage .poster-image,
.tablet-ad-stage .carousel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tablet-audio-unlock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #0e5cf6;
  color: white;
  box-shadow: var(--shadow);
}

@media (min-width: 700px) and (max-width: 1180px) {
  .business-grid-tablet-aware { grid-template-columns: 1fr; }
  .business-main-card { order: 1; }
  .business-others-card { order: 2; }
  .business-ads-card-end { order: 3; }
  .small-turn-grid.tablet-two-cols { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .admin-tabs { justify-content: stretch; }
  .admin-tabs .button-link { flex: 1 1 calc(50% - 10px); }
  .tablet-shell { width: calc(100% - 12px); margin: 6px auto; }
  .tablet-header { padding: 12px; }
  .tablet-ad-stage,
  .tablet-ad-stage .poster-link,
  .tablet-ad-stage .carousel-frame { min-height: 420px; }
}

@media (max-width: 700px) {
  .tablet-other-grid,
  .small-turn-grid.tablet-two-cols { grid-template-columns: 1fr; }
}

/* V2.6 ajustes tablet/admin/public */
.small-turn-grid.tablet-two-cols {
  grid-template-columns: repeat(var(--business-columns, 2), minmax(0, 1fr));
}

.tablet-body.theme-dark .tablet-header,
.tablet-body.theme-dark .tablet-featured,
.tablet-body.theme-dark .card,
.tablet-body.theme-dark .tablet-ad-stage {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.tablet-body.theme-dark .tablet-other-grid .mini-turn-card,
.tablet-body.theme-dark .public-tablet-grid .mini-turn-card {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: #f6f8fc;
}

.tablet-body.theme-dark .tablet-other-grid .mini-turn-card .muted,
.tablet-body.theme-dark .public-tablet-grid .mini-turn-card .muted,
.tablet-body.theme-dark .tablet-header .muted,
.tablet-body.theme-dark .tablet-featured .muted {
  color: #c7d4e3;
}

.tablet-body.theme-dark .tablet-other-grid .mini-turn-card strong,
.tablet-body.theme-dark .public-tablet-grid .mini-turn-card strong,
.tablet-body.theme-dark .tablet-turn,
.tablet-body.theme-dark .mini-turn,
.tablet-body.theme-dark h1,
.tablet-body.theme-dark h2 {
  color: #ffffff;
}

.public-tablet-shell .tablet-pane { display: grid; }
.public-tablet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-tablet-featured { background: linear-gradient(180deg, rgba(0,87,255,0.14), rgba(255,255,255,0.04)); }

.admin-section-grid-stacked { grid-template-columns: 1fr; }
.admin-section-grid-stacked > * { min-width: 0; }
.admin-link-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.space-public-config { border-top: 1px dashed var(--border); padding-top: 12px; }
.token-meta { display: grid; gap: 4px; }

@media (min-width: 700px) and (max-width: 1180px) {
  .business-grid-tablet-aware { grid-template-columns: 1fr; }
  .business-main-card { order: 1; }
  .business-others-card { order: 2; }
  .business-ads-card-end { order: 3; }
  .small-turn-grid.tablet-two-cols { grid-template-columns: repeat(var(--business-columns, 2), minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .public-tablet-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .public-tablet-grid,
  .tablet-other-grid,
  .small-turn-grid.tablet-two-cols { grid-template-columns: 1fr; }
}
.business-ads-card-mobile-end { display: none; }
@media (max-width: 1180px) {
  .business-ads-card-end { display: none; }
  .business-ads-card-mobile-end { display: grid; }
}


.business-tv-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  align-items: start;
}

.business-tv-layout .tv-main-shell,
.business-tv-layout .tv-ads-align-top {
  align-self: start;
}

.business-tv-layout .tv-ads-align-top {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.business-tv-layout .tv-carousel-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.business-tv-layout .tv-carousel-box .poster-link,
.business-tv-layout .tv-carousel-box .carousel-frame {
  aspect-ratio: 3 / 4;
}


/* Compact unified view headers */
.view-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 22px;
  padding: 14px 20px;
  border-radius: 22px;
}

.view-titlebar-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.view-titlebar-space {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 500;
  opacity: 0.92;
  white-space: nowrap;
}

.view-titlebar-title {
  margin: 0;
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.view-titlebar-sub {
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  opacity: 0.95;
  white-space: nowrap;
}

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

.public-header-card.view-titlebar,
.tv-header.view-titlebar,
.tablet-header.view-titlebar {
  margin-bottom: 10px;
}

.public-header-card.view-titlebar h1,
.tv-header.view-titlebar h1,
.tablet-header.view-titlebar h1 {
  margin: 0;
}

.tv-header.view-titlebar {
  padding-block: 12px;
}

.tablet-header.view-titlebar {
  padding-block: 12px;
}

@media (max-width: 900px) {
  .view-titlebar {
    align-items: flex-start;
    padding: 14px 16px;
  }
  .view-titlebar-main {
    display: grid;
    gap: 4px;
    align-items: start;
  }
  .view-titlebar-space,
  .view-titlebar-sub {
    white-space: normal;
  }
  .view-titlebar-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .view-titlebar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.business-title-row-compact {
  align-items: baseline;
  gap: 10px 18px;
}
.business-title-row-compact h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.02;
}
.business-title-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
