/* Halaman uji /testhome/ (21 Okt 2026 malam, Angga): peta kapal gaya clay. Semua kelas baru berawalan th-.
   Dasar: aset/clay.css (token warna, kartu, klay, alis) -- terang bawaan, gelap lewat tombol tema (data-theme="dark"). */
.th-hal {
  --th-laut-1: color-mix(in srgb, var(--pilih) 42%, var(--surface));
  --th-laut-2: color-mix(in srgb, var(--pilih) 22%, var(--isian));
  /* 31 Okt 2026 (Angga, Tahap C stylized realistic): darat gradasi pasir -> hijau muda (#th-darat-isi), pita laut dangkal
     1 = terluar (ungu-biru, menyatu ke laut) .. 3 = dekat pantai (tosca pucat) -- urutan sama dengan l1..pantai peta 3D */
  --th-darat: #f3ead6; --th-darat-2: #dfe9c9; --th-darat-garis: #d9c7ad; --th-bayang: rgba(83, 60, 101, .22);
  --th-laut-dangkal-1: #dcd9f8; --th-laut-dangkal-2: #cde2f5; --th-laut-dangkal-3: #c6eee6;
  --th-sandar: #8f84a3; --th-siap: #e7b400; --th-berlayar: #7d5fd0; --th-pulang: #2f9e6e; --th-rawat: #4285f4;
}
:root[data-theme="dark"] .th-hal {
  --th-laut-1: #2a2140; --th-laut-2: #1f1930; --th-darat: #3b3150; --th-darat-2: #34404a; --th-darat-garis: #54476b; --th-bayang: rgba(0, 0, 0, .45);
  --th-laut-dangkal-1: #2c2850; --th-laut-dangkal-2: #2c3a5d; --th-laut-dangkal-3: #2f4d5f;
  --th-sandar: #a99fbb; --th-berlayar: #b49cff; --th-pulang: #5fd3a0;
}
.th-pahlawan .lead { max-width: 720px; }
.th-pil-baris { margin-top: 10px; }
.th-alis { margin: 0; }
.th-kartu { padding: 12px; }
/* 21 Okt malam (#7): animasi masuk .kartu (clay.css clayNaik, fill both) membuat Chrome menjadikan kartu "containing block" untuk
   elemen fixed -> lembar detail kapal HP menempel ke kartu, bukan ke bawah layar (kapal tertutup). Isi akhir animasi = tanpa transform,
   jadi cukup tanpa fill sesudahnya. */
.th-hal .th-kartu { animation-fill-mode: backwards; }
.th-kepala { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.th-kepala h2 { margin: 0; }

/* tab peta */
.th-tab { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--isian); box-shadow: var(--cekung); max-width: 100%; overflow-x: auto; }
.th-tab button { border: 0; background: transparent; color: var(--muted); font-weight: 800; border-radius: 12px; min-height: 38px; padding: 0 12px;
                 cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.th-tab button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--bayang-kecil); }
.th-tab button small { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--open-bg); color: var(--open-t); }

/* tombol mode 2D | 3D (21 Okt malam, Angga #1) -- bentuk sama dengan tab peta */
.th-mode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--isian); box-shadow: var(--cekung); flex: none; }
.th-mode button { border: 0; background: transparent; color: var(--muted); font: 800 13px/1 Manrope, sans-serif; letter-spacing: .02em; border-radius: 12px;
                  min-height: 38px; min-width: 48px; padding: 0 12px; cursor: pointer; }
.th-mode button[aria-pressed="true"] { background: var(--tombol); color: var(--tombol-t); box-shadow: var(--bayang-kecil); }
.th-mode button:focus-visible { outline: 3px solid var(--pilih); outline-offset: 1px; }

/* legenda status */
.th-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.th-legenda li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--isian); }
.th-legenda b { color: var(--ink); }
.th-titik { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--th-c, var(--th-sandar)); }
.th-hal [data-s="sandar"] { --th-c: var(--th-sandar); } .th-hal [data-s="siap"] { --th-c: var(--th-siap); } .th-hal [data-s="berlayar"] { --th-c: var(--th-berlayar); }
.th-hal [data-s="pulang"] { --th-c: var(--th-pulang); } .th-hal [data-s="rawat"] { --th-c: var(--th-rawat); }

/* peta */
/* overflow: clip = kotak tidak bisa tergulir oleh fokus / klik penanda di luar tampilan (hidden masih bisa digulir skrip) */
.th-peta { position: relative; height: 440px; border-radius: 20px; overflow: hidden; overflow: clip; touch-action: none; user-select: none; -webkit-user-select: none;
           background: radial-gradient(120% 90% at 30% 20%, var(--th-laut-1), var(--th-laut-2)); box-shadow: var(--cekung); cursor: grab; outline: none; }
