@import url("/web/fonts/google-fonts.css");

:root {
  color-scheme: dark;
  --bg: #030807;
  --bg-soft: #08130f;
  --panel: rgba(12, 20, 19, 0.9);
  --panel-2: rgba(221, 255, 242, 0.06);
  --panel-3: rgba(58, 255, 164, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(93, 243, 255, 0.34);
  --text: #f5f8fb;
  --muted: #9aaba6;
  --faint: #657771;
  --accent: #5df3ff;
  --blue: #3f8cff;
  --green: #35f28a;
  --amber: #f4c542;
  --red: #ff596d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

body[data-theme="white"] {
  color-scheme: light;
  --bg: #f3fbf8;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-2: rgba(3, 28, 21, 0.055);
  --panel-3: rgba(24, 190, 120, 0.09);
  --line: rgba(10, 16, 22, 0.12);
  --line-strong: rgba(8, 149, 142, 0.3);
  --text: #05100d;
  --muted: #5f736d;
  --faint: #82968f;
  --accent: #08958e;
  --blue: #2f73ff;
  --green: #12a66a;
  --amber: #b77a00;
  --red: #cf2444;
  --shadow: 0 28px 90px rgba(30, 45, 60, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(115deg, rgba(93, 243, 255, 0.12), transparent 36%),
    linear-gradient(245deg, rgba(53, 242, 138, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(63, 140, 255, 0.07), transparent 42%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.download-button,
.preview-actions a,
.slideshow-controls a,
.send-actions a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  color: var(--text);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover,
.download-button:hover,
.preview-actions a:hover,
.slideshow-controls a:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.primary,
.send-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #031015;
  font-weight: 850;
}

.danger-soft {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 44%, var(--line));
}

.overline {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.helper,
small {
  color: var(--muted);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 8px 20px rgba(0, 0, 0, 0.14);
}

.brand-logo.large {
  width: 40px;
  height: 40px;
  padding: 3px;
}

.brand strong {
  font-size: 15px;
  line-height: 1.05;
  white-space: nowrap;
}

.brand small {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 420px;
  gap: 28px;
  padding: 34px;
  align-items: stretch;
}

.login-visual,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-visual {
  position: relative;
  overflow: hidden;
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 620px;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 11, 0.15), rgba(5, 8, 11, 0.92)),
    url("https://images.unsplash.com/photo-1505236858219-8359eb29e329?auto=format&fit=crop&w=2200&q=80") center/cover;
  filter: saturate(1.05) contrast(1.05);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(5, 8, 11, 0.94), transparent);
}

.logo-large,
.login-visual h1,
.login-visual p,
.login-proof {
  position: relative;
  z-index: 1;
}

.logo-large {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: auto;
}

.logo-large strong {
  font-size: 20px;
  line-height: 1.04;
}

.login-visual h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 88px);
  line-height: 0.95;
}

.login-visual p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(245, 248, 251, 0.78);
  font-size: 18px;
  line-height: 1.5;
}

.login-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-proof span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  padding: 10px 12px;
  color: #eaf8ff;
  font-size: 13px;
}

.login-card {
  align-self: center;
  padding: 28px;
  display: grid;
  gap: 16px;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
}

select {
  color-scheme: dark;
  background-color: #111922;
  color: #f5f8fb;
}

select option {
  background-color: #111922;
  color: #f5f8fb;
}

select option:checked {
  background-color: #2f80ed;
  color: #ffffff;
}

select option:disabled {
  color: #7b8792;
}

body[data-theme="white"] select {
  color-scheme: light;
  background-color: #ffffff;
  color: #071017;
}

body[data-theme="white"] select option {
  background-color: #ffffff;
  color: #071017;
}

body[data-theme="white"] select option:checked {
  background-color: #007aff;
  color: #ffffff;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.pro-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.pro-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(3, 7, 11, 0.76);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-theme="white"] .pro-sidebar {
  background: rgba(255, 255, 255, 0.82);
}

.nav-item {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-top: 6px;
  font-weight: 680;
}

.nav-item span {
  width: 24px;
  color: var(--accent);
  text-align: center;
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(93, 243, 255, 0.14), rgba(53, 242, 138, 0.1));
  border-color: var(--line-strong);
}

.system-mini {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.system-mini strong {
  font-size: 14px;
}

.system-mini span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.system-mini em {
  color: var(--text);
  font-style: normal;
}

.command-center {
  padding: 14px;
  max-width: 1720px;
  width: 100%;
  margin: 0 auto;
}

.command-bar {
  position: sticky;
  top: 14px;
  z-index: 80;
  min-height: 64px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-soft) 96%, transparent);
  backdrop-filter: blur(22px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.bar-spacer {
  flex: 1;
}

.run-pill,
.watch-pill,
.user-chip,
.clock,
.status-badge {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  min-height: 42px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
}

.run-pill span,
.worker-line span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.run-pill.paused span,
.worker-line.paused span {
  background: var(--amber);
  box-shadow: 0 0 18px rgba(244, 197, 66, 0.55);
}

.watch-pill {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 260px;
}

.watch-pill small {
  font-size: 11px;
}

.user-chip {
  color: var(--muted);
  white-space: nowrap;
}

.session-chip {
  gap: 10px;
  min-width: 190px;
  max-width: 270px;
  padding: 7px 10px;
}

.top-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #031015;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 12px;
}

.top-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.top-avatar span {
  display: grid;
  place-items: center;
}

.session-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.session-copy strong,
.session-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-copy strong {
  color: var(--text);
  font-size: 13px;
}

.session-copy small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-badge {
  color: var(--green);
  min-height: 32px;
  font-weight: 780;
}

