:root {
  --bg: #fff8ef;
  --bg-soft: #fffdf8;
  --milk: #fffaf2;
  --cream: #f7e7d0;
  --caramel: #c58b5c;
  --choco: #3a2418;
  --muted: #8e6d58;
  --pink: #ffd6df;
  --accent: #ff9f68;
  --accent-dark: #e9783f;
  --line: rgba(58, 36, 24, 0.11);
  --shadow: 0 28px 80px rgba(107, 65, 35, 0.15);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --font-scale: 1;
  --button-scale: 1;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--choco);
  font-size: calc(16px * var(--font-scale));
  overflow: hidden;
  background: linear-gradient(180deg, #fff8ef 0%, #fffdf8 42%, #fff8ef 100%);
}

[hidden] { display: none !important; }

.kiosk-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 520px 380px at 6% 92%, rgba(255, 255, 255, 0.92), transparent 62%),
    radial-gradient(ellipse 440px 320px at 94% 6%, rgba(255, 214, 223, 0.5), transparent 58%),
    radial-gradient(circle at 15% 12%, rgba(255, 214, 223, 0.65), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(255, 159, 104, 0.28), transparent 26%),
    radial-gradient(circle at 50% 108%, rgba(247, 231, 208, 0.55), transparent 42%);
}

.kiosk-bg-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  background: url("assets/logo.svg") center 38% / min(72vw, 520px) auto no-repeat;
  filter: blur(0.2px);
}

.kiosk-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.kiosk-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 24px 8px;
  flex-wrap: wrap;
}

.locale-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.locale-flag {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: #fff;
  box-shadow: 0 4px 14px rgba(58, 36, 24, 0.12);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.locale-flag:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(58, 36, 24, 0.18);
}

.locale-flag.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 159, 104, 0.35), 0 6px 18px rgba(58, 36, 24, 0.16);
  transform: scale(1.06);
}

.locale-flag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kiosk-header[hidden] { display: none !important; }

.brand-logo {
  height: 56px;
  width: auto;
  transition: height 0.25s ease, transform 0.25s ease;
}

.kiosk-shell.is-idle-screen .brand-logo {
  height: 68px;
}

.kiosk-shell.is-idle-screen .kiosk-header {
  padding-top: 22px;
  padding-bottom: 4px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--choco);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kiosk-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 8px;
}

.screen {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeIn 0.35s ease;
}

.screen[hidden] { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card {
  width: min(560px, 100%);
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.card-hero { padding: 48px 36px; }

.card-idle {
  position: relative;
  width: min(640px, 100%);
  padding: 44px 40px 40px;
  background:
    linear-gradient(165deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 248, 238, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 159, 104, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.card-idle::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(255, 214, 223, 0.35);
  pointer-events: none;
}

.idle-hero-logo {
  display: block;
  width: min(280px, 72vw);
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 14px 28px rgba(197, 139, 92, 0.18));
}

.idle-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--caramel);
}

.card-idle h1 {
  margin: 0 0 10px;
  font-size: calc(2.15rem * var(--font-scale));
}

.idle-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
}

