/* Saluran — ucapan ulang tahun di TV tabung jadul: tombol merah remote menyalakan TV, kamera maju ke layar, tiap channel menayangkan kejutan (video, berita kilat, cuaca, album, iklan). */
@font-face { font-family: "Bagel Fat One"; src: url("fonts/bagel-fat-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

/* --kayu = lemari & bingkai TV; --krem/--mustard/--teal/--koral = palet ruang 70-an; --layar = kaca CRT. */
:root { --bg: #2a1d17; --kayu: #7a4a2a; --krem: #fbf1dc; --mustard: #e9a93b; --teal: #3c8c88; --koral: #e8664f; --ink: #3a2418; --soft: #8a6a55; --layar: #101012; --display: "Bagel Fat One", "Nunito", system-ui, sans-serif; --sans: "Nunito", system-ui, sans-serif; --mono: "Space Grotesk", ui-monospace, monospace; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
p, h1, h2, figure, ul { margin: 0; }
em { font-style: normal; color: var(--koral); }
main { display: flow-root; width: 100%; max-width: 480px; margin: 0 auto; overflow-x: clip; background: var(--krem); }
.orn { pointer-events: none; user-select: none; }
.lbl { font: 700 13px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--soft); text-align: center; }

/* ---------- Ruang keluarga & TV. Posisi = persen lukisan 1240×2222. ---------- */
.tv-sec { position: relative; height: 100svh; min-height: 600px; overflow: hidden; background: #3b2618; contain: paint; }
.stage { position: absolute; left: 50%; top: 50%; width: max(100%, calc(max(100svh, 600px) * .5581)); aspect-ratio: 1240 / 2222; translate: -50% -50%; transform-origin: 46.25% 49.15%; transition: transform 1.6s cubic-bezier(.6, 0, .25, 1); }
.stage > * { position: absolute; }
.ruang { inset: 0; width: 100%; height: 100%; }
.layar { left: 29.4%; top: 41.4%; width: 33.7%; height: 15.5%; overflow: hidden; border-radius: 13% / 16%; background: var(--layar); container-type: size; box-shadow: inset 0 0 6cqw rgb(0 0 0 / .85); }
.ch { position: absolute; inset: 0; display: none; color: #fff; }
.ch.aktif { display: block; }
.film { width: 100%; height: 100%; object-fit: cover; background: #000; }
/* Channel 1 tanpa video: kartu judul berwarna. */
.kartu-judul { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 40%, #ffcf6b, #e8664f 70%, #b23a3a); }
.kj-kecil { font: 700 5cqw/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #fff6dc; }
.kj-besar { margin-top: 2cqw; font: 400 10cqw/1 var(--display); color: #fff; text-shadow: 0 1cqw 0 #8a2b2b; }
.kj-nama { font: 400 14cqw/1.05 var(--display); color: #fff3b0; text-shadow: 0 1.2cqw 0 #8a2b2b; overflow-wrap: anywhere; }
.konfeti i { position: absolute; top: -10%; left: var(--x); width: 2.4cqw; height: 4cqw; background: var(--c); border-radius: 1px; }
.konfeti i:nth-child(1) { --x: 8%; --c: #fff3b0; --d: 0s; } .konfeti i:nth-child(2) { --x: 20%; --c: #3c8c88; --d: .6s; } .konfeti i:nth-child(3) { --x: 34%; --c: #fff; --d: 1.2s; } .konfeti i:nth-child(4) { --x: 48%; --c: #e9a93b; --d: .3s; }
.konfeti i:nth-child(5) { --x: 61%; --c: #fff3b0; --d: .9s; } .konfeti i:nth-child(6) { --x: 74%; --c: #3c8c88; --d: 1.5s; } .konfeti i:nth-child(7) { --x: 86%; --c: #fff; --d: .45s; } .konfeti i:nth-child(8) { --x: 94%; --c: #e9a93b; --d: 1.1s; }
/* Channel 2: berita kilat. */
.ch2 { background: linear-gradient(160deg, #1d3557, #14213d); }
.br-label { position: absolute; left: 6cqw; top: 6cqh; padding: 1cqw 3cqw; background: #e63946; font: 700 4.6cqw/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; animation: kedip 1s steps(2) infinite; }
.br-isi { position: absolute; left: 6cqw; right: 6cqw; top: 22cqh; display: flex; align-items: center; gap: 4cqw; }
.br-mik { flex: none; width: 18cqw; }
.br-judul { font: 400 8cqw/1.1 var(--display); overflow-wrap: anywhere; }
.br-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 18cqh; display: flex; align-items: center; overflow: hidden; background: #f1c40f; color: #14213d; }
.br-jalan { flex: none; padding-left: 100%; white-space: nowrap; font: 700 6cqw/1 var(--mono); }
/* Channel 3: cuaca. */
.ch3 { padding: 6cqh 6cqw; background: linear-gradient(180deg, #7ec8e3, #bfe6f2 70%, #e8f6fb); color: #14415a; }
.cu-atas { display: flex; align-items: center; gap: 3cqw; }
.cu-ikon { width: 24cqw; }
.cu-label { font: 700 4.4cqw/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.cu-besar { font: 400 10cqw/1 var(--display); color: #e8664f; }
.cu-daftar { margin-top: 3cqh; padding: 0; list-style: none; display: grid; gap: 1.6cqh; }
.cu-daftar li { display: flex; gap: 2cqw; font: 700 4.8cqw/1.25 var(--sans); }
.cu-daftar li::before { content: "☀️"; }
.cu-daftar li:nth-child(2)::before { content: "🌧️"; } .cu-daftar li:nth-child(3)::before { content: "🍃"; } .cu-daftar li:nth-child(4)::before { content: "🌈"; } .cu-daftar li:nth-child(5)::before { content: "⭐"; }
.cu-kosong { margin-top: 4cqh; font: 700 5.4cqw/1.3 var(--sans); }
/* Channel 4: album rekaman kaset. */
.ch4 { background: #000; }
.album img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; filter: saturate(1.2) contrast(1.05); }
.album img:first-child, .album img.on { opacity: 1; }
.album.jalan img:not(.on) { opacity: 0; }
.vhs-osd, .vhs-rec { position: absolute; z-index: 1; font: 700 6cqw/1 var(--mono); color: #fff; text-shadow: .4cqw .4cqw 0 #000, 0 0 2cqw rgb(255 255 255 / .6); }
.vhs-osd { left: 6cqw; top: 7cqh; }
.vhs-rec { right: 6cqw; bottom: 8cqh; font-size: 5cqw; }
.kosong { position: absolute; inset: 0; display: grid; place-items: center; font: 700 5.6cqw/1.3 var(--mono); color: #ddd; }
/* Channel 5: iklan. */
.ch5 { display: none; background: repeating-conic-gradient(from 0deg at 50% 60%, #ffd166 0 15deg, #ffb703 15deg 30deg); color: #3a2418; text-align: center; }
.ch5.aktif { display: grid; place-content: center; justify-items: center; padding: 4cqw 8cqw; }
.ik-label { position: absolute; left: 5cqw; top: 5cqh; padding: .6cqw 2.4cqw; border-radius: 2cqw; background: #3a2418; color: #ffd166; font: 700 4cqw/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.ik-pop { width: 20cqw; }
.ik-promo { margin-top: 2cqh; font: 400 7.4cqw/1.1 var(--display); color: #b23a3a; text-shadow: 0 .6cqw 0 #fff; }
.ik-dari { margin-top: 2cqh; font: 700 4cqw/1.2 var(--sans); }
.ch0 { background: #111; }
.sinyal { position: absolute; left: 50%; top: 50%; z-index: 5; translate: -50% -50%; padding: 1.6cqw 4cqw; background: rgb(0 0 0 / .7); font: 700 5cqw/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.semut { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; image-rendering: pixelated; pointer-events: none; transition: opacity .15s ease; }
.ganti .semut, .ch0.aktif ~ .semut { opacity: .95; }
.garis { position: absolute; inset: 0; z-index: 4; background: repeating-linear-gradient(rgb(0 0 0 / .1) 0 .45cqh, transparent .45cqh 1.3cqh); pointer-events: none; }
.kilau-kaca { position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: radial-gradient(ellipse 60% 40% at 30% 18%, rgb(255 255 255 / .22), transparent 70%), radial-gradient(ellipse at 50% 50%, transparent 60%, rgb(0 0 0 / .45)); pointer-events: none; }
.osd { position: absolute; right: 6cqw; bottom: 22cqh; z-index: 6; font: 700 8cqw/1 var(--mono); color: #7CFF6B; text-shadow: 0 0 2cqw rgb(124 255 107 / .8), .4cqw .4cqw 0 #000; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.osd.tampil { opacity: 1; }
.mati { position: absolute; inset: 0; z-index: 7; background: radial-gradient(ellipse 50% 30% at 32% 22%, rgb(255 255 255 / .16), transparent 70%), #141416; pointer-events: none; transform-origin: 50% 50%; }

/* Ajakan & remote. */
.ajak { position: absolute; left: 50%; top: 5%; z-index: 3; width: min(86%, 360px); translate: -50% 0; padding: 14px 18px; border-radius: 20px; background: rgb(251 241 220 / .94); text-align: center; box-shadow: 0 12px 28px rgb(42 29 23 / .35); display: none; }
.ajak-kecil { font: 700 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.ajak-kecil b { color: var(--koral); }
.ajak-besar { margin: 4px 0; font: 400 30px/1.1 var(--display); color: var(--ink); }
.ajak-tunjuk { font-size: 14px; font-weight: 700; color: var(--teal); }
.remote { position: absolute; left: 50%; bottom: 10px; z-index: 4; width: min(30vw, 120px); translate: -50% 0; display: none; transition: transform .9s cubic-bezier(.3, 1.3, .5, 1), width .9s ease; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .45)); }
.remote img { width: 100%; }
.rm { position: absolute; border: 0; padding: 0; background: transparent; color: rgb(255 255 255 / .9); font: 800 12px/1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 50%; }
.rm:active { transform: scale(.9); background: rgb(0 0 0 / .12); }
.rm-power { left: 29%; top: 7.5%; width: 37%; height: 14.2%; }
.rm-n { width: 15%; height: 6.4%; }
.rm-n:nth-of-type(2), .rm-n:nth-of-type(5), .rm-n:nth-of-type(8) { left: 17%; } .rm-n:nth-of-type(3), .rm-n:nth-of-type(6), .rm-n:nth-of-type(9) { left: 39.8%; } .rm-n:nth-of-type(4), .rm-n:nth-of-type(7), .rm-n:nth-of-type(10) { left: 62.6%; }
.rm-n:nth-of-type(2), .rm-n:nth-of-type(3), .rm-n:nth-of-type(4) { top: 26.4%; } .rm-n:nth-of-type(5), .rm-n:nth-of-type(6), .rm-n:nth-of-type(7) { top: 35.1%; } .rm-n:nth-of-type(8), .rm-n:nth-of-type(9), .rm-n:nth-of-type(10) { top: 43.9%; }
.rm-up, .rm-down { left: 16%; width: 62%; height: 7.6%; border-radius: 12px; font-size: 10px; letter-spacing: .08em; color: rgb(255 255 255 / .85); }
.rm-up { top: 54%; } .rm-down { top: 63.8%; }
.suara-btn { position: absolute; left: 50%; z-index: 5; top: calc(var(--layar-bawah, 60%) + 10px); translate: -50% 0; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--krem); color: var(--ink); font: 800 14px/1 var(--sans); white-space: nowrap; box-shadow: 0 8px 20px rgb(0 0 0 / .4); cursor: pointer; }
.petunjuk { position: absolute; left: 0; right: 0; z-index: 3; top: calc(var(--layar-bawah, 60%) + 58px); text-align: center; font: 700 13px/1.3 var(--mono); color: var(--krem); text-shadow: 0 2px 6px rgb(0 0 0 / .7); opacity: 0; transition: opacity .6s ease; }

/* ---------- Isi di bawah TV ---------- */
.surat { position: relative; padding: 46px 18px 30px; background: var(--krem); }
.surat-pop { position: absolute; right: 8px; top: 8px; z-index: 1; width: 82px; rotate: 10deg; }
.majalah { position: relative; padding: 22px 20px 24px; border-radius: 6px; background: #fff; box-shadow: 0 16px 34px rgb(58 36 24 / .16); border-top: 10px solid var(--koral); }
.majalah::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--mustard) 0 20px, var(--teal) 20px 40px); }
.mj-atas { display: flex; justify-content: space-between; margin-top: 4px; font: 700 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.mj-judul { margin: 12px 0 14px; font: 400 32px/1.08 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.pesan { font-size: 17px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.ttd { margin-top: 14px; text-align: right; font: 400 20px/1.2 var(--display); color: var(--teal); }

.ulang { position: relative; padding: 34px 18px; background: var(--krem); }
.ulang-vhs { position: absolute; left: 10px; top: 4px; width: 70px; rotate: -12deg; }
.kaset { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.kaset figure { padding: 8px 8px 10px; border-radius: 6px; background: #222; box-shadow: 0 10px 20px rgb(0 0 0 / .2); }
.kaset figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.kaset img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.kaset figcaption { margin-top: 8px; padding: 4px 8px; border-radius: 3px; background: var(--krem); color: var(--ink); font: 700 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.balas { position: relative; margin: 50px 18px 20px; padding: 64px 20px 24px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 16px 34px rgb(58 36 24 / .14); }
.telp { position: absolute; left: 50%; top: -52px; width: 120px; translate: -50% 0; }
.balas h2 { font: 400 28px/1.15 var(--display); }
.balas form { display: grid; gap: 12px; margin-top: 14px; text-align: left; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--koral); color: #fff; font: 800 16px/1.2 var(--sans); cursor: pointer; box-shadow: 0 5px 0 #b44a37; }
.btn.ghost { min-height: 42px; padding: 8px 14px; border: 2px dashed var(--mustard); background: #fff8e6; color: var(--ink); box-shadow: none; font-size: 14px; text-align: left; border-radius: 14px; }
textarea { width: 100%; min-height: 96px; padding: 14px 16px; resize: vertical; border: 2px solid #ecdcbc; border-radius: 16px; background: #fffaf0; color: var(--ink); font: 500 15px/1.5 var(--sans); }
.hint { font-size: 14px; color: var(--soft); }

.music-toggle { position: fixed; top: 14px; right: 14px; z-index: 20; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--krem); background: var(--teal); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgb(0 0 0 / .3); }
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle[aria-pressed="true"] { background: var(--koral); }
.foot { max-width: 480px; margin: 0 auto; padding: 6px 22px 30px; background: var(--krem); text-align: center; font-size: 13px; color: var(--soft); }
.foot a { color: var(--koral); }
.foot-kucing { width: 120px; margin: 0 auto 6px; }

/* ---------- Urutan dengan JS. Tanpa JS TV sudah menyala di channel 1. ---------- */
.mati { display: none; }
.js .mati { display: block; }
.js .remote { display: block; }
.js body:not(.opened) .ajak { display: block; }
.js body:not(.opened) main > section:not(.tv-sec),
.js body:not(.opened) .foot,
.js body:not(.opened) .music-toggle,
.js body:not(.opened) .petunjuk { display: none; }
.js body:not(.opened) .remote { transform: rotate(-10deg) translateY(10%); width: min(36vw, 140px); }
.js body:not(.opened) .osd { display: none; }
.js body.opened .mati { animation: nyala .7s ease-out forwards; }
.js body.zoom .stage { transform: translate(var(--zx, 0), var(--zy, 0)) scale(var(--zs, 1)); }
.js body.zoom .petunjuk { opacity: 1; }
.js .suara-btn:not(.tampil) { display: none; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }
.no-anim .mati { opacity: 0; }
@keyframes nyala { 0% { transform: scale(1, 1); opacity: 1; background: #141416; } 20% { transform: scale(1, .02); background: #fff; opacity: 1; } 45% { transform: scale(1, .02); background: #fff; opacity: 1; } 70% { transform: scale(1, 1); background: #fff; opacity: .6; } 100% { transform: scale(1, 1); background: #fff; opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .js body:not(.opened) .rm-power { animation: denyut 1.4s ease-in-out infinite; }
  .js body:not(.opened) .remote { animation: goyang 3s ease-in-out infinite; }
  .ajak-tunjuk { animation: turun 1.2s ease-in-out infinite; }
  .konfeti i { animation: jatuh 2.6s linear var(--d) infinite; }
  .br-jalan.jalan { animation: ticker var(--durasi, 18s) linear infinite; }
  .album.jalan img.on { animation: kenburns 4.5s ease-out both; }
  .vhs-osd { animation: kedip 1.2s steps(2) infinite; }
  .ik-promo { animation: denyut-teks 1.4s ease-in-out infinite; }
  .cu-ikon { animation: ngambang 3s ease-in-out infinite; }
  .surat-pop { animation: ngambang 3.4s ease-in-out infinite; }
  .foot-kucing { animation: napas 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
}
@keyframes denyut { 0%, 100% { box-shadow: 0 0 0 0 rgb(232 102 79 / .7); } 50% { box-shadow: 0 0 0 12px rgb(232 102 79 / 0); } }
@keyframes goyang { 0%, 100% { rotate: 0deg; } 50% { rotate: 3deg; } }
@keyframes turun { 50% { transform: translateY(4px); } }
@keyframes jatuh { from { transform: translateY(0) rotate(0); } to { transform: translateY(120cqh) rotate(400deg); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes kedip { 50% { opacity: .35; } }
@keyframes denyut-teks { 50% { transform: scale(1.06) rotate(-1deg); } }
@keyframes ngambang { 50% { translate: 0 -6px; } }
@keyframes napas { 50% { scale: 1.03 .97; } }

.anim .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }
