/* ==========================================================================
   ZareEcoSmp — style.css
   Urutan: tokens -> reset -> tipografi -> komponen dasar -> utilitas
   ========================================================================== */

/* ---------- 0. FONT (self-host, tanpa request ke Google) ---------- */
@font-face {
  font-family: "InterVar";
  src: url("../assets/fonts/inter-400-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "SilkscreenWeb";
  src: url("../assets/fonts/silkscreen-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SilkscreenWeb";
  src: url("../assets/fonts/silkscreen-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Fallback dengan metrik disesuaikan: kalau font belum siap, ruang yang dipakai sama
   sehingga tidak ada teks yang melompat (CLS). */
@font-face {
  font-family: "SilkscreenFallback";
  src: local("Courier New"), local("Liberation Mono"), local("DejaVu Sans Mono");
  size-adjust: 112%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Warna tema eco/natural */
  --soil-900: #1f150e;   /* cokelat tergelap, latar body */
  --soil-800: #2c1e14;   /* panel gelap */
  --soil-700: #3d2a1c;   /* kayu */
  --moss-900: #16301c;   /* hijau hutan gelap */
  --moss-700: #2f5a32;   /* hijau daun */
  --moss-500: #4d8a45;   /* hijau utama */
  --moss-450: #5c9c52;   /* hijau untuk isian aktif + teks gelap (kontras >= 4.5) */
  --leaf-400: #7bbf5c;   /* hijau terang (aksen sekunder) */
  --cream-100: #f5eedd;  /* krem utama, teks di latar gelap */
  --cream-200: #e7dcc4;  /* krem sekunder */
  --bark-300: #b99b76;   /* teks lembut */
  --amber-400: #e5a33c;  /* satu warna aksen */

  /* Warna semantik */
  --ok: #7bbf5c;
  --warn: #e5a33c;
  --err: #e06c5b;

  /* Glass */
  --glass-bg: rgba(31, 21, 14, 0.62);
  --glass-bg-strong: rgba(31, 21, 14, 0.86);
  --glass-border: rgba(245, 238, 221, 0.14);
  --glass-highlight: rgba(245, 238, 221, 0.06);

  /* Spasi (skala 4px) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Blur */
  --blur-nav: 14px;
  --blur-card: 10px;

  /* Bayangan */
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.36);
  --shadow-glow: 0 0 0 1px rgba(229, 163, 60, 0.35), 0 10px 28px rgba(229, 163, 60, 0.12);

  /* Ukuran & ritme */
  --nav-h: 60px;
  --topbar-h: 64px;         /* bar salin IP di HP */
  --container: 1120px;
  --focus: 3px;

  /* Tipografi */
  --font-display: "SilkscreenWeb", "SilkscreenFallback", "Courier New", monospace;
  --font-body: "InterVar", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Transisi */
  --t-fast: 140ms ease;
  --t-med: 240ms ease;
}

/* ---------- 2. RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 'clip' (bukan 'hidden') supaya position: sticky tetap jalan */
  overflow-x: clip;
  /* offset smooth-scroll diatur di JS lewat scroll-margin-top section */
}

body {
  min-height: 100dvh;
  background-color: var(--soil-900);
  color: var(--cream-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--leaf-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: var(--focus) solid var(--amber-400);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- 3. TIPOGRAFI ---------- */
h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.6rem, 6vw, 2.9rem);
}

h2 {
  font-size: clamp(1.25rem, 4.2vw, 1.9rem);
}

h3 {
  font-size: clamp(1rem, 3vw, 1.15rem);
}

p {
  text-wrap: pretty;
}

.lead {
  font-size: clamp(1rem, 3.4vw, 1.125rem);
  color: var(--cream-200);
}

.muted {
  color: var(--bark-300);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-400);
}

/* ---------- 4. LAYOUT DASAR ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

section {
  scroll-margin-top: calc(var(--nav-h) + var(--s-3));
  padding-block: var(--s-7);
}

.stack > * + * {
  margin-top: var(--s-4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cream-100);
  color: var(--soil-900);
  padding: var(--s-3) var(--s-4);
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- 5. KOMPONEN: KARTU GLASS ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-highlight);
}

/* ---------- 6. KOMPONEN: TOMBOL ---------- */
.btn {
  --btn-bg: var(--moss-500);
  --btn-fg: #10240f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  --btn-bg: var(--leaf-400);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--ghost {
  --btn-bg: rgba(245, 238, 221, 0.08);
  --btn-fg: var(--cream-100);
  border-color: var(--glass-border);
}

.btn--ghost:hover {
  --btn-bg: rgba(245, 238, 221, 0.16);
}

.btn--accent {
  --btn-bg: var(--amber-400);
  --btn-fg: #2b1a05;
}

.btn--accent:hover {
  --btn-bg: #f0b657;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ---------- 7. KOMPONEN: STATE (loading / kosong / gagal) ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(245, 238, 221, 0.08);
  border-radius: var(--r-sm);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(245, 238, 221, 0.14), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.state {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  padding: var(--s-5);
  border-radius: var(--r-md);
  border: 1px dashed var(--glass-border);
  background: rgba(245, 238, 221, 0.04);
  color: var(--cream-200);
}

.state--error {
  border-color: rgba(224, 108, 91, 0.5);
}

.state__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--cream-100);
}

