/* =====================================================================
   TUKUBUKU DESIGN SYSTEM v3 — "Rak Senja" (revisi 9)
   Layout & interaksi: mengikuti referensi (hero ilustrasi bercerita,
   navigasi teks tipis, carousel kartu flip). Warna: 100% dari logo.
   Dimuat PALING AKHIR setelah style.css & professional.css.
   Mobile-first. Breakpoint: 640px (tablet), 900px (desktop), 1200px (lebar).
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Warna logo */
  --c-olive: #5A7646;        /* primary: huruf logo */
  --c-olive-700: #4A6338;
  --c-olive-800: #3C5030;
  --c-olive-900: #2B3A22;
  --c-leaf: #7A9A5A;         /* accent: daun logo */
  --c-leaf-300: #A9C08A;
  --c-leaf-100: #EBF0E1;
  --c-leaf-50: #F4F6EC;
  --c-bark: #8A5432;         /* secondary: batang & bingkai logo */
  --c-bark-700: #6E4127;
  --c-bark-300: #C8935C;     /* cahaya hangat dari kayu */
  --c-bark-100: #F1E6D2;
  --c-koala: #A8A098;        /* netral: bulu koala */
  --c-koala-200: #D9D4CC;
  /* Permukaan terang */
  --c-cream: #FAF6EC;        /* background halaman */
  --c-paper: #FFFDF8;        /* surface kartu */
  --c-line: #E9E1D1;
  --c-line-strong: #DDD3BF;
  --c-ink: #2B2A24;          /* teks utama */
  --c-ink-2: #5A5347;
  --c-ink-3: #8C8475;
  /* Permukaan gelap (adegan senja) */
  --c-night: #1A2114;
  --c-night-2: #232B1B;
  --c-night-bark: #2A2015;
  --c-on-night: #F4ECDC;
  --c-on-night-2: #CFC6B2;
  --c-night-line: rgba(244, 236, 220, .16);
  /* Semantik (diturunkan dari palet logo) */
  --c-success: #4F7A3A; --c-success-bg: #E8F0DD;
  --c-warning: #A8712A; --c-warning-bg: #F8ECD6;
  --c-error: #A9452F;   --c-error-bg: #F6E1DA;
  --c-info: #4F6B58;    --c-info-bg: #E6EEE6;
  /* Tipografi */
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-label: 'Oswald', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Spasi, radius, bayangan */
  --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;
  --r-sm: 6px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;
  --sh-1: 0 2px 8px rgba(43, 42, 36, .06);
  --sh-2: 0 10px 28px rgba(43, 42, 36, .10);
  --sh-3: 0 22px 50px rgba(26, 33, 20, .22);
  --sh-glow: 0 0 0 1px rgba(200, 147, 92, .35), 0 18px 40px rgba(200, 147, 92, .25);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
  --bottom-h: 66px;
  --container: 1240px;

  /* Alias variabel lama (style.css / professional.css) -> palet logo */
  --brand-950: var(--c-olive-900); --brand-900: var(--c-olive-800); --brand-800: var(--c-olive); --brand-700: var(--c-olive-700); --brand-600: var(--c-leaf);
  --accent: var(--c-bark); --accent-soft: var(--c-bark-100); --ink: var(--c-ink); --muted: var(--c-ink-3); --page: var(--c-cream); --surface: var(--c-paper); --line: var(--c-line);
  --cream: var(--c-cream); --cream-soft: var(--c-paper); --brown: var(--c-bark); --brown-dark: var(--c-ink); --green: var(--c-olive); --green-dark: var(--c-olive-800);
  --tan: var(--c-bark-100); --tan-dark: var(--c-bark); --text-dark: var(--c-ink); --white: var(--c-paper);
  --paper: var(--c-paper); --forest: var(--c-olive); --forest-deep: var(--c-olive-800); --coral: var(--c-bark-300); --gold: var(--c-bark-300); --ink-soft: var(--c-ink-3);
  --tb-green: var(--c-olive); --tb-green-dark: var(--c-olive-800); --tb-green-soft: var(--c-leaf-100); --tb-yellow: var(--c-bark-300); --tb-yellow-dark: var(--c-bark);
  --tb-bg: var(--c-cream); --tb-card: var(--c-paper); --tb-text: var(--c-ink); --tb-muted: var(--c-ink-3); --tb-line: var(--c-line);
}

/* ---------- 2. BASE ---------- */
html, body { overflow-x: clip; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--c-cream) !important; color: var(--c-ink) !important;
  font-family: var(--f-body) !important; font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.has-bottom-nav { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3, .page-heading h2, .list-header h2, .section-heading h2 {
  font-family: var(--f-display) !important; font-weight: 400 !important; letter-spacing: .01em !important; color: var(--c-olive-900);
}
h4 { font-family: var(--f-label) !important; font-weight: 500 !important; letter-spacing: .06em !important; text-transform: uppercase; color: var(--c-olive-800); }
a { color: var(--c-olive); }
::selection { background: var(--c-leaf-300); color: var(--c-ink); }
:focus-visible { outline: 3px solid var(--c-leaf-300) !important; outline-offset: 2px; }
.tb-skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--c-olive); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; }
.tb-skip:focus { left: 12px; }
.tb-icon { width: 1.15em; height: 1.15em; flex: none; }
.eyebrow, .tb-eyebrow { font-family: var(--f-label) !important; font-weight: 500 !important; font-size: .74rem !important; letter-spacing: .24em !important; text-transform: uppercase; color: var(--c-bark) !important; }

