@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito+Sans:opsz,wght@6..12,500;6..12,600;6..12,700;6..12,800&family=Schoolbell&display=swap");

:root {
  --cream: #fff8ee;
  --paper: #fffdf9;
  --ink: #183247;
  --ink-soft: #566d7a;
  --blue: #5d8df7;
  --blue-soft: #eaf0ff;
  --mint: #74d6a2;
  --mint-soft: #e8faef;
  --mango: #ffc85a;
  --mango-soft: #fff4c9;
  --coral: #ff8e74;
  --pink: #f6a2bd;
  --pink-soft: #ffeaf1;
  --lilac: #aa95ef;
  --lilac-soft: #f1edff;
  --aqua: #70cfca;
  --line: #d9e2df;
  --line-ink: rgba(24, 50, 71, 0.14);
  --shadow: 0 18px 48px rgba(24, 50, 71, 0.10);
  --soft-shadow: 0 10px 28px rgba(24, 50, 71, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--cream); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(255, 200, 90, .18), transparent 18rem),
    radial-gradient(circle at 92% 12%, rgba(112, 207, 202, .16), transparent 20rem),
    var(--cream);
  font-family: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, a { font: inherit; }
button { color: inherit; }
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 1000;
  background: var(--ink); color: white; padding: .7rem 1rem; border-radius: 12px;
}
.skip-link:focus { top: 1rem; }
.ambient {
  position: fixed; pointer-events: none; z-index: -1; filter: blur(1px); opacity: .75;
  border: 2px dashed rgba(24, 50, 71, .08);
}
.ambient-one { width: 230px; height: 230px; border-radius: 47% 53% 61% 39%; right: -90px; top: 34vh; transform: rotate(22deg); }
.ambient-two { width: 160px; height: 160px; border-radius: 55% 45% 39% 61%; left: -60px; bottom: 5vh; transform: rotate(-18deg); }