.state__hint {
  font-size: 0.9rem;
  color: var(--bark-300);
}

/* ---------- 8. UTILITAS ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.todo {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(229, 163, 60, 0.18);
  color: var(--amber-400);
  border: 1px solid rgba(229, 163, 60, 0.4);
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  :root {
    --nav-h: 68px;
  }

  section {
    padding-block: var(--s-8);
  }

  .container {
    padding-inline: var(--s-5);
  }
}

/* ---------- 9. NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-nav)) saturate(130%);
  backdrop-filter: blur(var(--blur-nav)) saturate(130%);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  text-decoration: none;
  color: var(--cream-100);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--moss-700), var(--moss-900));
  border: 1px solid rgba(123, 191, 92, 0.35);
  color: var(--leaf-400);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(245, 238, 221, 0.06);
  color: var(--cream-100);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 20px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-med), opacity var(--t-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Menu HP: panel slide dari kanan */
.nav {
  position: fixed;
  inset: var(--nav-h) 0 0 auto;
  width: min(86vw, 340px);
  padding: var(--s-5) var(--s-4) var(--s-6);
  background: var(--glass-bg-strong);
  border-left: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-nav));
  backdrop-filter: blur(var(--blur-nav));
  transform: translateX(102%);
  visibility: hidden;
  /* visibility instan saat dibuka, ditunda saat ditutup, supaya animasi slide tetap terlihat */
  transition: transform var(--t-med), visibility 0s linear var(--t-med);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform var(--t-med), visibility 0s;
}

.nav__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-1);
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 var(--s-3);
  border-radius: var(--r-sm);
  color: var(--cream-200);
  text-decoration: none;
  font-size: 1rem;
  border-left: 2px solid transparent;
}

.nav__link:hover {
  background: rgba(245, 238, 221, 0.07);
  color: var(--cream-100);
}

.nav__link[aria-current="true"] {
  color: var(--cream-100);
  background: rgba(123, 191, 92, 0.12);
  border-left-color: var(--leaf-400);
}

.nav-backdrop {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(15, 10, 6, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med), visibility 0s linear var(--t-med);
  z-index: 80;
}

.nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t-med), visibility 0s;
}

body.nav-open {
  overflow: hidden;
}

/* Desktop: menu inline */
@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    padding: 0;
    background: none;
    border: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: none;
    visibility: visible;
    overflow: visible;
  }

  .nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .nav__link {
    min-height: 44px;
    padding: 0 var(--s-2);
    font-size: 0.86rem;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
  }

  .nav__link[aria-current="true"] {
    background: none;
    border-bottom-color: var(--amber-400);
    color: var(--cream-100);
  }
}

/* ---------- 10. FOOTER ---------- */
.footer {
  margin-top: var(--s-8);
  padding-top: var(--s-7);
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(44, 30, 20, 0.6), rgba(31, 21, 14, 0.95));
}

.footer__grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}

.footer__name {
  font-size: 0.95rem;
  color: var(--cream-100);
  margin-bottom: var(--s-2);
}

.footer__head {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: var(--s-3);
}

.footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.footer a {
  color: var(--cream-200);
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer a:hover {
  color: var(--leaf-400);
  text-decoration: underline;
}

.footer__bottom {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-6);
  padding-block: var(--s-4);
  border-top: 1px solid var(--glass-border);
  font-size: 0.78rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: var(--s-4);
  }
}

/* ---------- 11. TOMBOL MELAYANG ---------- */
.fabbar {
  position: fixed;
  right: var(--s-4);
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: grid;
  gap: var(--s-3);
  justify-items: end;
}

.fab {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  color: var(--cream-100);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
  box-shadow: var(--shadow-2);
  transition: transform var(--t-fast), background-color var(--t-fast);
}

.fab:hover {
  transform: translateY(-2px);
}

.fab:active {
  transform: scale(0.96);
}

.fab--wa {
  background: #1f8a4c;
  color: #f2fff6;
  border-color: rgba(255, 255, 255, 0.18);
}

.fab--wa:hover {
  background: #23a259;
}

@media (min-width: 768px) {
  .fabbar {
    right: var(--s-6);
    bottom: var(--s-6);
  }
}

/* ---------- 12. HERO ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--s-7) var(--s-8);
  min-height: min(88svh, 760px);
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 72% 8%, rgba(123, 191, 92, 0.16), transparent 60%),
    radial-gradient(90% 70% at 12% 22%, rgba(229, 163, 60, 0.1), transparent 62%),
    linear-gradient(178deg, #16241a 0%, #1d2a1a 42%, #241a12 100%);
}

.hero__glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  right: -12vmax;
  top: -16vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 191, 92, 0.22), transparent 66%);
  filter: blur(6px);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(120px, 26vh, 240px);
  will-change: transform;
}

.hero__hills--back {
  bottom: 44px;
  opacity: 0.8;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__copy {
  max-width: 640px;
}

.hero h1 {
  margin-block: var(--s-3) var(--s-3);
  color: var(--cream-100);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.hero__tagline {
  max-width: 46ch;
}

/* Kartu IP */
.ipcard {
  margin-top: var(--s-5);
  padding: var(--s-3);
  display: grid;
  gap: var(--s-3);
  background: rgba(20, 30, 20, 0.55);
  border-color: rgba(245, 238, 221, 0.16);
}

.ipcard__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  width: fit-content;
}

.iptab {
  min-height: 44px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bark-300);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.iptab:hover {
  color: var(--cream-100);
}

.iptab.is-active {
  background: var(--moss-450);
  color: #10240f;
}

.ipcard__panel {
  display: grid;
  gap: var(--s-2);
  padding: 0 var(--s-2) var(--s-2);
}

.ipcard__label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-400);
}

.ipcard__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}

.ipcard__value {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  font-weight: 600;
  color: var(--cream-100);
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(245, 238, 221, 0.22);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  overflow-wrap: anywhere;
}

.ipcard__copy {
  flex: 0 0 auto;
}

.ipcard__copy.is-copied {
  --btn-bg: var(--leaf-400);
  --btn-fg: #0f2410;
}

.ipcard__hint {
  font-size: 0.82rem;
  color: var(--bark-300);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
  font-size: 0.86rem;
  color: var(--cream-200);
}

.statusdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bark-300);
  box-shadow: 0 0 0 3px rgba(185, 155, 118, 0.18);
  flex: 0 0 auto;
}

.statusdot.is-online {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(123, 191, 92, 0.22);
}

.statusdot.is-offline {
  background: var(--err);
  box-shadow: 0 0 0 3px rgba(224, 108, 91, 0.2);
}

.statusdot.is-loading {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------- 13. BAR SALIN IP (HP) ---------- */
.minibar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg-strong);
  border-top: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-nav));
  backdrop-filter: blur(var(--blur-nav));
}

.minibar__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.minibar__label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-400);
}