.status-badge.simulation,
.status-badge.needs_template,
.status-badge.needs_webhook,
.status-badge.needs_public_url,
.status-badge.needs_callback,
.status-badge.needs_storage_adapter,
.status-badge.needs_credentials,
.status-badge.paused {
  color: var(--amber);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.96fr) minmax(320px, 0.9fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.event-card,
.watch-card,
.compliance-card,
.cinema-card,
.log-card,
.config-card,
.provider-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.event-card,
.watch-card,
.compliance-card {
  min-height: 320px;
  padding: 16px;
  min-width: 0;
}

.event-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 2.7vw, 46px);
  line-height: 1;
}

.event-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.event-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(128px, 0.55fr);
  gap: 10px;
  margin: 12px 0 16px;
  max-width: 100%;
}

.event-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  min-width: 0;
}

.event-edit-grid label:nth-child(4) {
  max-width: 170px;
}

.event-edit-grid input,
.event-edit-grid select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  text-transform: none;
}

.event-operation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.event-operation small {
  line-height: 1.35;
}

.status-badge.event-status-live {
  color: var(--green);
}

.status-badge.event-status-draft {
  color: var(--amber);
}

.status-badge.event-status-archived {
  color: var(--red);
}

.events-workspace,
.slideshow-workspace {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.events-hero,
.slideshow-hero {
  min-height: 0;
}

.events-settings-grid {
  margin-top: 0;
}

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

.compact-metrics strong {
  font-size: 20px;
}

.event-meta strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 22px 0 18px;
}

.hero-metrics div {
  padding: 18px 14px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  text-align: center;
}

.hero-metrics div:first-child {
  border-left: 0;
}

.hero-metrics strong {
  display: block;
  color: var(--accent);
  font-size: 30px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.event-actions,
.media-toolbar,
.preview-actions,
.send-actions,
.slideshow-controls,
.station-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

.scan-line {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 18px 0;
}

.scan-line i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-item {
  min-height: 46px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  text-align: left;
  align-items: center;
  padding: 0 10px;
}

.queue-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.queue-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.queue-item.active {
  border-color: var(--accent);
}

.worker-line {
  margin-top: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.wa-emblem {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid var(--green);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 42px;
  margin: 12px 0;
}

.quality-bars,
.real-checks {
  display: grid;
  gap: 10px;
}

.quality-bars span {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.quality-bars i {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.quality-bars i.warn {
  background: linear-gradient(90deg, var(--amber), rgba(244, 197, 66, 0.2));
}

.real-checks span {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
}

.real-checks span.ok {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
}

.real-checks span.warn {
  border-color: color-mix(in srgb, var(--amber) 48%, var(--line));
}

.real-checks strong {
  color: var(--text);
  font-size: 13px;
}

.real-checks small {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

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

.delivery-snapshot span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  min-height: 64px;
}

.delivery-snapshot strong,
.delivery-snapshot small {
  display: block;
}

.delivery-snapshot strong {
  color: var(--text);
  font-size: 22px;
}

.delivery-snapshot small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.mode-grid button {
  display: grid;
  min-height: 72px;
  justify-items: start;
  align-content: center;
  text-align: left;
}

.mode-grid button.active,
.delivery-choice.active {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(50, 224, 127, 0.13), rgba(93, 228, 255, 0.07));
}

.download-metrics,
.speed-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.network-real {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.network-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.network-row strong,
.network-row small {
  display: block;
}

.network-row small,
.network-real > small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.network-row em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}

.signal-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
  overflow: hidden;
}

.signal-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.download-metrics {
  grid-template-columns: repeat(2, 1fr);
}

.download-metrics span,
.speed-result span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.download-metrics strong,
.speed-result strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.download-metrics small,
.speed-result small {
  display: block;
  margin-top: 6px;
}

.speed-result em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.speed-result.fail em {
  color: var(--amber);
}

.compliance-summary strong {
  overflow-wrap: anywhere;
}

.media-log-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(420px, 0.95fr);
  gap: 12px;
  margin-top: 12px;
}

.cinema-card,
.log-card,
.config-card {
  padding: 16px;
}

.media-preview,
.hero-media {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030507;
  display: grid;
  place-items: center;
}

.pro-preview {
  min-height: 420px;
  margin-top: 14px;
}

.media-preview img:not(.qr),
.media-preview video,
.hero-media img:not(.qr),
.hero-media video {
  width: 100%;
  height: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
}

.media-preview:hover,
.hero-media:hover {
  border-color: var(--line-strong);
}

.media-preview .qr,
.hero-media .qr,
.slideshow-shell .qr {
  position: absolute;
  width: 118px;
  height: 118px;
  left: 14px;
  bottom: 18px;
  border: 7px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  object-fit: contain;
  max-height: none;
}

.qr-label {
  position: absolute;
  left: 146px;
  bottom: 34px;
  max-width: 150px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.25;
}

.media-preview.qr-corner-right .qr,
.hero-media.qr-corner-right .qr {
  left: auto;
  right: 14px;
}

.hero-media.qr-corner-right .qr-label {
  left: auto;
  right: 146px;
}

.preview-meta {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  padding: 8px 10px;
  display: flex;
  gap: 10px;
  font-size: 12px;
}

.media-toolbar {
  margin-top: 10px;
}

.table {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tr {
  min-height: 42px;
  display: grid;
  grid-template-columns: 72px 112px 80px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.tr:first-child {
  border-top: 0;
}

.tr.head {
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
}

.ok {
  color: var(--green);
}

.blocked {
  color: var(--amber);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.9fr);
  gap: 12px;
  margin-top: 12px;
}

.config-row,
.switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-row {
  margin-top: 12px;
}

.switch-row label {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.switch-row input,
.consent input {
  width: 18px;
  height: 18px;
}

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

.slideshow-admin-controls {
  display: grid;
  gap: 10px;
}

.slideshow-panel {
  padding: 16px;
}

.slideshow2-admin-controls {
  gap: 14px;
}

.slideshow2-copy-card,
.slideshow2-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-2), rgba(255, 255, 255, 0.015));
}

