/* style.css — gaya kustom di luar utilitas Tailwind (tetap offline) */
html {
  scroll-behavior: auto; /* smooth terprogram via JS (satu sumber easing) */
  scrollbar-width: none; /* Firefox: hilangkan scrollbar bawaan */
}
::-webkit-scrollbar { display: none; } /* Chrome/Edge/Safari: hilangkan scrollbar */
body { overscroll-behavior-y: none; }

#ocean-bg {
  position: fixed; inset: 0; z-index: -2;
  contain: strict;
  background: linear-gradient(to bottom, #7dd3fc 0%, #0369a1 100%);
}
/* Langit dermaga: menutup laut saat di atas garis air, memudar saat masuk laut */
#sky-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, #7dd3fc 0%, #bae6fd 45%, #fef3c7 70%, #38bdf8 100%);
  opacity: 1;
}
/* ===== Scene dermaga (ilustrasi custom seirama kapal selam) ===== */
#dermaga .sun {
  position: absolute; top: 9%; right: 12%; width: 92px; height: 92px; border-radius: 9999px;
  background: radial-gradient(circle at 35% 35%, #fef9c3, #facc15 65%, #f59e0b);
  box-shadow: 0 0 60px 18px rgba(250,204,21,.55);
}
#dermaga .cloud {
  position: absolute; background: #fff; border-radius: 9999px; opacity: .92;
  animation: cloud-drift 26s linear infinite;
}
#dermaga .cloud::before, #dermaga .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 9999px;
}
#dermaga .cloud.c1 { top: 13%; left: 6%; width: 120px; height: 34px; }
#dermaga .cloud.c1::before { width: 52px; height: 52px; top: -24px; left: 18px; }
#dermaga .cloud.c1::after { width: 36px; height: 36px; top: -15px; left: 62px; }
#dermaga .cloud.c2 { top: 22%; left: 55%; width: 90px; height: 26px; animation-duration: 34s; opacity: .8; }
#dermaga .cloud.c2::before { width: 40px; height: 40px; top: -18px; left: 14px; }
#dermaga .cloud.c2::after { width: 28px; height: 28px; top: -11px; left: 48px; }
#dermaga .cloud.c3 { top: 8%; left: 32%; width: 70px; height: 22px; animation-duration: 42s; opacity: .7; }
#dermaga .cloud.c3::before { width: 32px; height: 32px; top: -14px; left: 12px; }
#dermaga .cloud.c3::after { width: 22px; height: 22px; top: -9px; left: 38px; }
#dermaga .gull { position: absolute; width: 44px; animation: gull-glide 9s ease-in-out infinite; }
#dermaga .gull.g1 { top: 18%; left: 20%; }
#dermaga .gull.g2 { top: 24%; left: 30%; width: 32px; animation-delay: -3s; }
#dermaga .gull.g3 { top: 15%; left: 68%; width: 36px; animation-delay: -6s; }
#dermaga .sea-horizon {
  position: absolute; left: 0; right: 0; bottom: 24%;
  height: 22%;
  background: linear-gradient(to bottom, #38bdf8 0%, #0284c7 60%, #0369a1 100%);
}
#dermaga .sand {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9%;
  background: linear-gradient(to bottom, #fde68a, #f59e0b);
}
#dermaga .pier { position: absolute; left: 0; bottom: 20%; width: 46%; height: 90px; }
#dermaga .pier-deck {
  position: absolute; top: 0; left: 0; right: 0; height: 26px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, #92400e 0 26px, #78350f 26px 30px);
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
}
#dermaga .pier-post { position: absolute; top: 22px; width: 16px; height: 68px; background: #57370f; border-radius: 3px; }
#dermaga .pier-post.p1 { left: 8%; } #dermaga .pier-post.p2 { left: 48%; } #dermaga .pier-post.p3 { left: 88%; }
#dermaga .pier-sign {
  position: absolute; top: -46px; left: 6%;
  background: #78350f; color: #fef3c7; font-weight: 800; font-size: 12px; letter-spacing: .18em;
  padding: 6px 12px; border-radius: 6px; border: 2px solid #451a03;
  transform: rotate(-2deg);
}
#dermaga .dock-sub { position: absolute; right: 6%; bottom: 21%; width: min(300px, 42vw); animation: dock-bob 4.5s ease-in-out infinite; }
#dermaga .dock-sub .rope { position: absolute; left: -38%; top: -8px; width: 45%; }
#dermaga .shore-waves {
  position: absolute; left: 0; right: 0; bottom: 8%; height: 26px;
  background: radial-gradient(circle at 20px -6px, transparent 22px, rgba(255,255,255,.85) 23px, rgba(255,255,255,.85) 26px, transparent 27px);
  background-size: 56px 26px; background-repeat: repeat-x;
  animation: shore-slide 5s linear infinite;
}
@keyframes cloud-drift { from { transform: translateX(-12vw); } to { transform: translateX(112vw); } }
@keyframes gull-glide { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(46px,-18px); } }
@keyframes dock-bob { 0%, 100% { transform: translateY(-5px) rotate(-1deg); } 50% { transform: translateY(6px) rotate(1.2deg); } }
@keyframes shore-slide { from { background-position-x: 0; } to { background-position-x: 56px; } }
#vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
}
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; bottom: -20px; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.5);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.6), transparent 60%);
  animation: float-bubble linear infinite;
}
.marine-snow {
  position: absolute; border-radius: 9999px; background: rgba(255,255,255,.7);
  animation: float-bubble linear infinite;
}