.minibar__ip {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  color: var(--cream-100);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minibar .btn {
  min-height: 44px;
  padding-inline: var(--s-4);
  font-size: 0.85rem;
}

/* ---------- 14. TOAST ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--cream-100);
  color: var(--soil-900);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med), transform var(--t-med), visibility 0s linear var(--t-med);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity var(--t-med), transform var(--t-med), visibility 0s;
}

/* Di HP: bar bawah harus tampil, FAB naik supaya tidak ketutup */
@media (max-width: 959px) {
  .minibar {
    display: flex;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .fabbar {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  .hero {
    padding-block: var(--s-8);
  }

  .ipcard {
    padding: var(--s-4);
  }

  .ipcard__panel {
    padding: 0 var(--s-3) var(--s-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__hills {
    will-change: auto;
  }

  .statusdot.is-loading {
    animation: none;
  }
}

/* ---------- 15. SECTION UMUM ---------- */
.section {
  padding-block: var(--s-7);
}

.section__head {
  max-width: 56ch;
  margin-bottom: var(--s-5);
}

.section__head h2 {
  margin-block: var(--s-2) var(--s-3);
}

.section__note {
  margin-top: var(--s-4);
  font-size: 0.88rem;
  color: var(--bark-300);
}

.section__note a {
  color: var(--leaf-400);
}

.btn--sm {
  min-height: 38px;
  padding-inline: var(--s-3);
  font-size: 0.82rem;
}

.dot-sep {
  padding-inline: var(--s-1);
  opacity: 0.5;
}

/* ---------- 16. KARTU STATUS ---------- */
.statuscard {
  padding: var(--s-4);
  display: grid;
  gap: var(--s-4);
}

.statuscard[aria-busy="true"] .stats dd {
  opacity: 0.55;
}

.statuscard__head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.statuscard__head .statusdot {
  margin-top: 7px;
}

.statuscard__state {
  flex: 1 1 12rem;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.statuscard__state strong {
  font-size: 1.05rem;
  color: var(--cream-100);
}

.statuscard__state span {
  font-size: 0.86rem;
  color: var(--bark-300);
  overflow-wrap: anywhere;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--s-3);
  margin: 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--glass-border);
}

.stat dt {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: 4px;
}

.stat dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream-100);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat dd small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bark-300);
}

.stat dd.stat__mono {
  font-size: 0.95rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.players {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  min-height: 44px;
  align-items: center;
}

.players__note {
  font-size: 0.86rem;
  color: var(--bark-300);
}

.playerchip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 4px var(--s-3) 4px 4px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  color: var(--cream-200);
  text-decoration: none;
}

.playerchip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  image-rendering: pixelated;
  background: rgba(245, 238, 221, 0.08);
}

.playerchip--more {
  padding: 4px var(--s-3);
  font-style: italic;
  color: var(--bark-300);
}

.statuscard__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  font-size: 0.78rem;
  color: var(--bark-300);
  border-top: 1px solid var(--glass-border);
  padding-top: var(--s-3);
}

.statuscard.is-error {
  border-color: rgba(224, 108, 91, 0.4);
}

.statuscard__error {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
}

.statuscard__error p {
  font-size: 0.9rem;
  color: var(--cream-200);
}

/* ---------- 17. FITUR (BENTO) ---------- */
.bento {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.feat {
  padding: var(--s-4);
  display: grid;
  gap: var(--s-2);
  align-content: start;
}

.feat h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cream-100);
  letter-spacing: -0.01em;
}

.feat p {
  font-size: 0.92rem;
  color: var(--bark-300);
}

.feat p strong {
  color: var(--cream-200);
  font-weight: 600;
}

.feat__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: rgba(123, 191, 92, 0.12);
  border: 1px solid rgba(123, 191, 92, 0.25);
  color: var(--leaf-400);
  margin-bottom: var(--s-1);
}

.feat__icon svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .feat--wide {
    grid-column: span 2;
  }

  .feat--wide h3 {
    font-size: 1.3rem;
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .feat--wide {
    grid-column: span 2;
    grid-row: span 2;
    align-content: center;
    padding: var(--s-5);
  }

  .feat--wide p {
    font-size: 1rem;
    max-width: 44ch;
  }

  .section {
    padding-block: var(--s-8);
  }
}

/* ---------- 18. LEADERBOARD ---------- */
.lb {
  padding: var(--s-4);
  display: grid;
  gap: var(--s-4);
}

.lb__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.lb__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.lbtab {
  min-height: 44px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bark-300);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.lbtab:hover {
  color: var(--cream-100);
}

.lbtab.is-active {
  background: var(--moss-450);
  color: #10240f;
}

.lb__updated {
  font-size: 0.78rem;
  color: var(--bark-300);
}

.lb__panel {
  display: grid;
  gap: var(--s-4);
}