.slideshow2-copy-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 14px 0;
}

.slideshow2-copy-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.slideshow2-copy-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slideshow2-section {
  padding: 14px;
}

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

.slideshow2-section-head h3,
.slideshow2-field h4 {
  margin: 0;
}

.slideshow2-section-head h3 {
  font-size: 16px;
}

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

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

.slideshow2-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.slideshow2-field p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.slideshow2-inline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.slideshow2-inline span {
  color: var(--muted);
  font-weight: 900;
}

.inline-switch {
  margin: 0;
}

.provider-strip {
  grid-column: 1 / -1;
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.provider {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.provider span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.provider.ready span {
  background: var(--green);
}

.provider.needs_template span,
.provider.needs_callback span,
.provider.needs_webhook span,
.provider.needs_verification span,
.provider.needs_public_url span,
.provider.needs_storage_adapter span,
.provider.needs_credentials span,
.provider.local span {
  background: var(--amber);
}

.provider strong,
.provider em {
  font-size: 12px;
  font-style: normal;
}

.provider em {
  color: var(--green);
}

.email-template-card {
  grid-column: span 2;
}

.email-template-controls {
  display: grid;
  gap: 10px;
}

.email-template-controls textarea {
  min-height: 72px;
}

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

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

.users-workspace {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.leads-workspace {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.leads-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

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

.lead-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.lead-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.lead-metrics strong {
  display: block;
  color: var(--accent);
  font-size: 26px;
}

.lead-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.lead-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
}

.lead-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  font-size: 12px;
}

.lead-table th,
.lead-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.lead-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--bg-soft) 88%, var(--panel));
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
}

.lead-table a {
  color: var(--accent);
  font-weight: 760;
}

.lead-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
}

.lead-status.ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 44%, var(--line));
}

.lead-status.accepted,
.lead-status.queued,
.lead-status.sent,
.lead-status.processed,
.lead-status.simulated {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
}

.lead-status.delivered,
.lead-status.read,
.lead-status.played,
.lead-status.opened,
.lead-status.clicked {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 44%, var(--line));
}

.lead-status.failed,
.lead-status.undelivered,
.lead-status.blocked {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 44%, var(--line));
}

.lead-table td small {
  display: block;
  color: var(--muted);
  max-width: 240px;
  white-space: normal;
  margin-top: 4px;
}

.error-chip {
  display: grid;
  gap: 3px;
  width: min(360px, 44vw);
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  white-space: normal;
}

.error-chip strong {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
}

.error-chip em {
  border-radius: 999px;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-style: normal;
}

.error-chip small {
  margin-top: 0;
  max-width: none;
}

.error-chip a {
  margin-left: 6px;
}

.error-chip.critical {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
}

.error-chip.warning {
  border-color: color-mix(in srgb, var(--yellow) 54%, var(--line));
}

.error-chip.info {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
}

.lead-file-preview {
  position: relative;
  display: inline-block;
  max-width: 360px;
  cursor: zoom-in;
}

.lead-file-preview > span:first-child {
  display: inline-block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--text);
}

.lead-file-preview:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.log-message {
  min-width: 0;
}

.log-file-preview > span:first-child {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
}

.log-file-preview:hover > span:first-child,
.log-file-preview:focus > span:first-child {
  color: var(--text);
}

.lead-preview-float {
  position: fixed;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 9999;
  overflow: hidden;
}

.lead-preview-float.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lead-preview-float img,
.lead-preview-float video {
  width: 100%;
  height: 230px;
  max-height: min(46vh, 260px);
  object-fit: contain;
  border-radius: 6px;
  background: #000;
  display: block;
}

.lead-preview-float small {
  display: block;
  margin-top: 5px;
  max-width: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--muted);
}

