:root {
  color-scheme: light;
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-strong: #071314;
  --surface-soft: #eef4f3;
  --text: #0a1718;
  --muted: #647172;
  --line: #dce5e3;
  --line-strong: #b9c9c6;
  --accent: #0c8f87;
  --accent-strong: #06635f;
  --accent-soft: #dff5f2;
  --amber: #c4851a;
  --amber-soft: #fff4da;
  --danger: #bd3b3b;
  --shadow: 0 18px 48px rgba(12, 28, 28, .08);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 320px),
    var(--bg);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell {
  min-height: 100vh;
}

.is-public-gallery .topbar {
  grid-template-columns: 1fr;
}

.is-public-gallery .main-nav,
.is-public-gallery .account-strip {
  display: none;
}

.is-public-gallery .brand {
  justify-self: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(220, 229, 227, .82);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: #071314;
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.nav-tab {
  min-width: 92px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: #435151;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}

.nav-tab.is-active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(7, 19, 20, .08);
}

.account-strip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #405052;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.account-strip.is-active .signal-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.account-strip.is-offline .signal-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px #fde7e7;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

main {
  padding: 28px clamp(18px, 4vw, 48px) 48px;
}

.view {
  display: none;
  scroll-margin-top: 96px;
}

.view.is-active {
  display: block;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

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

.album-rail {
  position: sticky;
  top: 94px;
  padding: 14px;
}

.rail-heading,
.panel-title,
.device-row,
.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rail-heading {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #ffffff;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.album-item {
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  background: transparent;
  text-align: left;
}

.album-item.is-active {
  border-color: var(--line);
  background: var(--surface-soft);
}

.album-item strong,
.album-item span {
  display: block;
}

.album-item strong {
  font-size: 13px;
}

.album-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.welcome-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 146px;
  margin-bottom: 18px;
  padding: 28px;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 12%, rgba(53, 186, 174, .32), transparent 32%),
    linear-gradient(135deg, #071314 0%, #102a2b 58%, #0c4d4a 100%);
  box-shadow: var(--shadow);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.welcome-band p {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--accent-strong);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(12, 143, 135, .2);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: #ffffff;
}

.secondary-button.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.welcome-band .secondary-button {
  border-color: rgba(255, 255, 255, .26);
  color: #ffffff;
  background: rgba(255, 255, 255, .09);
}

.ghost-button {
  border: 1px solid transparent;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.wide {
  width: 100%;
}

.creator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  gap: 18px;
}

.album-panel {
  min-width: 0;
}

.panel {
  padding: 18px;
}

.panel-title {
  margin-bottom: 18px;
}

.panel-title.compact {
  margin-bottom: 14px;
}

.panel-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.status.ready {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.status.warn {
  color: #805100;
  background: var(--amber-soft);
}

.status.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

.album-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

#create-album-submit {
  grid-column: 1 / -1;
}

.cost-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cost-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.cost-summary span,
.cost-summary strong {
  display: block;
}

.cost-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.cost-summary strong {
  margin-top: 5px;
  font-size: 13px;
}

.form-message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-success {
  color: var(--accent-strong);
}

.queue-message {
  min-height: 0;
  margin-top: -6px;
}

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

input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 650;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 750;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(12, 143, 135, .22);
  outline-offset: 2px;
}

.event-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.event-links span,
.event-links strong {
  display: block;
}

.event-links > div {
  min-width: 0;
}

.event-links span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-links strong {
  margin-top: 5px;
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-album-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.active-album-card > * {
  min-width: 0;
  max-width: 100%;
}

.active-album-card.is-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
}

.active-album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.album-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

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

.album-meta span,
.album-meta strong {
  display: block;
}

.album-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.album-meta strong {
  overflow: hidden;
  margin-top: 5px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.album-actions .secondary-button {
  width: 100%;
  min-width: 0;
}

.backgrounds-panel,
.photo-panel {
  min-height: 266px;
}

.photo-panel {
  grid-column: 1 / -1;
}

.background-grid,
.photo-stream,
.gallery-grid {
  display: grid;
  gap: 12px;
}

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

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

.background-card {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 112px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent 0%, rgba(7, 19, 20, .52) 100%),
    var(--image, var(--swatch, var(--surface-soft)));
  background-position: center;
  background-size: cover;
}

