/* ==========================================================================
   Avarith Learn — app.css
   Style APP DEMO penuh (route #/demo, dirender demo.js):
   onboarding · generating · peta kebun spasial · node workspace (lesson +
   blurting marked-recall + tutor) · dashboard · lembah · visit + bottom nav.
   Semua pakai token tokens.css; animasi hormatin prefers-reduced-motion.
   ========================================================================== */

/* --- Kanvas demo --- */
.demo-root {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px) 24px 132px; /* bawah lega buat bottom nav */
  min-height: calc(100vh - var(--nav-h));
}
.demo-screen { animation: demo-in var(--dur) var(--ease) both; }

/* [hidden] harus menang lawan display dari class (flex/grid), kalau ga
   valley & bottom-nav bocor keliatan pas lagi di screen lain. */
#demo-root[hidden],
.demo-nav[hidden],
.valley--app[hidden] { display: none !important; }
@keyframes demo-in {
  from { opacity: 0; transform: translateY(var(--rise)); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   BOTTOM NAV — pill mengambang (Beranda · Peta · Node · Lembah)
   ========================================================================== */
.demo-nav {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}
.demo-nav button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 500 13px var(--font-body);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.demo-nav button span { font-size: 14px; line-height: 1; }
.demo-nav button:hover { color: var(--ink); }
.demo-nav button.is-on {
  background: rgba(96, 153, 102, 0.14);
  color: var(--accent);
}
@media (max-width: 520px) {
  .demo-nav button { padding: 9px 12px; font-size: 12px; }
}

/* ==========================================================================
   1 · ONBOARDING — search + chips
   ========================================================================== */
.onb {
  text-align: center;
  padding-top: clamp(40px, 12vh, 120px);
  max-width: 640px;
  margin-inline: auto;
}
.onb__title {
  font-family: var(--font-head);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 16px 0 14px;
}
.onb__sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 auto 32px;
}
.onb__searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-btn);
  padding: 6px 6px 6px 18px;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  transition: border-color 160ms var(--ease);
}
.onb__searchbar:focus-within { border-color: var(--accent); }
.onb__searchbar input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font: 400 16px var(--font-body);
  padding: 11px 0;
}
.onb__searchbar input::placeholder { color: var(--sage); }
.onb__searchbar .btn { flex: none; }
.onb__chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
.onb__chip {
  background: var(--card);
  border: 1px solid var(--hair);
  color: var(--muted);
  font: 500 14px var(--font-body);
  padding: 9px 15px;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: all 160ms var(--ease);
}
.onb__chip:hover { border-color: var(--sage); color: var(--ink); }
.onb__chip.is-on {
  background: rgba(96, 153, 102, 0.14);
  color: var(--accent);
  border-color: var(--sage);
}
.onb__note {
  margin-top: 26px;
  font-size: var(--tiny);
  color: var(--muted);
}

/* ==========================================================================
   1.5 · GENERATING — seedbed sprout
   ========================================================================== */
.gen { text-align: center; padding-top: clamp(64px, 18vh, 160px); }
.gen__seedbed {
  position: relative;
  width: 200px;
  height: 150px;
  margin: 0 auto 26px;
}
.gen__soil {
  position: absolute;
  left: 10%; right: 10%; bottom: 26px;
  height: 2px;
  background: var(--sage);
  opacity: 0.7;
}
.gen__sprout {
  position: absolute;
  bottom: 28px;
  width: 3px;
  background: var(--fill);
  border-radius: 3px;
  transform-origin: bottom center;
  animation: gen-grow 1.6s cubic-bezier(0.34, 1.4, 0.64, 1) infinite;
}
.gen__sprout::after {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  width: 11px; height: 7px;
  transform: translateX(-50%);
  border-radius: 0 60% 0 60%;
  background: var(--sage);
}
@keyframes gen-grow {
  0%   { height: 0; opacity: 0; }
  30%  { opacity: 1; }
  60%  { height: 34px; }
  100% { height: 34px; opacity: 0.9; }
}
.gen__title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}
.gen__title b { color: var(--accent); font-weight: 500; }
.gen__sub { color: var(--muted); font-size: 15px; height: 22px; transition: opacity 0.25s; }

