@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ───────── Token warna: terang (lalai) ───────── */
:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .16);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --on-accent: #ffffff;
  --nav: rgba(251, 251, 253, .72);
  --field: #ffffff;
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 18px 48px rgba(0, 0, 0, .08);
  --stage: linear-gradient(180deg, #ffffff, #f2f2f6);
  --maps: #1aa874;
  --maps-soft: #e5f7ef;
  --gaming: #5856d6;
  --gaming-soft: #ecebfc;
  --grad: linear-gradient(90deg, #7b3ff2, #d6338c 45%, #f2700f);
  --ok: #1a7f37;
  --bad: #c9302c;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --nav-h: 52px;
}

/* ───────── Token warna: gelap ───────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-alt: #0b0b0c;
    --card: #161617;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .2);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --on-accent: #ffffff;
    --nav: rgba(22, 22, 23, .72);
    --field: #1d1d1f;
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .5);
    --stage: linear-gradient(180deg, #161617, #0d0d0e);
    --maps: #30d158;
    --maps-soft: #0f2a1c;
    --gaming: #7d7aff;
    --gaming-soft: #1c1b3a;
    --ok: #30d158;
    --bad: #ff6961;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #0b0b0c;
  --card: #161617;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .2);
  --accent: #2997ff;
  --accent-hover: #47a6ff;
  --on-accent: #ffffff;
  --nav: rgba(22, 22, 23, .72);
  --field: #1d1d1f;
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .5);
  --stage: linear-gradient(180deg, #161617, #0d0d0e);
  --maps: #30d158;
  --maps-soft: #0f2a1c;
  --gaming: #7d7aff;
  --gaming-soft: #1c1b3a;
  --ok: #30d158;
  --bad: #ff6961;
}

/* ───────── Asas ───────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.47 var(--font); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .5; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
.shell { width: min(1040px, calc(100% - 44px)); margin-inline: auto; }

/* ───────── Navigasi kaca ───────── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: var(--nav); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
}
.nav-inner { width: min(1040px, calc(100% - 44px)); height: 100%; margin: auto; display: flex; align-items: center; gap: 12px; }
.nav nav { margin-right: 6px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: .12em; }
.wordmark img { object-fit: contain; }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); font-size: 13px; }
.nav nav > a { color: var(--ink); opacity: .82; transition: opacity .25s; white-space: nowrap; }
.nav nav > a:hover { opacity: 1; }
.nav-account {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 13px; border: 0; border-radius: 980px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background-color .25s, transform .25s var(--ease);
}
.nav-account:hover { background: var(--accent-hover); transform: scale(1.04); }
.nav-account:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.menu-chevron { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; transition: transform .35s var(--ease); }
.nav-account[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }

/* Menu "Akaun": kaca kabur, sama gaya dengan menu bahasa. */
.account-menu { position: relative; }
.menu-list {
  position: absolute; z-index: 60; top: calc(100% + 12px); right: 0; min-width: 236px; padding: 6px;
  display: grid; gap: 2px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 24px 56px rgba(0, 0, 0, .18);
  transform-origin: top right; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.96);
  transition: opacity .2s ease, transform .35s var(--ease), visibility 0s linear .35s;
}
.account-menu.open .menu-list { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .4s var(--ease), visibility 0s; }
.menu-list a {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--ink); font-size: 15px; white-space: nowrap; transition: background-color .2s;
}
.menu-list a:hover, .menu-list a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.menu-list a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-list em { margin-left: auto; padding: 2px 8px; border-radius: 980px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--maps); background: var(--maps-soft); }
.menu-list hr { width: calc(100% - 16px); margin: 4px 8px; border: 0; border-top: 1px solid var(--line); }
.menu-user { display: grid; gap: 1px; padding: 8px 12px 10px; margin-bottom: 2px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.menu-user strong { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.account-menu.open .menu-list > * { animation: lang-in .4s var(--ease) both; }
.account-menu.open .menu-list > :nth-child(2) { animation-delay: .03s; }
.account-menu.open .menu-list > :nth-child(3) { animation-delay: .06s; }
.account-menu.open .menu-list > :nth-child(n+4) { animation-delay: .09s; }

.theme-toggle {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent;
  transition: background-color .25s, transform .4s var(--ease);
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle:active { transform: scale(.9); }
.theme-toggle svg { grid-area: 1 / 1; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: opacity .4s var(--ease), transform .6s var(--ease); }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
/* Terang: tunjuk bulan (klik untuk gelap). Gelap: tunjuk matahari. */
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.theme-toggle .icon-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
}

/* Pemilih bahasa: pil dengan menu kaca sendiri (menu <select> asli pelayar tidak boleh digayakan). */
.lang-menu { position: relative; flex: none; }
.lang-button {
  height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px 0 10px;
  border: 1px solid var(--line); border-radius: 980px; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 600; transition: background-color .25s, border-color .25s, box-shadow .25s;
}
.lang-button:hover { background: var(--line); }
.lang-button:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.lang-button[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lang-globe { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; opacity: .8; }
.lang-chevron { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .35s var(--ease); }
.lang-button[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.lang-list {
  position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; min-width: 210px; padding: 6px;
  display: grid; gap: 2px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 24px 56px rgba(0, 0, 0, .18);
  transform-origin: top right;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.96);
  transition: opacity .2s ease, transform .35s var(--ease), visibility 0s linear .35s;
}
.lang-menu.open .lang-list { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .4s var(--ease), visibility 0s; }
.lang-list button {
  display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font-size: 15px; text-align: left; transition: background-color .2s;
}
.lang-list button:hover, .lang-list button:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.lang-code { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.lang-check { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease); }
.lang-list button[aria-selected="true"] { font-weight: 600; }
.lang-list button[aria-selected="true"] .lang-check { opacity: 1; transform: none; }
/* Pilihan muncul satu demi satu ketika menu dibuka. */
.lang-menu.open .lang-list button { animation: lang-in .4s var(--ease) both; }
.lang-menu.open .lang-list button:nth-child(2) { animation-delay: .04s; }
.lang-menu.open .lang-list button:nth-child(3) { animation-delay: .08s; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } }

/* ───────── Butang ───────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border: 1px solid transparent; border-radius: 980px;
  font-size: 17px; font-weight: 500; line-height: 1;
  transition: background-color .25s, border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease);
}
.button:active { transform: scale(.97); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.button.secondary:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.text-link { color: var(--accent); font-size: 17px; display: inline-flex; align-items: center; gap: 4px; }
.text-link span { transition: transform .3s var(--ease); }
.text-link:hover { text-decoration: underline; }
.text-link:hover span { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; margin-top: 28px; }

/* ───────── Hero ───────── */
.hero { position: relative; isolation: isolate; text-align: center; padding: clamp(56px, 11vh, 120px) 22px clamp(64px, 10vh, 110px); overflow: hidden; }
.hero-glow {
  position: absolute; z-index: -1; left: 50%; top: -12%; width: min(1100px, 140vw); aspect-ratio: 1.6;
  translate: -50% 0; border-radius: 50%; filter: blur(80px); opacity: .55;
  background: conic-gradient(from 0deg, #7b3ff2, #d6338c, #f2700f, #2997ff, #7b3ff2);
  animation: glow-spin 24s linear infinite;
  mask: radial-gradient(closest-side, #000 30%, transparent);
}
:root[data-theme="dark"] .hero-glow { opacity: .35; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-glow { opacity: .35; } }
@keyframes glow-spin { to { rotate: 360deg; } }
.hero-logo { width: clamp(84px, 11vw, 112px); height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .18)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -10px; } }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-top: 22px; }
.hero h1 { font-size: clamp(44px, 8.4vw, 96px); margin-top: 10px; }
.gradient-text { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s ease-in-out infinite; }
@keyframes shimmer { 50% { background-position: 100% 0; } }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); max-width: 30em; margin: 20px auto 0; text-wrap: balance; }

