@font-face { font-family: Jakarta; src: url(/fonts/PlusJakartaSans_500Medium.ttf); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Jakarta; src: url(/fonts/PlusJakartaSans_700Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Jakarta; src: url(/fonts/PlusJakartaSans_800ExtraBold.ttf); font-weight: 800 900; font-display: swap; }

:root {
  --navy: #0B1F4D;
  --navy2: #1E3A8A;
  --biru: #2563EB;
  --langit: #E8EFFD;
  --kuning: #FFC53D;
  --hijau: #16A34A;
  --wa: #25D366;
  --merah: #DC2626;
  --bg: #F5F7FB;
  --garis: #E3E8F2;
  --redup: #66708A;
  --kartu: #fff;
  --bayang: 0 8px 24px rgba(11, 31, 77, .07);
  --r: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--navy);
  font: 500 16px/1.5 Jakarta, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--biru); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 8vw, 48px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
.redup { color: var(--redup); }
.kecil-teks { font-size: 13px; }
[hidden] { display: none !important; }

.maskot { width: 96px; height: 96px; background: url(/maskot.svg) center / contain no-repeat; flex: none; }
.maskot.kecil { width: 34px; height: 34px; }
.maskot.besar { width: 150px; height: 150px; }
.goyang { animation: goyang 2.4s ease-in-out infinite; }
@keyframes goyang { 50% { transform: translateY(-6px) rotate(-3deg); } }

/* ---------- kop & kaki ---------- */
.kop {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--garis);
}
.merek { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 18px; margin-right: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--navy); font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 12px; }
.nav a.aktif:not(.tombol) { background: var(--langit); }
@media (max-width: 420px) { .nav a[href="/saya"] { display: none; } }

