* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #101114; color: #fff; font-family: Arial, sans-serif; text-align: center; }
main, section { width: min(100%, 640px); margin: 0 auto; padding: 30px 18px 50px; }
h1 { font-size: clamp(25px, 6vw, 40px); margin: 22px 0; }
.logo { margin-top: 8vh; font-size: clamp(30px, 9vw, 50px); font-weight: bold; letter-spacing: 1px; }
.sub { color: #d4af37; letter-spacing: 4px; margin: 10px 0 30px; }
button { display: block; width: min(100%, 380px); margin: 13px auto; padding: 16px; background: #d4af37; border: 0; border-radius: 9px; color: #111; font-size: 17px; font-weight: bold; cursor: pointer; }
button.secondary { background: #32343a; color: white; }
button:disabled { opacity: .55; }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.frames button { width: 100%; font-size: 13px; padding: 8px 5px; }
.frame-preview { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 2/3; background: #555; color: white; margin-bottom: 10px; font-size: 11px; }
.frame-preview small { position: absolute; bottom: 10px; font-size: 8px; }
.classic-preview { border: 9px solid white; outline: 2px solid #d4af37; outline-offset: -13px; }
.gold-preview { border: 9px solid #c99a3d; outline: 2px solid white; outline-offset: -13px; }
.clean-preview { border: 4px solid #d4af37; border-bottom: 28px solid white; }
.camera-wrap { position: relative; margin: auto; width: min(100%, 380px); }
#camera { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #222; border-radius: 10px; }
#countdown { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; font-size: 80px; font-weight: bold; text-shadow: 0 0 18px #000; }
#resultPhoto { display: block; width: min(100%, 380px); margin: 0 auto 20px; aspect-ratio: 2/3; object-fit: contain; }
#gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#gallery img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 5px; }
#qr { display: flex; justify-content: center; margin: 25px auto; }
.photo-modal { position: fixed; z-index: 10; inset: 0; background: #101114; overflow: auto; flex-direction: column; align-items: center; padding: 65px 20px 20px; }
.photo-modal img { max-width: 100%; max-height: 65vh; object-fit: contain; }
.photo-close { position: absolute; top: 15px; right: 20px; font-size: 35px; cursor: pointer; }
.back-button { position: absolute; top: 10px; left: 10px; width: auto; padding: 10px 15px; }
input, select { display: block; width: min(100%, 380px); padding: 14px; margin: 12px auto; background: #25272b; border: 1px solid #777; border-radius: 7px; color: white; font-size: 16px; }
#overlayPreview { display: block; width: min(100%, 250px); aspect-ratio: 2/3; object-fit: contain; margin: 15px auto; background: repeating-conic-gradient(#ddd 0 25%,#fff 0 50%) 50% / 20px 20px; }
#overlayStatus, #loginMessage { color: #e8d18d; overflow-wrap: anywhere; }
#adminOverlayButton {
  width: auto;
  padding: 10px 14px;
  font-size: 12px;
  position: fixed;
  right: 15px;
  bottom: 20px;
  margin: 0;
  z-index: 20;
  border-radius: 10px;
}#liveOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: none;
  z-index: 2;
}
.frames button {
  height: 300px;
  padding: 12px 8px;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  overflow: hidden;
}

.frames button img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  flex-shrink: 0;
}
.frames button {
  height: 280px !important;
  justify-content: center !important;
  gap: 10px;
}

.frames button .preview {
  width: 100%;
  height: 210px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frames button .preview span {
  font-size: 12px;
  text-align: center;
}

.frames button img {
  height: 210px !important;
  margin-bottom: 0;
}
.frames {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.frames button {
  flex: 1;
  min-width: 0;
  height: 180px !important;
  padding: 10px 6px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between !important;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.frames button img,
.frames button .preview {
  width: 100%;
  height: 130px !important;
  margin: 0 !important;
  object-fit: contain;
}

.frames button .preview span {
  font-size: 11px;
}
.camera-wrap {
  position: relative;
}

#frame2Live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 3;
}
/* Kamera FRAME 2: hanya terlihat dalam dua kotak 
  .camera-wrap:has(#frame2Live[src="./birthday.png"]) {
  overflow: hidden;
}

.camera-wrap:has(#frame2Live[src="./birthday.png"]) {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
/* Dua kotak kamera FRAME 2 */
#frame2Cameras {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.camera-slot {
  position: absolute;
  left: 5.86%;
  width: 89.36%;
  height: 33.53%;
  overflow: hidden;
  background: #111;
}

#cameraSlot1 {
  top: 9.83%;
}

#cameraSlot2 {
  top: 45.51%;
}
#countdown {
  position: fixed !important;
  top: 40% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  font-size: 64px !important;
  font-weight: bold !important;
  color: white !important;
  text-shadow: 0 3px 12px black !important;
}
@media (max-width: 600px) {
  #cameraPage {
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
    padding: 8px;
  }

  

  #cameraPage button {
    padding: 9px;
    font-size: 13px;
    margin: 4px 0;
  }
}
@media (max-width: 600px) {
  #cameraPage {
    padding: 6px 10px;
  }

  #cameraPage .camera-wrap {
    width: auto !important;
    height: min(58dvh, 480px) !important;
    aspect-ratio: 2 / 3;
    margin: 0 auto 8px;
  }

  #cameraPage button {
    padding: 8px !important;
    font-size: 13px !important;
    margin: 3px 0 !important;
  }
}
@media (max-width: 600px) {
  #cameraPage {
    height: 100dvh;
    padding: 8px 12px !important;
    box-sizing: border-box;
    overflow: hidden;
  }

  #cameraPage .camera-wrap {
    height: min(56dvh, 460px) !important;
    width: auto !important;
    aspect-ratio: 2 / 3;
    margin: 0 auto 10px !important;
  }

  #cameraPage button {
    height: 39px !important;
    min-height: 0 !important;
    padding: 5px 10px !important;
    margin: 3px 0 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    border-radius: 9px !important;
  }
}
@media (max-width: 600px) {

  /* Perbesar sedikit bingkai foto */
  #cameraPage .camera-wrap {
    height: min(62dvh, 510px) !important;
    width: auto !important;
    margin: 0 auto 8px !important;
  }

  /* Perkecil tombol kuning */
  #cameraPage button {
    height: 34px !important;
    min-height: 0 !important;
    padding: 3px 6px !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    border-radius: 7px !important;
  }
}
/* Empat tombol kamera: 2 kiri, 2 kanan */
#cameraPage .camera-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}