.lb__note {
  font-size: 0.76rem;
  color: var(--amber-400);
  border-top: 1px dashed var(--glass-border);
  padding-top: var(--s-3);
}

/* Podium */
.podium {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.podium__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
}

.podium__item:nth-child(1) {
  border-color: rgba(229, 163, 60, 0.55);
  background: linear-gradient(100deg, rgba(229, 163, 60, 0.16), rgba(0, 0, 0, 0.22) 62%);
}

.podium__medal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.68rem;
  background: rgba(245, 238, 221, 0.1);
  color: var(--cream-100);
  border: 1px solid var(--glass-border);
}

.podium__item:nth-child(1) .podium__medal {
  background: var(--amber-400);
  color: #2a1c05;
  border-color: transparent;
}

.podium__id {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}

.podium__avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: rgba(245, 238, 221, 0.06);
  flex: 0 0 auto;
}

.podium__name {
  font-weight: 700;
  color: var(--cream-100);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium__sub {
  display: block;
  font-size: 0.72rem;
  color: var(--bark-300);
  font-weight: 500;
}

.podium__value {
  font-weight: 700;
  color: var(--leaf-400);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Baris 4-10 */
.lbrows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--glass-border);
  padding-top: var(--s-3);
}

.lbrow {
  display: grid;
  grid-template-columns: 2rem 28px 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--r-sm);
  min-height: 44px;
  font-size: 0.9rem;
}

.lbrow:nth-child(odd) {
  background: rgba(245, 238, 221, 0.03);
}

.lbrow__rank {
  font-variant-numeric: tabular-nums;
  color: var(--bark-300);
  font-weight: 600;
  text-align: right;
}

.lbrow__avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: rgba(245, 238, 221, 0.06);
}

.lbrow__name {
  color: var(--cream-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lbrow__value {
  color: var(--cream-100);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lb-empty,
.lb-error {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  padding: var(--s-5) var(--s-3);
  text-align: left;
}

.lb-empty p,
.lb-error p {
  font-size: 0.9rem;
  color: var(--bark-300);
}

@media (min-width: 768px) {
  .lb {
    padding: var(--s-5);
  }

  .podium {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .podium__item {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: var(--s-2);
    padding: var(--s-4);
  }

  .podium__item:nth-child(1) {
    order: -1;
    justify-self: stretch;
  }

  .podium__id {
    width: 100%;
  }

  .podium__value {
    text-align: left;
    font-size: 1.05rem;
  }
}

/* ---------- 19. TOKO RANK ---------- */
.rank__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: var(--s-4);
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
}

.ranktab {
  min-height: 44px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bark-300);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.ranktab:hover {
  color: var(--cream-100);
}

.ranktab.is-active {
  background: var(--moss-450);
  color: #10240f;
}

.rankgrid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.rankcard {
  position: relative;
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(31, 21, 14, 0.62);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
  transition: transform var(--t-med), border-color var(--t-med);
}

.rankcard:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 191, 92, 0.4);
}

.rankcard.is-popular {
  border-color: rgba(229, 163, 60, 0.6);
}

.rankcard__badge {
  position: absolute;
  top: -10px;
  right: var(--s-4);
  padding: 3px var(--s-3);
  border-radius: var(--r-pill);
  background: var(--amber-400);
  color: #2a1c05;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rankcard__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--cream-100);
  letter-spacing: 0.02em;
}

.rankcard__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--leaf-400);
  font-variant-numeric: tabular-nums;
}

.rankcard__price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bark-300);
  margin-left: 4px;
}

.rankcard__benefits {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--bark-300);
  min-height: 3.2em;
}

.rankcard__benefits li {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
}

.rankcard__benefits svg {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  flex: 0 0 auto;
  color: var(--leaf-400);
}

.rankcard__benefits li.is-todo {
  color: var(--amber-400);
  font-style: italic;
}

.rankcard__benefits li.is-todo svg {
  color: var(--amber-400);
}

.rankcard .btn {
  justify-self: start;
}

/* Tabel perbandingan */
.rank-cmp {
  margin-top: var(--s-6);
}

.rank-cmp__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream-100);
  margin-bottom: var(--s-3);
}

.rank-cmp__scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.22);
  -webkit-overflow-scrolling: touch;
}

