/* =============================================================================
   ZZ DIRIKU™ — SPRINT 2 (Lia B · navigasi & explore)
   Dimuat SELEPAS components.css / discover.css (sebelum print.css).
   Skop: S9 ARAH satu komponen · S4 Hasil Saya + Perjalanan ikut tier · S8 Kad
   Kerjaya tanpa X/N · S7 a11y & mobile · Simulator gaji bersumber + padanan minat.
   JANGAN pindah ke tokens.css/components.css (pemilik lain).
   ============================================================================= */

/* --- S9. ARAH COMPONENT ------------------------------------------------------
   Asas TIADA animasi (animasi = .arah--float). Saiz melalui --arah-size. Skop
   [data-arah-slot] supaya call-site legasi (.arah tanpa slot) tak terjejas. */
.arah[data-arah-slot] {
  display: inline-block; flex: none; vertical-align: middle; line-height: 0;
  width: var(--arah-size, 64px); height: var(--arah-size, 64px);
  animation: none;
}
.arah--xs { --arah-size: 24px; }
.arah--sm { --arah-size: 40px; }
.arah--md { --arah-size: 64px; }
.arah--lg { --arah-size: 96px; }
.arah--xl { --arah-size: 150px; }
.arah.arah--fill { --arah-size: 100%; }
.arah[data-arah-slot] .arah__body,
.arah[data-arah-slot] .arah__img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
/* on-dark: garis luar navy (diwarisi masuk ke <use>) */
.arah--on-dark { --arah-stroke: var(--navy-900, #0B1A38); --arah-stroke-w: 3; }
.arah[data-arah-slot].arah--float { animation: arahFloat 3s ease-in-out infinite; }
.arah[data-arah-slot].arah--win { animation: arahFloat 3s ease-in-out infinite, arahWin .5s ease-out; }
.arah[data-arah-slot].arah--win .arah__body { filter: drop-shadow(0 0 12px var(--gold-400)); }
@media (prefers-reduced-motion: reduce) {
  .arah[data-arah-slot], .arah[data-arah-slot].arah--float, .arah[data-arah-slot].arah--win { animation: none !important; }
}

/* Bubble: avatar + mesej (role="note") */
.arah-bubble { display: flex; align-items: flex-start; gap: .7rem; }
.arah-bubble__ava { margin-top: 1px; }
.arah-bubble__msg { margin: 0; font-size: .9rem; line-height: 1.5; color: inherit; flex: 1; min-width: 0; }
/* bubble dalam lapisan game: kekalkan rupa .g-arah (navy luar .g-root, putih dalam) */
.g-arah.arah-bubble { align-items: center; }
.g-arah .arah-bubble__msg { color: var(--cream-50); }
.g-root .g-arah .arah-bubble__msg { color: var(--navy-900); }

/* --- LANDING: slot ARAH ----------------------------------------------------- */
.lintro .arah[data-arah-slot] { margin-inline: auto; }
.lintro .arah[data-arah-slot] .arah__body { animation: lIntroPop .7s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)); }
#landing-root .arah-orb .arah[data-arah-slot] { width: min(150px, 52%); height: auto; aspect-ratio: 1; filter: drop-shadow(0 14px 26px rgba(21,119,176,.35)); }
#landing-root .arah-orb .arah[data-arah-slot] .arah__body { width: 100%; height: 100%; animation: none; filter: none; }
#landing-root .arah-orb .arah--float { animation: lFloat 4.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .lintro .arah[data-arah-slot] .arah__body { animation: none; } }