.background-card > button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(7, 19, 20, .68);
  font-size: 12px;
  font-weight: 850;
}

.background-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.background-card .status {
  position: absolute;
  top: 8px;
  left: 8px;
  min-height: 24px;
  background: rgba(255, 255, 255, .9);
}

.background-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.background-card-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(7, 19, 20, .7);
  font-size: 11px;
  font-weight: 850;
}

.background-card-actions button[data-background-delete] {
  width: 34px;
  color: #ffecec;
}

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

.photo-tile,
.gallery-card {
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.photo-tile {
  display: grid;
  align-content: center;
  gap: 6px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.photo-tile span,
.photo-tile small,
.photo-tile em {
  display: block;
}

.photo-tile small {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(7, 19, 20, .55);
}

.photo-tile em {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.upload-badge.ready {
  color: var(--accent-strong);
  background: rgba(223, 245, 242, .96);
}

.upload-badge.muted {
  color: #233333;
  background: rgba(255, 255, 255, .9);
}

.upload-badge.warn {
  color: #8a2600;
  background: rgba(255, 244, 218, .96);
}

.photo-tile.filled,
.gallery-thumb {
  background:
    linear-gradient(135deg, rgba(12, 143, 135, .2), transparent 45%),
    var(--image, var(--swatch, #dfe9e7));
  background-position: center;
  background-size: cover;
}

.photo-tile.filled {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(7, 19, 20, .62);
}

.status-side {
  display: grid;
  gap: 18px;
}

.account-panel {
  display: grid;
  gap: 12px;
}

.account-panel p {
  margin-bottom: 0;
  font-size: 13px;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-actions[hidden] {
  display: none;
}

.qr-code,
.mock-qr {
  display: grid;
  aspect-ratio: 1;
  width: min(100%, 210px);
  margin: 4px auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.qr-code {
  place-items: center;
}

.qr-code svg {
  width: 100%;
  height: 100%;
  fill: var(--text);
  stroke: none;
}

.qr-code.is-empty {
  color: var(--muted);
  text-align: center;
}

.mock-qr {
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.mock-qr::before,
.mock-qr::after,
.mock-qr span {
  content: "";
  border-radius: 2px;
  background: var(--text);
}

.mock-qr::before {
  grid-area: 1 / 1 / 3 / 3;
}

.mock-qr::after {
  grid-area: 1 / 6 / 3 / 8;
}

.mock-qr span:nth-child(1) {
  grid-area: 6 / 1 / 8 / 3;
}

.mock-qr span:nth-child(2) {
  grid-area: 3 / 4 / 4 / 5;
}

.mock-qr span:nth-child(3) {
  grid-area: 5 / 5 / 7 / 7;
}

.mock-qr.large {
  width: min(100%, 260px);
  margin: 0;
}

.mock-qr:not(.is-empty) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  place-items: center;
}

.mock-qr:not(.is-empty)::before,
.mock-qr:not(.is-empty)::after {
  display: none;
}

.mock-qr:not(.is-empty) svg {
  width: 100%;
  height: 100%;
}

.mock-qr.is-empty {
  grid-template-columns: 1fr;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.mock-qr.is-empty::before,
.mock-qr.is-empty::after {
  display: none;
}

.mock-qr.is-empty span {
  grid-area: auto !important;
  background: transparent;
}

.qr-panel p {
  margin-bottom: 0;
  font-size: 13px;
  text-align: center;
}

.qr-actions {
  display: grid;
  margin-top: 12px;
}

.device-panel {
  display: grid;
  gap: 16px;
}

.device-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

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

.device-row strong {
  font-size: 14px;
}

.device-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.checklist-panel ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-panel li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #354445;
  font-size: 13px;
  font-weight: 750;
}

.checklist-panel li span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.checklist-panel li.pending span {
  background: var(--amber);
}

.kiosk-layout,
.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 360px;
  gap: 18px;
  align-items: stretch;
}

.kiosk-stage {
  min-height: 620px;
  padding: 32px;
  border-radius: var(--radius);
  background: #071314;
  box-shadow: var(--shadow);
}

.tablet-frame {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  height: 100%;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: #0e2021;
}

.camera-preview {
  position: relative;
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(12, 143, 135, .2), transparent 54%),
    var(--image, linear-gradient(160deg, #c2e4df, #eaf6f1 48%, #f2d08c));
  background-position: center;
  background-size: cover;
}

.camera-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 19, 20, .04), rgba(7, 19, 20, .18));
}

.camera-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scaleX(-1);
  transition: opacity .18s ease;
}

.camera-preview.is-ready .camera-video {
  opacity: .9;
}

.camera-preview.is-comparing .camera-video {
  opacity: .18;
}

.camera-placeholder {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #ffffff;
  text-align: center;
}

.camera-preview.is-ready .camera-placeholder {
  display: none;
}

.camera-placeholder strong,
.camera-placeholder span {
  display: block;
  text-shadow: 0 2px 16px rgba(7, 19, 20, .54);
}

.camera-placeholder strong {
  font-size: 22px;
}

.camera-placeholder span {
  max-width: 300px;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 750;
}

.subject-silhouette {
  width: min(34vw, 300px);
  aspect-ratio: .68;
  border-radius: 999px 999px 42px 42px;
  background:
    radial-gradient(circle at 50% 18%, #0e2021 0 18%, transparent 19%),
    linear-gradient(#0e2021 0 0) bottom / 72% 64% no-repeat;
  opacity: .86;
}

#countdown {
  position: absolute;
  z-index: 5;
  top: 24px;
  right: 24px;
  display: grid;
  min-width: 90px;
  height: 54px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(7, 19, 20, .72);
  font-size: 20px;
  font-weight: 900;
}

.compare-preview {
  position: absolute;
  inset: 18px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  pointer-events: none;
}

.compare-preview[hidden] {
  display: none !important;
}

.compare-preview figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: var(--radius);
  background: rgba(7, 19, 20, .8);
}

.compare-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.compare-preview figcaption {
  padding: 8px 10px;
  color: #ffffff;
  background: rgba(7, 19, 20, .9);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.tablet-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  justify-content: center;
}

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

.mode-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 26px;
}

.mode-panel p {
  margin-bottom: 0;
}

.photocall-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.photocall-status-grid > div {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.photocall-status-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.photocall-status-grid strong:not(.status) {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rehearsal-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfb;
}

.rehearsal-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.18;
}

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

.ops-status-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ops-status-grid span,
.mount-check .auto-check {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-status-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rehearsal-actions,
.quick-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rehearsal-actions .primary-button,
.rehearsal-actions .secondary-button,
.quick-settings .ghost-button {
  width: 100%;
  min-height: 40px;
  padding-inline: 10px;
  white-space: normal;
}

.test-progress {
  display: grid;
  gap: 8px;
}

.test-progress > div {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.test-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}

.test-progress strong {
  color: var(--muted);
  font-size: 12px;
}

.test-progress.is-running span {
  background: var(--amber);
}

.test-progress.is-complete strong {
  color: var(--accent-strong);
}

.mount-checklist {
  display: grid;
  gap: 7px;
}

.mount-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #334344;
  background: var(--surface);
  font-size: 12px;
  font-weight: 850;
}

.mount-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.mount-check > span:not(.auto-check) {
  overflow-wrap: anywhere;
}

.mount-check.is-checked {
  border-color: #b7ded9;
  background: var(--accent-soft);
}

.mount-check .auto-check {
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--surface);
}

body.is-kiosk {
  overflow: hidden;
  background: #071314;
}

body.is-kiosk .topbar {
  display: none;
}

body.is-kiosk main {
  padding: 0;
}

body.is-kiosk .app-shell {
  min-height: 100vh;
}

body.is-kiosk .view:not(#view-photocall) {
  display: none;
}

body.is-kiosk #view-photocall {
  display: block;
}

