:root {
  color-scheme: dark;
  --bg: #080b0d;
  --panel: #11171b;
  --panel-2: #192229;
  --panel-3: #202b33;
  --text: #f8fbf8;
  --muted: #a5b4af;
  --line: rgba(190, 212, 205, .16);
  --accent: #21b486;
  --accent-2: #f4b860;
  --danger: #f06449;
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
  --soft-shadow: 0 14px 44px rgba(0, 0, 0, .24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #111820 0, var(--bg) 280px),
    var(--bg);
  color: var(--text);
  overscroll-behavior: none;
}

button,
.button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)),
    var(--panel-2);
  color: var(--text);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

button:disabled {
  cursor: wait;
  opacity: .6;
}

button:active,
.button:active {
  transform: translateY(1px);
}

.primary {
  border-color: transparent;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent), white 12%), var(--accent));
  color: #06110d;
  font-weight: 900;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent), transparent 68%);
}

.ghost {
  background: transparent;
}

.full {
  width: 100%;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 10, 13, .84);
  color: var(--text);
  padding: 0 12px;
  margin-top: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

input[type="color"] {
  padding: 4px;
}

input[type="range"] {
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent), white 28%), rgba(255, 255, 255, .18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid #071014;
  border-radius: 999px;
  background: #f8fbf8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42);
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

input[type="range"]::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), white 24%);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #071014;
  border-radius: 999px;
  background: #f8fbf8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42);
}

label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.check-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  border-radius: 8px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

h2 {
  font-size: 22px;
  line-height: 1.1;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(17, 24, 32, .96), rgba(8, 11, 13, .98)),
    var(--bg);
}

