/* Jelajah Alam Cilik — Full-bleed editorial 3D & Hybrid AR nature sanctuary. */
:root {
  color-scheme: dark;
  --ink: #0f1813;
  --ink-surface: rgba(15, 24, 19, 0.78);
  --paper: #f2eee2;
  --paper-muted: rgba(242, 238, 226, 0.74);
  --sage: #8fc4b2;
  --line: rgba(242, 238, 226, 0.2);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--sage);
  color: var(--ink);
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}

/* Uniform 1.5px stroke SVG icon system */
.ui-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PRE-MENU WELCOME GATE: UNDUH APK / LANJUT
   ══════════════════════════════════════════ */
@keyframes gateMaskReveal {
  from {
    transform: translateY(108%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes gateSettle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gatePhoneFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.apk-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ink);
  transition: opacity .48s cubic-bezier(.16, 1, .3, 1),
    transform .48s cubic-bezier(.16, 1, .3, 1),
    filter .48s cubic-bezier(.16, 1, .3, 1);
}

.apk-gate[hidden] {
  display: none;
}

.apk-gate.is-exiting {
  opacity: 0;
  transform: scale(1.035);
  filter: blur(6px);
  pointer-events: none;
}

.apk-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.apk-gate-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity .95s cubic-bezier(.16, 1, .3, 1), transform 1.6s cubic-bezier(.16, 1, .3, 1);
}

.apk-gate-bg.is-active {
  opacity: 1;
  transform: scale(1);
}

.apk-gate-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(11, 18, 14, 0.97) 0%,
      rgba(11, 18, 14, 0.90) 48%,
      rgba(11, 18, 14, 0.42) 78%,
      rgba(11, 18, 14, 0.18) 100%);
}

.apk-gate-layout {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: max(28px, env(safe-area-inset-top)) 24px calc(26px + var(--safe-bottom));
  gap: 18px;
}

.apk-gate-copy {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.apk-gate-title {
  margin: 0;
  overflow: visible;
  font: 400 clamp(2.45rem, 8.5vw, 4.5rem)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.apk-gate-title>span {
  display: inline-block;
  animation: gateMaskReveal .74s cubic-bezier(.16, 1, .3, 1) both;
}

.apk-gate-lead {
  margin: 0;
  max-width: 44ch;
  font-size: 0.94rem;
  line-height: 1.58;
  color: rgba(242, 238, 226, 0.84);
  animation: gateSettle .65s cubic-bezier(.16, 1, .3, 1) .08s both;
}

.apk-gate-specs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  animation: gateSettle .65s cubic-bezier(.16, 1, .3, 1) .15s both;
}

.apk-spec {
  margin: 0;
}

.apk-spec dt {
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.apk-spec dd {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: var(--paper-muted);
}

.apk-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: gateSettle .65s cubic-bezier(.16, 1, .3, 1) .22s both;
}

.apk-btn-primary,
.apk-btn-secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 0.88rem/1 inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1),
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.apk-btn-primary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.apk-btn-primary:hover,
.apk-btn-primary:focus-visible {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: #ffffff;
}

.apk-btn-primary.is-downloading {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}

.apk-btn-secondary {
  background: rgba(15, 24, 19, 0.64);
  color: var(--paper);
  border: 1px solid rgba(242, 238, 226, 0.42);
}

.apk-btn-secondary:hover,
.apk-btn-secondary:focus-visible {
  background: rgba(242, 238, 226, 0.12);
  border-color: var(--paper);
}

.apk-btn-secondary .gate-arrow {
  transition: transform .24s cubic-bezier(.16, 1, .3, 1);
}

.apk-btn-secondary:hover .gate-arrow,
.apk-btn-secondary:focus-visible .gate-arrow {
  transform: translateX(4px);
}

.apk-btn-primary:focus-visible,
.apk-btn-secondary:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.apk-gate-note {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--paper-muted);
  animation: gateSettle .65s cubic-bezier(.16, 1, .3, 1) .28s both;
}

.apk-help {
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  animation: gateSettle .65s cubic-bezier(.16, 1, .3, 1) .32s both;
}

.apk-help summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sage);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.apk-help summary::-webkit-details-marker {
  display: none;
}

.apk-help summary::before {
  content: "▸";
  font-size: 0.72rem;
  line-height: 1;
  transition: transform .2s ease;
}