.users-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.users-hero h1 {
  margin-bottom: 8px;
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.user-form,
.user-list,
.user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.user-form {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-self: start;
}

.user-list {
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.user-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  min-width: 0;
}

.user-avatar-box {
  display: grid;
  gap: 8px;
  justify-items: center;
  grid-row: 1 / span 3;
}

.user-avatar {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #031015;
  font-weight: 920;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar span {
  font-size: 22px;
}

.avatar-file {
  cursor: pointer;
  text-align: center;
  font-size: 11px;
}

.avatar-file input {
  max-width: 112px;
  font-size: 10px;
}

.avatar-remove {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.user-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.user-edit {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  column-gap: 10px;
  row-gap: 6px;
}

.user-edit label {
  min-width: 0;
}

.user-edit small {
  grid-column: 1 / -1;
}

.user-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-controls {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: minmax(128px, 1fr) minmax(118px, 0.8fr) minmax(170px, 1.25fr) minmax(78px, 0.55fr) minmax(82px, 0.55fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.user-controls > * {
  width: 100%;
  min-width: 0;
}

.permission-line {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 0;
}

.permission-line span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  color: var(--muted);
}

.permission-line .enabled {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  color: var(--green);
}

.permission-line .disabled {
  opacity: 0.58;
}

.station-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.station-top {
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 11, 0.72);
  backdrop-filter: blur(20px);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body[data-theme="white"] .station-top {
  background: rgba(255, 255, 255, 0.84);
}

.station-count {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--panel-2);
}

.station-count strong {
  color: var(--accent);
  font-size: 22px;
}

.station-count span {
  color: var(--muted);
  font-size: 13px;
}

.connection-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 26px currentColor;
}

.connection-dot.ok {
  color: var(--green);
  background: var(--green);
}

.connection-dot.bad {
  color: var(--red);
  background: var(--red);
}

.station-main {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(420px, 0.52fr);
  gap: 14px;
  padding: 14px;
  min-height: 0;
}

.public-gallery-main {
  display: block;
}

.station-gallery-wall {
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  border: 0;
  border-radius: 0;
}

.gallery-wall {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 16, 22, 0.62);
  box-shadow: var(--shadow);
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

body[data-theme="white"] .gallery-wall {
  background: rgba(255, 255, 255, 0.74);
}

.gallery-head {
  min-height: 82px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gallery-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 54px);
  line-height: 0.96;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 18px;
  overflow: auto;
  align-content: start;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.gallery-tile {
  position: relative;
  min-height: 248px;
  height: clamp(248px, 23vw, 340px);
  padding: 0;
  overflow: hidden;
  display: block;
  text-align: left;
  background: #06090d;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-tile:hover,
.gallery-tile.active,
.gallery-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 20px 54px rgba(50, 224, 127, 0.16);
}

.tile-media,
.tile-media img,
.tile-media video {
  display: block;
  width: 100%;
  height: 100%;
}

.tile-media img,
.tile-media video {
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-tile:hover .tile-media img,
.gallery-tile:hover .tile-media video,
.gallery-tile.active .tile-media img,
.gallery-tile.active .tile-media video {
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

.play-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #031015;
  background: var(--green);
  font-style: normal;
}

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  padding: 22px;
  display: grid;
  place-items: center;
  touch-action: none;
  overscroll-behavior: none;
}

.share-modal {
  position: relative;
  width: min(1540px, 96vw);
  max-height: 94vh;
  max-height: 94dvh;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(380px, 430px);
  gap: 14px;
}

.modal-close {
  position: absolute;
  z-index: 6;
  top: -14px;
  right: -14px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 50%;
  padding: 0;
  font-size: 30px;
  background: #fff;
  color: #071017;
}

.modal-media {
  position: relative;
  min-width: 0;
  touch-action: pan-y;
}

.modal-media .hero-media {
  min-height: min(78vh, 780px);
  min-height: min(78dvh, 780px);
  background: #000;
}

.modal-media .hero-media > img:not(.qr),
.modal-media .hero-media > video {
  max-height: min(78vh, 780px);
  max-height: min(78dvh, 780px);
}

.modal-media .qr {
  width: 92px;
  height: 92px;
  left: 16px;
  bottom: 16px;
  border-width: 6px;
}

.modal-media .hero-media.qr-corner-right .qr {
  left: auto;
  right: 16px;
}

.modal-media .qr-label {
  display: none;
}

.station-fullscreen-button {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 8;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.station-fullscreen-button:hover,
.station-fullscreen-button:focus-visible {
  background: rgba(0, 0, 0, 0.82);
  outline: 2px solid rgba(94, 234, 212, 0.78);
  outline-offset: 2px;
}

.modal-media .hero-media.qr-corner-right + .station-fullscreen-button {
  right: auto;
  left: 22px;
}

body.station-media-fullscreen {
  overflow: hidden;
}

body.station-media-fullscreen .share-overlay {
  padding: 0;
  background: #000;
}

body.station-media-fullscreen .share-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  display: block;
  border: 0;
  border-radius: 0;
  background: #000;
}

body.station-media-fullscreen .modal-media,
body.station-media-fullscreen .modal-media .hero-media {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}

body.station-media-fullscreen .modal-media .hero-media > img:not(.qr),
body.station-media-fullscreen .modal-media .hero-media > video {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

body.station-media-fullscreen .modal-send-panel {
  display: none;
}

body.station-media-fullscreen .modal-close {
  top: 16px;
  right: 16px;
  z-index: 24;
}

body.station-media-fullscreen .station-fullscreen-button {
  right: 22px;
  bottom: 22px;
}

.station-shell .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(190px, 24vw, 320px), 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  padding: clamp(12px, 1.6vw, 22px);
}

.station-shell .gallery-tile {
  min-height: clamp(190px, 26vw, 340px);
  height: clamp(190px, 26vw, 340px);
}

.station-shell .modal-close,
.station-shell .round,
.station-shell .station-fullscreen-button,
.station-shell .public-send {
  min-width: 54px;
  min-height: 54px;
}

.station-shell .phone-combo select,
.station-shell .phone-combo input,
.station-shell .email-field input {
  min-height: 60px;
  font-size: clamp(20px, 2.1vw, 30px);
}

.station-shell .modal-send-panel {
  user-select: text;
  -webkit-user-select: text;
}

.modal-send-panel {
  max-height: min(78vh, 780px);
  max-height: min(78dvh, 780px);
  overflow: auto;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.public-send {
  min-height: 64px;
  font-size: 18px;
}

.public-send-actions {
  grid-template-columns: 1fr;
}

.online-gallery-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  background: #05080b;
}

body[data-theme="white"] .online-gallery-shell {
  background: #f3f7fb;
}

.online-gallery-top {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.online-gallery-top > span {
  color: var(--muted);
  font-size: 13px;
}

.online-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  padding: 14px;
  min-height: 0;
}

.online-stage {
  position: relative;
  min-height: calc(100vh - 190px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.online-stage > img,
.online-stage > video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
}

.online-download-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.online-download-panel h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.98;
}

.download-hero {
  min-height: 66px;
  font-size: 18px;
}

.online-thumb-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.online-thumb-rail .thumb {
  flex: 0 0 auto;
}

.reference-gallery-page {
  --gallery-blue: #3699f0;
  --gallery-blue-dark: #2f65de;
  --gallery-background: linear-gradient(180deg, var(--gallery-blue) 0%, var(--gallery-blue-dark) 100%);
  --gallery-text: #fff;
  --gallery-font-family: Inter, Arial, sans-serif;
  --gallery-download-bg: rgba(0, 0, 0, .92);
  --gallery-download-text: #fff;
  min-height: 100vh;
  background: var(--gallery-background);
  color: var(--gallery-text);
  font-family: var(--gallery-font-family);
}

.reference-gallery-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  background: var(--gallery-background);
  color: var(--gallery-text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reference-gallery-header {
  width: 100%;
  text-align: center;
  padding: 20px 0 0;
}

.reference-gallery-logo {
  display: inline-flex;
  min-height: 100px;
  width: 100%;
  max-width: 940px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--gallery-text);
  font-size: clamp(34px, 7vw, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}

.reference-gallery-logo img {
  max-width: min(260px, 100%);
  max-height: 86px;
  object-fit: contain;
  display: block;
}

.reference-gallery-title {
  display: block;
  width: 100%;
  max-width: 940px;
  text-align: center;
  overflow-wrap: anywhere;
}

.reference-gallery-tabs {
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  padding: 0 12px 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .28);
}

.reference-gallery-tabs a {
  color: var(--gallery-text);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 15px;
  font-size: 13px;
  line-height: 19px;
  min-width: 56px;
  text-align: center;
}

.reference-gallery-tabs a:hover,
.reference-gallery-tabs a.active {
  border-color: rgba(255, 255, 255, .95);
  background: transparent;
}

.reference-gallery-content {
  width: 100%;
  max-width: 100vw;
  padding: 25px max(25px, calc((100% - 1025px) / 2)) 50px;
  flex: 1 0 auto;
}

.reference-gallery-grid {
  width: 100%;
  max-width: 1025px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: center;
  align-items: start;
  gap: 0;
}

.reference-gallery-item {
  width: 100%;
  max-width: none;
  padding: 5px;
}

.reference-gallery-item a {
  display: block;
  width: 100%;
  aspect-ratio: 201 / 320;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .16), rgba(0, 0, 0, .22) 62%), rgba(7, 14, 31, .5);
  box-shadow: 1px 1px 5px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.reference-gallery-item img,
.reference-gallery-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, .5);
}