.auth-panel {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.auth-panel h1 {
  font-size: 34px;
}

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

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

.clerk-control {
  min-height: 48px;
}

.clerk-inline {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
}

.header-right {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.account-strip {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-strip .clerk-inline {
  min-height: 40px;
}

.clerk-org-compact {
  width: min(100%, 220px);
}

.clerk-user-compact {
  width: 44px;
  flex: 0 0 44px;
  justify-content: center;
}

.clerk-inline .cl-rootBox,
.clerk-inline .cl-userButtonBox,
.clerk-inline .cl-organizationSwitcherTrigger,
.clerk-inline .cl-userButtonTrigger {
  max-width: 100%;
}

.clerk-org-compact .cl-organizationSwitcherTrigger {
  width: 100% !important;
  max-width: 220px !important;
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 8px;
  overflow: hidden;
}

.clerk-org-compact .cl-organizationPreview,
.clerk-org-compact .cl-organizationPreviewTextContainer {
  min-width: 0;
}

.clerk-org-compact .cl-organizationPreviewTextContainer,
.clerk-org-compact .cl-organizationPreviewMainIdentifier {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clerk-user-compact .cl-userButtonTrigger {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 999px;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}

.admin-shell,
.gallery-shell,
.single-photo-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.single-photo-shell {
  width: min(1480px, calc(100% - 32px));
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .018)),
    #10161b;
  box-shadow: var(--soft-shadow);
}

.app-header h1 {
  max-width: 760px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-strip span {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-strip strong {
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.topbar,
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .042), transparent),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.create-panel,
.operator-panel {
  display: grid;
  gap: 16px;
}

.booth-list {
  display: grid;
  gap: 12px;
}

.booth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(244, 184, 96, .08), transparent 55%),
    var(--panel);
}

.actions,
.review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions button,
.actions .button,
.review-actions button,
.review-actions .button {
  flex: 0 0 auto;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.error-state {
  min-height: calc(100vh - 56px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 20;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f5;
  color: #11171c;
  padding: 12px 16px;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.admin-booth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background:
    linear-gradient(135deg, rgba(33, 180, 134, .08), transparent 42%),
    linear-gradient(180deg, #111820 0, #080b0d 360px),
    var(--bg);
}

.operator-panel {
  border-right: 1px solid var(--line);
  background: rgba(10, 15, 18, .9);
  backdrop-filter: blur(18px);
  padding: 16px;
  align-content: start;
  position: sticky;
  top: 0;
  min-height: 100vh;
}

.booth-status {
  display: none;
}

.booth-titlebar,
.operator-summary {
  display: grid;
  gap: 14px;
}

.operator-summary {
  display: none;
}

.vertical {
  display: grid;
}

.upload-box {
  display: grid;
  gap: 10px;
}

.settings-group {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.qr-tile {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #101419;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.qr-tile small {
  color: #4a5551;
  font-size: 12px;
}

.qr-tile img,
.share-card .qr {
  width: 100%;
  background: #fff;
  border-radius: 6px;
}

.event-links-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent),
    rgba(255, 255, 255, .035);
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.event-links-card h2 {
  font-size: 20px;
}

.link-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.link-action span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.link-action button {
  min-height: 36px;
  padding: 0 12px;
}

.readiness-list {
  display: grid;
  gap: 8px;
}

.launch-check-compact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .055), transparent),
    rgba(255, 255, 255, .035);
  box-shadow: var(--soft-shadow);
}

.launch-check-compact summary {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.launch-check-compact summary::-webkit-details-marker {
  display: none;
}

.launch-check-compact summary::after {
  content: "Details";
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.launch-check-compact[open] summary::after {
  content: "Hide";
}

.launch-check-compact summary strong {
  color: var(--text);
  font-size: 14px;
}

.launch-check-compact summary span:last-child {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.launch-score {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.launch-score.ok {
  background: color-mix(in srgb, var(--accent), transparent 78%);
}

.launch-score.warn {
  background: rgba(244, 184, 96, .14);
}

.compact-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.readiness-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 9px;
  align-items: start;
}

.readiness-item > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(240, 100, 73, .13);
}

.readiness-item.ok > span {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.readiness-item strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.readiness-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-preview-stage {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  align-items: stretch;
}

.config-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.config-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent),
    rgba(17, 23, 27, .9);
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.preview-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.preview-card-header span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(244, 184, 96, .12);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.settings-board {
  column-count: 2;
  column-gap: 12px;
}

.settings-tabs {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 7px;
  box-shadow: var(--soft-shadow);
}

.settings-tabs button {
  min-height: 58px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  justify-content: start;
  text-align: left;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.settings-tabs button.active {
  border-color: color-mix(in srgb, var(--accent), white 8%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent), transparent 82%), rgba(255, 255, 255, .055));
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.settings-tabs button.active::before {
  content: "";
  width: 4px;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}

.settings-tabs button {
  position: relative;
  overflow: hidden;
}

.settings-tabs strong {
  font-size: 15px;
  line-height: 1.1;
}

.settings-tabs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.control-card {
  display: none;
  align-content: start;
  gap: 14px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .058), transparent),
    var(--panel);
  padding: 15px;
  box-shadow: var(--soft-shadow);
  margin: 0 0 12px;
  break-inside: avoid;
}

.control-card.active {
  display: grid;
}

.layer-meta {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.layer-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.layer-tools button {
  min-height: 40px;
  padding: 0 8px;
  font-size: 12px;
}

.text-layer-fields {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 12px;
}

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

.moderation-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 9px;
}

.moderation-item.is-hidden {
  opacity: .72;
}

.moderation-thumb {
  width: 78px;
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

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

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

.moderation-item span,
.moderation-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.file-drop {
  display: grid;
  gap: 8px;
  min-height: 96px;
  align-content: center;
  border: 1px dashed color-mix(in srgb, var(--accent), white 20%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 88%), transparent),
    rgba(255, 255, 255, .035);
  color: var(--muted);
  padding: 16px;
  cursor: pointer;
}

.file-drop strong {
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.preview-copy {
  max-width: 720px;
}

.camera-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #030506;
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 136px);
  align-self: center;
}

.preview-frame {
  width: 100%;
  justify-self: center;
  border: 1px solid var(--line);
  max-height: 248px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.aspect-11 {
  aspect-ratio: 1 / 1;
}

.aspect-43 {
  aspect-ratio: 4 / 3;
}

.aspect-34 {
  aspect-ratio: 3 / 4;
}

.aspect-169 {
  aspect-ratio: 16 / 9;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(33, 180, 134, .24), transparent 48%),
    linear-gradient(315deg, rgba(244, 184, 96, .22), transparent 52%),
    #151b22;
}

.camera-placeholder span {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, .78);
  font-weight: 900;
}

.launch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .055), transparent),
    var(--panel);
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.launch-strip code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.guest-shell {
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 22%),
    var(--booth-bg, #030506);
  user-select: none;
  -webkit-user-select: none;
}

.guest-stage {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
}

.guest-frame {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
}

.guest-frame.aspect-11 {
  width: min(100vw, 100dvh);
  height: min(100vw, 100dvh);
  border-radius: 8px;
}

.guest-frame.aspect-43 {
  width: min(100vw, calc(100dvh * 4 / 3));
  height: min(100dvh, calc(100vw * 3 / 4));
}