.apk-help[open] summary::before {
  transform: rotate(90deg);
}

.apk-help summary:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 6px;
}

.apk-help ol {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  font-size: 0.74rem;
  line-height: 1.55;
  color: rgba(242, 238, 226, 0.84);
}

.apk-help strong,
.apk-help em {
  color: var(--paper);
  font-style: normal;
}

.apk-help strong {
  font-weight: 600;
}

.apk-help em {
  font-weight: 500;
}

.apk-gate-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  animation: gateSettle .72s cubic-bezier(.16, 1, .3, 1) .18s both;
}

.gate-phone-wrap {
  display: none;
  perspective: 1100px;
}

.gate-phone {
  width: 274px;
  height: 544px;
  border-radius: 42px;
  padding: 9px;
  background: linear-gradient(145deg, #4b5550 0%, #202724 44%, #121715 100%);
  box-shadow: 0 38px 78px rgba(0, 0, 0, 0.56), inset 0 1px 1px rgba(255, 255, 255, 0.24);
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.gate-phone-bezel {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  background: #060908;
  padding: 5px;
  overflow: hidden;
}

.gate-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #0f1813;
}

.gate-phone-hole {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #030504;
  border: 1px solid rgba(255, 255, 255, 0.16);
  z-index: 4;
}

.gate-screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .85s cubic-bezier(.16, 1, .3, 1), transform 1.4s cubic-bezier(.16, 1, .3, 1);
}

.gate-screen-img.is-active {
  opacity: 1;
  transform: scale(1);
}

.gate-screen-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(10, 17, 13, 0.94) 0%, rgba(10, 17, 13, 0.52) 44%, rgba(10, 17, 13, 0.12) 100%);
}

.gate-screen-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gate-screen-caption strong {
  font: 400 1.6rem/1.08 Georgia, "Times New Roman", serif;
  color: var(--paper);
}

.gate-screen-caption span {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(242, 238, 226, 0.8);
}

.gate-phone-sheen {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(124deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.02) 34%, transparent 56%);
}

.gate-world-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gate-world-pill {
  appearance: none;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(242, 238, 226, 0.28);
  background: rgba(15, 24, 19, 0.54);
  color: var(--paper-muted);
  font: 600 0.76rem/1 inherit;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.gate-world-pill.is-active,
.gate-world-pill:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.gate-world-pill:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

@media (min-width: 860px) {
  .apk-gate-scrim {
    background: linear-gradient(102deg,
        rgba(11, 18, 14, 0.96) 0%,
        rgba(11, 18, 14, 0.86) 44%,
        rgba(11, 18, 14, 0.42) 72%,
        rgba(11, 18, 14, 0.24) 100%);
  }

  .apk-gate-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 40px 7vw;
    gap: 44px;
  }

  .apk-gate-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .apk-gate-stage {
    align-items: center;
    flex-shrink: 0;
  }

  .gate-phone-wrap {
    display: none;
    animation: gatePhoneFloat 6.4s ease-in-out infinite;
  }
}

@media (min-width: 860px) and (min-height: 600px) {
  .gate-phone-wrap {
    display: block;
  }
}

/* ══════════════════════════════════════════
   FULL-BLEED EDITORIAL LANDING MENU
   ══════════════════════════════════════════ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ink);
  transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1);
}

.menu-overlay[hidden] {
  display: none;
}

.menu-exit {
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
}

/* Full-bleed crossfading landscape photographs */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.menu-backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .75s cubic-bezier(.16, 1, .3, 1), transform 1.2s cubic-bezier(.16, 1, .3, 1);
}

.menu-backdrop-img.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Asymmetric directional scrim — mobile rises from bottom so top third breathes */
.menu-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(11, 18, 14, 0.96) 0%,
      rgba(11, 18, 14, 0.88) 48%,
      rgba(11, 18, 14, 0.32) 78%,
      rgba(11, 18, 14, 0.14) 100%);
}

.menu-layout {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: max(28px, env(safe-area-inset-top)) 24px calc(28px + var(--safe-bottom));
  gap: 24px;
}

.menu-column {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.menu-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-title {
  margin: 0;
  font: 400 clamp(2.7rem, 9vw, 4.7rem)/0.95 Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.menu-subtitle {
  margin: 0;
  max-width: 36ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--paper-muted);
}

/* Editorial hairline destination index (zero boxed SaaS cards) */
.menu-worlds {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.menu-world-row {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  min-height: auto;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: padding-left .24s cubic-bezier(.16, 1, .3, 1), border-color .24s ease;
}

.menu-world-row:hover,
.menu-world-row:focus-visible,
.menu-world-row.is-active {
  background: transparent;
  color: var(--paper);
  border-bottom-color: rgba(242, 238, 226, 0.55);
  padding-left: 10px;
}

.menu-world-row:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

.menu-row-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-row-title {
  font: 400 1.55rem/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.menu-row-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--paper-muted);
}

.menu-row-arrow {
  width: 18px;
  height: 18px;
  color: var(--paper-muted);
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), color .24s ease;
}

.menu-world-row:hover .menu-row-arrow,
.menu-world-row:focus-visible .menu-row-arrow,
.menu-world-row.is-active .menu-row-arrow {
  transform: translateX(4px);
  color: var(--sage);
}

.menu-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.menu-apk-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(242, 238, 226, 0.24);
  background: rgba(15, 24, 19, 0.34);
  color: var(--paper-muted);
  font: 600 0.82rem/1 inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.menu-apk-link[hidden] {
  display: none;
}

.menu-apk-link:hover,
.menu-apk-link:focus-visible {
  background: rgba(242, 238, 226, 0.14);
  color: var(--paper);
  border-color: rgba(242, 238, 226, 0.56);
}

.menu-ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(242, 238, 226, 0.36);
  background: rgba(15, 24, 19, 0.48);
  color: var(--paper);
  font: 600 0.84rem/1 inherit;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.menu-ar-btn:hover,
.menu-ar-btn:focus-visible {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.menu-preview-caption {
  margin: 0;
  font-size: 0.78rem;
  color: var(--paper-muted);
  opacity: 0.85;
}

@media (min-width: 760px) {
  .menu-scrim {
    background: linear-gradient(100deg,
        rgba(11, 18, 14, 0.94) 0%,
        rgba(11, 18, 14, 0.78) 38%,
        rgba(11, 18, 14, 0.28) 64%,
        rgba(11, 18, 14, 0.12) 100%);
  }

  .menu-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px 6vw;
  }

  .menu-preview-caption {
    align-self: flex-end;
    text-align: right;
  }
}

/* ══════════════════════════════════════════
   CAMERA PASSTHROUGH & A-FRAME SCENE
   ══════════════════════════════════════════ */
.ar-camera-feed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #000;
}

.ar-camera-feed[hidden] {
  display: none;
}

.ar-camera-feed[data-facing="user"] {
  transform: scaleX(-1);
}

.ar-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  transition: background .45s ease;
}

.ar-atmosphere[hidden] {
  display: none;
}

.ar-atmosphere[data-world="Pantai"] {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 226, 168, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(65, 178, 196, 0.22) 0%, transparent 58%);
}

.ar-atmosphere[data-world="Hutan"] {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(206, 238, 168, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(44, 110, 68, 0.24) 0%, transparent 60%);
}

.ar-atmosphere[data-world="Gunung"] {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(188, 219, 238, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse at 50% 100%, rgba(42, 66, 82, 0.22) 0%, transparent 60%);
}

a-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

#scene canvas {
  display: block;
  background: transparent !important;
  touch-action: none;
}

.scene-veil {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s cubic-bezier(.16, 1, .3, 1);
}

.scene-veil.is-flashing {
  opacity: 0.42;
  transition: none;
}

.scene-veil.is-shutter {
  background: #fffdf8;
  opacity: 0.88;
  transition: none;
}

.underwater-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(126, 232, 235, 0.14) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 100%, rgba(4, 34, 48, 0.42) 0%, transparent 62%);
}

body.is-underwater .underwater-overlay {
  opacity: 1;
}

.dive-btn .ui-icon {
  width: 15px;
  height: 15px;
}

body.is-underwater .dive-btn {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--sage);
}

/* ══════════════════════════════════════════
   IN-EXPERIENCE UI OVERLAY
   ══════════════════════════════════════════ */
#ui {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(16px + var(--safe-bottom));
  pointer-events: none;
}

#ui[hidden] {
  display: none;
}

#ui>* {
  pointer-events: none;
}