.reference-gallery-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 45, .45);
}

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

.reference-gallery-video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .14));
  pointer-events: none;
}

.reference-gallery-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, .48);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  pointer-events: none;
}

.reference-gallery-play::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 15px;
  border-left: 18px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.reference-gallery-empty {
  grid-column: 1 / -1;
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--gallery-text);
  opacity: .84;
}

.reference-gallery-empty strong {
  color: var(--gallery-text);
  font-size: 20px;
  opacity: 1;
}

.reference-gallery-pagination {
  display: flex;
  width: fit-content;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 22px auto 0;
}

.reference-gallery-pagination a,
.reference-gallery-pagination span {
  min-width: 35px;
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px 5px;
  padding: 6px 12px;
  border-radius: 0;
  border: 0;
  background: rgba(255, 255, 255, .8);
  color: #444d58;
  font-size: 14px;
  line-height: 20px;
}

.reference-gallery-pagination a.active {
  background: #fff;
  font-weight: 700;
}

.reference-gallery-footer {
  width: 100%;
  color: var(--gallery-text);
  text-align: center;
  padding: 28px 16px 42px;
  font-size: 14px;
  flex: 0 0 auto;
}

.reference-gallery-footer a {
  color: inherit;
}

.reference-detail-page .reference-gallery-shell {
  align-items: stretch;
  min-height: 100dvh;
}

.reference-detail-page .reference-gallery-header {
  position: relative;
  flex: 0 0 auto;
}

.reference-detail-page .reference-gallery-logo {
  min-height: clamp(74px, 12vh, 110px);
  padding: 0 76px;
  font-size: clamp(30px, 5vw, 58px);
}

.reference-detail-back {
  position: absolute;
  left: max(18px, calc((100vw - 894px) / 2 + 18px));
  top: 44px;
  color: var(--gallery-text);
  font-size: 18px;
}

.reference-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
  color: var(--gallery-text);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 18px;
  padding: clamp(22px, 4vh, 44px) 18px clamp(32px, 5vh, 58px);
}

.reference-detail-media {
  width: min(346px, calc(100vw - 46px));
  background: transparent;
  box-shadow: 5px 7px 12px 6px rgba(0, 0, 0, .1);
}