body.is-kiosk .kiosk-layout {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
}

body.is-kiosk .kiosk-stage,
body.is-kiosk .tablet-frame,
body.is-kiosk .mode-panel {
  border-radius: 0;
}

body.is-kiosk .kiosk-stage {
  min-height: 100vh;
  box-shadow: none;
}

body.is-kiosk .mode-panel {
  max-height: 100vh;
  overflow: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}

.control-field {
  display: grid;
  gap: 8px;
}

.chroma-controls {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.chroma-controls.is-disabled {
  opacity: .55;
}

.range-field {
  display: grid;
  gap: 8px;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.range-field output {
  color: var(--text);
  font-weight: 900;
}

.range-field input[type="range"] {
  width: 100%;
  min-height: 30px;
  padding: 0;
  accent-color: var(--accent);
}

.mode-panel h1,
.large-panel h1 {
  color: var(--text);
  font-size: 34px;
  line-height: 1.08;
}

.split-page {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.large-panel {
  padding: 28px;
}

.pairing-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 24px;
}

.pairing-copy {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.pairing-copy strong {
  color: var(--text);
}

.control-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

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

.pairing-copy a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

.status-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.status-card strong {
  color: var(--text);
  font-size: 14px;
}

.is-camera-device .main-nav,
.is-camera-device .account-strip {
  display: none;
}

.camera-device-shell {
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.device-camera-panel {
  width: min(100%, 680px);
}

.device-camera-preview {
  position: relative;
  display: grid;
  min-height: 360px;
  margin: 22px 0 16px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #071314;
}

.device-camera-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-camera-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 20px;
  color: #ffffff;
  text-align: center;
}

.device-camera-placeholder[hidden] {
  display: none;
}

.device-camera-placeholder strong {
  font-size: 22px;
}

.device-camera-placeholder span {
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  font-weight: 750;
}

.gallery-page {
  display: grid;
  gap: 18px;
}

.gallery-head {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gallery-head p {
  margin-bottom: 0;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.gallery-card {
  min-height: 230px;
  background: #ffffff;
}

.gallery-thumb {
  display: block;
  height: 164px;
}

.gallery-card div:last-child {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.gallery-card strong,
.gallery-card span {
  display: block;
}

.gallery-card strong {
  font-size: 14px;
}

.gallery-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  grid-column: 1 / -1;
  min-height: 132px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.empty a {
  color: var(--accent-strong);
  font-weight: 850;
}

.empty.is-error {
  color: var(--danger);
  border-color: #efb7b7;
  background: #fff7f7;
}

.rail-state {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.rail-state.is-error {
  color: var(--danger);
  border-color: #efb7b7;
  background: #fff7f7;
}

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

  .status-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .kiosk-layout,
  .split-page {
    grid-template-columns: 1fr;
  }

  body.is-kiosk .kiosk-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  body.is-kiosk .mode-panel {
    padding: 18px;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .nav-tab {
    min-width: max-content;
  }

  .account-strip {
    justify-self: stretch;
    justify-content: center;
  }

  main {
    padding: 16px;
  }

  .workspace,
  .status-side,
  .creator-grid,
  .album-form,
  .album-meta,
  .cost-summary,
  .album-actions,
  .pairing-actions,
  .pairing-grid {
    grid-template-columns: 1fr;
  }

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

  .album-rail {
    position: static;
  }

  .welcome-band,
  .gallery-head,
  .active-album-head,
  .event-links {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions,
  .tablet-controls {
    justify-content: stretch;
  }

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

  .ops-status-grid,
  .rehearsal-actions,
  .quick-settings {
    grid-template-columns: 1fr;
  }

  body.is-kiosk {
    overflow: auto;
  }

  body.is-kiosk .kiosk-layout {
    grid-template-columns: 1fr;
  }

  body.is-kiosk .mode-panel {
    max-height: none;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .background-grid,
  .background-grid.compact,
  .photo-stream,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kiosk-stage {
    min-height: 520px;
    padding: 12px;
  }

  .device-camera-preview {
    min-height: 300px;
  }

  h1 {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .background-grid,
  .background-grid.compact,
  .photo-stream,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .panel-title,
  .device-row,
  .gallery-head {
    align-items: stretch;
    flex-direction: column;
  }
}