.app-tiles { list-style: none; padding: 0; margin: clamp(48px, 8vh, 80px) auto 0; width: min(1040px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.app-tile {
  height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px 26px;
  border-radius: 28px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .5s var(--ease);
}
a.app-tile:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow), 0 30px 60px color-mix(in srgb, var(--tile) 22%, transparent); }
.app-tile img { width: 72px; height: 72px; border-radius: 18px; object-fit: contain; margin-bottom: 10px; transition: transform .6s var(--ease); }
a.app-tile:hover img { transform: scale(1.08) rotate(-3deg); }
.app-tile strong { font-size: 21px; letter-spacing: -.02em; }
.app-tile span { color: var(--muted); font-size: 15px; }
.tile-maps { --tile: var(--maps); }
.tile-gaming { --tile: var(--gaming); }
.soon-dots { width: 72px; height: 72px; margin-bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; place-items: center; padding: 10px; border-radius: 18px; background: var(--bg-alt); }
.soon-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: .35; animation: dot 2.4s ease-in-out infinite; }
.soon-dots i:nth-child(2) { animation-delay: .15s; } .soon-dots i:nth-child(3) { animation-delay: .3s; } .soon-dots i:nth-child(4) { animation-delay: .45s; }
.soon-dots i:nth-child(5) { animation-delay: .6s; } .soon-dots i:nth-child(6) { animation-delay: .75s; } .soon-dots i:nth-child(7) { animation-delay: .9s; } .soon-dots i:nth-child(8) { animation-delay: 1.05s; }
@keyframes dot { 30% { opacity: 1; background: var(--accent); transform: scale(1.25); } }

