:root {
  color-scheme: dark;
  --bg: #151719;
  --bg-elevated: #1b1f22;
  --surface: #202529;
  --surface-soft: #262c31;
  --surface-muted: #191d20;
  --ink: #eef2f3;
  --ink-soft: #d3dcdf;
  --muted: #9aa7ad;
  --line: #343c42;
  --line-strong: #465158;
  --accent: #38a3a5;
  --accent-strong: #4db6ac;
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.auth-locked {
  overflow: hidden;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}

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

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #2f8f92;
  border-radius: 7px;
  padding: 0 14px;
  background: #2f8f92;
  color: #f6fbfb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
  touch-action: manipulation;
}

button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.62;
  cursor: wait;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(77, 182, 172, 0.9);
  outline-offset: 2px;
}

.icon,
.mini-icon {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.mini-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}

.button-label {
  white-space: nowrap;
}

input,
select,
textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  background: #15191c;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #111416;
}

textarea {
  resize: vertical;
  min-height: 108px;
  line-height: 1.45;
}

select {
  overflow: hidden;
  text-overflow: ellipsis;
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 16px 22px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(21, 23, 25, 0.98);
  backdrop-filter: blur(8px);
}

.brand-block {
  width: 220px;
  min-width: 0;
  flex: 0 1 220px;
}

.brand-clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
  white-space: nowrap;
}

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

.brand-clock strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.topbar p,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-wrap: pretty;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 15%, rgba(56, 163, 165, 0.16), transparent 34%), rgba(15, 17, 19, 0.96);
}

.auth-screen[hidden] {
  display: none;
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 6px;
  font-size: 24px;
}

.auth-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.auth-error {
  min-height: 20px;
  color: #fecaca !important;
}

.user-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.user-menu {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.user-menu summary {
  cursor: pointer;
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu[open] .user-badge {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 130;
  display: grid;
  gap: 5px;
  width: 210px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px;
  background: rgba(27, 31, 34, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: sseFadeIn 150ms ease-out;
}

.user-menu-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.user-menu-title strong {
  color: var(--ink);
  font-size: 11px;
  text-transform: none;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  height: 34px;
  border-color: transparent;
  border-radius: 7px;
  padding: 0 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.topbar-actions .user-menu-panel .theme-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 9px;
  line-height: 1;
}

.theme-option:hover,
.theme-option.active {
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--ink);
}

.theme-dot {
  display: block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.dark-dot {
  background: #151719;
}

.light-dot {
  background: #f3f4f6;
}

.system-dot {
  background: linear-gradient(135deg, #151719 0 49%, #f3f4f6 51% 100%);
}

.user-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 120px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: var(--surface-muted);
}

.user-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.users-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}

.panel-actions .badge {
  flex: 0 1 auto;
  min-width: max-content;
  max-width: none;
}

.panel-actions .action-button.compact-action {
  width: auto;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

.compact-action {
  min-height: 40px;
  padding: 0 14px;
}

.form-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(840px, calc(100dvh - 32px));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 14px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.form-dialog.wide-dialog {
  width: min(880px, calc(100vw - 32px));
}

.form-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(45, 212, 191, 0.16), transparent 34%),
    rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(8px);
}

.modal-open {
  overflow: hidden;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  grid-column: 1 / -1;
  margin: -2px -2px 2px;
  border-bottom: 1px solid var(--line);
  padding: 4px 2px 14px;
}

.dialog-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.dialog-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-close {
  flex: 0 0 auto;
}

.event-form {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1.3fr) minmax(160px, 1fr) 130px minmax(150px, 0.8fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-muted));
}

.form-dialog .event-form,
.form-dialog .social-publication-form {
  max-height: min(840px, calc(100dvh - 32px));
  margin: 0;
  overflow: auto;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--accent) 6%), var(--surface-soft)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.form-dialog .event-form {
  grid-template-columns: minmax(170px, 0.9fr) minmax(220px, 1.3fr);
}

.event-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.event-form-wide {
  grid-column: span 2;
}

.event-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.event-form-actions button:not(.secondary-action) {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #071112;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  margin: 4px -2px -2px;
  padding-top: 14px;
}

.dialog-actions .muted {
  margin-right: auto;
}

.events-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

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

.cinema-event-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.cinema-event-card time {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.cinema-event-card time strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cinema-event-main {
  min-width: 0;
}

.cinema-event-main strong,
.cinema-event-main span,
.cinema-event-main p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cinema-event-main strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.cinema-event-main span,
.cinema-event-main p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cinema-event-main p {
  margin: 4px 0 0;
}

.event-reminder-pill {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  min-height: 32px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(96, 165, 250, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.event-card-actions {
  display: flex;
  gap: 6px;
}

.danger-icon-button:hover {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--red);
}

.social-publication-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) 190px 130px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-muted));
}

.form-dialog .social-publication-form {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.8fr) minmax(190px, 0.9fr) 140px;
}

.social-publication-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.social-publication-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.social-publication-wide,
.social-publication-actions {
  grid-column: 1 / -1;
}