.idle-trust span {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.screen-idle {
  gap: 6px;
}

.card-hero h1 {
  margin: 0 0 12px;
  font-size: calc(2.4rem * var(--font-scale));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.card-processing { width: min(480px, 100%); }

.burst-preview-img {
  display: block;
  max-width: min(90vw, 480px);
  max-height: 50vh;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

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

/* Плитки во время AI-генерации (как на molochko.club) */
.booth-scan-slot {
  position: relative;
  width: min(90vw, 420px);
  aspect-ratio: 3 / 4;
  margin: 0 auto 18px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(58, 36, 24, 0.12);
  background: #fff4e8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), var(--shadow);
}
.booth-scan-slot[hidden] { display: none !important; }
.booth-scan-slot.has-base { background: #fff6ec; }
.booth-scan-slot__base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.04) brightness(1.02);
  transform: scale(1.1);
  margin: 0;
  border: 0;
  border-radius: 0;
  z-index: 0;
  animation: booth-tiles-base 5.5s ease-in-out infinite;
}
.booth-scan-slot__base[hidden] { display: none !important; }
.booth-scan-fx {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.booth-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 1px;
  padding: 1px;
  z-index: 1;
}
.booth-tiles__cell {
  border-radius: 4px;
  background: linear-gradient(145deg, #fff9f2, #ffd4b0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  opacity: 0.72;
  transform: scale(0.96);
  will-change: opacity, transform;
  animation: booth-tiles-cell 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.booth-scan-slot.has-base .booth-tiles__cell {
  background: rgba(255, 248, 239, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 0.5px rgba(255, 255, 255, 0.25);
  animation-name: booth-tiles-reveal;
}
.booth-tiles__sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 72%
  );
  background-size: 240% 100%;
  animation: booth-tiles-sheen 3.6s ease-in-out infinite;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
@keyframes booth-tiles-cell {
  0%, 100% { opacity: 0.72; transform: scale(0.96); }
  40% { opacity: 1; transform: scale(1); }
  70% { opacity: 0.82; transform: scale(0.98); }
}
@keyframes booth-tiles-reveal {
  0%, 100% { opacity: 0.78; transform: scale(0.97); }
  38% { opacity: 0.08; transform: scale(1); }
  68% { opacity: 0.42; transform: scale(0.985); }
}
@keyframes booth-tiles-sheen {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes booth-tiles-base {
  0%, 100% { transform: scale(1.1); }
  50% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .booth-tiles__cell,
  .booth-tiles__sheen,
  .booth-scan-slot__base {
    animation: none !important;
  }
  .booth-tiles__cell { opacity: 0.55; }
}

.card-result img { margin-top: 16px; }
.pay-qr-wrap, .result-qr-wrap { margin: 16px auto 0; text-align: center; }
.result-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 16px 0 0;
}
.result-share .btn { min-width: 96px; }
.share-btn.share-vk { background: #0077ff22; }
.share-btn.share-tg { background: #229ed922; }
.share-btn.share-email { background: #ff9f6822; }
.pay-qr-wrap canvas, .result-qr-wrap canvas {
  display: block; margin: 0 auto; border-radius: 12px; background: #fff; padding: 8px;
}

h1, h2 {
  margin: 0 0 12px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.screen-title {
  margin: 0 0 24px;
  font-size: calc(1.8rem * var(--font-scale));
  font-weight: 800;
}

.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: calc(1.05rem * var(--font-scale));
  line-height: 1.5;
  font-weight: 600;
}

.hint, .countdown-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.error {
  margin: 12px 0 0;
  color: #d64545;
  font-weight: 700;
}

/* --- Кнопки в стиле molochko.club --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  min-height: calc(52px * var(--button-scale));
  padding: 0 calc(22px * var(--button-scale));
  font-weight: 900;
  font-size: calc(1rem * var(--button-scale));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffbd8c);
  color: var(--choco);
  box-shadow: 0 18px 42px rgba(233, 120, 63, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 24px 52px rgba(233, 120, 63, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.62);
  color: var(--choco);
  border: 1px solid var(--line);
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(58, 36, 24, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(58, 36, 24, 0.1);
}

.btn-xl {
  min-height: calc(60px * var(--button-scale));
  padding: 0 calc(56px * var(--button-scale));
  font-size: calc(1.2rem * var(--button-scale));
  min-width: calc(260px * var(--button-scale));
}

.idle-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--choco);
  border: 2px solid var(--accent);
  box-shadow: 0 10px 24px rgba(58, 36, 24, 0.08);
}

.btn-secondary:hover {
  background: #fff;
  box-shadow: 0 14px 30px rgba(58, 36, 24, 0.12);
}

.combo-list {
  list-style: none;
  padding: 0;
  margin: 16px auto 20px;
  max-width: 360px;
  text-align: left;
}

.combo-list li {
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.countdown-combo-step {
  margin-top: 12px;
  font-weight: 700;
  color: var(--accent);
}

.rapid-pick-btn {
  padding: 0;
  border: 3px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.rapid-pick-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rapid-pick-btn:active,
.rapid-pick-btn:focus-visible {
  border-color: var(--accent);
}

input, select {
  width: 100%;
  max-width: 320px;
  padding: 14px 18px;
  margin: 8px 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--choco);
  font-size: calc(1.05rem * var(--font-scale));
  font-weight: 600;
}

label {
  display: block;
  margin: 12px 0;
  text-align: left;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}

.preset-grid {
  display: grid;
  gap: 16px;
  width: min(900px, 100%);
  grid-template-columns: repeat(var(--preset-cols, 3), minmax(0, 1fr));
}

.preset-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: calc(120px * var(--button-scale));
  padding: calc(14px * var(--button-scale)) calc(14px * var(--button-scale)) calc(18px * var(--button-scale));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 159, 104, 0.42);
  background: rgba(255, 159, 104, 0.38);
  color: var(--choco);
  font-size: calc(1.05rem * var(--font-scale));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 55px rgba(58, 36, 24, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.preset-grid button:nth-child(4n+2) {
  background: rgba(255, 214, 223, 0.48);
  border-color: rgba(255, 182, 198, 0.52);
}

.preset-grid button:nth-child(4n+3) {
  background: rgba(247, 231, 208, 0.55);
  border-color: rgba(197, 139, 92, 0.38);
}

.preset-grid button:nth-child(4n) {
  background: rgba(255, 182, 140, 0.4);
  border-color: rgba(233, 120, 63, 0.44);
}

.preset-grid .preset-thumb {
  width: 100%;
  max-height: calc(140px * var(--button-scale));
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 6px);
  flex: 1 1 auto;
}

.preset-grid .preset-title {
  line-height: 1.2;
  text-align: center;
}

.preset-grid .preset-aspect {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.22);
}

.preset-grid button:hover,
.preset-grid button:focus {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(58, 36, 24, 0.12);
}

.preset-grid button:nth-child(4n+1):hover,
.preset-grid button:nth-child(4n+1):focus {
  background: rgba(255, 159, 104, 0.54);
  border-color: rgba(255, 159, 104, 0.62);
}

.preset-grid button:nth-child(4n+2):hover,
.preset-grid button:nth-child(4n+2):focus {
  background: rgba(255, 214, 223, 0.64);
  border-color: rgba(255, 182, 198, 0.68);
}

.preset-grid button:nth-child(4n+3):hover,
.preset-grid button:nth-child(4n+3):focus {
  background: rgba(247, 231, 208, 0.72);
  border-color: rgba(197, 139, 92, 0.48);
}

.preset-grid button:nth-child(4n):hover,
.preset-grid button:nth-child(4n):focus {
  background: rgba(255, 182, 140, 0.56);
  border-color: rgba(233, 120, 63, 0.56);
}

.preset-grid button:active {
  transform: translateY(0);
  background: linear-gradient(135deg, var(--accent), #ffbd8c);
  border-color: transparent;
}

.camera-wrap {
  position: relative;
  width: min(90vw, 720px);
}

#camera {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.countdown-ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 36, 24, 0.35);
  border-radius: var(--radius-lg);
}

.countdown-ring[hidden] { display: none !important; }

.countdown-num {
  font-size: calc(7rem * var(--font-scale));
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.pay-amount {
  font-size: calc(2rem * var(--font-scale));
  font-weight: 800;
  margin: 16px 0 24px;
  color: var(--accent-dark);
}

.promo-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.promo-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(58, 36, 24, 0.15);
  font-size: calc(1rem * var(--font-scale));
}

.progress-bar {
  width: min(400px, 80vw);
  height: 10px;
  margin: 24px auto 0;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #ffbd8c);
  border-radius: 999px;
  transition: width 0.3s ease;
}

#result-img {
  max-width: min(90vw, 600px);
  max-height: 55vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.kiosk-footer {
  text-align: center;
  padding: 12px 24px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.kiosk-footer[hidden] { display: none !important; }

.staff-entry {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 1;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(58, 36, 24, 0.05);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.staff-entry:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--choco);
  border-color: rgba(255, 159, 104, 0.35);
  transform: translateY(-1px);
}

.idle-staff-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.idle-update-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 159, 104, 0.45);
  text-align: center;
}
.idle-update-banner .hint-ok { color: #1a6b3a; }
.staff-exit {
  opacity: 0.72;
  background: transparent;
  box-shadow: none;
}

/* --- Раздел персонала (PIN + админка) --- */
.card-admin-pin {
  width: min(420px, 100%);
  text-align: center;
  padding: 32px 28px;
}
.admin-pin-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.admin-pin-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.card-admin {
  width: min(1080px, 100%);
  max-width: 100%;
  max-height: calc(100vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  text-align: left;
  padding: 26px 28px 30px;
  box-sizing: border-box;
}
.admin-header {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.admin-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.admin-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.95fr);
  gap: 18px 20px;
  align-items: start;
  max-width: 100%;
  overflow: hidden;
}

.admin-panel {
  min-width: 0;
  padding: 16px 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}

.admin-panel-label {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--caramel);
}
.admin-panel-label-muted {
  margin-top: 16px;
  color: var(--muted);
}

.admin-field {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--choco);
  font-size: 0.88rem;
  line-height: 1.35;
}
.admin-field + .admin-field {
  margin-top: 14px;
}

.admin-select,
#admin-pin-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--choco);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(58, 36, 24, 0.04);
}
.admin-select:focus,
#admin-pin-input:focus {
  outline: 2px solid rgba(255, 159, 104, 0.45);
  outline-offset: 1px;
  border-color: rgba(255, 159, 104, 0.5);
}

#admin-pin-input {
  max-width: none;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.28em;
  font-weight: 600;
  padding: 14px 16px;
}

.admin-pin-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.admin-pin-actions .btn-staff {
  flex: 1 1 120px;
  max-width: 180px;
}

/* Кнопки персонала — легче гостевых, текст не вылезает */
.btn-staff {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  hyphens: none;
  letter-spacing: 0;
}
.btn-staff-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  justify-content: center;
  box-sizing: border-box;
}
.btn-staff:hover {
  transform: none;
}
.btn-staff.btn-primary {
  box-shadow: 0 12px 28px rgba(233, 120, 63, 0.22);
}
.btn-staff.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(233, 120, 63, 0.28);
}
.btn-staff.btn-ghost {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}
.btn-staff.btn-secondary {
  margin-top: 4px;
  font-weight: 600;
}

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

