:root {
    --fon-tajuk: "Cinzel", Georgia, serif; --fon-teks: "Inter", system-ui, sans-serif; --fon-kad: "Cinzel", Georgia, serif; --fon-kapsyen: Georgia, "Times New Roman", serif;
    --bg: #0d1020;
    --bg2: #151a33;
    --garis: rgba(255, 255, 255, .08);
    --emas: #e2b84a;
    --teks: #e9ecf5;
    --redup: #8b93b3;
    --serang: #ff7a59;
    --tahan: #5aa9ff;
    --kw: 104px;
    --kh: 146px;
}
@media (max-width: 640px) { :root { --kw: 58px; --kh: 80px; } }

html { background: var(--bg); }
body {
    background-color: var(--bg);
    background-image: radial-gradient(ellipse at 50% 40%, #1d2550 0%, var(--bg) 65%);
    background-attachment: fixed;
    color: var(--teks);
    font-family: var(--fon-teks);
    min-height: 100vh;
}
.bar-atas { background: rgba(0, 0, 0, .35); border-bottom: 1px solid var(--garis); }
.jenama { font-family: var(--fon-tajuk); font-size: 1.3rem; letter-spacing: .08em; }
.jenama b { color: var(--emas); }
.jenama small { font-family: var(--fon-teks); font-size: .7rem; color: var(--redup); letter-spacing: 0; margin-left: .5rem; }

/* ---------- Kad ---------- */
.kad { width: var(--kw); height: var(--kh); border-radius: 8px; padding: 4px; position: relative; flex: 0 0 auto;
    display: flex; flex-direction: column; font-size: calc(var(--kw) * .085); line-height: 1.15; color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .25); overflow: hidden;
    transition: transform .3s ease; }