/* ---------- 3. BUTTONS (varian standar) ---------- */
.tb-btn, .btn-primary, .btn-secondary, .btn-submit, .btn-outline, .btn-solid-outline, .btn-mini, .btn-readmore, .btn-light, .btn-contact, .btn-gform {
  font-family: var(--f-label) !important; font-weight: 500 !important; letter-spacing: .14em !important; text-transform: uppercase;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s, border-color .18s;
}
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 22px; border-radius: var(--r-sm); border: 1.5px solid transparent; font-size: .82rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.tb-btn:hover { transform: translateY(-2px); }
.tb-btn:active { transform: translateY(0); }
.tb-btn-lg { min-height: 52px; padding: 14px 28px; font-size: .86rem; }
.tb-btn-sm { min-height: 36px; padding: 8px 14px; font-size: .74rem; }
.tb-btn-primary, .tb-btn-green, .btn-primary, .btn-submit, .btn-solid-outline { background: var(--c-olive) !important; border-color: var(--c-olive) !important; color: #FFFDF8 !important; box-shadow: 0 8px 20px rgba(90, 118, 70, .28) !important; }
.tb-btn-primary:hover, .tb-btn-green:hover, .btn-primary:hover, .btn-submit:hover, .btn-solid-outline:hover { background: var(--c-olive-700) !important; border-color: var(--c-olive-700) !important; box-shadow: 0 12px 26px rgba(90, 118, 70, .36) !important; }
.tb-btn-secondary, .tb-btn-yellow { background: var(--c-bark) !important; border-color: var(--c-bark) !important; color: #FFFDF8 !important; box-shadow: 0 8px 20px rgba(138, 84, 50, .25); }
.tb-btn-secondary:hover, .tb-btn-yellow:hover { background: var(--c-bark-700) !important; border-color: var(--c-bark-700) !important; }
/* Tombol bingkai ala referensi */
.tb-btn-frame, .tb-btn-ghost, .btn-secondary, .btn-outline { background: transparent !important; color: var(--c-olive-800) !important; border: 1.5px solid currentColor !important; box-shadow: none !important; }
.tb-btn-frame:hover, .tb-btn-ghost:hover, .btn-secondary:hover, .btn-outline:hover { background: var(--c-olive) !important; color: #FFFDF8 !important; border-color: var(--c-olive) !important; }
.is-dark .tb-btn-frame, .is-dark .tb-btn-ghost { color: var(--c-on-night) !important; }
.is-dark .tb-btn-frame:hover, .is-dark .tb-btn-ghost:hover { background: var(--c-on-night) !important; color: var(--c-night) !important; border-color: var(--c-on-night) !important; }
.btn-primary, .btn-secondary, .btn-submit, .btn-outline, .btn-solid-outline { border-radius: var(--r-sm) !important; font-size: .8rem !important; }
.btn-submit { width: 100%; min-height: 50px; }
.btn-mini { border-radius: var(--r-sm) !important; font-size: .72rem !important; padding: 9px 14px !important; border: 1.5px solid var(--c-olive) !important; background: var(--c-paper) !important; color: var(--c-olive-800) !important; }
.btn-mini:hover { background: var(--c-olive) !important; color: #fff !important; }
.btn-mini.approve { background: var(--c-olive) !important; color: #fff !important; }
.btn-mini.reject { background: transparent !important; border-color: var(--c-bark) !important; color: var(--c-bark) !important; }
.btn-mini.reject:hover { background: var(--c-bark) !important; color: #fff !important; }
.btn-readmore { color: var(--c-olive) !important; font-size: .74rem !important; }
button[disabled], .is-loading { opacity: .65; pointer-events: none; }
.is-loading { position: relative; }
.is-loading::after { content: ''; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; vertical-align: -2px; animation: tb-spin .7s linear infinite; }
@keyframes tb-spin { to { transform: rotate(360deg); } }

/* ---------- 4. FORMS ---------- */
body main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not(#_),
body main select:not(#_), body main textarea:not(#_) {
  font-family: var(--f-body) !important; font-size: 15px !important; color: var(--c-ink) !important;
  background: var(--c-paper) !important; border: 1.5px solid var(--c-line-strong) !important; border-radius: 10px !important;
  min-height: 46px !important; height: auto !important; padding: 11px 14px !important; box-shadow: none !important; transition: border-color .16s, box-shadow .16s;
}
body main select:not(#_) { padding-right: 36px !important; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%235A7646%27 stroke-width=%272.2%27 stroke-linecap=%27round%27%3E%3Cpath d=%27m6 9 6 6 6-6%27/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 16px !important; }
body main textarea:not(#_) { min-height: 96px !important; line-height: 1.5; }
body main input:focus:not(#_), body main select:focus:not(#_), body main textarea:focus:not(#_) { border-color: var(--c-olive) !important; box-shadow: 0 0 0 4px rgba(122, 154, 90, .22) !important; outline: none !important; }
body main input::placeholder, body main textarea::placeholder { color: var(--c-ink-3) !important; }
body main input[type=file] { font-size: .86rem; color: var(--c-ink-2); }
body main input[type=file]::file-selector-button { font-family: var(--f-label); letter-spacing: .1em; text-transform: uppercase; border: 1.5px solid var(--c-olive); background: transparent; color: var(--c-olive-800); padding: 8px 12px; border-radius: var(--r-sm); margin-right: 10px; cursor: pointer; }
body main input[type=checkbox], body main input[type=radio] { accent-color: var(--c-olive); }
.form-group label, .filter-field label, .settings-photo-copy label { font-family: var(--f-body) !important; font-weight: 600 !important; font-size: .84rem !important; color: var(--c-ink-2) !important; letter-spacing: 0 !important; }
.form-hint { color: var(--c-ink-3) !important; font-size: .78rem !important; }
.form-section-title { font-family: var(--f-label) !important; font-weight: 500 !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--c-bark) !important; border-bottom: 1px solid var(--c-line); padding-bottom: 8px; }

/* ---------- 5. NOTICES / TOAST ---------- */
.notice, .form-msg {
  position: relative; border-radius: var(--r-md) !important; padding: 14px 16px 14px 46px !important; border: 1px solid transparent !important;
  font-size: .9rem; box-shadow: var(--sh-1); animation: tb-toast-in .45s var(--ease) both;
}
.notice::before, .form-msg::before { content: ''; position: absolute; left: 16px; top: 15px; width: 18px; height: 18px; border-radius: 50%; background: currentColor; opacity: .9;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 3px, #000 3.5px); mask: radial-gradient(circle at 50% 50%, transparent 0 3px, #000 3.5px); }
.notice-success, .form-msg.success { background: var(--c-success-bg) !important; color: var(--c-success) !important; border-color: #CFE0BF !important; }
.notice-warning, .form-msg.error { background: var(--c-warning-bg) !important; color: #7E5420 !important; border-color: #EBD3AA !important; }
.notice-info { background: var(--c-info-bg) !important; color: var(--c-info) !important; border-color: #CCDACD !important; }
@keyframes tb-toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- 6. HEADER (navigasi teks ala referensi) ---------- */
.tb-header { position: sticky; top: 0; z-index: 60; transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s; background: rgba(250, 246, 236, .92); backdrop-filter: saturate(1.2) blur(10px); box-shadow: 0 1px 0 var(--c-line); }
.tb-header.is-overlay { position: fixed; left: 0; right: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.tb-header.is-overlay.is-scrolled, .tb-header.is-overlay.is-open { background: rgba(250, 246, 236, .94); backdrop-filter: saturate(1.2) blur(10px); box-shadow: 0 1px 0 var(--c-line), 0 10px 30px rgba(26, 33, 20, .08); }
.tb-header-inner { max-width: var(--container); margin: 0 auto; height: var(--header-h); padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.tb-logo { display: inline-flex; align-items: center; flex: none; margin-right: auto; }
.tb-logo img { display: block; width: 92px; height: auto; }
.tb-nav { display: none; }
.tb-nav a { position: relative; font-family: var(--f-label); font-weight: 500; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-night-bark) !important; text-decoration: none; padding: 10px 2px; }
.tb-nav a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: 2px; height: 2px; background: var(--c-leaf); transition: left .25s var(--ease), right .25s var(--ease); }
.tb-nav a:hover::after, .tb-nav a.is-active::after { left: 0; right: 0; }
.tb-nav a.is-active { color: var(--c-olive-800) !important; }
.tb-actions { display: flex; align-items: center; gap: 4px; }
.tb-icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; background: transparent; border-radius: 50%; color: var(--c-night-bark) !important; cursor: pointer; }
.tb-icon-btn:hover, .tb-icon-btn.is-active, .tb-icon-btn[aria-expanded=true] { background: rgba(90, 118, 70, .12); color: var(--c-olive-800) !important; }
.tb-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--c-bark); color: #fff; font: 600 .62rem/1 var(--f-label); letter-spacing: .04em; border: 2px solid var(--c-cream); }
.tb-count[hidden] { display: none; }
.tb-login-frame { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 16px; border: 1.5px solid var(--c-night-bark); border-radius: var(--r-sm); font-family: var(--f-label); font-weight: 500; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-night-bark) !important; text-decoration: none; transition: all .18s; }
.tb-login-frame:hover { background: var(--c-olive); border-color: var(--c-olive); color: #fff !important; }
.tb-signup-link { display: none; font-family: var(--f-label); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-olive-800) !important; text-decoration: none; padding: 8px; }
/* Panel pencarian */
.tb-search-panel { border-top: 1px solid var(--c-line); background: var(--c-paper); padding: 16px; box-shadow: var(--sh-2); }
.tb-search-panel[hidden] { display: none; }
.tb-search-form { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; }
.tb-search-form input { flex: 1; min-width: 0; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--c-line-strong); border-radius: 10px; background: #fff; }
.tb-search-form input:focus { outline: none; border-color: var(--c-olive); box-shadow: 0 0 0 4px rgba(122, 154, 90, .22); }
.tb-search-tags { max-width: 760px; margin: 10px auto 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: var(--c-ink-3); }
.tb-search-tags a { padding: 5px 10px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); color: var(--c-ink-2); text-decoration: none; }
.tb-search-tags a:hover { border-color: var(--c-olive); color: var(--c-olive-800); }
/* Menu profil */
.tb-profile { position: relative; }
.tb-profile > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px; border: 1.5px solid transparent; border-radius: var(--r-pill); color: var(--c-night-bark); }
.tb-profile > summary::-webkit-details-marker { display: none; }
.tb-profile > summary:hover, .tb-profile[open] > summary { border-color: var(--c-line-strong); background: var(--c-paper); }
.tb-profile .greet-avatar { width: 34px; height: 34px; border: 2px solid var(--c-leaf); background: var(--c-leaf-100); color: var(--c-olive); }
.tb-profile-name { display: none; font-family: var(--f-label); font-weight: 500; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-night-bark) !important; padding: 0 !important; }
.tb-chevron { display: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.tb-profile[open] .tb-chevron { transform: rotate(180deg); }
.tb-profile-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; z-index: 70; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 8px; box-shadow: var(--sh-3); animation: tb-pop .18s var(--ease); }
.tb-profile-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--c-line); margin-bottom: 6px; }
.tb-profile-head strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-profile-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--c-ink) !important; text-decoration: none; font-weight: 500; font-size: .9rem; }
.tb-profile-menu a svg { width: 18px; height: 18px; fill: none; stroke: var(--c-olive); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tb-profile-menu a:hover, .tb-profile-menu a.is-active { background: var(--c-leaf-50); }
.tb-profile-menu .lang-switch { margin: 6px 12px 4px; }
.tb-profile-menu .tb-logout { color: var(--c-error) !important; margin-top: 4px; border-top: 1px solid var(--c-line); border-radius: 0 0 10px 10px; }
.tb-profile-menu .tb-logout svg { stroke: var(--c-error); }
@keyframes tb-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: transparent; }
.lang-switch button { border: 0; background: transparent; color: var(--c-ink-2); font: 500 .72rem/1 var(--f-label); letter-spacing: .14em; padding: 7px 10px; border-radius: var(--r-pill); cursor: pointer; }
.lang-switch button.is-active { background: var(--c-olive); color: #fff; }

/* ---------- 7. NAVIGASI BAWAH (HP) ---------- */
.tb-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; height: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: rgba(255, 253, 248, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--c-line); box-shadow: 0 -8px 24px rgba(26, 33, 20, .08); }
.tb-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; color: var(--c-ink-3) !important; text-decoration: none; font: 500 .62rem/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.tb-bottom-nav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb-bottom-nav a.is-active { color: var(--c-olive-800) !important; }
.tb-bottom-avatar { width: 24px !important; height: 24px !important; border: 2px solid currentColor !important; }
.tb-bottom-plus { display: grid; place-items: center; width: 50px; height: 50px; margin-top: -26px; border-radius: 14px; transform: rotate(45deg); background: var(--c-olive); color: #fff; border: 4px solid var(--c-cream); box-shadow: 0 8px 18px rgba(90, 118, 70, .4); }
.tb-bottom-plus span { transform: rotate(-45deg); font: 400 1.7rem/1 var(--f-display); }

/* ---------- 8. HERO BERCERITA (beranda) ---------- */
.tb-story { position: relative; background: var(--c-night); color: var(--c-on-night); }
.tb-story-stage { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; }
.tb-scene { position: absolute; inset: 0; }
/* Adegan 1: senja keemasan dilihat dari portico */
.tb-scene-1 { background: linear-gradient(180deg, #F6E2BC 0%, #EBC896 34%, #C99A68 56%, #6E4E30 78%, #2A2015 100%); }
.tb-sun { position: absolute; left: 50%; top: 30%; width: 70vmin; height: 70vmin; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 238, 200, .95) 0%, rgba(246, 210, 150, .45) 35%, transparent 70%); }
.tb-watermark { position: absolute; left: 0; right: 0; top: 16%; text-align: center; font-family: var(--f-display); font-size: clamp(2.6rem, 8.6vw, 8rem); letter-spacing: .1em; color: rgba(255, 250, 238, .38); line-height: 1; user-select: none; }
.tb-layer { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; pointer-events: none; }
.tb-shop { position: absolute; left: 50%; bottom: 7%; width: min(44vw, 560px); aspect-ratio: 4 / 3; transform: translateX(-50%); border-radius: 50% 50% 14px 14px / 34% 34% 14px 14px; overflow: hidden; box-shadow: 0 0 80px rgba(255, 214, 150, .55), 0 30px 60px rgba(0, 0, 0, .35); }
.tb-shop img { width: 100%; height: 100%; object-fit: cover; }
.tb-rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 200deg at 50% 18%, rgba(255, 236, 196, .16) 0deg 4deg, transparent 4deg 12deg); mask: linear-gradient(180deg, #000 0%, transparent 75%); -webkit-mask: linear-gradient(180deg, #000 0%, transparent 75%); mix-blend-mode: screen; }
.tb-scene1-copy { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; color: #FFF8E8; text-shadow: 0 2px 18px rgba(42, 32, 21, .55); padding: 0 16px; }
.tb-scene1-copy p { margin: 0; font-family: var(--f-label); letter-spacing: .32em; text-transform: uppercase; font-size: .78rem; }
.tb-scene1-copy strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: .04em; margin-top: 6px; }
.tb-scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; color: #FFF8E8 !important; text-decoration: none; font: 500 .66rem/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; z-index: 5; }
.tb-scroll-hint span { width: 1.5px; height: 34px; background: linear-gradient(#FFF8E8, transparent); animation: tb-hint 1.8s ease-in-out infinite; }
@keyframes tb-hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
/* Adegan 2: interior toko (gelap hangat) */
.tb-scene-2 { position: relative; display: grid; align-items: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--header-h) + 24px) 16px 40px;
  background: radial-gradient(ellipse 60% 50% at 78% 18%, rgba(240, 168, 90, .28), transparent 60%),
              repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 160px),
              linear-gradient(180deg, #2A2015 0%, #231C13 55%, #1A2114 100%); }
.tb-scene2-grid { width: 100%; max-width: var(--container); margin: 0 auto; display: grid; gap: 28px; align-items: center; }
.tb-scene2-copy h1 { color: var(--c-on-night) !important; font-size: clamp(2.1rem, 7.2vw, 4.2rem); line-height: 1.04; margin: 14px 0 16px; text-transform: uppercase; letter-spacing: .02em !important; }
.tb-scene2-copy h1 em { font-style: normal; color: var(--c-leaf-300); }
.tb-scene2-copy .tb-eyebrow { color: var(--c-bark-300) !important; }
.tb-scene2-copy p { color: var(--c-on-night-2); max-width: 480px; font-size: .95rem; margin: 0 0 22px; }
.tb-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-hero-cta .tb-btn { flex: 1 1 150px; }
.tb-features { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.tb-features li { display: flex; align-items: center; gap: 10px; color: var(--c-on-night); font-family: var(--f-label); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.tb-features svg { width: 20px; height: 20px; color: var(--c-leaf-300); }
.tb-scene2-art { position: relative; min-height: 300px; display: grid; place-items: end center; }
.tb-scene2-art .tb-koala { position: relative; z-index: 1; width: min(52vw, 280px); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .45)); margin-bottom: -18%; }
.tb-scene2-art .tb-table { position: relative; z-index: 2; width: 100%; max-width: 620px; }
.tb-lamp { position: absolute; top: calc(var(--header-h) - 6px); right: 8%; width: 70px; z-index: 1; filter: drop-shadow(0 0 30px rgba(255, 200, 120, .55)); transform-origin: top center; animation: tb-sway 6s ease-in-out infinite; }
@keyframes tb-sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
/* Daun berjatuhan */
.tb-leaves { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.tb-leaves i { position: absolute; top: -40px; width: 22px; height: 13px; background: url('../images/scene/leaf.svg') center/contain no-repeat; opacity: .9; animation: tb-fall linear infinite; }
.tb-leaves i:nth-child(1) { left: 6%; animation-duration: 13s; animation-delay: -2s; }
.tb-leaves i:nth-child(2) { left: 18%; animation-duration: 16s; animation-delay: -9s; transform: scale(.8); }
.tb-leaves i:nth-child(3) { left: 31%; animation-duration: 12s; animation-delay: -5s; }
.tb-leaves i:nth-child(4) { left: 44%; animation-duration: 18s; animation-delay: -12s; transform: scale(1.2); }
.tb-leaves i:nth-child(5) { left: 57%; animation-duration: 14s; animation-delay: -1s; }
.tb-leaves i:nth-child(6) { left: 69%; animation-duration: 17s; animation-delay: -7s; transform: scale(.7); }
.tb-leaves i:nth-child(7) { left: 81%; animation-duration: 13s; animation-delay: -11s; }
.tb-leaves i:nth-child(8) { left: 92%; animation-duration: 15s; animation-delay: -4s; transform: scale(1.1); }
@keyframes tb-fall { 0% { transform: translate(0, -40px) rotate(0); } 25% { transform: translate(40px, 25vh) rotate(90deg); } 50% { transform: translate(-20px, 50vh) rotate(200deg); } 75% { transform: translate(50px, 75vh) rotate(290deg); } 100% { transform: translate(10px, 105vh) rotate(400deg); } }
/* Tanpa efek scroll (HP / no-JS / kurangi animasi): adegan 1 jadi banner, adegan 2 mengalir normal */
.tb-story:not(.is-animated) .tb-story-stage { min-height: 0; }
.tb-story:not(.is-animated) .tb-scene-1 { position: relative; height: 78vh; height: 78svh; min-height: 460px; }
.tb-story:not(.is-animated) .tb-scene-2 { min-height: 0; padding-top: 56px; }
.tb-story:not(.is-animated) .tb-lamp { top: 0; right: 6%; width: 46px; opacity: .85; }
@media (max-width: 639px) { .tb-shop { width: 76vw; bottom: 9%; } .tb-story:not(.is-animated) .tb-lamp { display: none; } .tb-scene2-art { min-height: 0; } }
.tb-story:not(.is-animated) .tb-leaves { height: 78vh; height: 78svh; min-height: 460px; }
/* Dengan efek scroll (desktop): panggung sticky + progres --p (0..1) dari JS */
.tb-story.is-animated { height: 260vh; }
.tb-story.is-animated .tb-story-stage { position: sticky; top: 0; height: 100vh; }
.tb-story.is-animated .tb-scene-1 { opacity: calc(1 - clamp(0, (var(--p, 0) - .28) * 3.2, 1)); }
.tb-story.is-animated .tb-layer-front { transform: scale(calc(1 + var(--p, 0) * 1.6)); transform-origin: 50% 62%; }
.tb-story.is-animated .tb-layer-far { transform: translateY(calc(var(--p, 0) * -6%)) scale(calc(1 + var(--p, 0) * .25)); transform-origin: 50% 70%; }
.tb-story.is-animated .tb-shop { transform: translateX(-50%) scale(calc(1 + var(--p, 0) * 1.1)); transform-origin: 50% 80%; }
.tb-story.is-animated .tb-watermark { transform: translateY(calc(var(--p, 0) * -40%)); }
.tb-story.is-animated .tb-scene1-copy, .tb-story.is-animated .tb-scroll-hint { opacity: calc(1 - var(--p, 0) * 5); }
.tb-story.is-animated .tb-scene-2 { position: absolute; inset: 0; min-height: 0; opacity: clamp(0, (var(--p, 0) - .42) * 3.4, 1); transform: translateY(calc((1 - clamp(0, (var(--p, 0) - .42) * 3.4, 1)) * 40px)); }
.tb-story.is-animated .tb-scene2-art .tb-koala { transform: translateY(calc((1 - clamp(0, (var(--p, 0) - .55) * 3, 1)) * 60px)); }
.tb-story.is-animated .tb-scene-2:not(.is-visible) { pointer-events: none; }

/* ---------- 9. CAROUSEL KARTU BUKU (flip 3D) ---------- */
.tb-shelf { position: relative; padding: 72px 16px 80px; background: linear-gradient(180deg, #1A2114 0%, #232B1B 100%); color: var(--c-on-night); overflow: hidden; }
.tb-shelf::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 40% at 50% 40%, rgba(200, 147, 92, .16), transparent 70%); pointer-events: none; }
.tb-shelf-head { position: relative; max-width: var(--container); margin: 0 auto 30px; text-align: center; }
.tb-shelf-head h2 { color: var(--c-on-night) !important; font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 10px 0 8px; }
.tb-shelf-head p { color: var(--c-on-night-2); margin: 0; font-size: .9rem; }
.tb-carousel { position: relative; max-width: var(--container); margin: 0 auto; }
.tb-carousel-track { position: relative; height: 430px; perspective: 1600px; }
.tb-flip { position: absolute; left: 50%; top: 50%; width: 236px; height: 360px; margin: -180px 0 0 -118px; transition: transform .6s var(--ease), opacity .45s, filter .45s; will-change: transform; }
.tb-flip[data-pos=center] { transform: translateX(0) scale(1.08); z-index: 3; }
.tb-flip[data-pos=left] { transform: translateX(-74%) scale(.82); z-index: 2; filter: brightness(.7); }
.tb-flip[data-pos=right] { transform: translateX(74%) scale(.82); z-index: 2; filter: brightness(.7); }
.tb-flip[data-pos=far-left] { transform: translateX(-130%) scale(.66); z-index: 1; opacity: 0; }
.tb-flip[data-pos=far-right] { transform: translateX(130%) scale(.66); z-index: 1; opacity: 0; }
.tb-flip[data-pos=hidden] { transform: scale(.5); opacity: 0; pointer-events: none; }
.tb-flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.tb-flip.is-flipped .tb-flip-inner { transform: rotateY(180deg); }
.tb-flip-face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
/* Sisi depan: "punggung kartu" bergaya brand */
.tb-flip-cover { display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #6B8A52 0%, #3C5030 55%, #2B3A22 100%); border: 3px solid var(--c-bark-300); box-shadow: var(--sh-3), inset 0 0 0 8px rgba(26, 33, 20, .35), inset 0 0 0 10px rgba(200, 147, 92, .6); }
.tb-flip-cover::before { content: ''; position: absolute; inset: 18px; border: 1.5px solid rgba(244, 236, 220, .35); border-radius: 10px; background: repeating-linear-gradient(45deg, rgba(244, 236, 220, .05) 0 6px, transparent 6px 14px); }
.tb-flip-corner { position: absolute; width: 22px; height: 22px; background: var(--c-bark-300); clip-path: polygon(0 0, 100% 0, 0 100%); }
.tb-flip-corner.tl { top: 8px; left: 8px; } .tb-flip-corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.tb-flip-corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); } .tb-flip-corner.br { bottom: 8px; right: 8px; transform: scale(-1); }
.tb-flip-emblem { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 4px solid var(--c-bark-300); overflow: hidden; background: var(--c-leaf-100); box-shadow: 0 0 0 6px rgba(26, 33, 20, .4), 0 0 40px rgba(240, 201, 142, .45); }
.tb-flip-emblem img, .tb-flip-emblem svg { width: 100%; height: 100%; object-fit: cover; color: var(--c-olive); }
.tb-flip-genre { position: absolute; bottom: 52px; left: 0; right: 0; text-align: center; font-family: var(--f-label); letter-spacing: .26em; font-size: .72rem; text-transform: uppercase; color: var(--c-on-night); }
.tb-flip-hint { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: .66rem; color: var(--c-on-night-2); letter-spacing: .08em; }
/* Sisi belakang: detail buku */
.tb-flip-detail { transform: rotateY(180deg); background: var(--c-paper); color: var(--c-ink); border: 3px solid var(--c-bark-300); display: flex; flex-direction: column; box-shadow: var(--sh-3); }
.tb-flip-detail-cover { flex: 0 0 54%; min-height: 0; overflow: hidden; background: linear-gradient(160deg, #EFE7D6, #E2D7C1); display: flex; align-items: center; justify-content: center; padding: 12px; }
.tb-flip-detail-cover img { height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25)); }
.tb-flip-detail-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.tb-flip-detail-body .tb-flip-genre-sm { font-family: var(--f-label); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-bark); }
.tb-flip-detail-body h3 { margin: 0; font-size: 1.02rem !important; line-height: 1.2; color: var(--c-olive-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-flip-detail-body p { margin: 0; font-size: .76rem; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-flip-detail-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-flip-toggle { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; border-radius: 16px; }
.tb-flip.is-flipped .tb-flip-toggle { inset: 0 0 auto 0; height: 52%; }
.tb-carousel-nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.tb-carousel-btn { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--c-on-night); font: 500 .72rem/1 var(--f-label); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; padding: 6px; }
.tb-carousel-btn b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--c-bark); color: #fff; transition: background .2s, transform .2s; }
.tb-carousel-btn:hover b { background: var(--c-leaf); transform: translateY(-2px); }
.tb-carousel-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tb-carousel-btn .lbl { display: none; }
.tb-carousel-dots { display: flex; gap: 8px; }
.tb-carousel-dots button { width: 18px; height: 3px; border: 0; padding: 0; border-radius: 2px; background: rgba(244, 236, 220, .25); cursor: pointer; transition: background .2s, width .2s; }
.tb-carousel-dots button[aria-current=true] { background: var(--c-bark-300); width: 30px; }
@media (min-width: 640px) { .tb-carousel-dots button { width: 28px; } .tb-carousel-dots button[aria-current=true] { width: 40px; } }
/* Tanpa JS: kartu tampil sebagai daftar geser horizontal, langsung sisi detail */
html:not(.js) .tb-carousel-track { height: auto; display: flex; gap: 16px; overflow-x: auto; perspective: none; padding-bottom: 10px; }
html:not(.js) .tb-flip { position: relative; left: auto; top: auto; margin: 0; flex: 0 0 236px; transform: none !important; opacity: 1 !important; filter: none !important; }
html:not(.js) .tb-flip-cover, html:not(.js) .tb-flip-toggle, html:not(.js) .tb-carousel-nav { display: none; }
html:not(.js) .tb-flip-detail { transform: none; }

/* ---------- 10. SECTION BERANDA (krem) ---------- */
.tb-home-section { max-width: var(--container); margin: 0 auto; padding: 56px 16px 0; }
.tb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tb-section-head h2 { margin: 6px 0 0; font-size: clamp(1.6rem, 4.6vw, 2.3rem); }
.tb-link { font-family: var(--f-label); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-olive-800) !important; text-decoration: none; white-space: nowrap; }
.tb-link:hover { color: var(--c-bark) !important; }
.tb-categories { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 12px; scrollbar-width: none; }
.tb-categories::-webkit-scrollbar { display: none; }
.tb-category { flex: 0 0 112px; scroll-snap-align: start; display: grid; justify-items: center; gap: 6px; padding: 16px 8px 14px; text-align: center; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--r-lg); color: var(--c-ink) !important; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.tb-category:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--c-leaf-300); }
.tb-category-icon { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--c-leaf-100); color: var(--c-olive); overflow: hidden; box-shadow: 0 0 0 3px var(--c-paper), 0 0 0 4px var(--c-line-strong); }
.tb-category-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tb-category-svg { width: 30px; height: 30px; }
.tb-category-name { font-family: var(--f-label); font-weight: 500; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; }
.tb-category small { font-size: .7rem; color: var(--c-ink-3); }
.tb-category.is-swap { background: var(--c-olive); border-color: var(--c-olive); color: #fff !important; }
.tb-category.is-swap .tb-category-icon { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.tb-category.is-swap small { color: rgba(255, 255, 255, .8); }
.tb-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.tb-steps li { position: relative; padding: 22px 20px 20px; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.tb-steps li > span { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 12px; background: var(--c-leaf-100); color: var(--c-olive-800); font: 400 1.4rem/1 var(--f-display); }
.tb-steps li strong { display: block; font-family: var(--f-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--c-olive-900); }
.tb-steps li p { margin: 6px 0 0; color: var(--c-ink-2); font-size: .9rem; }
.tb-cta { position: relative; margin: 64px 0 0; padding: 56px 16px; overflow: hidden; background: linear-gradient(120deg, #2A2015, #1A2114 60%, #2B3A22); color: var(--c-on-night); }
.tb-cta-inner { position: relative; max-width: var(--container); margin: 0 auto; display: grid; gap: 22px; align-items: center; }
.tb-cta h2 { color: var(--c-on-night) !important; font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin: 8px 0; line-height: 1.15; }
.tb-cta p { color: var(--c-on-night-2); margin: 0; }
.tb-cta-mascot { position: absolute; right: -10px; bottom: -14px; width: 150px; opacity: .95; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .4)); pointer-events: none; }
.tb-cta .tb-btn { justify-self: start; position: relative; z-index: 1; }

/* ---------- 11. KARTU BUKU ---------- */
.tb-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tb-book-grid > .empty-state { grid-column: 1 / -1; }
.tb-card { display: flex; flex-direction: column; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.tb-card:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--c-leaf-300); }
.tb-card-cover { position: relative; display: block; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #EFE7D6, #E2D7C1); }
.tb-card-cover img { width: 100%; height: 100%; object-fit: contain; padding: 12px; display: block; transition: transform .35s var(--ease); filter: drop-shadow(0 8px 12px rgba(43, 42, 36, .22)); }
.tb-card:hover .tb-card-cover img { transform: scale(1.04) rotate(-1deg); }
.tb-card-condition { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: var(--r-pill); background: rgba(255, 253, 248, .94); color: var(--c-olive-800); font: 500 .62rem/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; }
.tb-card-ribbon { position: absolute; top: 12px; right: -32px; transform: rotate(35deg); padding: 4px 36px; background: var(--c-bark); color: #fff; font: 500 .66rem/1 var(--f-label); letter-spacing: .2em; }
.tb-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.tb-card-category { font-family: var(--f-label); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-bark); }
.tb-card-title { margin: 0; font: 600 .92rem/1.28 var(--f-body) !important; letter-spacing: 0 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-card-title a { color: var(--c-ink) !important; text-decoration: none; }
.tb-card-author { margin: 0; font-size: .76rem; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-card-meta { margin: 2px 0 0; display: grid; gap: 2px; font-size: .72rem; color: var(--c-ink-3); }
.tb-card-rating b { color: var(--c-bark-300); }
.tb-card-rating b.is-empty { color: var(--c-koala-200); }
.tb-card-location { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-card-footer { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.tb-price { font-family: var(--f-display); font-size: 1.08rem; color: var(--c-olive-800); white-space: nowrap; }
.tb-swap-badge { flex: 1 1 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--c-bark); background: var(--c-bark-100); color: var(--c-bark-700) !important; font: 500 .8rem/1 var(--f-label); letter-spacing: .22em; text-decoration: none; transition: background .2s, color .2s; }
a.tb-swap-badge:hover { background: var(--c-bark); color: #fff !important; }
.tb-card-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: var(--r-sm); font: 500 .72rem/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.tb-card-action.is-buy { background: var(--c-olive); color: #fff !important; }
.tb-card-action.is-buy:hover { background: var(--c-olive-700); }

/* ---------- 12. PITA JUDUL GELAP (halaman konten) ---------- */
.list-page, .orders-page, .chat-page, .settings-page { padding-top: 0 !important; }
.list-page > .page-heading:first-child, .list-page > .list-header:first-child {
  position: relative; isolation: isolate; margin: 0 0 28px !important; padding: 48px 0 38px !important; color: var(--c-on-night);
  align-items: flex-end;
}
.list-page > .page-heading:first-child::before, .list-page > .list-header:first-child::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: radial-gradient(ellipse 40% 90% at 85% 0%, rgba(200, 147, 92, .28), transparent 70%),
              url('../images/bg/portico.jpg') center 45% / cover no-repeat,
              linear-gradient(180deg, #2A2015, #1A2114);
  background-blend-mode: normal, soft-light, normal;
}
.list-page > .page-heading:first-child h2, .list-page > .list-header:first-child h2 { color: var(--c-on-night) !important; font-size: clamp(1.9rem, 5vw, 2.9rem) !important; margin: 6px 0 8px !important; }
.list-page > .page-heading:first-child .muted, .list-page > .list-header:first-child .muted { color: var(--c-on-night-2) !important; }
.list-page > .page-heading:first-child .eyebrow, .list-page > .list-header:first-child .eyebrow { color: var(--c-bark-300) !important; }
.list-page > .page-heading:first-child .btn-secondary { color: var(--c-on-night) !important; }
.list-page > .page-heading:first-child .btn-secondary:hover { background: var(--c-on-night) !important; color: var(--c-night) !important; border-color: var(--c-on-night) !important; }
.chat-page-heading h2 { margin-bottom: 0 !important; }

/* ---------- 13. KOMPONEN HALAMAN TRANSAKSI ---------- */
.marketplace-filters, .form-wrap, .order-card, .cart-items-panel, .cart-summary, .checkout-main, .checkout-aside, .settings-card, .settings-sidebar, .profile-hero-card, .profile-fact, .profile-order-shortcut, .profile-feature-card, .profile-recent-item, .chat-shell, .rules-card, .admin-order-card, .admin-card, .empty-state, .cart-empty, .legal-page {
  background: var(--c-paper) !important; border: 1px solid var(--c-line) !important; border-radius: var(--r-lg) !important; box-shadow: var(--sh-1) !important;
}
.order-card, .profile-order-shortcut, .profile-feature-card, .profile-recent-item, .tb-category, .admin-card { transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.profile-order-shortcut:hover, .profile-feature-card:hover, .profile-recent-item:hover, .admin-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2) !important; border-color: var(--c-leaf-300) !important; }
.empty-state h3, .cart-empty h3 { font-size: 1.4rem !important; }
.tb-empty-mascot { display: block; width: 140px; height: auto; margin: 0 auto 10px; }
.results-caption { font-family: var(--f-label); letter-spacing: .14em; text-transform: uppercase; font-size: .74rem !important; color: var(--c-ink-3) !important; }
.status-badge, .order-status, .return-status, .verification-chip, .profile-role-chip, .condition-pill, .free-fee-badge, .pill-safe {
  font-family: var(--f-label) !important; font-weight: 500 !important; letter-spacing: .12em !important; text-transform: uppercase; font-size: .64rem !important; border-radius: var(--r-pill) !important;
}
.status-badge.jual { background: var(--c-leaf-100) !important; color: var(--c-olive-800) !important; }
.status-badge.tukar { background: var(--c-bark-100) !important; color: var(--c-bark-700) !important; }
.order-status { background: var(--c-leaf-100) !important; color: var(--c-olive-800) !important; }
.order-status.status-dibatalkan { background: var(--c-error-bg) !important; color: var(--c-error) !important; }
.order-status.status-menunggu_pembayaran, .order-status.status-menunggu_konfirmasi { background: var(--c-warning-bg) !important; color: #7E5420 !important; }
.account-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--c-line); margin-bottom: 18px; }
.account-tabs a { font-family: var(--f-label); letter-spacing: .16em; text-transform: uppercase; font-size: .76rem; padding: 12px 14px; color: var(--c-ink-3) !important; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none !important; border-radius: 0 !important; }
.account-tabs a.active { color: var(--c-olive-800) !important; border-bottom-color: var(--c-leaf); }
.settings-sidebar > a { font-family: var(--f-body); font-weight: 500 !important; color: var(--c-ink-2) !important; }
.settings-sidebar > a:hover { background: var(--c-leaf-50) !important; color: var(--c-olive-800) !important; }
.settings-card-title h3 { font-size: 1.3rem !important; }
.chat-shell { overflow: hidden; }
.conversation-item.selected, .conversation-item:hover { background: var(--c-leaf-50) !important; }
.message-row.mine .message-bubble { background: var(--c-olive) !important; color: #FFFDF8 !important; }
.message-row.mine .message-bubble small { color: rgba(255, 253, 248, .75) !important; }
.message-row.theirs .message-bubble { background: var(--c-paper) !important; border: 1px solid var(--c-line); }
.chat-send-button { background: var(--c-olive) !important; color: #fff !important; }
.checkout-step { background: var(--c-olive) !important; color: #fff !important; font-family: var(--f-display) !important; }
.shipping-option, .gateway-option { border-radius: var(--r-md) !important; transition: border-color .2s, box-shadow .2s; }
.shipping-option:has(input:checked), .gateway-option:has(input:checked) { border-color: var(--c-olive) !important; box-shadow: 0 0 0 3px rgba(122, 154, 90, .2) !important; }
.checkout-row.total { font-family: var(--f-display); font-size: 1.15rem; color: var(--c-olive-900); }
.product-detail-layout { border-radius: var(--r-xl) !important; }
.product-detail-cover { background: radial-gradient(circle at 50% 35%, #3C5030, #1A2114) !important; border-radius: var(--r-lg) !important; }
.product-detail-info h2 { font-size: clamp(1.7rem, 4vw, 2.4rem) !important; }
.detail-price { font-family: var(--f-display) !important; color: var(--c-olive-800) !important; font-size: 1.9rem !important; }
.privacy-strip { background: var(--c-leaf-50) !important; border: 1px solid var(--c-leaf-100) !important; border-radius: var(--r-md) !important; }
.seller-avatar, .conversation-avatar, .settings-avatar, .profile-avatar-xl span { background: var(--c-leaf-100) !important; color: var(--c-olive-800) !important; font-family: var(--f-display) !important; }
.profile-avatar-xl { border-color: var(--c-leaf-300) !important; }
.legal-page h3, .rules-card h3 { font-size: 1.2rem !important; }
.return-section { background: var(--c-bark-100) !important; border-color: #E6D3B6 !important; }
/* Halaman masuk/daftar/bantuan: kartu di atas adegan senja */
body.page-login main, body.page-signup main, body.page-contact main { position: relative; isolation: isolate; padding: 40px 16px 60px; }
body.page-login main::before, body.page-signup main::before, body.page-contact main::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 420px; z-index: -1; background: url('../images/bg/portico.jpg') center / cover no-repeat, linear-gradient(180deg, #2A2015, #1A2114); }
body.page-login .form-wrap, body.page-contact .form-wrap { max-width: 520px; margin: 30px auto !important; padding: 34px 28px !important; box-shadow: var(--sh-3) !important; }
body.page-login .form-wrap h2 { text-align: center; font-size: 2rem !important; }
.signup-wrap { box-shadow: var(--sh-3) !important; border-radius: var(--r-xl) !important; overflow: hidden; background: var(--c-paper) !important; }
.signup-banner { background: linear-gradient(180deg, rgba(26, 33, 20, .55), rgba(26, 33, 20, .9)), url('../images/bg/library.jpg') center/cover !important; }
.signup-banner h2, .signup-banner p { color: var(--c-on-night) !important; }
.signup-kicker { font-family: var(--f-label) !important; letter-spacing: .2em !important; text-transform: uppercase; background: var(--c-bark) !important; color: #fff !important; }
.contact-hero { border-radius: var(--r-xl) !important; overflow: hidden; }
.contact-box { background: rgba(26, 33, 20, .82) !important; color: var(--c-on-night) !important; border-radius: var(--r-lg) !important; }
.sell-hero { border-radius: var(--r-xl) !important; overflow: hidden; }

/* ---------- 14. MODAL ---------- */
.tb-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: end center; background: rgba(26, 33, 20, .6); backdrop-filter: blur(3px); padding: 16px; animation: tb-fade .18s ease-out; }
.tb-modal[hidden] { display: none; }
.tb-modal-box { width: min(420px, 100%); margin-top: 60px; background: var(--c-paper); border: 3px solid var(--c-bark-300); border-radius: var(--r-xl); padding: 26px 22px 20px; text-align: center; box-shadow: var(--sh-3); animation: tb-pop .22s var(--ease); }
.tb-modal-mascot { display: block; width: 110px; height: auto; margin: -78px auto 6px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .25)); }
.tb-modal-box h3 { margin: 6px 0; font-size: 1.5rem !important; }
.tb-modal-box p { margin: 0 0 18px; color: var(--c-ink-2); font-size: .92rem; }
.tb-modal-actions { display: grid; gap: 10px; }
.tb-modal-close { margin-top: 10px; border: 0; background: none; color: var(--c-ink-3); font: 500 .74rem/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; padding: 10px; }
@keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 15. FOOTER ---------- */
.tb-footer { position: relative; background: linear-gradient(180deg, #1A2114, #141A10) !important; color: var(--c-on-night-2) !important; padding: 48px 16px 24px !important; margin-top: 0; text-align: left !important; }
.tb-footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.tb-footer-brand { grid-column: 1 / -1; display: grid; gap: 10px; }
.tb-footer-brand img { width: 120px; height: auto; background: transparent; }
.tb-footer-brand .footer-tagline { margin: 0; color: var(--c-on-night) !important; font-family: var(--f-display); font-size: 1.15rem; }
.tb-footer-col { display: grid; gap: 10px; align-content: start; }
.tb-footer-col strong { font-family: var(--f-label); font-weight: 500; letter-spacing: .22em; text-transform: uppercase; font-size: .74rem; color: var(--c-bark-300); }
.tb-footer-col a { color: var(--c-on-night-2) !important; text-decoration: none; font-size: .9rem; }
.tb-footer-col a:hover { color: var(--c-on-night) !important; }
.tb-footer .lang-switch { border-color: var(--c-night-line); width: max-content; }
.tb-footer .lang-switch button { color: var(--c-on-night-2); }
.tb-footer .lang-switch button.is-active { background: var(--c-leaf); color: var(--c-night); }
.tb-footer-copy { max-width: var(--container); margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--c-night-line); font-size: .78rem; color: rgba(207, 198, 178, .7); }

/* ---------- 16. ANIMASI MUNCUL SAAT SCROLL ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Elemen header lama yang tidak dipakai */
.navbar, .navbar-main-row, .navbar-account-row { display: none !important; }
.marketplace-live-toast { bottom: calc(var(--bottom-h) + 16px) !important; border-radius: var(--r-lg) !important; }

/* =====================================================================
   TABLET (>= 640px)
   ===================================================================== */
@media (min-width: 640px) {
  .tb-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tb-steps ol { grid-template-columns: repeat(3, 1fr); }
  .tb-features { grid-template-columns: repeat(4, auto); justify-content: start; }
  .tb-carousel-btn .lbl { display: inline; }
  .tb-modal { place-items: center; }
  .tb-footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .tb-footer-brand { grid-column: auto; }
  .tb-signup-link { display: inline-flex; }
  .tb-cta-inner { grid-template-columns: 1fr auto; padding-right: 160px; }
  .tb-cta-mascot { width: 190px; right: 10px; }
}

/* =====================================================================
   DESKTOP (>= 900px)
   ===================================================================== */
@media (min-width: 900px) {
  body.has-bottom-nav { padding-bottom: 0; }
  .tb-bottom-nav { display: none; }
  .marketplace-live-toast { bottom: 22px !important; }
  .tb-header-inner { padding: 0 28px; gap: 20px; }
  .tb-logo { margin-right: 0; }
  .tb-logo img { width: 104px; }
  .tb-nav { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 44px); flex: 1; }
  .tb-profile-name, .tb-chevron { display: inline-block; }
  .tb-profile > summary { padding: 3px 12px 3px 3px; border-color: var(--c-night-bark); border-radius: var(--r-sm); }
  .tb-scene2-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .tb-scene-2 { padding: calc(var(--header-h) + 20px) 28px 40px; }
  .tb-scene2-art { min-height: 520px; }
  .tb-scene2-art .tb-koala { width: 300px; }
  .tb-lamp { width: 90px; }
  .tb-shelf { padding: 96px 28px 100px; }
  .tb-carousel-track { height: 500px; }
  .tb-flip { width: 270px; height: 410px; margin: -205px 0 0 -135px; }
  .tb-flip[data-pos=left] { transform: translateX(-118%) scale(.86); }
  .tb-flip[data-pos=right] { transform: translateX(118%) scale(.86); }
  .tb-flip[data-pos=far-left] { transform: translateX(-215%) scale(.7); opacity: .4; }
  .tb-flip[data-pos=far-right] { transform: translateX(215%) scale(.7); opacity: .4; }
  .tb-home-section { padding: 80px 28px 0; }
  .tb-categories { display: grid; grid-template-columns: repeat(9, 1fr); overflow: visible; margin: 0; padding: 4px 0 0; }
  .tb-category { flex: none; }
  .tb-book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .tb-cta { padding: 72px 28px; }
  .tb-cta-mascot { width: 230px; right: 6%; }
  .tb-cta-inner { padding-right: 300px; }
  .list-page > .page-heading:first-child, .list-page > .list-header:first-child { padding: 64px 0 48px !important; }
}
@media (min-width: 1200px) {
  .tb-book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Hormati pengguna yang mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  .tb-leaves, .tb-scroll-hint span { display: none; }
  .tb-lamp, .notice, .form-msg, .tb-profile-menu, .tb-modal, .tb-modal-box { animation: none !important; }
  .tb-flip, .tb-flip-inner, .tb-card, .tb-btn, .js [data-reveal] { transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 17. PELENGKAP ---------- */
.tb-toast-wrap { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); z-index: 80; }
/* Logo asli di footer gelap: diberi pendar krem lembut (bukan kotak putih) agar huruf hijau tetap terbaca */
.tb-footer-brand img { width: 132px; padding: 8px 12px; background: #F4ECDC; border-radius: 14px; box-shadow: 0 0 0 1px rgba(200, 147, 92, .5); }  /* logo asli tetap terbaca di footer gelap */
/* Panel admin: komponen form & kartu ikut design system */
.admin-wrap input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), .admin-wrap select, .admin-wrap textarea { font-family: var(--f-body) !important; background: var(--c-paper) !important; border: 1.5px solid var(--c-line-strong) !important; border-radius: 10px !important; padding: 9px 12px !important; }
.admin-wrap input:focus, .admin-wrap select:focus, .admin-wrap textarea:focus { border-color: var(--c-olive) !important; box-shadow: 0 0 0 4px rgba(122, 154, 90, .22) !important; outline: none !important; }
.admin-header { border-bottom: 1px solid var(--c-line); padding-bottom: 18px; }
.admin-header h2 { font-size: clamp(1.7rem, 4vw, 2.4rem) !important; }
.admin-card h3 { font-size: 1.25rem !important; }
.admin-table th { font-family: var(--f-label); letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; color: var(--c-ink-3); }