.lab-header {
  position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1rem; padding: 16px clamp(18px, 3vw, 42px);
  background: rgba(255, 248, 238, .86); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(24, 50, 71, .08);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 150px; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-family: "Fredoka", sans-serif; font-size: 20px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.brand-mark { position: relative; display: inline-block; width: 34px; height: 34px; transform: rotate(-10deg); }
.brand-mark-dot { position: absolute; width: 22px; height: 22px; border: 4px solid var(--ink); border-radius: 50%; left: 0; top: 0; background: var(--mango); }
.brand-mark-stem { position: absolute; width: 20px; height: 7px; background: var(--ink); border-radius: 99px; left: 16px; top: 16px; }
.brand-mark-stem::after { content: ""; position: absolute; width: 7px; height: 10px; background: var(--ink); right: 2px; top: 4px; border-radius: 0 0 3px 3px; }

.direction-switcher { display: flex; justify-content: center; gap: 7px; }
.direction-button {
  border: 1px solid transparent; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 9px 13px; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.direction-button span { opacity: .55; margin-right: 5px; font-size: 10px; }
.direction-button:hover { transform: translateY(-1px); background: rgba(255,255,255,.65); color: var(--ink); }
.direction-button.is-active { background: white; color: var(--ink); border-color: var(--line-ink); box-shadow: 0 5px 14px rgba(24,50,71,.06); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; justify-self: end; font-size: 11px; font-weight: 800; color: var(--ink-soft); padding: 8px 11px; border: 1px solid var(--line-ink); background: rgba(255,255,255,.7); border-radius: 999px; }
.live-dot { width: 8px; height: 8px; background: var(--mint); border: 2px solid white; box-shadow: 0 0 0 1px rgba(24,50,71,.13); border-radius: 50%; }

.page-shell { width: min(1180px, calc(100% - 34px)); margin: 0 auto; padding: clamp(28px, 5vw, 64px) 0 100px; }
.direction-view { display: none; animation: rise .38s cubic-bezier(.2,.75,.25,1) both; }
.direction-view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.hand-note { margin: 0 0 9px; font-family: "Schoolbell", cursive; color: #3c7b67; font-size: clamp(20px, 2.2vw, 28px); transform: rotate(-1deg); }
.eyebrow, .mini-label { font-size: 10px; letter-spacing: .12em; font-weight: 900; color: var(--ink-soft); }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { font-family: "Fredoka", sans-serif; letter-spacing: -.025em; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: .98; margin-bottom: 22px; }
h2 { font-size: clamp(25px, 3vw, 36px); line-height: 1.06; }
p { line-height: 1.55; }

.garden-hero { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr); gap: clamp(28px, 6vw, 78px); align-items: center; }
.hello-row { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.hello-row h1 { margin: 3px 0 0; font-size: clamp(42px, 5.8vw, 68px); max-width: 760px; }
.hero-body { max-width: 650px; font-size: 18px; color: var(--ink-soft); font-weight: 650; }
.kid-avatar { width: 56px; height: 56px; border-radius: 45% 55% 52% 48%; background: #ffdda0; border: 3px solid var(--ink); display: grid; place-items: center; position: relative; transform: rotate(-3deg); box-shadow: 4px 4px 0 rgba(24,50,71,.12); }
.kid-avatar .hair { position: absolute; width: 34px; height: 18px; background: var(--ink); top: -4px; border-radius: 70% 40% 48% 30%; transform: rotate(-4deg); }
.kid-avatar .face { font-family: "Fredoka"; font-weight: 700; margin-top: 5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.primary-action, .soft-action {
  border: 0; border-radius: 16px; min-height: 50px; padding: 0 18px; font-weight: 900; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.primary-action { background: var(--ink); color: white; box-shadow: 0 7px 0 rgba(24,50,71,.16); }
.primary-action span { margin-left: 10px; }
.soft-action { background: white; border: 1px solid var(--line-ink); }
.primary-action:hover, .soft-action:hover { transform: translateY(-2px); }

.key-card-wrap { position: relative; min-height: 520px; display: grid; place-items: center; }
.key-card {
  position: relative; width: min(100%, 430px); min-height: 465px; overflow: hidden;
  border: 2px solid rgba(24,50,71,.8); border-radius: 42px 32px 48px 30px;
  padding: 28px; background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.8), transparent 8rem),
    linear-gradient(145deg, #ffe5a8, #ffdfe8 58%, #dceaff);
  box-shadow: 14px 16px 0 rgba(24,50,71,.10), var(--shadow);
  transform: rotate(1.4deg);
}
.key-card::after { content:""; position:absolute; width:130px; height:130px; border:2px dashed rgba(24,50,71,.18); border-radius:50%; right:-46px; bottom:80px; }
.key-card-top { display:flex; align-items:center; justify-content:space-between; }
.key-status { display:inline-flex; gap:7px; align-items:center; font-size:12px; font-weight:900; background:rgba(255,255,255,.75); padding:8px 10px; border-radius:999px; }
.key-status i { width:8px; height:8px; border-radius:50%; background:#2fc37e; }
.key-shape { position:relative; height:180px; margin:28px 0 10px; }
.key-ring { position:absolute; left:10px; top:12px; width:145px; height:145px; border:18px solid var(--ink); border-radius:50%; background:rgba(255,255,255,.42); display:grid; place-content:center; text-align:center; }
.key-ring span { font-family:"Fredoka"; font-size:28px; font-weight:700; }
.key-ring small { font-size:10px; text-transform:uppercase; letter-spacing:.08em; font-weight:900; }
.key-stem { position:absolute; left:142px; top:77px; width:165px; height:28px; border-radius:999px; background:var(--ink); transform:rotate(-3deg); transform-origin:left center; }
.key-tooth { position:absolute; background:var(--ink); width:22px; height:45px; border-radius:0 0 8px 8px; transform:rotate(-3deg); }
.key-tooth.one { left:257px; top:87px; }
.key-tooth.two { left:284px; top:82px; height:35px; }
.key-rules { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.key-rules > div { background:rgba(255,255,255,.62); border:1px solid rgba(24,50,71,.08); border-radius:15px; padding:12px; }
.key-rules span { display:block; font-size:10px; font-weight:800; color:var(--ink-soft); }
.key-rules strong { display:block; margin-top:4px; font-family:"Fredoka"; font-size:16px; }
.key-caption { margin:15px 2px 0; font-size:12px; font-weight:800; color:var(--ink-soft); }
.doodle-arrow { position:absolute; right:-5px; bottom:18px; font-family:"Schoolbell"; font-size:42px; transform:rotate(18deg); }
.doodle-label { position:absolute; right:-44px; bottom:-10px; font-family:"Schoolbell"; color:#3c7b67; font-size:18px; transform:rotate(5deg); }

.garden-grid { margin-top:42px; display:grid; grid-template-columns:1.2fr .9fr .9fr; gap:16px; }
.paper-card { min-height:280px; border:1px solid var(--line-ink); border-radius:28px 24px 30px 22px; background:var(--paper); padding:24px; box-shadow:var(--soft-shadow); }
.paper-card-head { display:flex; align-items:center; gap:9px; margin-bottom:20px; }
.round-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; font-weight:900; border:1.5px solid var(--ink); }
.sun-icon { background:var(--mango-soft); transform:rotate(-5deg); }
.leaf-icon { background:var(--mint-soft); transform:rotate(5deg); }
.mission-card { background:linear-gradient(150deg,#fffdf9,#fff8df); }
.mission-card h2 { max-width:500px; margin-bottom:10px; }
.mission-card > p { color:var(--ink-soft); font-weight:650; }
.mission-progress { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; margin:22px 0 16px; }
.mission-progress > div { height:10px; background:#efe9da; border-radius:999px; overflow:hidden; }
.mission-progress > div span { display:block; width:66%; height:100%; background:linear-gradient(90deg,var(--mango),var(--coral)); border-radius:inherit; }
.mission-progress strong { font-size:12px; }
.text-action { border:0; background:transparent; padding:0; color:#2f6d5c; font-weight:900; cursor:pointer; }
.family-pulse { background:linear-gradient(160deg,#fffdf9,#f3f8ff); }
.avatar-stack { display:flex; padding-left:6px; }
.avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; border:2px solid white; margin-left:-7px; font-family:"Fredoka"; font-weight:700; box-shadow:0 0 0 1px rgba(24,50,71,.1); }
.avatar.alex { background:#ffd58f; }
.avatar.sam { background:#b6d4ff; }
.family-pulse blockquote { margin:18px 0 10px; font-family:"Fredoka"; font-size:20px; line-height:1.3; }
.family-pulse > p { color:var(--ink-soft); font-weight:800; font-size:12px; }
.promise-chip { display:inline-block; margin-top:18px; background:var(--lilac-soft); color:#6351a4; padding:7px 10px; border-radius:999px; font-size:10px; font-weight:900; }
.week-card { background:linear-gradient(160deg,#f8fffb,#effcf7); }
.week-number { display:flex; align-items:baseline; gap:7px; }
.week-number strong { font-family:"Fredoka"; font-size:54px; line-height:1; }
.week-number span { color:var(--ink-soft); font-weight:800; font-size:12px; }
.week-bars { height:76px; display:flex; align-items:end; gap:6px; margin:20px 0 12px; }
.week-bars span { flex:1; min-width:7px; background:var(--mint); border-radius:999px 999px 5px 5px; }
.week-foot { margin-bottom:0; font-size:11px; color:var(--ink-soft); }

.family-strip { margin-top:20px; min-height:210px; border:2px solid rgba(24,50,71,.75); border-radius:34px 44px 28px 40px; background:#e7f7f2; padding:30px; display:grid; grid-template-columns:1fr 1fr 260px; align-items:center; gap:30px; overflow:hidden; position:relative; }
.family-strip h2 { margin-bottom:0; }
.family-strip > p { color:var(--ink-soft); font-weight:650; }
.family-strip-art { position:relative; height:140px; }
.bubble { position:absolute; display:grid; place-items:center; width:78px; height:78px; border-radius:45% 55% 52% 48%; border:2px solid var(--ink); background:white; font-family:"Schoolbell"; font-size:19px; }
.b1 { left:0; top:26px; background:#fff2bd; transform:rotate(-7deg); }
.b2 { left:70px; top:2px; background:#ffe2ec; transform:rotate(5deg); }
.b3 { left:136px; top:54px; background:#e1e9ff; transform:rotate(-2deg); }

.playground-intro, .family-hero { display:grid; grid-template-columns:1.25fr .75fr; gap:clamp(25px,6vw,80px); align-items:center; }
.playground-intro > div:first-child > p:last-child, .family-hero > div:first-child > p:last-child { max-width:720px; color:var(--ink-soft); font-weight:650; font-size:17px; }
.compass-card { width:min(100%,360px); aspect-ratio:1; margin-left:auto; border:2px solid rgba(24,50,71,.75); border-radius:48% 52% 44% 56%; background:linear-gradient(145deg,#f5edff,#e8f9f2); position:relative; box-shadow:12px 14px 0 rgba(24,50,71,.09); transform:rotate(2deg); }
.compass-core { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:130px; height:130px; border-radius:50%; background:var(--ink); color:white; display:grid; place-content:center; text-align:center; }
.compass-core strong { font-family:"Fredoka"; font-size:28px; }
.compass-core small { font-size:10px; font-weight:800; opacity:.75; }
.orbit { position:absolute; display:grid; place-items:center; width:86px; height:48px; border:1.5px solid var(--ink); border-radius:999px; background:white; font-family:"Schoolbell"; font-size:17px; }
.o1 { left:16px; top:70px; transform:rotate(-8deg); background:#fff1ba; }
.o2 { right:8px; top:62px; transform:rotate(8deg); background:#dff7ee; }
.o3 { left:36px; bottom:48px; transform:rotate(5deg); background:#e7edff; }
.o4 { right:28px; bottom:36px; transform:rotate(-5deg); background:#ffe8ef; }

.source-row { margin:34px 0 16px; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; color:var(--ink-soft); font-size:11px; font-weight:800; }
.source-badge { background:var(--ink); color:white; border-radius:999px; padding:7px 10px; }
.market-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.market-card { border:1px solid var(--line-ink); border-radius:28px 22px 30px 24px; padding:20px; background:var(--paper); min-height:240px; box-shadow:var(--soft-shadow); position:relative; overflow:hidden; }
.market-card::after { content:""; position:absolute; width:90px; height:90px; border-radius:50%; right:-32px; bottom:-34px; background:var(--market-tint,#f1edff); opacity:.7; }
.market-card-head { display:flex; justify-content:space-between; gap:12px; }
.market-card-head h3 { margin:0; font-size:21px; }
.live-label { font-size:9px; font-weight:900; padding:6px 8px; border-radius:999px; background:var(--mint-soft); color:#31745b; height:max-content; }
.learning-angle { margin:7px 0 16px; color:var(--ink-soft); font-size:11px; font-weight:650; min-height:34px; }
.feed-list { display:grid; gap:7px; }
.feed-row { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; padding:8px 10px; background:rgba(245,247,246,.82); border-radius:12px; }
.feed-name { display:grid; }
.feed-name strong { font-family:"Fredoka"; font-size:13px; }
.feed-name small { color:var(--ink-soft); font-size:9px; font-weight:800; }
.feed-price { font-family:"Fredoka"; font-weight:700; font-size:12px; }

.representation-shelf { margin-top:28px; background:#f1edff; border:1px solid var(--line-ink); border-radius:36px 28px 40px 32px; padding:28px; display:grid; grid-template-columns:.8fr 1.2fr; gap:28px; }
.shelf-copy p:last-child { color:var(--ink-soft); }
.representation-cards { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.representation-cards article { background:white; border:1px solid var(--line-ink); border-radius:22px; padding:18px; }
.representation-cards strong { display:block; margin:14px 0 7px; font-family:"Fredoka"; font-size:17px; }
.representation-cards p { color:var(--ink-soft); font-size:11px; margin-bottom:10px; }
.representation-cards small { color:var(--ink-soft); font-size:9px; font-weight:800; }
.rep-provider { display:inline-block; border-radius:999px; padding:6px 9px; font-size:9px; font-weight:900; }
.rep-provider.tessera { background:#e9f7ef; color:#2c7255; }
.rep-provider.prestocks { background:#fff1d1; color:#8b6313; }

.family-portrait { position:relative; width:min(100%,360px); height:330px; margin-left:auto; background:linear-gradient(150deg,#fff0c9,#fce5ee 55%,#e4f2ff); border:2px solid rgba(24,50,71,.75); border-radius:46% 54% 38% 62% / 50% 42% 58% 50%; box-shadow:14px 15px 0 rgba(24,50,71,.08); }
.portrait-person { position:absolute; bottom:34px; }
.portrait-person.kid { left:66px; }
.portrait-person.parent { right:58px; transform:scale(1.08); }
.portrait-head { position:relative; z-index:2; display:grid; place-items:center; width:80px; height:80px; border:3px solid var(--ink); border-radius:48% 52% 45% 55%; background:#ffd995; font-family:"Fredoka"; font-size:27px; font-weight:700; }
.parent .portrait-head { background:#bad8ff; }
.portrait-body { display:block; width:104px; height:120px; margin:-7px 0 0 -12px; border:3px solid var(--ink); border-radius:48px 48px 25px 25px; background:var(--mint); }
.parent .portrait-body { background:var(--lilac); }
.portrait-spark { position:absolute; font-family:"Schoolbell"; font-size:36px; color:#2d7960; }
.s1 { top:48px; left:42px; transform:rotate(-10deg); }
.s2 { top:34px; right:44px; color:#d55f88; transform:rotate(8deg); }

.family-dashboard { margin-top:34px; display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.family-key-panel, .request-panel { border:1px solid var(--line-ink); border-radius:30px 24px 34px 26px; background:var(--paper); padding:25px; box-shadow:var(--soft-shadow); }
.family-key-panel { background:linear-gradient(160deg,#fffdf9,#ecfaf3); }
.request-panel { background:linear-gradient(160deg,#fffdf9,#fff1f5); }
.panel-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.panel-heading h2 { margin:5px 0 0; font-size:29px; }
.open-badge { background:var(--mint-soft); color:#2f7658; padding:8px 10px; border-radius:999px; font-size:10px; font-weight:900; }
.limit-ruler { position:relative; height:13px; margin:30px 0 9px; background:#e8eee9; border-radius:999px; }
.limit-fill { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--mint),var(--mango)); }
.limit-dot { position:absolute; top:50%; transform:translate(-50%,-50%); width:24px; height:24px; border:4px solid white; background:var(--ink); border-radius:50%; box-shadow:0 0 0 1px rgba(24,50,71,.15); }
.limit-labels { display:flex; justify-content:space-between; font-size:10px; color:var(--ink-soft); font-weight:800; }
.key-list { display:grid; gap:12px; margin-top:26px; }
.key-list > div { display:flex; gap:11px; align-items:center; }
.key-list .check, .key-list .boundary { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--mint-soft); color:#2f7658; font-weight:900; }
.key-list .boundary { background:var(--mango-soft); color:#986b10; }
.key-list p { display:grid; margin:0; }
.key-list strong { font-size:13px; }
.key-list small { color:var(--ink-soft); font-size:10px; }
.request-compare { margin:28px 0 16px; display:grid; grid-template-columns:1fr auto 1fr; gap:10px; align-items:center; }
.request-compare > div { padding:14px; background:white; border:1px solid var(--line-ink); border-radius:16px; display:grid; }
.request-compare small { color:var(--ink-soft); font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.request-compare strong { font-family:"Fredoka"; font-size:30px; }
.request-compare span { color:var(--ink-soft); font-size:10px; font-weight:700; }
.compare-arrow { font-size:20px; }
.request-reason { background:rgba(255,255,255,.58); border-left:3px solid var(--pink); padding:11px 13px; border-radius:0 12px 12px 0; color:var(--ink-soft); font-size:12px; font-weight:650; }
.guardian-choices { display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px; margin-top:18px; }
.guardian-choices button { border:0; border-radius:13px; min-height:42px; background:var(--ink); color:white; font-size:10px; font-weight:900; cursor:pointer; }
.guardian-choices button:nth-child(2) { background:#4671c7; }
.guardian-choices .quiet-choice { background:white; color:var(--ink); border:1px solid var(--line-ink); }

.family-principles { margin-top:18px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.family-principles article { min-height:180px; background:white; border:1px solid var(--line-ink); border-radius:22px; padding:20px; }
.principle-number { font-family:"Schoolbell"; color:#3e7a66; font-size:20px; }
.family-principles strong { display:block; margin:15px 0 7px; font-family:"Fredoka"; font-size:18px; }
.family-principles p { margin:0; color:var(--ink-soft); font-size:11px; }

.lab-note { position:fixed; right:18px; bottom:18px; z-index:50; display:grid; gap:2px; background:rgba(24,50,71,.94); color:white; border-radius:14px; padding:10px 13px; box-shadow:0 10px 30px rgba(24,50,71,.2); max-width:280px; }
.lab-note-title { font-family:"Fredoka"; font-size:12px; }
.lab-note span:last-child { font-size:9px; opacity:.72; font-weight:700; }

@media (max-width: 920px) {
  .lab-header { grid-template-columns:auto auto; }
  .direction-switcher { order:3; grid-column:1 / -1; justify-content:flex-start; overflow-x:auto; padding-bottom:2px; }
  .live-pill { justify-self:end; }
  .garden-hero, .playground-intro, .family-hero { grid-template-columns:1fr; }
  .key-card-wrap { min-height:auto; margin-top:8px; }
  .doodle-arrow,.doodle-label { display:none; }
  .garden-grid { grid-template-columns:1fr 1fr; }
  .mission-card { grid-column:1 / -1; }
  .family-strip { grid-template-columns:1fr 1fr; }
  .family-strip-art { display:none; }
  .compass-card,.family-portrait { margin:0 auto; }
  .market-grid { grid-template-columns:1fr 1fr; }
  .representation-shelf { grid-template-columns:1fr; }
}

@media (max-width: 640px) {
  .lab-header { padding:13px 14px; }
  .brand { min-width:0; }
  .brand small { display:none; }
  .live-pill { font-size:0; padding:8px; }
  .direction-button { white-space:nowrap; }
  .page-shell { width:min(100% - 24px,1180px); padding-top:28px; }
  h1 { font-size:42px; }
  .hello-row { align-items:flex-start; }
  .kid-avatar { width:48px; height:48px; }
  .hero-body { font-size:15px; }
  .key-card-wrap { display:block; }
  .key-card { width:100%; min-height:430px; padding:22px; border-radius:32px 25px 36px 24px; }
  .key-ring { width:126px; height:126px; border-width:15px; }
  .key-stem { left:125px; top:69px; width:135px; height:24px; }
  .key-tooth.one { left:218px; top:78px; }
  .key-tooth.two { left:242px; top:75px; }
  .key-rules { grid-template-columns:1fr; }
  .key-rules > div { display:flex; justify-content:space-between; align-items:baseline; }
  .garden-grid,.market-grid,.family-dashboard,.family-principles,.representation-cards { grid-template-columns:1fr; }
  .mission-card { grid-column:auto; }
  .family-strip { grid-template-columns:1fr; padding:24px; }
  .playground-intro h1,.family-hero h1 { font-size:40px; }
  .compass-card { width:300px; }
  .source-row { gap:7px; }
  .representation-shelf { padding:22px; }
  .family-portrait { width:300px; height:285px; }
  .portrait-person.kid { left:47px; }
  .portrait-person.parent { right:43px; }
  .guardian-choices { grid-template-columns:1fr; }
  .lab-note { left:12px; right:12px; bottom:10px; max-width:none; grid-template-columns:auto 1fr; align-items:center; gap:10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}


/* Interactive isolated sandbox ------------------------------------------------ */
.sandbox-action-panel {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  padding: 26px;
  border: 2px solid rgba(24,50,71,.78);
  border-radius: 34px 27px 38px 29px;
  background: linear-gradient(145deg, #eef9f5, #fff7d8 58%, #ffedf3);
  box-shadow: 10px 12px 0 rgba(24,50,71,.08);
}
.sandbox-kicker {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}
.sandbox-panel-copy h2 { margin: 12px 0 8px; }
.sandbox-panel-copy > p { max-width: 700px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.sandbox-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.sandbox-stats span { display: grid; padding: 10px 12px; background: rgba(255,255,255,.65); border: 1px solid var(--line-ink); border-radius: 14px; }
.sandbox-stats small { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sandbox-stats strong { margin-top: 3px; font-family: "Fredoka"; font-size: 14px; }
.sandbox-money-controls { padding: 18px; border: 1px solid var(--line-ink); border-radius: 22px; background: rgba(255,255,255,.8); }
.sandbox-amount-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 12px 0; }
.sandbox-amount-buttons button {
  min-height: 46px; border: 1px solid var(--line-ink); border-radius: 13px;
  background: white; font-family: "Fredoka"; font-weight: 700; cursor: pointer;
}
.sandbox-amount-buttons button:hover { background: var(--mango-soft); transform: translateY(-1px); }
.sandbox-decision { min-height: 64px; display: flex; align-items: center; padding: 12px 14px; border-radius: 14px; font-size: 11px; font-weight: 750; line-height: 1.4; }
.sandbox-decision.neutral { background: #f1f4f3; color: var(--ink-soft); }
.sandbox-decision.allow { background: var(--mint-soft); color: #276b50; }
.sandbox-decision.refuse { background: #fff0ed; color: #9c4a3d; }
.sandbox-request-button {
  width: 100%; margin-top: 8px; min-height: 42px; border: 0; border-radius: 12px;
  background: var(--ink); color: white; font-size: 11px; font-weight: 900; cursor: pointer;
}
.practice-wallet {
  margin: 18px 0 14px; padding: 15px 18px; display: grid; grid-template-columns: auto 1fr auto;
  gap: 18px; align-items: center; border: 1px solid var(--line-ink); border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.practice-wallet > div { display: grid; }
.practice-wallet strong { margin-top: 3px; font-family: "Fredoka"; font-size: 18px; }
.practice-wallet p { margin: 0; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.practice-wallet button {
  border: 1px solid var(--line-ink); background: white; border-radius: 11px; padding: 9px 11px;
  font-size: 10px; font-weight: 900; cursor: pointer;
}
.feed-row-interactive { grid-template-columns: minmax(0,1fr) auto; }
.feed-actions { display: grid; justify-items: end; gap: 4px; position: relative; z-index: 2; }
.practice-buy {
  border: 0; border-radius: 9px; padding: 5px 7px; background: var(--ink); color: white;
  font-size: 8.5px; font-weight: 900; cursor: pointer;
}
.practice-positions {
  margin-top: 16px; padding: 22px; border: 1px solid var(--line-ink);
  border-radius: 28px 22px 30px 24px; background: white;
}
.practice-positions-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.practice-positions-head h2 { margin: 4px 0 0; font-size: 27px; }
.practice-count { padding: 7px 9px; background: var(--blue-soft); border-radius: 999px; font-size: 9px; font-weight: 900; }
.practice-position-list { display: grid; gap: 8px; margin-top: 15px; }
.practice-position { display: flex; justify-content: space-between; gap: 15px; padding: 11px 13px; border-radius: 13px; background: #f7f8f6; }
.practice-position > div { display: grid; }
.practice-position > div:last-child { text-align: right; }
.practice-position strong { font-family: "Fredoka"; font-size: 13px; }
.practice-position small { color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.practice-position .practice-up { color: #2f7658; }
.practice-position .practice-down { color: #a64c45; }
.empty-practice { margin: 0; color: var(--ink-soft); font-size: 11px; }
.guardian-empty { margin-top: 28px; padding: 20px; background: rgba(255,255,255,.65); border: 1px dashed rgba(24,50,71,.22); border-radius: 17px; }
.guardian-empty strong { font-family: "Fredoka"; font-size: 18px; }
.guardian-empty p { margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; }
.guardian-decision { margin-top: 12px; min-height: 20px; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.guardian-choices button:disabled { opacity: .45; cursor: not-allowed; }
.lab-note { grid-template-columns: auto 1fr auto; align-items: center; max-width: 390px; }
.lab-note button {
  border: 1px solid rgba(255,255,255,.24); background: transparent; color: white;
  border-radius: 9px; padding: 5px 8px; font-size: 9px; font-weight: 900; cursor: pointer;
}

@media (max-width: 820px) {
  .sandbox-action-panel { grid-template-columns: 1fr; }
  .practice-wallet { grid-template-columns: 1fr auto; }
  .practice-wallet p { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 640px) {
  .sandbox-action-panel { padding: 20px; }
  .sandbox-stats { grid-template-columns: 1fr; }
  .practice-wallet { grid-template-columns: 1fr; gap: 8px; }
  .practice-wallet p { grid-column: auto; order: initial; }
  .feed-row-interactive { grid-template-columns: 1fr auto; }
  .lab-note { grid-template-columns: auto 1fr auto; }
}