/* ───────── Pemilih aplikasi ───────── */
.hero-actions { display: grid; justify-items: center; gap: 20px; margin-top: 30px; }
.app-launcher {
  width: min(100%, 328px); border-radius: 999px; color: #fdfaff; text-align: start;
  border: 1px solid #bd9cf166;
  background: linear-gradient(135deg, #2c203d, #1d2034 62%, #172a3c);
  box-shadow: 0 14px 40px #442d7938, 0 3px 9px #0b142633, inset 0 1px 0 #ffffff24;
  transition: width .48s var(--ease), border-radius .45s var(--ease), box-shadow .25s ease;
}
.app-launcher[open] { width: min(100%, 440px); border-radius: 28px; }
.app-launcher:hover, .app-launcher:focus-within {
  box-shadow: 0 18px 44px #6d4eb74d, 0 4px 10px #0b142644, inset 0 1px 0 #ffffff2b;
}
.app-launcher summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center;
  min-height: 68px; padding: 11px 15px; cursor: pointer; list-style: none; border-radius: inherit;
}
.app-launcher summary::-webkit-details-marker { display: none; }
.app-launcher summary:focus-visible, .app-launcher-link:focus-visible { outline: 2px solid #dbbdff; outline-offset: -3px; }
.app-launcher-icons { display: flex; align-items: center; padding: 0 2px; }
.app-launcher-icons img, .app-launcher-link img {
  display: block; flex: none; object-fit: contain; background: #171c2d;
  border: 1px solid #ffffff2e; border-radius: 10px;
}
.app-launcher-icons img:first-child { position: relative; z-index: 1; }
.app-launcher-icons img + img { margin-inline-start: -6px; }
.app-launcher-title { font-size: 16px; font-weight: 680; }
.app-launcher-chevron {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: #e4d1ff; background: #ffffff10; border: 1px solid #ffffff16;
}
.app-launcher-chevron::before {
  content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.7px 1.7px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease);
}
.app-launcher[open] .app-launcher-chevron::before { transform: translateY(2px) rotate(225deg); }
.app-launcher-links { display: grid; gap: 7px; padding: 0 9px 9px; }
.app-launcher[open] .app-launcher-links { animation: reveal-apps .36s var(--ease) both; }
@keyframes reveal-apps { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: no-preference) {
  @supports selector(details::details-content) and (interpolate-size: allow-keywords) {
    .app-launcher::details-content {
      interpolate-size: allow-keywords; contain: layout; overflow: clip; block-size: 0; opacity: 0;
      transition: block-size .48s var(--ease), opacity .28s ease, content-visibility .48s allow-discrete;
    }
    .app-launcher[open]::details-content { block-size: auto; opacity: 1; }
    .app-launcher[open] .app-launcher-links { animation: none; }
  }
}
.app-launcher-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 9px 12px; border: 1px solid #ffffff15; border-radius: 18px; background: #ffffff0b;
  transition: background-color .25s ease, border-color .25s ease;
}
.app-launcher-link:hover { background: #ffffff17; border-color: #ffffff30; }
.app-launcher-link strong, .app-launcher-link small { display: block; overflow-wrap: anywhere; }
.app-launcher-link strong { font-size: 15px; font-weight: 650; }
.app-launcher-link small { color: #ccc8d9; font-size: 13px; }
.app-launcher-arrow { font-size: 20px; line-height: 1; color: var(--launcher-accent); transition: transform .25s var(--ease); }
.app-launcher-link:hover .app-launcher-arrow { transform: translateX(2px); }
.app-launcher-maps { --launcher-accent: #f3aee4; }
.app-launcher-boost { --launcher-accent: #9dd7ff; }

/* ───────── Seksyen produk ───────── */
.product { padding: clamp(80px, 13vh, 140px) 0 clamp(70px, 11vh, 120px); background: var(--bg-alt); transition: background-color .5s var(--ease); }
.product.gaming { background: var(--bg); }
.product-head { text-align: center; }
.product-name { font-size: clamp(19px, 2vw, 22px); font-weight: 600; color: var(--product); }
.maps { --product: var(--maps); --product-soft: var(--maps-soft); }
.gaming { --product: var(--gaming); --product-soft: var(--gaming-soft); }
.product h2 { font-size: clamp(40px, 6.4vw, 76px); margin-top: 10px; }
.product-lead { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 34em; margin: 20px auto 0; text-wrap: balance; }

.stage {
  position: relative; margin-top: clamp(44px, 7vh, 72px); aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 32px; background: var(--stage); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: background .5s var(--ease);
}
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, var(--product-soft), transparent 65%); }
.stage-emblem {
  position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; width: clamp(110px, 19%, 180px); aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 28%; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--product) 30%, transparent), 0 4px 14px rgba(0, 0, 0, .08);
  animation: float 7s ease-in-out infinite;
}
.stage-emblem img { width: 82%; height: 82%; object-fit: contain; border-radius: 24%; }
.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap;
  background: linear-gradient(120deg, #23283b, #182032); color: #fdfaff;
  border: 1px solid #9faece55; box-shadow: 0 8px 20px #1020343d;
  animation: float 6s ease-in-out infinite;
}
.chip svg, .feature-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip svg { flex: none; width: 17px; height: 17px; color: #afcbff; }
.maps .chip svg { color: #f3aee4; }
.chip-a { left: 7%; bottom: 14%; }
.chip-b { right: 7%; top: 14%; animation-delay: -3s; }

.map-grid { position: absolute; inset: -40%; transform: rotate(-24deg); opacity: .55;
  background-image: repeating-linear-gradient(0deg, color-mix(in srgb, var(--product) 22%, transparent) 0 1px, transparent 1px 46px),
                    repeating-linear-gradient(90deg, color-mix(in srgb, var(--product) 22%, transparent) 0 1px, transparent 1px 74px); }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.map-route path { fill: none; stroke: var(--product); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--product) 50%, transparent)); }