#cameraPage .camera-buttons button {
  width: 100%;
  padding: 9px 3px !important;
  margin: 0 !important;
  font-size: 12px !important;
  min-height: 38px;
  border-radius: 9px;
}

/* Bingkai foto lebih besar */
@media (max-width: 600px) {
  #cameraPage .camera-wrap {
    height: min(65dvh, 550px) !important;
    margin: 0 auto 6px;
  }

  #cameraPage h1 {
    font-size: 20px;
    margin: 4px 0 8px;
  }
}
.gallery-item {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.delete-photo {
  background: #c62828;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
}
/* GUEST WISHES */
.guest-wishes {
  margin: 20px auto;
  padding: 20px;
  max-width: 450px;
  background: #252525;
  border: 1px solid #d4af37;
  border-radius: 16px;
  text-align: center;
}

.guest-wishes h3 {
  color: #d4af37;
  margin-bottom: 18px;
}

.guest-wishes input,
.guest-wishes textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #777;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font-size: 16px;
}

.guest-wishes textarea {
  resize: vertical;
}

.guest-wishes button {
  width: 100%;
  padding: 15px;
  background: #d4af37;
  color: #111;
  font-weight: bold;
  border: none;
  border-radius: 10px;
}
.wish-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wish-popup-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 28px 22px;
  background: #ffffff;
  color: #222222;
  border-radius: 18px;
  text-align: center;
  box-sizing: border-box;
}

.wish-popup-box h3 {
  margin: 0 0 20px;
}

.wish-popup-box input,
.wish-popup-box textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.wish-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  color: #222222;
  border: none;
  font-size: 28px;
}
/* Tombol admin kecil di bawah halaman HOME */
#home {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  box-sizing: border-box;
  padding-bottom: 75px;

  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