/* ==========================================================================
   2 · PETA KEBUN — grove spasial (node = tanaman, prasyarat = akar)
   ========================================================================== */
.map__stage {
  background: linear-gradient(180deg, #EDF1D6 0%, #E7ECCB 62%, #DFE6BF 100%);
  border: 1px solid var(--hair);
  border-radius: 20px;
  overflow: hidden;
}
.map__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px 6px;
}
.map__title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 500;
  margin-top: 6px;
}
.map__sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 5px;
  max-width: 42ch;
  line-height: 1.5;
}
.map__stats { display: flex; gap: 22px; text-align: right; flex: none; }
.map__stat b { display: block; font: 600 20px var(--font-body); color: var(--ink); }
.map__stat span {
  font: 500 11px var(--font-body);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map__grove {
  position: relative;
  height: clamp(420px, 56vh, 560px);
  margin: 0 8px;
}
.map__roots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.map__roots path {
  fill: none;
  stroke: var(--sage);
  stroke-opacity: 0.5;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
}
.map__roots path.lit {
  stroke: var(--fill);
  stroke-opacity: 0.9;
  stroke-dasharray: none;
}
.map__legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 6px 32px 24px;
}
.map__lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 500 12px var(--font-body);
}
.map__lg i { width: 10px; height: 10px; border-radius: 50%; }

/* --- satu node tanaman di peta --- */
.gnode {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.gnode__core {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 10px rgba(63, 81, 59, 0.12));
  transition: transform 180ms var(--ease);
}
.gnode__bed {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--fill) calc(var(--m, 0) * 1%), rgba(157, 191, 138, 0.35) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
          mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
  opacity: 0.9;
}
.gnode__plant { position: absolute; inset: 0; }
.gnode__plant svg { width: 100%; height: 100%; display: block; }
.gnode__label {
  font: 500 13px var(--font-body);
  color: var(--ink);
  white-space: nowrap;
  text-align: center;
}
.gnode__label small {
  display: block;
  font: 500 11px var(--font-body);
  color: var(--muted);
  margin-top: 1px;
}

.gnode[data-state="locked"] { opacity: 0.6; cursor: default; }
.gnode[data-state="locked"] .gnode__core { width: 44px; height: 44px; filter: none; }
.gnode[data-state="locked"] .gnode__bed { opacity: 0; }
.gnode[data-state="available"] .gnode__core { width: 56px; height: 56px; }
.gnode[data-state="mastered"] .gnode__core { width: 76px; height: 76px; }
.gnode[data-state="mastered"] .gnode__core::after,
.gnode[data-state="learning"] .gnode__core::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 153, 102, 0.18), transparent 70%);
  z-index: -1;
}
.gnode:not([data-state="locked"]):not(.is-readonly):hover .gnode__core {
  transform: translateY(-2px) scale(1.03);
}
.gnode.is-readonly { cursor: default; }
.gnode:focus-visible { outline: 2px solid var(--fill); outline-offset: 4px; border-radius: 8px; }

/* germination reveal (sekali pas peta pertama tumbuh) */
.map__grove.is-igniting .map__roots path {
  stroke-dasharray: var(--len);
  animation: root-grow 520ms var(--ease) both;
  animation-delay: var(--d, 0ms);
}
@keyframes root-grow {
  from { stroke-dashoffset: var(--len); }
  to   { stroke-dashoffset: 0; }
}
.map__grove.is-igniting .gnode__core {
  animation: sprout-in 420ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: var(--sd, 0ms);
}
@keyframes sprout-in {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}
.map__grove.is-igniting .gnode__label {
  animation: demo-in 300ms var(--ease) both;
  animation-delay: var(--ld, 0ms);
}