#ui .topbar-row>*,
#ui .control-dock,
#ui .ar-shutter-btn,
#ui .move-pad {
  pointer-events: auto;
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px 12px;
  width: 100%;
}

.topbar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px;
  flex-shrink: 0;
}

.top-mini-btn,
.text-button.top-mini-btn {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.8rem;
  background: var(--ink-surface);
  backdrop-filter: blur(8px);
}

.world-name {
  margin: 0;
  max-width: 12ch;
  font: 400 clamp(1.85rem, 6vw, 3rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.status {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--paper-muted);
  max-width: 42ch;
}

.control-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  width: 100%;
  margin: auto auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(242, 238, 226, 0.12);
  border-radius: 16px;
  background: rgba(13, 21, 17, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  max-height: min(74svh, calc(100svh - 110px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.control-dock.is-collapsed {
  display: none;
}

.control-dock>* {
  min-width: 0;
  flex-shrink: 0;
}

.controls {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.world-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  flex-shrink: 0;
}

.world-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 5px 10px 5px 5px;
  min-height: 44px;
}

.world-option img {
  width: 40px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.world-option span {
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ar-active .world-option {
  padding: 4px 10px 4px 4px;
  min-height: 40px;
}

body.ar-active .world-option img {
  width: 34px;
  height: 25px;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 37, 30, 0.72);
  color: var(--paper);
  font: 600 0.84rem/1 inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .15s ease;
}

button[aria-pressed="true"],
button.is-selected {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

button[hidden] {
  display: none;
}

.primary-button {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  font-weight: 700;
}

.text-button {
  background: rgba(24, 37, 30, 0.5);
  border-color: var(--line);
}

.icon-button {
  padding: 0 14px;
}

.ar-button {
  background: var(--sage);
  color: var(--ink);
  border: none;
  font-weight: 700;
}

.ar-button:hover {
  background: #a2d3c2;
}

.ar-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.session-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.session-actions button {
  flex: 1;
  min-height: 40px;
}

.control-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  width: 100%;
}

.control-row button {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ar-active .control-row button {
  padding: 0 10px;
  font-size: 0.8rem;
}

body.ar-active #placementHint,
body.ar-active .fine-print {
  display: none !important;
}

.volume-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 2px 0;
}

.vol-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--paper-muted);
  flex: 1;
  min-width: 135px;
}

.vol-slider {
  flex: 1;
  min-width: 65px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--line);
  border-radius: 4px;
  outline: none;
  accent-color: var(--sage);
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.vol-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  border: none;
}

.menu-back-btn {
  font-size: 0.8rem;
  min-height: 38px;
  padding: 0 13px;
  background: var(--ink-surface);
  backdrop-filter: blur(8px);
}

/* ===== PANEL EDUKASI BALITA (0–6 TAHUN) ===== */
.edu-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.edu-top-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
}

.edu-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.edu-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.album-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(143, 196, 178, 0.38);
  background: rgba(143, 196, 178, 0.14);
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.album-pill:hover {
  background: rgba(143, 196, 178, 0.24);
}

.album-pill .ui-icon {
  width: 14px;
  height: 14px;
}

.edu-tab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(242, 238, 226, 0.08);
  border: 1px solid var(--line);
  color: var(--paper-muted);
}

.edu-tab.is-active,
.edu-tab[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.star-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(245, 204, 108, 0.16);
  color: #f6d57f;
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.star-icon {
  width: 15px;
  height: 15px;
  fill: #f6d57f;
  stroke: #f6d57f;
}

.edu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(242, 238, 226, 0.06);
}

.edu-card-text {
  min-width: 0;
  flex: 1;
}

.edu-title {
  margin: 0 0 3px;
  font: 400 1.12rem/1.2 Georgia, "Times New Roman", serif;
  color: var(--paper);
}

.edu-fact {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.42;
  color: var(--paper-muted);
}

.edu-action-btn {
  min-height: 38px;
  padding: 0 13px;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.edu-action-btn:hover {
  background: #ffffff;
}

#gyroToggleBtn[aria-pressed="true"],
#diveToggleBtn[aria-pressed="true"],
body.is-underwater #diveToggleBtn {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--sage);
}

.hint {
  max-width: 44ch;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
  color: var(--paper-muted);
}

.hint[hidden] {
  display: none;
}