#adminOverlayButton.admin-small {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #292929;
  color: #d4af37;
  border: 1px solid #555;
  font-size: 19px;
  cursor: pointer;
}
/* Ukuran ketiga pilihan frame seragam */
.frames {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.frames > button {
  min-width: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.frames > button img,
.frames > button .preview {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin: 0;
}
/* Preview overlay FRAME 1 dan FRAME 3 */
.camera-wrap:has(#frame2Live:not([src="frame2-overlay.png"])) {
  position: relative;
  overflow: hidden;
}

#frame2Live {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 10;
}
/* FRAME 3: overlay landscape, kamera portrait */
#cameraPage .camera-wrap:has(#frame2Live[src="frame3.png"]) {
  width: min(100%, 600px) !important;
  height: auto !important;
  aspect-ratio: 3 / 2 !important;
  overflow: hidden;
  position: relative;
}

/* Kamera portrait di sebelah kanan */
#cameraPage .camera-wrap:has(#frame2Live[src="frame3.png"]) #camera {
  position: absolute;
  left: 49.7%;
  top: 3.2%;
  width: 47.4%;
  height: 88.4%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
}

/* Overlay menutupi seluruh bingkai landscape */
#cameraPage #frame2Live[src="frame3.png"] {
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.voice-timer {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 22px auto;
}

.voice-timer svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg,
.timer-progress {
  fill: none;
  stroke-width: 5;
}

.timer-bg {
  stroke: #f0eadb;
}

.timer-progress {
  stroke: #d5ae36;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

#timerNumber {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 600;
  color: #222;
}
.music-button {
  position: fixed;
  top: 18px;
  right: 15px;
  z-index: 100;
  width: auto;
  padding: 9px 14px;
  border-radius: 25px;
  background: #d5ae36;
  color: #222;
  font-size: 12px;
  font-weight: 600;
}
.music-button {
  position: fixed;
  top: 18px;
  right: 15px;
  z-index: 100;
  padding: 9px 14px;
  border: none;
  border-radius: 25px;
  background: #d5ae36;
  color: #222;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#frame2Live {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  z-index: 10 !important;
  pointer-events: none;
}
.camera-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
}

#takePhotoButton {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  height: 110px !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  border-radius: 18px !important;
}

.camera-buttons button:not(#takePhotoButton) {
  width: 100% !important;
 height: 42px !important;
  font-size: 13px !important;
  padding: 5px 3px !important;
}
/* ===== CAMERA SYSTEM FIX ===== */

#cameraPage .camera-wrap {
  position: relative !important;
  overflow: hidden !important;
  height: auto !important;
}

#cameraPage #camera {
  position: absolute !important;
  margin: 0 !important;
  max-width: none !important;
}

#cameraPage #liveOverlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  z-index: 10 !important;
  pointer-events: none !important;
}

#cameraPage #frame2Cameras {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}

#cameraPage .camera-slot {
  position: absolute !important;
  overflow: hidden !important;
  background: #111 !important;
}

#cameraPage .camera-slot video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
/* === CAMERA FULL 1 SCREEN === */

html,
body {
  height: 100% !important;
  overflow: hidden !important;
}

#cameraPage {
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 8px 12px !important;
  box-sizing: border-box !important;
  display: flex;
  flex-direction: column;
}

#cameraPage h1 {
  margin: 2px 0 6px !important;
  font-size: 22px !important;
  flex: 0 0 auto;
}

#cameraPage .camera-wrap {
  width: auto !important;
  height: auto !important;

  /* sisakan ruang untuk judul + tombol */
  max-width: 96vw !important;
  max-height: calc(100dvh - 155px) !important;

  /* ikuti rasio overlay */
  aspect-ratio: var(--frame-ratio, 2 / 3) !important;

  flex: 1 1 auto !important;
  margin: 0 auto 8px !important;

  position: relative !important;
  overflow: hidden !important;
}

#cameraPage .camera-buttons {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

#cameraPage #takePhotoButton {
  margin-top: 0 !important;
}
/* RESULT PAGE BOLEH SCROLL */
html,
body {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* HANYA CAMERA PAGE YANG 1 LAYAR */
#cameraPage {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

#resultPage {
  height: auto !important;
  min-height: 100dvh !important;
  overflow: visible !important;
  padding-bottom: 40px !important;
}
#extraFrames {
  display: contents;
}
/* HOME FULL BACKGROUND - TANPA AREA HITAM */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
}

#home {
  position: relative !important;
  width: 100% !important;
  min-height: 100dvh !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  padding: 0 30px 75px !important;
  box-sizing: border-box !important;
}
/* ===== FIX HOME FULLSCREEN ===== */

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
}