@media (max-width: 720px) {
  .map__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .map__stats { text-align: left; }
  .gnode__label { font-size: 11px; }
  .gnode__label small { display: none; }
}

/* ==========================================================================
   3 · NODE WORKSPACE — lesson serif + blurting + tutor
   ========================================================================== */
.node { max-width: 720px; margin-inline: auto; }
.node__topbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  margin: -12px -12px 20px;
  padding: 0 12px;
  background: rgba(237, 241, 214, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.node__back {
  background: none;
  border: 0;
  color: var(--muted);
  font: 500 13px var(--font-body);
  cursor: pointer;
}
.node__back:hover { color: var(--ink); }
.node__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 13px var(--font-body);
  color: var(--ink);
}
.ring20 {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: conic-gradient(var(--fill) calc(var(--m, 0) * 1%), rgba(63, 81, 59, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 62%);
          mask: radial-gradient(farthest-side, transparent 60%, #000 62%);
}

/* lesson — artikel serif kayak bacaan, bukan kartu */
.node__lesson { padding-top: 8px; }
.node__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  margin: 8px 0 6px;
}
.node__dek {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}
.node__lesson p {
  font-family: var(--font-head);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 680px;
  margin-bottom: 20px;
}
.node__lesson h4 {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 500;
  margin: 26px 0 10px;
}
.node__rule { border: 0; border-top: 1px solid var(--hair); margin: 44px 0 40px; }

/* blurting */
.blurt__prompt {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}
.blurt__hint {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.blurt__input {
  display: block;
  width: 100%;
  min-height: 190px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  padding: 22px;
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color 160ms var(--ease);
}
.blurt__input:focus-visible { border-color: var(--accent); }
.blurt__input::placeholder { color: var(--sage); font-family: var(--font-body); font-size: 16px; }
.blurt__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.blurt__count { font-size: var(--tiny); color: var(--muted); }

/* hasil: marked recall */
.blurt__result { margin-top: 30px; }
.blurt__score {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 14px;
}
.blurt__score b { color: var(--accent); }
.blurt__recall {
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  padding: 20px 22px;
  white-space: pre-wrap;
}
.mk-ok { background: rgba(96, 153, 102, 0.16); border-radius: 4px; padding: 1px 3px; }
.mk-warn {
  border-bottom: 2px dotted #A98B2E;
  background: rgba(169, 139, 46, 0.14);
  padding: 1px 2px;
}
.blurt__legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font: 500 12px var(--font-body);
  color: var(--muted);
  flex-wrap: wrap;
}
.blurt__legend i { font-style: normal; }
.blurt__missed {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.blurt__missed b { color: var(--ink); font-weight: 600; }
.blurt__delta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font: 500 15px var(--font-body);
  color: var(--ink);
  flex-wrap: wrap;
}
.blurt__delta b { color: var(--accent); }
.blurt__bar {
  flex: 1;
  min-width: 140px;
  max-width: 240px;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(63, 81, 59, 0.12);
  overflow: hidden;
}
.blurt__bar > span {
  display: block;
  height: 100%;
  background: var(--fill);
  border-radius: var(--r-pill);
  transition: width 1.1s var(--ease);
}

/* reinforce */
.reinforce { margin-top: 48px; }
.reinforce h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}
.reinforce__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  background: none;
  border: 0;
  border-top: 1px solid var(--hair);
  font: 500 15px var(--font-body);
  color: var(--ink);
  text-align: left;
  cursor: not-allowed;
  opacity: 0.75;
}
.reinforce__row:last-of-type { border-bottom: 1px solid var(--hair); }
.reinforce__row span { color: var(--muted); font-weight: 500; font-size: 13px; }
.reinforce__next { margin-top: 32px; }

/* tutor */
.tutor-fab {
  position: fixed;
  bottom: 84px;
  right: 28px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--r-pill);
  color: var(--accent);
  font: 500 14px var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.tutor-fab:hover { background: rgba(96, 153, 102, 0.10); }
