/* Kiosk InJourney: layar sentuh potret/lanskap, target sentuh besar. Ikon hanya Lucide. */
:root {
  --maroon: #7c1d31;
  --maroon-deep: #5a1224;
  --gold: #d6a640;
  --gold-soft: #f3e3b8;
  --cream: #fbf6ee;
  --ink: #2b1a1f;
  --line: #e6d9c6;
  --ok: #1f7a4d;
  --bad: #b3261e;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overflow: hidden;
}
.kiosk { display: flex; flex-direction: column; height: 100%; padding: 28px 40px 36px; background:
  radial-gradient(circle at 10% 0%, rgba(214, 166, 64, 0.18), transparent 38%),
  radial-gradient(circle at 100% 100%, rgba(124, 29, 49, 0.14), transparent 42%), var(--cream); }
.kiosk-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.kiosk-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.screen { width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; max-height: 100%; }
.screen[hidden] { display: none; }
h1 { margin: 0; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.12; color: var(--maroon-deep); letter-spacing: -0.01em; }
.lead { margin: 0; font-size: clamp(18px, 2.2vw, 26px); line-height: 1.35; max-width: 760px; }
.lead.small { font-size: 18px; opacity: 0.8; }
.notice { margin: 0; padding: 12px 18px; border-radius: 14px; background: #fdecea; color: var(--bad); font-size: 20px; max-width: 760px; }
.notice.ok { background: #e6f4ec; color: var(--ok); }

button { font: inherit; cursor: pointer; border: 0; }
button svg { width: 1.2em; height: 1.2em; flex: none; }
.kiosk-primary, .kiosk-ghost, .choice {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
}
.kiosk-primary {
  min-height: 76px; padding: 0 44px; border-radius: 999px; font-size: 26px; font-weight: 600;
  background: var(--maroon); color: #fff; box-shadow: 0 10px 26px rgba(124, 29, 49, 0.28);
}
.kiosk-primary:active { background: var(--maroon-deep); transform: translateY(1px); }
.kiosk-primary:disabled { opacity: 0.55; box-shadow: none; }
.kiosk-ghost { min-height: 56px; padding: 0 26px; border-radius: 999px; font-size: 20px; background: transparent; color: var(--maroon); border: 2px solid var(--line); }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; width: 100%; }
.choice-row .choice { aspect-ratio: 1 / 1; min-height: 0; border-radius: 32px; }
.choice {
  flex-direction: column; min-height: 280px; border-radius: 36px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 700;
  color: #fff; box-shadow: 0 16px 40px rgba(43, 26, 31, 0.2);
}
.choice svg { width: 72px; height: 72px; }
.choice-yes { background: linear-gradient(160deg, var(--maroon), var(--maroon-deep)); }
.choice-no { background: linear-gradient(160deg, #b8862a, var(--gold)); color: var(--ink); }
.choice:active { transform: scale(0.985); }

.code-input, .text-input {
  width: min(420px, 100%); min-height: 72px; border-radius: 18px; border: 2px solid var(--line); background: #fff;
  font-size: 30px; text-align: center; color: var(--ink); -webkit-user-select: text; user-select: text;
}
.code-input { letter-spacing: 0.4em; font-size: 40px; }
.text-input { font-size: 22px; min-height: 60px; }

.qr-box { background: #fff; padding: 22px; border-radius: 24px; border: 2px solid var(--line); line-height: 0; }
.qr-box svg, .qr-box img, .qr-box canvas { width: min(46vh, 380px); height: auto; }

.viewport { position: relative; width: 100%; overflow: hidden; border-radius: 28px; background: #1d1417; box-shadow: 0 14px 40px rgba(43, 26, 31, 0.25); }
.scan-status { margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; border-radius: 22px; border: 1px solid var(--glow, #E3B04B); color: var(--paper, #FFF6E6); font-size: 26px; font-weight: 700; }
.scan-status svg { width: 30px; height: 30px; animation: scan-pulse 1.4s ease-in-out infinite; }
@keyframes scan-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.viewport-scan { aspect-ratio: 16 / 9; max-height: 46vh; }
.viewport-photo { aspect-ratio: 3 / 4; max-height: 56vh; width: auto; }
.viewport video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.viewport-scan video { transform: none; } /* layar ponsel tidak dicerminkan */
.countdown {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 220px; font-weight: 800; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55); pointer-events: none;
}
.countdown.flash { background: rgba(255, 255, 255, 0.85); color: transparent; }

.frame-grid { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; max-height: 62vh; overflow: auto; padding: 6px; }
.frame-card { width: clamp(150px, 22vw, 240px); padding: 10px; border-radius: 22px; background: #fff; border: 3px solid transparent; box-shadow: 0 8px 24px rgba(43, 26, 31, 0.14); color: var(--ink); }
.frame-card img { width: 100%; display: block; border-radius: 12px; background: var(--gold-soft); aspect-ratio: 2 / 3; object-fit: cover; }
.frame-card .frame-name { display: block; margin-top: 8px; font-size: 18px; font-weight: 600; }
.frame-card.selected { border-color: var(--maroon); }

.preview-box { background: #fff; border-radius: 20px; padding: 10px; box-shadow: 0 12px 34px rgba(43, 26, 31, 0.2); line-height: 0; }
.preview-box img { display: block; max-height: 44vh; max-width: 100%; border-radius: 10px; transition: opacity .15s; }
.preview-box img.loading { opacity: .45; }
.effect-row { display: flex; gap: 12px; overflow-x: auto; max-width: 100%; padding: 6px 4px 10px; }
.effect-chip { flex: none; min-height: 60px; padding: 0 22px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-size: 20px; font-weight: 600; color: var(--ink); }
.effect-chip.selected { background: var(--gold); border-color: var(--gold); }

.kiosk-busy { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; background: rgba(251, 246, 238, 0.9); font-size: 26px; color: var(--maroon-deep); z-index: 10; }
.kiosk-busy[hidden] { display: none; }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 7px solid var(--gold-soft); border-top-color: var(--maroon); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (orientation: landscape) and (max-height: 820px) {
  .kiosk { padding: 16px 28px 20px; }
  .choice { min-height: 190px; }
  .qr-box svg, .qr-box img, .qr-box canvas { width: min(40vh, 300px); }
}
/* Tema Vote CGK: latar foto bandara + lapisan gelap agar teks terbaca; skala iPad Air potret. */
:root { --night: #230b12; --glow: #e3b04b; --paper: #fff6e6; }
body { background: var(--night); color: var(--paper); }
.kiosk {
  background:
    linear-gradient(180deg, rgba(35, 11, 18, 0.35) 0%, rgba(35, 11, 18, 0.18) 28%, rgba(35, 11, 18, 0.72) 62%, rgba(35, 11, 18, 0.92) 100%),
    url("/brand/cgk-bg.jpg") center / cover no-repeat, var(--night);
}
.brand-logo { display: block; width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55)); }
.brand-danantara { height: 44px; }
.brand-injourney { height: 60px; }
h1 { color: var(--paper); text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55); }
.lead, .lead.small { color: var(--paper); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); }
.kiosk-primary { background: var(--glow); color: var(--night); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.kiosk-primary:active { background: #f0c566; }
.kiosk-ghost { color: var(--paper); border-color: var(--glow); background: rgba(35, 11, 18, 0.45); }
.choice { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); }
.choice-yes { background: linear-gradient(160deg, #f0c566, var(--glow)); color: var(--night); }
.choice-no { background: rgba(35, 11, 18, 0.62); color: var(--paper); border: 3px solid var(--glow); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.effect-chip { background: rgba(35, 11, 18, 0.62); color: var(--paper); border-color: var(--glow); }
.effect-chip.selected { background: var(--glow); color: var(--night); }
.frame-card.selected { border-color: var(--glow); }
.kiosk-busy { background: rgba(35, 11, 18, 0.88); color: var(--paper); }
.spinner { border-color: rgba(243, 227, 184, 0.25); border-top-color: var(--glow); }
.screen-left { align-items: flex-start; text-align: left; margin-top: 9vh; }
.app-title { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0 0 8px; }
.app-logo { width: min(60vw, 480px); height: auto; filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6)); }
.app-name { margin: -6px 0 0 4px; font-size: clamp(44px, 7.6vw, 70px); line-height: 1; font-weight: 800; letter-spacing: -0.01em; color: var(--paper); text-shadow: 0 4px 28px rgba(0, 0, 0, 0.6); }
.app-tagline { margin: 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; color: var(--glow); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
.kiosk-foot { display: none; text-align: center; font-size: 20px; letter-spacing: 0.04em; color: #e8c9a0; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); padding-top: 12px; }
.kiosk[data-screen="gate"] .kiosk-foot { display: block; }
/* Cetak: hanya gambar hasil (kiosk.js mengisi #printSheet), kertas 4R 10 x 15 cm tanpa margin. */
#printSheet { display: none; }
@page { size: 100mm 150mm; margin: 0; }
@media print {
  body > *:not(#printSheet) { display: none !important; }
  #printSheet { display: block; width: 100mm; height: 150mm; }
  #printSheet img { width: 100%; height: 100%; display: block; object-fit: cover; }
}

/* Pilih bingkai: satu per layar, panah kiri/kanan */
.frame-stage { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; flex: 1; min-height: 0; }
.frame-view { margin: 0; flex: 0 1 auto; height: 100%; max-height: 56vh; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 0; }
.frame-live { position: relative; flex: 1; min-height: 0; aspect-ratio: 2 / 3; max-width: 100%; border-radius: 14px; overflow: hidden; background: #000; border: 4px solid var(--glow, #E3B04B); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.frame-live video { position: absolute; object-fit: cover; transform: scaleX(-1); background: #111; }
.frame-live img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.frame-view figcaption { font-size: 28px; font-weight: 800; color: var(--paper, #FFF6E6); }
.frame-nav { flex: 0 0 auto; width: 88px; height: 88px; border-radius: 50%; border: 3px solid var(--glow, #E3B04B); background: rgba(35, 11, 18, .62); color: var(--paper, #FFF6E6); display: grid; place-items: center; cursor: pointer; }
.frame-nav[hidden] { display: none; }
.frame-nav svg { width: 44px; height: 44px; }
.frame-nav:active { background: var(--glow, #E3B04B); color: #2A0F16; }
.frame-dots { display: flex; justify-content: center; gap: 12px; }
.frame-dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 246, 230, .35); }
.frame-dots span.on { background: var(--glow, #E3B04B); }
#framePick { align-self: stretch; }
.frame-stage { align-items: stretch; }
.frame-stage .frame-nav { align-self: center; }
.frame-view { align-self: stretch; height: auto; max-height: none; }
.frame-live { height: 0; min-height: 0; flex: 1 1 0; width: auto; }
.frame-stage { flex: none; height: min(58vh, 720px); }
.frame-stage { --h: min(58vh, 720px); height: var(--h); }
.frame-live { flex: none; height: calc(var(--h) - 56px); width: auto; aspect-ratio: 2 / 3; }

/* Layar foto: live view di dalam bingkai terpilih */
.photo-stage { --h: min(62vh, 760px); display: flex; justify-content: center; }
.photo-stage .frame-live { height: var(--h); }
.photo-stage .countdown { z-index: 2; }
.frame-live { height: var(--h); }
.frame-stage { --h: min(58vh, 720px); }

/* Langkah 2-4 (bingkai, foto, efek): semua isi di dalam kartu putih yang menjadi lapisan di atas latar bandara. */
.screen-card { background: #fffdf8; color: var(--ink); border-radius: 36px; padding: 30px 32px 28px; gap: 16px; max-width: 760px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.screen-card h1 { color: var(--ink); text-shadow: none; margin: 0; }
.screen-card .lead { color: #5a3a40; text-shadow: none; margin: 0; }
.screen-card .kiosk-primary { width: 100%; }
.screen-card .kiosk-ghost { color: var(--ink); background: transparent; border-color: var(--gold); }
.screen-card .frame-nav { background: #fff; color: var(--ink); border-color: var(--gold); }
.screen-card .frame-nav:active { background: var(--gold); }
.screen-card .frame-dots span { background: rgba(43, 26, 31, 0.2); }
.screen-card .frame-dots span.on { background: var(--gold); }
.screen-card .frame-live { box-shadow: 0 10px 28px rgba(43, 26, 31, 0.25); }
.screen-card .preview-box { box-shadow: none; padding: 0; background: transparent; }
.screen-card .preview-box img { max-height: 46vh; border-radius: 12px; box-shadow: 0 10px 28px rgba(43, 26, 31, 0.25); }
.screen-card .effect-chip { background: #fff; color: var(--ink); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.screen-card .effect-chip.selected { background: var(--gold); border-color: var(--gold); color: var(--night); }
.screen-card .notice { max-width: 100%; }
.frame-stage { --h: min(48vh, 580px); }
.photo-stage { --h: min(48vh, 580px); }
/* Langkah 3 (foto): kartu dipanjangkan ke atas dan ke bawah, live view lebih besar. */
.screen-card[data-screen-id="photo"] { height: 100%; justify-content: center; }
.photo-stage { --h: min(64vh, 760px); }
/* Langkah 2 (pilih bingkai): kartu dipanjangkan seperti langkah 3. */
.screen-card[data-screen-id="frame"] { height: 100%; justify-content: center; }
.frame-stage { --h: min(60vh, 720px); }

/* Pindai konfirmasi: kartu putih yang sama dengan langkah 2-4. */
.screen-card[data-screen-id="scan"] { height: 100%; justify-content: center; }
.screen-card .scan-status { color: var(--ink); border-color: var(--gold); width: 100%; }
.screen-card .viewport-scan { width: 100%; aspect-ratio: 4 / 5; max-height: 56vh; border-radius: 22px; overflow: hidden; }
/* Status pencarian hanya penanda sistem sedang bekerja (bukan tombol/kotak). */
.screen-card .scan-status { border: 0; padding: 4px 0; width: auto; font-size: 20px; font-weight: 600; color: #7a5a60; }
.screen-card .scan-status svg { width: 24px; height: 24px; color: var(--gold); }
.screen-card .scan-status.ok { color: var(--ok); font-size: 26px; font-weight: 800; }
.screen-card .scan-status.ok svg { color: var(--ok); animation: none; width: 30px; height: 30px; }
/* Ukuran standar langkah 1-4 (mengikuti langkah 1): label 18px, judul 48px, petunjuk 17px. */
.step-label { margin: 0; font-size: 18px; letter-spacing: 3px; font-weight: 700; color: #B8862B; }
.screen-card h1 { font-size: 48px; line-height: 1.1; font-weight: 800; }
.screen-card .lead { font-size: 17px; line-height: 1.4; max-width: 640px; }
/* Tombol di bawah kamera: berdampingan, persegi dengan 4 sudut membulat. */
.scan-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scan-actions .kiosk-ghost { border-radius: 16px; }
/* Tombol pindai: lebih besar dan diletakkan di bagian bawah kartu. */
.screen-card[data-screen-id="scan"] { justify-content: flex-start; }
.scan-actions { width: 100%; flex-wrap: nowrap; margin-top: auto; }
.scan-actions .kiosk-ghost { flex: 1; min-height: 76px; padding: 0 20px; font-size: 24px; font-weight: 700; border-radius: 18px; gap: 12px; }
.scan-actions .kiosk-ghost svg { width: 28px; height: 28px; }
.scan-actions .kiosk-primary { flex: 1; width: auto; min-height: 76px; padding: 0 20px; font-size: 24px; font-weight: 800; border-radius: 18px; gap: 12px; }
.scan-actions .kiosk-primary svg { width: 28px; height: 28px; }
/* Area kamera memanjang ke bawah, mengisi ruang kosong di kartu pindai. */
.screen-card .viewport-scan { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; max-height: none; }
.screen-card .viewport-scan video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Menu hamburger, dialog, dan layar pengaturan ---------- */
.kiosk-top { position: relative; gap: 16px; }
.kiosk-top .brand-injourney { margin-left: auto; }
.menu-btn { width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, 0.16); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, 0.35); flex: none; }
.menu-btn svg { width: 30px; height: 30px; }
.menu-panel { position: absolute; top: 96px; right: 40px; z-index: 30; width: 260px; background: #fff; border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); overflow: hidden; }
.menu-panel[hidden] { display: none; }
.menu-panel button { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: transparent; color: var(--ink); font-size: 20px; font-weight: 600; text-align: left; }
.menu-panel button + button { border-top: 1px solid var(--line); }
.menu-panel button.danger { color: var(--bad); }
.kiosk-dialog { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(20, 8, 12, 0.7); }
.kiosk-dialog[hidden] { display: none; }
.dialog-card { width: min(560px, calc(100% - 48px)); background: #fffdf8; border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.dialog-card h2 { margin: 0; font-size: 30px; color: var(--ink); }
.dialog-card p { margin: 0; font-size: 19px; line-height: 1.4; color: #5b4348; }
.dialog-actions { display: flex; gap: 14px; }
.dialog-actions button { flex: 1; min-height: 64px; border-radius: 16px; font-size: 22px; font-weight: 700; }
.dialog-actions .kiosk-primary.danger { background: var(--bad); color: #fff; }
.pin-dots { display: flex; gap: 20px; justify-content: center; padding: 6px 0; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); }
.pin-dots span.on { background: var(--gold); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; justify-content: center; }
.pin-pad button { height: 84px; border-radius: 20px; background: #fff; border: 2px solid var(--line); font-size: 32px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.pin-pad button.blank { visibility: hidden; }
.pin-pad button svg { width: 30px; height: 30px; }
.kiosk[data-mirror-live="0"] .viewport video, .kiosk[data-mirror-live="0"] .frame-live video, .kiosk[data-mirror-live="0"] .set-live video { transform: none; }
.kiosk[data-bright="1"] video { filter: brightness(1.35) contrast(0.95); }
.screen-card[data-screen-id="setcam"], .screen-card[data-screen-id="settest"], .screen-card[data-screen-id="settings"] { height: 100%; justify-content: flex-start; }
.screen-card .set-live { width: 100%; flex: 1 1 auto; min-height: 0; border-radius: 22px; overflow: hidden; background: #111; }
.set-live video, .set-live img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.set-live img { transform: none; }
.set-rows { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 0 6px; font-size: 21px; font-weight: 600; text-align: left; }
.set-row strong { font-weight: 700; color: var(--maroon-deep); text-align: right; }
.seg { display: inline-flex; border: 2px solid var(--gold); border-radius: 14px; overflow: hidden; }
.seg button { min-width: 96px; min-height: 52px; padding: 0 16px; background: #fff; color: var(--ink); font-size: 19px; font-weight: 600; }
.seg button.on { background: var(--gold); color: #2a0f16; font-weight: 800; }
.toggle { width: 84px; height: 48px; border-radius: 24px; background: #d9cdbb; position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 40px; height: 40px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle[aria-pressed="true"] { background: var(--gold); }
.toggle[aria-pressed="true"]::after { transform: translateX(36px); }
.screen-card[data-screen-id="setcam"] .kiosk-primary, .screen-card[data-screen-id="settings"] .kiosk-primary, .screen-card[data-screen-id="settings"] .kiosk-ghost { width: 100%; min-height: 76px; font-size: 24px; border-radius: 18px; }

/* ---------- Layar foto: live view penuh, area foto ditandai garis putus-putus ---------- */
.screen-photo { position: fixed; inset: 0; z-index: 5; max-width: none; max-height: none; width: 100%; background: #000; overflow: hidden; }
.screen-photo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); background: #111; }
.kiosk[data-mirror-live="0"] .screen-photo video { transform: none; }
.photo-guide { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86%, calc(78vh * var(--guide-ratio, 0.77))); max-height: 78%; border: 5px dashed #fff; border-radius: 18px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); pointer-events: none; }
.photo-title { position: absolute; top: 112px; left: 0; right: 0; margin: 0; font-size: 44px; color: #fff; text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7); }
.screen-photo .countdown { z-index: 2; }
.screen-photo .photo-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 150px; z-index: 3; }
.screen-photo .photo-hint:empty { display: none; }
.screen-photo #photoGo { position: absolute; left: 40px; right: 40px; bottom: 48px; width: auto; min-height: 76px; font-size: 26px; border-radius: 18px; z-index: 3; }
.kiosk[data-screen="photo"] .kiosk-top { position: fixed; top: 28px; left: 40px; right: 40px; z-index: 20; justify-content: flex-end; }
.kiosk[data-screen="photo"] .brand-logo { display: none; }
.photo-guide { top: 50%; width: min(86%, calc(68vh * var(--guide-ratio, 0.77))); max-height: 68%; }
.photo-title { top: 96px; }
.photo-guide { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55); }
.photo-title { font-size: 17px; font-weight: 600; line-height: 1.4; top: 110px; }
.screen-photo #photoGo { left: 50%; right: auto; transform: translateX(-50%); width: 400px; min-height: 104px; font-size: 34px; border-radius: 22px; gap: 14px; }
.screen-photo #photoGo svg { width: 38px; height: 38px; }
.photo-guide { top: 46%; width: min(86%, calc(64vh * var(--guide-ratio, 0.77))); max-height: 64%; }
.screen-photo #photoGo { bottom: 120px; }
.screen-photo #photoGo { bottom: 80px; }
.photo-guide { top: 47%; width: min(88%, calc(70vh * var(--guide-ratio, 0.77))); max-height: 70%; }
.screen-photo .countdown { font-size: 380px; color: rgba(255, 255, 255, 0.7); text-shadow: none; background: transparent; border: 0; }
.screen-photo .countdown.flash { background: rgba(255, 255, 255, 0.85); color: transparent; }
.screen-photo .countdown { font-size: 300px; }

/* ---------- Pilih efek: hasil foto di kiri, ilustrasi efek di sisi kanan ---------- */
.effect-stage { display: flex; align-items: stretch; justify-content: center; gap: 18px; width: 100%; flex: 1 1 auto; min-height: 0; }
.effect-stage .preview-box { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; }
.screen-card .effect-stage .preview-box img { max-height: 100%; max-width: 100%; height: auto; width: auto; object-fit: contain; }
.screen-card .effect-stage .effect-row { flex: none; width: 150px; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 4px; gap: 12px; max-height: 100%; }
.screen-card .effect-stage .effect-chip { width: 100%; min-height: 0; padding: 6px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 16px; }
.screen-card .effect-stage .effect-chip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; display: block; }
.screen-card .effect-stage .effect-chip.selected { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold); }
.screen-card[data-screen-id="effect"] { height: 100%; justify-content: flex-start; }
.effect-actions { margin-top: 0; }
.effect-actions .kiosk-ghost, .effect-actions .kiosk-primary { flex: 1; width: auto; min-height: 76px; padding: 0 20px; font-size: 24px; border-radius: 18px; gap: 12px; }
.effect-actions .kiosk-ghost { font-weight: 700; }
.effect-actions .kiosk-primary { font-weight: 800; }
.effect-actions svg { width: 28px; height: 28px; }
.screen-card[data-screen-id="effect"] { padding-bottom: 20px; }
.effect-actions { margin-top: auto; }

/* ---------- Pengaturan kamera & hasil uji foto (meniru app iPad Ngonten Box; warna kartu mengikuti merek) ---------- */
.screen-cam { position: fixed; inset: 0; z-index: 5; max-width: none; max-height: none; width: 100%; background: #000; overflow: hidden; display: block; text-align: left; }
.screen-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); background: #111; }
.kiosk[data-mirror-live="0"] .screen-cam video { transform: none; }
.cam-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.22) 1px, transparent 1px); background-size: 33.333% 33.333%; background-position: 33.333% 33.333%; background-repeat: no-repeat; background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) 33.333% 0 / 1px 100% no-repeat, linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) 66.666% 0 / 1px 100% no-repeat, linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) 0 33.333% / 100% 1px no-repeat, linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) 0 66.666% / 100% 1px no-repeat; }
.cam-pill { position: absolute; left: 24px; top: 24px; z-index: 6; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 16px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 17px; font-weight: 700; }
.cam-pill svg { width: 22px; height: 22px; color: var(--maroon-deep); }
.cam-pill-center { left: 50%; transform: translateX(-50%); }
.cam-dot { width: 10px; height: 10px; border-radius: 50%; background: #1db954; }
.cam-side { position: absolute; right: 24px; top: 0; bottom: 298px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; }
.cam-round { width: 56px; height: 56px; border-radius: 50%; background: rgba(35, 11, 18, 0.62); color: #fff; display: flex; align-items: center; justify-content: center; }
.cam-round svg { width: 26px; height: 26px; }
.cam-mode { position: absolute; left: 24px; bottom: 322px; padding: 10px 18px; border-radius: 12px; background: rgba(35, 11, 18, 0.62); color: #fff; font-size: 16px; font-weight: 600; }
.cam-notice { position: absolute; left: 50%; transform: translateX(-50%); bottom: 380px; z-index: 6; }
.cam-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 298px; box-sizing: border-box; padding: 20px 24px; background: var(--maroon-deep); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; z-index: 6; }
.cam-sheet-title { font-size: 20px; font-weight: 700; color: #fff; line-height: 26px; margin-bottom: 10px; }
.cam-cards { display: flex; gap: 12px; margin-right: -24px; overflow-x: auto; overflow-y: hidden; height: 160px; flex: 0 0 160px; scrollbar-width: none; padding-right: 24px; }
.cam-cards::-webkit-scrollbar { display: none; }
.cam-card { flex: 0 0 200px; height: 160px; box-sizing: border-box; border: 1.5px solid #fff; background: #fff; border-radius: 16px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ink); }
.cam-card[aria-pressed="true"] { border: 3px solid var(--gold); background: #fff3d6; }
.cam-card svg { width: 44px; height: 44px; color: var(--maroon-deep); stroke-width: 1.7; }
.cam-value { font-size: 42px; font-weight: 700; color: var(--maroon-deep); line-height: 46px; }
.cam-tag { background: #c2c1c9; color: #fff; border-radius: 999px; padding: 3px 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; }
.cam-card[aria-pressed="true"] .cam-tag, .cam-value + .cam-tag { background: var(--maroon-deep); }
.cam-label { font-size: 17px; font-weight: 600; }
.cam-test { align-self: center; margin-top: 12px; height: 48px; padding: 0 28px; border-radius: 12px; background: var(--gold); color: #2a0f16; display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.cam-test svg { width: 22px; height: 22px; }
.cam-result { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.cam-thumbs { position: absolute; left: 0; right: 0; bottom: 120px; display: flex; gap: 12px; justify-content: center; }
.cam-thumb { width: 84px; height: 84px; padding: 0; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.45); background: #111; }
.cam-thumb.on { border-color: #fff; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-actions { position: absolute; left: 24px; right: 24px; bottom: 32px; display: flex; gap: 12px; }
.cam-actions button { flex: 1; height: 64px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; font-weight: 700; }
.cam-actions svg { width: 22px; height: 22px; }
.cam-again { background: rgba(35, 11, 18, 0.7); color: #fff; border: 2px solid #fff; }
.cam-next { background: var(--maroon-deep); color: #fff; }
.kiosk[data-screen="setcam"] .kiosk-top, .kiosk[data-screen="settest"] .kiosk-top { position: fixed; top: 24px; left: 24px; right: 24px; z-index: 20; justify-content: flex-end; }
.kiosk[data-screen="setcam"] .brand-logo, .kiosk[data-screen="settest"] .brand-logo { display: none; }
.kiosk[data-screen="setcam"] .menu-btn, .kiosk[data-screen="settest"] .menu-btn { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--maroon-deep); border: 0; }
.kiosk[data-screen="setcam"] .menu-panel, .kiosk[data-screen="settest"] .menu-panel { top: 82px; right: 24px; }
.kiosk[data-mirror-live="0"] .cam-result { transform: none; }
.cam-cards { -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%); mask-image: linear-gradient(to right, #000 88%, transparent 100%); }

/* ---------- Pengaturan lanjutan (Dialog Acara ala Ngonten Box, lembar kanan) ---------- */
.kiosk[data-screen="settings"] .kiosk-top { position: fixed; top: 24px; left: 24px; right: 24px; z-index: 20; justify-content: flex-end; }
.kiosk[data-screen="settings"] .brand-logo { display: none; }
.kiosk[data-screen="settings"] .menu-btn { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--maroon-deep); border: 0; }
.kiosk[data-screen="settings"] .menu-panel { top: 86px; right: 24px; }
.kiosk[data-screen="settings"] .kiosk-foot { display: none; }
.ds-dim { position: absolute; inset: 0; background: rgba(20, 6, 12, 0.6); }
.set-dialog { position: fixed; inset: 0; z-index: 10; display: block; padding: 0; }
.ds-sheet { position: absolute; right: 0; top: 92px; bottom: 0; width: 460px; box-sizing: border-box; padding: 40px 36px 0; border-radius: 32px 0 0 32px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: -8px 0 60px rgba(20, 6, 12, 0.35); color: #2b1a1f; text-align: left; }
.ds-logo { width: 240px; height: auto; flex: none; display: block; }
.ds-tag { margin: 0; font-size: 19px; color: #7a5a60; text-align: center; }
.ds-start { flex: none; height: 64px; padding: 0 44px; border-radius: 999px; background: var(--maroon-deep); color: #fff; font-size: 23px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.ds-start svg { width: 24px; height: 24px; }
.ds-sheet hr { align-self: stretch; width: 100%; border: 0; height: 1px; background: #eadfce; margin: 4px 0; flex: none; }
.ds-scroll { align-self: stretch; flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 60px; }
.ds-scroll h2 { margin: 6px 0 0; font-size: 25px; font-weight: 800; }
.ds-info { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 20px; }
.ds-info span { color: #7a5a60; font-weight: 600; }
.ds-info strong { font-weight: 800; color: var(--maroon-deep); }
.ds-link { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 0 20px; border-radius: 16px; border: 2px solid #eadfce; background: #fff; text-align: left; font-size: 21px; color: #2b1a1f; }
.ds-link > svg { width: 24px; height: 24px; color: var(--maroon-deep); flex: none; }
.ds-link > svg:last-child { color: #c9bcb0; width: 22px; height: 22px; }
.ds-link span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ds-link b, .ds-row b { font-weight: 700; }
.ds-link i { font-style: normal; font-size: 16px; font-weight: 600; color: #7a5a60; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; font-size: 20px; }
.ds-row span { display: flex; flex-direction: column; gap: 2px; }
.ds-row b { font-weight: 600; }
.ds-row i { font-style: normal; font-size: 16px; font-weight: 600; color: #7a5a60; line-height: 1.3; }
.ds-switch { position: relative; flex: none; width: 54px; height: 32px; border-radius: 999px; background: #d9cdbb; }
.ds-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 6, 12, 0.3); transition: transform 0.15s; }
.ds-switch[aria-pressed="true"] { background: var(--maroon-deep); }
.ds-switch[aria-pressed="true"]::after { transform: translateX(22px); }
.ds-slider-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; font-weight: 600; }
.ds-slider-head b { font-weight: 800; color: var(--maroon-deep); }
.ds-range { width: 100%; height: 40px; accent-color: var(--gold); }
.ds-range-ends { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; color: #7a5a60; margin-top: -8px; }
.ds-danger { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; border-radius: 16px; border: 2px solid #e5b9b9; color: #a32121; background: #fff; font-size: 21px; font-weight: 700; }
.ds-danger svg { width: 24px; height: 24px; }

/* ---------- Foto tes (hasil uji, ala Ngonten Box) ---------- */
.test-info { position: absolute; left: 24px; bottom: 160px; width: 330px; box-sizing: border-box; padding: 14px 20px 8px; border-radius: 24px; background: rgba(35, 11, 18, 0.72); color: #fff; font-size: 15px; backdrop-filter: blur(6px); }
.test-info h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.test-info h3 svg { width: 20px; height: 20px; }
.test-info div { display: flex; justify-content: space-between; gap: 12px; height: 34px; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.test-info span { opacity: 0.7; }
.test-info b { font-weight: 700; text-align: right; }
.test-actions { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 16px; }
.test-btn { width: 112px; height: 112px; border-radius: 20px; background: #fff; color: var(--maroon-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 700; }
.test-btn svg { width: 30px; height: 30px; }
.test-btn.on { background: var(--maroon-deep); color: #fff; }