.is-visible .map-route path, .stage.is-visible .map-route path { animation: draw 2.4s var(--ease) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pin { position: absolute; z-index: 2; width: 18px; height: 18px; border-radius: 50%; background: var(--product); border: 4px solid var(--card); box-shadow: 0 0 0 0 color-mix(in srgb, var(--product) 60%, transparent); animation: pulse 2.2s ease-out infinite; }
.pin-start { left: calc(11.6% - 9px); top: calc(82.5% - 9px); }
.pin-end { left: calc(88.3% - 9px); top: calc(17.5% - 9px); animation-delay: -1.1s; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.graph-bars { position: absolute; inset: auto 8% 0; height: 78%; display: flex; align-items: end; gap: 3%; }
.graph-bars i { flex: 1; height: 0; border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--product) 75%, transparent), color-mix(in srgb, var(--product) 8%, transparent));
  transition: height 1.4s var(--ease); }
.graph-bars i:nth-child(2) { transition-delay: .08s; } .graph-bars i:nth-child(3) { transition-delay: .16s; } .graph-bars i:nth-child(4) { transition-delay: .24s; }
.graph-bars i:nth-child(5) { transition-delay: .32s; } .graph-bars i:nth-child(6) { transition-delay: .4s; } .graph-bars i:nth-child(7) { transition-delay: .48s; }
.stage.is-visible .graph-bars i { height: var(--h); }

.features { list-style: none; padding: 0; margin-top: clamp(28px, 5vh, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.features li { padding: 28px 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .5s var(--ease); }
.features li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--product);
  background: linear-gradient(140deg, var(--card), var(--product-soft)); border: 1px solid color-mix(in srgb, var(--product) 20%, var(--line));
  margin-bottom: 16px;
}
.feature-icon svg { width: 25px; height: 25px; }
.features h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 6px; }
.features p { color: var(--muted); font-size: 16px; }

/* ───────── Portal: pelan, akaun, sokongan ───────── */
.portal { padding: clamp(70px, 12vh, 130px) 0; background: var(--bg-alt); transition: background-color .5s var(--ease); }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.plan {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  padding: clamp(28px, 4vw, 48px); border-radius: 32px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #3a1d7a, #8a1f5f 55%, #b8520b);
}
.plan::after { content: ""; position: absolute; z-index: -1; inset: -50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), transparent 40%); animation: glow-spin 18s linear infinite; }
.plan div { flex: 1 1 24rem; }
.plan .eyebrow { color: rgba(255, 255, 255, .75); margin: 0 0 6px; }
.plan h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.plan p { color: rgba(255, 255, 255, .82); max-width: 60ch; }
.plan .button.secondary { color: #fff; border-color: rgba(255, 255, 255, .7); }
.plan .button.secondary:hover { background: rgba(255, 255, 255, .14); }

.portal-card { min-width: 0; padding: clamp(24px, 3.4vw, 40px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: background-color .5s var(--ease); }
.portal-card h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 10px; }
.portal-card > p { color: var(--muted); }
.portal-card form { margin-top: 22px; display: grid; gap: 14px; }
.portal-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.portal-card :is(input, select, textarea) {
  width: 100%; min-height: 48px; padding: 12px 14px; color: var(--ink); background: var(--field);
  border: 1px solid var(--line-strong); border-radius: 12px; font-size: 17px; font-weight: 400;
  transition: border-color .25s, box-shadow .25s, background-color .5s var(--ease);
  appearance: none; -webkit-appearance: none;
}
.portal-card select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.portal-card :is(input, select, textarea):hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.portal-card :is(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.portal-card textarea { resize: vertical; min-height: 120px; }
.portal-card .button { width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 22px; padding: 3px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); }
.switch button { position: relative; z-index: 1; min-height: 38px; padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 600; color: var(--muted); transition: color .3s, background-color .3s, box-shadow .3s; }
.switch button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.profile-actions, .form-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-actions .button { width: auto; flex: 1 1 auto; font-size: 15px; padding: 10px 16px; }
.link-button, .form-links button { min-height: 40px; padding: 6px 4px; background: transparent; border: 0; color: var(--accent); font-size: 15px; justify-self: start; }
.link-button:hover, .form-links button:hover { text-decoration: underline; }
.profile-list { margin: 14px 0; }
.profile-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
#profile-name { margin-top: 22px; font-size: 24px; letter-spacing: -.02em; }
#account-loading { margin-top: 22px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.portal-card .form-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; overflow-wrap: anywhere; color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); animation: pop .45s var(--ease); }
.portal-card .form-status:empty { display: none; }
.portal-card .form-status.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ───────── Kad promosi akaun (halaman utama) ───────── */
.account-promo { display: flex; flex-direction: column; }
.promo-list { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; gap: 10px; }
.promo-list li { position: relative; padding-left: 30px; font-weight: 500; }
.promo-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7b3ff2, #ff46a4);
}
.promo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.portal-card .promo-actions .button { width: auto; flex: 1 1 140px; white-space: nowrap; padding-inline: 16px; }
.promo-policy { margin-top: 16px; font-size: 15px; }