.social-publication-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-publication-actions button:not(.secondary-action) {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #071112;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.social-publications-list {
  display: grid;
  gap: 10px;
}

.social-publication-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface-soft);
}

.social-publication-head,
.social-publication-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.social-publication-head {
  justify-content: space-between;
}

.social-publication-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.social-publication-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(96, 165, 250, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.social-status.is-ready {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.09);
  color: var(--green);
}

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

.social-publication-meta span {
  min-width: 0;
}

.social-publication-body {
  margin: 0;
  max-width: 90ch;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.social-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-attachment {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  max-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.social-attachment:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.social-attachment span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-attachment small {
  color: var(--muted);
  font-size: 11px;
}

.social-attachment.is-image {
  grid-template-columns: 42px minmax(0, 1fr);
  width: 220px;
  padding: 5px 8px 5px 5px;
}

.social-attachment.is-image img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.existing-social-attachments {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
}

.attachment-edit-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.attachment-edit-header strong {
  color: var(--ink);
  font-size: 14px;
}

.attachment-edit-header span {
  color: var(--muted);
  font-size: 12px;
}

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

.attachment-edit-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px;
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.attachment-edit-item.is-marked-remove {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  opacity: 0.78;
}

.attachment-edit-preview,
.attachment-edit-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  overflow: hidden;
}

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

.attachment-edit-preview .attachment-edit-icon {
  border: 0;
  background: transparent;
}

.attachment-edit-item > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.attachment-edit-item strong,
.attachment-edit-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-edit-item strong {
  color: var(--ink);
  font-size: 13px;
}

.attachment-edit-item span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-remove-toggle {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
}

.attachment-remove-toggle[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--red) 60%, transparent);
  background: color-mix(in srgb, var(--red) 18%, transparent);
  color: var(--red);
}

.marketing-panel {
  overflow: hidden;
}

.marketing-panel .panel-header > div {
  display: grid;
  gap: 4px;
}

.marketing-panel .panel-header span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
}

.marketing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
}

.marketing-controls {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.marketing-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.marketing-subtab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.marketing-subtab.active {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-strong);
}

.marketing-subtab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.marketing-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.marketing-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.marketing-form input {
  min-height: 44px;
}

.marketing-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-actions button {
  min-height: 44px;
}

.marketing-actions + .muted {
  grid-column: 1 / -1;
}

.marketing-source-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.marketing-source-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.marketing-source-card strong {
  color: var(--ink);
}

.marketing-source-card span {
  color: var(--muted);
  font-size: 13px;
}

.marketing-movies-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.marketing-movie-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.marketing-movie-row img,
.marketing-movie-poster-fallback {
  width: 44px;
  height: 58px;
  border-radius: 7px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(45, 212, 191, 0.12));
}

.marketing-movie-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.marketing-movie-row strong,
.marketing-movie-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-preview {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.02));
}

.marketing-poster-empty,
.marketing-poster-link {
  display: grid;
  place-items: center;
  min-height: 520px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
}

.marketing-poster-empty {
  gap: 6px;
  color: var(--muted);
}

.marketing-poster-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.marketing-poster-link img {
  display: block;
  width: 100%;
  max-height: 680px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: var(--shadow);
}

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

.settings-form {
  display: grid;
  gap: 16px;
}

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

.settings-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.settings-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

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

.settings-actions button {
  width: auto;
}

.backup-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.backup-file-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.backup-file-field input {
  min-height: 42px;
  padding: 9px 10px;
}

.backup-file-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.backup-import-row button {
  min-width: 118px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--surface);
}

.user-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.user-delete-button,
.user-delete-spacer {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.user-delete-button {
  padding: 0;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.user-delete-button:hover {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(248, 113, 113, 0.18);
  color: #ffffff;
}

.user-delete-spacer {
  display: block;
}

/* Container for right-aligned topbar items */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

/* Status Panel Dropdown Style */
.status-panel {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.status-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 6px 32px 6px 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.status-panel summary::-webkit-details-marker {
  display: none;
}

.status-panel summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 160ms ease-out;
  pointer-events: none;
}

.status-panel[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.status-panel summary:hover {
  border-color: var(--accent);
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.status-panel summary span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.status-panel summary strong {
  font-weight: 700;
  font-size: 13.5px;
}

.status-panel .status-strip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: rgba(27, 31, 34, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: var(--shadow);
  transform-origin: top right;
  animation: sseFadeIn 150ms ease-out;
}

.status-panel .metric-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  font-size: 12.5px;
  min-height: 32px;
}

.status-panel .metric-pill .label {
  margin-right: auto;
}

.topbar-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}

.topbar-actions button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  line-height: 1;
}

.icon-button {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.icon-button:hover {
  border-color: var(--accent);
  background: rgba(56, 163, 165, 0.16);
  color: var(--ink);
}

.topbar-actions .muted {
  max-width: none;
  overflow: visible;
  text-align: left;
  font-size: 12px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  min-height: 28px;
  color: var(--ink-soft);
}

.metric-pill .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.metric-pill strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background-color 150ms, box-shadow 150ms;
}

.metric-pill:has(strong.state-ok) .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent);
}