.admin-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.admin-action-group-compact {
  gap: 6px;
}

.admin-camera-wrap {
  margin: 4px 0 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1a1410;
  aspect-ratio: 4 / 3;
  max-height: 200px;
  border: 1px solid var(--line);
}
.admin-camera-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-mirror {
  transform: scaleX(-1);
}

.admin-status {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.admin-stat {
  min-width: 0;
}
.admin-status dt {
  margin: 0 0 3px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.admin-status dd {
  margin: 0;
  font-weight: 600;
  color: var(--choco);
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.35;
}

.admin-hint {
  margin: 8px 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

.admin-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 10px 0 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}
.admin-check input {
  margin-top: 3px;
  flex-shrink: 0;
}
.admin-check span {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.admin-back-btn {
  margin-top: 6px !important;
}

.screen-admin,
.screen-admin-pin,
.screen-admin-test {
  max-width: min(1080px, 100%);
  width: 100%;
}

.screen-admin-test {
  gap: 14px;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr 1fr;
  }
  .admin-panel-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-status {
    grid-template-columns: 1fr;
  }
  .card-admin {
    padding: 20px 16px 24px;
  }
  .admin-panel {
    padding: 14px 14px 16px;
  }
}

@media (orientation: landscape) and (min-height: 420px) {
  .screen-admin .card-admin {
    max-height: calc(100vh - 88px);
  }
  .admin-camera-wrap {
    max-height: min(28vh, 200px);
  }
  .kiosk-main:has(.screen-admin:not([hidden])) {
    align-items: flex-start;
    padding-top: 10px;
  }
}

.hint-ok { color: var(--caramel) !important; }

/* --- Модальное окно (закрытие и др.) --- */
.booth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.booth-modal[hidden] { display: none !important; }

.booth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 36, 24, 0.42);
  backdrop-filter: blur(6px);
}

.booth-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px 28px 26px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ef 100%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 32px 90px rgba(58, 36, 24, 0.22);
  text-align: center;
  animation: modalIn 0.28s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.booth-modal-logo {
  display: block;
  width: min(180px, 55vw);
  height: auto;
  margin: 0 auto 16px;
}

.booth-modal-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--choco);
}

.booth-modal-text {
  margin: 0 0 22px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.booth-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.booth-modal-actions .btn-staff {
  flex: 1 1 120px;
  max-width: 168px;
}

@media (max-width: 640px) {
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 28px 20px; }
}