.rank-cmp__scroll:focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: 2px;
}

.cmp-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 0.84rem;
}

.cmp-table th,
.cmp-table td {
  padding: var(--s-3);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.cmp-table thead th {
  position: sticky;
  top: 0;
  background: #23331f;
  color: var(--cream-100);
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cmp-table tbody th {
  color: var(--cream-200);
  font-weight: 600;
  position: sticky;
  left: 0;
  background: #1c2718;
  z-index: 1;
}

.cmp-table td {
  text-align: center;
  color: var(--bark-300);
}

.cmp-table .is-todo {
  color: var(--amber-400);
  font-style: italic;
}

.cmp-note {
  padding: var(--s-3);
  font-size: 0.8rem;
  color: var(--bark-300);
  white-space: normal;
}

/* Panel pesanan */
/* Aturan author bisa menimpa display:none bawaan [hidden] — jaga tetap tersembunyi */
[hidden] {
  display: none !important;
}

.order {
  margin-top: var(--s-5);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-4);
  scroll-margin-top: calc(var(--nav-h) + var(--s-3));
}

.order__head {
  display: grid;
  gap: var(--s-3);
}

.order__head h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--cream-100);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px var(--s-3);
  border-radius: var(--r-pill);
  font-size: 0.76rem;
  color: var(--bark-300);
  border: 1px solid var(--glass-border);
}

.step span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 238, 221, 0.1);
  font-size: 0.66rem;
  font-weight: 700;
}

.step.is-active {
  color: var(--cream-100);
  border-color: var(--moss-500);
}

.step.is-active span {
  background: var(--moss-450);
  color: #10240f;
}

.step.is-done {
  color: var(--leaf-400);
}

.order__body {
  display: grid;
  gap: var(--s-3);
}

.order__rank {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
}

.order__rank strong {
  color: var(--cream-100);
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.order__rank span {
  color: var(--leaf-400);
  font-weight: 700;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cream-200);
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--s-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream-100);
  font-size: 1rem;
}

.field input::placeholder {
  color: rgba(185, 155, 118, 0.7);
}

.field input:focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: 1px;
  border-color: transparent;
}

.field input[aria-invalid="true"] {
  border-color: var(--err);
}

.field__hint {
  font-size: 0.76rem;
  color: var(--bark-300);
}

.field__error {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--err);
  min-height: 1.1em;
}

.order__summary {
  display: grid;
  gap: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.order__summary div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--glass-border);
}

.order__summary div:last-child {
  border-bottom: 0;
}

.order__summary dt,
.order__summary span:first-child {
  color: var(--bark-300);
}

.order__summary strong {
  color: var(--cream-100);
  text-align: right;
  overflow-wrap: anywhere;
}

.order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.order__actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

.order__note {
  font-size: 0.78rem;
  color: var(--bark-300);
}

@media (min-width: 640px) {
  .rankgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .rankgrid {
    grid-template-columns: repeat(4, 1fr);
  }

  .order {
    padding: var(--s-5);
  }

  .order__actions .btn {
    flex: 0 0 auto;
  }
}

/* ---------- 20. CARA GABUNG ---------- */
.join {
  display: grid;
  gap: var(--s-4);
}

.join__switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  justify-self: start;
}

.jointab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bark-300);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.jointab svg {
  width: 17px;
  height: 17px;
}

.jointab:hover {
  color: var(--cream-100);
}

.jointab.is-active {
  background: var(--moss-450);
  color: #10240f;
}

.join__panel {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(31, 21, 14, 0.6);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
}

.join__addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.32);
  border: 1px inset rgba(245, 238, 221, 0.08);
}

.join__addr-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bark-300);
  margin-bottom: 3px;
}

.join__addr-value {
  font-family: var(--font-mono, monospace);
  font-size: 1rem;
  color: var(--leaf-400);
  overflow-wrap: anywhere;
}

.joinsteps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  counter-reset: joinstep;
}

.joinstep {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: start;
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--glass-border);
}

.joinstep:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.joinstep__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(123, 191, 92, 0.14);
  border: 1px solid rgba(123, 191, 92, 0.35);
  color: var(--leaf-400);
  font-family: var(--font-display);
  font-size: 0.62rem;
}