.tutor {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 88vw;
  z-index: 240;
  background: var(--page);
  border-left: 1px solid var(--hair);
  box-shadow: -8px 0 40px -12px rgba(63, 81, 59, 0.25);
  transform: translateX(100%);
  transition: transform 260ms var(--ease);
  display: flex;
  flex-direction: column;
}
.tutor.is-open { transform: none; }
.tutor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--hair);
}
.tutor__head b {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 17px;
}
.tutor__x {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.tutor__body {
  flex: 1;
  overflow: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tutor__bub {
  max-width: 84%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}
.tutor__bub--u { align-self: flex-end; background: var(--canvas); color: var(--ink); }
.tutor__bub--t {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--hair);
  color: var(--ink);
}
.tutor__bub--typing { color: var(--muted); letter-spacing: 2px; }
.tutor__foot { padding: 16px 22px; border-top: 1px solid var(--hair); }
.tutor__foot input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-btn);
  padding: 12px 14px;
  font: 400 15px var(--font-body);
  color: var(--ink);
  outline: none;
}
.tutor__foot input:focus-visible { border-color: var(--accent); }

/* ==========================================================================
   4 · DASHBOARD (Beranda) — 1 kolom tenang
   ========================================================================== */
.db {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 16px;
}
.db__loading { color: var(--muted); text-align: center; padding: 48px 0; }
.db__greet h2 {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 500;
}
.db__arch { font: 500 13px var(--font-body); color: var(--sage); }
.db__context { color: var(--muted); font-size: 16px; margin-top: 10px; line-height: 1.5; }
.db__context b { color: var(--ink); font-weight: 600; }

.db__node {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  margin: 6px 0 16px;
}
.db__mastery {
  height: 6px;
  background: rgba(63, 81, 59, 0.12);
  border-radius: var(--r-pill);
  max-width: 320px;
  overflow: hidden;
}
.db__mastery > span {
  display: block;
  height: 100%;
  background: var(--fill);
  border-radius: var(--r-pill);
}
.db__mmeta { color: var(--muted); font-size: 13px; margin: 12px 0 22px; }

.db__review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  flex-wrap: wrap;
}
.db__review p { font-size: 15px; }
.db__review b { font-weight: 600; }

.db__status { display: flex; flex-wrap: wrap; gap: 48px; }
.db__lbl {
  font: 600 12px var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.db__dots { display: flex; gap: 6px; }
.db__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(63, 81, 59, 0.22);
}
.db__dots i.is-f { background: var(--sage); }
.db__n { font: 500 14px var(--font-body); color: var(--ink); margin-top: 10px; }
.db__weak-row {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  font: 500 14px var(--font-body);
  color: var(--ink);
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
}
.db__weak-row:hover { color: var(--accent); }
.db__weak-row span:last-child { color: var(--muted); }
.db__wdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A98B2E;
  margin-right: 8px;
  vertical-align: middle;
}

.db__world h3 { font: 600 15px var(--font-body); margin-bottom: 18px; }
.db__friends { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 16px; }
.db__friend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.db__av {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}
.db__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--fill) calc(var(--m, 0) * 1%), rgba(63, 81, 59, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 72%, #000 74%);
          mask: radial-gradient(farthest-side, transparent 72%, #000 74%);
}
.db__face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--sage), var(--fill));
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 15px var(--font-body);
}
.db__fn { font: 500 13px var(--font-body); color: var(--ink); }
.db__fm { font: 500 12px var(--font-body); color: var(--muted); margin-top: -2px; }
.db__privacy { font: 500 12px var(--font-body); color: var(--muted); margin-top: 8px; }

/* ==========================================================================
   5b · VISIT — kebun temen read-only
   ========================================================================== */