.fine-print {
  font-size: 0.74rem;
  color: var(--paper-muted);
  opacity: 0.8;
  margin: 2px 0 0;
  text-align: center;
}

#placementHint {
  max-width: 44ch;
  font-size: 0.8rem;
  line-height: 1.45;
}

#reticle {
  pointer-events: none;
}

.toast {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(13, 21, 17, 0.94);
  color: var(--paper);
  border: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  font-size: 0.82rem;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 150;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.visible {
  opacity: 1;
}

/* ===== Bounded exploration D-pad ===== */
.move-pad {
  position: fixed;
  right: 14px;
  top: calc(84px + env(safe-area-inset-top));
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 42px);
  gap: 4px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

body.dock-collapsed .move-pad {
  top: auto;
  bottom: calc(20px + var(--safe-bottom));
}

.move-pad[hidden],
body.is-mobile .move-pad,
body.ar-active .move-pad {
  display: none !important;
}

.move-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  background: var(--ink-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--paper);
}

.move-btn.is-active,
.move-btn:active {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--sage);
}

.move-up {
  grid-column: 2;
  grid-row: 1;
}

.move-left {
  grid-column: 1;
  grid-row: 2;
}

.move-center {
  grid-column: 2;
  grid-row: 2;
}

.move-right {
  grid-column: 3;
  grid-row: 2;
}

.move-down {
  grid-column: 2;
  grid-row: 3;
}

@media (max-width: 560px) {
  #ui {
    padding: max(10px, env(safe-area-inset-top)) 10px calc(10px + var(--safe-bottom));
  }

  .topbar-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .topbar {
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
  }

  .world-name {
    font-size: 1.75rem;
  }

  .status {
    font-size: 0.71rem;
    padding: 4px 9px;
    border-radius: 10px;
    max-width: calc(100vw - 24px);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .topbar-actions {
    flex-wrap: wrap;
    max-width: 100%;
    gap: 5px;
  }

  .top-mini-btn,
  .menu-back-btn {
    padding: 0 9px;
    min-height: 34px;
    font-size: 0.74rem;
  }

  .control-dock {
    padding: 10px 12px;
    gap: 7px;
    border-radius: 14px;
    max-height: 46svh;
    overflow-x: hidden;
  }

  .world-switch {
    gap: 5px;
    width: 100%;
  }

  .world-option {
    min-height: 36px;
    padding: 3px 6px 3px 4px;
    gap: 5px;
  }

  .world-option img {
    width: 26px;
    height: 20px;
    border-radius: 5px;
    flex-shrink: 0;
  }

  .world-option span {
    font-size: 0.75rem;
  }

  .edu-panel {
    padding: 7px 0;
    gap: 6px;
  }

  .edu-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .edu-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .edu-tab {
    min-height: 30px;
    padding: 0 4px;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .edu-badges {
    justify-content: space-between;
    gap: 5px;
    width: 100%;
  }

  .album-pill {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.71rem;
    gap: 4px;
  }

  .star-badge {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.74rem;
  }

  .edu-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .edu-title {
    font-size: 0.96rem;
  }

  .edu-fact {
    font-size: 0.73rem;
    line-height: 1.35;
  }

  .edu-action-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .control-row {
    gap: 5px;
    flex-wrap: nowrap;
    width: 100%;
  }

  .control-row button {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px;
    padding: 0 7px;
    gap: 5px;
    font-size: 0.71rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.ar-active #placementHint {
    display: none !important;
  }

  #flipCamera {
    flex: 0 0 36px;
    width: 36px;
    padding: 0;
  }

  #flipCamera .btn-label {
    display: none;
  }

  #soundToggle {
    flex: 0 0 36px;
    width: 36px;
    padding: 0;
  }

  #soundToggle #soundLabel {
    display: none;
  }

  body.ar-active.is-mobile .control-dock,
  body.ar-active.is-mobile .status,
  body.ar-active.is-mobile .top-mini-btn,
  body.ar-active.is-mobile .menu-back-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 22, 18, 0.9);
  }

  .volume-controls {
    gap: 8px;
    width: 100%;
  }

  .vol-label {
    font-size: 0.71rem;
    min-width: 0;
    flex: 1 1 45%;
    gap: 6px;
  }

  .vol-slider {
    min-width: 40px;
  }

  .fine-print {
    display: none;
  }

  .toast {
    top: auto;
    bottom: calc(var(--dock-offset, 0px) + 20px + var(--safe-bottom));
  }

  .move-pad {
    right: 10px;
    top: calc(84px + env(safe-area-inset-top));
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(3, 36px);
    gap: 3px;
  }

  .move-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
  }
}