.reference-detail-media.is-video {
  --detail-video-max-height: min(62svh, calc(100dvh - 340px), 680px);
  width: min(860px, calc(100vw - 46px));
  height: var(--detail-video-max-height);
  max-height: var(--detail-video-max-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: rgba(0, 0, 0, .18);
  border-radius: 6px;
}

.reference-detail-media img,
.reference-detail-media video {
  display: block;
  width: 100%;
  object-fit: contain;
  background: transparent;
}

.reference-detail-media.is-video video {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.reference-download-button {
  min-width: min(280px, calc(100vw - 46px));
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gallery-download-text);
  border-radius: 999px;
  background: var(--gallery-download-bg);
  color: var(--gallery-download-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.reference-download-button::before {
  content: "\2193";
  margin-right: 9px;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.reference-detail-missing {
  min-height: 420px;
  align-content: center;
}

.reference-detail-return {
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #fff;
  padding: 10px 16px;
  border-radius: 6px;
}

.counter {
  position: absolute;
  z-index: 4;
  left: 22px;
  top: 18px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 780;
}

.hero-media {
  min-height: calc(100vh - 220px);
}

.round {
  position: absolute;
  z-index: 4;
  top: calc(50% - 52px);
  width: 68px;
  height: 68px;
  min-height: 68px;
  border-radius: 50%;
  padding: 0;
  font-size: 48px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.prev {
  left: 18px;
}

.next {
  right: 18px;
}

.guest-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.station-send-panel {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 98px);
  overflow: auto;
}

.selected-preview {
  position: relative;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #020405;
}

.selected-preview .hero-media {
  min-height: 330px;
}

.selected-preview .hero-media > img:not(.qr),
.selected-preview .hero-media > video {
  height: 330px;
}

.selected-preview .counter {
  display: none;
}

.selected-preview .round {
  top: calc(50% - 29px);
  width: 48px;
  height: 48px;
  min-height: 48px;
  font-size: 34px;
}

.guest-panel h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.big-input input {
  height: 58px;
  font-size: 22px;
  font-weight: 780;
  touch-action: manipulation;
}

.phone-combo {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
}

.phone-combo select,
.phone-combo input {
  width: 100%;
}

.phone-combo select {
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 10px;
  font-weight: 780;
  touch-action: manipulation;
}

.hidden {
  display: none;
}

.consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  font-size: 13px;
  line-height: 1.35;
}

.delivery-list {
  display: grid;
  gap: 8px;
}

.delivery-choice {
  min-height: 68px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-content: start;
  align-content: center;
  text-align: left;
}

.delivery-choice span {
  grid-row: 1 / 3;
  color: var(--green);
}

.delivery-choice strong {
  font-size: 14px;
}

.delivery-choice em {
  margin-left: 6px;
  color: #031015;
  background: var(--green);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 10px;
  font-style: normal;
}

.delivery-choice small {
  font-size: 12px;
}

.send-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.send-actions button,
.send-actions a {
  min-height: 56px;
  font-weight: 850;
}

.send-actions.public-send-actions {
  grid-template-columns: 1fr;
}

.gallery-command-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.gallery-command-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toast {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-3);
  padding: 12px;
  font-size: 13px;
}

.thumb-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.thumb {
  width: 112px;
  min-width: 112px;
  height: 86px;
  padding: 0;
  overflow: hidden;
  position: relative;
}

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

.thumb.active,
.thumb:hover {
  border-color: var(--green);
  transform: translateY(-6px) scale(1.04);
}

.thumb span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  display: grid;
  place-items: center;
}

.slideshow-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
  display: grid;
  place-items: center;
}

.slideshow-shell > img:not(.qr),
.slideshow-shell > video {
  width: 100%;
  height: 100vh;
  object-fit: contain;
  animation: slideBreath 6s ease-in-out infinite alternate;
}

.slideshow-shell.fit-cover > img:not(.qr),
.slideshow-shell.fit-cover > video {
  object-fit: cover;
}

.slideshow-shell.transition-fade > img:not(.qr),
.slideshow-shell.transition-fade > video {
  animation: slideFade 900ms ease both;
}

.slideshow-shell.transition-slide > img:not(.qr),
.slideshow-shell.transition-slide > video {
  animation: slideEnter 780ms cubic-bezier(.22, 1, .36, 1) both;
}

.slideshow-shell.orientation-portrait {
  background:
    linear-gradient(90deg, #020305, #0a0f13 18%, #020305 50%, #0a0f13 82%, #020305);
}

.slideshow-shell.orientation-portrait > img:not(.qr),
.slideshow-shell.orientation-portrait > video {
  width: min(100vw, 62vh);
  max-width: 780px;
  height: 100vh;
  object-fit: contain;
  filter: drop-shadow(0 34px 90px rgba(0, 0, 0, 0.74));
}

.slideshow-shell.orientation-auto > img:not(.qr),
.slideshow-shell.orientation-auto > video {
  width: min(100vw, 160vh);
  max-width: 100vw;
  height: 100vh;
  object-fit: contain;
}

@keyframes slideBreath {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

@keyframes slideFade {
  from { opacity: 0; transform: scale(1.01); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideEnter {
  from { opacity: 0; transform: translateX(20px) scale(1.01); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.slideshow-controls {
  position: absolute;
  z-index: 3;
}

.slideshow-controls {
  right: 24px;
  bottom: 26px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.slideshow-controls button {
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  color: #fff;
}

.slideshow-shell.controls-visible .slideshow-controls,
.slideshow2-page.controls-visible .slideshow-controls,
.slideshow-controls:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.slideshow-shell.qr-corner-right .qr {
  left: auto;
  right: 26px;
  bottom: 96px;
}

.slideshow-shell.qr-corner-left .qr {
  left: 26px;
  right: auto;
  bottom: 96px;
}

.slideshow2-page {
  --slide-fit: contain;
  min-height: 100vh;
  height: 100vh;
  background-color: #020305;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
  position: relative;
}

.slideshow2-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.26), transparent 42%),
    linear-gradient(225deg, rgba(93, 243, 255, 0.1), transparent 38%);
  pointer-events: none;
}

.slideshow2-page.disabled {
  display: grid;
  place-items: center;
  grid-template-rows: 1fr;
  padding: 24px;
}

.slideshow2-disabled-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow);
}

.slideshow2-disabled-card h1 {
  margin: 8px 0;
}

.slideshow2-page:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  background-color: #000;
}

.slideshow2-window-header {
  height: var(--header-size, 72px);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.slideshow2-window-header img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slideshow2-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--slide-columns, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--slide-rows, 3), minmax(0, 1fr));
  gap: clamp(4px, .7vw, 12px);
  justify-self: center;
  position: relative;
  z-index: 1;
}

.slideshow2-portrait .slideshow2-stage {
  width: min(100%, 56.25vh);
  aspect-ratio: 9 / 16;
}

.slideshow2-landscape .slideshow2-stage {
  aspect-ratio: 16 / 9;
}

.slideshow2-tile {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  place-items: center;
  border-radius: 6px;
  position: relative;
}

.slideshow2-tile img:not(.qr),
.slideshow2-tile video {
  width: 100%;
  height: 100%;
  object-fit: var(--slide-fit);
  display: block;
}

.slideshow2-fit-cover { --slide-fit: cover; }
.slideshow2-fit-contain { --slide-fit: contain; }