#homePage {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;

    margin: 0 !important;
    padding: 0 !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    overflow: hidden !important;
    box-sizing: border-box !important;
}
/* ===== FIX HOME FULLSCREEN + ADMIN BUTTON ===== */

/* Hilangkan ruang hitam atas */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
}

#homePage {
  margin: 0 !important;
  padding-top: 0 !important;
  min-height: 100dvh !important;
  background-position: center top !important;
}

/* Tombol admin selalu di kanan bawah layar */
#adminButton,
.admin-button,
.admin-btn {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;

  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  z-index: 99999 !important;
}
/* ===== FINAL FIX HOME ===== */

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* HOME memenuhi layar */
#home {
  position: relative !important;
  width: 100vw !important;
  min-height: 100dvh !important;

  margin: 0 !important;
  padding: 0 30px !important;

  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;

  box-sizing: border-box !important;
}

/* Tombol ADMIN selalu terlihat */
#adminOverlayButton,
#adminOverlayButton.admin-small {
  position: fixed !important;

  right: 18px !important;
  bottom: 18px !important;

  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  z-index: 99999 !important;
}
main#home {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 30px !important;
  min-height: 100dvh !important;
}

main#home .logo {
  margin-top: 0 !important;
}

#adminOverlayButton {
  position: fixed !important;
  right: 15px !important;
  bottom: 15px !important;
  z-index: 99999 !important;
}
/* Turunkan tulisan HELLOO.BOOTH */
main#home .logo {
  margin-top: 0 !important;
  padding-top: 55px !important;
}

/* Kecilkan tombol ADMIN */
#adminOverlayButton.admin-small {
  position: fixed !important;
  right: 15px !important;
  bottom: 15px !important;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;

  padding: 0 !important;
  margin: 0 !important;

  font-size: 15px !important;
  line-height: 34px !important;
  border-radius: 50% !important;

  z-index: 99999 !important;
}
/* RAPikan tombol MUSIC */
#musicButton.music-button {
  top: 8px !important;
  right: 12px !important;

  width: auto !important;
  min-width: 0 !important;

  padding: 7px 11px !important;
  margin: 0 !important;

  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 20px !important;

  z-index: 99999 !important;
}
/* ===== CAMERA PAS 1 LAYAR HP ===== */

#cameraPage {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding: 6px 12px !important;
}

/* Frame diperkecil agar semua tombol muat */
#cameraPage .camera-wrap {
  height: min(67dvh, 540px) !important;
  max-height: 67dvh !important;
  width: auto !important;
  margin: 0 auto 6px !important;
  flex: 0 1 auto !important;
}

#cameraPage h1 {
  margin: 2px 0 5px !important;
  font-size: 21px !important;
}

/* TAKE PHOTO besar, tapi tidak berlebihan */
#cameraPage #takePhotoButton {
  height: 64px !important;
  min-height: 64px !important;
  padding: 8px !important;
  margin: 0 !important;
  font-size: 20px !important;
  border-radius: 14px !important;
}

/* 3 tombol bawah tetap terlihat */
#cameraPage .camera-buttons button:not(#takePhotoButton) {
  height: 38px !important;
  min-height: 38px !important;
  padding: 4px 2px !important;
  margin: 0 !important;
  font-size: 11px !important;
}
#cameraPage {
  transform: translateY(-12px) !important;
}
#wishPopup .wish-close,
#voicePopup .wish-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;

  padding: 0 !important;
  margin: 0 !important;

  font-size: 22px !important;
  line-height: 34px !important;

  background: transparent !important;
  color: #222 !important;
  border-radius: 50% !important;
}
/* HOME - START & GALLERY lebih kecil */
#home > button:not(.admin-small) {
  width: 72% !important;
  max-width: 360px !important;
  padding: 12px 10px !important;
  font-size: 16px !important;
  margin: 10px auto !important;
}

/* GALLERY dibuat lebih kecil dari START */
#home > button:nth-of-type(2) {
  width: 58% !important;
  max-width: 290px !important;
  padding: 10px !important;
  font-size: 15px !important;
}
/* ===== AI PREVIEW FULLSCREEN ===== */

#aiPreviewPage {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;

  margin: 0 !important;
  padding: 55px 20px 20px !important;

  overflow-y: auto !important;