.metric-pill:has(strong.state-warn) .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 20%, transparent);
}

.metric-pill:has(strong.state-error) .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 20%, transparent);
}

.topbar .tabs {
  margin-bottom: 0;
  padding-bottom: 0;
  gap: 2px;
  height: 48px;
  align-items: stretch;
  overflow: visible;
  flex: 1 1 auto;
  justify-content: center;
  display: flex;
}

.more-nav {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
}

.more-nav summary {
  list-style: none;
}

.more-nav summary::-webkit-details-marker {
  display: none;
}

.more-nav .more-tab {
  padding-right: 24px;
}

.more-nav .more-tab::before {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 150ms ease-out;
}

.more-nav[open] .more-tab::before {
  transform: translateY(-30%) rotate(225deg);
}

.more-nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 120;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(27, 31, 34, 0.98);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.more-nav-menu .tab {
  justify-content: flex-start;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 10px;
}

.more-nav-menu .tab::after {
  display: none;
}

.more-nav-menu .tab:hover,
.more-nav-menu .tab.active {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--ink);
}

.topbar .tab {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  transition: color 150ms;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.topbar .tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: transparent;
  transition: background-color 150ms;
}

.topbar .tab:hover {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

.topbar .tab.active {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}

.topbar .tab.active::after {
  background-color: var(--accent);
}

.panel,
.player-stage {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow);
}