.slideshow2-tile .qr {
  position: absolute;
  width: clamp(70px, 8vw, 118px);
  height: clamp(70px, 8vw, 118px);
  left: 12px;
  right: auto;
  bottom: 12px;
  border: 6px solid #fff;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  z-index: 2;
}

.slideshow2-page.qr-corner-right .slideshow2-tile .qr {
  left: auto;
  right: 12px;
}

.slideshow2-fullscreen-ad {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #000;
}

.slideshow2-fullscreen-frame {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.slideshow2-fullscreen-portrait .slideshow2-fullscreen-frame {
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.7778vw);
}

.slideshow2-fullscreen-landscape .slideshow2-fullscreen-frame {
  width: min(100vw, 177.7778vh);
  height: min(100vh, 56.25vw);
}

.slideshow2-fullscreen-frame img,
.slideshow2-fullscreen-frame video {
  width: 100%;
  height: 100%;
  object-position: center center;
  display: block;
}

.slideshow2-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 50vh;
  color: rgba(255, 255, 255, 0.76);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 8px;
}

.slideshow2-quick-panel {
  left: 50%;
  right: auto;
  bottom: 26px;
  justify-content: center;
  align-items: center;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px;
  transform: translate(-50%, 10px);
}

.slideshow2-quick-panel span {
  color: rgba(255, 255, 255, 0.82);
  min-width: 58px;
  text-align: center;
  font-weight: 800;
}

.slideshow2-page.controls-visible .slideshow2-quick-panel,
.slideshow2-quick-panel:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.empty,
.empty-stage {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 1220px) {
  .hero-grid,
  .media-log-grid,
  .settings-grid,
  .lead-metrics,
  .users-grid,
  .events-workspace,
  .slideshow-workspace,
  .slideshow2-grid,
  .slideshow2-grid.compact-grid,
  .station-main,
  .login-screen {
    grid-template-columns: 1fr;
  }

  .email-template-card {
    grid-column: auto;
  }

  .user-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .user-avatar-box {
    grid-row: auto;
  }

  .users-hero,
  .leads-hero {
    grid-template-columns: 1fr;
  }

  .user-controls,
  .permission-line {
    grid-column: 1 / -1;
  }

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

  .user-edit label:nth-child(3) {
    grid-column: auto;
  }

  .guest-panel {
    order: -1;
  }

  .station-send-panel {
    order: 0;
    position: static;
    max-height: none;
  }

  .share-modal {
    grid-template-columns: 1fr;
    overflow: auto;
  }

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

  .online-stage {
    min-height: 62vh;
  }

  .modal-send-panel {
    max-height: none;
    justify-content: start;
  }

  .event-edit-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr) minmax(128px, 0.45fr) minmax(120px, 0.38fr);
  }

  .event-edit-grid label:nth-child(4) {
    max-width: none;
  }
}

@media (max-width: 1220px) and (min-width: 900px) {
  .station-shell .share-modal {
    width: min(1180px, 97vw);
    max-height: 92vh;
    max-height: 92dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    overflow: visible;
  }

  .station-shell .guest-panel {
    order: 0;
  }

  .station-shell .modal-media .hero-media {
    min-height: min(82vh, 720px);
    min-height: min(82dvh, 720px);
  }

  .station-shell .modal-media .hero-media > img:not(.qr),
  .station-shell .modal-media .hero-media > video {
    max-height: min(82vh, 720px);
    max-height: min(82dvh, 720px);
  }

  .station-shell .modal-send-panel {
    max-height: min(82vh, 720px);
    max-height: min(82dvh, 720px);
    justify-content: center;
  }
}