.isi { width: 100%; max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; flex: 1; }
.kaki { text-align: center; padding: 28px 16px 40px; border-top: 1px solid var(--garis); background: #fff; font-size: 14px; }
.kaki .maskot { margin: 0 auto 6px; }
.kaki .tautan { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- tombol ---------- */
.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--navy); color: #fff !important; font: 700 16px Jakarta, sans-serif;
  transition: transform .1s, opacity .2s; -webkit-tap-highlight-color: transparent; text-align: center;
}
.tombol:active { transform: scale(.98); }
.tombol:disabled { opacity: .45; cursor: default; }
.tombol.kecil { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.tombol.penuh { width: 100%; }
.tombol.garis { background: #fff; color: var(--navy) !important; border: 1.5px solid var(--garis); }
.tombol.wa { background: var(--wa); color: #06361A !important; }
.tombol.kuning { background: var(--kuning); color: var(--navy) !important; }
.tombol.hapus { background: #fff; color: var(--merah) !important; border: 1.5px solid #F5C2C2; }
.baris-tombol { display: flex; gap: 10px; flex-wrap: wrap; }
.baris-tombol > * { flex: 1 1 140px; }

/* ---------- kartu & umum ---------- */
.kartu { background: var(--kartu); border: 1px solid var(--garis); border-radius: var(--r); box-shadow: var(--bayang); padding: 18px; }
.lencana { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--langit); color: var(--biru); font-size: 12px; font-weight: 800; }
.judul-bagian { display: flex; align-items: center; gap: 8px; margin: 30px 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.judul-bagian::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--kuning); }
.judul-bagian a { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 14px; }

/* ---------- beranda ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px 22px;
  background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; box-shadow: 0 16px 40px rgba(11, 31, 77, .25);
  display: grid; gap: 10px;
}
.hero h1 span { color: var(--kuning); }
.hero p { color: #C9D6F5; max-width: 34em; }
.hero .maskot { position: absolute; right: -10px; bottom: -14px; width: 150px; height: 150px; opacity: .95; }
.hero .tombol { width: fit-content; position: relative; z-index: 1; }
.hero .fitur { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; max-width: 70%; }
.hero .fitur span { background: rgba(255, 255, 255, .12); padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; }
@media (min-width: 700px) { .hero { padding: 44px 40px; } .hero .maskot { width: 230px; height: 230px; right: 30px; bottom: 10px; } }

.langkah-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.langkah-grid .kartu { display: flex; gap: 14px; align-items: flex-start; }
.nomor { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--langit); color: var(--navy); font-weight: 800; }

/* ---------- galeri ---------- */
.grid-stiker { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-stiker { grid-template-columns: repeat(4, 1fr); } }
.kotak-stiker { background: #fff; border: 1px solid var(--garis); border-radius: 18px; overflow: hidden; box-shadow: var(--bayang); display: flex; flex-direction: column; }
.kotak-stiker .media { position: relative; aspect-ratio: 1; background: #EDF1F8; cursor: pointer; }
.kotak-stiker video, .kotak-stiker img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kotak-stiker .putar {
  position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(11, 31, 77, .85); color: #fff; display: grid; place-items: center; font-size: 15px; pointer-events: none;
}
.kotak-stiker .durasi { position: absolute; left: 8px; top: 8px; background: rgba(11, 31, 77, .8); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.kotak-stiker .bawah { padding: 10px 12px 12px; display: grid; gap: 8px; }
.kotak-stiker .nama { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kotak-stiker .info { font-size: 12px; color: var(--redup); }
.tab { display: inline-flex; background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 4px; gap: 4px; }
.tab button { border: 0; background: none; padding: 9px 16px; border-radius: 10px; font: 700 14px Jakarta, sans-serif; color: var(--redup); cursor: pointer; }
.tab button.aktif { background: var(--navy); color: #fff; }
.tab.penuh { display: flex; } .tab.penuh button { flex: 1; }
.kosong { text-align: center; padding: 40px 16px; color: var(--redup); }
.kosong .maskot { margin: 0 auto 12px; }

/* ---------- pembuat ---------- */
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.stepper div { font-size: 12px; font-weight: 700; color: var(--redup); }
.stepper div::before { content: ""; display: block; height: 5px; border-radius: 9px; background: var(--garis); margin-bottom: 6px; }
.stepper div.aktif { color: var(--navy); }
.stepper div.aktif::before, .stepper div.lewat::before { background: var(--navy); }
.stepper div.lewat { color: var(--navy); }

.zona-unggah {
  display: grid; place-items: center; gap: 8px; text-align: center; padding: 36px 16px; border-radius: 22px;
  border: 2px dashed #C7D2E8; background: #fff; cursor: pointer; transition: border-color .2s, background .2s;
}
.zona-unggah:hover, .zona-unggah.seret { border-color: var(--biru); background: #F7FAFF; }
.zona-unggah .ikon { font-size: 38px; }
.bilah { height: 8px; background: var(--garis); border-radius: 9px; overflow: hidden; }
.bilah > i { display: block; height: 100%; width: 0; background: var(--biru); border-radius: 9px; transition: width .3s; }

label.isian { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input[type=text], input[type=url], input[type=password], textarea {
  width: 100%; font: 600 16px Jakarta, sans-serif; color: var(--navy); padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--garis); background: #fff; outline: none;
}
input:focus, textarea:focus { border-color: var(--biru); }
textarea { resize: vertical; min-height: 80px; }
.cek { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cek input { width: 22px; height: 22px; accent-color: var(--navy); }

.potong {
  position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto; border-radius: 22px; overflow: hidden;
  background: repeating-conic-gradient(#EDF1F8 0 25%, #fff 0 50%) 0 0 / 24px 24px; touch-action: none; cursor: grab;
  box-shadow: inset 0 0 0 2px var(--garis);
}
.potong > img, .potong > video { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.potong::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to right, transparent 33%, rgba(255,255,255,.35) 33%, rgba(255,255,255,.35) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255,255,255,.35) 66%, rgba(255,255,255,.35) calc(66% + 1px), transparent calc(66% + 1px)),
  linear-gradient(to bottom, transparent 33%, rgba(255,255,255,.35) 33%, rgba(255,255,255,.35) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255,255,255,.35) 66%, rgba(255,255,255,.35) calc(66% + 1px), transparent calc(66% + 1px)); }
.potong .tombol-putar {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--navy); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.petunjuk { text-align: center; font-size: 13px; color: var(--redup); margin: 8px 0 0; }

input[type=range] { width: 100%; accent-color: var(--navy); height: 28px; }

.trim { position: relative; height: 54px; border-radius: 14px; background: #EDF1F8; margin: 8px 0 4px; touch-action: none; user-select: none; overflow: hidden; }
.trim .gelombang { position: absolute; inset: 0; width: 100%; height: 100%; }
.trim .jendela { position: absolute; top: 0; bottom: 0; border: 3px solid var(--navy); border-radius: 12px; background: rgba(37, 99, 235, .1); cursor: grab; }
.trim .pegangan { position: absolute; top: 0; bottom: 0; width: 22px; background: var(--navy); cursor: ew-resize; display: grid; place-items: center; }
.trim .pegangan::after { content: ""; width: 3px; height: 18px; border-radius: 3px; background: #fff; }
.trim .pegangan.kiri { left: -3px; border-radius: 10px 0 0 10px; }
.trim .pegangan.kanan { right: -3px; border-radius: 0 10px 10px 0; }
.trim .kepala { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--kuning); pointer-events: none; }
.trim-info { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--redup); font-weight: 600; white-space: nowrap; }
.trim-info b { color: var(--navy); }

.pilihan-suara { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.pilihan-suara button {
  border: 1.5px solid var(--garis); background: #fff; border-radius: 14px; padding: 12px 8px; font: 700 14px Jakarta, sans-serif;
  color: var(--navy); cursor: pointer; display: grid; gap: 4px; justify-items: center;
}
.pilihan-suara button span { font-size: 22px; }
.pilihan-suara button.aktif { border-color: var(--navy); background: var(--langit); }
.rekam { display: flex; align-items: center; gap: 12px; }
.rekam .titik { width: 14px; height: 14px; border-radius: 50%; background: var(--merah); animation: kedip 1s infinite; }
@keyframes kedip { 50% { opacity: .2; } }

.warna-baris { display: flex; flex-wrap: wrap; gap: 10px; }
.warna-baris button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--garis); cursor: pointer; }
.warna-baris button.aktif { border: 3px solid var(--biru); transform: scale(1.08); }
.emoji-baris { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-baris button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--garis); background: #fff; font-size: 22px; cursor: pointer; }
.emoji-baris button.aktif { border-color: var(--navy); background: var(--langit); }
.kanvas-teks { width: min(100%, 300px); aspect-ratio: 1; display: block; margin: 0 auto; border-radius: 22px; box-shadow: var(--bayang); }

.tumpuk { display: grid; gap: 16px; }
.dua-kolom { display: grid; gap: 18px; }
@media (min-width: 860px) { .dua-kolom { grid-template-columns: 1fr 1fr; align-items: start; } }
.lipat > summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.lipat > summary::after { content: "▾"; color: var(--redup); }
.lipat[open] > summary::after { content: "▴"; }

/* ---------- proses & hasil ---------- */
.layar-proses { position: fixed; inset: 0; z-index: 50; background: rgba(245, 247, 251, .96); display: grid; place-items: center; padding: 24px; text-align: center; }
.layar-proses .kotak { width: min(100%, 380px); display: grid; gap: 12px; justify-items: center; }
.layar-proses .bilah { width: 100%; }

.hasil { display: grid; gap: 16px; max-width: 520px; margin: 0 auto; }
.hasil .media-besar { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 0 auto; border-radius: 26px; overflow: hidden; background: #EDF1F8; box-shadow: var(--bayang); cursor: pointer; }
.hasil .media-besar video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hasil .media-besar .putar { position: absolute; right: 14px; bottom: 14px; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 22px; pointer-events: none; }
.hasil .kode { font: 800 28px Jakarta, monospace; letter-spacing: .2em; color: var(--navy); }
.catatan { display: flex; gap: 10px; align-items: flex-start; background: #FFF8E6; border: 1px solid #FBE3A6; border-radius: 16px; padding: 12px 14px; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center;
}
.error { color: var(--merah); font-weight: 700; font-size: 14px; }
.memuat { display: grid; place-items: center; padding: 50px; }
.putaran { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--garis); border-top-color: var(--navy); animation: putar 0.8s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin td, table.admin th { padding: 8px; border-bottom: 1px solid var(--garis); text-align: left; vertical-align: middle; }
table.admin img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
