/* Ojol Jakarta: kulit HUD "HP di holder motor".
   Palet ondel-ondel (merah, kuning, hijau, krem) + tinta cokelat tua, motif tumpal (segitiga), huruf bulat ramah.
   Elemen dibuat oleh js/hud.js (HUD_HTML); kelas st- milik story/ui.js, ev- milik events/ui.js (hanya dikuliti ulang di sini). */
:root {
  --merah: #d8392b; --merah2: #a62317; --kuning: #f7c325; --kuning2: #e39a12; --hijau: #1c9a52; --hijau2: #0f6e3a;
  --krem: #fbf0d6; --krem2: #f0deb4; --putih: #fffaf0; --tinta: #2b1a10; --tinta2: #6b5544; --biru: #1f6fb5;
  --judul: "Lilita One", "Baloo 2", Rubik, "Segoe UI", sans-serif; --angka: "Baloo 2", Rubik, "Segoe UI", sans-serif;
  --tumpal: conic-gradient(from 150deg at 50% 0, var(--merah) 60deg, transparent 0) 0 0 / 14px 100% repeat-x;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a0f0a; color: #fff; font-family: Rubik, "Segoe UI", sans-serif; user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
kbd { -webkit-text-stroke: 0; display: inline-block; padding: 0 6px; margin: 0 2px; border-radius: 6px; background: var(--putih); color: var(--tinta); font: 800 0.8em/1.5 Rubik, sans-serif; border: 1.5px solid var(--tinta); box-shadow: 0 2px 0 var(--tinta); text-shadow: none; }
.hidden { opacity: 0; pointer-events: none; }
#hud { position: fixed; inset: 0; pointer-events: none; transition: opacity 0.6s; --sa: var(--judul); color: var(--tinta); }
.kartu { background: var(--krem); color: var(--tinta); border: 2.5px solid var(--tinta); border-radius: 14px; box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); }
.tumpal { height: 9px; background: var(--tumpal), var(--kuning); }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes masuk { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- kiri atas: ubin navigasi + plang jalan ---------- */
#navWrap { position: absolute; left: 16px; top: 14px; width: 268px; transform-origin: 0 0; }
#navTile { position: relative; width: 268px; height: 184px; border-radius: 18px; border: 3px solid var(--tinta); background: #f4ead2; overflow: hidden; box-shadow: 0 5px 0 rgba(43, 26, 16, 0.85); }
#navTile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--tumpal), var(--kuning); border-top: 2px solid var(--tinta); }
#radar { display: block; width: 100%; height: 100%; }
#north { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--merah); border: 2px solid var(--tinta); color: #fff; font: 800 12px/18px var(--angka); text-align: center; }
#navDist { position: absolute; right: 7px; top: 7px; padding: 0 8px; border-radius: 9px; background: var(--tinta); color: var(--krem); font: 800 13px/20px var(--angka); display: none; }
#navDist.show { display: block; }
#signPost { position: relative; margin: 9px 0 0 14px; padding-left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#signPost::before { content: ""; position: absolute; left: 0; top: -9px; bottom: -6px; width: 6px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #8d8f92, #d5d7da 45%, #77797c); border: 1px solid var(--tinta); }
#street, #district { position: relative; color: #fff; border: 2px solid #fff; outline: 2px solid var(--hijau2); border-radius: 4px; white-space: nowrap; max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
#street { padding: 1px 10px 0; background: var(--hijau2); font: 800 17px/1.35 var(--angka); letter-spacing: 0.3px; opacity: 0.86; transition: opacity 1.2s; }
#street:empty { display: none; }
#street.show { opacity: 1; transition: opacity 0.25s; }
#district { padding: 0 9px; background: var(--hijau); font: 800 12.5px/1.5 var(--angka); letter-spacing: 1.2px; text-transform: uppercase; transform-origin: 0 50%; }
#district:empty { display: none; }
#district.pop { animation: plang 5s; }
@keyframes plang { 0% { transform: scale(0.6) rotate(-8deg); } 5% { transform: scale(1.5) rotate(3deg); } 9%, 78% { transform: scale(1.38); } 100% { transform: none; } }

/* ---------- atas tengah: spanduk belok ---------- */
#turn { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: none; align-items: center; gap: 9px; padding: 4px 16px 4px 6px; border-radius: 15px; background: var(--hijau); color: #fff; border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); white-space: nowrap; font: 800 19px/1.2 var(--angka); }
#turn.show { display: flex; }
#turn.tiba { background: var(--kuning); color: var(--tinta); }
#turn.putar { background: var(--merah); }
#turnIco { width: 36px; height: 36px; border-radius: 11px; background: var(--hijau2); display: flex; align-items: center; justify-content: center; }
#turn.tiba #turnIco { background: var(--kuning2); } #turn.putar #turnIco { background: var(--merah2); }
#turnIco svg { width: 28px; height: 28px; }
#turnDist { font: 400 25px/1 var(--judul); letter-spacing: 0.5px; }

/* ---------- kanan atas: notifikasi (toast + obrolan) ---------- */
#heads { position: absolute; right: 16px; top: 14px; width: 310px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; transform-origin: 100% 0; }
#toast { max-width: 100%; padding: 8px 13px 9px 13px; border-radius: 14px; background: var(--kuning); color: var(--tinta); border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); font-size: 14px; line-height: 1.32; display: none; }
#toast.show { display: block; animation: masuk 0.35s; }
#toast b { font: 800 12px var(--angka); letter-spacing: 1px; text-transform: uppercase; color: var(--merah2); }
#toast small { color: #5d4630; }

/* ---------- kiri bawah: dasbor ---------- */
#dash { position: absolute; left: 16px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transform-origin: 0 100%; }
#modes { display: flex; gap: 3px; padding: 4px 6px; border-radius: 13px; background: var(--krem); border: 2.5px solid var(--tinta); box-shadow: 0 3px 0 rgba(43, 26, 16, 0.85); }
#modes i { width: 31px; height: 27px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #b9a481; }
#modes i svg { width: 23px; height: 23px; }
#modes i.on { background: var(--merah); color: #fff; box-shadow: 0 0 0 1.5px var(--tinta); }
#modes i.extra { display: none; } #modes i.extra.on { display: flex; }
#dashRow { display: flex; align-items: flex-end; gap: 9px; }
#speed { min-width: 104px; padding: 2px 13px 3px; border-radius: 16px; background: var(--krem); border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); font: 800 12px/1.1 var(--angka); color: var(--tinta2); text-align: center; }
#speed b { display: block; font: 400 42px/0.95 var(--judul); color: var(--tinta); }
#gauges { display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; }
.gauge { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 11px; background: var(--krem); border: 2.5px solid var(--tinta); box-shadow: 0 3px 0 rgba(43, 26, 16, 0.85); }
.gauge svg { width: 20px; height: 20px; flex: none; }
.bar { width: 92px; height: 11px; border-radius: 6px; background: #d9c59c; border: 1.5px solid var(--tinta); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; transition: width 0.25s; background: var(--hijau); }
#bFuel.low i { background: var(--merah); animation: blink 0.6s infinite; }
#bFood { --tilt: 0deg; --isi: var(--hijau); }
#bFood svg { width: 30px; height: 30px; margin: -5px -2px; transform: rotate(var(--tilt)); transform-origin: 50% 85%; transition: transform 0.3s; }
#bFood.goyang svg { animation: goyang 0.5s infinite; }
@keyframes goyang { 0%, 100% { transform: rotate(calc(var(--tilt) - 5deg)); } 50% { transform: rotate(calc(var(--tilt) + 5deg)); } }
#bFood b { font: 800 15px/1 var(--angka); min-width: 42px; }
#bFood small { font: 600 10.5px/1 Rubik, sans-serif; color: var(--tinta2); display: block; letter-spacing: 0.5px; }

/* ---------- kanan bawah: HP di holder ---------- */
#phoneFrame { position: absolute; right: 22px; bottom: 0; width: 268px; padding-bottom: 20px; transform-origin: 100% 100%; }
#phoneFrame::before, #phoneFrame::after { content: ""; position: absolute; top: 34%; width: 15px; height: 62px; border-radius: 6px; background: linear-gradient(90deg, #4b382b, #241711); border: 1.5px solid #120a06; }
#phoneFrame::before { left: -8px; } #phoneFrame::after { right: -8px; }
.ph-stem { position: absolute; left: 50%; bottom: 0; width: 46px; height: 26px; transform: translateX(-50%); background: linear-gradient(90deg, #241711, #5a4434 50%, #241711); border: 1.5px solid #120a06; border-bottom: 0; border-radius: 4px 4px 0 0; }
.ph-stem::before { content: ""; position: absolute; left: -22px; right: -22px; top: -5px; height: 10px; border-radius: 5px; background: #33241a; border: 1.5px solid #120a06; }
#phScreen { position: relative; z-index: 1; display: flex; flex-direction: column; background: var(--krem); border: 7px solid #1d120b; border-radius: 30px; overflow: hidden; box-shadow: 0 0 0 2px #6a5443, 0 10px 26px rgba(0, 0, 0, 0.5); }
#phBar { display: flex; justify-content: space-between; align-items: center; padding: 3px 14px 2px; background: var(--hijau2); color: #eafff0; font: 800 12.5px/1.3 var(--angka); }
#phBar .sig { display: flex; align-items: flex-end; gap: 2px; font-size: 10px; }
#phBar .sig i { width: 3px; background: #eafff0; border-radius: 1px; } #phBar .sig i:nth-child(1) { height: 4px; } #phBar .sig i:nth-child(2) { height: 7px; } #phBar .sig i:nth-child(3) { height: 10px; }
#phApp { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; padding: 4px 13px 7px; background: var(--hijau); color: #fff; }
#money { font: 800 21px/1.05 var(--angka); white-space: nowrap; }
#money small { display: block; font: 600 10.5px/1.2 Rubik, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.85; }
#stars { text-align: right; font: 800 15px/1.05 var(--angka); white-space: nowrap; }
#stars small { display: block; font-size: 12px; letter-spacing: 1px; color: rgba(255, 255, 255, 0.35); } #stars small b { color: var(--kuning); font-weight: 400; }
#phApp + .tumpal { flex: none; height: 8px; }
#phone { position: relative; flex: 1; font-size: 13.5px; background: radial-gradient(circle at 20% 10%, rgba(28, 154, 82, 0.08), transparent 55%), var(--krem); }
.st-pm { position: relative; margin-top: 7px; padding: 15px 13px 9px; background: var(--putih); border-top: 2.5px solid var(--tinta); border-radius: 20px 20px 0 0; }
.st-pm::before { content: ""; position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #cdb78c; }
.st-pm:has(.ph-h.new) { animation: sheetUp 0.4s; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0.3; } to { transform: none; opacity: 1; } }
.ph-h { font: 800 11.5px var(--angka); letter-spacing: 1.5px; color: var(--hijau2); margin-bottom: 4px; text-transform: uppercase; }
.ph-h.new { color: #fff; background: var(--merah); display: inline-block; padding: 1px 9px; border-radius: 7px; animation: blink 0.8s 3; }
.ph-h.bad { color: #fff; background: var(--tinta); display: inline-block; padding: 1px 9px; border-radius: 7px; }
.ph-t { font: 800 17px/1.18 var(--angka); margin-bottom: 5px; }
.ph-r { display: flex; align-items: flex-start; gap: 7px; margin: 3px 0; line-height: 1.22; }
.dot { width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; flex: none; border: 1.5px solid var(--tinta); } .dot.o { background: var(--kuning2); } .dot.g { background: var(--hijau); } .dot.b { background: var(--biru); } .dot.r { background: var(--merah); }
.ph-p { font: 400 27px/1 var(--judul); color: var(--tinta); margin: 7px 0 5px; } .ph-p small { font: 600 12.5px Rubik, sans-serif; color: var(--tinta2); } .ph-p.late { color: var(--merah); }
.ph-k { color: var(--tinta2); font-size: 12.5px; line-height: 1.7; } .ph-s { font-weight: 800; } .ph-m { color: var(--tinta2); margin-top: 3px; font-size: 12.5px; }
.ph-a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 4px; font-size: 12px; color: var(--tinta2); }
.ph-a b { color: var(--tinta); } .ph-a .baru { padding: 0 6px; border-radius: 6px; border: 1.5px dashed #b9a481; color: var(--tinta2); font-weight: 600; }
.ph-a .baru.awas { border: 1.5px solid var(--merah2); background: var(--merah); color: #fff; font-weight: 800; animation: blink 0.9s 4; }
.ph-w { margin: 4px 0; padding: 3px 8px; border-radius: 8px; background: #ffe2a8; border: 1.5px solid var(--kuning2); font: 600 12px/1.3 Rubik, sans-serif; }
.ph-w b { color: var(--merah2); }
.ph-n { margin: 3px 0; padding: 4px 8px; border-radius: 3px 10px 10px 10px; background: var(--krem2); font-size: 12.5px; line-height: 1.3; font-style: italic; }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; } @keyframes dots { 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- pesan, spanduk besar, petunjuk tombol ---------- */
#msg { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); max-width: min(620px, 46vw); padding: 7px 18px 8px; border-radius: 16px; background: rgba(43, 26, 16, 0.92); color: var(--krem); border: 2px solid var(--krem2); text-align: center; font: 600 18px/1.32 Rubik, sans-serif; opacity: 0; transition: opacity 0.3s; }
#msg.show { opacity: 1; } #msg .y { color: var(--kuning); font-weight: 800; } #msg .g { color: #6fe39a; font-weight: 800; } #msg .r { color: #ff8b78; font-weight: 800; }
#big { position: absolute; left: 0; right: 0; top: 24%; display: flex; justify-content: center; opacity: 0; pointer-events: none; }
#big.show { animation: bigIn 5.5s forwards; }
@keyframes bigIn { 0% { opacity: 0; transform: translateY(-40px) rotate(-3deg); } 6% { opacity: 1; transform: translateY(6px) rotate(1deg); } 10%, 84% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-20px); } }
.spanduk { position: relative; max-width: min(760px, 88vw); padding: 17px 34px 15px; text-align: center; color: var(--tinta); border: 3px solid var(--tinta); border-radius: 5px; box-shadow: 0 7px 0 rgba(43, 26, 16, 0.6);
  background: var(--tumpal), linear-gradient(0deg, var(--kuning), var(--kuning)) 0 0 / 100% 9px no-repeat, repeating-linear-gradient(92deg, rgba(120, 90, 40, 0.07) 0 3px, transparent 3px 46px), #fffdf2; background-size: 14px 9px, 100% 9px, auto, auto; }
.spanduk::before, .spanduk::after { content: ""; position: absolute; top: -34px; width: 3px; height: 34px; background: #e9dcc0; box-shadow: 0 0 0 1px rgba(43, 26, 16, 0.6); }
.spanduk::before { left: 16px; transform: rotate(-14deg); transform-origin: bottom; } .spanduk::after { right: 16px; transform: rotate(14deg); transform-origin: bottom; }
.spanduk h1 { margin: 0; font: 400 56px/1.02 var(--judul); letter-spacing: 1.5px; -webkit-text-stroke: 7px var(--tinta); paint-order: stroke fill; text-shadow: 0 4px 0 var(--tinta); }
.spanduk h1 .w0 { color: var(--merah); } .spanduk h1 .w1 { color: var(--hijau); } .spanduk h1 .w2 { color: var(--kuning); } .spanduk h1 .w3 { color: #3fa9e6; }
.spanduk p { margin: 8px 0 0; font: 800 19px/1.38 var(--angka); } .spanduk p:empty { display: none; }
.spanduk p b { color: var(--merah2); }
#keys { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 2px 12px; border-radius: 10px; background: rgba(43, 26, 16, 0.55); font-size: 11.5px; color: rgba(255, 244, 220, 0.85); white-space: nowrap; }

/* ---------- kulit ulang elemen lapisan kejadian (kelas ev- dari events/ui.js; hanya tampilan) ---------- */
#hud .ev-wanted { margin-top: 56px; padding: 5px 14px 6px; border-radius: 16px; background: var(--krem); border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); gap: 4px; }
#hud .ev-w-row { gap: 6px; }
#hud .ev-w-lab { font-size: 0; margin-right: 6px; -webkit-text-stroke: 0; }
#hud .ev-w-lab::after { content: "DICARI"; font: 400 19px/1 var(--judul); letter-spacing: 1px; color: var(--merah); }
#hud .ev-wanted:has(.ev-w-bar.g) .ev-w-lab::after { content: "KEHILANGAN JEJAK"; color: var(--hijau2); }
#hud .ev-wanted:has(.ev-w-l[style*="none"]) .ev-w-lab::after { content: "AWAS BEGAL"; color: var(--merah2); }
#hud .ev-w-l { width: 34px; height: 26px; border: 0; border-radius: 0; box-shadow: none; background: #cdb78c; animation: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath fill-rule='evenodd' d='M1 8h20a8.5 8.5 0 1 1-8.2 10.8L1 14z M17.5 16.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0z'/%3E%3Cpath d='M6 8V4h7v4' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3Cpath d='M29 3l3-2M30.5 7h3' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath fill-rule='evenodd' d='M1 8h20a8.5 8.5 0 1 1-8.2 10.8L1 14z M17.5 16.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0z'/%3E%3Cpath d='M6 8V4h7v4' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3Cpath d='M29 3l3-2M30.5 7h3' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
#hud .ev-w-l.a { background: var(--merah); animation: prit 0.45s infinite; }
#hud .ev-w-l.a.b { background: var(--kuning2); animation-delay: 0.2s; }
#hud .ev-wanted:has(.ev-w-bar.g) .ev-w-l.a { background: var(--hijau); animation-duration: 1.2s; }
@keyframes prit { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg) scale(1.12); } }
#hud .ev-w-bar { width: 210px; height: 10px; border: 1.5px solid var(--tinta); border-radius: 6px; background: #d9c59c; overflow: hidden; }
#hud .ev-w-bar b { background: var(--merah); } #hud .ev-w-bar.g b { background: var(--hijau); }
#hud .ev-w-txt { font: 800 12.5px Rubik, sans-serif; color: var(--tinta); text-shadow: none; }
#hud .ev-say { left: 16px; top: 46%; max-width: 330px; padding: 8px 13px 9px; border-radius: 4px 16px 16px 16px; background: var(--krem); color: var(--tinta); border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 rgba(43, 26, 16, 0.85); font: 600 15px/1.34 Rubik, sans-serif; }
#hud .ev-say .who { font: 800 11px var(--angka); color: var(--merah2); }
#hud .ev-say.pol .who { color: var(--biru); } #hud .ev-say.bad .who { color: var(--merah); } #hud .ev-say.good .who { color: var(--hijau2); }
#hud .ev-dialog { z-index: 4; padding: 0 20px 15px; border-radius: 18px; background: var(--krem); color: var(--tinta); border: 3px solid var(--tinta); box-shadow: 0 6px 0 rgba(43, 26, 16, 0.85), 0 16px 40px rgba(0, 0, 0, 0.4); overflow: hidden; }
#hud .ev-dialog::before { content: ""; display: block; height: 9px; margin: 0 -20px 11px; background: var(--tumpal), var(--kuning); border-bottom: 2px solid var(--tinta); }
#hud .ev-d-t { font: 400 26px/1.1 var(--judul); color: var(--merah); -webkit-text-stroke: 0; letter-spacing: 0.5px; }
#hud .ev-d-b { color: var(--tinta); font-size: 15.5px; }
#hud .ev-d-o div { background: var(--putih); border: 2px solid var(--tinta); border-radius: 11px; box-shadow: 0 2px 0 var(--tinta); }
#hud .ev-d-c { background: var(--merah); height: 5px; border-radius: 3px; }
#hud .ev-hint { bottom: 132px; padding: 4px 13px; border-radius: 12px; background: var(--kuning); color: var(--tinta); border: 2px solid var(--tinta); font: 800 14px Rubik, sans-serif; }

/* ---------- lapisan: peta besar, bantuan ---------- */
#mapOverlay, #help { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; background: rgba(34, 18, 9, 0.8); z-index: 5; }
#mapOverlay.show, #help.show { display: flex; }
#bigmap { max-height: 88vh; max-width: 94vw; border: 4px solid var(--tinta); border-radius: 18px; box-shadow: 0 0 0 5px var(--krem), 0 12px 40px #000; }
#mapOverlay p { margin: 12px 0 0; padding: 3px 14px; border-radius: 11px; background: var(--krem); color: var(--tinta); font-size: 13.5px; }
#mapOverlay .uj-leg { max-width: 94vw; text-align: center; line-height: 1.9; } /* legenda peta besar (agen "ujimain") */
#mapOverlay .uj-leg i { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin: 0 3px 0 9px; border: 1.5px solid var(--tinta); border-radius: 50%; color: #fff; font: 800 11px/1 Rubik, sans-serif; font-style: normal; vertical-align: -3px; }
#mapOverlay .uj-leg small { opacity: 0.8; }
#bigmap { touch-action: none; cursor: grab; }
.card { width: min(680px, 94vw); max-height: 94vh; overflow: auto; padding: 0 26px 16px; border-radius: 20px; background: var(--krem); color: var(--tinta); border: 3px solid var(--tinta); box-shadow: 0 7px 0 rgba(43, 26, 16, 0.85); line-height: 1.45; font-size: 14.5px; }
.card::before { content: ""; display: block; height: 10px; margin: 0 -26px 10px; background: var(--tumpal), var(--kuning); border-bottom: 2px solid var(--tinta); }
.card h2 { margin: 0 0 6px; font: 400 30px var(--judul); color: var(--merah); letter-spacing: 0.5px; }
.card table { width: 100%; border-collapse: collapse; margin-bottom: 8px; } .card td { padding: 3px 6px; border-bottom: 1.5px dashed #d9c59c; } .card td:first-child { white-space: nowrap; width: 40%; }
.card p { margin: 7px 0; } .card a { color: var(--merah2); font-weight: 800; } .dim { color: var(--tinta2); font-size: 13.5px; }

/* ---------- layar judul ---------- */
#title { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 5vh; transition: opacity 0.8s; }
#title.hidden { opacity: 0; pointer-events: none; }
#title .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 26, 16, 0.5) 0%, rgba(43, 26, 16, 0) 36%, rgba(43, 26, 16, 0) 56%, rgba(43, 26, 16, 0.86) 100%); }
.logo { position: absolute; top: 7vh; left: 50%; transform: translateX(-50%) rotate(-2deg); display: flex; flex-direction: column; align-items: center; padding: 20px 44px 14px; border: 4px solid var(--tinta); border-radius: 6px; box-shadow: 0 9px 0 rgba(43, 26, 16, 0.6); white-space: nowrap;
  background: var(--tumpal), linear-gradient(0deg, var(--kuning), var(--kuning)) 0 0 / 100% 12px no-repeat, repeating-linear-gradient(92deg, rgba(120, 90, 40, 0.07) 0 3px, transparent 3px 52px), #fffdf2; background-size: 18px 12px, 100% 12px, auto, auto; }
.logo::before, .logo::after { content: ""; position: absolute; top: -9vh; width: 4px; height: 9vh; background: #e9dcc0; box-shadow: 0 0 0 1px rgba(43, 26, 16, 0.6); }
.logo::before { left: 22px; } .logo::after { right: 22px; }
.logo .l1 { align-self: flex-start; margin: 0 0 -0.2em 0.1em; font: 400 clamp(30px, 4.6vw, 62px)/1 var(--judul); color: var(--kuning); -webkit-text-stroke: 7px var(--tinta); paint-order: stroke fill; transform: rotate(-5deg); z-index: 1; }
.logo .l2 { font: 400 clamp(52px, 9.6vw, 132px)/0.95 var(--judul); letter-spacing: 3px; -webkit-text-stroke: 10px var(--tinta); paint-order: stroke fill; text-shadow: 0 7px 0 var(--tinta); }
.logo .l2 i { font-style: normal; } .logo .l2 i:nth-child(4n+1) { color: var(--merah); } .logo .l2 i:nth-child(4n+2) { color: var(--hijau); } .logo .l2 i:nth-child(4n+3) { color: var(--kuning); } .logo .l2 i:nth-child(4n) { color: #3fa9e6; }
.logo .l3 { margin-top: 8px; font: 800 clamp(12px, 1.5vw, 19px) var(--angka); letter-spacing: 2.5px; text-transform: uppercase; color: var(--tinta); }
.start { position: relative; padding: 8px 26px 9px; border-radius: 18px; background: var(--kuning); color: var(--tinta); border: 3px solid var(--tinta); box-shadow: 0 6px 0 var(--tinta); font: 400 25px var(--judul); letter-spacing: 0.5px; animation: pulse 1.6s infinite; cursor: pointer; pointer-events: auto; }
.start kbd { font-size: 0.66em; vertical-align: 3px; }
@keyframes pulse { 50% { transform: translateY(3px); box-shadow: 0 3px 0 var(--tinta); } }
.tips { position: relative; margin-top: 16px; font-size: 14px; color: var(--krem); text-shadow: 0 1px 4px #000; text-align: center; padding: 0 12px; }
.foot { position: relative; margin-top: 7px; font-size: 12px; color: rgba(255, 244, 220, 0.6); text-align: center; padding: 0 12px; }

#loading { position: fixed; inset: 0; z-index: 9; background: var(--tinta); display: flex; align-items: center; justify-content: center; transition: opacity 0.6s; }
#loading.hidden { opacity: 0; pointer-events: none; }
#loading div { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#loading b { font: 400 44px var(--judul); color: var(--kuning); letter-spacing: 2px; }
#loading span { color: var(--krem2); }
#loading i { width: 238px; height: 12px; border-radius: 3px; background: var(--tumpal), var(--kuning); background-size: 14px 100%, auto; animation: load 0.7s linear infinite; }
@keyframes load { from { background-position: 0 0, 0 0; } to { background-position: 14px 0, 0 0; } }

/* ---------- layar kecil ---------- */
@media (max-height: 800px) { #phoneFrame { zoom: 0.92; } }
@media (max-width: 1100px) { #msg { max-width: 40vw; font-size: 16px; } #heads { width: 270px; } }
@media (max-width: 900px), (max-height: 560px) {
  #keys { display: none; }
  #navWrap { zoom: 0.62; left: 12px; top: 12px; } #phoneFrame { zoom: 0.62; right: 14px; } #heads { zoom: 0.78; width: 250px; right: 10px; top: 8px; }
  #dash { zoom: 0.68; left: 12px; bottom: 12px; } #turn { zoom: 0.72; top: 10px; } #big { zoom: 0.6; top: 22%; }
  #msg { font-size: 14px; max-width: 78vw; padding: 5px 12px; }
  #hud .ev-wanted { zoom: 0.8; } #hud .ev-say { zoom: 0.8; top: 40%; } #hud .ev-dialog { zoom: 0.82; top: 16%; }
  #heads .st-chat .st-b:not(:last-child) { display: none; } /* layar kecil: satu kartu obrolan saja */
  .card { font-size: 12.5px; padding: 0 16px 10px; } .card::before { margin: 0 -16px 8px; } .card h2 { font-size: 23px; } .start { font-size: 19px; } .tips { font-size: 12px; }
}
/* HP tegak (sekitar 400 px): ubin peta kiri atas, HP pesanan kanan atas, dasbor di kiri tengah; bawah layar kosong untuk tombol sentuh */
@media (max-width: 560px) and (orientation: portrait) {
  #phoneFrame { top: 8px; bottom: auto; right: 8px; padding-bottom: 0; transform-origin: 100% 0; } .ph-stem, #phoneFrame::before, #phoneFrame::after { display: none; }
  #turn { top: 236px; left: 11px; transform: none; } #hud .ev-wanted { margin-top: 252px; left: 10px; transform: none; align-items: flex-start; }
  #heads { top: 272px; left: 10px; right: auto; align-items: flex-start; width: 250px; } #hud .ev-say { top: 49%; left: 10px; max-width: 290px; }
  #dash { bottom: auto; top: 59%; } #msg { bottom: 19%; } #big { top: 30%; zoom: 0.5; }
  .logo { padding: 14px 20px 10px; } .start { font-size: 17px; }
}
/* HP rebah (sekitar 800 x 400): HP pesanan di kanan atas, notifikasi di sebelah peta, dasbor di bawah peta */
@media (max-height: 560px) and (orientation: landscape) {
  #phoneFrame { top: 6px; bottom: auto; padding-bottom: 0; zoom: 0.56; transform-origin: 100% 0; } .ph-stem, #phoneFrame::before, #phoneFrame::after { display: none; }
  #heads { right: auto; left: 244px; top: 60px; align-items: flex-start; width: 196px; } #dash { bottom: auto; top: 290px; zoom: 0.6; } #hud .ev-say { left: 238px; top: 54%; max-width: 300px; }
  #msg { bottom: 12px; max-width: 52vw; } .logo { top: 4vh; padding: 10px 28px 8px; } .logo .l2 { font-size: 15vh; } .logo .l1 { font-size: 8vh; } #title { padding-bottom: 3vh; }
}

/* v13 judul: layar pembuka, tombol mode di layar judul, panel Kontrol / pilih arena / Disclaimer (js/judul), menu jeda di judul */
#splash { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; align-items: center; justify-content: center; animation: spOut 2.5s ease forwards; touch-action: none; }
@keyframes spOut { 0%, 76% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
#splash.skip { animation: spSkip 0.35s ease forwards; pointer-events: none; }
@keyframes spSkip { to { opacity: 0; visibility: hidden; } }
#splash .sp-in { text-align: center; color: #f3e7c9; padding: 0 16px; }
#splash .sp-name { font: 400 clamp(32px, 8vw, 66px)/1.1 Georgia, "Times New Roman", serif; letter-spacing: 0.1em; opacity: 0; animation: spName 2.5s ease forwards; }
@keyframes spName { 0%, 8% { opacity: 0; transform: translateY(10px); } 36%, 100% { opacity: 1; transform: none; } }
#splash .sp-line { display: block; height: 1px; width: min(260px, 60vw); margin: 16px auto 14px; background: linear-gradient(90deg, transparent, #d4af6a, transparent); transform: scaleX(0); animation: spLine 2.5s ease forwards; }
@keyframes spLine { 0%, 22% { transform: scaleX(0); } 52%, 100% { transform: scaleX(1); } }
#splash .sp-sub { font: italic 400 clamp(14px, 3.4vw, 20px)/1 Georgia, "Times New Roman", serif; letter-spacing: 0.32em; color: #cbb88f; opacity: 0; animation: spSub 2.5s ease forwards; }
@keyframes spSub { 0%, 34% { opacity: 0; } 58%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #splash .sp-name { animation-name: spSub; } #splash .sp-line { animation: none; transform: none; } }

#title { padding-bottom: max(4vh, calc(env(safe-area-inset-bottom) + 12px)); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
#title .net-btns, #title > .pk-tbtn { display: none !important; } /* tombol lama net/puncak: isinya dipindah ke .jd-menu, latihan Puncak = tombol "Balap Puncak" */
#title .jd-menu { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 660px); padding: 0 16px; }
#title .jd-main { display: flex; justify-content: center; width: 100%; }
#title .jd-main .jd-start { width: min(100%, 420px); text-align: center; font-size: 27px; padding: 9px 22px 10px; }
#title .jd-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
#title .jd-util { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
#title .jd-menu .jd-modes .jd-b, #title .jd-menu .jd-util .jd-b { position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; margin: 0; padding: 6px 12px; border-radius: 14px; border: 3px solid var(--tinta); background: var(--putih); color: var(--tinta); box-shadow: 0 4px 0 var(--tinta); font: 400 19px/1.1 var(--judul); text-align: left; cursor: pointer; animation: none; pointer-events: auto; letter-spacing: 0.3px; }
#title .jd-menu .jd-util .jd-b { min-height: 42px; padding: 5px 14px; font: 700 15px/1.1 Rubik, sans-serif; background: #f2ead8; box-shadow: 0 3px 0 var(--tinta); }
#title .jd-menu .jd-b[hidden] { display: none; }
#title .jd-menu .jd-b:hover, #title .jd-menu .jd-b:focus-visible, #title .jd-menu .jd-start:focus-visible { background: #ffe9a8; outline: 3px solid #fff; outline-offset: 2px; }
#title .jd-menu .jd-b:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tinta); }
#title .jd-b .jd-i { font-size: 22px; line-height: 1; flex: none; }
#title .jd-b .jd-t small, #title .jd-b small { display: block; font: 600 11.5px/1.25 Rubik, sans-serif; color: var(--tinta2); letter-spacing: 0; }
#title .jd-menu #netMpBtn { justify-content: flex-start; flex-wrap: wrap; column-gap: 6px; }
#title .jd-menu #netMpBtn small { display: inline; font-size: 13px; }
#title .jd-menu #netMpBtn kbd, #title .jd-menu .jd-start kbd { font-size: 0.6em; vertical-align: 3px; }
#title .foot { margin-top: 10px; font-size: 13px; color: rgba(255, 244, 220, 0.8); }
#title .foot b { color: var(--krem); } #title .foot a { color: var(--kuning); font-weight: 700; text-decoration: underline; cursor: pointer; pointer-events: auto; }
#title.hidden .jd-menu, #title.hidden .jd-menu button, #title.hidden .jd-menu .jd-b, #title.hidden .jd-menu .jd-modes .jd-b, #title.hidden .jd-menu .jd-util .jd-b, #title.hidden .foot a { pointer-events: none; } /* v13 integrasi: tombol judul tak tertangkap lagi saat main (spesifisitas .jd-b mengalahkan aturan lama) */
html.jd-title #help { z-index: 7; } /* Pengaturan dari layar judul tampil di atas #title (z 6) */
@media (min-width: 1000px) and (min-height: 600px) { #title .jd-menu { width: min(100%, 980px); } #title .jd-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px), (max-height: 560px) { #title .tips { display: none; } }
@media (max-width: 560px) and (orientation: portrait) {
  #title .jd-menu { gap: 8px; padding: 0 12px; }
  #title .jd-main .jd-start { font-size: 22px; }
  #title .jd-menu .jd-modes .jd-b { font-size: 16px; min-height: 50px; padding: 5px 9px; gap: 6px; }
  #title .jd-b .jd-i { font-size: 18px; }
  #title .jd-b .jd-t small { font-size: 10.5px; }
  #title .jd-util { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #title .jd-menu .jd-util .jd-b { justify-content: center; font-size: 14px; }
  #title .foot { font-size: 12px; margin-top: 6px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  #title .jd-menu { width: min(100%, 900px); gap: 6px; }
  #title .jd-main .jd-start { font-size: 20px; padding: 5px 18px 6px; }
  #title .jd-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  #title .jd-menu .jd-modes .jd-b { min-height: 42px; font-size: 15px; padding: 4px 8px; }
  #title .jd-b .jd-t small { display: none; }
  #title .jd-menu .jd-util .jd-b { min-height: 34px; font-size: 13px; padding: 3px 12px; }
  #title .foot { margin-top: 5px; font-size: 11.5px; }
}
#jdLayer .jd-ov { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(34, 18, 9, 0.82); opacity: 0; transition: opacity 0.18s;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
#jdLayer .jd-ov.on { opacity: 1; }
#jdLayer .jd-card { width: min(740px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--krem); color: var(--tinta); border: 3px solid var(--tinta); border-radius: 18px; box-shadow: 0 7px 0 rgba(43, 26, 16, 0.85); overflow: hidden; font-size: 14.5px; line-height: 1.42; }
#jdLayer .jd-card::before { content: ""; display: block; flex: none; height: 10px; background: var(--tumpal), var(--kuning); border-bottom: 2px solid var(--tinta); }
#jdLayer .jd-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 6px; flex: none; }
#jdLayer .jd-hd h2 { margin: 0; font: 400 28px/1.1 var(--judul); color: var(--merah); letter-spacing: 0.5px; }
#jdLayer button { font: 700 15px/1.15 Rubik, sans-serif; min-height: 42px; padding: 8px 14px; border-radius: 12px; border: 2.5px solid var(--tinta); background: #fff; color: var(--tinta); cursor: pointer; box-shadow: 0 3px 0 rgba(43, 26, 16, 0.8); }
#jdLayer button:hover, #jdLayer button:focus-visible { background: var(--kuning); outline: 3px solid #f7c325; outline-offset: 2px; }
#jdLayer .jd-x { flex: none; }
#jdLayer .jd-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 0 16px 12px; }
#jdLayer .jd-ft { flex: none; padding: 5px 16px 8px; font-size: 12px; color: var(--tinta2); border-top: 1.5px dashed #d9c59c; }
#jdLayer .jd-ktabs { display: flex; gap: 8px; padding: 0 0 4px; position: sticky; top: 0; background: var(--krem); z-index: 1; }
#jdLayer .jd-ktabs button.on { background: var(--hijau); color: #fff; }
#jdLayer .jd-kpane[hidden] { display: none; }
#jdLayer .jd-kg h3 { margin: 12px 0 2px; font: 400 19px/1.2 var(--judul); color: var(--hijau2); letter-spacing: 0.3px; }
#jdLayer .jd-kr { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; gap: 10px; padding: 5px 0; border-bottom: 1.5px dashed #d9c59c; }
#jdLayer .jd-kk { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
#jdLayer .jd-kk kbd { margin: 0; }
#jdLayer .jd-tx { font-weight: 700; font-size: 12.5px; color: var(--tinta2); }
#jdLayer .jd-or { color: var(--tinta2); padding: 0 1px; }
#jdLayer .jd-kd kbd { font-size: 0.78em; }
#jdLayer .jd-p { margin: 0 16px 10px; }
#jdLayer .jd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 16px; }
#jdLayer .jd-grid button { min-height: 54px; font: 400 18px/1.1 var(--judul); }
#jdLayer .jd-disc ul { margin: 6px 0; padding-left: 20px; } #jdLayer .jd-disc li { margin: 6px 0; } #jdLayer .jd-sm { font-size: 12.5px; color: var(--tinta2); }
html.jd-ovon .tc-b, html.jd-ovon #tcZone { visibility: hidden; } /* panel terbuka saat main di HP: papan nyetir tidak menutupi */
@media (max-width: 560px) {
  #jdLayer .jd-card { font-size: 13.5px; }
  #jdLayer .jd-hd h2 { font-size: 23px; }
  #jdLayer .jd-kr { grid-template-columns: 1fr; gap: 2px; padding: 6px 0; }
  #jdLayer .jd-x { min-height: 38px; padding: 6px 10px; font-size: 13.5px; }
}
/* akhir v13 judul */