/* Kapal selam: outer (#submarine) untuk drag+tilt, inner (#sub-visual) untuk bob */
#submarine { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transform: rotate(var(--sub-tilt, 0deg)); transition: transform .25s ease; }
#submarine:active { cursor: grabbing; }
#submarine:hover #sub-visual { filter: brightness(1.15) drop-shadow(0 0 12px rgba(250,204,21,.8)); }
#sub-visual { animation: sub-bob var(--bob-dur, 4s) ease-in-out infinite; }
#sub-track { touch-action: none; user-select: none; -webkit-user-select: none; }
#sub-thumb { transition: none; will-change: transform; }
#sub-tip {
  transition: opacity .15s ease;
  max-width: 12rem;
}

.creature { transition: transform .2s ease; will-change: transform;
  content-visibility: auto; contain-intrinsic-size: auto 220px; }
.creature:hover, .creature:focus-visible { transform: scale(1.06); z-index: 30;
  filter: brightness(1.2) drop-shadow(0 0 14px rgba(125,211,252,.9)); }
.creature .glow-dot { animation: glow-pulse 2.2s ease-in-out infinite; }
.creature .flip { display: inline-block; transform: scaleX(-1); }
/* chip ringkas: lebih ramping */
.chip { contain-intrinsic-size: auto 140px; }
/* kartu di luar viewport: animasi mati total (diatur IntersectionObserver) */
.creature .offscreen, .creature .offscreen * { animation-play-state: paused !important; }
.depth-tick { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }

.zone-label { opacity: .25; transition: opacity .6s ease, transform .6s ease; }
.zone-label.active { opacity: 1; transform: scale(1.02); }

#tooltip {
  transition: opacity .15s ease;
  max-width: min(22rem, 80vw);
}
/* Kursor kapal selam: panah asli disembunyikan hanya saat mode aktif */
html.has-custom-cursor, html.has-custom-cursor * { cursor: none !important; }
#cursor-sub {
  position: fixed; left: 0; top: 0; z-index: 9990; pointer-events: none;
  width: 52px; opacity: 0; transition: opacity .25s ease;
  will-change: transform;
}
#cursor-sub.on { opacity: 1; }
#cursor-sub svg { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); will-change: transform; }
#cursor-sub.hot svg { filter: brightness(1.2) drop-shadow(0 0 12px rgba(250,204,21,.9)); }
#cursor-sub.dive svg { filter: brightness(1.3) drop-shadow(0 0 14px rgba(103,232,249,.9)); }
#cursor-bubbles { position: fixed; inset: 0; z-index: 9989; pointer-events: none; overflow: hidden; }
.cursor-bubble {
  position: absolute; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.55);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), transparent 60%);
  animation: cursor-bubble-rise .8s ease-out forwards;
}
@keyframes cursor-bubble-rise {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .9; }
  to { transform: translate3d(-10px, -46px, 0) scale(1.35); opacity: 0; }
}

/* Ikon Twemoji lokal: menskala mengikuti font-size induk (1em) */
.tw { width: 1em; height: 1em; vertical-align: -0.12em; display: inline-block; }
.tw-btn { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
.tw-h { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.tw-xl { width: 1em; height: 1em; vertical-align: -0.12em; margin: 0 .06em; }

dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }

@media (prefers-reduced-motion: reduce) {
  .creature-anim, #sub-visual, .bubble, .marine-snow, .cursor-bubble,
  #dermaga .cloud, #dermaga .gull, #dermaga .dock-sub, #dermaga .shore-waves { animation: none !important; }
  html { scroll-behavior: auto; }
}
