/* ============================================
   LearnAI4Kids Explorer (the kids home, /learnai/kids and / on learnai4kids.org).
   One phone-width app column, centered on bigger screens: a map of six places,
   short tap-based activities, stamps, an Explorer Book, a bottom tab bar.
   Self-hosted fonts only (learnai-fonts.css): Fraunces for display, Inter for body.
   ============================================ */
:root {
  --paper: #fdf8ec; --paper-2: #f6eed6; --rule: #e8dcb8; --rule-2: #efe5c9;
  --ink: #1a1a1a; --ink-2: #3a3a3a; --ink-3: #5f5a4e;
  --ochre: #d88a0a; --ochre-dk: #a5690a; --ochre-tx: #8a5600; --ochre-btn: #b06d06;
  --crimson: #c64545; --sage: #4a8a5f; --sage-dk: #2f6b43; --blue: #3872b8; --gold: #b8821e; --plum: #7b5ea7;
  --good-bg: #e3f2e7; --soft-bg: #fbe9e4; --soft-bd: #c97a5a;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
html { -webkit-text-size-adjust: 100%; }
body.lx-page { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.45; overflow-x: hidden; }
.lx-page * { box-sizing: border-box; }
.lx-page button, .lx-page input { font-family: inherit; }
.lx-page a { color: var(--ochre-tx); }
.lx-page :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.lx-page h1:focus, .lx-page h2:focus { outline: none; }
.lx-page img { max-width: 100%; }
/* the shared site nav scrolls away here; the bottom bar is the app's nav */
.lx-page .l4k-nav { position: static; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; font-weight: 800; }
.skip:focus { left: 8px; }

.app { max-width: 560px; margin: 0 auto; min-height: 60vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.app.focus { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ochre-tx); }
.app h1, .app h2 { font-family: var(--display); font-weight: 600; text-wrap: balance; margin: 0; line-height: 1.14; }
.app h1 { font-size: 30px; }
.app h2 { font-size: 23px; }
.app p { margin: 0; }
.h-body { font-family: var(--body) !important; font-size: 18px !important; font-weight: 800 !important; }
.big h1 { font-size: 34px; }
.big .choice, .big .btn { font-size: 21px; min-height: 64px; }
.big .buddy-text { font-size: 20px; }
.big .flip, .big .act .t { font-size: 18px; }
.big .why p, .big .answer { font-size: 18px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 22px; border-radius: 16px; border: none; background: var(--ochre-btn); color: #fff; font-size: 18px; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 #7d4d04; transition: transform .08s; text-align: center; line-height: 1.2; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7d4d04; }
.lx-page a.btn { color: #fff; }
.lx-page a.btn.ghost { color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 2.5px solid var(--rule); box-shadow: 0 4px 0 var(--rule-2); }
.btn.wide { width: 100%; padding: 10px 18px; }
.btn.small { min-height: 46px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: default; }
.choice { min-height: 56px; border-radius: 16px; border: 2.5px solid var(--rule); background: #fff; font-size: 17px; font-weight: 800; color: var(--ink); cursor: pointer; padding: 10px 14px; text-align: left; box-shadow: 0 4px 0 var(--rule-2); line-height: 1.3; width: 100%; }
.choice.center { text-align: center; }
.choice[aria-pressed="true"] { border-color: var(--ochre); background: #fff3d6; }
.choice.right { border-color: var(--sage); background: var(--good-bg); }
.choice.nope { border-color: var(--soft-bd); background: var(--soft-bg); }
.choice[disabled] { cursor: default; }
.choice .sub { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card { background: #fff; border: 2.5px solid var(--rule); border-radius: 18px; padding: 14px 16px; }
.card .lbl { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 2px; }
.q { font-size: 17px; font-weight: 800; margin: 14px 0 10px; }
.muted { color: var(--ink-3); font-size: 14px; font-weight: 600; }
.small-note { font-size: 12px; color: var(--ink-3); font-weight: 600; text-align: center; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* robot buddy */
.buddy { display: flex; align-items: flex-end; gap: 10px; }
.bot { width: 56px; height: 64px; flex: none; animation: bob 3.2s ease-in-out infinite; }
.bot .arm { fill: none; stroke: #2b2b2b; stroke-width: 3.2; stroke-linecap: round; transition: transform .25s; }
.bot .arm-l { transform-origin: 19px 60px; } .bot .arm-r { transform-origin: 45px 60px; }
.bot .happy, .bot .o { display: none; }
.buddy[data-mood="cheer"] .open, .buddy[data-mood="cheer"] .smile { display: none; }
.buddy[data-mood="cheer"] .happy { display: inline; }
.buddy[data-mood="cheer"] .arm-l { transform: rotate(38deg); } .buddy[data-mood="cheer"] .arm-r { transform: rotate(-38deg); }
.buddy[data-mood="wow"] .smile { display: none; } .buddy[data-mood="wow"] .o { display: inline; }
.buddy[data-mood="wow"] .open { transform: scale(1.22); transform-box: fill-box; transform-origin: center; }
.buddy.hop .bot { animation: hop .6s ease; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes hop { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-14px) rotate(-6deg); } 65% { transform: translateY(0) rotate(4deg); } 100% { transform: none; } }
.bubble { position: relative; background: #fff; border: 2px solid var(--rule); border-radius: 16px; padding: 9px 13px; margin-bottom: 8px; flex: 1; min-width: 0; box-shadow: 0 6px 16px -12px rgba(60,40,0,.4); }
.bubble::before { content: ""; position: absolute; left: -10px; bottom: 12px; width: 16px; height: 16px; background: #fff; border-left: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(45deg); }
.bubble:has(.buddy-text:empty) { visibility: hidden; }
.buddy-text { font-size: 16px; font-weight: 700; line-height: 1.32; }

/* bottom bar + focused play bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 2px solid var(--rule-2); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
.bar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; background: none; border: none; border-radius: 12px; color: var(--ink-3); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; padding: 2px; text-align: center; line-height: 1.15; }
.tab[aria-current="page"], .tab[aria-pressed="true"] { color: var(--ochre-tx); font-weight: 800; background: #fbefd2; }
.tab svg { width: 25px; height: 25px; flex: none; }
.playbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 2px solid var(--rule-2); padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.playbar-in { max-width: 528px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.playbar-row { display: flex; align-items: center; gap: 10px; }
.playbar-row:empty { display: none; }
.playbar-row .btn { margin-left: auto; }

/* home */
.home-top { padding: 16px 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-hero { width: 100%; height: 200px; object-fit: cover; border-radius: 22px; display: block; }
.door { display: flex; align-items: center; gap: 14px; text-decoration: none; border-radius: 20px; padding: 12px 16px 12px 12px; background: #fff; color: var(--ink) !important; border: 2.5px solid var(--rule); }
.door img { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; flex: none; }
.door.main { background: var(--ochre-btn); color: #fff !important; border-color: var(--ochre-btn); box-shadow: 0 6px 0 #7d4d04; }
.door .d1 { display: block; font-size: 20px; font-weight: 800; line-height: 1.15; }
.door .d2 { display: block; font-size: 14px; font-weight: 600; }
.door:not(.main) .d1 { font-size: 18px; }
.door:not(.main) .d2 { color: var(--ink-3); }

/* map */
.top { display: flex; align-items: center; gap: 10px; padding: 16px 0 10px; }
.top .grow { flex: 1; min-width: 0; }
.meter { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink) !important; min-height: 44px; }
.meter-track { width: 96px; height: 16px; border-radius: 999px; background: var(--rule-2); border: 2px solid #e2d4ab; overflow: hidden; display: block; }
.meter-fill { display: block; height: 100%; background: var(--ochre); transition: width .5s; }
.map { position: relative; width: 100%; aspect-ratio: 374 / 640; border-radius: 24px; background: var(--paper-2); border: 2px solid #ece0bd; }
.map svg.path { position: absolute; inset: 0; width: 100%; height: 100%; }
.place { position: absolute; width: 40%; display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: var(--ink) !important; border-radius: 16px; }
.place .pic { position: relative; width: 70%; aspect-ratio: 1; display: block; }
.place img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid var(--c); box-shadow: 0 6px 14px -6px rgba(60,40,0,.45); background: #fff; display: block; transition: transform .15s; }
.place:hover img, .place:focus-visible img { transform: scale(1.05); }
.place .label { background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 800; border: 2px solid var(--c); white-space: nowrap; }
.dots { display: flex; gap: 4px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d9c592; background: #fff; }
.dot.on { background: var(--c); border-color: var(--c); }
.check { position: absolute; right: -2px; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--sage); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; }
.saved { text-align: center; margin: 10px 0 0 !important; }

/* place */
.hero { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); position: relative; }
.hero img { width: 100%; height: 210px; object-fit: cover; display: block; }
.hero .back { position: absolute; left: 14px; top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink) !important; text-decoration: none; border-radius: 999px; padding: 0 14px 0 10px; min-height: 44px; font-size: 15px; font-weight: 800; border: 2px solid var(--rule); }
.banner { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); background: var(--c); color: #fff; padding: 14px 18px 16px; }
.banner .eyebrow { color: #fff; opacity: .95; }
.banner h1 { font-size: 25px; margin-top: 4px !important; }
.banner p { margin-top: 8px !important; font-weight: 700; }
.listen { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 0 14px; min-height: 44px; font-size: 14px; font-weight: 800; cursor: pointer; background: #fff3d6; color: var(--ochre-tx); border: 2px solid #efd9a6; flex: none; }
.acts { display: flex; flex-direction: column; gap: 12px; }
.act { display: flex; align-items: center; gap: 14px; background: #fff; border: 2.5px solid var(--rule); border-radius: 20px; padding: 10px 14px 10px 10px; text-decoration: none; color: var(--ink) !important; }
.act img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; }
.act .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act .t { font-size: 18px; font-weight: 800; }
.act .s { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.act .m { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.act .stamp-mini { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* play */
.playtop { display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; border-bottom: 2px solid var(--rule-2); margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: var(--rule-2); color: #5f4a1c; }
.chip.now { background: var(--ochre-btn); color: #fff; }
.chip.did { background: #f3e2bd; }
.playhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.playhead h1 { font-size: 24px; }
.sentence { background: #fff; border: 2.5px solid #efd9a6; border-radius: 18px; padding: 16px; font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.sentence .new { color: #a3640a; }
.blank { color: #a3640a; border-bottom: 3px dashed var(--ochre); padding: 0 6px; }
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bub { display: inline-flex; align-items: baseline; gap: 6px; border-radius: 999px; background: #fff; border: 2.5px solid var(--rule); font-weight: 800; cursor: pointer; color: var(--ink); min-height: 44px; align-items: center; }
.bub small { font-size: 13px; color: var(--ink-3); }
.bub.s1 { font-size: 24px; padding: 10px 20px; } .bub.s2 { font-size: 20px; padding: 8px 16px; } .bub.s3 { font-size: 17px; padding: 6px 13px; } .bub.s4 { font-size: 15px; padding: 6px 11px; }
.bub.mine { border-color: var(--ochre); background: #fff3d6; }
.why { background: #fff; border: 2.5px solid var(--sage); border-radius: 18px; padding: 12px 14px; margin-top: 14px; }
.why .eyebrow { color: var(--sage-dk); }
.why p { margin-top: 4px !important; font-weight: 600; }
.why p + p { margin-top: 8px !important; }
.why ol, .why ul { margin: 8px 0 0; padding-left: 22px; font-weight: 600; }
.why li { margin-bottom: 4px; }
.answer { background: #fff; border: 2.5px solid var(--rule); border-radius: 16px; padding: 12px 14px; font-size: 16px; font-weight: 600; }
.answer .who { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.answer .note { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.answer.robot { border-color: #9cb8dd; }
.answer.you { border-color: #9fcaa9; }
.answer.fuzzy { border-color: #e3b6a4; }
.lumps { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lump { font-family: var(--display); font-size: 28px; font-weight: 600; padding: 8px 14px; border-radius: 12px; background: #e7eefa; border: 2.5px solid var(--blue); animation: pop .35s ease both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.flip { min-height: 92px; border-radius: 16px; border: 2.5px solid var(--rule); background: #fff; padding: 12px; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); box-shadow: 0 4px 0 var(--rule-2); line-height: 1.35; }
.flip.open { background: #f1f6ff; border-color: #9cb8dd; font-weight: 600; cursor: default; }
.flip .hint { display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; margin-top: 6px; }
.flip.wide { grid-column: 1 / -1; }
.bucket { border: 2.5px dashed var(--rule); border-radius: 18px; padding: 12px; min-height: 120px; background: #fff; cursor: pointer; text-align: left; font-weight: 800; font-size: 15px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.bucket .in { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: var(--good-bg); border: 2px solid var(--sage); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* prompt builder (details) */
.prompt { background: #fff; border: 2.5px solid #9fcaa9; border-radius: 16px; padding: 12px 14px; font-size: 16px; font-weight: 700; }
.prompt .add { color: var(--sage-dk); background: var(--good-bg); border-radius: 6px; padding: 0 3px; }
.addchips { display: flex; flex-direction: column; gap: 8px; }
.addchip { min-height: 50px; border-radius: 14px; border: 2.5px dashed var(--sage); background: #fff; color: var(--sage-dk); font-size: 16px; font-weight: 800; cursor: pointer; text-align: left; padding: 8px 14px; }
.addchip[disabled] { border-style: solid; background: var(--good-bg); color: var(--ink-3); cursor: default; }

/* the pile (training farm) */
.pilebox { background: #fff; border: 2.5px solid var(--rule); border-radius: 18px; padding: 12px; }
.pile { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.pdog { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; border-radius: 14px; border: 2px solid var(--rule); background: var(--paper); font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 4px 2px; }
.pdog .e { font-size: 28px; line-height: 1; }
button.pdog { cursor: pointer; }
button.pdog:hover { border-color: var(--soft-bd); }
.tray { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tray button { min-height: 50px; border-radius: 14px; border: 2.5px solid var(--blue); background: #eef4fc; color: var(--ink); font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tray button[disabled] { opacity: .45; cursor: default; }
.count { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 10px; text-align: center; }
.verdict { border-radius: 16px; padding: 12px 14px; margin-top: 12px; font-size: 16px; font-weight: 600; border: 2.5px solid var(--soft-bd); background: var(--soft-bg); }
.verdict.good { border-color: var(--sage); background: var(--good-bg); }

/* answer key (study buddy) */
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.notes span { background: #fff7e6; border: 2px solid #efd9a6; border-radius: 10px; padding: 4px 10px; font-weight: 700; font-size: 16px; }
.keylist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* the three super-questions */
.sq { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 2.5px solid var(--rule); border-radius: 16px; padding: 10px 12px; font-weight: 800; font-size: 17px; }
.sq b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.claim { background: #fff; border: 2.5px solid #9cb8dd; border-radius: 16px; padding: 12px 14px; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

/* fake-face clues */
.tells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tell { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 2.5px solid var(--rule); border-radius: 16px; padding: 8px; cursor: pointer; text-align: left; color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.25; box-shadow: 0 4px 0 var(--rule-2); }
.tell img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.tell.seen { border-color: var(--plum); }
.tell .n { font-size: 11px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.study { background: #fff; border: 2.5px solid var(--plum); border-radius: 18px; padding: 10px; }
.study .frame { position: relative; border-radius: 12px; overflow: hidden; }
.study .frame img { width: 100%; display: block; }
.study .frame svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.study h2 { font-family: var(--body) !important; font-size: 18px !important; font-weight: 800 !important; margin: 10px 4px 4px !important; }
.study p { font-size: 16px; font-weight: 600; margin: 0 4px 10px !important; }

/* cheat-o-meter */
.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zone { min-height: 64px; border-radius: 16px; border: 2.5px solid; font-size: 16px; font-weight: 800; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; line-height: 1.15; text-align: center; }
.zone .lamp { width: 18px; height: 18px; border-radius: 50%; display: block; }
.zone.green { border-color: #4a8a5f; background: #eef8f0; } .zone.green .lamp { background: #3f9a5c; }
.zone.yellow { border-color: #c79a1c; background: #fff8e0; } .zone.yellow .lamp { background: #e5b521; }
.zone.red { border-color: #c64545; background: #fdeeee; } .zone.red .lamp { background: #d24a4a; }
.zone[disabled] { cursor: default; opacity: .4; }
.zone.is-answer { opacity: 1; }
.zone.green.is-answer { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #3f9a5c; } .zone.yellow.is-answer { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c79a1c; } .zone.red.is-answer { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c64545; }

/* robot pet */
.petbox { display: flex; gap: 12px; align-items: center; background: #fff; border: 2.5px solid var(--plum); border-radius: 18px; padding: 10px; }
.petbox img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; flex: none; }
.petsays { flex: 1; min-width: 0; }
.petsays .face { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.petsays p { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 4px !important; line-height: 1.25; }

/* stamp */
.stampwrap { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 8px; }
.stamp { width: 168px; height: 168px; border-radius: 50%; border: 7px double var(--c); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-8deg); background: #fffaf0; animation: stampin .45s cubic-bezier(.2,1.6,.4,1) both; }
.stamp b { font-size: 12px; letter-spacing: .12em; color: var(--c); }
.stamp span { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.12; color: var(--c); padding: 4px 14px 0; }
@keyframes stampin { from { transform: rotate(-8deg) scale(1.8); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.stampwrap .found-line { font-size: 18px; font-weight: 700; max-width: 30ch; }

/* book + grown-ups */
.found { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--rule-2); border-radius: 16px; padding: 10px 12px; }
.found .ring { width: 40px; height: 40px; border-radius: 50%; border: 4px double var(--c); display: flex; align-items: center; justify-content: center; flex: none; transform: rotate(-8deg); }
.found .ft { display: block; font-size: 16px; font-weight: 700; }
.note { background: #fff7e6; border: 2px dashed #e2c98c; border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
a.note { display: block; text-decoration: none; min-height: 44px; }
.takehome { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.takehome a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 72px; background: #fff; border: 2.5px solid var(--rule); border-radius: 16px; padding: 8px; font-weight: 800; font-size: 14px; color: var(--ink) !important; text-decoration: none; line-height: 1.25; }
.tablewrap { overflow-x: auto; margin-top: 14px; background: #fff; border: 2px solid var(--rule-2); border-radius: 14px; }
.app table { width: 100%; border-collapse: collapse; font-size: 14px; }
.app td, .app th { padding: 9px 10px; text-align: left; vertical-align: top; border-top: 1.5px solid var(--rule-2); }
.app th { background: var(--paper-2); border-top: none; }
.linklist { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 2px; }
.linklist a { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 16px; }
.roomlinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.roomlinks a { display: flex; flex-direction: column; justify-content: center; min-height: 56px; background: #fff; border: 2px solid var(--rule); border-radius: 14px; padding: 8px 12px; text-decoration: none; color: var(--ink) !important; font-weight: 700; font-size: 14px; line-height: 1.25; }
.roomlinks a b { font-size: 11px; letter-spacing: .08em; color: var(--ochre-tx); text-transform: uppercase; }
.gu p { font-size: 16px; color: var(--ink-2); }
.gu h2 { margin-top: 22px !important; }

/* footer (home + grown-ups only) */
.lx-footer { max-width: 560px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--ink-3); border-top: 2px solid var(--rule-2); }
.lx-footer a { color: var(--ochre-tx); }
.lx-footer[hidden] { display: none; }
.lx-footer .links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lx-footer .links a { display: inline-flex; align-items: center; min-height: 40px; }
.lx-noscript { max-width: 560px; margin: 20px auto; padding: 0 16px; }

@media (min-width: 700px) { body.lx-page { font-size: 18px; } .hero img { height: 260px; } .home-hero { height: 240px; } }
@media (max-width: 360px) { .place .label { font-size: 12px; padding: 3px 8px; } .tab { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .lx-page *, .lx-page *::before, .lx-page *::after { animation: none !important; transition: none !important; } }