/* ───────── Halaman akaun ───────── */
/* Tidak dipotong (overflow: visible) supaya cahaya pudar ke bahagian bawah, bukan berhenti pada garis lurus. */
.acct-hero { position: relative; isolation: isolate; text-align: center; padding: clamp(48px, 9vh, 96px) 22px clamp(28px, 5vh, 48px); }
.acct-hero .hero-glow { top: -30%; width: min(900px, 120vw); opacity: .4; }
.acct-hero-logo { width: 76px; height: auto; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .16)); animation: float 6s ease-in-out infinite; }
.acct-hero h1 { font-size: clamp(40px, 6.6vw, 76px); margin-top: 8px; }
.acct-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px);
  align-items: start; padding-bottom: clamp(56px, 10vh, 110px);
}
.acct-benefits h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 22px; }
.benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.benefit-list li {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .5s var(--ease);
}
.benefit-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.benefit-icon {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 21px;
  color: var(--c); font-weight: 700; background: color-mix(in srgb, var(--c) 13%, transparent);
}
.benefit-list h3 { font-size: 18px; letter-spacing: -.015em; margin-bottom: 4px; }
.benefit-list p { color: var(--muted); font-size: 15px; }
/* Borang tetap kelihatan semasa membaca senarai kebaikan (desktop). */
.auth-card { position: sticky; top: calc(var(--nav-h) + 20px); }
.auth-legal { margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-legal a, .policy-body a { color: var(--accent); }
.auth-legal a:hover, .policy-body a:hover { text-decoration: underline; }

.policy { padding: clamp(64px, 11vh, 120px) 0; background: var(--bg-alt); border-top: 1px solid var(--line); transition: background-color .5s var(--ease); }
.policy-inner { max-width: 820px; }
.policy h2 { font-size: clamp(32px, 4.4vw, 52px); margin-top: 6px; }
.policy .eyebrow { margin-top: 0; }
.policy-updated { color: var(--muted); font-size: 14px; margin: 10px 0 28px; }
.policy-block { margin-top: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .4s var(--ease), background-color .5s var(--ease); }
.policy-block[open] { box-shadow: var(--shadow); }
.policy-block summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px; font-size: 20px; font-weight: 600; letter-spacing: -.015em;
}
.policy-block summary::-webkit-details-marker { display: none; }
.policy-block summary svg { width: 13px; height: 9px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.policy-block[open] summary svg { transform: rotate(180deg); }
.policy-block summary:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.policy-body { padding: 0 24px 22px; border-top: 1px solid var(--line); animation: pop .45s var(--ease); }
.policy-body h3 { font-size: 16px; margin: 20px 0 6px; letter-spacing: -.01em; }
.policy-body p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-card { position: static; grid-row: 1; }
}

/* ───────── Papan pemuka (dashboard.php) ───────── */
.db { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 3.5vw, 44px); align-items: start; width: min(1160px, calc(100% - 44px)); padding-block: clamp(28px, 5vh, 48px) clamp(64px, 10vh, 110px); }
.db-side { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 14px; }
.db-user { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.db-user div { min-width: 0; display: grid; }
.db-user strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-user span:not(.db-avatar) { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-avatar {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, #7b3ff2, #d6338c 55%, #f2700f); box-shadow: 0 6px 16px rgba(214, 51, 140, .3);
}
.db-tabs { display: grid; gap: 4px; }
.db-tabs button, .db-signout {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 13px;
  background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; white-space: nowrap;
  transition: background-color .25s, color .25s;
}
.db-tabs svg, .db-signout svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.db-tabs button:hover { background: var(--line); }
.db-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.db-tabs button[aria-selected="true"] svg { opacity: 1; }
.db-tabs button:focus-visible, .db-signout:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.db-signout { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; padding-top: 6px; }
.db-signout:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); border-radius: 13px; }

.db-main { min-width: 0; }
.db-panel.db-enter { animation: db-in .55s var(--ease); }
@keyframes db-in { from { opacity: 0; transform: translateY(14px); } }
.db-head { margin-bottom: 22px; }
.db-head .eyebrow { margin: 0 0 4px; }
.db-head h1 { font-size: clamp(32px, 4.2vw, 46px); }
.db-lead { color: var(--muted); margin-top: 8px; font-size: 17px; }