/* --- S7.5 CTA landing atas lipatan (≤480px, 375×812) ------------------------ */
@media (max-width: 480px) {
  #landing-root .lhero { padding: 20px; border-radius: 22px; }
  #landing-root .lhero__grid { gap: var(--space-4); }
  #landing-root .lhero__copy { order: 0; }
  #landing-root .lhero__art { order: 1; min-height: 0; padding-top: var(--space-2); }
  #landing-root .lhero__floats { display: none; }
  #landing-root .lhero__badge { margin-bottom: var(--space-3); padding: 6px 12px; }
  #landing-root .lhero__title { font-size: clamp(1.75rem, 7.4vw, 2.25rem); margin-bottom: var(--space-2); }
  #landing-root .lhero__sub { font-size: var(--fs-base); line-height: 1.5; margin-bottom: var(--space-3); }
  #landing-root .lchips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: var(--space-4); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #landing-root .lchips::-webkit-scrollbar { display: none; }
  #landing-root .lchip { flex: none; }
  #landing-root .lhero__cta .btn { min-height: 48px; }
  #landing-root .lhero__art .arah-orb { width: min(220px, 70%); }
}

/* --- S4 / S7.6 NAV --------------------------------------------------------- */
/* .nav__link set display:inline-flex → atribut hidden perlu dikuatkan. */
#main-nav .nav__link[hidden] { display: none !important; }
/* Pemilih bahasa di hujung #main-nav */
#main-nav .lang-switch { flex: none; align-self: center; min-height: 44px; padding: 2px 8px 2px 10px; }
#main-nav .lang-switch__select { min-height: 40px; max-width: none; }
@media (min-width: 821px) {
  #main-nav .lang-switch { margin-left: auto; }
}
@media (max-width: 820px) {
  .appbar.is-nav-open #main-nav .lang-switch { align-self: flex-start; margin: var(--space-2) 0 var(--space-1); }
}
/* Hamburger ≥44×44 (S7) */
.nav-toggle { width: 44px; height: 44px; padding: 11px; }

/* --- S7.2 fokus route: tiada cincin untuk fokus programatik (tetikus/sentuh) --- */
h1[tabindex="-1"]:focus:not(:focus-visible),
[data-route-focus][tabindex="-1"]:focus:not(:focus-visible),
#view:focus:not(:focus-visible),
.g-reveal__nm:focus:not(:focus-visible) { outline: none; }

/* --- S7.3 / 7.4 lantai teks -------------------------------------------------- */
.q-opt span { font-size: .75rem; line-height: 1.2; }
.q-anchor { font-size: .75rem; }
/* Badan teks ibu bapa: ≥14px tanpa mengecilkan teks yang dah lebih besar. */
.jr-parent p, .jr-parent li, .dc-family p, .dc-family li, .mode-reflect p, .mode-reflect li {
  font-size: max(.875rem, 1em); line-height: 1.6;
}

/* --- S7 sasaran sentuh ≥44px (fail Lia B) ---------------------------------- */
.g-back { display: inline-flex; align-items: center; min-height: 44px; }
button.g-back { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .85rem; color: var(--g-muted, var(--text-muted)); }
.sim-slot__clear, .sim-world-clear, .g-simchip, .sim-save { min-height: 44px; }

/* --- S4 HASIL SAYA (empty state) ------------------------------------------- */
.hasil-empty { max-width: 34rem; margin-inline: auto; }
.hasil-empty__h { font-size: var(--fs-2xl); }
.hasil-empty .arah-bubble { background: var(--cream-100); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 12px 14px; color: var(--navy-900); }
.hasil-empty__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- S4.4 PERJALANAN ikut tier --------------------------------------------- */
.journey__title { font-size: var(--fs-base); font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--cream-50); margin: 0; }
.journey__next { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--grey-300); }
.journey__next b { color: var(--gold-400); font-weight: 700; }
.journey__tier { margin: 12px 0 0; font-size: var(--fs-sm); color: var(--grey-300); }
.journey__tier b { color: var(--cream-50); }
.journey__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.journey__pick-lbl { font-size: var(--fs-sm); color: var(--grey-300); margin-right: 2px; }
.journey__pickbtn {
  min-height: 44px; padding: 6px 12px; border-radius: var(--radius-pill); cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.22); color: var(--cream-100);
  font-size: var(--fs-sm); font-weight: 600;
}
.journey__pickbtn[aria-pressed="true"] { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }
.journey__pickbtn:focus-visible { outline: 3px solid var(--ring-on-dark); outline-offset: 2px; }
.journey__guide.arah-bubble .arah-bubble__msg { font-size: var(--fs-sm); line-height: 1.5; color: var(--cream-100); }
.journey__walker-emb .arah[data-arah-slot] { width: 100%; height: 100%; }
.jn__lbl { font-size: .75rem; }
.jn__here { font-size: .6875rem; }

