* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8ec5ff; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #fff;
  -webkit-user-select: none; user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
#dunia { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.k-muat { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: radial-gradient(600px 400px at 50% 40%, #3b3bb5, #14152b); transition: opacity .5s; }
.k-muat img { width: 72px; height: 72px; border-radius: 18px; animation: k-angguk 1.4s ease-in-out infinite; }
.k-muat b { font-size: 18px; }
.k-muat span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #fde047; }
.k-muat.hilang { opacity: 0; pointer-events: none; }
@keyframes k-angguk { 50% { transform: translateY(-8px) rotate(-4deg); } }

.k-atas { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 10; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.k-atas > *, .k-alat > * { pointer-events: auto; }
/* deretan tombol bilah atas: di laptop menyatu dengan bilah (display: contents), di HP jadi satu bilah sendiri */
.k-alat { display: contents; }
/* tinggi bilah atas diukur kota.js (--atasB = tepi bawahnya), elemen kiri atas diletakkan di bawahnya supaya tidak tertutup */
:root { --atasB: 58px; }
.k-saya, .k-koin, .k-tbl { background: rgba(20, 21, 43, .78); backdrop-filter: blur(8px); border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.k-saya { display: grid; min-width: 0; max-width: 46vw; cursor: pointer; }
.k-saya b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-saya small { font-size: 11.5px; color: #fde047; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-koin { margin-left: auto; display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; justify-items: end; font-size: 15px; }
.k-koin i { grid-row: span 2; font-style: normal; font-size: 20px; line-height: 1; }
.k-koin b { line-height: 1.15; }
.k-koin small { font-size: 10px; color: #a5b4fc; line-height: 1.1; white-space: nowrap; }
.k-koin.naik { animation: k-pop .5s; }
/* kartu nama perlu diketuk (sambungkan komentar / jadi warga / masuk): tampil sebagai ajakan */
.k-saya.perlu { background: linear-gradient(135deg, rgba(113, 63, 18, .92), rgba(20, 21, 43, .85)); box-shadow: inset 0 0 0 1.5px #facc15, 0 6px 18px rgba(0, 0, 0, .18); }
@keyframes k-pop { 40% { transform: scale(1.15); } }
.k-tbl { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; }
.k-badge { position: fixed; z-index: 10; top: calc(var(--atasB) + 8px); left: 10px; font-size: 10px; font-weight: 800; letter-spacing: .15em;
  background: #fde047; color: #1f1a00; padding: 3px 8px; border-radius: 6px; }
.k-jam { position: fixed; z-index: 10; top: calc(var(--atasB) + 32px); left: 10px; font-size: 11px; font-weight: 800;
  background: rgba(20, 21, 43, .78); color: #fff; padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(8px); }
.k-jam:empty { display: none; }
/* stamina, kenyang, segar */
.k-badan { position: fixed; z-index: 10; top: calc(var(--atasB) + 56px); left: 10px; display: grid; gap: 3px;
  background: rgba(20, 21, 43, .78); padding: 5px 8px; border-radius: 8px; backdrop-filter: blur(8px); }
.k-badan span { display: flex; align-items: center; gap: 5px; }
.k-badan i { font-style: normal; font-size: 11px; width: 14px; text-align: center; }
.k-badan b { display: block; width: 74px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.k-badan u { display: block; height: 100%; border-radius: 3px; background: #facc15; transition: width .3s; }
.k-badan span:nth-child(2) u { background: #fb923c; }
.k-badan span:nth-child(3) u { background: #38bdf8; }
.k-badan span.rendah u { background: #ef4444; animation: k-misi-denyut 1s ease-in-out infinite; }
.k-badan.semangat span:first-child u { background: #a3e635; box-shadow: 0 0 6px #a3e635; }
.k-badan.lemas { box-shadow: 0 0 0 2px #ef4444; }
body.sinema .k-badan, body.tenis .k-badan, body.rekam .k-badan { display: none; }
/* tugas aktif (kerjaan / kejadian) */
.k-tugas { position: fixed; z-index: 11; top: calc(max(10px, env(safe-area-inset-top)) + 62px); left: 50%; transform: translateX(-50%); max-width: min(560px, 92vw);
  display: flex; align-items: center; gap: 8px; background: rgba(20, 21, 43, .86); color: #fff; padding: 7px 8px 7px 12px; border-radius: 14px;
  font-size: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); backdrop-filter: blur(8px); border: 2px solid #facc15; }
.k-tugas[hidden] { display: none; }
.k-tugas b { color: #fde047; }
.k-tugas i { font-style: normal; display: inline-block; font-size: 18px; color: #facc15; transition: transform .15s linear; }
.k-tugas i[hidden] { display: none; }
.k-tugas button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 9px; width: 28px; height: 28px; cursor: pointer; font: inherit; flex: none; }
body.tenis .k-tugas, body.sinema .k-tugas { display: none; }
@media (max-width: 520px) { .k-tugas { font-size: 11.5px; top: calc(var(--atasB) + 114px); } }
body.sinema .k-jam, body.tenis .k-jam, body.rekam .k-jam { display: none; }
.k-lokasi { position: fixed; z-index: 10; top: 22%; left: 50%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; text-align: center;
  font-size: clamp(20px, 5vw, 30px); font-weight: 900; text-shadow: 0 3px 12px rgba(0, 0, 0, .45); transition: opacity .4s, transform .4s; white-space: nowrap; }
.k-lokasi small { display: block; font-size: 13px; font-weight: 700; color: #fde047; }
.k-lokasi.tampil { opacity: 1; transform: translate(-50%, 0); }

.k-joy { position: fixed; z-index: 10; left: max(18px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: var(--joy, 130px); height: var(--joy, 130px); border-radius: 50%; touch-action: none;
  background: rgba(20, 21, 43, .35); border: 2px solid rgba(255, 255, 255, .45); display: none; }
.k-joy-knob { position: absolute; left: 50%; top: 50%; width: calc(var(--joy, 130px) * .43); height: calc(var(--joy, 130px) * .43); margin: calc(var(--joy, 130px) * -.215); border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
body.sentuh .k-joy { display: block; }
body.sentuh .k-bantu { display: none; }
.k-aksi { position: fixed; z-index: 11; right: max(18px, env(safe-area-inset-right)); bottom: max(34px, env(safe-area-inset-bottom)); border: 0; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 16px; padding: 16px 22px; border-radius: 18px; color: #1f1a00; max-width: min(60vw, calc(100vw - var(--joy, 130px) - 60px)); line-height: 1.25; text-wrap: balance;
  background: linear-gradient(135deg, #fde047, #facc15); box-shadow: 0 10px 26px rgba(250, 204, 21, .45); animation: k-denyut 1.6s ease-in-out infinite; }
.k-aksi.kunci { background: linear-gradient(135deg, #fdba74, #fb923c); }
/* berdenyut lewat cahaya, bukan membesar: tombol tidak pernah melebar menutupi analog */
@keyframes k-denyut { 50% { box-shadow: 0 0 0 6px rgba(250, 204, 21, .35), 0 10px 26px rgba(250, 204, 21, .45); } }
@media (max-width: 520px) { .k-aksi { font-size: 14.5px; padding: 12px 16px; border-radius: 16px; } }
.k-bantu { position: fixed; z-index: 10; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; font-size: 12.5px; background: rgba(20, 21, 43, .6); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

.k-panel { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(10, 10, 25, .45); padding: 16px; }
.k-panel[hidden] { display: none; }
/* kotak pop up + tombol ✕ tutup yang selalu terlihat di pojok kanan atas (tidak ikut tergulir) */
.k-panel-kotak { position: relative; width: min(420px, 100%); display: grid; animation: k-naik .25s ease-out; }
.k-panel-x { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(15, 23, 42, .08); color: #334155; font-size: 17px; font-weight: 900; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.k-panel-x:hover, .k-panel-x:active { background: rgba(15, 23, 42, .18); }
.k-panel-in > h3:first-child, .k-panel-in > :first-child h3:first-child { padding-right: 30px; }
body.pratinjau .k-panel-x { display: none; }
.k-panel-in { --pad: 20px; width: 100%; max-height: 80vh; overflow: auto; background: #fff; color: #1f2937; border-radius: 20px; padding: var(--pad); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  -webkit-user-select: text; user-select: text; }
@keyframes k-naik { from { transform: translateY(20px); opacity: 0; } }
.k-panel h3 { margin: 0 0 6px; font-size: 19px; }
.k-panel p { margin: 0 0 12px; color: #4b5563; font-size: 14.5px; line-height: 1.55; }
.k-panel .k-harga { font-weight: 900; color: #b45309; font-size: 20px; margin-bottom: 12px; }
.k-panel .k-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.k-btn { border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px; padding: 11px 18px; border-radius: 12px; color: #1f1a00; text-decoration: none;
  background: linear-gradient(135deg, #fde047, #facc15); }
.k-btn.ghost { background: #f3f4f6; color: #374151; }
.k-btn[disabled] { opacity: .45; cursor: not-allowed; }
.k-masuk { display: grid; gap: 8px; margin: 4px 0 12px; }
.k-masuk .k-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.k-masuk .k-btn span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 900; }
.k-btn.k-google { background: #fff; color: #1f2937; box-shadow: inset 0 0 0 1.5px #d1d5db; }
.k-btn.k-google span { background: #4285f4; color: #fff; font-size: 14px; }
.k-btn.k-tiktok { background: #111; color: #fff; }
.k-btn.k-tiktok span { background: linear-gradient(135deg, #25f4ee, #fe2c55); color: #fff; }
.k-catatan { font-size: 12px !important; color: #6b7280 !important; background: #f9fafb; border-radius: 10px; padding: 8px 10px; }

.k-toast { position: fixed; z-index: 40; left: 50%; top: 18%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; transition: .3s;
  background: rgba(20, 21, 43, .9); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; max-width: 86vw; text-align: center; }
.k-toast.tampil { opacity: 1; transform: translate(-50%, 0); }

/* judul besar saat datang / rumah baru */
.k-judul { position: fixed; z-index: 12; left: 50%; top: 28%; transform: translate(-50%, -50%) scale(.92); opacity: 0; pointer-events: none; text-align: center;
  transition: opacity .6s, transform .6s; width: 92vw; }
.k-judul.tampil { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.k-judul small { display: block; font-size: 13px; letter-spacing: .28em; color: #fde047; font-weight: 800; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.k-judul b { display: block; margin-top: 4px; font-size: clamp(30px, 9vw, 66px); font-weight: 900; line-height: 1.02; letter-spacing: .01em;
  text-shadow: 0 4px 0 #14152b, 0 12px 32px rgba(0, 0, 0, .45); }
.k-judul span { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; background: rgba(20, 21, 43, .72); padding: 6px 14px; border-radius: 999px; }
.k-judul span[hidden] { display: none; }
/* judul datang: sinar berputar di belakang, huruf berpendar & merapat, kilat layar saat pemain muncul */
.k-judul::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(130vw, 900px); aspect-ratio: 1; z-index: -1; pointer-events: none;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: opacity .8s, transform 1.2s cubic-bezier(.2, .8, .2, 1);
  background: repeating-conic-gradient(from 0deg, rgba(253, 230, 138, .34) 0 7deg, rgba(253, 230, 138, 0) 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 8%, rgba(0, 0, 0, .55) 32%, transparent 62%); mask: radial-gradient(circle, #000 8%, rgba(0, 0, 0, .55) 32%, transparent 62%); }
.k-judul.tampil::before { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: k-sinar-putar 14s linear infinite; }
@keyframes k-sinar-putar { to { transform: translate(-50%, -50%) scale(1) rotate(360deg); } }
.k-judul.tampil b { animation: k-judul-masuk 1.1s cubic-bezier(.2, .9, .25, 1) both, k-judul-pendar 2.2s ease-in-out 1.1s infinite; }
.k-judul.tampil small { animation: k-judul-masuk 1s cubic-bezier(.2, .9, .25, 1) .1s both; }
.k-judul.tampil span { animation: k-judul-naik .8s ease-out .5s both; }
@keyframes k-judul-masuk { from { letter-spacing: .35em; opacity: 0; filter: blur(8px); } to { letter-spacing: .01em; opacity: 1; filter: blur(0); } }
@keyframes k-judul-pendar { 50% { text-shadow: 0 4px 0 #14152b, 0 0 26px rgba(253, 224, 71, .85), 0 12px 32px rgba(0, 0, 0, .45); } }
@keyframes k-judul-naik { from { opacity: 0; transform: translateY(10px); } }
.k-kilat-layar { position: fixed; inset: 0; z-index: 11; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 58%, rgba(255, 251, 235, .95), rgba(253, 224, 71, .45) 35%, rgba(253, 224, 71, 0) 70%); }
.k-kilat-layar.nyala { animation: k-kilat .9s ease-out; }
@keyframes k-kilat { 0% { opacity: 0; } 12% { opacity: .85; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .k-judul.tampil::before, .k-judul.tampil b { animation: none; } .k-kilat-layar.nyala { animation-duration: .3s; } }
.k-lewati { position: fixed; z-index: 13; right: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 8vh); border: 0; cursor: pointer; font: inherit; font-weight: 800;
  font-size: 14px; color: #fff; background: rgba(20, 21, 43, .7); padding: 9px 14px; border-radius: 999px; }
.k-tirai { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: #14152b; opacity: 0; pointer-events: none; transition: opacity .45s; font-size: 20px; }
.k-tirai.tampil { opacity: 1; pointer-events: auto; }
.k-tirai b { animation: k-angguk 1s ease-in-out infinite; }
button.k-tbl { border: 0; cursor: pointer; font: inherit; font-size: 18px; color: #fff; }
/* bingkai film saat adegan sinematik */
body::before, body::after { content: ''; position: fixed; left: 0; right: 0; height: 0; background: #000; z-index: 9; transition: height .5s; pointer-events: none; }
body::before { top: 0; }
body::after { bottom: 0; }
body.sinema::before, body.sinema::after { height: 7vh; }
body.sinema .k-joy, body.sinema .k-aksi, body.sinema .k-bantu, body.sinema .k-badge { opacity: 0; pointer-events: none; }
.k-joy, .k-aksi, .k-bantu { transition: opacity .3s; }
/* koin berkurang */
.k-koin { position: relative; }
.k-kurang { position: absolute; right: 10px; top: 100%; color: #fca5a5; font-weight: 900; font-size: 15px; white-space: nowrap; animation: k-turun 1.5s ease-out forwards; }
@keyframes k-turun { from { transform: translateY(-6px); opacity: 1; } to { transform: translateY(26px); opacity: 0; } }
.k-kurang.tambah { color: #86efac; }
/* misi harian */
.k-misi-tbl { position: relative; }
.k-misi-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #14152b; animation: k-misi-denyut 1.4s ease-in-out infinite; }
.k-misi-n[hidden] { display: none; }
@keyframes k-misi-denyut { 50% { transform: scale(1.18); } }
.k-misi { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; margin: 8px 0; border-radius: 14px; background: #f3f4f6; }
.k-misi .ikon { font-size: 24px; text-align: center; }
.k-misi b { display: block; font-size: 14px; line-height: 1.25; }
.k-misi em { display: block; font-style: normal; font-size: 12px; color: #6b7280; margin: 2px 0 5px; }
.k-misi small { font-weight: 800; color: #6b7280; white-space: nowrap; }
.k-misi .k-btn { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.k-misi-bar { display: block; height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.k-misi-bar i { display: block; height: 100%; background: #f59e0b; border-radius: 3px; }
.k-misi.ok { background: #ecfdf5; }
.k-misi.ok .k-misi-bar i { background: #22c55e; }
.k-misi.diambil { opacity: .6; }
.k-misi.bonus { background: #fef9c3; }
.k-misi-ok { font-size: 12px; font-weight: 800; color: #16a34a; white-space: nowrap; }
.k-misi-tiket { text-align: center; font-size: 14px; }
/* pilihan wilayah */
.k-wil { display: grid; gap: 8px; margin: 4px 0 14px; }
.k-wil-item { display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; align-items: center; text-align: left; cursor: pointer; font: inherit; color: #1f2937;
  background: #fff; border: 2px solid #e5e7eb; border-radius: 14px; padding: 9px 12px; transition: border-color .2s, transform .15s; }
.k-wil-item:hover { border-color: #facc15; transform: translateY(-1px); }
.k-wil-item.sini { border-color: #facc15; background: #fefce8; }
.k-wil-item .ikon { grid-row: span 3; font-size: 30px; text-align: center; }
.k-wil-item b { font-size: 15px; }
.k-wil-item small { font-size: 12px; color: #6b7280; }
.k-wil-item em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #b45309; }

/* mode rekam (cuplikan video) */
body.rekam .k-bantu, body.rekam .k-lewati, body.rekam .k-joy, body.rekam .k-toast { display: none !important; }

/* Tenis */
.k-tenis { position: fixed; z-index: 12; top: calc(max(10px, env(safe-area-inset-top)) + 56px); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; width: min(440px, 94vw); }
.k-tenis[hidden] { display: none; }
.k-skor { display: flex; align-items: center; gap: 14px; background: rgba(11, 16, 32, .86); border: 2px solid #facc15; border-radius: 16px; padding: 6px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.k-skor span { display: grid; justify-items: center; min-width: 64px; }
.k-skor b { font-size: 26px; font-weight: 900; line-height: 1.1; }
.k-skor .saya b { color: #fde047; }
.k-skor .lawan b { color: #fca5a5; }
.k-skor small { font-size: 11.5px; font-weight: 700; color: #e5e7eb; }
.k-skor i { font-style: normal; }
.k-skor em { font-style: normal; font-size: 12px; font-weight: 800; color: #a5b4fc; letter-spacing: .05em; text-transform: uppercase; }
.k-tenis-bantu { margin: 0; font-size: 11.5px; background: rgba(20, 21, 43, .6); padding: 4px 10px; border-radius: 999px; text-align: center; }
.k-tenis .k-tbl { font-size: 13px; padding: 6px 12px; border: 0; cursor: pointer; font-family: inherit; }
.k-seru { position: fixed; z-index: 13; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; text-align: center; display: grid; gap: 2px; }
.k-seru b { font-size: clamp(28px, 7vw, 46px); font-weight: 900; color: #fde047; text-shadow: 0 4px 0 #14152b, 0 8px 22px rgba(0, 0, 0, .4); -webkit-text-stroke: 1.5px #14152b; }
.k-seru small { font-size: 15px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.k-seru.buruk b { color: #fca5a5; }
.k-seru.tampil { animation: k-seru 1.5s ease-out forwards; }
@keyframes k-seru { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
body.tenis .k-bantu, body.tenis .k-badge, body.tenis #peta, body.tenis .k-lokasi { display: none; }
body.sentuh .k-tenis-bantu { font-size: 10.5px; }

/* Tombol ala game (tenis) */
.k-pad { position: fixed; z-index: 12; right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 230px; height: 200px; display: none; }
body.tenis .k-pad { display: block; }
body.tenis .k-aksi { display: none; }
.k-pad-b { position: absolute; display: grid; place-items: center; align-content: center; gap: 0; border: 0; border-radius: 50%; cursor: pointer; font: inherit; color: #fff;
  touch-action: none; -webkit-user-select: none; user-select: none; transition: transform .08s, box-shadow .08s, filter .08s;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .28), inset 0 4px 8px rgba(255, 255, 255, .45), 0 8px 18px rgba(0, 0, 0, .35); border: 3px solid rgba(255, 255, 255, .85); }
.k-pad-b b { font-size: 24px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.k-pad-b small { font-size: 11px; font-weight: 900; letter-spacing: .06em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.k-pad-b kbd { position: absolute; top: -6px; right: -4px; min-width: 22px; padding: 2px 5px; border-radius: 7px; background: #14152b; color: #fde047; font: 800 11px system-ui, sans-serif; border: 2px solid #fde047; }
body.sentuh .k-pad-b kbd { display: none; }
.k-pad-b.tekan { transform: scale(.9) translateY(3px); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .3); filter: brightness(1.15); }
.k-pad-b.pukul { right: 0; bottom: 0; width: 104px; height: 104px; background: radial-gradient(circle at 35% 30%, #fef08a, #facc15 45%, #ca8a04); color: #1f1a00; }
.k-pad-b.pukul b { font-size: 36px; }
.k-pad-b.pukul small { font-size: 13px; color: #1f1a00; text-shadow: none; }
.k-pad-b.pukul.servis { animation: k-servis 1s ease-in-out infinite; }
.k-pad-b.pukul.smash { background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 55%, #991b1b); animation: k-servis .5s ease-in-out infinite; }
@keyframes k-servis { 50% { box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .28), 0 0 0 10px rgba(250, 204, 21, .35), 0 8px 18px rgba(0, 0, 0, .35); } }
.k-pad-b.keras { right: 118px; bottom: 14px; width: 74px; height: 74px; background: radial-gradient(circle at 35% 30%, #fca5a5, #ef4444 50%, #991b1b); }
.k-pad-b.lob { right: 22px; bottom: 116px; width: 74px; height: 74px; background: radial-gradient(circle at 35% 30%, #a5b4fc, #6366f1 50%, #3730a3); }

/* Membidik ala MOBA: tombol mengikuti jari sedikit + cincin bidik */
.k-pad-b.bidik { transform: translate(var(--gx, 0), var(--gy, 0)) scale(.95); box-shadow: 0 0 0 4px rgba(250, 204, 21, .6), 0 0 0 46px rgba(250, 204, 21, .12), 0 8px 18px rgba(0, 0, 0, .35); }
.k-pad-tip { position: absolute; right: 0; bottom: -15px; width: 104px; text-align: center; font-size: 10px; font-weight: 800; color: #fde047; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); display: none; pointer-events: none; }
body.sentuh .k-pad-tip { display: block; }

/* Menu pilih mode tenis */
.k-pilih { margin: 4px 0 12px; }
.k-pilih > b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; margin-bottom: 6px; }
.k-pilih > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.k-opsi { display: grid; gap: 2px; text-align: left; border: 2px solid #e5e7eb; background: #f9fafb; border-radius: 14px; padding: 10px 12px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 14.5px; color: #1f2937; transition: border-color .12s, background .12s, transform .08s; }
.k-opsi small { font-weight: 600; font-size: 11.5px; color: #6b7280; }
.k-opsi:hover:not([disabled]) { border-color: #facc15; }
.k-opsi:active:not([disabled]) { transform: scale(.97); }
.k-opsi.on { border-color: #eab308; background: linear-gradient(135deg, #fef9c3, #fde68a); box-shadow: 0 4px 12px rgba(234, 179, 8, .25); }
.k-opsi[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) { .k-pad { transform: scale(.8); transform-origin: bottom right; } }
body.tenis .k-toast { display: none; }

/* multipemain: jumlah online, emote, daftar pemain */
.k-online { font-size: 14px !important; display: inline-flex; align-items: center; gap: 5px; }
.k-online b { font-size: 15px; }
#emoteTbl { padding: 6px 10px; }
.k-emote { position: fixed; z-index: 11; top: calc(var(--atasB) + 6px); right: 10px; display: flex; gap: 4px; padding: 6px;
  background: rgba(20, 21, 43, .85); backdrop-filter: blur(8px); border-radius: 16px; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.k-emote[hidden] { display: none; }
.k-emote:not([hidden]) { display: grid; grid-template-columns: repeat(5, 54px); }
.k-emote button { border: 0; background: rgba(255, 255, 255, .08); border-radius: 12px; width: 54px; height: 54px; font-size: 24px; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 1px; padding: 0; line-height: 1; }
.k-emote button small { font: 800 9.5px system-ui, sans-serif; color: #e5e7eb; }
.k-emote button:hover { background: rgba(255, 255, 255, .2); }
.k-emote button:active { transform: scale(.9); }
.k-orang-daftar { display: grid; gap: 6px; max-height: 46vh; overflow: auto; margin: 8px 0; }
.k-orang { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px 10px; }
.k-orang span { display: grid; min-width: 0; }
.k-orang small { color: #6b7280; font-size: 11.5px; }
.k-orang em { font-style: normal; font-size: 12px; color: #6b7280; white-space: nowrap; }
.k-orang .k-pilih-tim { display: flex; gap: 6px; flex: none; }
.k-pilih-tim .k-btn { padding: 8px 10px; font-size: 13px; }
.k-pilih-tim .k-btn.on { background: #facc15; color: #14152b; box-shadow: inset 0 0 0 2px #ca8a04; }
.k-orang .k-btn { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
body.tenis #emoteTbl, body.tenis .k-online, body.tenis .k-emote, body.rekam .k-online, body.rekam #emoteTbl, body.tenis #misiTbl, body.rekam #misiTbl { display: none !important; }
@media (max-width: 520px) { .k-online, #emoteTbl, #misiTbl, #peta { padding: 8px 9px !important; } .k-teks { display: none; } }
/* HP: baris 1 = kartu nama + koin (ringkas), baris 2 = satu bilah tombol ikon selebar layar */
@media (max-width: 520px) {
  .k-atas { flex-wrap: wrap; gap: 6px; }
  .k-saya { flex: 1 1 0; max-width: none; padding: 6px 11px; border-radius: 12px; }
  .k-saya b { font-size: 13px; line-height: 1.25; }
  .k-saya small { font-size: 10.5px; line-height: 1.3; }
  .k-koin { margin-left: 0; padding: 6px 11px; border-radius: 12px; flex: none; }
  .k-koin i { font-size: 17px; }
  .k-koin b { font-size: 14px; }
  .k-koin small { font-size: 9px; }
  .k-alat { display: flex; flex-basis: 100%; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(20, 21, 43, .74);
    backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
  .k-alat > .k-tbl { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 !important; display: flex; align-items: center; justify-content: center; gap: 3px;
    font-size: 16px; border-radius: 10px; background: transparent; box-shadow: none; backdrop-filter: none; }
  .k-alat > .k-tbl:active { background: rgba(255, 255, 255, .14); }
  .k-alat .k-online b { font-size: 13px; }
}
/* Tombol ☰ menu: deretan tombol bisa disembunyikan (disimpan di HP ini). Titik merah = ada misi yang bisa diklaim. */
.k-menu-tbl { position: relative; flex: none; display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 !important; font-size: 17px; cursor: pointer; border: 0; }
.k-menu-titik { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #14152b; }
.k-menu-titik[hidden] { display: none; }
body.menu-tutup:not(.tenis):not(.penalti):not(.sepak) .k-alat { display: none; }
body.tenis .k-menu-tbl, body.penalti .k-menu-tbl, body.sepak .k-menu-tbl { display: none; }
/* HP: lebih ringkas lagi */
@media (max-width: 520px) {
  .k-atas { left: 8px; right: 8px; gap: 5px; }
  .k-saya { padding: 4px 10px; border-radius: 11px; }
  .k-saya b { font-size: 12px; line-height: 1.2; }
  .k-saya small { font-size: 9.5px; line-height: 1.25; }
  .k-koin { padding: 4px 9px; border-radius: 11px; column-gap: 5px; }
  .k-koin i { font-size: 15px; }
  .k-koin b { font-size: 12.5px; }
  .k-koin small { font-size: 8.5px; }
  .k-menu-tbl { min-width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
  .k-alat { padding: 2px; border-radius: 12px; }
  .k-alat > .k-tbl { height: 30px; font-size: 14.5px; border-radius: 9px; }
  .k-alat .k-online b { font-size: 12px; }
}
/* saat tenis / penalti / sepak bola (kartu nama & koin disembunyikan): tombol yang tersisa di kanan atas,
   papan skor & tombol keluar di kiri atas, jadi tidak bertumpuk */
body.tenis .k-atas, body.penalti .k-atas, body.sepak .k-atas { justify-content: flex-end; }
body.sepak #online, body.sepak #kunciKam, body.penalti #online { display: none !important; }
@media (max-width: 520px) {
  body.tenis .k-alat, body.penalti .k-alat, body.sepak .k-alat { flex-basis: auto; }
  body.tenis .k-alat > .k-tbl, body.penalti .k-alat > .k-tbl, body.sepak .k-alat > .k-tbl { flex: none; width: 38px; }
}

/* Selebrasi gol laga: huruf GOOOL! berloncatan + pita pencetak gol berwarna tim */
.k-gol { position: fixed; z-index: 14; left: 50%; top: 32%; transform: translate(-50%, -50%); width: max-content; max-width: 94vw; text-align: center; pointer-events: none; display: grid; gap: 8px; }
.k-gol[hidden] { display: none; }
.k-gol b { display: flex; justify-content: center; font-size: clamp(46px, 14vw, 88px); font-weight: 900; color: #fde047; -webkit-text-stroke: 2px #14152b;
  text-shadow: 0 5px 0 #14152b, 0 12px 30px rgba(0, 0, 0, .45); }
.k-gol b i { font-style: normal; display: inline-block; animation: k-gol-huruf .7s cubic-bezier(.3, 1.6, .5, 1) both, k-gol-goyang .5s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 60ms), calc(.7s + var(--i) * 90ms); }
.k-gol small { justify-self: center; font-size: 15px; font-weight: 900; color: #fff; padding: 7px 16px; border-radius: 999px; background: rgba(20, 21, 43, .85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: k-gol-pita .45s .35s both; }
.k-gol.t0 small { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.k-gol.t1 small { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.k-gol.lawan b { color: #e5e7eb; }
.k-gol.pergi { animation: k-gol-pergi .4s ease-in forwards; }
@keyframes k-gol-huruf { from { transform: translateY(-70px) scale(.2) rotate(-25deg); opacity: 0; } }
@keyframes k-gol-goyang { to { transform: translateY(-7px) rotate(5deg); } }
@keyframes k-gol-pita { from { transform: scale(.3); opacity: 0; } }
@keyframes k-gol-pergi { to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }

/* Tombol zoom kamera (cubit dua jari & roda mouse juga bisa) */
.k-zoom { position: fixed; z-index: 11; right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: grid; gap: 8px; }
.k-zoom .k-tbl { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; }
body.tenis .k-zoom, body.sinema .k-zoom { display: none; }

/* Setelan kontrol: ukuran tombol, analog ikuti jari, atur posisi */
.k-aksi, .k-pad { scale: var(--tombol, 1); }
.k-aksi { transform-origin: right bottom; }
.k-pad { transform-origin: right bottom; }
.k-joy-zona { position: fixed; z-index: 9; left: 0; bottom: 0; width: 50vw; height: 62vh; display: none; touch-action: none; }
body.sentuh.joy-ikut .k-joy-zona { display: block; }
body.joy-ikut .k-joy:not(.aktif) { opacity: .45; }
body.sinema .k-joy-zona, body.tenis.joy-ikut .k-joy-zona { }
.k-atur { position: fixed; z-index: 40; top: calc(max(10px, env(safe-area-inset-top)) + 4px); left: 50%; transform: translateX(-50%); display: flex; align-items: center;
  flex-wrap: wrap; justify-content: center; gap: 8px; background: rgba(20, 21, 43, .92); color: #fff; padding: 10px 14px; border-radius: 16px; width: max-content; max-width: 94vw; }
.k-atur[hidden] { display: none; }
.k-atur b { font-size: 13px; }
body.atur .k-joy, body.atur .k-pad, body.atur .k-aksi, body.atur .k-zoom, body.atur .k-lompat { display: block !important; outline: 3px dashed #facc15; outline-offset: 4px; cursor: grab; touch-action: none; animation: none; }
body.atur .k-zoom { display: grid !important; }
body.atur .k-aksi:empty::after { content: '🚪 Tombol aksi'; }
body.atur .k-pad-b { pointer-events: none; }
body.atur .k-joy-zona, body.atur .k-atas, body.atur .k-emote { display: none !important; }
.k-setelan label { display: grid; gap: 4px; margin: 10px 0; font-weight: 700; font-size: 14px; }
.k-setelan input[type=range] { width: 100%; accent-color: #facc15; }
.k-setelan .k-pilih-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.k-setelan .k-pilih-2 button { border: 2px solid #e5e7eb; background: #f9fafb; border-radius: 12px; padding: 10px; font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.k-setelan .k-pilih-2 button small { display: block; font-weight: 500; font-size: 12px; color: #6b7280; }
.k-setelan .k-pilih-2 button.aktif { border-color: #facc15; background: #fefce8; }
.k-setelan .k-pilih-2.tiga { grid-template-columns: repeat(3, 1fr); }
/* pita saran memutar HP (pilihan arah layar di Setelan) */
.k-saran-arah { position: fixed; z-index: 45; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 60px); transform: translateX(-50%); border: 0; cursor: pointer;
  font: inherit; color: #14152b; background: #fde047; padding: 8px 16px; border-radius: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); text-align: center; max-width: 92vw; }
.k-saran-arah b { display: block; font-size: 14px; }
.k-saran-arah small { display: block; font-size: 11px; font-weight: 600; opacity: .75; }
.k-saran-arah[hidden] { display: none; }
body:has(#panel:not([hidden])) .k-saran-arah, body.sinema .k-saran-arah { display: none; } /* tidak menutupi panel & adegan */
.k-emote:not([hidden]) { grid-template-columns: repeat(6, 54px); }
@media (max-width: 420px) { .k-emote:not([hidden]) { grid-template-columns: repeat(5, 54px); } }
.k-setelan .k-baris { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.k-setelan .k-ket { font-size: 12px; color: #6b7280; margin: 8px 0; }

/* Roda emote: ketuk karakter sendiri / tombol 😀, atau tekan lama karakter lalu geser ke emote */
.k-roda { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .12); touch-action: none; }
.k-roda[hidden] { display: none; }
.k-roda-isi { position: absolute; width: 0; height: 0; }
.k-roda-isi::before { content: ''; position: absolute; left: -128px; top: -128px; width: 256px; height: 256px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 21, 43, .5) 0 35%, rgba(20, 21, 43, .82) 36%); backdrop-filter: blur(6px); animation: k-roda-muncul .16s ease-out; }
.k-roda-slot { position: absolute; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 28px; display: grid; place-items: center; align-content: center; gap: 1px; cursor: pointer; line-height: 1; padding: 0;
  transition: transform .1s, background .1s; animation: k-roda-muncul .18s ease-out; }
.k-roda-slot small { font: 800 9.5px system-ui, sans-serif; color: #e5e7eb; }
.k-roda-slot:hover, .k-roda-slot.pilih { background: #facc15; transform: scale(1.18); }
.k-roda-slot:hover small, .k-roda-slot.pilih small { color: #1f1a00; }
.k-roda-pusat { position: absolute; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08); color: #fff; font: 800 12px system-ui, sans-serif; cursor: pointer; padding: 4px; line-height: 1.2; }
@keyframes k-roda-muncul { from { transform: scale(.6); opacity: 0; } }
body.tenis .k-roda, body.sinema .k-roda { display: none !important; }
.k-emote-daftar { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0; max-height: 46vh; overflow: auto; }
.k-emote-kartu { display: grid; justify-items: center; gap: 4px; padding: 8px 6px; border-radius: 14px; background: #f3f4f6; text-align: center; }
.k-emote-kartu span { font-size: 30px; line-height: 1.1; }
.k-emote-kartu b { font-size: 13px; }
.k-emote-kartu .k-btn { padding: 6px 8px; font-size: 12px; width: 100%; }
.k-emote-kartu.kunci span { filter: grayscale(.7); opacity: .7; }
/* Lompat */
.k-lompat { position: fixed; z-index: 11; right: max(22px, env(safe-area-inset-right)); bottom: calc(max(34px, env(safe-area-inset-bottom)) + 92px);
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: rgba(20, 21, 43, .72); color: #fff;
  font-size: 24px; line-height: 1; display: none; place-items: center; align-content: center; gap: 1px; cursor: pointer; padding: 0;
  scale: var(--tombol, 1); transform-origin: right bottom; touch-action: none; -webkit-user-select: none; user-select: none; }
.k-lompat small { font: 800 9.5px system-ui, sans-serif; }
.k-lompat:active { transform: scale(.9); }
body.sentuh .k-lompat { display: grid; }
body.tenis .k-lompat, body.sinema .k-lompat { display: none !important; }
/* Lari di HP: dorong analog melewati pinggir = lari; geser ke atas sampai 🔒 lalu lepas = kunci lari */
.k-joy-kunci { position: absolute; left: 50%; bottom: calc(100% + var(--joy, 130px) * .18); transform: translateX(-50%); width: 54px; height: 54px;
  border-radius: 50%; background: rgba(20, 21, 43, .72); color: #fff; border: 2px dashed rgba(255, 255, 255, .55); display: none; place-items: center;
  align-content: center; gap: 1px; font-size: 20px; line-height: 1; pointer-events: none; transition: transform .12s, background .12s; }
.k-joy-kunci small { font: 800 8.5px system-ui, sans-serif; }
.k-joy.lari .k-joy-kunci, .k-joy.terkunci .k-joy-kunci { display: grid; }
.k-joy.kunci-siap .k-joy-kunci, .k-joy.terkunci .k-joy-kunci { background: #facc15; color: #1f1a00; border-style: solid; transform: translateX(-50%) scale(1.15); }
.k-joy.lari .k-joy-knob, .k-joy.terkunci .k-joy-knob { background: linear-gradient(135deg, #fdba74, #fb923c); }
body.joy-ikut .k-joy.terkunci { opacity: 1; }
/* Hitung mundur servis */
.k-servis-hitung { position: fixed; z-index: 12; left: 50%; top: 31%; transform: translateX(-50%); background: rgba(20, 21, 43, .82); color: #fff;
  padding: 8px 16px; border-radius: 14px; text-align: center; font-weight: 800; pointer-events: none; }
.k-servis-hitung[hidden] { display: none; }
.k-servis-hitung b { font-size: 22px; color: #fde047; }
.k-servis-hitung small { display: block; font-size: 11px; font-weight: 600; opacity: .8; }
.k-servis-hitung.mepet { background: rgba(185, 28, 28, .88); animation: k-denyut-servis .5s ease-in-out infinite alternate; }
.k-servis-hitung.mepet b { color: #fff; }
@keyframes k-denyut-servis { to { transform: translateX(-50%) scale(1.08); } }
.k-rali { display: block; font-style: normal; color: #fb923c; font-weight: 900; }
.k-rali[hidden] { display: none; }
/* Toko Olahraga */
.k-raket-daftar { display: grid; gap: 8px; margin: 10px 0; max-height: 50vh; overflow: auto; }
.k-raket { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #f3f4f6; }
.k-raket .ikon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--w); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45); }
.k-raket b { font-size: 14px; }
.k-raket small { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.k-raket em { display: block; font-size: 11.5px; font-style: normal; color: #7c3aed; font-weight: 700; margin-top: 3px; }
.k-raket .k-btn { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.k-raket.kunci .ikon { filter: grayscale(.5); }
.k-stat { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 6px; font-style: normal; font-size: 11px; color: #374151; }
.k-stat u { display: block; height: 6px; border-radius: 4px; background: #e5e7eb; overflow: hidden; }
.k-stat s { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #facc15, #f97316); }
.k-setelan .k-skala { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .k-setelan .k-skala { grid-template-columns: 1fr; } .k-raket { grid-template-columns: 40px 1fr; } .k-raket .k-btn { grid-column: 1 / -1; } }
.k-tab { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.k-tab button { border: 2px solid #e5e7eb; background: #f9fafb; border-radius: 12px; padding: 9px; font: inherit; font-weight: 800; cursor: pointer; }
.k-tab button.aktif { border-color: #facc15; background: #fefce8; }
.k-raket-aksi { display: grid; gap: 6px; }
@media (max-width: 420px) { .k-raket-aksi { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } }

.k-setelan .k-fps { font-weight: 600; color: #6b7280; font-size: 12px; }
/* Tenis di HP: papan skor ringkas di kiri atas, kartu nama & koin disembunyikan supaya lapangan terlihat */
body.sentuh.tenis .k-saya, body.sentuh.tenis .k-koin, body.sentuh.tenis #pasang { display: none; }
body.sentuh.tenis #setelan { margin-left: auto; }
body.sentuh .k-tenis { top: max(8px, env(safe-area-inset-top)); left: 10px; transform: none; width: auto; max-width: calc(100vw - 120px);
  grid-template-columns: auto auto; justify-items: start; align-items: center; gap: 6px; }
body.sentuh .k-skor { gap: 8px; padding: 3px 10px; border-radius: 12px; border-width: 1.5px; }
body.sentuh .k-skor span { min-width: 42px; }
body.sentuh .k-skor b { font-size: 18px; }
body.sentuh .k-skor small { font-size: 9.5px; }
body.sentuh .k-skor em { font-size: 9.5px; }
body.sentuh .k-tenis .k-tbl { font-size: 11.5px; padding: 6px 9px; }
body.sentuh .k-tenis-bantu { grid-column: 1 / -1; }
body.sentuh #tenisKeluar { grid-row: 1; grid-column: 2; }
.k-tenis.redup .k-tenis-bantu { display: none; }
/* Penonton: papan skor pertandingan pemain lain */
.k-tonton { position: fixed; z-index: 11; top: calc(max(10px, env(safe-area-inset-top)) + 56px); left: 50%; transform: translateX(-50%);
  background: rgba(11, 16, 32, .84); border: 1.5px solid #facc15; border-radius: 12px; padding: 5px 12px; color: #fff; font-size: 12.5px;
  text-align: center; pointer-events: none; white-space: nowrap; }
.k-tonton[hidden] { display: none; }
.k-tonton b { color: #fde047; font-size: 15px; }
.k-tonton small { display: block; font-size: 10.5px; color: #a5b4fc; font-weight: 700; }
body.tenis .k-tonton, body.sinema .k-tonton { display: none; }
/* laptop: kamera terkunci (pointer lock) */
#kunciKam.on { background: #facc15; color: #14152b; }
.k-kursor-bidik { position: fixed; left: -15px; top: -15px; width: 30px; height: 30px; border: 3px solid #fde047; border-radius: 50%; pointer-events: none; z-index: 30;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(0, 0, 0, .35); }
.k-kursor-bidik::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fde047; }
.k-kursor-bidik[hidden] { display: none; }
/* isian di panel (jadi warga) */
/* 👑 Presiden: tombol menu, spanduk pengumuman, daftar pemain */
.k-presiden-tbl { background: linear-gradient(135deg, rgba(161, 98, 7, .9), rgba(20, 21, 43, .85)) !important; }
.k-umum { position: fixed; z-index: 15; left: 50%; top: calc(var(--atasB) + 46px); transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  padding: 12px 16px 12px 52px; border-radius: 16px; background: linear-gradient(135deg, #fde047, #f59e0b); color: #1f1a00; font-weight: 800; font-size: 15.5px;
  line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .5); pointer-events: none; animation: k-umum .45s cubic-bezier(.3, 1.5, .5, 1); }
.k-umum::before { content: '📢'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; }
.k-umum small { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: .06em; color: #78350f; }
.k-umum[hidden] { display: none; }
@keyframes k-umum { from { transform: translate(-50%, -30px) scale(.85); opacity: 0; } }
.k-adm-tab { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.k-adm-daftar { display: grid; gap: 6px; }
.k-adm-baris { display: grid; gap: 6px; padding: 9px 11px; border-radius: 12px; background: #f8fafc; border: 1px solid #e5e7eb; }
.k-adm-baris b { font-size: 14px; }
.k-adm-baris small { color: #6b7280; }
.k-adm-baris > div { display: flex; gap: 5px; flex-wrap: wrap; }
.k-btn.kecil { padding: 6px 10px; font-size: 12.5px; border-radius: 9px; }
.k-btn.bahaya { background: #fee2e2; color: #991b1b; }
.k-adm-asp { padding: 9px 11px; border-radius: 12px; background: #f8fafc; border: 1px solid #e5e7eb; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.k-adm-asp small { display: block; color: #6b7280; margin-bottom: 3px; }

/* Pembuat karakter */
.k-kar-pra { position: sticky; top: calc(-1 * var(--pad)); z-index: 2; height: 210px; margin: 0 calc(-1 * var(--pad)) 10px; background: linear-gradient(180deg, #eef2ff, #fff); }
.k-kar-pra span { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 11px; color: #94a3b8; pointer-events: none; }
.k-kar-kanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.k-kar-dasar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.k-kar-dasar .k-btn { flex: 1 1 auto; padding: 8px 10px; font-size: 13.5px; }
.k-kar-baris { margin-bottom: 9px; }
.k-kar-baris > small { display: block; font-size: 12px; font-weight: 800; color: #374151; margin-bottom: 4px; }
.k-kar-baris > small small { font-weight: 400; color: #6b7280; }
.k-kar-baris > div { display: flex; flex-wrap: wrap; gap: 5px; }
.k-kar-chip { border: 1.5px solid #e5e7eb; background: #fff; color: #374151; font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.k-kar-chip.on { border-color: #7c3aed; background: #f5f3ff; color: #5b21b6; font-weight: 800; }
.k-kar-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--w); box-shadow: 0 0 0 1.5px #d1d5db; cursor: pointer; padding: 0; }
.k-kar-sw.on { box-shadow: 0 0 0 2.5px #7c3aed; }
@media (max-width: 520px) { .k-kar-pra { height: 180px; } }
.k-isian { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 10px; }
.k-isian small { font-weight: 400; color: #6b7280; }
.k-isian textarea { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d1d5db; resize: vertical; min-height: 96px; }
.k-isian input { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d1d5db; }
.k-kode { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.k-kode code { flex: 1; font-size: 20px; font-weight: 800; letter-spacing: 1px; background: #fef3c7; color: #92400e; border-radius: 10px; padding: 10px 12px; text-align: center; user-select: all; }
.k-langkah { margin: 6px 0 10px 18px; padding: 0; font-size: 13px; line-height: 1.5; }
.k-btn.k-tiktok.mati { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.k-btn.k-tiktok.mati { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
/* pilih progres (cadangan progres saat kartu disambung) */
.k-progres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.k-progres button { border: 2px solid #e5e7eb; background: #f9fafb; border-radius: 14px; padding: 12px; font: inherit; text-align: left; cursor: pointer; color: #111827; }
.k-progres button:hover { border-color: #facc15; background: #fefce8; }
.k-progres button > b { display: block; font-size: 14px; margin-bottom: 6px; }
.k-progres button span { display: block; font-size: 13px; line-height: 1.55; color: #374151; }
.k-progres button small { display: block; margin-top: 6px; font-size: 11px; color: #6b7280; }
.k-progres button.kini { border-color: #86efac; background: #f0fdf4; }
.k-progres button:disabled { opacity: .5; cursor: wait; }
.k-cad-daftar { display: grid; gap: 8px; margin: 10px 0; }
@media (max-width: 520px) { .k-progres { grid-template-columns: 1fr; } }
/* smash: tombol "ditahan" menunggu bola (tekan lebih awal pun tetap smash) & saat yang pas (hijau) */
.k-pad-b.pukul.smash.tahan { filter: brightness(1.1); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35), 0 0 0 6px rgba(254, 202, 202, .7); }
.k-pad-b.pukul.siap { background: radial-gradient(circle at 35% 30%, #bbf7d0, #22c55e 55%, #166534) !important; animation: k-siap .22s ease-in-out infinite !important; }
@keyframes k-siap { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(34, 197, 94, .45), 0 8px 18px rgba(0, 0, 0, .35); } }

/* adu penalti (lapangan sepak bola) */
body.penalti .k-joy, body.penalti .k-joy-zona, body.penalti .k-aksi, body.penalti .k-lompat, body.penalti .k-bantu, body.penalti .k-badge,
body.penalti #peta, body.penalti .k-lokasi, body.penalti .k-badan, body.penalti .k-jam, body.penalti .k-tugas, body.penalti .k-roda,
body.penalti #emoteTbl, body.penalti .k-online, body.penalti .k-emote, body.penalti #misiTbl, body.penalti .k-zoom, body.penalti .k-toast,
body.penalti .k-tonton, body.penalti .k-pad { display: none !important; }
.k-penalti .k-titik { display: flex; gap: 2px; font-size: 11px; letter-spacing: 0; }
.k-penalti .k-titik i { color: #94a3b8; }
.k-penalti .k-titik i.ok { color: #4ade80; }
.k-penalti .k-titik i.no { color: #f87171; }
.k-ppad { position: fixed; z-index: 12; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: none; justify-content: center; align-items: flex-end; gap: 16px; pointer-events: none; }
body.penalti .k-ppad { display: flex; }
.k-ppad .k-pad-b { position: relative; right: auto; bottom: auto; width: 84px; height: 84px; pointer-events: auto; display: none; }
.k-ppad .k-pad-b.arah { background: radial-gradient(circle at 35% 30%, #a7f3d0, #10b981 50%, #065f46); }
.k-ppad .k-pad-b.pukul { width: 108px; height: 108px; animation: k-servis 1s ease-in-out infinite; }
.k-ppad.menendang .k-pad-b.pukul, .k-ppad.menjaga .k-pad-b.arah { display: grid; }
@media (max-width: 520px) { .k-ppad { gap: 10px; } .k-ppad .k-pad-b { width: 76px; height: 76px; } .k-ppad .k-pad-b.pukul { width: 100px; height: 100px; } }
body.penalti .k-saya, body.penalti .k-koin, body.penalti #pasang { display: none; }
/* Stadion Negeri: sepak bola 5 lawan 5 */
.k-sepak .merah b { color: #fca5a5; }
.k-sepak .biru b { color: #93c5fd; }
.k-sepak em { min-width: 54px; text-align: center; font-size: 15px !important; color: #fde047 !important; }
#sepakPad { display: none; }
body.sepak #sepakPad { display: block; }
/* main bebas di lapangan kota: tombol UMPAN / LAMBUNG / TENDANG (tanpa gocek), redup saat bola jauh */
body.bebas #sepakPad { display: block; }
body.bebas #sepakPad .k-pad-b.gocek, body.bebas #sepakPad .k-pad-tip { display: none; }
/* main bebas, bola jauh: tombol tetap jelas, hanya sedikit redup */
body.bebas #sepakPad.jauh .k-pad-b { filter: saturate(.55) brightness(.9); }
body.bebas .k-aksi, body.bebas .k-lompat { display: none !important; }
.k-bebas-pilih { display: none; position: fixed; z-index: 12; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 214px); }
body.bebas .k-bebas-pilih { display: block; }
#sepakPad .k-pad-b.lob { background: radial-gradient(circle at 35% 30%, #bbf7d0, #22c55e 50%, #166534); }
#sepakPad.tanpa-bola .k-pad-b.pukul { background: radial-gradient(circle at 35% 30%, #fed7aa, #f97316 50%, #9a3412); color: #fff; }
#sepakPad.tanpa-bola .k-pad-b.pukul small { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
/* tombol berganti: memegang bola = TENDANG · LAMBUNG · GOCEK · UMPAN; tanpa bola = SLIDING + MINTA (kiper: TERJUN saja) */
#sepakPad .k-pad-b.minta { display: none; right: 22px; bottom: 116px; width: 74px; height: 74px; background: radial-gradient(circle at 35% 30%, #99f6e4, #14b8a6 50%, #115e59); }
#sepakPad.tanpa-bola .k-pad-b.keras, #sepakPad.tanpa-bola .k-pad-b.lob, #sepakPad.tanpa-bola .k-pad-b.gocek { display: none; }
#sepakPad.tanpa-bola .k-pad-b.minta { display: grid; }
#sepakPad.tanpa-bola.kiper .k-pad-b.minta, body.bebas #sepakPad .k-pad-b.minta { display: none; }
#sepakPad .k-pad-b.gocek { right: 112px; bottom: 100px; width: 62px; height: 62px; background: radial-gradient(circle at 35% 30%, #e9d5ff, #a855f7 50%, #6b21a8); }
#sepakPad .k-pad-b.gocek b { font-size: 20px; }
/* power shot: tombol TENDANG ditahan, cincin kuning terisi sesuai tenaga */
#sepakPad .k-pad-b.keras.isi { transform: scale(1.06); }
#sepakPad .k-pad-b.keras.isi::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#fde047 calc(var(--isi, 0) * 360deg), rgba(255, 255, 255, .25) 0);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
#sepakPad .k-pad-b.gocek small { font-size: 10px; }
body.sepak .k-aksi, body.sepak .k-lompat, body.sepak .k-bantu, body.sepak .k-badge, body.sepak #peta, body.sepak .k-lokasi, body.sepak .k-badan,
body.sepak .k-jam, body.sepak .k-tugas, body.sepak .k-roda, body.sepak #emoteTbl, body.sepak .k-emote, body.sepak #misiTbl, body.sepak .k-tonton,
body.sepak .k-saya, body.sepak .k-koin, body.sepak #pasang, body.sepak .k-toast { display: none !important; }
.k-sb-tim { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.k-sb-kol { display: grid; gap: 6px; padding: 8px; border-radius: 12px; }
.k-sb-kol.t0 { background: #fef2f2; border: 2px solid #fca5a5; }
.k-sb-kol.t1 { background: #eff6ff; border: 2px solid #93c5fd; }
.k-sb-kol > b { text-align: center; }
.k-sb-slot { font: inherit; font-size: 13px; font-weight: 700; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #d1d5db; background: #fff; color: #111827; cursor: pointer; }
.k-sb-slot i { font-style: normal; font-weight: 600; color: #6b7280; }
.k-sb-slot.kiper { cursor: default; color: #6b7280; background: #f3f4f6; }
.k-sb-slot.saya { border-color: #ca8a04; background: #fef9c3; }
.k-sb-slot.saya i { color: #854d0e; font-weight: 900; }
.k-sb-slot:disabled { cursor: not-allowed; opacity: .7; }
.k-sb-slot:not(:disabled):not(.kiper):hover { border-color: #6366f1; }

/* Kaki panel menempel di bawah: tombol utama (Mulai / Tutup) selalu terlihat tanpa menggulir */
.k-kaki { position: sticky; bottom: calc(-1 * var(--pad, 20px)); z-index: 2; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  margin: 14px calc(-1 * var(--pad, 20px)) calc(-1 * var(--pad, 20px)); padding: 12px var(--pad, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid #e5e7eb; border-radius: 0 0 20px 20px; }
.k-kaki .k-btn:not(.ghost), .k-kaki .k-btn:only-child { flex: 1 1 auto; }
.k-kaki [data-pil^="aspirasi"] { margin-right: auto; font-size: 13.5px; }
@media (max-width: 420px) {
  .k-panel { padding: 10px; }
  .k-panel-in { --pad: 16px; max-height: 88vh; }
}

/* Setelan per tab */
.k-setelan-kepala { position: sticky; top: calc(-1 * var(--pad, 20px)); z-index: 2; margin: calc(-1 * var(--pad, 20px)) calc(-1 * var(--pad, 20px)) 0;
  padding: var(--pad, 20px) var(--pad, 20px) 10px; background: #fff; border-bottom: 1px solid #f1f5f9; border-radius: 20px 20px 0 0; }
.k-setelan-kepala h2 { margin: 0 0 10px; font-size: 20px; }
.k-setelan .k-tab { grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; }
.k-setelan .k-tab button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 11.5px; border-radius: 10px; min-width: 0; }
.k-setelan .k-tab i { font-style: normal; font-size: 18px; line-height: 1.1; }
.k-setelan-isi { padding-top: 4px; min-height: 260px; }
.k-setelan h4 { margin: 16px 0 8px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.k-setelan-isi > h4:first-child { margin-top: 10px; }
.k-geser { display: grid; gap: 6px; margin: 10px 0; padding: 10px 12px; background: #f9fafb; border: 1px solid #f1f5f9; border-radius: 12px; }
.k-geser span { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.k-geser b { font-weight: 800; color: #92400e; white-space: nowrap; }
.k-geser i { font-style: normal; font-variant-numeric: tabular-nums; }
.k-geser input[type=range] { width: 100%; accent-color: #facc15; margin: 0; height: 26px; }
@media (max-width: 360px) { .k-setelan .k-pilih-2 { grid-template-columns: 1fr; } }

/* Pratinjau saat menggeser ukuran tombol: panel tembus pandang, tombol tampil di tempatnya */
body.pratinjau .k-panel { background: transparent; }
body.pratinjau .k-panel-in { opacity: .25; transition: opacity .15s; }
body.pratinjau #tenisPad, body.pratinjau .k-aksi, body.pratinjau .k-lompat, body.pratinjau .k-joy { display: block !important; }
body.pratinjau .k-zoom { display: grid !important; }
body.pratinjau .k-aksi:empty::after { content: '🚪 Tombol aksi'; }
body.atur #sepakPad, body.pratinjau #sepakPad { display: none !important; }

/* Stadion: tombol bola seperti tombol tenis, zoom disembunyikan saat main */
body.sepak .k-zoom { display: none !important; }
.k-sb-sub { font-size: 13.5px !important; }
.k-sb-tim { gap: 8px; }
.k-sb-kol { padding: 7px; gap: 5px; }
.k-sb-slot { display: grid; gap: 1px; padding: 7px 9px; min-height: 44px; align-content: center; }
.k-sb-slot i { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-sb-baris { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.k-sb-baris > span { font-weight: 800; font-size: 13px; color: #374151; }
.k-sb-lvs { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; background: #f3f4f6; border-radius: 12px; }
.k-sb-lv { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font: inherit; font-size: 13px; font-weight: 800; color: #4b5563; cursor: pointer; white-space: nowrap; }
.k-sb-lv.on { background: #facc15; color: #1f1a00; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.k-sb-lvs.dua { grid-template-columns: 1fr 1fr; }
.k-sb-daftar { display: grid; gap: 6px; margin: 8px 0; }
.k-sb-ruang { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #f3f4f6; border-radius: 12px; }
.k-sb-ruang > div { flex: 1; min-width: 0; display: grid; }
.k-sb-ruang small { color: #4b5563; font-size: 12px; }
.k-sb-ruang .k-btn { padding: 6px 12px; }
/* tombol layar di stadion (belum ikut main): ▶ MAIN besar di tengah depan, di atas analog & tombol aksi */
.k-sb-layar { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); bottom: calc(max(18px, env(safe-area-inset-bottom)) + max(150px, var(--joy, 130px) + 26px));
  display: flex; gap: 8px; align-items: stretch; width: max-content; max-width: calc(100vw - 24px); }
.k-sb-layar[hidden] { display: none; }
.k-sb-layar #sbPilih { display: grid; justify-items: center; gap: 1px; font-size: 20px; font-weight: 900; letter-spacing: .5px; padding: 10px 24px;
  border-radius: 16px; white-space: nowrap; background: linear-gradient(135deg, #fde047, #facc15); color: #1f1a00;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35); animation: k-denyut 1.6s ease-in-out infinite; }
.k-sb-layar #sbPilih small { font-size: 11.5px; font-weight: 700; letter-spacing: 0; opacity: .8; }
.k-sb-layar #sbPergi { white-space: nowrap; font-size: 13px; padding: 8px 12px; border-radius: 16px; }
@media (max-width: 520px) {
  .k-sb-layar #sbPilih { font-size: 18px; padding: 9px 20px; }
  body.di-stadion .k-lompat { display: none !important; }
}
.k-sb-cara { margin: 10px 0 0; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px 12px; }
.k-sb-cara summary { font-weight: 800; font-size: 14px; cursor: pointer; }
.k-sb-cara p { font-size: 13px !important; margin: 6px 0 0 !important; }
/* Lapangan Negeri (kota): pilihan main saat masuk lapangan */
.k-pilih-main { display: grid; gap: 8px; margin: 12px 0 4px; }
.k-pilih-main .k-btn { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 11px 14px; }
.k-pilih-main .k-btn b { font-size: 16px; font-weight: 900; }
.k-pilih-main .k-btn small { font-size: 12.5px; font-weight: 600; opacity: .8; }

/* ---- roda: baris ekspresi wajah di bawah roda emote */
.k-roda-eks { position: absolute; left: 0; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px 7px; border-radius: 999px;
  background: rgba(20, 21, 43, .82); backdrop-filter: blur(6px); animation: k-roda-muncul .2s ease-out; white-space: nowrap; }
.k-roda-eks button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 20px; cursor: pointer; }
.k-roda-eks button:hover { background: #facc15; transform: scale(1.12); }

/* ---- mode foto / selfie (foto.js) */
body.foto > :not(#dunia):not(.k-foto):not(.k-toast) { display: none !important; }
.k-foto { position: fixed; inset: 0; z-index: 40; touch-action: none; user-select: none; font-family: system-ui, sans-serif; }
.k-foto[hidden] { display: none; }
.k-foto button { font: 800 13px system-ui, sans-serif; cursor: pointer; }
.k-foto-atas { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.k-foto-atas button, .k-foto-aksi button { border: 0; border-radius: 999px; padding: 8px 12px; background: rgba(20, 21, 43, .78); color: #fff; }
.k-foto-atas button:first-child { width: 38px; padding: 8px 0; }
.k-foto-petunjuk { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 44px); left: 0; right: 0; text-align: center;
  color: #fff; font-size: 11px; text-shadow: 0 1px 3px #000a; pointer-events: none; }
.k-foto-bawah { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; }
.k-foto-baris { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: calc(100vw - 20px); padding: 5px 7px; border-radius: 22px; background: rgba(20, 21, 43, .72); }
.k-foto-baris button { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 20px; }
.k-foto-baris button.on { background: #facc15; }
.k-foto-jepret { width: 70px; height: 70px; border-radius: 50%; border: 5px solid #fff; background: #facc15; box-shadow: 0 4px 16px #0006; }
.k-foto-jepret:active { transform: scale(.92); }
.k-foto-kilat { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.k-foto-kilat.nyala { animation: k-foto-kilat .45s ease-out; }
@keyframes k-foto-kilat { from { opacity: .9; } to { opacity: 0; } }
.k-foto-hasil { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; background: rgba(10, 10, 25, .86); }
.k-foto-hasil[hidden] { display: none; }
.k-foto-hasil img { max-width: min(92vw, 720px); max-height: 70vh; border-radius: 14px; border: 4px solid #fff; box-shadow: 0 8px 30px #000a; }
.k-foto-aksi { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.k-foto-aksi button:first-child { background: #facc15; color: #1f1a00; }
@media (hover: none) { .k-foto-kb { display: none; } }
.k-foto-sisi { position: absolute; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; justify-items: center; }
.k-foto-sisi.kanan { right: max(8px, env(safe-area-inset-right)); }
.k-foto-sisi div { display: flex; gap: 6px; }
.k-foto-sisi button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(20, 21, 43, .72); color: #fff; font-size: 18px; touch-action: none; }
.k-foto-sisi button.tekan { background: #facc15; color: #1f1a00; }
.k-foto-analog { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); width: 104px; height: 104px;
  border-radius: 50%; background: rgba(20, 21, 43, .45); border: 2px solid rgba(255, 255, 255, .35); touch-action: none; display: grid; place-items: center; }
.k-foto-analog i { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px #0006; pointer-events: none; }
.k-foto-analog.tekan { background: rgba(20, 21, 43, .6); }
.k-foto-analog.tekan i { background: #facc15; }
@media (max-width: 480px) { .k-foto-analog { width: 92px; height: 92px; } .k-foto-analog i { width: 40px; height: 40px; } }
@media (max-width: 480px) { .k-foto-sisi button { width: 36px; height: 36px; font-size: 15px; } .k-foto-sisi { gap: 4px; } .k-foto-sisi div { gap: 4px; } }

/* ---- HP mendatar (layar pendek): semua lebih ringkas supaya kota tidak tertutup menu.
   Bilah atas tetap satu baris (layar lebar), panel lebih lebar & hampir setinggi layar. */
@media (orientation: landscape) and (max-height: 500px) {
  .k-atas { top: max(6px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); gap: 5px; }
  .k-saya { padding: 4px 10px; border-radius: 11px; max-width: 30vw; }
  .k-saya b { font-size: 12px; line-height: 1.2; }
  .k-saya small { font-size: 9.5px; line-height: 1.25; }
  .k-koin { padding: 4px 9px; border-radius: 11px; column-gap: 5px; }
  .k-koin i { font-size: 15px; }
  .k-koin b { font-size: 12.5px; }
  .k-koin small { font-size: 8.5px; }
  .k-tbl { font-size: 15px; padding: 6px 9px; border-radius: 11px; }
  .k-menu-tbl { min-width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
  .k-online, #emoteTbl, #misiTbl, #peta { padding: 6px 8px !important; }
  .k-online { font-size: 12.5px !important; } .k-online b { font-size: 13px; }
  .k-teks { display: none; }
  .k-badge { top: calc(var(--atasB) + 5px); left: max(8px, env(safe-area-inset-left)); font-size: 9px; padding: 2px 6px; }
  .k-jam { top: calc(var(--atasB) + 24px); left: max(8px, env(safe-area-inset-left)); font-size: 10px; padding: 2px 7px; }
  .k-badan { top: calc(var(--atasB) + 44px); left: max(8px, env(safe-area-inset-left)); padding: 4px 6px; gap: 2px; }
  .k-badan b { width: 56px; height: 5px; }
  .k-badan i { font-size: 10px; }
  .k-tugas { top: calc(var(--atasB) + 6px); font-size: 11.5px; padding: 4px 6px 4px 10px; max-width: min(420px, 50vw); border-radius: 12px; }
  .k-tugas i { font-size: 15px; }
  .k-tugas button { width: 24px; height: 24px; }
  .k-lokasi { top: 18%; font-size: 20px; } .k-lokasi small { font-size: 11px; }
  .k-toast { top: 14%; font-size: 13px; }
  .k-aksi { font-size: 13.5px; padding: 10px 14px; border-radius: 14px; max-width: min(36vw, 300px); }
  .k-emote:not([hidden]) { grid-template-columns: repeat(8, 44px); }
  .k-emote button { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .k-skor { padding: 3px 12px; gap: 10px; } .k-skor b { font-size: 20px; } .k-skor small { font-size: 10px; } .k-skor span { min-width: 52px; }
  .k-gol b { font-size: clamp(40px, 12vh, 64px); }
  /* panel / menu: lebar, hampir setinggi layar, seluruh isi diperkecil sebanding (zoom) supaya tidak banyak menggulir */
  .k-panel { padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); }
  .k-panel-kotak { width: min(760px, calc(100% / .8)); zoom: .8; }
  .k-panel-in { --pad: 16px; max-height: calc((100vh - 12px) / .8); max-height: calc((100dvh - 12px) / .8); }
  .k-setelan-kepala { padding-bottom: 6px; border-radius: 16px 16px 0 0; }
  .k-setelan .k-tab button { grid-auto-flow: column; gap: 5px; padding: 5px 4px; align-items: center; justify-content: center; }
  .k-setelan-isi { min-height: 0; }
  .k-geser { margin: 6px 0; padding: 7px 10px; }
  .k-orang-daftar { max-height: 52vh; }
  .k-kar-pra { height: 150px; }
  .k-saran-arah { top: calc(max(6px, env(safe-area-inset-top)) + 46px); }
}

/* ---- obrolan teks (obrolan.js): tertutup = satu ikon 💬 kecil di kiri (di atas analog) + jumlah pesan baru;
   pesan orang tampil sebagai balon di atas kepala. Terbuka = kotak kecil berisi riwayat singkat & bilah ketik. */
.k-ob { position: fixed; z-index: 12; left: max(10px, env(safe-area-inset-left)); bottom: calc(max(22px, env(safe-area-inset-bottom)) + 40px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
body.sentuh .k-ob { bottom: calc(max(22px, env(safe-area-inset-bottom)) + var(--joy, 130px) + 12px); }
.k-ob > * { pointer-events: auto; }
.k-ob-fab { position: relative; order: 2; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: rgba(20, 21, 43, .62);
  color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; backdrop-filter: blur(6px); }
.k-ob-fab.on { background: #facc15; border-color: #ca8a04; }
.k-ob-fab i { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff;
  font: 800 10.5px/18px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #14152b; }
.k-ob-fab i[hidden], .k-ob-panel[hidden] { display: none; }
.k-ob-panel { order: 1; width: min(300px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 5px; }
.k-ob-riwayat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-height: 128px; overflow-y: auto; padding: 5px; border-radius: 12px;
  background: rgba(20, 21, 43, .5); backdrop-filter: blur(6px); -webkit-user-select: text; user-select: text; }
.k-ob-riwayat:empty { display: none; }
.k-ob-baris { max-width: 100%; padding: 2px 8px; border-radius: 9px; background: rgba(20, 21, 43, .6); font-size: 12px; line-height: 1.35;
  overflow-wrap: anywhere; cursor: pointer; animation: k-ob-masuk .2s ease-out; }
.k-ob-baris b { color: #93c5fd; font-weight: 800; }
.k-ob-baris b.pr { color: #fde047; }
.k-ob-baris b.st { color: #c4b5fd; }
.k-ob-baris.saya b { color: #86efac; }
.k-ob-baris.sistem { background: rgba(127, 29, 29, .8); font-weight: 700; }
.k-ob-aksi { display: flex; gap: 5px; margin: 3px 0 1px; }
.k-ob-aksi button { border: 0; border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; background: #f9fafb; color: #1f2937; }
.k-ob-aksi button:last-child { background: #fee2e2; color: #991b1b; }
@keyframes k-ob-masuk { from { opacity: 0; transform: translateY(4px); } }
.k-ob-bilah { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(20, 21, 43, .85); backdrop-filter: blur(8px); }
.k-ob-bilah[hidden], .k-ob-izin[hidden] { display: none; }
/* 16px: Safari tidak memperbesar halaman saat kotak ketik disentuh */
.k-ob-bilah input { flex: 1; min-width: 0; border: 0; border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 16px; background: #fff; color: #111827;
  -webkit-user-select: text; user-select: text; outline: none; }
.k-ob-bilah button { flex: none; border: 0; border-radius: 9px; width: 32px; font: inherit; font-size: 14px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); }
.k-ob-bilah .k-ob-kirim { background: #facc15; color: #1f1a00; font-weight: 900; }
.k-ob-izin { padding: 10px 12px; border-radius: 12px; background: #fff; color: #1f2937; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); font-size: 12.5px; }
.k-ob-izin p { margin: 4px 0 8px; line-height: 1.4; color: #4b5563; }
.k-ob-izin div { display: flex; gap: 6px; flex-wrap: wrap; }
.k-ob-izin .k-btn { padding: 6px 12px; font-size: 12.5px; }
/* HP: saat mengetik, kotak pindah ke atas (keyboard menutup bagian bawah); bilah di atas riwayat */
body.sentuh.ob-buka .k-ob { bottom: auto; top: calc(var(--atasB) + 6px); }
body.sentuh.ob-buka .k-ob-fab { display: none; }
body.sentuh.ob-buka .k-ob-bilah, body.sentuh.ob-buka .k-ob-izin { order: -1; }
body.ob-buka .k-saran-arah { display: none; }
body.sinema .k-ob, body.foto .k-ob, body.rekam .k-ob, body.pratinjau .k-ob, body.atur .k-ob, body.tenis .k-ob-fab, body.penalti .k-ob-fab { display: none; }
body:has(#panel:not([hidden])) .k-ob { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .k-ob-fab { width: 34px; height: 34px; font-size: 15px; }
  .k-ob-riwayat { max-height: 84px; }
}
/* ---- panel info pemain lain (kartu-pemain.js) */
.k-kp-kepala { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-right: 30px; }
.k-kp-kepala h3 { margin: 0 0 2px; }
.k-kp-kepala small { display: block; color: #6b7280; font-size: 12.5px; line-height: 1.4; }
.k-kp-foto { flex: none; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: linear-gradient(135deg, #e0e7ff, #fef3c7); border: 2px solid #e5e7eb; }
.k-kp-foto.inisial { display: grid; place-items: center; font-size: 28px; color: #4338ca; }
.k-kp-angka { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 10px; }
.k-kp-angka span { display: grid; justify-items: center; gap: 1px; padding: 7px 4px; border-radius: 12px; background: #f9fafb; border: 1px solid #f1f5f9; text-align: center; }
.k-kp-angka b { font-size: 14px; color: #1f2937; overflow-wrap: anywhere; }
.k-kp-angka small { font-size: 10.5px; color: #6b7280; }
.k-kp-gelar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.k-kp-gelar span { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fef9c3; color: #854d0e; }
.k-kp-cap { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; font-size: 20px; }
.k-kp-ktp { display: block; width: 100%; border-radius: 14px; margin: 4px 0 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); min-height: 120px; background: #f3f4f6; }
.k-kp-lihat { width: 100%; margin-bottom: 10px; }
.k-kp-aksi { display: flex; flex-wrap: wrap; gap: 6px; }
.k-kp-aksi .k-btn { flex: 1 1 auto; font-size: 13.5px; padding: 9px 12px; }
.k-kp-aksi .bahaya-teks { color: #b91c1c; }
@media (max-width: 420px) { .k-kp-angka { grid-template-columns: repeat(2, 1fr); } }