@media (max-height: 460px) and (pointer: coarse) {
  .control-dock {
    max-height: 52svh;
    padding: 8px 10px;
    gap: 6px;
  }

  .status,
  .fine-print {
    display: none;
  }

  .ar-shutter-btn {
    right: 16px;
    bottom: calc(18px + var(--safe-bottom));
  }
}

@media (min-width: 760px) {
  #ui {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .control-dock {
    margin-left: 0;
  }

  .move-pad {
    top: auto;
    right: max(18px, 3vw);
    bottom: calc(18px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ══════════════════════════════════════════
   KAMERA JEPRET AR & BUKU SATWA
   ══════════════════════════════════════════ */
.ar-shutter-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--dock-offset, 340px) + 14px + var(--safe-bottom));
  z-index: 4;
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(242, 238, 226, 0.92);
  background: rgba(15, 24, 19, 0.78);
  color: var(--paper);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), inset 0 0 0 3px rgba(143, 196, 178, 0.25);
  transition: transform .15s ease, bottom .22s ease, background .18s ease;
}

.ar-shutter-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.ar-shutter-btn:active {
  transform: scale(0.92);
}

.ar-shutter-btn .ui-icon {
  width: 22px;
  height: 22px;
}

body.dock-collapsed .ar-shutter-btn {
  bottom: calc(22px + var(--safe-bottom));
}

@media (min-width: 760px) {
  .ar-shutter-btn {
    right: max(18px, 3vw);
    bottom: calc(22px + var(--safe-bottom));
  }

  body.is-mobile .ar-shutter-btn,
  body.dock-collapsed .ar-shutter-btn {
    bottom: calc(22px + var(--safe-bottom));
  }
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(16px + var(--safe-bottom));
  background: rgba(8, 13, 10, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-overlay[hidden] {
  display: none;
}

.sheet-card {
  width: min(100%, 480px);
  max-height: min(88svh, 680px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(242, 238, 226, 0.2);
  background: #121d17;
  color: var(--paper);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.56);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title {
  margin: 0;
  font: 400 1.45rem/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

.sheet-meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--paper-muted);
  font-variant-numeric: tabular-nums;
}

.sheet-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  flex-shrink: 0;
  background: rgba(242, 238, 226, 0.08);
}

.photo-preview-frame {
  position: relative;
  overflow: hidden;
  flex: 0 1 auto;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(242, 238, 226, 0.14);
  background: #0b120e;
  max-height: 52svh;
  display: grid;
  place-items: center;
}

#photoPreviewImg {
  display: block;
  max-width: 100%;
  max-height: 52svh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-primary {
  flex: 1 1 150px;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.sheet-secondary {
  flex: 1 1 100px;
  background: rgba(242, 238, 226, 0.08);
  color: var(--paper);
}

.album-sheet {
  max-height: min(86svh, 660px);
}

.album-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  flex-shrink: 0;
}

.album-mode-tab {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  background: rgba(242, 238, 226, 0.07);
  color: var(--paper-muted);
}

.album-mode-tab.is-active,
.album-mode-tab[aria-selected="true"] {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--sage);
}

.album-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
}

.album-pane[hidden] {
  display: none;
}

.photo-gallery-empty {
  margin: 10px 0;
  padding: 18px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(242, 238, 226, 0.22);
  background: rgba(242, 238, 226, 0.03);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--paper-muted);
  text-align: center;
}

.photo-gallery-empty[hidden] {
  display: none;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0 2px 0 0;
}

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(242, 238, 226, 0.14);
  background: rgba(242, 238, 226, 0.05);
}

.photo-thumb-btn {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 9px;
  overflow: hidden;
  background: #0b120e;
  aspect-ratio: 3 / 4;
}

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

