/* Fit 'n Joy — design system
   Hijau tua (utama), hijau lime (aksen aksi di permukaan gelap), cream & beige (latar), kayu (detail kecil).
   Satu keluarga huruf: Inter (OFL), di-host sendiri. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --forest-900: #12301d;
  --forest-800: #183f27;
  --forest-700: #1f4f31;
  --forest-600: #2b6a42;
  --forest-100: #e3eee2;
  --lime-400: #c4e45a;
  --lime-300: #d6ef86;
  --lime-100: #f1f8d8;
  --paper: #f7f5ec;
  --beige: #ebe3d1;
  --beige-200: #f1ebdd;
  --wood: #9a6a42;
  --wood-100: #f3e7da;
  --ink: #1d2620;
  --ink-2: #4a564d;
  --ink-3: #6b766d;
  --line: #ddd6c4;
  --white: #ffffff;
  --danger: #a3341f;
  --danger-100: #fbe9e4;
  --info-100: #e7eef4;
  --info: #2c5577;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 0 rgba(18, 48, 29, .06), 0 8px 24px -12px rgba(18, 48, 29, .25);
  --gutter: 16px;
  --maxw: 1080px;
  --tap: 48px;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.5rem;
  --fs-2xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  --fs-hero: clamp(2.125rem, 1.3rem + 4vw, 3.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-md)/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "calt", "kern";
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--forest-600); text-underline-offset: 3px; }
a:hover { color: var(--forest-800); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; color: var(--forest-900); }
h1 { font-size: var(--fs-2xl); font-weight: 800; }
h2 { font-size: var(--fs-xl); font-weight: 800; }
h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.2em; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.num { font-variant-numeric: tabular-nums; }
.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; }

:focus-visible { outline: 3px solid var(--wood); outline-offset: 2px; border-radius: 4px; }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.ic-lg { width: 28px; height: 28px; }

/* ---------- Kerangka ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--forest-900); color: var(--white); padding: 10px 14px; border-radius: var(--r-sm); z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 640px; }

.site-head { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 236, .94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--forest-900); text-decoration: none; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--forest-700); display: grid; place-items: center; color: var(--lime-400); }
.brand-mark svg { width: 20px; height: 20px; }
.head-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.head-nav a.link { display: none; padding: 10px 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.head-nav a.link:hover, .head-nav a.link[aria-current="page"] { color: var(--forest-900); background: var(--beige-200); }
@media (min-width: 760px) { .head-nav a.link { display: inline-block; } }

main { display: block; padding-bottom: 48px; }
.has-tabbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.site-foot { border-top: 1px solid var(--line); background: var(--beige-200); padding: 28px 0 36px; color: var(--ink-2); font-size: var(--fs-sm); }
.site-foot .wrap { display: grid; gap: 12px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-foot a { color: var(--ink-2); }
.has-tabbar .site-foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

/* Navigasi bawah member (mobile); di layar lebar jadi bilah atas */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; min-height: 60px; color: var(--ink-3); text-decoration: none; font-size: .75rem; font-weight: 600; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--forest-700); }
.tabbar a[aria-current="page"] .ic { stroke-width: 2.4; }
@media (min-width: 760px) {
  .tabbar { display: none; }
  .has-tabbar main { padding-bottom: 48px; }
  .has-tabbar .site-foot { padding-bottom: 36px; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: var(--fs-md); line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--forest-700); color: var(--white); }
.btn-primary:hover { background: var(--forest-900); color: var(--white); }
.btn-lime { background: var(--lime-400); color: var(--forest-900); }
.btn-lime:hover { background: var(--lime-300); color: var(--forest-900); }
.btn-ghost { background: transparent; color: var(--forest-800); border-color: var(--forest-700); }
.btn-ghost:hover { background: var(--forest-100); color: var(--forest-900); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-text { background: none; border: 0; padding: 10px 4px; color: var(--forest-600); text-decoration: underline; min-height: 44px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: var(--fs-sm); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Formulir ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin: 0; }
.input {
  width: 100%; min-height: var(--tap); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink); font: inherit;
}
.input:focus { border-color: var(--forest-600); outline: 3px solid rgba(43, 106, 66, .2); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: var(--fs-sm); font-weight: 600; margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--ink-3); cursor: pointer; border-radius: var(--r-sm); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--forest-700); flex: none; }