.guest-frame.aspect-34 {
  width: min(100vw, calc(100dvh * 3 / 4));
  height: min(100dvh, calc(100vw * 4 / 3));
}

.guest-frame.aspect-169 {
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
}

.camera-frame > video,
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layer-stack {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.layer-stack .layer-item {
  position: absolute;
  transform-origin: top left;
  pointer-events: none;
}

.layer-stack img.layer-item {
  height: auto;
  object-fit: contain;
}

.admin-layer-stack {
  pointer-events: auto;
}

.admin-layer-stack .layer-item {
  pointer-events: auto;
  cursor: move;
}

.admin-layer-stack .layer-item.selected {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.text-layer {
  min-width: 64px;
  line-height: 1.12;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
}

.camera-frame > video.mirror {
  transform: scaleX(-1);
}

.overlay {
  z-index: 2;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.countdown {
  position: absolute;
  z-index: 3;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .72);
  border: 4px solid var(--accent);
  font-size: 84px;
  font-weight: 1000;
}

.countdown.recording {
  width: auto;
  min-width: 220px;
  height: auto;
  min-height: 84px;
  border-radius: 999px;
  padding: 14px 24px;
  gap: 4px;
  font-size: 18px;
  text-align: center;
  text-transform: uppercase;
}

.countdown.recording span,
.countdown.recording strong {
  display: block;
}

.countdown.recording span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.countdown.recording strong {
  color: var(--text);
  font-size: 28px;
}

.camera-status {
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 8;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 34px));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(5, 8, 10, .76);
  color: var(--text);
  padding: 10px 16px;
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: var(--soft-shadow);
}

.camera-status.error {
  display: grid;
  gap: 8px;
  justify-items: center;
  border-radius: 8px;
  background: rgba(13, 17, 20, .92);
  padding: 16px;
}

.camera-status.error span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.booth-controls {
  display: flex;
  justify-content: center;
}

.capture {
  width: min(520px, 100%);
  min-height: 72px;
  border-radius: 999px;
  border: 0;
  background:
    linear-gradient(180deg, #ffd480, var(--accent-2));
  color: #171008;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 18px 58px rgba(244, 184, 96, .34);
}

.guest-capture {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 4;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 44px));
  min-height: 84px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 255, 255, .16);
}

.start-screen {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 25%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 88%), transparent 52%),
    rgba(3, 5, 6, .88);
  backdrop-filter: blur(18px);
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.start-screen h1 {
  max-width: 860px;
  text-shadow: 0 18px 55px rgba(0, 0, 0, .52);
}

.brand-logo {
  max-width: min(280px, 60vw);
  max-height: 140px;
  object-fit: contain;
}

.start-screen p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.4;
}

.start-screen button {
  min-width: 244px;
  min-height: 68px;
  border-radius: 999px;
  font-size: 22px;
}

.secret-home-zone {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: max(86px, env(safe-area-inset-left));
  height: max(86px, env(safe-area-inset-top));
  min-height: 86px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  opacity: 0;
  transform: none;
}

.secret-home-zone:active {
  transform: none;
}

.result-tray {
  position: fixed;
  inset: auto 18px 18px auto;
  z-index: 10;
  width: min(520px, calc(100% - 36px));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.guest-result {
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  transform: none;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .72)),
    rgba(3, 5, 6, .76);
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  backdrop-filter: blur(14px);
}

.review {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
  max-height: calc(100dvh - 32px);
  align-items: center;
}

.booth-notice {
  display: grid;
  gap: 12px;
}

.review img,
.review video {
  width: 100%;
  max-height: calc(100dvh - 132px);
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}

.share-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
}

.share-card.no-qr {
  grid-template-columns: 180px 1fr;
}

.share-card.no-qr img,
.share-card.no-qr video {
  width: 100%;
  border-radius: 8px;
}

.full-share {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 32px);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: stretch;
}

.full-share.no-qr {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

.share-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
}

.share-media img,
.share-media video {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 32px);
  object-fit: contain;
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}