.th-peta:focus-visible { box-shadow: var(--cekung), 0 0 0 3px var(--pilih); }
.th-peta.th-seret { cursor: grabbing; }
.th-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.th-darat { fill: url(#th-darat-isi); stroke: var(--th-darat-garis); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.th-darat-isi-1 { stop-color: var(--th-darat); } .th-darat-isi-2 { stop-color: var(--th-darat-2); }
/* pita laut dangkal (Tahap C): tiga <use> dari #th-pita-path (path tanpa kelas di <defs> -> salinannya mewarisi gaya <use>).
   Lebar dalam satuan peta (ikut zoom, tanpa vector-effect). Separuh garis jatuh di bawah daratan -> pita terlihat 14 / 7 / 3 satuan. */
.th-pita { fill: none; stroke-linejoin: round; pointer-events: none; }
.th-pita-1 { stroke: var(--th-laut-dangkal-1); stroke-width: 28px; }
.th-pita-2 { stroke: var(--th-laut-dangkal-2); stroke-width: 14px; }
.th-pita-3 { stroke: var(--th-laut-dangkal-3); stroke-width: 6px; }
.th-bayang { fill: var(--th-bayang); }
.th-jejak { fill: none; stroke: var(--th-c, var(--th-berlayar)); stroke-width: 2.5; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; opacity: .9; }
.th-lapis { position: absolute; inset: 0; pointer-events: none; }
/* label: letaknya dihitung skrip (testhome.js aturLabel) supaya tidak tertutup penanda kapal / gugus / label lain (#3a) */
.th-label { position: absolute; left: 0; top: 0; font-size: 12px; font-weight: 700; line-height: 1.25; color: #5d5370; white-space: nowrap;
            text-shadow: 0 1px 0 var(--surface), 0 0 4px var(--surface), 0 0 2px var(--surface); pointer-events: none; transition: opacity .15s; }
.th-label.th-pelabuhan { color: var(--ink); font-weight: 800; }
.th-label.th-besar { font-size: 13px; letter-spacing: .02em; text-transform: uppercase; opacity: .75; }
.th-label.th-sembunyi { opacity: 0; }
/* titik pelabuhan: kotak kecil tepat di koordinatnya; labelnya boleh bergeser */
.th-titik-pel { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 2px; background: var(--brand);
                box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
/* mode gelap: label terang + bayangan tegas (#3d -- dulu --muted kecil di atas laut gelap) */
:root[data-theme="dark"] .th-label { color: #e4dcf3; text-shadow: 0 1px 0 #120e19, 0 0 4px #120e19, 0 0 2px #120e19; }
:root[data-theme="dark"] .th-label.th-pelabuhan { color: #fff; }
:root[data-theme="dark"] .th-label.th-besar { opacity: .85; }
:root[data-theme="dark"] .th-titik-pel { box-shadow: 0 0 0 2px #120e19; }

/* penanda kapal */
.th-kapal { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
            background: var(--surface); box-shadow: var(--bayang-kecil), 0 0 0 3px var(--th-c); pointer-events: auto; display: grid; place-items: center;
            color: var(--th-c); will-change: translate; }
.th-kapal svg { width: 20px; height: 20px; transform-origin: 50% 80%; animation: th-ayun 2.8s ease-in-out infinite; }
.th-kapal.th-barat svg { scale: -1 1; }
.th-kapal.th-pilih { box-shadow: var(--bayang-kecil), 0 0 0 3px var(--th-c), 0 0 0 9px color-mix(in srgb, var(--th-c) 30%, transparent); z-index: 3; }
.th-kapal[data-s="sandar"] svg, .th-kapal[data-s="rawat"] svg { animation-duration: 4.5s; }
.th-gugus { position: absolute; left: 0; top: 0; min-width: 40px; height: 40px; margin: -20px 0 0 -20px; padding: 0 10px; border: 0; border-radius: 20px; cursor: pointer;
            pointer-events: auto; background: var(--tombol); color: var(--tombol-t); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center;
            justify-content: center; gap: 4px; box-shadow: var(--bayang-kecil), 0 0 0 3px color-mix(in srgb, var(--pilih) 60%, transparent); will-change: translate; }
.th-gugus svg { width: 16px; height: 16px; }
@keyframes th-ayun { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-2px) rotate(4deg); } }
/* 22 Okt 2026 (Angga): efek sentuh supaya orang sadar kapal & lencana gugus bisa diketuk -- cincin berdenyut keluar, ditekan = mengecil
   sebentar + riak di titik ketuk (testhome.js / testhome3d.js riak). Posisi dari JS WAJIB lewat properti `translate`, bukan `transform`:
   `scale` dikalikan sesudah `translate` tapi sebelum `transform`, jadi posisi di `transform` ikut terskala dan tombol lompat menjauh dari
   kursor saat hover/ditekan -> klik jatuh ke peta (bug lencana gugus tidak bisa diklik, laporan Angga 31 Okt 2026). */
.th-kapal::after, .th-gugus::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; opacity: 0;
                                     border: 2px solid var(--th-c, var(--pilih)); animation: th-denyut 2.6s ease-out infinite; }
.th-gugus::after { border-color: color-mix(in srgb, var(--pilih) 85%, transparent); }
.th-kapal:nth-child(3n+1)::after { animation-delay: -.9s; } .th-kapal:nth-child(3n+2)::after { animation-delay: -1.7s; }
@keyframes th-denyut { 0% { transform: scale(1); opacity: .75; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.th-kapal, .th-gugus { transition: scale .12s ease; -webkit-tap-highlight-color: transparent; }
.th-kapal:active, .th-gugus:active { scale: .86; }
@media (hover: hover) { .th-kapal:hover, .th-gugus:hover { scale: 1.08; } }
.th-riak { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 3px solid var(--pilih); pointer-events: none;
           animation: th-riak .55s ease-out forwards; z-index: 4; }
@keyframes th-riak { from { transform: scale(.3); opacity: .95; } to { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .th-kapal svg, .th-kapal::after, .th-gugus::after { animation: none; } .th-riak { display: none; } }

.th-zoom { position: absolute; left: 10px; top: 10px; display: grid; gap: 6px; z-index: 7; }
.th-zoom .klay { min-height: 38px; width: 38px; padding: 0; font-size: 20px; border-radius: 12px; }
.th-atribusi { position: absolute; right: 8px; bottom: 6px; z-index: 4; font-size: 10.5px; padding: 2px 7px; border-radius: 8px;
               background: color-mix(in srgb, var(--surface) 80%, transparent); }
.th-atribusi a { color: var(--muted); text-decoration: none; font-weight: 700; }
.th-memuat { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; z-index: 2; pointer-events: none; }

/* panel kapal / gugus (#3b): di luar kotak peta (.th-bingkai). Desktop = panel samping kanan di atas peta; HP = lembar bawah */
.th-bingkai { position: relative; }
.th-popup { position: absolute; z-index: 6; overflow: auto; overscroll-behavior: contain; background: var(--surface); box-shadow: var(--bayang);
            cursor: auto; user-select: text; -webkit-user-select: text; }
.th-pop-atas { display: flex; gap: 10px; align-items: flex-start; }
.th-pop-foto { width: 54px; height: 54px; flex: none; border-radius: 16px; background: var(--isian); box-shadow: var(--cekung); display: grid; place-items: center; }
.th-pop-foto img { width: 46px; height: auto; }
.th-pop-judul { min-width: 0; flex: 1; }
.th-pop-judul b { display: block; font-family: Manrope, sans-serif; font-size: 16px; font-weight: 800; line-height: 1.2; }
.th-pop-judul small { color: var(--muted); font-weight: 700; }
.th-tutup { flex: none; min-height: 34px; width: 34px; padding: 0; border-radius: 12px; }
.th-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 9px; white-space: nowrap;
             background: color-mix(in srgb, var(--th-c) 18%, var(--surface)); color: var(--ink); }
.th-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--th-c); }
.th-pop-isi { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.th-pop-isi li { display: flex; gap: 8px; justify-content: space-between; }
.th-pop-isi li > span:first-child { color: var(--muted); flex: none; }
.th-pop-isi li > b { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.th-tanda { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.th-tanda span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--isian); color: var(--muted); }
.th-tanda .th-draf { background: var(--share-bg); color: var(--share-t); }
.th-pop-aksi { display: flex; gap: 8px; margin-top: 10px; }
.th-pop-aksi .klay { flex: 1; min-height: 40px; font-size: 13px; }
.th-gugus-daftar { display: grid; gap: 6px; margin-top: 8px; }

/* daftar kapal */
.th-daftar { display: grid; gap: 8px; grid-template-columns: 1fr; }
.th-baris { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; cursor: pointer; padding: 10px 12px; border-radius: 16px;
            background: var(--isian); color: var(--ink); min-width: 0; }
.th-baris:hover, .th-baris.th-pilih { background: color-mix(in srgb, var(--th-c) 14%, var(--isian)); }
.th-baris .th-titik { width: 12px; height: 12px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-c) 25%, transparent); }
.th-baris-isi { min-width: 0; flex: 1; }
.th-baris-isi b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-baris-isi small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-catatan { margin: 8px 2px 0; }

@media (max-width: 639px) {  /* HP: lembar bawah (gaya .lembar clay), peta tetap terlihat di atasnya */
  .th-popup { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: min(58vh, 480px); border-radius: 26px 26px 0 0;
              box-shadow: 0 -18px 44px rgba(40, 28, 56, .22); padding: 8px 14px calc(14px + env(safe-area-inset-bottom)); animation: th-naik .28s cubic-bezier(.2, 1.1, .3, 1); }
  .th-popup::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--garis); margin: 0 auto 10px; }
}
@media (min-width: 640px) {
  .th-popup { top: 10px; right: 10px; width: 340px; max-height: calc(100% - 20px); border-radius: 20px; padding: 14px; animation: th-geser-masuk .22s ease-out; }
  .th-daftar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes th-naik { from { transform: translateY(100%); } to { transform: none; } }

/* Daftar kapal di HP (Angga 21 Okt malam #7): tombol -> lembar bawah meluncur naik / turun (transisi, bukan animasi sekali jalan,
   supaya menutup juga halus). Desktop: tombol, latar, dan lembar tidak pernah tampil; kartu daftar tetap. */
.th-bawah, .th-latar, .th-lembar { display: none; }
@media (max-width: 700px) {
  .th-kartu-daftar { display: none; }
  /* 22 Okt 2026 (Angga): Daftar kapal + Ketersediaan (teks saja) sebaris di bawah; wadahnya yang menempel & menghilang saat lembar terbuka */
  .th-bawah { display: flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
              transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100vw - 20px); transition: opacity .2s, transform .2s; }
  /* 22 Okt 2026 (Angga "ga center"): tanpa width max-content, kotak fixed left:50% menyusut ke setengah layar -> tombol meluber ke kanan */
  .th-tombol-daftar { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
                      background: var(--tombol); color: var(--tombol-t); font: 800 14px/1 Manrope, sans-serif; box-shadow: var(--bayang), 0 6px 18px rgba(40, 28, 56, .25); }
  .th-tombol-papan { display: inline-flex; align-items: center; flex: none; min-height: 48px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
                     background: var(--surface); color: var(--ink); font: 800 14px/1 Manrope, sans-serif; text-decoration: none;
                     box-shadow: var(--bayang), 0 6px 18px rgba(40, 28, 56, .18); }
  .th-tombol-papan:focus-visible { outline: 3px solid var(--pilih); outline-offset: 2px; }
  .th-ke-papan-atas { display: none; }
  .th-tombol-daftar svg { width: 18px; height: 18px; }
  .th-tombol-daftar small { min-width: 22px; padding: 3px 7px; border-radius: 99px; background: color-mix(in srgb, var(--tombol-t) 22%, transparent); font-size: 12px; text-align: center; }
  .th-tombol-daftar:focus-visible { outline: 3px solid var(--pilih); outline-offset: 2px; }
  body.th-detail-buka .th-bawah, body.th-lembar-buka .th-bawah { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
  .th-latar { display: block; position: fixed; inset: 0; z-index: 42; background: rgba(20, 14, 30, .42); opacity: 0; transition: opacity .32s ease; }
  .th-latar[hidden] { display: none; }
  body.th-lembar-buka .th-latar { opacity: 1; }
  .th-lembar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 43; max-height: min(72vh, 600px); overflow: auto; overscroll-behavior: contain;
               background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -18px 44px rgba(40, 28, 56, .22);
               padding: 8px 14px calc(14px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .9, .3, 1); }
  .th-lembar[hidden] { display: none; }
  .th-lembar::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--garis); margin: 0 auto 10px; }
  body.th-lembar-buka .th-lembar { transform: translateY(0); }
  .th-lembar.th-tarik { transition: none; }
  .th-lembar-kepala { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; position: sticky; top: -8px; background: var(--surface); padding-top: 2px; z-index: 1; }
  .th-lembar-kepala h2 { margin: 0; font-size: 18px; flex: 1; }
  .th-hal .wadah { padding-bottom: 88px; }  /* ruang untuk tombol Daftar kapal */
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .th-lembar, .th-latar, .th-bawah { transition: none; } }
@media (max-width: 359px) { .th-tombol-daftar, .th-tombol-papan { padding: 0 13px; } .th-bawah { gap: 6px; } }  /* 320: dua tombol tetap sebaris */
@keyframes th-geser-masuk { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .th-popup { animation: none; } }