/* Pilihan besar (radio/checkbox sebagai kartu) */
.choices { display: grid; gap: 10px; border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: var(--fs-md); color: var(--forest-900); }
.choices.grid-2 { grid-template-columns: 1fr 1fr; }
.choices.grid-5 { grid-template-columns: repeat(5, 1fr); }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-body {
  display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 14px 16px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .12s, background-color .12s;
}
.choice-body .t { font-weight: 700; display: block; }
.choice-body .d { font-size: var(--fs-sm); color: var(--ink-3); display: block; margin-top: 2px; }
.choice-body .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; }
.choice-body .tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.choice .badge-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--beige-200); color: var(--forest-700); display: grid; place-items: center; flex: none; }
.choice input:checked + .choice-body { border-color: var(--forest-700); background: var(--forest-100); }
.choice input:checked + .choice-body .tick { background: var(--forest-700); border-color: var(--forest-700); color: var(--white); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--wood); outline-offset: 2px; }
.choice-num .choice-body { justify-content: center; text-align: center; padding: 12px 6px; min-height: 64px; flex-direction: column; gap: 0; }
.choice-num .choice-body .t { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.choice-num .choice-body .d { margin: 0; }

/* ---------- Pesan & badge ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); margin: 16px 0; font-size: var(--fs-sm); }
.alert p { margin: 0; }
.alert-sukses { background: var(--forest-100); color: var(--forest-900); }
.alert-info { background: var(--info-100); color: var(--info); }
.alert-galat { background: var(--danger-100); color: var(--danger); }
.alert-simulasi { background: var(--wood-100); color: #5d3b1f; border: 1.5px dashed var(--wood); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--forest-100); color: var(--forest-800); }
.badge-dev { background: var(--wood-100); color: #6b4423; }
.badge-rec { background: var(--lime-400); color: var(--forest-900); }

/* ---------- Kartu & permukaan ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-dark { background: var(--forest-800); color: var(--paper); border: 0; }
.panel-dark h2, .panel-dark h3 { color: var(--white); }
.panel-dark .muted { color: #b7c9b9; }
.stack > * + * { margin-top: 16px; }
.section { padding: 40px 0; }
.section-tight { padding: 24px 0; }
.page-head { padding: 28px 0 8px; }
.page-head p { color: var(--ink-2); }

/* ---------- Landing ---------- */
.hero { background: var(--forest-800); color: var(--paper); padding: 36px 0 40px; position: relative; overflow: hidden; }
.hero::after { /* serat kayu tipis sebagai aksen alas */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--wood) 0 38px, #8a5d39 38px 41px, #a8774d 41px 90px, #8f6038 90px 92px);
  opacity: .9;
}
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero h1 { color: var(--white); font-size: var(--fs-hero); letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 16px; max-width: 14ch; }
.hero .lede { font-size: var(--fs-lg); color: #d7e3d6; max-width: 40ch; }
.hero .tag { color: var(--lime-400); font-weight: 700; margin-bottom: 14px; display: block; }
@media (min-width: 900px) { .hero { padding: 64px 0 72px; } .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; } }

/* Strip minggu: elemen khas Fit 'n Joy */
.week { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.week-head strong { color: var(--forest-900); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0; }
.day { border-radius: 12px; padding: 8px 2px 10px; text-align: center; background: var(--beige-200); min-height: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.day .dn { font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.day .dk { font-size: .6875rem; line-height: 1.15; color: var(--ink-2); font-weight: 600; word-break: break-word; }
.day .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink-3); }
.day .dot .ic { width: 16px; height: 16px; }
.day-latihan { background: var(--forest-700); }
.day-latihan .dn, .day-latihan .dk { color: var(--white); }
.day-latihan .dot { background: var(--lime-400); color: var(--forest-900); }
.day-pemulihan { background: var(--lime-100); }
.day-pemulihan .dot { background: var(--white); color: var(--forest-700); }
.day-today { outline: 2.5px solid var(--wood); outline-offset: 2px; }
.week-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: var(--fs-xs); color: var(--ink-3); }
.week-legend span { display: inline-flex; align-items: center; gap: 6px; }
.week-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-latihan { background: var(--forest-700); }
.lg-pemulihan { background: var(--lime-100); box-shadow: inset 0 0 0 1px var(--lime-400); }
.lg-istirahat { background: var(--beige); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; align-content: start; counter-increment: s; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--forest-700); color: var(--lime-400); display: grid; place-items: center; font-weight: 800; font-size: 1.125rem; }
.steps h3 { margin: 8px 0 4px; }
.steps p { margin: 0; color: var(--ink-2); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } .steps li { grid-template-columns: 1fr; } }