/* Berita */
.news-featured {
  display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); overflow: hidden; border-radius: 28px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .5s var(--ease);
}
.news-featured:hover { transform: translateY(-3px); }
.news-theme-company { --news-accent: var(--accent); --news-bg: color-mix(in srgb, var(--accent) 12%, transparent); }
.news-theme-maps { --news-accent: var(--maps); --news-bg: var(--maps-soft); }
.news-theme-gaming { --news-accent: var(--gaming); --news-bg: var(--gaming-soft); }
.news-art {
  display: grid; place-items: center; min-height: 200px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--news-accent, var(--gaming)) 30%, transparent), transparent 70%),
    linear-gradient(135deg, var(--news-bg, var(--gaming-soft)), var(--bg-alt));
}
.news-art img { width: 46%; max-width: 110px; height: auto; border-radius: 24%; }
.news-body { padding: clamp(20px, 3vw, 32px); display: grid; align-content: center; gap: 8px; }
.news-body h2 { font-size: clamp(24px, 2.8vw, 32px); }
.news-body p, .news-card p { color: var(--muted); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.news-card { display: grid; align-content: start; gap: 8px; padding: 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card h3 { font-size: 19px; letter-spacing: -.02em; line-height: 1.25; }
.news-card p { font-size: 15px; }
.news-card .text-link, .news-body .text-link { font-size: 15px; margin-top: 2px; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.chip { padding: 3px 10px; border-radius: 980px; font-size: 12px; font-weight: 600; }
.news-app { padding: 3px 10px; border-radius: 999px; font-weight: 650; color: var(--news-accent); background: var(--news-bg); }
#db-news-retry { justify-self: start; margin-top: 4px; }

/* Borang papan pemuka */
.db-card { margin-top: 18px; }
.db-card h2 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 4px; }
.db-card .db-subhead { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.portal-card form.db-card, form.db-card { display: block; }
.db-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 16px; align-items: start; }
.db-fields > label { align-content: start; }
.db-fields .span-2 { grid-column: 1 / -1; }
.db-fields small { font-size: 12px; font-weight: 400; color: var(--muted); }
.db-birth-date { min-width: 0; margin: 0; padding: 0; border: 0; }
.db-birth-date legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.db-birth-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.25fr); gap: 8px; }
.portal-card .db-birth-date-fields input { min-width: 0; padding-inline: 10px; }
.db-note { color: var(--muted); font-size: 15px; margin-top: 8px; }
.db-note strong { color: var(--ink); font-weight: 600; }
.db-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.portal-card .db-actions .button { width: auto; min-width: 160px; }
.button.danger { background: var(--bad); color: #fff; }
.button.danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); box-shadow: 0 8px 24px color-mix(in srgb, var(--bad) 35%, transparent); }
.db-danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.db-danger h2 { color: var(--bad); }