@media (max-width: 899px) {
  .event-card h1 {
    font-size: clamp(30px, 7vw, 44px);
    overflow-wrap: anywhere;
  }

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

  .event-meta,
  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .station-shell .share-overlay {
    align-items: start;
    overflow: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .station-shell .share-modal {
    width: min(100%, 760px);
    max-height: none;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .station-shell .modal-media {
    order: 1;
  }

  .station-shell .guest-panel,
  .station-shell .modal-send-panel {
    order: 2;
  }

  .station-shell .modal-media .hero-media {
    min-height: min(62vh, 680px);
    min-height: min(62dvh, 680px);
  }

  .station-shell .modal-media .hero-media > img:not(.qr),
  .station-shell .modal-media .hero-media > video {
    max-height: min(62vh, 680px);
    max-height: min(62dvh, 680px);
  }

  .station-shell .phone-combo {
    grid-template-columns: minmax(132px, 0.42fr) 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  .station-shell .gallery-tile:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: none;
  }

  .station-shell .gallery-tile:hover .tile-media img,
  .station-shell .gallery-tile:hover .tile-media video {
    transform: none;
    filter: none;
  }

  .station-shell .gallery-tile:active {
    transform: scale(0.985);
    border-color: var(--green);
  }

  .station-shell .round:active,
  .station-shell .modal-close:active,
  .station-shell .station-fullscreen-button:active,
  .station-shell .public-send:active {
    transform: scale(0.96);
  }
}

@media (max-width: 840px) {
  .pro-shell {
    grid-template-columns: 76px 1fr;
  }

  .pro-sidebar {
    padding: 12px 8px;
  }

  .pro-sidebar .brand strong,
  .nav-item,
  .system-mini {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item span {
    font-size: 18px;
  }

  .command-bar,
    .event-meta,
    .event-edit-grid,
    .hero-metrics,
  .delivery-snapshot,
  .mode-grid,
  .config-row,
  .color-grid,
  .user-controls,
  .switch-row,
  .compact-switches {
    grid-template-columns: 1fr;
    display: grid;
    height: auto;
  }

  .watch-pill {
    min-width: 0;
  }

  .session-chip {
    min-width: 0;
    max-width: none;
  }

  .station-main,
  .command-center {
    padding: 10px;
  }

  .share-overlay {
    padding: 10px;
  }

  .share-modal {
    width: 100%;
  }

  .hero-media {
    min-height: 58vh;
  }

  .selected-preview .hero-media {
    min-height: 330px;
  }

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

@media (max-width: 560px) {
  .event-card,
  .watch-card,
  .compliance-card {
    padding: 14px;
  }

  .event-card h1 {
    font-size: clamp(27px, 10vw, 38px);
  }

  .event-edit-grid,
  .event-meta,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metrics div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-metrics div:first-child {
    border-top: 0;
  }

  .login-screen {
    padding: 12px;
  }

  .login-visual {
    min-height: 420px;
    padding: 26px;
  }

  .login-card {
    padding: 20px;
  }

  .station-top {
    padding: 0 12px;
  }

  .brand strong {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .guest-panel h1 {
    font-size: 20px;
  }

  .big-input input {
    height: 54px;
    font-size: 20px;
  }

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

  .gallery-tile {
    min-height: 170px;
    height: 190px;
  }

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

  .qr {
    width: 88px;
    height: 88px;
  }

  .qr-label {
    display: none;
  }

  .round {
    width: 54px;
    height: 54px;
    min-height: 54px;
  }

  .share-overlay {
    padding: 8px;
  }

  .share-modal {
    width: 100%;
    max-height: 98vh;
    gap: 8px;
  }

  .modal-media .hero-media {
    min-height: 54vh;
  }

  .online-gallery-shell {
    grid-template-rows: 58px minmax(0, 1fr) auto;
  }

  .online-viewer {
    padding: 8px;
    gap: 8px;
  }

  .online-download-panel {
    padding: 14px;
  }

  .reference-detail-back {
    top: 36px;
    left: 16px;
    font-size: 16px;
  }

  .reference-detail-page .reference-gallery-logo {
    min-height: 78px;
    padding: 0 68px;
    font-size: clamp(27px, 8vw, 42px);
  }

  .reference-detail-content {
    gap: 14px;
    padding: 22px 14px 38px;
  }

  .reference-detail-media.is-video {
    --detail-video-max-height: min(58svh, calc(100dvh - 320px), 620px);
    width: min(720px, calc(100vw - 36px));
  }
}

@media (max-width: 480px) {
  .reference-detail-content {
    gap: 14px;
    padding: 14px 14px 28px;
  }

  .reference-detail-media.is-video {
    --detail-video-max-height: min(52svh, calc(100dvh - 285px), 460px);
    width: min(100%, calc(100vw - 28px));
  }
}

.station-shell.station-orientation-landscape .share-modal {
  width: min(1540px, 97vw);
  max-height: 94vh;
  max-height: 94dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  overflow: visible;
}

.station-shell.station-orientation-landscape .guest-panel,
.station-shell.station-orientation-landscape .modal-send-panel {
  order: 0;
  justify-content: center;
}

.station-shell.station-orientation-landscape .modal-media {
  order: 0;
}

.station-shell.station-orientation-portrait .share-overlay {
  align-items: start;
  overflow: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.station-shell.station-orientation-portrait .share-modal {
  width: min(100%, 760px);
  max-height: none;
  grid-template-columns: 1fr;
  overflow: visible;
}

.station-shell.station-orientation-portrait .modal-media {
  order: 1;
}

.station-shell.station-orientation-portrait .guest-panel,
.station-shell.station-orientation-portrait .modal-send-panel {
  order: 2;
  max-height: none;
  justify-content: start;
}

.station-shell.station-orientation-portrait .modal-media .hero-media {
  min-height: min(62vh, 680px);
  min-height: min(62dvh, 680px);
}

.station-shell.station-orientation-portrait .modal-media .hero-media > img:not(.qr),
.station-shell.station-orientation-portrait .modal-media .hero-media > video {
  max-height: min(62vh, 680px);
  max-height: min(62dvh, 680px);
}

@media (orientation: landscape) {
  .station-shell.station-orientation-auto .share-modal {
    width: min(1540px, 97vw);
    max-height: 94vh;
    max-height: 94dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    overflow: visible;
  }

  .station-shell.station-orientation-auto .guest-panel,
  .station-shell.station-orientation-auto .modal-send-panel {
    order: 0;
    justify-content: center;
  }
}

@media (orientation: portrait) {
  .station-shell.station-orientation-auto .share-overlay {
    align-items: start;
    overflow: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .station-shell.station-orientation-auto .share-modal {
    width: min(100%, 760px);
    max-height: none;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .station-shell.station-orientation-auto .modal-media {
    order: 1;
  }

  .station-shell.station-orientation-auto .guest-panel,
  .station-shell.station-orientation-auto .modal-send-panel {
    order: 2;
    max-height: none;
    justify-content: start;
  }

  .station-shell.station-orientation-auto .modal-media .hero-media {
    min-height: min(62vh, 680px);
    min-height: min(62dvh, 680px);
  }

  .station-shell.station-orientation-auto .modal-media .hero-media > img:not(.qr),
  .station-shell.station-orientation-auto .modal-media .hero-media > video {
    max-height: min(62vh, 680px);
    max-height: min(62dvh, 680px);
  }
}

body.station-media-fullscreen .station-shell .share-overlay {
  padding: 0;
  background: #000;
  overflow: hidden;
  touch-action: none;
}

body.station-media-fullscreen .station-shell .share-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  display: block;
  border: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
}

body.station-media-fullscreen .station-shell .modal-media,
body.station-media-fullscreen .station-shell .modal-media .hero-media {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
}

body.station-media-fullscreen .station-shell .modal-media .hero-media > img:not(.qr),
body.station-media-fullscreen .station-shell .modal-media .hero-media > video {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
}

body.station-media-fullscreen .station-shell .modal-send-panel {
  display: none;
}