.eco { display: grid; gap: 12px; }
.eco-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-md); background: var(--beige-200); }
.eco-item .badge-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--white); color: var(--wood); display: grid; place-items: center; flex: none; }
.eco-item h3 { margin: 0 0 4px; font-size: var(--fs-md); }
.eco-item p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
@media (min-width: 760px) { .eco { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Paket ---------- */
.seg { display: inline-flex; padding: 4px; background: var(--beige); border-radius: 999px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg a { padding: 9px 12px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.seg a[aria-current="true"] { background: var(--white); color: var(--forest-900); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.plans { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.plan { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.plan-rec { border-color: var(--forest-700); box-shadow: 0 0 0 3px var(--lime-400); }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan h3, .plan .h3 { font-size: 1.375rem; margin: 0; }
.plan .focus { color: var(--ink-2); font-size: var(--fs-sm); margin: 2px 0 0; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--forest-900); font-variant-numeric: tabular-nums; line-height: 1; }
.price small { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.price-note { font-size: var(--fs-sm); color: var(--ink-2); margin: 6px 0 0; }
.price-note b { color: var(--forest-700); }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: var(--fs-sm); }
.feat li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.feat li .ic { width: 18px; height: 18px; margin-top: 1px; }
.feat .yes .ic { color: var(--forest-600); }
.feat .no { color: var(--ink-3); }
.feat .no .ic { color: #b9b29f; }
.feat .badge { margin-left: 4px; }

/* ---------- Onboarding ---------- */
.onb-head { padding: 14px 0 10px; }
.onb-top { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.onb-top .back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--forest-800); }
.onb-top .back:hover { background: var(--beige-200); }
.onb-top .count { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.progress span { height: 6px; border-radius: 3px; background: var(--beige); }
.progress span.on { background: var(--forest-700); }
.progress span.now { background: var(--lime-400); }
.onb-body h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); margin-top: 8px; }
.onb-body .why { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); background: var(--beige-200); border-radius: var(--r-md); padding: 10px 12px; margin: 0 0 18px; }
.onb-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 75%, rgba(247,245,236,0)); padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
@media (min-width: 640px) { .onb-actions { grid-template-columns: 1fr auto; position: static; background: none; } .onb-actions .btn-text { order: -1; justify-self: start; } }

/* ---------- Program ---------- */
.reason-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.reason-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: var(--fs-sm); color: var(--ink-2); }
.reason-list .ic { color: var(--forest-600); width: 20px; height: 20px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.summary-grid div { background: var(--beige-200); border-radius: var(--r-md); padding: 10px 12px; min-width: 0; }
.summary-grid dt { font-size: var(--fs-xs); color: var(--ink-3); }
.summary-grid dd { margin: 2px 0 0; font-weight: 700; color: var(--forest-900); overflow-wrap: anywhere; }
@media (min-width: 760px) { .summary-grid { grid-template-columns: repeat(4, 1fr); } }

.session { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.session + .session { margin-top: 12px; }
.session > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 52px 1fr 24px; gap: 12px; align-items: center; padding: 14px 16px; min-height: 64px; }
.session > summary::-webkit-details-marker { display: none; }
.session > summary .wd { width: 52px; height: 52px; border-radius: 14px; background: var(--forest-700); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); }
.session.pemulihan > summary .wd { background: var(--lime-100); color: var(--forest-800); }
.session > summary .ttl { font-weight: 700; color: var(--forest-900); display: block; }
.session > summary .meta { font-size: var(--fs-sm); color: var(--ink-3); display: block; }
.session > summary .chev { transition: transform .15s; color: var(--ink-3); }
.session[open] > summary .chev { transform: rotate(90deg); }
.session-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.session-body h4 { font-size: var(--fs-sm); margin: 14px 0 6px; color: var(--ink-2); }
.session-body ul.warm { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.ex-list { list-style: none; padding: 0; margin: 0; counter-reset: ex; }
.ex { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); counter-increment: ex; }
.ex:last-child { border-bottom: 0; }
.ex::before { content: counter(ex); width: 28px; height: 28px; border-radius: 8px; background: var(--beige-200); color: var(--forest-800); font-weight: 800; font-size: var(--fs-sm); display: grid; place-items: center; }
.ex .name { font-weight: 700; display: block; }
.ex .musc { font-size: var(--fs-xs); color: var(--ink-3); display: block; margin-top: 2px; }
.ex .dose { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ex .dose span { background: var(--forest-100); color: var(--forest-900); border-radius: 6px; padding: 2px 8px; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.finisher { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--lime-100); font-size: var(--fs-sm); color: var(--forest-900); display: flex; gap: 8px; }

.rec { border-radius: var(--r-lg); padding: 20px; background: var(--forest-800); color: var(--paper); }
.rec h2 { color: var(--white); }
.rec .reason-list li { color: #d7e3d6; }
.rec .reason-list .ic { color: var(--lime-400); }
.rec .caveat { background: rgba(255,255,255,.08); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-sm); color: #e9efe6; margin-top: 12px; display: flex; gap: 8px; }
.rec .caveat p { margin: 0; }

/* ---------- Beranda member ---------- */
.greet { padding: 24px 0 4px; }
.greet h1 { margin-bottom: 4px; }
.next-card { display: grid; gap: 14px; }
.next-card .when { font-weight: 700; color: var(--lime-400); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 28px 16px; }
.empty .ic-lg { color: var(--forest-600); margin-bottom: 8px; }
.empty p { margin-left: auto; margin-right: auto; }

.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.auth-card { max-width: 440px; margin: 28px auto 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.prose h2 { margin-top: 1.6em; font-size: var(--fs-lg); }
.prose li { margin-bottom: .4em; }

.err-page { text-align: center; padding: 56px 0; }
.err-page .code { font-size: 4rem; font-weight: 800; color: var(--beige); line-height: 1; letter-spacing: -0.04em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.session-body > p:first-child { margin-top: 12px; }
.mt { margin-top: 16px; }
.err-page .btn-row, .empty .btn-row { justify-content: center; } .err-page p { margin-left: auto; margin-right: auto; }

/* ---------- Fase 2: ilustrasi otot ---------- */
.mm { margin: 0; }
.mm svg { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto; }
.mm-body > * { fill: var(--beige); }
.mm-r { fill: #ddd3bd; stroke: var(--paper); stroke-width: 1; }
.mm-p { fill: var(--forest-600); }
.mm-s { fill: #c99a6e; }
.mm-t { font-size: 9px; fill: var(--ink-3); font-weight: 600; }
.mm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: var(--fs-xs); margin-top: 8px; }
.mm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-p { background: var(--forest-600); }
.lg-s { background: #c99a6e; }

/* ---------- Fase 2: pustaka ---------- */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 8px 0 16px; }
.filters .field { margin: 0; }
.filters .q { grid-column: 1 / -1; }
.filters .act { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (min-width: 900px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; align-items: end; } .filters .q { grid-column: auto; } .filters .act { grid-column: auto; } }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.ex-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .ex-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .ex-grid { grid-template-columns: 1fr 1fr 1fr; } }
.ex-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); min-height: 88px; }
.ex-card:hover { border-color: var(--forest-600); color: var(--ink); }
.ex-card .n { font-weight: 700; color: var(--forest-900); }
.ex-card .m { font-size: var(--fs-sm); color: var(--ink-3); grid-column: 1 / -1; }
.ex-card .tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--beige-200); color: var(--ink-2); }
.tag-ok { background: var(--forest-100); color: var(--forest-800); }
.tag-no { background: var(--wood-100); color: #6b4423; }
.media-ph { border: 1.5px dashed var(--line); border-radius: var(--r-md); padding: 16px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); background: var(--beige-200); }
.media-ph .ic { width: 28px; height: 28px; color: var(--ink-3); display: block; margin: 0 auto 6px; }
ol.steps-text { padding-left: 1.3em; margin: 0; }
ol.steps-text li { margin-bottom: 8px; }
.variants { display: grid; gap: 10px; }
@media (min-width: 640px) { .variants { grid-template-columns: 1fr 1fr; } }
.variant { display: block; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); }
.variant .k { font-size: var(--fs-xs); color: var(--ink-3); display: block; }
.variant .v { font-weight: 700; color: var(--forest-800); }
.crumbs { font-size: var(--fs-sm); margin: 16px 0 0; }

/* ---------- Fase 2: edit program ---------- */
.ex-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: var(--fs-sm); }
.ex-actions a { font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.edited { font-size: var(--fs-xs); color: var(--wood); font-weight: 700; }
.day-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.day-actions form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-actions select.input { min-height: 40px; padding-top: 6px; padding-bottom: 6px; width: auto; }
.alt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alt { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.alt .n { font-weight: 700; }
.alt ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.alt form { margin: 0; }
@media (max-width: 420px) { .alt { grid-template-columns: 1fr; } .alt .btn { width: 100%; } }
.dose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.dose-grid .field { margin-bottom: 8px; }
.red-flags { background: var(--danger-100); color: var(--danger); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); }
.red-flags ul { margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.chip[aria-current="true"] { border-color: var(--forest-700); background: var(--forest-100); color: var(--forest-900); }
.change-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.change-list li { padding: 12px 14px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); font-size: var(--fs-sm); }
.change-list .arrow { color: var(--ink-3); margin: 0 4px; }

/* ---------- Fase 3: workout player ---------- */
.player-body { background: var(--forest-900); color: var(--paper); }
.player-body main { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.player-head { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; background: var(--forest-900); border-bottom: 1px solid rgba(255,255,255,.08); }
.player-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--paper); }
.player-close:hover { background: rgba(255,255,255,.08); color: var(--white); }
.player-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync { font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.sync-ok { background: rgba(196,228,90,.18); color: var(--lime-300); }
.sync-wait { background: var(--wood-100); color: #5d3b1f; }
.player-app { max-width: 560px; margin: 0 auto; padding: 12px var(--gutter) 0; }
.p-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 4px 0 14px; }
.p-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.p-fill { display: block; height: 100%; width: 0; background: var(--lime-400); transition: width .2s; }
.p-count { font-size: var(--fs-xs); color: #b7c9b9; font-variant-numeric: tabular-nums; }
.p-card { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 20px 18px; }
.p-card h1 { font-size: 1.5rem; outline: none; }
.p-meta { font-size: var(--fs-sm); color: var(--ink-3); margin: 0 0 4px; font-weight: 600; }
.p-name { margin-bottom: 4px; }
.p-target { font-size: var(--fs-sm); color: var(--ink-2); }
.p-done { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.p-setpill { font: inherit; font-size: var(--fs-xs); font-weight: 700; min-height: 36px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; }
.p-done li.done .p-setpill { background: var(--forest-100); border-color: var(--forest-100); color: var(--forest-900); }
.p-done li.now .p-setpill { border-color: var(--forest-700); color: var(--forest-900); }
.p-inputs { display: grid; gap: 12px; }
@media (min-width: 420px) { .p-inputs { grid-template-columns: 1fr 1fr; } }
.p-field label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; }
.p-step { display: grid; grid-template-columns: 52px 1fr auto 52px; gap: 6px; align-items: center; }
.p-step .p-suffix { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.p-btn { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); font-size: 1.5rem; font-weight: 700; color: var(--forest-800); cursor: pointer; }
.p-btn:active { background: var(--forest-100); }
.p-num { text-align: center; font-size: 1.5rem; font-weight: 800; min-height: 52px; font-variant-numeric: tabular-nums; padding: 8px 4px; }
.p-more { margin: 14px 0 0; }
.p-more summary { cursor: pointer; font-weight: 600; color: var(--forest-600); min-height: 44px; display: flex; align-items: center; }
.p-more .input { margin-bottom: 4px; }
.p-rpe { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.p-rpe .chip { min-width: 48px; justify-content: center; cursor: pointer; font: inherit; font-weight: 700; }
.p-rpe .chip.on { background: var(--forest-700); color: var(--white); border-color: var(--forest-700); }
.p-main { margin-top: 18px; min-height: 60px; font-size: 1.125rem; }
.p-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.p-row.center { justify-content: center; }
.p-row form { margin: 0; }
.p-rest { background: var(--forest-800); color: var(--paper); text-align: center; padding: 28px 18px; }
.p-rest .p-rest-t { color: var(--lime-400); font-size: 1.125rem; }
.p-timer { font-size: clamp(4.5rem, 22vw, 7rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 12px auto 20px; color: var(--white); font-variant-numeric: tabular-nums; max-width: none; }
.p-next { color: #b7c9b9; font-size: var(--fs-sm); margin: 18px auto 0; }
.p-warm { padding-left: 1.2em; }
.p-warm li { margin-bottom: 8px; }
.p-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.p-listbtn { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 56px; padding: 10px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--white); font: inherit; text-align: left; cursor: pointer; }
.p-listbtn .n { font-weight: 700; }
.p-listbtn .c { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; }
.p-listbtn.done { background: var(--forest-100); border-color: var(--forest-100); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); box-shadow: var(--shadow); }
.player-fallback { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding-top: 4px; padding-bottom: 16px; margin-top: 12px; }
.set-form { display: grid; grid-template-columns: 64px 1fr 1fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.set-form .set-label { font-size: var(--fs-sm); font-weight: 700; }
.set-form .input { min-height: 44px; padding: 8px 10px; }
@media (max-width: 380px) { .set-form { grid-template-columns: 56px 1fr 1fr; } .set-form .btn { grid-column: 1 / -1; } }

/* Riwayat */
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hist a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.hist a:hover { border-color: var(--forest-600); color: var(--ink); }
.hist .t { font-weight: 700; color: var(--forest-900); }
.hist .d { font-size: var(--fs-sm); color: var(--ink-3); }
.hist .s { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.set-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.set-table th, .set-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.set-table th { color: var(--ink-3); font-weight: 600; font-size: var(--fs-xs); }
.pager { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; }
.h3 { font-size: var(--fs-lg); }

/* ---------- Admin & 2FA ---------- */
.admin-head { background: var(--forest-900); color: var(--paper); position: sticky; top: 0; z-index: 20; }
.admin-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.brand-light { color: var(--white); }
.brand-light:hover { color: var(--lime-300); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px; order: 3; width: 100%; }
.admin-nav a { color: #cfdccf; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); padding: 10px 12px; border-radius: var(--r-sm); min-height: 44px; display: inline-flex; align-items: center; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { background: rgba(255,255,255,.08); color: var(--white); }
.admin-out { margin-left: auto; }
@media (min-width: 760px) { .admin-nav { order: 0; width: auto; } }
.qr-box { background: var(--white); border-radius: var(--r-md); padding: 12px; max-width: 260px; margin: 12px auto; border: 1px solid var(--line); }
.qr-box svg { display: block; width: 100%; height: auto; }
.input.otp { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
code, .secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; background: var(--beige-200); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding-left: 1.6em; margin: 0; font-size: 1.05rem; }
.codes code { font-size: 1rem; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.log-table td, .log-table th { white-space: nowrap; padding: 10px 12px; }
html { background: var(--paper); }
.player-body { min-height: 100vh; }
html:has(.player-body) { background: var(--forest-900); }
.dose-grid.stepup { grid-template-columns: 1fr; }
@media (min-width: 560px) { .dose-grid.stepup { grid-template-columns: 1fr 1fr; align-items: end; } }
.codes li { white-space: nowrap; }
@media (max-width: 400px) { .codes { grid-template-columns: 1fr; } }