/* mode 3D (#2): kanvas three.js + lapis label / lencana sendiri; SVG & penanda 2D disembunyikan */
.th-peta.th-3d .th-svg, .th-peta.th-3d .th-lapis { display: none; }
.th-peta.th-3d { background: var(--isian); }
.th-kanvas3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.th-lapis3d { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.th-lapis3d .th-label { padding: 1px 7px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 78%, transparent); text-shadow: none; color: var(--ink); }
.th-lapis3d .th-label.th-pelabuhan { background: var(--surface); box-shadow: var(--bayang-kecil); }
.th-lapis3d .th-gugus { margin: 0; transform-origin: 50% 100%; }
.th-nama3d { position: absolute; left: 0; top: 0; padding: 3px 10px; border-radius: 10px; background: var(--tombol); color: var(--tombol-t); font-weight: 800;
             font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: var(--bayang-kecil); }
.th-nama3d small { display: block; font-size: 11px; font-weight: 700; opacity: .85; text-align: center; }  /* "12 / 16 tamu" (21 Okt malam) */
.th-pesan { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8; max-width: calc(100% - 120px); padding: 8px 14px; border-radius: 14px;
            background: var(--surface); box-shadow: var(--bayang); font-size: 13px; font-weight: 700; text-align: center; }
@media (max-width: 639px) { .th-pesan { max-width: calc(100% - 70px); left: auto; right: 10px; transform: none; } }
@media (min-width: 1024px) {
  .th-peta { height: 580px; }
  .th-kartu { padding: 16px 18px; }
  .th-daftar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- 22 Okt 2026 (Angga): tombol suara di kepala halaman */
.th-suara { width: 46px; padding: 0; }
.th-suara .th-suara-senyap, .th-suara[data-suara="senyap"] .th-suara-nyala { display: none; }
.th-suara[data-suara="senyap"] .th-suara-senyap { display: block; }
.th-suara[data-suara="senyap"] { color: var(--muted); }
@media (max-width: 389px) { header.atas .klay.th-suara { width: 40px; } }

/* ---------------------------------------------------------------- 22 Okt 2026 (Angga): layar penuh peta ("kaya mode youtube")
   .th-penuh = kartu peta saat layar penuh: Fullscreen API (desktop, Android) atau cadangan iPhone (fixed menutup layar, 100dvh).
   Isi: kepala (tab, 2D/3D, legenda, tombol ×) di atas, peta mengisi sisanya; panel kapal tetap di dalam kartu. */
.th-penuh-tombol .th-penuh-kecil, .th-penuh .th-penuh-tombol .th-penuh-masuk { display: none; }
.th-penuh .th-penuh-tombol .th-penuh-kecil { display: block; }
.th-penuh-keluar { flex: none; min-height: 40px; width: 40px; padding: 0; border-radius: 12px; font-size: 24px; line-height: 1; margin-left: auto; }
.th-hal .th-kartu.th-penuh { position: fixed; inset: 0; z-index: 70; margin: 0; width: auto; max-width: none; height: 100vh; height: 100dvh; border-radius: 0;
                             display: flex; flex-direction: column; background: var(--bg); box-shadow: none; animation: none; overflow: hidden;
                             padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
.th-hal .th-kartu.th-penuh:fullscreen { width: 100%; height: 100%; }
.th-kartu.th-penuh::backdrop { background: var(--bg); }
.th-penuh .th-kepala { flex: none; flex-wrap: nowrap; margin-bottom: 8px; }
.th-penuh .th-tab { min-width: 0; }
.th-penuh .th-legenda { min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.th-penuh .th-bingkai { flex: 1; min-height: 0; }
.th-penuh .th-peta { height: 100%; }
.th-penuh .th-catatan { display: none; }
body.th-penuh-buka { overflow: hidden; }
/* layar pendek (HP miring) / sempit: legenda disembunyikan supaya peta dapat tinggi maksimal; tab + 2D/3D + × tetap */
@media (max-height: 560px), (max-width: 760px) { .th-penuh .th-legenda { display: none; } }
@media (max-height: 560px) {
  .th-penuh .th-kepala { margin-bottom: 6px; }
  .th-penuh .th-tab button, .th-penuh .th-mode button { min-height: 34px; }
}