.photo-card-caption {
  margin: 0;
  font-size: 0.74rem;
  color: var(--paper-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-actions {
  display: flex;
  gap: 6px;
}

.photo-card-btn {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  font-size: 0.74rem;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.photo-card-del {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.74rem;
  background: rgba(242, 238, 226, 0.08);
  color: var(--paper-muted);
}

.album-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(242, 238, 226, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}

.album-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), #f6d57f);
  transition: width .28s ease;
}

.album-filters {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.album-filter {
  flex: 1 1 0;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.78rem;
  background: rgba(242, 238, 226, 0.07);
  color: var(--paper-muted);
}

.album-filter.is-active,
.album-filter[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.album-list {
  list-style: none;
  margin: 0;
  padding: 0 2px 0 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.album-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(242, 238, 226, 0.14);
  background: rgba(242, 238, 226, 0.05);
}

.album-item.is-locked {
  opacity: 0.86;
  background: rgba(242, 238, 226, 0.02);
  border-style: dashed;
}

.album-item-main {
  min-width: 0;
  flex: 1;
}

.album-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.album-item-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--paper);
}

.album-world-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(143, 196, 178, 0.16);
  color: var(--sage);
}

.album-item.is-locked .album-world-tag {
  background: rgba(242, 238, 226, 0.1);
  color: var(--paper-muted);
}

.album-item-desc {
  margin: 4px 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--paper-muted);
}

.album-item-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.76rem;
  flex-shrink: 0;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.album-item.is-locked .album-item-btn {
  background: rgba(242, 238, 226, 0.1);
  color: var(--paper);
  border-color: rgba(242, 238, 226, 0.22);
}

.album-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(242, 238, 226, 0.12);
  flex-shrink: 0;
}

.album-reset-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.75rem;
  background: rgba(242, 238, 226, 0.06);
  color: var(--paper-muted);
}

.album-reset-btn.is-confirm {
  background: rgba(214, 92, 92, 0.22);
  border-color: rgba(242, 132, 132, 0.6);
  color: #ffd0d0;
}

.album-parent-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(143, 196, 178, 0.16);
  border-color: rgba(143, 196, 178, 0.42);
  color: var(--sage);
}

.album-footnote {
  font-size: 0.72rem;
  color: var(--paper-muted);
  text-align: right;
  margin-left: auto;
}

.album-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.album-feed-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(246, 213, 127, 0.16);
  border-color: rgba(246, 213, 127, 0.44);
  color: #f6d57f;
}

/* ===== HABITAT QUIZ CHOICES ===== */
.habitat-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.habitat-choices[hidden] {
  display: none;
}

.habitat-choice-btn {
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(242, 238, 226, 0.09);
  border: 1px solid rgba(242, 238, 226, 0.24);
  color: var(--paper);
  transition: transform .14s ease, background .18s ease, border-color .18s ease;
}

.habitat-choice-btn.is-right {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}

.habitat-choice-btn.is-wrong {
  background: rgba(214, 92, 92, 0.26);
  border-color: rgba(242, 132, 132, 0.65);
  color: #ffd7d7;
}

.inspector-pill {
  border-color: rgba(246, 213, 127, 0.45);
  background: rgba(246, 213, 127, 0.14);
  color: #f6d57f;
}

/* ===== 1-ON-1 ANIMAL INSPECTOR & BERI MAKAN HUD ===== */
body.inspector-active .control-dock,
body.inspector-active .move-pad,
body.inspector-active .ar-shutter-btn {
  display: none !important;
}

.inspector-overlay {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(calc(100vw - 24px), 520px);
  z-index: 26;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(242, 238, 226, 0.24);
  background: rgba(14, 23, 18, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.52);
  pointer-events: auto;
}

.inspector-overlay[hidden] {
  display: none;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.inspector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.inspector-diet-tag,
.inspector-fed-tag {
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}

.inspector-diet-tag {
  background: rgba(143, 196, 178, 0.20);
  color: var(--sage);
}

.inspector-fed-tag {
  background: rgba(246, 213, 127, 0.16);
  color: #f6d57f;
  font-variant-numeric: tabular-nums;
}

.inspector-title {
  margin: 0;
  font: 400 1.35rem/1.15 Georgia, "Times New Roman", serif;
  color: var(--paper);
}

.inspector-sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.42;
  color: var(--paper-muted);
}

.inspector-actions {
  display: flex;
  gap: 8px;
}

.inspector-feed-btn {
  flex: 1 1 auto;
  background: #f6d57f;
  border-color: #f6d57f;
  color: #142119;
  font-weight: 700;
}