.kad .k-nama { font-family: var(--fon-kad); font-weight: 800; font-size: 1.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kad .k-sub { display: flex; justify-content: space-between; font-size: .8em; opacity: .85; }
.kad .k-seni { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 2.8em;
    background: rgba(0, 0, 0, .25); border-radius: 4px; margin: 3px 0; }
.kad .k-teks { font-size: .72em; opacity: .9; height: 3.5em; overflow: hidden; }
.kad .k-stat { display: flex; justify-content: space-between; font-weight: 700; font-size: .95em; margin-top: 2px;
    background: rgba(0, 0, 0, .35); border-radius: 3px; padding: 1px 4px; }
.kad .naik { color: #7dffa1; } .kad .turun { color: #ff8a8a; }

.jenis-watak.tahap-asas        { background: linear-gradient(160deg, #a06a35, #5b3a1c); }
.jenis-watak.tahap-pertengahan { background: linear-gradient(160deg, #4b7fb3, #213c5c); }
.jenis-watak.tahap-kerjaya     { background: linear-gradient(160deg, #3d9b8f, #164a44); border-color: #9ee3d8; }
.jenis-watak.tahap-pakar       { background: linear-gradient(160deg, #d8b23a, #7a5a0c); border-color: #ffe9a3; box-shadow: 0 0 12px rgba(255, 215, 106, .45), 0 4px 10px rgba(0, 0, 0, .45); }
.jenis-watak.tahap-lagenda     { background: linear-gradient(135deg, #3a1060 0%, #b0326f 35%, #f2c14e 65%, #4b1d86 100%); background-size: 220% 220%; border-color: #fff1b8;
    box-shadow: 0 0 16px rgba(255, 200, 90, .65), 0 0 28px rgba(190, 80, 255, .35), 0 4px 10px rgba(0, 0, 0, .5); animation: kilau-lagenda 6s ease-in-out infinite; }
@keyframes kilau-lagenda { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .jenis-watak.tahap-lagenda { animation: none; } }
.jenis-magic     { background: linear-gradient(160deg, #23a36b, #0d4a31); }
.jenis-perangkap { background: linear-gradient(160deg, #a83a5c, #4c1426); }
.jenis-fenomena  { background: linear-gradient(160deg, #2ab3c2, #0e4c56); }


/* Lencana siri pada kad */
.kad .k-siri { position: absolute; right: 7px; top: calc(2.25em + 9px); font-size: .9em; line-height: 1; opacity: .9; filter: drop-shadow(0 1px 1px #000); }
.kad.besar { --kw: 200px; --kh: 280px; font-size: 17px; }
.kad.besar .k-teks { height: auto; font-size: .78em; }
.kad.mod-bertahan { transform: rotate(-90deg); }

/* ---------- Laman ---------- */
a { color: var(--emas); }
.panel { background: rgba(255, 255, 255, .04); border: 1px solid var(--garis); border-radius: 12px; }
.auth { max-width: 440px; }
.logo-besar { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--emas); color: var(--emas);
    display: flex; align-items: center; justify-content: center; font-family: var(--fon-tajuk); font-weight: 800; font-size: 2.1rem; letter-spacing: -.04em;
    background: repeating-linear-gradient(45deg, #2a2f63 0 6px, #232858 6px 12px); box-shadow: 0 0 40px rgba(226, 184, 74, .25); }
.avatar-besar { width: 72px; height: 72px; border-radius: 50%; background: rgba(226, 184, 74, .12); border: 2px solid var(--emas);
    display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.stat-baris div { display: flex; flex-direction: column; }
.stat-baris b { font-size: 1.4rem; color: var(--emas); line-height: 1.1; }
.stat-baris span { font-size: .72rem; color: var(--redup); text-transform: uppercase; letter-spacing: .06em; }

/* NPC */
.npc-kad { padding: 18px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s; }
.npc-kad:hover { transform: translateY(-3px); border-color: rgba(226, 184, 74, .5); }
.npc-kad::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; }
.npc-kad.tahap-1::before { background: #4caf7a; } .npc-kad.tahap-2::before { background: #e2b84a; } .npc-kad.tahap-3::before { background: #e5484d; }
.npc-kad.terkunci { opacity: .55; filter: grayscale(.6); }
.npc-ikon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.npc-urutan { position: absolute; top: 14px; right: 16px; font-size: .7rem; color: var(--redup); text-transform: uppercase; letter-spacing: .08em; }
.tahap-badge { font-weight: 600; }
.tahap-badge.t1 { background: #1f5a3c; } .tahap-badge.t2 { background: #6b5214; } .tahap-badge.t3 { background: #7a1f24; }

/* Dek */
.grid-koleksi { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.item-koleksi { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.item-koleksi.belum .kad { filter: grayscale(1) brightness(.45); }
.item-koleksi .kawal { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.item-koleksi .kawal .btn { padding: 0 8px; }
.item-koleksi .milik { font-size: .7rem; color: var(--redup); }
.dek-panel { position: sticky; top: 12px; }
.senarai-dek { max-height: 45vh; overflow-y: auto; }
.baris-dek { display: flex; justify-content: space-between; padding: 4px 8px; margin-bottom: 3px; border-radius: 6px; font-size: .82rem;
    border-left: 3px solid var(--garis); background: rgba(255, 255, 255, .03); }
.baris-dek.jenis-watak { border-left-color: #c9925a; } .baris-dek.jenis-magic { border-left-color: #23a36b; }
.baris-dek.jenis-perangkap { border-left-color: #a83a5c; } .baris-dek.jenis-fenomena { border-left-color: #2ab3c2; }

/* Admin */
body.admin { background-image: none; }
.admin-sisi .nav-link { color: var(--teks); border-radius: 8px; padding: 8px 12px; }
.admin-sisi .nav-link.active, .admin-sisi .nav-link:hover { background: rgba(226, 184, 74, .15); color: var(--emas); }
.kad-mini { display: inline-flex; align-items: center; gap: 6px; }
.stat-kotak { padding: 16px; }
.stat-kotak .nilai { font-size: 1.8rem; font-weight: 700; color: var(--emas); }
.stat-kotak .label { font-size: .75rem; color: var(--redup); text-transform: uppercase; letter-spacing: .06em; }
.table > :not(caption) > * > * { background-color: transparent; }
.coin-papar { color: #ffd76a; font-weight: 700; }

/* Belakang kad (kad tertutup & tangan lawan) */
.kad.belakang { align-items: center; justify-content: center; padding: 3px; border: 2px solid var(--emas);
    background:
        radial-gradient(circle at 50% 50%, rgba(226, 184, 74, .22) 0 22%, transparent 23%),
        repeating-conic-gradient(from 0deg at 50% 50%, #1c2254 0 9deg, #262e6b 9deg 18deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .5), inset 0 0 0 3px #10143a, inset 0 0 0 4px rgba(226, 184, 74, .55); }
.kad.belakang::before { content: ''; position: absolute; inset: 9%; border: 1px solid rgba(226, 184, 74, .45); border-radius: 5px; }
.kad.belakang .logo { position: relative; font-family: var(--fon-kad); font-weight: 800; color: var(--emas); font-size: 1.55em; line-height: 1; letter-spacing: -.04em;
    width: 2.5em; height: 2.5em; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #2f377a, #151a45); border: 2px solid var(--emas); box-shadow: 0 0 12px rgba(226, 184, 74, .45);
    text-shadow: 0 0 8px rgba(226, 184, 74, .7); }
.kad.belakang .logo::after { content: 'FENOMENA PAKAR'; position: absolute; top: 112%; font-size: .27em; letter-spacing: .12em; white-space: nowrap; color: rgba(226, 184, 74, .85); }

/* Lobi: butang Cari Lawan & animasi pencarian */
.cari-panel { background: radial-gradient(ellipse at 50% 0%, rgba(229, 72, 77, .18), transparent 60%), rgba(255, 255, 255, .04); }
.cari-radar { position: relative; width: 96px; height: 96px; border-radius: 50%; border: 2px solid rgba(255, 122, 89, .6);
    background: radial-gradient(circle, rgba(255, 122, 89, .15) 0 30%, transparent 31%), repeating-radial-gradient(circle, transparent 0 14px, rgba(255, 122, 89, .18) 15px 16px);
    display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cari-radar span { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(255, 122, 89, .55), transparent 25%); animation: radar 2.4s linear infinite; }
.cari-radar b { position: relative; font-size: 2rem; }
@keyframes radar { to { transform: rotate(360deg); } }
.btn-cari { font-family: var(--fon-tajuk); font-weight: 800; letter-spacing: .08em; box-shadow: 0 0 30px rgba(229, 72, 77, .45); animation: denyut 2s ease-in-out infinite; }
.btn-cari:disabled { animation: none; box-shadow: none; }
@keyframes denyut { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); box-shadow: 0 0 45px rgba(229, 72, 77, .7); } }
.npc-mini { padding: 14px; } .npc-mini .npc-ikon { font-size: 2.3rem; }

.carian { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s;
    background: radial-gradient(ellipse at center, rgba(40, 14, 30, .96), rgba(5, 6, 15, .98)); cursor: pointer; }
.carian.buka { opacity: 1; }
.carian-isi { width: min(760px, 94vw); text-align: center; }
.carian-tajuk { font-family: var(--fon-tajuk); font-weight: 800; font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--emas); letter-spacing: .12em;
    text-transform: uppercase; margin-bottom: 22px; animation: kerdip 1s ease-in-out infinite alternate; }
@keyframes kerdip { from { opacity: .55; } to { opacity: 1; } }
.gelendong { position: relative; transition: opacity .5s, transform .5s; }
.gelendong.pudar { opacity: 0; transform: scale(.9); height: 0; overflow: hidden; }
.gelendong-tingkap { overflow: hidden; border-top: 2px solid rgba(226, 184, 74, .5); border-bottom: 2px solid rgba(226, 184, 74, .5);
    background: rgba(0, 0, 0, .35); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.gelendong-jalur { display: flex; will-change: transform; }
.gelendong-item { flex: 0 0 140px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .3s; }
.gelendong-item span { font-size: 3.6rem; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.gelendong-item small { color: var(--redup); font-size: .75rem; white-space: nowrap; }
.gelendong-item.terpilih { transform: scale(1.25); }
.gelendong-item.terpilih small { color: var(--emas); font-weight: 700; }
.gelendong-penanda { position: absolute; left: 50%; top: -12px; bottom: -12px; width: 140px; transform: translateX(-50%); pointer-events: none;
    border-left: 2px solid var(--serang); border-right: 2px solid var(--serang); box-shadow: 0 0 30px rgba(255, 122, 89, .4) inset; border-radius: 8px; }
.vs { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5vw, 60px); animation: vs-masuk .6s cubic-bezier(.2, 1.4, .4, 1); }
.vs-pihak { flex: 1; } .vs-pihak.kiri { animation: dari-kiri .6s ease-out; } .vs-pihak.kanan { animation: dari-kanan .6s ease-out; }
.vs-ikon { font-size: clamp(3.5rem, 12vw, 6rem); line-height: 1.1; filter: drop-shadow(0 0 20px rgba(226, 184, 74, .4)); }
.vs-nama { font-family: var(--fon-tajuk); font-weight: 800; font-size: clamp(1rem, 3vw, 1.6rem); margin-top: 6px; }
.vs-teks { font-family: var(--fon-tajuk); font-weight: 800; font-size: clamp(2.6rem, 9vw, 5rem); color: var(--serang); text-shadow: 0 0 30px rgba(255, 122, 89, .8);
    animation: vs-hentak .8s ease-out; }
@keyframes dari-kiri { from { transform: translateX(-60vw); } } @keyframes dari-kanan { from { transform: translateX(60vw); } }
@keyframes vs-hentak { 0% { transform: scale(4); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); } }
@keyframes vs-masuk { from { opacity: 0; } }
.gelendong-item.misteri span { filter: grayscale(1) brightness(.6); opacity: .6; }

/* Katalog & Kedai */
.grid-katalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; }
.grid-pratonton { display: flex; flex-wrap: wrap; gap: 10px; }
.item-katalog { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; border-radius: 10px; padding: 4px; transition: background .15s; }
.item-katalog:hover, .item-katalog:focus { background: rgba(226, 184, 74, .1); outline: none; }
.item-katalog:hover .kad { transform: translateY(-4px) scale(1.03); }
.item-katalog.belum .kad { filter: saturate(.35) brightness(.75); }
.item-katalog .ik-info { display: flex; justify-content: space-between; width: var(--kw); font-size: .72rem; }
.item-katalog .harga { color: #ffd76a; font-weight: 700; }
.penapis-katalog .btn-siri.active { background: var(--emas); color: #111; border-color: var(--emas); }
.cerita-kad { border-left: 3px solid var(--emas); padding-left: 10px; color: #d9dcea; }
.perjalanan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.perjalanan span { color: var(--redup); }
.modal-sifu { background: #161a33; border: 1px solid rgba(226, 184, 74, .35); }
.kedai-pek { position: relative; overflow: hidden; padding: 18px; text-align: center; border-radius: 14px; border: 1px solid var(--garis);
    background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .25)); transition: transform .2s; }
.kedai-pek:hover { transform: translateY(-3px); }
.kedai-pek .pek-ikon { font-size: 3.2rem; line-height: 1.1; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.kedai-pek.siri-Hantu { background: linear-gradient(160deg, #1e2a4a, #0b1020); } .kedai-pek.siri-Halloween { background: linear-gradient(160deg, #5a2a0a, #2a0f2e); }
.kedai-pek.siri-Robot { background: linear-gradient(160deg, #0f3a44, #071a20); } .kedai-pek.siri-Mecha { background: linear-gradient(160deg, #3a4356, #141a24); }
.pek-dibuka { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; perspective: 900px; }
.pek-dibuka .slot-pek { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: pek-flip .8s cubic-bezier(.2, 1.3, .4, 1) both; }
.pek-dibuka .slot-pek .label { font-size: .72rem; animation: pek-label .4s ease calc(var(--dd, 0ms) + 1000ms) both; }
.pek-dibuka .kad { --td: 1000ms; }
@keyframes pek-flip { from { transform: translateY(40px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pek-label { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.penjana-dek summary { list-style: none; } .penjana-dek summary::-webkit-details-marker { display: none; }
.penjana-dek[open] summary { background: rgba(226, 184, 74, .15); }
.senarai-simpanan { display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow-y: auto; }
.item-simpanan { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px;
    color: var(--teks); text-decoration: none; background: rgba(255, 255, 255, .03); border: 1px solid transparent; font-size: .88rem; }
.item-simpanan:hover { background: rgba(226, 184, 74, .08); color: var(--teks); }
.item-simpanan.dipilih { border-color: var(--emas); background: rgba(226, 184, 74, .12); }
.item-simpanan .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npc-rahsia { border-color: rgba(180, 140, 255, .45); background: linear-gradient(160deg, rgba(120, 80, 220, .14), rgba(255, 255, 255, .03)); }
.npc-rahsia.terkunci { opacity: .5; }
.gelendong-item.misteri span { filter: grayscale(1); }

/* ---------- Pendedahan kad: bermula dengan belakang kad, kemudian berpusing menunjukkan muka depan ----------
   Guna: tambah kelas "dedah" pada .kad. Pemboleh ubah: --td (tempoh), --dd (lengah sebelum mula). */
.kad.dedah { animation: dedah var(--td, 1100ms) ease-in-out var(--dd, 0ms) backwards; transform-style: preserve-3d; }
.kad.dedah::after { content: 'FP'; position: absolute; inset: 0; z-index: 9; border-radius: 6px; pointer-events: none;
    display: flex; align-items: center; justify-content: center; transform: scaleX(-1);
    font-family: var(--fon-tajuk); font-weight: 800; font-size: 1.9em; color: var(--emas); text-shadow: 0 0 10px rgba(226, 184, 74, .8);
    background:
        radial-gradient(circle at 50% 50%, #232a66 0 20%, rgba(226, 184, 74, .7) 20.5% 22%, transparent 22.5%),
        repeating-conic-gradient(from 0deg at 50% 50%, #1c2254 0 9deg, #262e6b 9deg 18deg);
    box-shadow: inset 0 0 0 3px #10143a, inset 0 0 0 4px rgba(226, 184, 74, .6);
    animation: dedah-belakang var(--td, 1100ms) linear var(--dd, 0ms) both; }
@keyframes dedah {
    0%   { transform: perspective(700px) rotateY(180deg) scale(.9); filter: none; }
    35%  { transform: perspective(700px) rotateY(180deg) scale(1.04); }
    68%  { transform: perspective(700px) rotateY(90deg) scale(1.08); filter: brightness(1.2); }
    80%  { filter: brightness(1.9) drop-shadow(0 0 14px rgba(255, 215, 106, .9)); }
    100% { transform: perspective(700px) rotateY(0) scale(1); filter: none; }
}
@keyframes dedah-belakang { 0%, 67.9% { opacity: 1; } 68%, 100% { opacity: 0; } }
.kad.dedah.mod-bertahan { animation-name: dedah-bertahan; }
@keyframes dedah-bertahan {
    0%, 35% { transform: perspective(700px) rotate(-90deg) rotateY(180deg); }
    68% { transform: perspective(700px) rotate(-90deg) rotateY(90deg); }
    100% { transform: perspective(700px) rotate(-90deg) rotateY(0); }
}
@media (prefers-reduced-motion: reduce) { .kad.dedah, .kad.dedah::after { animation-duration: 1ms !important; } }

/* ---------- Seni kad ----------
   bingkai: imej dalam ruang gambar · penuh: imej meliputi seluruh muka kad, teks di atas lapisan gelap */
.kad .k-seni.bergambar { background-size: cover; background-position: center; font-size: 0; }
.kad.seni-penuh { background-size: cover; background-position: center; background-color: #111; }
.kad.seni-penuh::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72) 0, rgba(0, 0, 0, .25) 18%, transparent 32%, transparent 52%, rgba(0, 0, 0, .55) 68%, rgba(0, 0, 0, .85) 100%); }
.kad.seni-penuh > * { position: relative; z-index: 1; }
.kad.seni-penuh > .k-siri { position: absolute; }
.kad.seni-penuh .k-nama, .kad.seni-penuh .k-sub, .kad.seni-penuh .k-teks { text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .8); }
.kad.seni-penuh .k-seni { background: transparent; }
.kad.seni-penuh .k-stat { background: rgba(0, 0, 0, .55); }

/* Admin → Seni Kad */
.zon-lepas { border: 2px dashed var(--garis); border-radius: 12px; padding: 22px; text-align: center; transition: .2s; background: rgba(255, 255, 255, .02); }
.zon-lepas.aktif { border-color: var(--emas); background: rgba(226, 184, 74, .08); }
.log-seni { max-height: 220px; overflow: auto; font-size: .8rem; }
.grid-seni { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item-seni { padding: 8px; --kw: 130px; --kh: 182px; transition: box-shadow .4s; }
.item-seni .is-kad { display: flex; justify-content: center; }
.item-seni.baru-dikemas { box-shadow: 0 0 0 2px var(--emas), 0 0 20px rgba(226, 184, 74, .5); }
.item-seni .btn-group .btn { padding: 2px 0; }

/* Tebus Kod */
.input-kod { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; }
.tebus-pentas { perspective: 900px; padding: 10px 0; }
.tebus-pentas .kad { --dd: 400ms; --td: 1500ms; }
.tebus-berjaya { background: radial-gradient(ellipse at 50% 35%, rgba(226, 184, 74, .18), transparent 60%), rgba(255, 255, 255, .04); }
.tebus-nama { animation: pek-label .5s ease 1.8s both; }

/* ---------- Panduan interaktif (walkthrough) ---------- */
.pd-lapis { position: fixed; inset: 0; z-index: 2000; }
.pd-lapis.tanpa-sasaran { background: rgba(5, 7, 20, .72); }
.pd-sorot { position: fixed; border-radius: 12px; pointer-events: none; transition: all .32s cubic-bezier(.3, .7, .3, 1);
    box-shadow: 0 0 0 200vmax rgba(5, 7, 20, .72), 0 0 0 2px #e2b84a, 0 0 26px rgba(226, 184, 74, .7); animation: pd-denyut 1.6s ease-in-out infinite; }
@keyframes pd-denyut { 50% { box-shadow: 0 0 0 200vmax rgba(5, 7, 20, .72), 0 0 0 3px #ffd76a, 0 0 40px rgba(226, 184, 74, .95); } }
.pd-gelembung { position: fixed; width: min(360px, calc(100vw - 16px)); background: #141936; color: #e8eaf6; border: 1px solid rgba(226, 184, 74, .6);
    border-radius: 14px; padding: 12px 14px 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); transition: left .3s ease, top .3s ease; animation: pd-masuk .25s ease-out; }
@keyframes pd-masuk { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pd-gelembung::before { content: ''; position: absolute; left: var(--ekor, 50%); width: 14px; height: 14px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.pd-gelembung.bawah::before { top: -8px; border-left: 1px solid rgba(226, 184, 74, .6); border-top: 1px solid rgba(226, 184, 74, .6); }
.pd-gelembung.atas::before { bottom: -8px; border-right: 1px solid rgba(226, 184, 74, .6); border-bottom: 1px solid rgba(226, 184, 74, .6); }
.pd-gelembung.tengah::before, .pd-gelembung.tindih::before { display: none; }
.pd-gelembung.tengah { width: min(440px, calc(100vw - 16px)); text-align: center; }
.pd-kepala { display: flex; justify-content: space-between; font-size: .72rem; color: #e2b84a; letter-spacing: .05em; margin-bottom: 4px; }
.pd-tajuk { font-family: var(--fon-tajuk); font-weight: 800; color: #fff; margin: 0 0 4px; font-size: 1.02rem; }
.pd-teks { font-size: .88rem; line-height: 1.5; }
.pd-titik { display: flex; gap: 4px; justify-content: center; margin: 10px 0 6px; flex-wrap: wrap; }
.pd-titik i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.pd-titik i.lepas { background: rgba(226, 184, 74, .5); }
.pd-titik i.aktif { background: #e2b84a; width: 18px; border-radius: 4px; }
.pd-butang { display: flex; align-items: center; gap: 6px; }
body.pd-berjalan .modal.show { z-index: 1050; }
.pd-petunjuk { position: fixed; z-index: 1065; pointer-events: none; border-radius: 12px; border: 3px solid #ffd76a;
    box-shadow: 0 0 0 4px rgba(255, 215, 106, .25), 0 0 26px rgba(255, 215, 106, .9); animation: pd-petunjuk 1s ease-in-out infinite; }
@keyframes pd-petunjuk { 50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(255, 215, 106, .12), 0 0 40px rgba(255, 215, 106, 1); } }
.pd-label { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: #ffd76a; color: #1b1300;
    font-weight: 800; font-size: .8rem; padding: 4px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) { .pd-sorot, .pd-petunjuk { animation: none; } .pd-sorot, .pd-gelembung { transition: none; } }

/* ---------- Tutorial Cara Main ---------- */
.tutorial { max-width: 1280px; margin: 0 auto; --kw: 112px; --kh: 157px; }
.tutorial section { scroll-margin-top: 12px; }
.tut-isi .nav-link { color: var(--teks, #e8eaf6); padding: 6px 10px; border-radius: 8px; font-size: .9rem; }
.tut-isi .nav-link:hover { background: rgba(226, 184, 74, .12); color: #ffd76a; }
.tut-kotak { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 14px; text-align: center; }
.tut-kad-baris { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.tut-kad-baris figure { margin: 0; width: 170px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tut-kad-baris figcaption { font-size: .8rem; text-align: center; color: #c8cbe0; }
.tut-anatomi { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tut-anatomi ol { flex: 1; min-width: 240px; }
.tut-anatomi ol li { margin-bottom: 4px; }
.tut-tangga { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tut-anak { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 10px; }
.tut-anak-kad, .tut-kad-kecil { --kw: 86px; --kh: 120px; flex: 0 0 auto; }
.tut-papan { display: grid; gap: 6px; max-width: 640px; margin: 0 auto; font-size: .78rem; text-align: center; }
.tut-papan > div { border-radius: 8px; padding: 7px 8px; }
.tp-bar { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); }
.tp-bar.lawan { border-color: rgba(255, 107, 129, .5); } .tp-bar.saya { border-color: rgba(226, 184, 74, .6); }
.tp-tangan { background: rgba(255, 255, 255, .03); border: 1px dashed rgba(255, 255, 255, .2); }
.tp-tangan.saya { background: rgba(226, 184, 74, .1); border-color: rgba(226, 184, 74, .5); }
.tp-baris { display: grid; grid-template-columns: 90px 1fr; gap: 6px; padding: 0 !important; }
.tp-baris:has(.saya) { grid-template-columns: 1fr 90px; }
.tp-zon { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; padding: 10px 4px; }
.tp-medan { border: 1px dashed rgba(255, 255, 255, .25); border-radius: 8px; padding: 12px 6px; }
.tp-medan.watak { background: rgba(255, 107, 129, .08); } .tp-medan.magic { background: rgba(35, 163, 107, .1); }
.tp-medan.watak.saya { background: rgba(226, 184, 74, .1); }
.tp-tengah { background: rgba(42, 179, 194, .12); border: 1px solid rgba(42, 179, 194, .4); }
.tut-fasa { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tut-fasa > div { position: relative; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 12px 12px 12px 48px; display: flex; flex-direction: column; }
.tut-fasa span { position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: #e2b84a; color: #1b1300; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tut-fasa small { color: #c8cbe0; }
.tut-demo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0; }
.tut-demo .aksi-kad { position: relative; animation: none; }
.tut-demo .ak-btn { cursor: default; }
.tut-demo-kad .kad { transform: translateY(-4px); }
.tut-langkah li { margin-bottom: 8px; }
.tut-ungu { color: #c9b0ff; font-weight: 700; }
.lencana-tut { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.lencana-tut.b { background: #ff7a59; color: #210800; } .lencana-tut.t { background: #5aa9ff; color: #00142a; }
.tut-jadual td, .tut-jadual th { font-size: .85rem; }
.tut-kuiz .kuiz-pilihan { animation: none; }
@media (max-width: 640px) { .tutorial { --kw: 92px; --kh: 129px; } .tut-kad-baris figure { width: 140px; } .tp-baris { grid-template-columns: 64px 1fr; } .tp-baris:has(.saya) { grid-template-columns: 1fr 64px; } }

.lencana-eksklusif { font-size: .7rem; font-weight: 700; color: #e9d5ff; background: linear-gradient(135deg, #6d28d9, #a21caf); padding: 1px 7px; border-radius: 10px; }

/* Pek Promosi di Kedai */
.kedai-promo { background: linear-gradient(160deg, rgba(162, 28, 175, .18), rgba(30, 27, 75, .6)); border: 1px solid rgba(232, 121, 249, .45); border-radius: 14px; padding: 12px; }
.kedai-promo.misteri { background: linear-gradient(160deg, rgba(20, 20, 40, .9), rgba(76, 29, 149, .45)); border-color: rgba(167, 139, 250, .6); }
.kp-seni { position: relative; height: 120px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem;
    background: radial-gradient(circle at 50% 40%, rgba(255, 215, 106, .25), transparent 60%), rgba(0, 0, 0, .25); background-size: cover; background-position: center; }
.kedai-promo.misteri .kp-seni { animation: kuiz-goyang 2.6s ease-in-out infinite; }
.kp-misteri { position: absolute; top: 8px; right: 8px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; background: #7c3aed; color: #fff; padding: 2px 8px; border-radius: 999px; }
.grid-promo-isi { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; justify-items: center; }
@keyframes kuiz-goyang { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg) translateY(-3px); } }

/* Musim */
.musim-hero { background: radial-gradient(ellipse at 15% 30%, rgba(226, 184, 74, .18), transparent 55%), rgba(255, 255, 255, .04); }
.musim-saya { min-width: 150px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(226, 184, 74, .4); border-radius: 12px; padding: 10px 14px; }
.musim-peraturan { background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 8px 12px; }
.musim-jadual tr.saya td { background: rgba(226, 184, 74, .18) !important; }
.musim-hadiah { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .08); margin-bottom: 6px; }
.musim-hadiah.saya { border-color: #e2b84a; background: rgba(226, 184, 74, .12); }
.mh-julat { min-width: 64px; font-family: var(--fon-tajuk); font-weight: 800; color: #e2b84a; }
.musim-sepanduk { color: inherit; border-color: rgba(226, 184, 74, .45) !important; background: linear-gradient(90deg, rgba(226, 184, 74, .14), rgba(255, 255, 255, .03)); }
.musim-sepanduk:hover { border-color: #e2b84a !important; }
.musim-hadiah-baru { border-color: #e2b84a !important; background: radial-gradient(ellipse at 50% 20%, rgba(226, 184, 74, .22), transparent 60%), rgba(255, 255, 255, .04); }

/* ---------- Kawalan bunyi ---------- */
.bunyi-btn.terapung { position: fixed; left: 12px; bottom: 12px; z-index: 1040; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem;
    background: rgba(12, 15, 36, .9); color: #fff; border: 1px solid rgba(226, 184, 74, .55); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.bunyi-panel { position: fixed; left: 12px; bottom: 62px; z-index: 1065; width: 220px; background: #141936; color: #e8eaf6; border: 1px solid rgba(226, 184, 74, .55);
    border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font-size: .8rem; }
.bunyi-panel.atas { bottom: auto; }
.bunyi-panel .bp-tajuk { font-weight: 700; color: #e2b84a; margin-bottom: 6px; }
.bunyi-panel label { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.bunyi-panel label.bp-senyap { flex-direction: row; gap: 6px; align-items: center; margin: 4px 0 0; }
.bunyi-panel input[type=range] { accent-color: #e2b84a; width: 100%; }

/* ---------- Pemilih kad (carian dropdown) ---------- */
.pk { position: relative; }
.pk-cari { position: relative; }
.pk-jatuh { position: absolute; z-index: 1050; left: 0; right: 0; top: calc(100% + 4px); background: #141936; border: 1px solid rgba(226, 184, 74, .5); border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .6); overflow: hidden; min-width: 280px; }
.pk-tapis { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); flex-wrap: wrap; }
.pk-tapis button { border: 1px solid rgba(255, 255, 255, .15); background: transparent; color: #cfd3ea; font-size: .72rem; border-radius: 999px; padding: 1px 9px; }
.pk-tapis button.aktif { background: #e2b84a; color: #1b1300; border-color: #e2b84a; }
.pk-senarai { max-height: 300px; overflow-y: auto; }
.pk-calon { display: flex; align-items: center; gap: 8px; padding: 5px 10px; cursor: pointer; font-size: .82rem; }
.pk-calon:hover, .pk-calon.fokus { background: rgba(226, 184, 74, .15); }
.pk-calon.dipilih { background: rgba(57, 217, 138, .08); }
.pk-kosong { padding: 10px; color: #8b90b0; font-size: .82rem; }
.pk-ikon { width: 26px; text-align: center; font-size: 1.1rem; flex: 0 0 auto; }
.pk-nama { flex: 1; min-width: 0; line-height: 1.15; }
.pk-nama b { font-weight: 600; } .pk-nama small { display: block; color: #8b90b0; font-size: .7rem; }
.pk-tanda { color: #39d98a; font-weight: 700; font-size: .75rem; }
.pk-pilihan { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 340px; overflow-y: auto; }
.pk-baris { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; padding: 3px 6px; font-size: .82rem; }
.pk-n { display: flex; align-items: center; gap: 2px; }
.pk-n button { width: 24px; height: 24px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; border-radius: 6px; line-height: 1; }
.pk-n input { width: 52px; text-align: center; background: rgba(0, 0, 0, .3); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; height: 24px; font-size: .8rem; }
.pk-x { border: 0; background: transparent; color: #ff8a8a; font-size: .9rem; }
.pk-ringkas { margin-top: 2px; }

/* ---------- Arkib: pemain sinematik skrin penuh ---------- */
body.arkib-terbuka { overflow: hidden; }
.arkib-wayang { position: fixed; inset: 0; z-index: 3000; background: #05060b; color: #fff; overflow: hidden; animation: aw-masuk .5s ease both; user-select: none; }
.arkib-wayang.keluar { animation: aw-keluar .5s ease both; }
@keyframes aw-masuk { from { opacity: 0; } } @keyframes aw-keluar { to { opacity: 0; } }
.aw-pentas, .aw-lapis, .aw-gambar { position: absolute; inset: 0; }
.aw-gambar { background: center / cover no-repeat; animation: aw-kenburns var(--saat, 6s) ease-out both; }
.aw-gambar.kosong { background: radial-gradient(ellipse at 50% 40%, #2a2350, #05060b 70%); }
@keyframes aw-kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1%, -1%); } }
.aw-lapis.masuk-pudar { animation: aw-pudar 1.2s ease both; }
.aw-lapis.masuk-zum { animation: aw-zum 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.aw-lapis.masuk-geser { animation: aw-geser 1.1s cubic-bezier(.3, .8, .3, 1) both; }
.aw-lapis.masuk-pusing { animation: aw-pusing 1.2s cubic-bezier(.3, .7, .3, 1) both; }
.aw-lapis.masuk-kilat { animation: aw-pudar .25s ease both; }
.aw-lapis.masuk-tirai { animation: none; }
@keyframes aw-pudar { from { opacity: 0; } }
@keyframes aw-zum { from { opacity: 0; transform: scale(1.6); filter: blur(8px); } }
@keyframes aw-geser { from { transform: translateX(100%); } }
@keyframes aw-pusing { from { opacity: 0; transform: perspective(1200px) rotateY(-90deg); } }
.aw-kilat { position: absolute; inset: 0; background: #fff; animation: aw-kilat 1s ease-out both; pointer-events: none; }
@keyframes aw-kilat { 0% { opacity: 1; } 100% { opacity: 0; } }
.aw-tirai { position: absolute; inset: 0; display: flex; pointer-events: none; }
.aw-tirai i { flex: 1; background: linear-gradient(90deg, #4a0d16, #8a1c2b 50%, #4a0d16); animation: aw-tirai-k 1.4s cubic-bezier(.6, 0, .3, 1) .2s both; }
.aw-tirai i + i { animation-name: aw-tirai-n; }
@keyframes aw-tirai-k { to { transform: translateX(-100%); } } @keyframes aw-tirai-n { to { transform: translateX(100%); } }
.aw-gelap { position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .85)); pointer-events: none; }
.aw-kapsyen { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); width: min(880px, 92vw); text-align: center; font-size: clamp(1rem, 2.4vw, 1.5rem);
    line-height: 1.5; text-shadow: 0 2px 6px #000; font-family: var(--fon-kapsyen); min-height: 3em; }
.aw-kapsyen.ada span::after { content: '▍'; opacity: .5; animation: aw-kelip 1s steps(2) infinite; }
@keyframes aw-kelip { 50% { opacity: 0; } }
.aw-titik { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); display: flex; gap: 6px; }
.aw-titik i { width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); transition: background .4s; }
.aw-titik i.aktif { background: #f5c451; }
.aw-kawal { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 5; opacity: .55; transition: opacity .2s; }
.arkib-wayang:hover .aw-kawal, .aw-kawal:focus-within { opacity: 1; }
.aw-kawal button { background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 4px 10px; font-size: .9rem; }
.arkib-wayang.dijeda .aw-gambar, .arkib-wayang.dijeda .aw-lapis { animation-play-state: paused; }
.arkib-wayang.dijeda::after { content: '⏸ Dijeda'; position: absolute; top: 14px; left: 14px; background: rgba(0, 0, 0, .6); padding: 2px 10px; border-radius: 8px; font-size: .85rem; }
.aw-tajuk, .aw-akhir { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; z-index: 4;
    background: radial-gradient(ellipse at center, rgba(40, 30, 80, .92), rgba(5, 6, 11, .98) 70%); }
.aw-tajuk h2, .aw-akhir h3 { font-family: var(--fon-tajuk); color: #f5c451; text-shadow: 0 0 20px rgba(245, 196, 81, .4); }
.aw-tajuk h2 { font-size: clamp(1.6rem, 5vw, 3rem); animation: aw-naik 1s .2s ease both; }
.aw-tajuk p { max-width: 640px; opacity: .8; animation: aw-naik 1s .4s ease both; }
.aw-label { letter-spacing: .25em; text-transform: uppercase; font-size: .75rem; opacity: .6; }
.aw-ikon { font-size: 4rem; animation: aw-naik .8s ease both; }
.aw-tajuk.pergi { animation: aw-keluar .7s ease both; pointer-events: none; }
@keyframes aw-naik { from { opacity: 0; transform: translateY(20px); } }
.aw-akhir { animation: aw-masuk .8s ease both; }
.aw-kad .kad { margin: 0 auto 12px; }
.aw-kad { filter: drop-shadow(0 0 30px rgba(245, 196, 81, .55)); }
.aw-simpan { color: #9fe3b0; font-weight: 600; animation: aw-naik .6s 1.4s ease both; }
@media (prefers-reduced-motion: reduce) { .arkib-wayang *, .arkib-wayang { animation-duration: 1ms !important; } }

/* ---------- Perpustakaan ---------- */
.tahap-lencana { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #f5c451, #c98a1b); color: #1a1205; font-weight: 800; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.xp-bar { height: 8px; background: rgba(255, 255, 255, .1); border-radius: 4px; overflow: hidden; }
.xp-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #6ad1ff, #f5c451); border-radius: 4px; }
.arkib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.arkib-entri { position: relative; border-radius: 14px; overflow: hidden; background: #141826; border: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; }
.arkib-entri .ae-kulit { aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 40%, #2a2350, #0b0d16) center / cover; display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; }
.arkib-entri.terkunci .ae-kulit { filter: grayscale(1) brightness(.35) blur(2px); }
.arkib-entri.terkunci .ae-kunci { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-size: 2.2rem; }
.arkib-entri .ae-isi { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.arkib-entri .ae-baru { position: absolute; top: 8px; left: 8px; background: #f5c451; color: #1a1205; font-weight: 800; font-size: .7rem; border-radius: 6px; padding: 1px 6px; }
.perpustakaan-kunci { max-width: 560px; margin: 40px auto; text-align: center; }

/* ---------- Syarat Arkib: Barisan Pakar ---------- */
.barisan-syarat { position: relative; border-radius: 12px; padding: 10px 10px 8px; text-align: center; overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 210, 100, .28), rgba(40, 24, 0, .6) 70%); border: 1px solid rgba(255, 215, 106, .45);
    box-shadow: inset 0 0 18px rgba(255, 190, 60, .15); }
.barisan-syarat::before { content: ''; position: absolute; inset: -80%; background: repeating-conic-gradient(rgba(255, 230, 150, .07) 0 8deg, transparent 8deg 20deg);
    animation: gear 24s linear infinite; pointer-events: none; }
.barisan-syarat > * { position: relative; }
.barisan-syarat .bp-mahkota { font-size: 1.6rem; line-height: 1; filter: drop-shadow(0 0 8px #ffd76a); animation: bp-apung 2.4s ease-in-out infinite alternate; }
.barisan-syarat .bp-label { font-family: var(--fon-tajuk); font-weight: 800; letter-spacing: .14em; font-size: .78rem; text-transform: uppercase;
    background: linear-gradient(100deg, #c98a1b, #fff3c4 40%, #ffd76a 55%, #c98a1b); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 2px 0 8px; }
.barisan-syarat .bp-rawak { font-family: var(--fon-teks); letter-spacing: 0; text-transform: none; font-weight: 600; color: #9fe3b0; -webkit-text-fill-color: #9fe3b0; }
.barisan-syarat .bp-slots { display: flex; justify-content: center; gap: 6px; }
.bp-slot { position: relative; flex: 1 1 0; max-width: 92px; aspect-ratio: 5 / 7; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 4px; font-size: .62rem; line-height: 1.15; background: linear-gradient(160deg, #3a2a08, #171006); border: 1.5px solid #8a6a2a; color: #f3e6c4; }
.bp-slot .bp-ikon { font-size: 1.5rem; line-height: 1; }
.bp-slot .bp-nama { font-weight: 700; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bp-slot.ada { border-color: #ffd76a; box-shadow: 0 0 10px rgba(255, 215, 106, .6), inset 0 0 12px rgba(255, 215, 106, .25); }
.bp-slot.ada .bp-ikon { filter: drop-shadow(0 0 6px #ffd76a); }
.bp-slot.tiada { filter: grayscale(.85); opacity: .7; border-style: dashed; }
.bp-slot.bebas { border-style: dashed; color: #ffd76a; }
.bp-slot.bebas .bp-ikon { font-size: 1.2rem; }
.bp-slot .bp-tanda { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #2ecc71; color: #fff; font-style: normal;
    font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #171006; }
.barisan-syarat .bp-kira { font-size: .72rem; color: #ffd76a; margin-top: 6px; }
.barisan-syarat.kecil .bp-slot { font-size: .58rem; }
@keyframes bp-apung { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes gear { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .barisan-syarat::before, .barisan-syarat .bp-mahkota { animation: none; } }
.aw-barisan { margin: 4px 0 12px; animation: aw-naik .6s 1s ease both; }
.aw-barisan .bp-label { font-family: var(--fon-tajuk); font-weight: 800; letter-spacing: .12em; font-size: .8rem; color: #ffd76a; margin-bottom: 8px; }
.aw-barisan .bp-slots { display: flex; gap: 8px; justify-content: center; }
.aw-barisan .bp-slot { width: 74px; flex: 0 0 auto; animation: aw-naik .5s ease both; }

/* ---------- Teka-teki ---------- */
.teka-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.teka-kad { display: flex; flex-direction: column; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, rgba(124, 77, 255, .12), rgba(255, 255, 255, .03));
    border: 1px solid rgba(124, 77, 255, .35); }
.teka-kad.siap { border-color: rgba(46, 204, 113, .55); background: linear-gradient(160deg, rgba(46, 204, 113, .12), rgba(255, 255, 255, .03)); }
.teka-kad.kunci { opacity: .6; filter: grayscale(.6); }
.teka-kad .tk-kepala { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.teka-kad .tk-ikon { font-size: 2rem; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .25); }
.teka-kad .tk-status { font-size: 1.4rem; }
.tk-syarat { list-style: none; padding: 0; margin: 0 0 8px; font-size: .8rem; }
.tk-syarat li { padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.tk-hadiah .badge { margin: 2px 2px 0 0; }
.tk-petunjuk { background: rgba(255, 215, 106, .1); border: 1px solid rgba(255, 215, 106, .35); border-radius: 8px; padding: 6px 10px; }

/* Bar navigasi: elak teks menu berbalut dua baris bila menu bertambah */
.bar-atas .navbar-nav .nav-link { white-space: nowrap; padding-left: .45rem; padding-right: .45rem; font-size: .93rem; }
.bar-atas .navbar-text { white-space: nowrap; }

/* v18: Lobi baharu */
.lobi-salam { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12); color: inherit; margin-bottom: 14px; text-align: left; flex-wrap: wrap; }
.lobi-salam:hover { background: rgba(255, 255, 255, .1); color: inherit; }
.lobi-salam .ls-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); font-size: 1.3rem; }
.lobi-salam .tahap-lencana { margin-left: 6px; font-size: .75rem; }
.lobi-salam .ls-pautan { font-size: .8rem; color: var(--bs-info, #6fd3ff); }
.btn-teka { box-shadow: 0 0 0 0 rgba(13, 202, 240, .4); }
.btn-teka:hover { box-shadow: 0 0 18px rgba(13, 202, 240, .45); }
.musim-baris { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(226, 184, 74, .25); color: inherit; }
.musim-baris:hover { background: rgba(226, 184, 74, .1); color: inherit; }
.kedai-tab .nav-link { color: #c9cfe0; }
.kedai-tab .nav-link.active { background: rgba(226, 184, 74, .15); color: #ffe08a; border-color: rgba(226, 184, 74, .45) rgba(226, 184, 74, .45) transparent; }
.kad-belum .kad { filter: grayscale(.85) brightness(.6); }
/* v18: butiran kad di Dek & Koleksi */
.kad-klik { cursor: pointer; transition: transform .15s; }
.kad-klik:hover { transform: translateY(-3px); }
.mk-kad .kad { transform: scale(1.25); transform-origin: top center; margin-bottom: 30%; }
.mk-kad.belum .kad { filter: grayscale(.85) brightness(.6); }
.perjalanan-watak { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; }
.perjalanan-watak .pw-item { flex: 0 0 auto; text-align: center; cursor: pointer; border-radius: 12px; padding: 4px; border: 2px solid transparent; }
.perjalanan-watak .pw-item .kad { width: 92px; font-size: .6rem; }
.perjalanan-watak .pw-item.pw-ini { border-color: #e2b84a; background: rgba(226, 184, 74, .1); }
.perjalanan-watak .pw-item.pw-kunci { cursor: not-allowed; opacity: .55; }
.perjalanan-watak .pw-item.pw-kunci .kad { filter: grayscale(1) brightness(.5); pointer-events: none; }
.perjalanan-watak .pw-label { font-size: .7rem; color: #aab3c8; margin-top: 2px; line-height: 1.2; }
.perjalanan-watak .pw-anak { color: #e2b84a; font-size: 1.1rem; }
/* v18.1: Teka-teki Hari Ini */
.teka-harian { border: 1px solid rgba(13, 202, 240, .45); background: linear-gradient(135deg, rgba(13, 202, 240, .12), rgba(30, 20, 60, .6)); }
.teka-harian .th-ikon { font-size: 3rem; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 18px; background: rgba(0, 0, 0, .3); }
.carian .th-kad { max-width: 560px; margin: 0 auto; text-align: left; }
.carian .th-kad .tk-syarat { font-size: .85rem; }
