/* FM Studio: gaya bersama untuk semua halaman */
:root {
  --ink: #2b1d3a;
  --ink-soft: #6b5b7b;
  --paper: #fffaf2;
  --pink: #ff5fa2;
  --pink-d: #d83a80;
  --mint: #2ec4a6;
  --mint-d: #1e9a82;
  --lemon: #ffc93c;
  --lemon-d: #e0a800;
  --sky: #4aa8ff;
  --sky-d: #2a7fd4;
  --lilac: #9b7bff;
  --lilac-d: #7354e0;
  --orange: #ff8a3d;
  --orange-d: #e06a1c;
  --f-head: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* kepala laman */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 3px solid #f3e6f7; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; }
.logo b { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.05rem; letter-spacing: .02em; background: conic-gradient(from 200deg, var(--pink), var(--lemon), var(--mint), var(--sky), var(--lilac), var(--pink)); box-shadow: 0 4px 0 var(--lilac-d); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-weight: 800; font-size: .92rem; padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); }
.nav a:hover { background: #f6eefb; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 620px) { .nav a { padding: 7px 10px; font-size: .85rem; } .logo span { display: none; } }

/* butang */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--f-head); font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; padding: 11px 20px; border-radius: 16px; color: #fff; background: var(--pink); box-shadow: 0 5px 0 var(--pink-d); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--pink-d); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-d); }
.btn.mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }
.btn.sky { background: var(--sky); box-shadow: 0 5px 0 var(--sky-d); }
.btn.lemon { background: var(--lemon); color: var(--ink); box-shadow: 0 5px 0 var(--lemon-d); }
.btn.lilac { background: var(--lilac); box-shadow: 0 5px 0 var(--lilac-d); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #e3d6ea; border: 2px solid #eadcf1; }
.btn.small { font-size: .9rem; padding: 8px 14px; border-radius: 13px; }
.btn[aria-disabled="true"] { background: #e9e4ee; color: #8f86a0; box-shadow: 0 5px 0 #d4cdde; cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* kad */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { --c: var(--pink); --cd: var(--pink-d); background: #fff; border: 4px solid var(--c); border-radius: 24px; box-shadow: 0 8px 0 var(--cd); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .15s; }
.card:hover { transform: translateY(-4px) rotate(-.4deg); }
.cover { position: relative; aspect-ratio: 16 / 10; background: #f3eef7; overflow: hidden; max-width: 100%; }
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after { content: "FM"; position: absolute; right: 10px; top: 10px; font-family: var(--f-head); font-weight: 600; font-size: .75rem; color: #fff; background: rgba(43, 29, 58, .55); padding: 2px 8px; border-radius: 8px; }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
.card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.meta { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .72rem; font-weight: 900; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; background: #f1ecf6; color: var(--ink-soft); }
.tag.free { background: #dcfaef; color: #0f7a62; }
.tag.paid { background: #fff0c2; color: #8a5a00; }
.tag.soon { background: #eeeaf3; color: #7d7390; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.price { font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; color: var(--pink-d); }

/* penapis */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
.filters .lbl { font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-right: 4px; }
.chip { font-family: var(--f-body); font-weight: 800; font-size: .88rem; cursor: pointer; border: 2px solid #eadcf1; background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 999px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { font-weight: 800; color: var(--ink-soft); font-size: .9rem; margin: 0 0 14px; }
.empty { padding: 28px; border-radius: 20px; background: #fff; border: 3px dashed #eadcf1; text-align: center; color: var(--ink-soft); grid-column: 1 / -1; }

/* tajuk bahagian */
.sec { padding-block: 44px 20px; }
.sec h2 { font-family: var(--f-head); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 6px; line-height: 1.15; }
.sec .lead { margin: 0 0 18px; color: var(--ink-soft); max-width: 60ch; }

/* kaki laman */
.foot { margin-top: 50px; padding-block: 30px calc(30px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #e9e0f2; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.foot b { font-family: var(--f-head); font-weight: 600; font-size: 1.1rem; }
.foot p { margin: 0; font-size: .88rem; color: #bfb2cf; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); background: var(--ink); color: #fff; font-weight: 800; padding: 13px 20px; border-radius: 16px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(43, 29, 58, .3); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