.joinstep__title {
  font-weight: 700;
  color: var(--cream-100);
  font-size: 0.94rem;
  margin-bottom: 3px;
}

.joinstep__text {
  font-size: 0.87rem;
  color: var(--bark-300);
  line-height: 1.55;
}

.joinstep__text code {
  font-family: var(--font-mono, monospace);
  font-size: 0.84em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 238, 221, 0.08);
  color: var(--cream-200);
  overflow-wrap: anywhere;
}

.join__notes {
  display: grid;
  gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--bark-300);
}

.join__notes code {
  font-family: var(--font-mono, monospace);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 238, 221, 0.08);
  color: var(--cream-200);
}

@media (min-width: 768px) {
  .join__panel {
    padding: var(--s-5);
  }

  .joinsteps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-4);
  }

  .joinstep {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* ---------- 21. ATURAN ---------- */
.rules {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.rulecard {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(31, 21, 14, 0.6);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
}

.rulecard--no {
  border-color: rgba(216, 100, 84, 0.32);
}

.rulecard--warn {
  border-color: rgba(229, 163, 60, 0.32);
}

.rulecard__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.rulecard__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: 0 0 auto;
  background: rgba(123, 191, 92, 0.14);
  color: var(--leaf-400);
}

.rulecard--no .rulecard__icon {
  background: rgba(216, 100, 84, 0.14);
  color: var(--err);
}

.rulecard--warn .rulecard__icon {
  background: rgba(229, 163, 60, 0.14);
  color: var(--amber-400);
}

.rulecard__icon svg {
  width: 17px;
  height: 17px;
}

.rulecard__title {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--cream-100);
}

.rulecard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
  font-size: 0.88rem;
  color: var(--bark-300);
  line-height: 1.55;
}

.rulecard__list li {
  position: relative;
  padding-left: 1.1em;
}

.rulecard__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.todo-flag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--amber-400);
  background: rgba(229, 163, 60, 0.12);
  border: 1px dashed rgba(229, 163, 60, 0.45);
  white-space: normal;
}

@media (min-width: 768px) {
  .rules {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

/* ---------- 22. FAQ ---------- */
.faq {
  display: grid;
  gap: var(--s-2);
  max-width: 68ch;
}

.faqitem {
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  background: rgba(31, 21, 14, 0.55);
  overflow: hidden;
}

.faqitem[open] {
  border-color: rgba(123, 191, 92, 0.38);
  background: rgba(31, 21, 14, 0.72);
}

.faqitem__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 52px;
  padding: var(--s-3) var(--s-4);
  cursor: pointer;
  list-style: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--cream-100);
  line-height: 1.4;
}

.faqitem__q::-webkit-details-marker {
  display: none;
}

.faqitem__q:hover {
  background: rgba(245, 238, 221, 0.04);
}

.faqitem__q:focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: -2px;
}

.faqitem__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  color: var(--leaf-400);
  transition: transform var(--t-med), background-color var(--t-med);
}

.faqitem__icon svg {
  width: 12px;
  height: 12px;
}

.faqitem[open] .faqitem__icon {
  transform: rotate(45deg);
  background: rgba(123, 191, 92, 0.16);
}

.faqitem__a {
  padding: 0 var(--s-4) var(--s-4);
  font-size: 0.89rem;
  line-height: 1.65;
  color: var(--bark-300);
  overflow-wrap: anywhere;
}

.faqitem__a .todo-flag {
  margin-left: 0;
}

@media (prefers-reduced-motion: reduce) {
  .faqitem__icon {
    transition: none;
  }
}

/* ---------- 23. KONTAK ---------- */
.contact {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.contactcard {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(31, 21, 14, 0.6);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
}

.contactcard--primary {
  border-color: rgba(229, 163, 60, 0.45);
  background: linear-gradient(150deg, rgba(229, 163, 60, 0.12), rgba(31, 21, 14, 0.66) 58%);
}

.contactcard__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream-100);
}

.contactcard__desc {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--bark-300);
  margin-bottom: var(--s-2);
}

.contactcard .btn {
  justify-self: start;
}

.contactcard__meta {
  font-size: 0.76rem;
  color: rgba(185, 155, 118, 0.9);
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .contact {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .contactcard {
    padding: var(--s-5);
  }
}