/* --- S8 KAD KERJAYA ------------------------------------------------------- */
.g-kad-count { margin: .2rem 0 .6rem; font-size: .875rem; color: var(--g-muted, var(--text-muted)); line-height: 1.5; }
.g-kad { position: relative; }
.g-kad__nm { font-size: .8rem; }
.g-kad__hint, .g-kad__arch { font-size: .75rem; }
.g-kad__stamp {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  border: 2px solid var(--teal-600); color: var(--teal-600); background: rgba(255,255,255,.9);
  border-radius: 4px; padding: 0 5px; line-height: 1.5;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  transform: rotate(-6deg); pointer-events: none;
}
.g-kad.is-got .g-kad__emoji { opacity: .9; }

/* --- SIMULATOR: padanan minat + gaji bersumber ------------------------------ */
.sim-card__arch { white-space: normal; }
.sim-world__sub { font-size: .75rem; }
.sim-money { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sim-money__to { font-size: var(--fs-sm); font-weight: 700; opacity: .92; }
.sim-money__est { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 700; opacity: .85; }
.sim-money--na { font-size: var(--fs-sm); font-weight: 600; color: var(--grey-300); line-height: 1.4; }
.sim-grow__per { font-size: var(--fs-xs); color: var(--grey-300); font-weight: 600; }
.sim-grow__gap { font-size: var(--fs-xs); color: var(--grey-300); min-height: 1.2em; }
.sim-grow--na { display: grid; place-items: center; min-height: 72px; text-align: center; }
.sim-grow__na { font-size: var(--fs-sm); color: var(--grey-300); line-height: 1.4; }
.sim-src { display: grid; gap: 4px; align-content: start; font-size: var(--fs-xs); line-height: 1.45; color: var(--grey-300); }
.sim-src__sector { font-weight: 700; color: var(--grey-200); }
.sim-src__line { color: var(--grey-200); }
.sim-cmp-row--src .sim-cmp-grid { align-items: start; }
.sim-basis { font-size: var(--fs-xs); text-align: center; margin: 0; }
/* .sim-ladder = column-reverse → nota mesti di BAWAH tangga (order rendah = bawah). */
.sim-ladder__na { order: -1; margin: 0; font-size: var(--fs-sm); color: var(--grey-300); text-align: center; }
.sim-ladder__basis { order: -2; margin: 0; font-size: var(--fs-xs); color: var(--grey-300); text-align: center; }
.sim-outro .arah[data-arah-slot] { margin-inline: auto; }

/* --- GAJI ANGGARAN (katalog 264 tangga, 0 sumber · keputusan Bos gel. 3) -------
   Kontras: #8A6410 atas #FFF4D6 ≈ 4.9:1 (AA teks kecil). Nota #5C6675 atas putih ≈ 5.9:1. */
.est-badge {
  display: inline-flex; align-items: center; vertical-align: middle; width: max-content; max-width: 100%;
  font-size: .75rem; font-weight: 700; line-height: 1.3; letter-spacing: .01em;
  color: var(--gold-ink, #8A6410); background: #FFF4D6; border: 1px solid #E9CF8A;
  border-radius: var(--radius-pill); padding: 1px 8px; white-space: normal;
}
.est-note { margin: .4rem 0 .9rem; font-size: .8125rem; line-height: 1.5; color: var(--text-muted); }
.est-note .est-badge { margin-right: 4px; }
.est-note--plain { margin: .35rem 0 0; font-size: .75rem; }
.krj-card .est-badge { margin-top: 4px; }
.krj-card__est { font-weight: 600; font-size: .75rem; }
.g-kv .est-badge { margin-left: 4px; }