.visit { max-width: 840px; margin-inline: auto; }
.visit__banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.visit__crest {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--sage), var(--fill));
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 20px var(--font-body);
  flex: none;
}
.visit__id b {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 22px;
  text-transform: capitalize;
}
.visit__id span { color: var(--muted); font: 500 13px var(--font-body); }
.visit__meta {
  display: flex;
  gap: 18px;
  margin-left: auto;
  text-align: right;
  font: 500 13px var(--font-body);
  color: var(--muted);
}
.visit__meta b { display: block; font: 600 16px var(--font-body); color: var(--ink); }
.visit__lush { margin: 26px 0 10px; }
.visit__lush p { font: 500 14px var(--font-body); margin-bottom: 8px; }
.visit__bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(157, 191, 138, 0.45);
  overflow: hidden;
}
.visit__bar > span {
  display: block;
  height: 100%;
  background: var(--fill);
  border-radius: var(--r-pill);
}
.visit__grove {
  background: linear-gradient(180deg, #EDF1D6 0%, #E7ECCB 62%, #DFE6BF 100%);
  border: 1px solid var(--hair);
  border-radius: 20px;
  margin: 8px 0 0;
}
.visit__foot {
  text-align: center;
  color: var(--muted);
  font: 500 12px var(--font-body);
  padding: 16px 0 4px;
}

/* --- Lembah (#valley-app) dapet ruang bawah biar ga ketutup nav --- */
.valley--app { padding-bottom: 120px; }

/* ==========================================================================
   BLURT-SHEET — ask utama in-demo (muncul tepat sesudah blurt)
   ========================================================================== */
.blurt-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.blurt-sheet[hidden] { display: none; }
.blurt-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(63, 81, 59, 0.35);
  animation: sheet-fade var(--dur) var(--ease) both;
}
.blurt-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: 0 12px 40px rgba(63, 81, 59, 0.22);
  padding: 32px 30px 26px;
  animation: sheet-rise var(--dur) var(--ease) both;
}
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.blurt-sheet__seed { width: 40px; height: 40px; margin-bottom: 16px; }
.blurt-sheet__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 18px;
}
.blurt-sheet__title b { color: var(--accent); }
.blurt-sheet__row { display: flex; gap: 10px; }
.blurt-sheet__input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--hair);
  border-radius: var(--r-btn);
  padding: 12px 14px;
}
.blurt-sheet__input:focus-visible { outline: none; border-color: var(--accent); }
.blurt-sheet__error { color: #b0503f; font-size: var(--small); margin-top: 10px; }
.blurt-sheet__later {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--small);
}
.blurt-sheet__later:hover { color: var(--ink); text-decoration: underline; }
.blurt-sheet__success { text-align: center; }
.blurt-sheet__success h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.blurt-sheet__success p { color: var(--muted); font-size: var(--small); }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .demo-screen,
  .gen__sprout,
  .map__grove.is-igniting .map__roots path,
  .map__grove.is-igniting .gnode__core,
  .map__grove.is-igniting .gnode__label,
  .blurt-sheet__overlay,
  .blurt-sheet__panel { animation: none; }
  .blurt__bar > span,
  .tutor { transition: none; }
}

/* --- Mobile kecil: node peta dirapetin biar ga tabrakan di layar sempit --- */
@media (max-width: 520px) {
  .map__head { padding: 20px 18px 4px; }
  .map__legend { padding: 6px 18px 20px; gap: 12px; }
  .map__grove { height: 420px; }
  .gnode__core { width: 48px; height: 48px; }
  .gnode[data-state="locked"] .gnode__core { width: 34px; height: 34px; }
  .gnode[data-state="available"] .gnode__core { width: 42px; height: 42px; }
  .gnode[data-state="mastered"] .gnode__core { width: 58px; height: 58px; }
  .gnode[data-state="mastered"] .gnode__core::after,
  .gnode[data-state="learning"] .gnode__core::after { width: 66px; height: 66px; }
  .tutor-fab { right: 14px; bottom: 84px; padding: 0 14px; }
  .node__topbar { margin-inline: 0; }
  .visit__meta { margin-left: 0; text-align: left; }
}