/* ===== PARENTAL GATE, RAPOR DASHBOARD & SERTIFIKAT ===== */
.parent-sheet {
  max-height: min(88svh, 700px);
}

.parent-gate-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.parent-gate-pane[hidden],
.parent-dash-pane[hidden] {
  display: none;
}

.parent-gate-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--paper-muted);
}

.parent-gate-q {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(242, 238, 226, 0.06);
  border: 1px solid rgba(242, 238, 226, 0.14);
  font: 600 1.15rem/1.25 Georgia, "Times New Roman", serif;
  text-align: center;
  color: var(--paper);
}

.parent-gate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.parent-gate-opt {
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(242, 238, 226, 0.09);
  border: 1px solid rgba(242, 238, 226, 0.24);
  color: var(--paper);
}

.parent-gate-opt:hover {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}

.parent-gate-hint {
  margin: 0;
  min-height: 18px;
  font-size: 0.78rem;
  color: #ffb8b8;
  text-align: center;
}

.parent-dash-pane {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
  flex: 1 1 auto;
}

.child-name-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--paper-muted);
}

.child-name-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(242, 238, 226, 0.24);
  background: rgba(242, 238, 226, 0.07);
  color: var(--paper);
  font-size: 0.9rem;
}

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

.parent-stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(242, 238, 226, 0.14);
  background: rgba(242, 238, 226, 0.05);
}

.parent-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sage);
}

.parent-stat-lbl {
  font-size: 0.72rem;
  color: var(--paper-muted);
}

.parent-leitner-summary {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(143, 196, 178, 0.10);
  border: 1px solid rgba(143, 196, 178, 0.24);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--paper);
}

.mastery-eval-list {
  list-style: none;
  margin: 0;
  padding: 0 2px 0 0;
  display: grid;
  gap: 6px;
  max-height: 205px;
  overflow-y: auto;
}

.mastery-eval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(242, 238, 226, 0.12);
  background: rgba(242, 238, 226, 0.03);
  font-size: 0.76rem;
}

.mastery-eval-name {
  font-weight: 600;
  color: var(--paper);
}

.mastery-eval-meta {
  font-size: 0.71rem;
  font-variant-numeric: tabular-nums;
  color: var(--paper-muted);
}

.mastery-box-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mastery-box-pill.box-3 {
  background: rgba(143, 196, 178, 0.22);
  color: var(--sage);
}

.mastery-box-pill.box-2 {
  background: rgba(246, 213, 127, 0.20);
  color: #f6d57f;
}

.mastery-box-pill.box-1 {
  background: rgba(242, 238, 226, 0.12);
  color: var(--paper-muted);
}

.cert-btn {
  width: 100%;
  min-height: 44px;
  font-weight: 700;
}


/* ===== HYBRID SPATIAL AR (KARTU AR MARKER CV + WEBXR 6DoF) & TELEMETRY EXPORT ===== */
.ar-marker-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.ar-subbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}

.ar-subbar[hidden] {
  display: none !important;
}

.ar-mode-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ar-mode-pill {
  appearance: none;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(242, 238, 226, 0.22);
  background: rgba(15, 25, 20, 0.58);
  color: var(--paper-muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.ar-mode-pill.is-active {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}

.ar-tracking-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(13, 24, 18, 0.72);
  border: 1px solid rgba(143, 196, 178, 0.30);
}

.ar-tracking-hud[hidden] {
  display: none !important;
}

.ar-tracking-badge {
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--sage);
}

.ar-tracking-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ar-mini-btn {
  appearance: none;
  min-width: 30px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(242, 238, 226, 0.24);
  background: rgba(242, 238, 226, 0.08);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ar-mini-btn:hover {
  background: rgba(242, 238, 226, 0.16);
}

.ar-place-btn {
  background: rgba(246, 213, 127, 0.22);
  border-color: rgba(246, 213, 127, 0.55);
  color: #f6d57f;
}

.parent-telemetry-box {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(242, 238, 226, 0.14);
  background: rgba(242, 238, 226, 0.04);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.5;
  color: var(--paper-muted);
}

.parent-actions-stack {
  flex-direction: column;
  gap: 8px;
}

.parent-export-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.parent-export-row .sheet-secondary {
  text-align: center;
  text-decoration: none;
  font-size: 0.74rem;
  padding: 9px 6px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