overflow-x: hidden !important;
  box-sizing: border-box !important;

  background: #101114 !important;

  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#aiPreviewPage h1 {
  margin: 0 0 8px !important;
  font-size: 28px !important;
}

#aiPreviewStyle {
  margin: 0 0 14px !important;
  font-size: 18px !important;
}

#aiPhotoPreview {
  width: auto !important;
  max-width: 92% !important;
  height: auto !important;
  max-height: 58dvh !important;

  object-fit: contain !important;
  border-radius: 14px !important;
  display: block !important;
  margin: 0 auto 12px !important;
}

#aiPreviewPage button {
  width: 92% !important;
  max-width: 420px !important;
  padding: 13px 10px !important;
  margin: 6px auto !important;
  font-size: 17px !important;
}
/* AI CAMERA - FULLSCREEN TANPA SCROLL */
#aiCameraPage {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#aiCameraPage h1,
#aiCameraPage #aiStyleName {
  margin: 4px 0 8px !important;
}

#aiCameraPage .camera-wrap {
  width: 100% !important;
  height: 62dvh !important;
  max-height: 62dvh !important;
  margin: 0 auto 8px !important;
  overflow: hidden !important;
}

#aiCamera {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#aiCameraPage button {
  flex-shrink: 0 !important;
  padding: 12px 10px !important;
  margin: 5px auto !important;
}
/* ===== AI RESULT - COMPACT MOBILE ===== */

#aiPreviewPage {
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 10px 16px 20px;
  text-align: center;
}

#aiPreviewPage h1 {
  font-size: 24px;
  margin: 4px 0 5px;
}

#aiPreviewStyle {
  font-size: 18px;
  margin: 0 0 10px;
}

#aiPhotoPreview {
  display: block;
  width: auto !important;
  max-width: 90% !important;
  height: min(58vh, 560px) !important;
  object-fit: contain;
  margin: 0 auto 10px;
  border-radius: 12px;
}

#aiPreviewPage button {
  width: 90%;
  max-width: 500px;
  min-height: 46px;
  padding: 10px 15px;
  margin: 5px auto;
  font-size: 17px;
  display: block;
  box-sizing: border-box;
}

/* AI CAMERA OVERLAY */
#aiCameraPage .camera-wrap {
  position: relative;
  width: 90%;
  max-width: 500px;
  margin: 0 auto 10px;
  overflow: hidden;
}

#aiCameraPage .camera-wrap #aiCamera {
  display: block;
  width: 100%;
  height: auto;
}

#aiCameraOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 10;
}
/* ===== AI PHOTO FULLSCREEN ===== */

#aiCameraPage {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px 14px;
  box-sizing: border-box;
}

#aiCameraPage h1 {
  margin: 4px 0;
  font-size: 26px;
}

#aiCameraPage #aiStyleName {
  margin: 2px 0 8px;
  font-size: 16px;
}

#aiCameraPage .camera-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 8px;
  overflow: hidden;
}

#aiCameraPage #aiCamera {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
}

#aiCameraPage #aiCameraOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 5;
}

/* TAKE PHOTO - PALING BESAR */
#aiCameraPage button[onclick="takeAIPhoto()"] {
  width: 100%;
  min-height: 58px;
  padding: 12px;
  margin: 6px auto;
  font-size: 20px;
  font-weight: 800;
}

/* GANTI KAMERA + MIRROR - KIRI KANAN */
#aiSwitchCameraButton,
#aiMirrorButton {
  display: inline-block;
  width: calc(50% - 6px);
  min-height: 46px;
  padding: 8px 6px;
  margin: 4px 2px;
  font-size: 14px;
  vertical-align: top;
}

/* BACK PALING KECIL */
#aiCameraPage button[onclick="backFromAICamera()"] {
  width: auto;
  min-width: 100px;
  min-height: 34px;
  padding: 6px 14px;
  margin: 5px auto;
  font-size: 12px;
}
/* AI CAMERA FULLSCREEN */
#aiCameraPage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  overflow-y: auto;
}

#aiCameraPage .camera-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto 8px;
}

#aiCamera {
  width: 100%;
  max-height: calc(100dvh - 245px);
  object-fit: contain;
}
/* AI OVERLAY MENEMPEL DI ATAS CAMERA */
#aiCameraPage .camera-wrap {
  position: relative;
}

#aiCameraOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 5;
  pointer-events: none;
}