.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel.active[hidden] {
  display: block !important;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.player-stage {
  display: grid;
  grid-template-columns: minmax(140px, 170px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-height: auto;
  height: 100%;
  padding: 20px;
  overflow: hidden;
}

.player-visual {
  display: grid;
  place-items: center;
  width: 170px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #0f1113;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.player-poster {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-poster.loaded {
  display: block;
}

.poster-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.poster-fallback::before {
  content: "🎬";
  font-size: 32px;
  opacity: 0.25;
}

.player-main {
  min-width: 0;
}

.next-event-widget {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  align-self: start;
  min-height: 74px;
  margin: 0;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 9px;
  padding: 12px 14px;
  background:
    linear-gradient(90deg, rgba(96, 165, 250, 0.11), rgba(45, 212, 191, 0.045)),
    var(--surface-soft);
}

.next-event-widget.is-empty {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.next-event-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.1);
  color: var(--blue);
}

.next-event-icon .mini-icon {
  width: 19px;
  height: 19px;
}

.next-event-main {
  min-width: 0;
}

.next-event-main span,
.next-event-main strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-event-main small {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.next-event-main span {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.next-event-widget.is-empty .next-event-main span {
  color: var(--muted);
}

.next-event-main strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.next-event-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.next-event-reminder {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  min-height: 34px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(45, 212, 191, 0.09);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.player-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.state-badge,
.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-badge {
  min-height: 28px;
  border-color: rgba(74, 222, 128, 0.26);
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
  font-weight: 700;
}

.state-badge.warn {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.state-badge.error {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.player-main h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.player-main p {
  max-width: 960px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.progress-group {
  margin-top: 20px;
}

.progress-group.compact {
  margin-top: 14px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.progress-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #121517;
}

.progress-track.secondary {
  height: 4px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease-out;
}

.progress-fill.secondary {
  background: var(--blue);
}

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

.today-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 560px;
}

.today-panel .panel-header {
  margin-bottom: 12px;
}

.today-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.today-panel #todaySummary {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.today-refresh-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.today-refresh-button.is-loading .mini-icon {
  animation: refreshSpin 900ms linear infinite;
}

.automation-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  min-width: 0;
  margin-top: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(56, 163, 165, 0.32);
  border-radius: 8px;
  padding: 9px 10px 9px 14px;
  background: rgba(56, 163, 165, 0.09);
  box-shadow: inset 3px 0 0 rgba(56, 163, 165, 0.85);
}

.automation-card p {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.automation-main {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.automation-main strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.automation-side {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.automation-checks {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.automation-check {
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1.25;
}

.automation-check strong {
  color: var(--ink-soft);
}

.automation-check span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.automation-check-critical {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.07);
}

.automation-mode,
.automation-ack-done,
.automation-ack-button,
.automation-action-button {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(56, 163, 165, 0.24);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(56, 163, 165, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.automation-ack-button {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
}

.automation-ack-button:hover {
  border-color: rgba(56, 163, 165, 0.55);
  background: rgba(56, 163, 165, 0.18);
}

.automation-action-button {
  border-color: rgba(74, 222, 128, 0.26);
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
  cursor: pointer;
}

.automation-action-button:hover {
  border-color: rgba(74, 222, 128, 0.56);
  background: rgba(74, 222, 128, 0.22);
}

.automation-action-button:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.automation-ack-done {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}

.automation-running .automation-state {
  background: rgba(56, 163, 165, 0.18);
  color: var(--accent);
}

.automation-ready .automation-state,
.automation-prepare .automation-state {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.automation-running {
  border-color: rgba(56, 163, 165, 0.38);
  background: rgba(56, 163, 165, 0.1);
  box-shadow: inset 3px 0 0 rgba(56, 163, 165, 0.95);
}

.automation-ready,
.automation-prepare {
  border-color: rgba(74, 222, 128, 0.18);
}

.automation-blocked .automation-state,
.automation-overdue .automation-state {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.automation-blocked,
.automation-overdue {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
  box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.85);
}

.automation-standby .automation-state,
.automation-waiting .automation-state {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.automation-standby,
.automation-waiting {
  border-color: rgba(251, 191, 36, 0.26);
  background: rgba(251, 191, 36, 0.07);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.75);
}

.today-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.today-session-item {
  display: grid;
  grid-template-columns: 24px 58px minmax(0, 1fr) minmax(88px, auto) minmax(74px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.today-session-item.is-skipped {
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08), rgba(255, 255, 255, 0.025));
}

.today-session-item.is-active {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.08);
}

.today-session-item.is-next {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.08);
}

.session-marker {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: transparent;
}

.session-marker.active {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.session-marker.next {
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue);
}

.today-session-item time {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.today-session-main {
  min-width: 0;
}

.today-session-main strong {
  display: block;
  min-width: 0;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-session-main span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-skip-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  min-width: 86px;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 5px 10px 5px 7px;
  background: rgba(15, 23, 42, 0.34);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
  touch-action: manipulation;
}

.session-skip-toggle:hover {
  border-color: rgba(45, 212, 191, 0.42);
  color: var(--ink);
}

.session-skip-toggle:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.55);
  outline-offset: 2px;
}

.session-skip-toggle:disabled {
  cursor: wait;
  opacity: 0.7;
}

.session-skip-toggle.is-on {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.11);
  color: var(--amber);
}

.session-skip-toggle.is-loading {
  transform: scale(0.98);
}

.skip-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: currentColor;
}

.session-skip-toggle.is-on .skip-toggle-icon {
  background: rgba(251, 191, 36, 0.16);
}

.booking-pill {
  display: inline-grid;
  justify-items: center;
  justify-self: end;
  min-width: 68px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.booking-pill.has-booking {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.09);
  color: var(--green);
}

.booking-pill strong {
  color: inherit;
  font-size: 14px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.booking-pill span {
  margin-top: 2px;
  color: inherit;
  font-size: 10px;
  line-height: 1;
}

.today-empty {
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  background: rgba(74, 222, 128, 0.08);
}

.today-empty strong,
.today-empty span {
  display: block;
}

.today-empty strong {
  margin-bottom: 4px;
  font-size: 14px;
}

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

.event-log {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.event-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(148, 163, 184, 0.8);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
}

.event-row time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.event-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-row span {
  max-width: 220px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-info {
  border-left-color: var(--accent);
}

.event-warning {
  border-left-color: var(--amber);
}

.event-error {
  border-left-color: var(--red);
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.panel-header h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details {
  display: grid;
  gap: 0;
  margin: 0;
}

.details div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.details div:first-child {
  padding-top: 0;
}

.details div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

dd {
  margin: 0;
  min-width: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.session-summary {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.session-summary + .session-summary {
  margin-top: 10px;
}

.session-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.session-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.muted-box {
  background: var(--surface-muted);
}

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

.asset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.asset span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.asset strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.compact-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.compact-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.compact-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.compact-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.component-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  font-size: 13px;
}

.component-item span:first-child {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-item strong {
  white-space: nowrap;
}

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

.incident {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(251, 191, 36, 0.08);
}

.incident.critical {
  border-color: rgba(248, 113, 113, 0.28);
  border-left-color: var(--red);
  background: rgba(248, 113, 113, 0.08);
}

.incident.closed {
  border-color: rgba(74, 222, 128, 0.22);
  border-left-color: var(--green);
  background: rgba(74, 222, 128, 0.08);
}

.incident strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.incident span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.import-row {
  display: grid;
  grid-template-columns: minmax(150px, 180px) 140px 112px 118px 96px 116px minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: var(--surface-muted);
}

.action-button {
  width: 100%;
  min-width: 0;
}

.secondary-action {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.secondary-action:hover {
  border-color: var(--accent);
  background: rgba(56, 163, 165, 0.16);
  color: var(--ink);
}

.danger-action {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.danger-action:hover {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.18);
  color: #ffffff;
}

.simulation-action {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

.simulation-action:hover {
  border-color: rgba(96, 165, 250, 0.78);
  background: rgba(96, 165, 250, 0.22);
  color: #ffffff;
}

.import-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.toolbar-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
}

.status-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.status-counter:empty,
.toolbar-status .muted:empty {
  display: none;
}

.toolbar-status .muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.session-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 0.95fr) 104px;
  gap: 18px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.session-item > div,
.session-item > label {
  min-width: 0;
}

.session-item strong {
  display: block;
  min-width: 0;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.session-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.session-item .match-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 6px;
  width: 104px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.session-item .match-state span {
  display: inline;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: normal;
}

.session-item .match-state.state-ok {
  color: var(--green);
}

.session-item .match-state.state-warn {
  color: var(--amber);
}

.session-item .status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 15%, transparent);
}

.mapping-control {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  min-width: 860px;
}

th,
td {
  padding: 10px 8px;
  color: var(--ink-soft);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
}

th {
  color: var(--muted);
  font-weight: 700;
}

td {
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

td:first-child {
  border-radius: 7px 0 0 7px;
}

td:last-child {
  border-radius: 0 7px 7px 0;
}

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

.state-warn {
  color: var(--amber);
}

.state-error {
  color: var(--red);
}

@media (max-width: 1024px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 16px;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar .tabs {
    justify-content: start;
    height: auto;
    overflow: visible;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .topbar .tab {
    padding: 8px 12px;
  }

  .more-nav .more-tab {
    padding-right: 28px;
  }

  .more-nav-menu {
    left: auto;
    right: 0;
    transform: none;
  }

  .status-strip {
    justify-content: start;
    flex-wrap: wrap;
  }

  .topbar-actions {
    grid-template-columns: auto auto;
    justify-content: start;
    justify-items: start;
  }

  .topbar-actions .muted {
    max-width: none;
    align-self: center;
    text-align: left;
    font-size: 12px;
  }
}

@media (max-width: 1020px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

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

  .player-stage,
  .today-panel {
    min-height: auto;
  }

  .player-stage {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .next-event-widget {
    grid-column: 1 / -1;
  }

  .player-visual {
    width: 150px;
  }

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

  .import-row,
  .session-item {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .panel-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .panel-actions .badge {
    min-width: 0;
    max-width: 100%;
  }

  .panel-actions .action-button.compact-action,
  .compact-action {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .form-dialog,
  .form-dialog.wide-dialog {
    width: min(100vw - 20px, 560px);
    max-height: calc(100dvh - 20px);
  }

  .form-dialog .event-form,
  .form-dialog .social-publication-form {
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }

  .dialog-head {
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
  }

  .dialog-head h2 {
    font-size: 19px;
  }

  .user-form,
  .user-row {
    grid-template-columns: 1fr;
  }

  .event-form,
  .form-dialog .event-form {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .social-publication-form,
  .form-dialog .social-publication-form {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .event-form-wide,
  .event-form-actions,
  .social-publication-wide,
  .social-publication-actions {
    grid-column: auto;
  }

  .event-form-actions,
  .social-publication-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-actions .muted {
    margin-right: 0;
    order: 3;
  }

  .event-form-actions button,
  .social-publication-actions button {
    width: 100%;
  }

  .cinema-event-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .cinema-event-card time strong {
    font-size: 18px;
  }

  .event-reminder-pill {
    grid-column: 2;
    justify-self: start;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .event-card-actions {
    grid-column: 2;
    justify-self: start;
  }

  .social-publication-head,
  .social-publication-head > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-publication-head .event-card-actions {
    align-self: flex-start;
  }

  .social-attachment,
  .social-attachment.is-image {
    width: 100%;
    max-width: 100%;
  }

  .attachment-edit-header,
  .attachment-edit-item {
    align-items: stretch;
  }

  .attachment-edit-header {
    flex-direction: column;
    gap: 4px;
  }

  .attachment-edit-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .attachment-remove-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .user-badge {
    max-width: 130px;
  }
}

@media (max-width: 680px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 12px;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-block h1 {
    font-size: 20px;
  }

  .status-panel {
    order: 3;
    width: 100%;
  }

  .status-panel summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 16px;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    cursor: pointer;
    list-style: none;
  }

  .status-panel summary::-webkit-details-marker {
    display: none;
  }

  .status-panel summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.75;
    transition: transform 160ms ease-out;
  }

  .status-panel[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  .status-panel summary span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
  }

  .status-panel summary strong {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .status-panel .status-strip {
    position: static;
    width: 100%;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: none;
  }

  .status-panel .metric-pill {
    padding: 6px 12px;
    font-size: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
  }

  .metric-pill {
    padding: 6px 12px;
    font-size: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .metric-pill .label {
    margin-right: auto;
  }

  .topbar-actions {
    align-self: flex-end;
    grid-template-columns: auto;
    justify-content: end;
    justify-items: end;
    order: 2;
  }

  .topbar-actions .muted {
    display: none;
  }

  .home-layout,
  .player-stage,
  .layout,
  .asset-grid,
  .component-list,
  .import-row,
  .session-item {
    grid-template-columns: 1fr;
  }

  .player-stage {
    padding: 16px;
  }

  .next-event-widget {
    grid-column: auto;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .next-event-reminder {
    grid-column: 2;
    justify-self: start;
  }

  .today-session-item {
    grid-template-columns: 24px 54px minmax(0, 1fr);
  }

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

  .automation-side {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .automation-check {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .event-row span {
    max-width: 100%;
    justify-self: start;
  }

  .booking-pill {
    grid-column: 3;
    justify-self: start;
  }

  .player-visual {
    width: min(180px, 100%);
    justify-self: center;
  }

  .player-kicker {
    justify-content: center;
  }

  .player-main h2 {
    font-size: 25px;
    text-align: center;
  }

  .player-main p {
    text-align: center;
  }

  .session-item .match-state {
    justify-self: start;
  }

  .details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Light Theme Override */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-muted: #f3f4f6;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #0f766e;
  --accent-strong: #0d9488;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --blue: #2563eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .topbar {
  background: rgba(243, 244, 246, 0.98);
}

:root[data-theme="light"] .status-panel .status-strip,
:root[data-theme="light"] .more-nav-menu,
:root[data-theme="light"] .user-menu-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .status-panel .metric-pill {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .control-btn {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

:root[data-theme="light"] .control-btn:hover {
  border-color: var(--accent);
  background: rgba(15, 118, 110, 0.06);
}

:root[data-theme="light"] .manual-control-panel {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .manual-load-button {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .manual-load-button:hover {
  background: rgba(15, 118, 110, 0.06);
  border-color: var(--accent);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: #ffffff;
  border-color: #d1d5db;
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus {
  background: #f9fafb;
}

:root[data-theme="light"] .today-session-item,
:root[data-theme="light"] .metric,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .player-stage {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .next-event-widget {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.045)),
    #ffffff;
}

:root[data-theme="light"] .next-event-widget.is-empty {
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .next-event-icon {
  background: rgba(37, 99, 235, 0.08);
}

:root[data-theme="light"] .progress-track {
  background: #e5e7eb;
}

:root[data-theme="light"] .incident.closed {
  background: rgba(22, 163, 74, 0.08);
}

:root[data-theme="light"] .incident {
  background: rgba(217, 119, 6, 0.08);
}

:root[data-theme="light"] .incident.critical {
  background: rgba(220, 38, 38, 0.08);
}

:root[data-theme="light"] .today-empty {
  background: rgba(22, 163, 74, 0.08);
}

:root[data-theme="light"] .booking-pill {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .booking-pill.has-booking {
  background: rgba(22, 163, 74, 0.09);
}

:root[data-theme="light"] .session-skip-toggle {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: #64748b;
}

:root[data-theme="light"] .session-skip-toggle.is-on {
  border-color: rgba(217, 119, 6, 0.34);
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
}

:root[data-theme="light"] .today-session-item.is-active {
  background: rgba(22, 163, 74, 0.06);
}

:root[data-theme="light"] .today-session-item.is-next {
  background: rgba(37, 99, 235, 0.06);
}

:root[data-theme="light"] .today-session-item.is-skipped {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.11), rgba(255, 255, 255, 0.88));
}

/* Searchable Autocomplete Combobox */
.searchable-select-wrap {
  position: relative;
  width: 100%;
}

.searchable-select-wrap input {
  padding-right: 32px;
}

.searchable-select-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  min-height: auto;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 120ms;
}

.searchable-select-clear:hover {
  opacity: 1;
}

/* Expandable Incident Cards */
.incident {
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms;
}

.incident:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.incident-details-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-soft);
  display: none;
  animation: sseFadeIn 150ms ease-out;
}

:root[data-theme="light"] .incident-details-box {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.incident.expanded .incident-details-box {
  display: block;
}

.incident-details-box pre {
  margin: 6px 0 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow-x: auto;
  font-family: Consolas, Monaco, monospace;
  color: var(--ink-soft);
  font-size: 10.5px;
}

@keyframes sseFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

/* Premium Player Controls & Visuals */
.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  width: 100%;
}

.player-controls[hidden] {
  display: none;
}

.manual-control-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.manual-control-panel[hidden] {
  display: none;
}

.manual-control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.manual-control-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-control-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.manual-load-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.manual-load-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 700;
}

.manual-load-button:hover {
  border-color: var(--accent);
  background: rgba(56, 163, 165, 0.16);
}

.manual-command-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(96, 165, 250, 0.08);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.2;
}

.manual-command-status[hidden] {
  display: none;
}

.manual-command-status::before,
.is-pending::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: refreshSpin 800ms linear infinite;
}

.control-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--ink-soft) !important;
  border-radius: 50% !important;
  display: inline-grid !important;
  place-items: center !important;
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.control-btn:disabled,
.manual-load-button:disabled {
  cursor: wait !important;
}

.control-btn.is-pending svg {
  display: none !important;
}

.manual-load-button.is-pending .mini-icon {
  display: none;
}

.manual-load-button.is-pending::after {
  margin-left: 2px;
}

.control-btn:hover {
  border-color: var(--accent) !important;
  background: rgba(56, 163, 165, 0.12) !important;
  color: var(--ink) !important;
  transform: translateY(-1px) !important;
}

.control-btn.play-btn {
  width: 46px !important;
  height: 46px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent) !important;
}

.control-btn.play-btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: scale(1.06);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 55%, transparent);
}

.player-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.2;
}

.player-disclaimer svg {
  flex-shrink: 0;
}

/* Equalizer */
.equalizer {
  display: none;
  align-items: flex-end;
  gap: 3px;
  width: 18px;
  height: 14px;
  margin-left: 10px;
}

.equalizer.active {
  display: inline-flex;
}

.eq-bar {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  animation: bounce 0.8s ease-in-out infinite alternate;
  transform-origin: bottom;
}

.eq-bar:nth-child(2) { animation-delay: 0.15s; }
.eq-bar:nth-child(3) { animation-delay: 0.3s; }
.eq-bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes bounce {
  0% { transform: scaleY(0.15); }
  100% { transform: scaleY(1); }
}

/* ETA End Badge */
.eta-badge {
  font-size: 11px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--blue);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  margin-right: 12px;
}

/* Floating Toast Alerts */
.tms-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(248, 113, 113, 0.35);
  opacity: 0;
  z-index: 1000;
  transition: opacity 250ms, transform 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  white-space: nowrap;
}

.tms-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

:root[data-theme="light"] .tms-toast {
  background: #ef4444;
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.25);
}

/* Mobile responsive alignment */
@media (max-width: 680px) {
  .player-controls {
    justify-content: center;
    margin-top: 18px;
  }

  .manual-load-row {
    grid-template-columns: 1fr;
  }

  .player-disclaimer {
    justify-content: center;
  }
}

/* Premium Custom Select Dropdown */
.mode-selector-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.custom-select {
  position: relative;
  display: inline-block;
  width: 160px; /* Perfect width for emoji + text + chevron */
  flex: 0 0 auto;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 6px 32px 6px 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-select-trigger::-webkit-details-marker {
  display: none;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 160ms ease-out;
  pointer-events: none;
}

.custom-select[open] .custom-select-trigger::after {
  transform: translateY(-20%) rotate(225deg);
}

.custom-select-trigger:hover {
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.custom-select .custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: rgba(27, 31, 34, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: var(--shadow);
  transform-origin: top left;
  animation: sseFadeIn 150ms ease-out;
}

.custom-select .custom-option {
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
  transition: all 120ms ease;
  border: 1px solid transparent;
}

.custom-select .custom-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.custom-select .custom-option.selected {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Light Mode Overrides for Custom Select */
:root[data-theme="light"] .custom-select .custom-select-options {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .custom-select .custom-option:hover {
  background: rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .custom-select .custom-option.selected {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Responsive constraints */
@media (max-width: 1024px) {
  .mode-selector-wrap {
    order: 1;
    width: 100%;
    margin-bottom: 4px;
  }
  .custom-select {
    width: 100%;
  }
  .custom-select-trigger {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .mode-selector-wrap {
    order: 1;
    width: 100%;
    margin-bottom: 6px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

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

.stats-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  background: var(--surface-soft);
}

.stats-card h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.stats-value {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.stats-value.state-error {
  color: var(--red);
}

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

.stats-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
  margin-top: 16px;
}

.stats-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  background: rgba(13, 19, 22, 0.38);
}

.stats-section.span-2 {
  grid-row: span 2;
}

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

.stats-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.stats-section-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.stats-section-head .state-error {
  color: var(--red);
}

.stats-section-head .state-ok {
  color: var(--green);
}

.stats-bars {
  display: grid;
  gap: 12px;
}

.stats-bars.compact {
  gap: 10px;
}

.stats-bar-row {
  display: grid;
  gap: 6px;
}

.stats-bar-meta,
.stats-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-bar-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-bar-meta span,
.stats-detail-row strong {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stats-bar-sub,
.stats-detail-row span,
.stats-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.stats-bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.stats-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), rgba(82, 170, 255, 0.9));
}

.stats-detail-list {
  display: grid;
  gap: 10px;
}

.settings-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.settings-subsection-head h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.settings-subsection-head span {
  color: var(--muted);
  font-size: 13px;
}

.secondary-action {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.secondary-action:hover {
  border-color: var(--accent);
}

.secondary-action:disabled {
  cursor: wait;
  opacity: 0.6;
}

.maintenance-grid {
  margin-top: 0;
}

@media (max-width: 680px) {
  .marketing-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .marketing-form {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .marketing-actions {
    flex-direction: column;
  }

  .marketing-actions button {
    width: 100%;
  }

  .marketing-source-card > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .marketing-movies-list {
    max-height: none;
  }

  .marketing-preview {
    padding: 10px;
  }

  .marketing-poster-empty,
  .marketing-poster-link {
    min-height: 360px;
  }

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

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

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-actions button {
    width: 100%;
  }

  .backup-import-row {
    grid-template-columns: 1fr;
  }

  .backup-import-row button {
    width: 100%;
  }

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

  .stats-section.span-2 {
    grid-row: auto;
  }

  .settings-subsection-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-bar-meta strong {
    white-space: normal;
  }
}

/* Mobile density pass */
@media (max-width: 680px) {
  main {
    padding: 10px 8px 18px;
  }

  .topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: start;
    gap: 8px;
    padding: 10px 10px 8px;
    max-height: none;
  }

  .brand-block {
    width: auto;
    flex: none;
  }

  .brand-block h1 {
    font-size: 22px;
    line-height: 1.05;
  }

  .topbar p {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.2;
  }

  .brand-clock {
    gap: 6px;
    margin-top: 4px;
  }

  .brand-clock-label {
    font-size: 10px;
  }

  .brand-clock strong {
    font-size: 13px;
  }

  .topbar .tabs {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 34px;
    margin: 0;
    padding: 0 0 3px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
  }

  .topbar .tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0;
    font-size: 14px;
  }

  .more-nav .more-tab {
    padding-right: 18px;
  }

  .topbar-right {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    width: 100%;
  }

  .mode-selector-wrap {
    grid-column: 1 / -1;
    order: 1;
    margin: 0;
  }

  .custom-select-trigger,
  .status-panel summary {
    min-height: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .topbar-actions {
    grid-column: 1;
    order: 2;
    align-self: stretch;
    display: flex;
    justify-content: flex-start;
    gap: 6px;
  }

  .topbar-actions button,
  .topbar-actions .icon-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .status-panel {
    grid-column: 2;
    order: 3;
    width: 100%;
  }

  .status-panel .status-strip {
    max-height: 210px;
    overflow: auto;
  }

  .home-layout {
    gap: 8px;
  }

  .today-panel {
    min-height: auto;
    padding: 12px 10px;
  }

  .next-event-widget {
    min-height: 0;
    margin-top: 0;
    padding: 10px;
  }

  .next-event-icon {
    width: 34px;
    height: 34px;
  }

  .next-event-main strong {
    font-size: 15px;
  }

  .today-panel .panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
  }

  .today-panel .panel-header h2 {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .today-header-actions {
    gap: 5px;
  }

  .today-panel #todaySummary {
    max-width: 132px;
    padding: 5px 8px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .today-refresh-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .today-list {
    gap: 7px;
    padding-right: 0;
  }

  .today-session-item {
    grid-template-columns: 22px 42px minmax(0, 1fr) 78px minmax(50px, auto);
    gap: 6px;
    min-height: 0;
    border-radius: 8px;
    padding: 9px 8px;
  }

  .session-marker {
    width: 22px;
    height: 22px;
  }

  .session-marker .mini-icon {
    width: 12px;
    height: 12px;
  }

  .today-session-item time {
    font-size: 17px;
  }

  .today-session-main strong {
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.18;
  }

  .today-session-main span {
    font-size: 12px;
    line-height: 1.15;
  }

  .session-skip-toggle {
    justify-self: end;
    min-width: 78px;
    min-height: 30px;
    padding: 4px 9px 4px 6px;
    font-size: 11px;
  }

  .skip-toggle-icon {
    width: 18px;
    height: 18px;
  }

  .booking-pill {
    grid-column: auto;
    justify-self: end;
    min-width: 50px;
    padding: 5px 7px;
  }

  .booking-pill strong {
    font-size: 13px;
  }

  .booking-pill span {
    font-size: 9px;
  }
}


/* Compact Projector Visualizer */
.projector-visualizer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 14px;
  width: 100%;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.visualizer-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.visualizer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.visualizer-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visualizer-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.visualizer-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.lamp-bulb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3c4043;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.lamp-bulb.state-off {
  background: #3c4043;
  box-shadow: none;
}

.lamp-bulb.state-warm {
  background: #ffaa00;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.6), inset 0 0 2px #fff;
  animation: bulb-pulse-compact 1s infinite ease-in-out;
}

.lamp-bulb.state-on {
  background: #00f0ff;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8), inset 0 0 2px #fff;
  animation: bulb-pulse-compact 2s infinite ease-in-out;
}

@keyframes bulb-pulse-compact {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; box-shadow: 0 0 14px rgba(0, 240, 255, 0.9), inset 0 0 3px #fff; }
  100% { transform: scale(1); opacity: 0.9; }
}

.lens-aperture {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1b1f22;
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lens-shutter {
  width: 100%;
  height: 100%;
  position: absolute;
  background: repeating-conic-gradient(from 0deg, #2c3033 0deg 30deg, #121416 30deg 60deg);
  clip-path: circle(50% at 50% 50%);
  transition: transform 0.5s ease-out, opacity 0.5s ease;
  transform: rotate(0deg) scale(1);
  opacity: 1;
  z-index: 2;
}

.lens-shutter.state-open {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

.shutter-beam {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe600 20%, rgba(255, 230, 0, 0) 70%);
  transform: scale(0);
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 1;
}

.shutter-beam.state-open {
  transform: scale(1.6);
  opacity: 1;
  filter: drop-shadow(0 0 6px #ffe600);
  animation: beam-flicker-compact 0.15s infinite;
}

@keyframes beam-flicker-compact {
  0% { opacity: 0.93; }
  50% { opacity: 1; }
  100% { opacity: 0.93; }
}

/* End of Projector Visualizer CSS */

/* Global utility for hiding elements dynamically */
[hidden], .player-disclaimer[hidden] {
  display: none !important;
}
