:root {
  --hijau: #1f7a82; --hijau-tua: #155e64; --oranye: #ff7a1a; --tinta: #1f2430; --abu: #6b7280;
  --kertas: rgba(255, 253, 248, 0.94); --garis: rgba(31, 36, 48, 0.1); --bayang: 0 10px 34px rgba(31, 36, 48, 0.2);
  --koran: #fbf6ea; --koran-tinta: #2b2620;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #4fb3e8; color: var(--tinta); font: 15px/1.45 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
canvas#peta { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
canvas#peta.geser { cursor: grabbing; }
h2, h3, .pil b { font-family: "Baloo 2", system-ui, sans-serif; }
h2 { font-size: 23px; margin: 0 0 4px; line-height: 1.15; } h3 { font-size: 17px; margin: 16px 0 8px; }
.ket { color: var(--abu); margin: 0 0 12px; font-size: 14px; }
button { font-family: inherit; color: inherit; }

.pil { display: inline-flex; align-items: center; gap: 8px; background: var(--kertas); backdrop-filter: blur(10px); border-radius: 16px; box-shadow: var(--bayang); padding: 8px 14px; border: 0; font: inherit; }
button.pil { cursor: pointer; }
.pil b { font-size: 17px; line-height: 1; }
.pil small { display: block; color: var(--abu); font-size: 11.5px; font-weight: 700; line-height: 1.2; }

#kiriAtas { position: fixed; top: 12px; left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 5; }
.logo { padding: 6px 14px 6px 6px; text-align: left; }
.logo .lambang { width: 38px; height: 38px; display: grid; place-items: center; background: var(--hijau); border-radius: 12px; font-size: 21px; }
.logo b { font-size: 20px; }
#bMisi .titik { background: #fff1e6; color: #e25f00; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.radio-mini { padding: 6px 6px 6px 12px; background: #2b1d14; color: #fff; }
.radio-mini .onair { color: #ff5a4f; font-weight: 800; font-size: 11px; animation: kedip 1.4s infinite; }
.radio-mini small { color: #e9c9a8; } .radio-mini b { font-size: 15px; }
.radio-mini button { width: 30px; height: 30px; border-radius: 10px; border: 0; background: #4a3426; color: #fff; cursor: pointer; }
@keyframes kedip { 50% { opacity: .35; } }

#kananAtas { position: fixed; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 5; }
.jam { padding: 7px 14px; } .jam > span:first-child { font-size: 22px; }
.rel { display: flex; flex-direction: column; gap: 6px; background: var(--kertas); padding: 6px; border-radius: 18px; box-shadow: var(--bayang); }
.rel button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--hijau); color: #fff; font-size: 16px; cursor: pointer; }
.rel button:hover { background: var(--hijau-tua); }

.acara-pil { font-weight: 800; font-size: 13px; cursor: pointer; }
.live-pil { background: #e5484d; color: #fff; font-weight: 800; text-decoration: none; font-size: 13px; animation: kedip 1.6s infinite; }
/* panel Aku */
.dompet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.dompet div { background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 10px; text-align: center; }
.dompet b { display: block; font-family: "Baloo 2", sans-serif; font-size: 19px; } .dompet small { color: var(--abu); font-size: 11.5px; font-weight: 700; }
.bar-xp { height: 8px; background: #e6eef0; border-radius: 99px; overflow: hidden; margin: 4px 0 10px; } .bar-xp i { display: block; height: 100%; background: linear-gradient(90deg, #1f7a82, #4fd1c5); }
.tugas { display: grid; gap: 8px; }
.tugas .kotak { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; } .tugas .kotak > span:first-child { font-size: 24px; } .tugas .kotak .isi { flex: 1 1 200px; min-width: 0; }
.dlg { overflow-x: hidden; }
.kuis-opsi { display: grid; gap: 6px; margin-top: 8px; } .kuis-opsi button { text-align: left; border: 2px solid var(--garis); background: #fff; border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; font-weight: 700; }
.kuis-opsi button:hover:not(:disabled) { border-color: var(--hijau); } .kuis-opsi button.benar { border-color: #16a34a; background: #eefaf3; } .kuis-opsi button.salah { border-color: #e5484d; background: #fff0f0; }
.toko { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toko button { display: flex; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--garis); background: #fff; border-radius: 14px; padding: 9px 10px; cursor: pointer; font: inherit; }
.toko button:hover:not(:disabled) { border-color: var(--hijau); } .toko button:disabled { opacity: .55; cursor: default; }
.toko button i { font-style: normal; font-size: 24px; } .toko small { display: block; color: var(--abu); font-size: 12px; }
.editor-ava { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; }
.editor-ava canvas { width: 140px; height: 170px; background: linear-gradient(#e9f6f6, #d6efe5); border-radius: 16px; }
.pilih-ava { display: grid; gap: 6px; } .pilih-ava label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.pilih-ava .sw { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pilih-ava .sw button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--garis); cursor: pointer; }
.pilih-ava .sw button.aktif { box-shadow: 0 0 0 2px var(--hijau); }
.pilih-ava select { font: inherit; border: 1px solid var(--garis); border-radius: 10px; padding: 4px 8px; }
.ktw-kode { font-family: "Baloo 2", sans-serif; font-size: 34px; letter-spacing: .08em; text-align: center; background: #fff; border: 2px dashed var(--hijau); border-radius: 14px; padding: 6px; margin: 8px 0; }
.tab-mini { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; } .tab-mini button { flex: 1 1 18%; white-space: nowrap; border: 0; padding: 7px; border-radius: 10px; background: #eef0f2; font-weight: 700; cursor: pointer; font: inherit; font-size: 13px; } .tab-mini button.aktif { background: var(--hijau); color: #fff; }
.badge-ktw { color: #16a34a; font-weight: 800; }
#pesawatPil { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; }
#pesawatPil b { font-size: 15px; }
#status { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 9; background: #fff4e5; color: #9a4a00; font-weight: 700; font-size: 13px; }

#dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: var(--kertas); backdrop-filter: blur(10px); border-radius: 20px; box-shadow: var(--bayang); padding: 6px; z-index: 6; max-width: calc(100% - 24px); }
#fCari { position: relative; display: flex; align-items: center; gap: 6px; padding-left: 10px; border-right: 1px solid var(--garis); padding-right: 6px; }
#fCari input { width: 210px; border: 0; background: transparent; font: inherit; outline: none; padding: 8px 2px; }
#fCari button { border: 0; background: var(--hijau); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 12px; cursor: pointer; }
#hasilCari { position: absolute; bottom: calc(100% + 12px); left: 0; width: 320px; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 16px; box-shadow: var(--bayang); max-height: 50vh; overflow-y: auto; }
#hasilCari li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
#hasilCari li:hover, #hasilCari li.aktif { background: #eef7f7; }
#hasilCari small { display: block; color: var(--abu); font-size: 12px; }
.tombol-dock { display: flex; gap: 2px; }
.tombol-dock button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: transparent; padding: 5px 9px; border-radius: 12px; cursor: pointer; font-size: 11.5px; font-weight: 700; color: #475060; }
.tombol-dock button i { font-style: normal; font-size: 19px; line-height: 1.1; }
.tombol-dock button:hover { background: #eef7f7; }
.tombol-dock button.utama { background: var(--oranye); color: #fff; }
.tombol-dock button.utama:hover { background: #e25f00; }
.tombol-dock .baru { position: absolute; top: 3px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; }

#latar { position: fixed; inset: 0; background: rgba(15, 25, 40, .28); z-index: 7; }
.dlg { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: min(78vh, 760px); overflow-y: auto; background: var(--kertas); border-radius: 24px; box-shadow: var(--bayang); padding: 20px 22px; z-index: 8; animation: muncul .2s ease-out; }
.dlg .tutup, #kartu .tutup { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #eef0f2; cursor: pointer; font-size: 15px; z-index: 2; }
@keyframes muncul { from { opacity: 0; transform: translate(-50%, -46%); } }
.dlg.koran { background: var(--koran); color: var(--koran-tinta); width: min(620px, calc(100% - 24px)); }

input.isian, textarea { width: 100%; border: 2px solid var(--garis); border-radius: 14px; padding: 10px 12px; font: inherit; background: #fff; outline: none; resize: vertical; }
input.isian:focus, textarea:focus { border-color: var(--hijau); }
.baris { display: flex; gap: 8px; align-items: stretch; }
.tombol { border: 0; background: var(--hijau); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: 14px; cursor: pointer; white-space: nowrap; font-size: 14.5px; }
.tombol:hover { background: var(--hijau-tua); } .tombol:disabled { opacity: .5; cursor: default; }
.tombol.oranye { background: var(--oranye); } .tombol.oranye:hover { background: #e25f00; }
.tombol.abu { background: #eef0f2; color: var(--tinta); }
.kotak { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--garis); margin: 10px 0; }
.kotak.ok { background: #eefaf3; border-color: #9fd8b5; } .kotak.salah { background: #fff0f0; border-color: #f2b8b5; color: #a32a26; }

ul.list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
ul.list li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: #fff; border: 1px solid var(--garis); border-radius: 14px; }
ul.list li.klik { cursor: pointer; } ul.list li.klik:hover { border-color: var(--hijau); }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: "Baloo 2", sans-serif; font-size: 16px; }
.isi { min-width: 0; flex: 1; } .isi b { display: block; } .isi small { color: var(--abu); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lencana { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: #e6f4f4; color: var(--hijau-tua); white-space: nowrap; }
.lencana.terbang { background: #fff1e6; color: #c25100; } .lencana.demo { background: #f1f2f4; color: var(--abu); }

/* pesan warga */
.grid-pesan { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.grid-pesan article { background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; }
.grid-pesan article header { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; margin-bottom: 4px; }
.grid-pesan article header b { color: var(--hijau-tua); } .grid-pesan article header small { color: var(--abu); }
.hitung { text-align: right; color: var(--abu); font-size: 12px; }

/* voting */
.opsi { position: relative; display: block; width: 100%; text-align: left; border: 2px solid var(--garis); background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; overflow: hidden; font: inherit; }
.opsi:hover:not(:disabled) { border-color: var(--hijau); } .opsi:disabled { cursor: default; }
.opsi.pilihanku { border-color: var(--hijau); }
.opsi .bar { position: absolute; inset: 0 auto 0 0; background: #d7efef; transition: width .6s; }
.opsi span { position: relative; display: flex; justify-content: space-between; font-weight: 700; }

/* koran */
.koran .kop { text-align: center; border-bottom: 3px double var(--koran-tinta); padding-bottom: 8px; margin-bottom: 10px; }
.koran .kop small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7a6f60; }
.koran .kop h2 { font-family: "Playfair Display", Georgia, serif; font-size: 36px; margin: 2px 0; }
.koran .kop .moto { font-style: italic; color: #7a6f60; font-size: 13px; }
.koran .meta { display: flex; justify-content: space-between; font-size: 12px; border-bottom: 1px solid #d9cfbd; padding-bottom: 8px; margin-bottom: 12px; color: #5d5446; }
.koran .rubrik { display: inline-block; background: #b23a48; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.koran h3 { font-family: "Playfair Display", Georgia, serif; font-size: 25px; line-height: 1.15; margin: 6px 0; }
.koran p { margin: 0 0 10px; }
.koran .kolom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid #d9cfbd; padding-top: 10px; margin-top: 10px; }
.koran ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.koran blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #b23a48; background: #f4ecdc; font-size: 13.5px; }
.edisi-tab { display: flex; gap: 4px; margin-bottom: 10px; }
.edisi-tab span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 5px; border-radius: 8px; background: #efe6d3; color: #7a6f60; }
.edisi-tab span.ini { background: var(--koran-tinta); color: #fff; }

/* radio */
.radio-panel { text-align: center; }
.piringan { width: 150px; height: 150px; margin: 6px auto 12px; border-radius: 50%; background: repeating-radial-gradient(circle, #222 0 3px, #333 3px 5px); display: grid; place-items: center; box-shadow: var(--bayang); }
.piringan span { width: 52px; height: 52px; border-radius: 50%; background: var(--oranye); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.piringan.putar { animation: putar 3.5s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }

/* misi */
.misi li { justify-content: space-between; }
.misi li.selesai { background: #eefaf3; border-color: #9fd8b5; }
.misi li.selesai b { text-decoration: line-through; color: var(--abu); }

/* kartu gedung / warga */
#kartu { position: fixed; left: 12px; bottom: 90px; width: 320px; background: var(--kertas); backdrop-filter: blur(10px); border-radius: 22px; box-shadow: var(--bayang); padding: 16px 18px; z-index: 6; animation: naik .25s ease-out; }
#kartu .kepala { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding-right: 30px; }
#kartu .kepala .avatar { width: 50px; height: 50px; font-size: 24px; }
#kartu dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0 0 10px; font-size: 14px; }
#kartu dt { color: var(--abu); } #kartu dd { margin: 0; font-weight: 700; }
#kartu .penghuni { max-height: 180px; overflow-y: auto; }
@keyframes naik { from { transform: translateY(14px); opacity: 0; } }

#toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 11px 18px; border-radius: 16px; font-weight: 700; z-index: 10; box-shadow: var(--bayang); animation: naik .3s; max-width: calc(100% - 32px); text-align: center; }
#pemeliharaan { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(15, 25, 40, .55); color: #fff; text-align: center; padding: 20px; }

@media (max-width: 760px) {
  #kiriAtas { top: 8px; left: 8px; } #kananAtas { top: 8px; right: 8px; }
  .logo b { font-size: 16px; } .logo .lambang { width: 32px; height: 32px; }
  #bMisi b { display: none; }
  .rel { display: none; }
  #pesawatPil { top: auto; bottom: 128px; } #pesawatPil b { font-size: 13px; }
  #dock { flex-direction: column; align-items: stretch; width: calc(100% - 16px); bottom: 8px; }
  #fCari { border-right: 0; border-bottom: 1px solid var(--garis); padding-bottom: 6px; }
  #fCari input { width: 100%; flex: 1; }
  #hasilCari { width: 100%; }
  .tombol-dock { justify-content: space-between; } .tombol-dock button { padding: 4px 6px; }
  #kartu { left: 8px; right: 8px; width: auto; bottom: 150px; }
  .grid-pesan, .koran .kolom { grid-template-columns: 1fr; }
  .dlg { max-height: calc(100% - 180px); top: 46%; }
}