.share-panel {
  align-self: center;
  display: grid;
  gap: 14px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  background: rgba(9, 12, 15, .86);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.share-panel .qr {
  width: min(220px, 100%);
  justify-self: center;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.permission-error {
  max-width: 420px;
  text-align: center;
  padding: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-photo {
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: center;
}

.single-media {
  position: relative;
  min-width: 0;
  min-height: calc(100dvh - 88px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.single-media > img,
.single-media > video {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
  background: #000;
}

.capture-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(3, 5, 6, .78);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  box-shadow: var(--soft-shadow);
}

.compact-badge {
  left: 10px;
  top: 10px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.download-panel {
  display: grid;
  gap: 14px;
}

.lead-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent),
    var(--panel);
  padding: 14px;
  box-shadow: var(--soft-shadow);
}

.lead-list {
  display: grid;
  gap: 8px;
}

.lead-row {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 10px;
}

.lead-row span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .dashboard-grid,
  .app-header,
  .admin-booth-shell,
  .config-workspace,
  .single-photo {
    grid-template-columns: 1fr;
  }

  .operator-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-preview-stage {
    min-height: auto;
  }

  .settings-board {
    grid-template-columns: 1fr;
  }

  .config-sidebar {
    position: static;
  }

  .operator-panel {
    position: static;
    min-height: auto;
  }

  .camera-frame {
    max-height: none;
  }

  .guest-result {
    padding: 12px;
  }

  .full-share,
  .full-share.no-qr {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: calc(100dvh - 24px);
  }

  .share-media img,
  .share-media video {
    max-height: calc(100dvh - 260px);
  }

  .share-panel {
    align-self: end;
  }

  .share-panel .qr {
    width: 128px;
  }

  .single-media {
    min-height: min(72vh, 720px);
  }

  .single-media > img,
  .single-media > video {
    max-height: 72vh;
  }

  .topbar,
  .gallery-header,
  .booth-card {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (min-width: 760px) and (max-width: 1190px) {
  button,
  .button {
    min-height: 52px;
  }

  input,
  select {
    min-height: 52px;
    font-size: 16px;
  }

  .admin-shell,
  .gallery-shell,
  .single-photo-shell {
    width: 100%;
    min-height: 100dvh;
    padding: 16px;
  }

  .app-header {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 18px;
    margin-bottom: 12px;
  }

  .app-header h1 {
    font-size: 42px;
  }

  .topbar,
  .gallery-header {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -16px 16px;
    padding: 12px 16px;
    background: rgba(8, 11, 13, .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }

  .admin-booth-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .operator-panel {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 8;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
  }

  .operator-summary {
    display: none;
  }

  .booth-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .booth-title {
    min-width: 0;
  }

  .booth-title h1 {
    font-size: 26px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .booth-status {
    display: flex;
    gap: 6px;
    justify-content: end;
  }

  .booth-status span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .compact {
    min-height: 42px;
    padding: 0 12px;
  }

  .operator-panel .actions.vertical {
    grid-column: 2;
    grid-row: 1;
    display: flex;
  }

  .operator-panel .qr-tile,
  .operator-panel .event-links-card,
  .operator-panel .actions.vertical {
    grid-column: 1 / -1;
  }

  .operator-panel .actions.vertical {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .operator-panel .actions.vertical .button:not(.primary) {
    display: inline-flex;
  }

  .admin-preview-stage {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    gap: 12px;
  }

  .launch-check-compact summary {
    grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
    min-height: 44px;
    padding: 7px 10px;
  }

  .launch-check-compact summary::after {
    display: none;
  }

  .compact-list {
    grid-template-columns: 1fr;
  }

  .config-workspace {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
  }

  .config-sidebar {
    position: sticky;
    top: 0;
    gap: 10px;
  }

  .settings-board {
    column-count: 2;
    column-gap: 12px;
  }

  .control-card {
    min-height: 0;
    padding: 13px;
  }

  .launch-strip {
    display: none;
  }

  .guest-capture {
    bottom: max(28px, env(safe-area-inset-bottom));
    width: min(560px, calc(100vw - 56px));
    font-size: 28px;
  }

  .countdown {
    width: 180px;
    height: 180px;
    font-size: 96px;
  }

  .start-screen h1 {
    font-size: 68px;
  }

  .start-screen button {
    min-width: 280px;
    min-height: 76px;
  }
}

@media (min-width: 760px) and (max-width: 900px) {
  .admin-booth-shell {
    height: 100dvh;
    overflow: hidden;
  }

  .config-workspace {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .preview-card {
    display: block;
  }

  .settings-tabs {
    align-content: start;
    position: sticky;
    top: 0;
  }

  .settings-tabs button {
    min-height: 60px;
    padding: 11px;
  }

  .settings-board {
    column-count: 2;
    column-gap: 10px;
  }

  .preview-card-header h2 {
    font-size: 18px;
  }

  .preview-card-header span {
    display: none;
  }
}
