:root {
  --latar: #14121a; --kartu: #1e1b26; --kartu2: #282433; --garis: #34303f;
  --teks: #f2eff7; --redup: #a19cae; --aksen: #ff8a2a; --aksen2: #ffb35c; --hijau: #4ade80; --merah: #f87171;
  --atas: env(safe-area-inset-top, 0px); --bawah: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { background: var(--latar); color: var(--teks); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

header { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--atas) + 10px) 16px 10px; border-bottom: 1px solid var(--garis); }
.judul b { font-size: 18px; letter-spacing: .08em; color: var(--aksen); }
.judul small { margin-left: 8px; color: var(--redup); font-size: 11px; letter-spacing: .12em; }
.sinkron { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--redup); background: var(--kartu); padding: 6px 11px; border-radius: 99px; }
.sinkron i { width: 8px; height: 8px; border-radius: 50%; background: var(--redup); }
.sinkron.ok i { background: var(--hijau); box-shadow: 0 0 8px var(--hijau); }
.sinkron.tunggu i { background: var(--aksen); box-shadow: 0 0 8px var(--aksen); }
.sinkron.mati i { background: var(--merah); }
.sinkron.jalan i { animation: denyut 1s infinite; }
@keyframes denyut { 50% { opacity: .3; } }

main { flex: 1; overflow: hidden; position: relative; }
.hal { display: none; height: 100%; overflow-y: auto; padding: 16px 16px 24px; }
.hal.aktif { display: block; }
#h-hex.aktif { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
h1 { font-size: 22px; margin-bottom: 12px; }
h2 { font-size: 15px; margin-bottom: 10px; }
h2 small { color: var(--redup); font-weight: 400; font-size: 12px; margin-left: 6px; }
.redup { color: var(--redup); } .kecil { font-size: 12.5px; margin-top: 8px; } .tengah { text-align: center; }

.panggung { height: 30vh; min-height: 150px; max-height: 260px; display: flex; justify-content: center; align-items: flex-end; background: radial-gradient(ellipse at 50% 90%, #2c2238 0%, transparent 70%); flex-shrink: 0; }
.maskot { width: min(62vw, 240px); height: 100%; position: relative; }
.maskot canvas, .maskot svg { width: 100%; height: 100%; display: block; }
.maskot .zzz { display: none; }
.obrolan { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.gel { max-width: 85%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; animation: muncul .2s ease-out; }
@keyframes muncul { from { opacity: 0; transform: translateY(6px); } }
.gel.saya { align-self: flex-end; background: var(--aksen); color: #1a1208; border-bottom-right-radius: 4px; }
.gel.hex { align-self: flex-start; background: var(--kartu2); border-bottom-left-radius: 4px; }
.gel small { display: block; font-size: 11px; opacity: .7; margin-top: 3px; }
.gel.laptop { border: 1px dashed var(--aksen2); }
.usul { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px; flex-shrink: 0; scrollbar-width: none; }
.usul::-webkit-scrollbar { display: none; }
.usul button { flex-shrink: 0; background: var(--kartu); border: 1px solid var(--garis); padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--redup); }
.kotakPerintah { display: flex; gap: 8px; padding: 8px 12px 10px; flex-shrink: 0; }
.kotakPerintah input { flex: 1; min-width: 0; background: var(--kartu); border: 1px solid var(--garis); border-radius: 99px; padding: 11px 16px; outline: none; }
.kotakPerintah input:focus { border-color: var(--aksen); }
.mik, .tujuan { width: 46px; height: 46px; border-radius: 50%; background: var(--kartu2); font-size: 20px; flex-shrink: 0; }
.mik { background: var(--aksen); }
.mik.dengar { animation: denyut .8s infinite; background: var(--merah); }
.tujuan.laptop { background: #3a2a14; outline: 2px solid var(--aksen); }

.tambah { display: flex; gap: 8px; margin-bottom: 12px; }
.tambah input, select { flex: 1; min-width: 0; background: var(--kartu); border: 1px solid var(--garis); border-radius: 12px; padding: 10px 12px; outline: none; }
select { width: 100%; }
.tambah input[type=time] { flex: 0 0 auto; }
.tambah button { background: var(--aksen); color: #1a1208; font-weight: 700; border-radius: 12px; padding: 0 16px; min-width: 46px; }
.daftar { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.daftar li { background: var(--kartu); border-radius: 12px; padding: 11px 12px; display: flex; gap: 10px; align-items: flex-start; }
.daftar.ringkas li { padding: 8px 10px; background: var(--kartu2); }
.daftar li .isi { flex: 1; min-width: 0; word-wrap: break-word; }
.daftar li small { display: block; color: var(--redup); font-size: 11.5px; margin-top: 2px; }
.daftar li.selesai .isi { text-decoration: line-through; color: var(--redup); }
.daftar .x { color: var(--redup); font-size: 18px; line-height: 1; padding: 2px 4px; }
.daftar .cek { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--aksen); flex-shrink: 0; margin-top: 1px; }
.daftar li.selesai .cek { background: var(--aksen); }
.daftar .kosong { background: none; color: var(--redup); justify-content: center; font-size: 13px; }
.daftar .sak { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--garis); }
.daftar .sak.on { background: var(--aksen); color: #1a1208; }

.kartu { background: var(--kartu); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.air { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.batang { flex: 1; height: 12px; background: var(--kartu2); border-radius: 99px; overflow: hidden; }
.batang i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #38bdf8, #60a5fa); transition: width .3s; }
.baris-tombol { display: flex; gap: 8px; flex-wrap: wrap; }
.tombol { background: var(--kartu2); border: 1px solid var(--garis); padding: 8px 14px; border-radius: 10px; font-size: 14px; }
.tombol.hantu { background: none; color: var(--redup); }
.tombol.kecil { margin-top: 12px; font-size: 13px; }
.sholat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sholat div { background: var(--kartu2); border-radius: 10px; padding: 7px; text-align: center; font-size: 12px; color: var(--redup); }
.sholat div b { display: block; font-size: 15px; color: var(--teks); }
.sholat div.berikut { outline: 2px solid var(--aksen); }
.saklar { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.saklar input { width: 20px; height: 20px; accent-color: var(--aksen); }

nav { display: flex; border-top: 1px solid var(--garis); padding-bottom: var(--bawah); background: var(--latar); }
nav button { flex: 1; padding: 8px 0 9px; font-size: 11px; color: var(--redup); display: flex; flex-direction: column; align-items: center; gap: 1px; }
nav button i { font-style: normal; font-size: 19px; filter: grayscale(1); opacity: .7; }
nav button.aktif { color: var(--aksen); }
nav button.aktif i { filter: none; opacity: 1; }
.toast { position: fixed; left: 50%; bottom: calc(80px + var(--bawah)); transform: translateX(-50%) translateY(20px); background: var(--kartu2); border: 1px solid var(--garis); padding: 9px 16px; border-radius: 99px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.ada { opacity: 1; transform: translateX(-50%); }