.input-prefix, .input-reveal { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); font-weight: 500; pointer-events: none; }
.portal-card .input-prefix input { padding-left: 32px; }
.portal-card .input-reveal input { padding-right: 48px; }
.input-reveal .reveal { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.input-reveal .reveal:hover { background: var(--line); color: var(--ink); }
.input-reveal .reveal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.input-reveal .reveal.on { color: var(--accent); }

.strength { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.strength-bar { display: grid; grid-template-columns: repeat(4, 34px); gap: 4px; }
.strength-bar i { height: 5px; border-radius: 3px; background: var(--line-strong); transition: background-color .35s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--bad); }
.strength[data-score="2"] i:nth-child(-n+2) { background: #f2a20f; }
.strength[data-score="3"] i:nth-child(-n+3) { background: #2fb36d; }
.strength[data-score="4"] i { background: var(--ok); }

.file-drop { position: relative; }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.file-drop-ui { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-weight: 500; transition: border-color .25s, background-color .25s, color .25s; }
.file-drop-ui svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.file-drop:hover .file-drop-ui, .file-drop:focus-within .file-drop-ui { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.file-drop.has-file .file-drop-ui { border-style: solid; border-color: var(--ok); color: var(--ok); }

.session-list, .report-list { list-style: none; padding: 0; margin: 14px 0 0; }
.session-list li, .report-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.session-list li:last-child, .report-list li:last-child { border-bottom: 0; }
.session-list div, .report-list div { display: grid; min-width: 0; flex: 1; }
.session-list small, .report-list small { color: var(--muted); font-size: 13px; }
#db-sessions .session-revoke { width: auto; flex: none; min-height: 44px; padding: 6px 14px; font-size: 14px; }
.billing-list li { align-items: start; flex-wrap: wrap; }
.billing-list li > div { min-width: min(100%, 155px); overflow-wrap: anywhere; }
.billing-list .pill { white-space: normal; text-align: center; }
.billing-list .billing-amount { flex: none; min-width: 0; font-variant-numeric: tabular-nums; }
.billing-recurring { display: grid; gap: 8px; }
.session-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--bg-alt); font-size: 20px; }
.pill { flex: none; padding: 4px 11px; border-radius: 980px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-green { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.pill-blue { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.pill-gray { color: var(--muted); background: var(--bg-alt); }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 28px; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 16px;
  background: color-mix(in srgb, #1d1d1f 88%, transparent); color: #fff; font-size: 15px; font-weight: 500; text-align: center;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
  opacity: 0; translate: -50% 20px; pointer-events: none; transition: opacity .3s ease, translate .45s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 1060px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .db { grid-template-columns: minmax(0, 1fr); width: calc(100% - 32px); }
  .db-side { position: static; }
  /* Tab menjadi baris mendatar yang boleh diskrol. */
  .db-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
  .db-tabs::-webkit-scrollbar { display: none; }
  .db-tabs button { width: auto; min-height: 40px; padding: 0 14px; border-radius: 980px; border: 1px solid var(--line); font-size: 14px; }
  .db-tabs button[aria-selected="true"] { border-color: transparent; background: var(--accent); color: var(--on-accent); }
  .db-signout { width: auto; justify-self: end; min-height: 36px; padding: 0 10px; border-top: 0; font-size: 14px; }
}
@media (max-width: 600px) {
  .news-featured { grid-template-columns: minmax(0, 1fr); }
  .news-art { min-height: 150px; }
  .news-grid, .db-fields { grid-template-columns: minmax(0, 1fr); }
  .portal-card .db-actions .button { width: 100%; }
  #db-sessions > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; }
  #db-sessions > li > :is(.pill, .session-revoke) { grid-column: 2; justify-self: start; }
}

/* ───────── Footer ───────── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; transition: background-color .5s var(--ease); }
.footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer .wordmark { flex: none; color: var(--ink); font-size: 13px; white-space: nowrap; }
.footer-details { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 20px; text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 16px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; gap: 8px; padding-block: 18px; text-align: center; }
  .footer-details { flex-direction: column; gap: 0; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ───────── Animasi muncul semasa skrol (hanya jika JS hidup) ───────── */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .stage[data-zoom] { transform: scale(.9); opacity: .4; transition: transform 1.4s var(--ease), opacity 1.2s var(--ease); }
.js .stage[data-zoom].is-visible { transform: none; opacity: 1; }
/* Pelayar moden: stage membesar mengikut kedudukan skrol, seperti apple.com. */
@supports (animation-timeline: view()) {
  .js .stage[data-zoom] { transition: none; transform: none; opacity: 1; animation: stage-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  @keyframes stage-zoom { from { transform: scale(.86); opacity: .3; border-radius: 56px; } to { transform: scale(1); opacity: 1; border-radius: 32px; } }
}

/* ───────── Responsif ───────── */
@media (max-width: 820px) {
  .app-tiles, .features { grid-template-columns: minmax(0, 1fr); }
  .app-tile { display: grid; grid-template-columns: 56px 1fr; align-items: center; column-gap: 16px; row-gap: 2px; text-align: left; padding: 18px 20px; }
  .app-tile img, .soon-dots { width: 56px; height: 56px; margin: 0; border-radius: 14px; grid-row: span 2; }
  .soon-dots { gap: 4px; padding: 8px; }
  .soon-dots i { width: 7px; height: 7px; }
  .portal-grid { grid-template-columns: minmax(0, 1fr); }
  .stage { aspect-ratio: 4 / 3.4; border-radius: 26px; }
  .chip { font-size: 13px; padding: 8px 12px; }
}
@media (max-width: 600px) {
  .nav nav > a { display: none; }
  .nav nav { gap: 10px; }
  .shell, .nav-inner { width: calc(100% - 32px); }
  .form-row { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; gap: 16px; }
  .chip-b { right: 5%; top: 8%; }
  .chip-a { left: 5%; bottom: 8%; }
}

/* ───────── Skrin pembuka (splash) ───────── */
.splash {
  position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; overflow: hidden;
  background: #000; color: #f5f5f7; cursor: pointer;
}
.splash.splash-light { background: #fbfbfd; color: #1d1d1f; }
.splash-on .splash, .splash.splash-exit { display: grid; }
.splash-on body { overflow: hidden; }
/*
 * Cahaya lembut warna logo di belakang; memancar ketika kepingan bercantum.
 * Tiada filter: blur() — Safari iPhone memotong hasil kabur pada sempadan elemen (nampak tepi lurus).
 * Kecerunan jejarian di bawah pudar sendiri hingga lutsinar, pada lapisan yang lebih besar daripada skrin.
 */
.splash-glow {
  position: absolute; inset: -25%; opacity: .35; pointer-events: none; transform: scale(.85);
  background:
    radial-gradient(48vmax 48vmax at 41% 45%, rgba(123, 63, 242, .42), rgba(123, 63, 242, .16) 38%, rgba(123, 63, 242, 0) 70%),
    radial-gradient(44vmax 44vmax at 60% 46%, rgba(254, 165, 82, .38), rgba(254, 165, 82, .14) 38%, rgba(254, 165, 82, 0) 70%),
    radial-gradient(46vmax 46vmax at 53% 58%, rgba(255, 70, 164, .38), rgba(255, 70, 164, .14) 38%, rgba(255, 70, 164, 0) 70%);
}
.splash-mark { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 3vmin, 28px); pointer-events: none; }
/* Logo bermula di luar kotaknya (kepingan terbang dari jauh), jadi jangan dipotong. */
.splash-logo { width: clamp(140px, 28vmin, 240px); height: auto; overflow: visible; }
.splash-piece { opacity: 0; }
.splash-word {
  font-weight: 700; font-size: clamp(24px, 4.6vmin, 40px); letter-spacing: .18em; padding-left: .18em;
  opacity: 0; /* dianimasi oleh splash.js */
}
.splash-skip {
  position: absolute; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 2;
  padding: 8px 16px; border-radius: 980px; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08); color: inherit; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: background-color .25s;
}
.splash-light .splash-skip { border-color: rgba(0, 0, 0, .14); background: rgba(0, 0, 0, .04); }
.splash-skip:hover { background: rgba(255, 255, 255, .16); }
.splash-light .splash-skip:hover { background: rgba(0, 0, 0, .08); }
/* Keluar: splash membesar dan pudar, laman web muncul di belakangnya. */
.splash.splash-exit { opacity: 0; transform: scale(1.14); pointer-events: none; transition: opacity .75s ease, transform .75s var(--ease); }
/* Kandungan hero menunggu splash selesai, kemudian muncul dengan animasi biasa. */
.js.splash-on [data-reveal].is-visible { opacity: 0; transform: translateY(36px); }

/* Telefon sangat kecil: logo sahaja di bar atas supaya tidak bertindih dengan butang Akaun. */
@media (max-width: 420px) {
  .nav .wordmark { font-size: 0; gap: 0; }
  .nav-inner { gap: 8px; }
}

/* ───────── Kurangkan gerakan ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .stage[data-zoom] { opacity: 1 !important; transform: none !important; }
  .map-route path { stroke-dashoffset: 0; }
  .graph-bars i { height: var(--h); }
}

/* Native confirmation for account actions, using the existing portal surfaces. */
.db-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; color: var(--ink); overflow: auto; }
.db-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.db-dialog #db-confirm-form { margin: 0; }
.db-dialog #db-code-fields[hidden], .db-dialog #db-new-code[hidden] { display: none; }
.db-report-reply { white-space: pre-wrap; overflow-wrap: anywhere; }
#db-loading { padding-block: 2rem; }

.button.google-signin { background: #fff; color: #1f1f1f; border: 1px solid #747775; gap: 10px; }
.button.google-signin:hover { background: #f2f2f2; color: #1f1f1f; }
.google-signin img { display: block; width: 18px; height: 18px; object-fit: contain; flex: none; }

.published-news { display: grid; gap: 12px; }
.published-news:not(:empty) { margin-bottom: 16px; }
.published-news .published-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.published-news h2 { overflow-wrap: anywhere; }
.published-news .news-card h2 { font-size: 21px; line-height: 1.2; }
.published-news .news-grid { margin-top: 0; }
.db-gift-accept { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 980px; padding: .65rem 1.15rem; min-height: 40px; margin-top: .75rem; font: inherit; font-weight: 600; cursor: pointer; }
.db-gift-accept:disabled { opacity: .65; }

/* ───────── Plans ───────── */
.tayyang-plans { grid-column: 1 / -1; scroll-margin-top: calc(var(--nav-h) + 24px); position: relative; overflow: hidden; isolation: isolate; }
.tayyang-plans::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, #7b3ff2 16%, transparent), color-mix(in srgb, #d6338c 8%, transparent) 55%, transparent);
  pointer-events: none;
}
@media (min-width: 860px) {
  #pelan.tayyang-plans { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
}
.plans-eyebrow {
  display: inline-block; margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.portal-card .plans-head h2 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 8px; }
.plans-perks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.plans-perks li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.plans-perk-icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.plans-perk-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.plans-catalog { min-width: 0; }
@media (max-width: 859px) { .plans-catalog { margin-top: 26px; } }

.tayyang-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.tayyang-plan-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow-wrap: anywhere;
  padding: 26px; border-radius: 24px; border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, #7b3ff2, #d6338c 50%, #f2700f) border-box;
  box-shadow: 0 18px 50px -24px color-mix(in srgb, #7b3ff2 55%, transparent);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tayyang-plan-card:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -22px color-mix(in srgb, #d6338c 55%, transparent); }
.tayyang-plan-card > :is(h3, p) { margin: 0; }
.tayyang-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tayyang-plan-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: url(../../logo.png) center / 30px no-repeat, color-mix(in srgb, var(--ink) 5%, var(--card));
  border: 1px solid var(--line);
}
.tayyang-plan-badge {
  padding: 5px 11px; border-radius: 980px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: var(--grad); white-space: nowrap;
}
.tayyang-plan-card h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
.tayyang-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tayyang-plan-price strong { font-size: clamp(34px, 4vw, 44px); line-height: 1.05; letter-spacing: -.03em; color: var(--ink); }
.tayyang-plan-price span { color: var(--muted); font-size: 15px; }
.tayyang-plan-price s { color: var(--muted); font-size: 15px; }
.tayyang-plan-card .published-copy { color: var(--muted); font-size: 15px; line-height: 1.55; }
.tayyang-plan-card .db-note { margin: 0; }
.tayyang-plan-card .button { margin-top: auto; width: 100%; }
.tayyang-plan-card > .button:first-of-type { margin-top: 6px; }
.tayyang-plan-notice {
  display: flex; align-items: center; gap: 8px; width: fit-content; margin: 14px 0 0; padding: 8px 14px; border-radius: 16px;
  font-size: 14px; background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.tayyang-plan-notice::before {
  content: "i"; display: grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%;
  font: italic 700 12px/1 Georgia, serif; color: var(--card); background: var(--muted);
}
.plans-subheading { margin: 24px 0 12px; }
.db-membership-name { display: block; font-size: 1.2rem; }
.db-membership-benefits { margin: 12px 0 0; padding-inline-start: 20px; }
#account-logout-form { margin: 0; }
