/* Eternix Kids prototype. One phone-width column; the world's look comes from body[data-theme]. */
:root {
  --ink: #1d2340; --ink-2: #4a5275; --muted: #6b7394; --card: #ffffff; --line: #e6e9f4; --soft: #f3f5fc;
  --accent: #ff7a59; --accent-2: #ff5a3c; --good: #2fbf71; --gold: #ffb400;
  --bg-a: #63c9ee; --bg-b: #2a8fcb; --tab: rgba(255, 255, 255, .94);
  --r: 22px; --shadow: 0 10px 30px rgba(20, 30, 70, .18);
  color-scheme: light;
}
body[data-theme="space"] { --bg-a: #2b2163; --bg-b: #0c0a24; --accent: #33d6e6; --accent-2: #14b8c9; }
body[data-theme="blocky"] { --bg-a: #b9e6ff; --bg-b: #7cc8f5; --accent: #39c07a; --accent-2: #239a5c; }
body[data-theme="pixel"] { --bg-a: #6fc3ff; --bg-b: #3d8fe0; --accent: #5cb82e; --accent-2: #3d8a17; }
body.parent { --bg-a: #f4f1ea; --bg-b: #f4f1ea; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font: 500 16px/1.45 "Nunito", system-ui, sans-serif; color: var(--ink);
  background: linear-gradient(180deg, var(--bg-a), var(--bg-b)) fixed; overflow-x: hidden;
}
body[data-theme="island"]:not(.parent) { background:
  radial-gradient(ellipse 60% 18px at 20% 30%, rgba(255,255,255,.18), transparent 70%),
  radial-gradient(ellipse 50% 16px at 75% 55%, rgba(255,255,255,.15), transparent 70%),
  radial-gradient(ellipse 55% 14px at 35% 80%, rgba(255,255,255,.14), transparent 70%),
  linear-gradient(180deg, #7fd6f5 0%, #3fb0e0 45%, #2283c2 100%) fixed; }
body[data-theme="space"]:not(.parent) { background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 40% 8%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 70% 22%, #cfe, transparent), radial-gradient(1px 1px at 88% 40%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 25% 60%, #fff, transparent), radial-gradient(1px 1px at 60% 70%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 85% 85%, #fff, transparent), radial-gradient(1px 1px at 8% 90%, #fff, transparent),
  radial-gradient(circle at 80% 10%, rgba(120, 90, 255, .35), transparent 40%),
  linear-gradient(180deg, #2b2163, #0c0a24) fixed; }
body[data-theme="pixel"]:not(.parent) { background: linear-gradient(180deg, #74c6ff, #3d8fe0) fixed; }
body[data-theme="blocky"]:not(.parent) { background:
  linear-gradient(#fff, #fff) 12% 14% / 54px 18px no-repeat, linear-gradient(#fff, #fff) calc(12% + 18px) calc(14% - 14px) / 26px 16px no-repeat,
  linear-gradient(#fff, #fff) 82% 30% / 70px 20px no-repeat, linear-gradient(#fff, #fff) calc(82% - 12px) calc(30% - 16px) / 34px 18px no-repeat,
  linear-gradient(180deg, #c8eeff, #86cff7) fixed; }

#app { max-width: 460px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: "Baloo 2", "Nunito", sans-serif; line-height: 1.12; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 18px; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
.center { text-align: center; } .muted { color: var(--muted); } .fine { font-size: 13px; color: var(--muted); }
[hidden] { display: none !important; }

.proto { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  background: rgba(10, 14, 40, .55); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.proto span { opacity: .85; }
.pbtns { display: flex; gap: 6px; }
.pbtn { border: 0; background: #fff; color: var(--ink); border-radius: 99px; padding: 5px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; background: var(--accent); color: #fff;
  font-weight: 800; padding: 12px 18px; text-decoration: none; box-shadow: 0 4px 0 var(--accent-2); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-2); }
.btn.big { width: 100%; font-size: 18px; padding: 15px 18px; font-family: "Baloo 2", sans-serif; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--accent-2); }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.wa { background: #25d366; box-shadow: 0 4px 0 #128c4a; }
body[data-theme="space"] .btn:not(.ghost):not(.wa) { color: #06202a; }
.link { border: 0; background: none; color: var(--ink-2); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 99px; background: #e8f8ef; color: #17844b; font-weight: 800; font-size: 13px; }
.pill.wait { background: #fff4d6; color: #8a5b00; }

/* top bar + world */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px max(14px, env(safe-area-inset-right)) 4px max(14px, env(safe-area-inset-left)); }
.me { display: flex; align-items: center; gap: 8px; border: 0; background: rgba(255,255,255,.92); border-radius: 99px; padding: 3px 14px 3px 3px; box-shadow: var(--shadow); text-align: left; }
.me svg { background: #ffe9d6; border-radius: 50%; }
.me b { display: block; font-family: "Baloo 2", sans-serif; font-size: 17px; line-height: 1; }
.me small { color: var(--muted); font-weight: 700; font-size: 12px; }
.stars { background: rgba(255,255,255,.92); border-radius: 99px; padding: 8px 14px; font-weight: 800; color: #b07a00; box-shadow: var(--shadow); font-size: 17px; }
.preview-bar { margin: 8px 14px 0; background: #fff; border-radius: 16px; padding: 8px 8px 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; box-shadow: var(--shadow); }

.world { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 2px; row-gap: 6px; padding: 14px 6px 190px; position: relative; }
.bld { position: relative; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; animation: bob 4.5s ease-in-out infinite; animation-delay: calc(var(--d) * -1); }
.world > .bld:nth-of-type(3n+2) { margin-top: 54px; margin-bottom: -54px; }
.bld img { width: 100%; max-width: 150px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 14px 14px rgba(10, 30, 60, .28)); transition: transform .2s; pointer-events: none; user-select: none; }
.bld.lv0 img { transform: scale(.78); opacity: .92; }
.bld.lv1 img { transform: scale(.86); } .bld.lv2 img { transform: scale(.93); } .bld.lv3 img { transform: scale(1); }
.bld.lv4 img { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(255, 230, 120, .8)) drop-shadow(0 14px 14px rgba(10, 30, 60, .28)); }
.bld:active img { transform: scale(.95); }
.bname { margin-top: -10px; position: relative; z-index: 1; background: rgba(255,255,255,.95); border-radius: 99px; padding: 2px 10px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 13px; box-shadow: 0 3px 10px rgba(0,0,0,.12); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.blv { font-size: 12px; color: #fff; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.45); margin-top: 2px; letter-spacing: .05em; }
.bld.lv0 .blv { background: var(--accent); color: #fff; text-shadow: none; padding: 1px 8px; border-radius: 99px; letter-spacing: 0; }
body[data-theme="space"] .bld.lv0 .blv { color: #06202a; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

.host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); width: min(460px, 100%); padding: 0 12px; display: flex; align-items: flex-end; gap: 6px; pointer-events: none; z-index: 10; }
.host img { width: 70px; flex: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); animation: bob 3s ease-in-out infinite; }
.bubble { background: #fff; border-radius: 18px 18px 18px 4px; padding: 9px 13px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); margin-bottom: 30px; pointer-events: auto; }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(460px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--tab);
  backdrop-filter: blur(12px); border-radius: 24px 24px 0 0; padding: 8px max(6px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); box-shadow: 0 -6px 24px rgba(10, 20, 60, .18); z-index: 20; }
.tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; border-radius: 14px; }
.tabbar button span { font-size: 24px; line-height: 1.1; }
.tabbar button.on { color: var(--ink); background: var(--soft); }

/* pages */
.screen:not(.world-screen) .pagehead { background: #fff; margin: 12px; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.pagehead p { color: var(--ink-2); }
.pagehead .btn { justify-self: start; }
.pagehead .back { justify-self: start; padding: 0; }
.screen > .btn.big { width: calc(100% - 24px); margin: 0 12px 12px; }
.empty { margin: 12px; background: rgba(255,255,255,.92); border-radius: var(--r); padding: 22px; text-align: center; color: var(--ink-2); font-weight: 700; display: grid; gap: 10px; justify-items: center; }
.empty img { width: 90px; }
.sub { margin: 18px 16px 8px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
body.parent .sub { color: var(--ink); text-shadow: none; }
.note { margin: 12px; background: #fffbe8; border: 2px dashed #f2d27a; border-radius: 18px; padding: 14px 16px; font-size: 14.5px; color: #5b4a12; }
.sheet .note { margin: 14px 0; }

.entries { display: grid; gap: 12px; padding: 0 12px; }
.entry { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.entry.sealed { background: linear-gradient(135deg, #fff, #f1ecff); }
.entry h3 { font-size: 19px; }
.entry p { color: var(--ink-2); }
.e-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); }
.e-b { color: var(--ink-2); }
.e-img { border-radius: 14px; max-height: 240px; object-fit: cover; width: 100%; }
.e-av svg { background: #ffe9d6; border-radius: 50%; }
.e-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 8px; }
.e-foot .link { padding: 0; margin-left: auto; }
.priv { font-size: 12px; font-weight: 800; color: #7d5cff; }
.sent { font-size: 13px; font-weight: 800; color: var(--good); margin-left: auto; }
.lock { font-weight: 800; color: #6a4fd8 !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: var(--soft); border-radius: 99px; padding: 4px 10px; font-weight: 700; font-size: 14px; }
.entry.mini { box-shadow: none; border: 2px solid var(--line); margin: 12px 0; }

.pcard { margin: 12px; background: #fff; border-radius: var(--r); padding: 6px 16px; box-shadow: var(--shadow); }
.pc-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pc-row:last-child { border: 0; }
.pc-row span { color: var(--ink-2); } .pc-row b { text-align: right; }

.friend { display: flex; align-items: center; gap: 12px; background: #fff; margin: 12px 12px 0; border-radius: var(--r); padding: 10px 14px; box-shadow: var(--shadow); }
.fav svg { background: #e6f2ff; border-radius: 50%; display: block; }
.fav.big svg { margin: 0 auto; }
.fi { flex: 1; } .fi b { display: block; font-family: "Baloo 2", sans-serif; font-size: 19px; } .fi small { color: var(--muted); font-weight: 700; }
.fgames { display: grid; gap: 8px; padding: 10px 12px 0; }
.stickers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px; }
.stk { border: 0; background: #fff; border-radius: 99px; padding: 8px 12px; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.s-friends .fine { margin: 10px 16px; color: rgba(255,255,255,.9); }
body[data-theme="blocky"] .s-friends .fine, body[data-theme="island"] .s-friends .fine { color: #0c2a4a; }

.tcards { display: grid; gap: 12px; padding: 0 12px; }
.tcard { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-columns: 124px 1fr; }
.tc-art { position: relative; display: grid; place-items: center; padding: 8px; }
.tcard.island .tc-art { background: linear-gradient(#7fd6f5, #2283c2); } .tcard.space .tc-art { background: linear-gradient(#2b2163, #0c0a24); } .tcard.blocky .tc-art { background: linear-gradient(#c8eeff, #86cff7); }
.tc-art img { width: 100px; } .tc-host { position: absolute; width: 46px !important; right: 4px; bottom: 4px; }
.tc-body { padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.tc-body p { font-size: 14px; color: var(--ink-2); }
.tc-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.earn { margin: 14px 12px; background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.bar { height: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd25a, #ffb400); border-radius: 99px; }
.soon { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 20px; }
.soon span { background: rgba(255,255,255,.75); border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 14px; color: var(--ink-2); }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 14, 40, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.in { opacity: 1; }
.sheet { position: relative; width: min(460px, 100%); max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 22px max(18px, env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: grid; gap: 12px; transform: translateY(30px); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); color: var(--ink); }
.sheet-wrap.in .sheet { transform: none; }
.sheet.tall { min-height: 70dvh; align-content: start; }
.sheet > h2 { text-align: center; padding: 0 30px; }
.x { position: absolute; right: 12px; top: 12px; border: 0; background: var(--soft); width: 36px; height: 36px; border-radius: 50%; font-weight: 800; z-index: 2; }
.q { font-family: "Baloo 2", sans-serif; font-size: 22px; font-weight: 700; text-align: center; line-height: 1.2; padding: 4px 6px; }
.qn { text-align: center; color: var(--muted); font-weight: 800; font-size: 13px; }
textarea, input:not([type=file]), select { width: 100%; font: inherit; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--soft); color: var(--ink); }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); background: #fff; }
.row { display: flex; gap: 8px; align-items: center; } .row input { flex: 1; }

.b-head { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; padding-right: 30px; }
.b-head img { width: 110px; }
.lvline { font-size: 13px; font-weight: 800; color: var(--ink-2); margin-top: 6px; }
.games { display: grid; gap: 10px; }
.game { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 10px 14px; text-align: left; box-shadow: 0 3px 0 var(--line); }
.game:active { transform: translateY(2px); box-shadow: none; }
.ge { font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--soft); border-radius: 14px; flex: none; }
.game b { display: block; font-size: 16px; } .game small { color: var(--muted); font-weight: 700; }
.game .go { margin-left: auto; color: var(--accent-2); font-size: 18px; }
.fgames .game { border: 0; box-shadow: var(--shadow); }

.tot-prog { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; } .tot-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.tot-stage { display: grid; gap: 10px; }
.tot-card { border: 0; border-radius: 22px; padding: 22px 12px; display: grid; justify-items: center; gap: 2px; font-family: "Baloo 2", sans-serif; font-size: 22px; font-weight: 800; background: #fff4e6; box-shadow: 0 5px 0 #f3d3b0; transition: transform .15s; }
.tot-card:last-child { background: #e8f3ff; box-shadow: 0 5px 0 #bcd8f6; }
.tot-card span { font-size: 54px; line-height: 1.1; }
.tot-card.chosen { transform: scale(1.06) rotate(-2deg); background: #dff7e9; box-shadow: 0 5px 0 #9edcb9; }
.or { text-align: center; font-weight: 800; color: var(--muted); font-family: "Baloo 2", sans-serif; }
.or { display: flex; align-items: center; justify-content: center; gap: 10px; }
.both { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font-weight: 800; font-family: "Nunito", sans-serif; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.both:active { transform: translateY(2px); box-shadow: none; }

.cats, .opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cat, .opt, .pred { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.cat.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt.on { background: #fff4d6; border-color: var(--gold); }
.opt b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 13px; }
.t5 { display: grid; gap: 12px; }
.preds { display: grid; gap: 8px; } .pred { border-radius: 16px; text-align: left; }

.modes, .inv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft); padding: 4px; border-radius: 16px; }
.mode { border: 0; background: none; border-radius: 12px; padding: 9px; font-weight: 800; color: var(--muted); }
.mode.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.m-voice { display: grid; gap: 8px; justify-items: center; }
.rec { width: 78px; height: 78px; border-radius: 50%; border: 0; background: #ff5a5f; color: #fff; font-size: 30px; box-shadow: 0 5px 0 #c9393d; }
.rec.on { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
audio { width: 100%; }

.moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.moodb { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 10px 4px; font-weight: 800; display: grid; justify-items: center; font-size: 13px; box-shadow: 0 3px 0 var(--line); }
.moodb span { font-size: 38px; }

.drop { display: grid; place-items: center; min-height: 170px; border: 3px dashed var(--line); border-radius: 22px; background: var(--soft); font-weight: 800; color: var(--ink-2); cursor: pointer; overflow: hidden; text-align: center; padding: 8px; }
.drop img, .vprev { max-height: 260px; border-radius: 14px; width: 100%; object-fit: contain; }

.pad { width: 100%; aspect-ratio: 1; border-radius: 20px; border: 2px solid var(--line); touch-action: none; background: #fff; }
.pal { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); padding: 0; font-size: 13px; font-weight: 800; }
.sw.on { box-shadow: 0 0 0 3px var(--ink); }
.sw.clear { background: var(--soft); }

.eps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ep { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 12px; display: grid; gap: 4px; text-align: left; box-shadow: 0 3px 0 var(--line); align-content: start; }
.ep span { font-size: 30px; } .ep small { color: var(--muted); font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.ep-card { background: linear-gradient(135deg, #1d2340, #3a2a7a); color: #fff; border-radius: 22px; padding: 22px; text-align: center; display: grid; gap: 6px; }
.ep-e { font-size: 52px; } .ep-tag { font-size: 12px; font-weight: 800; letter-spacing: .2em; color: #ffd25a; } .ep-card p { opacity: .9; }

.levelup { display: grid; gap: 12px; justify-items: center; text-align: center; padding-top: 10px; }
.levelup img { width: 170px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); } }

.av-stage { display: grid; place-items: center; }
.av-stage svg { background: radial-gradient(circle, #fff3e4, #ffe0c2); border-radius: 50%; }
.av-controls { display: grid; gap: 10px; }
.av-row { display: grid; gap: 6px; } .av-row > span { font-weight: 800; font-size: 13px; color: var(--muted); }
.av-row > div { display: flex; gap: 8px; flex-wrap: wrap; }
.av-row .sw:not([style]) { width: auto; height: 34px; border-radius: 99px; padding: 0 12px; background: var(--soft); border: 0; box-shadow: none; }
.av-row .sw:not([style]).on { background: var(--ink); color: #fff; }

.score { text-align: center; font-size: 28px; letter-spacing: 4px; }
.wres { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wres li { border-radius: 14px; padding: 8px 12px; background: var(--soft); display: grid; } .wres li.ok { background: #e3f8ec; } .wres li.no { background: #fff0ec; }
.wres span { font-size: 14px; color: var(--ink-2); }
.wait { display: grid; justify-items: center; gap: 6px; }
.qr { display: grid; place-items: center; padding: 10px; } .qr img, .qr canvas { border: 10px solid #fff; border-radius: 12px; box-shadow: var(--shadow); }
.code { text-align: center; font-family: "Baloo 2", sans-serif; font-size: 28px; letter-spacing: .25em; font-weight: 800; }
.inv-link { display: grid; gap: 10px; justify-items: center; }
.confirm-f { display: grid; gap: 10px; text-align: center; }
.desc { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 18px; padding: 12px; }
.emo { font-size: 28px; }
.world.mini { padding: 0 0 60px; }
.world.mini .bld img { max-width: 110px; }
.world.mini .bname { font-size: 11px; }
.world.mini.blocky { background: linear-gradient(#c8eeff, #86cff7); border-radius: 22px; padding: 10px 6px 70px; }
.maria-top { display: grid; gap: 8px; }
.ask-art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; } .ask-art img { width: 130px; } .ask-art img + img { width: 70px; }

/* onboarding */
.onboarding { padding: 0 0 24px; }
.ob-card { margin: 16px 12px; background: #fff; border-radius: 28px; padding: 24px 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.ob-hero { display: grid; gap: 14px; text-align: center; justify-items: center; }
.host-big { width: 170px; animation: bob 3s ease-in-out infinite; }
.ob-h { text-align: center; }
.field { display: grid; gap: 6px; font-weight: 800; color: var(--ink-2); font-size: 14px; }
.ob-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ob-theme { border: 3px solid var(--line); border-radius: 18px; padding: 8px 4px; display: grid; justify-items: center; gap: 2px; font-size: 13px; background: #fff; }
.ob-theme img { width: 80px; } .ob-theme span { color: var(--muted); font-weight: 700; font-size: 12px; }
.ob-theme.island { border-color: var(--accent); background: #fff7f2; }
.ob-theme:disabled { opacity: .6; }
.dots { display: flex; gap: 6px; justify-content: center; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--accent); width: 22px; border-radius: 99px; }

/* parent view */
.parentv { padding: 0 0 30px; }
.parentv > h1, .parentv > p { margin: 0 16px; }
.parentv > h1 { margin-top: 6px; } .parentv > p { margin-top: 6px; margin-bottom: 4px; }
.p-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.p-logo { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.p-acc { font-size: 13px; font-weight: 800; color: var(--muted); }
.pfriends .friend { box-shadow: none; border: 1px solid var(--line); }
.pitem { display: flex; gap: 12px; margin: 10px 12px; background: #fff; border-radius: var(--r); padding: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.pitem > img { width: 64px; height: 64px; object-fit: contain; }
.pitem > div { display: grid; gap: 6px; flex: 1; min-width: 0; } .pitem small { color: var(--muted); font-weight: 700; }
.pi-e { font-size: 30px; }
body.parent .tabbar { display: none; }
body.parent #app { padding-bottom: 20px; }

/* toast + confetti */
.toast { position: fixed; left: 50%; top: calc(54px + env(safe-area-inset-top)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 800; z-index: 80; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; animation: tin .25s; transition: opacity .4s, translate .4s; }
.toast.out { opacity: 0; translate: 0 -10px; }
@keyframes tin { from { opacity: 0; translate: 0 -10px; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall 2.2s cubic-bezier(.3, .6, .5, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

@media (prefers-reduced-motion: reduce) { .bld, .host img, .host-big { animation: none; } .confetti { display: none; } }
@media (min-width: 520px) { #app { box-shadow: 0 0 0 1px rgba(255,255,255,.15); } }


/* ============ v2: one continuous map, game HUD, juice ============ */
.s-world { padding-bottom: 0; }
.hud { position: sticky; top: 34px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.me { display: flex; align-items: center; gap: 8px; border: 3px solid #fff; background: linear-gradient(180deg, #ffffff, #eef2ff); border-radius: 99px; padding: 2px 14px 2px 2px; box-shadow: 0 6px 0 rgba(20, 30, 70, .18), var(--shadow); text-align: left; }
.me svg { background: #ffe9d6; border-radius: 50%; }
.me b { display: block; font-family: "Baloo 2", sans-serif; font-size: 17px; line-height: 1; }
.me small { color: var(--muted); font-weight: 800; font-size: 11px; }
.xpbar { display: block; width: 96px; height: 7px; border-radius: 99px; background: #dfe4f5; overflow: hidden; margin: 3px 0 1px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd25a, #ff9a3c); border-radius: 99px; }
.hud-r { display: flex; gap: 6px; align-items: center; }
.hud-stars { background: linear-gradient(180deg, #fff6d8, #ffe08a); border: 3px solid #fff; border-radius: 99px; padding: 6px 14px; font-weight: 800; color: #9a6400; box-shadow: 0 6px 0 rgba(150, 100, 0, .25), var(--shadow); font-size: 18px; font-family: "Baloo 2", sans-serif; transition: transform .2s; }
.hud-stars.bump { transform: scale(1.25) rotate(-4deg); }
.hud-snd { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; background: #fff; font-size: 18px; box-shadow: 0 5px 0 rgba(20, 30, 70, .18); }
.mission { position: relative; z-index: 14; display: flex; align-items: center; gap: 10px; margin: 2px 12px 0; width: calc(100% - 24px); border: 3px solid #fff; border-radius: 18px; padding: 7px 12px; text-align: left;
  background: linear-gradient(100deg, #ff7a59, #ff4f8b); color: #fff; box-shadow: 0 6px 0 rgba(150, 30, 60, .35), var(--shadow); animation: wiggle 4s ease-in-out infinite; }
.mission small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; opacity: .9; }
.mission b { font-family: "Baloo 2", sans-serif; font-size: 17px; line-height: 1.1; }
.m-ico { font-size: 26px; } .m-bonus { margin-left: auto; background: rgba(255,255,255,.25); border-radius: 99px; padding: 4px 10px; font-weight: 800; white-space: nowrap; }
.mission.done { background: linear-gradient(100deg, #2fbf71, #1fa38f); animation: none; box-shadow: 0 6px 0 rgba(10, 90, 60, .35), var(--shadow); }
@keyframes wiggle { 0%, 92%, 100% { transform: rotate(0); } 94% { transform: rotate(-1.5deg); } 96% { transform: rotate(1.5deg); } 98% { transform: rotate(-1deg); } }

.mapwrap { position: relative; margin-top: -14px; }
.map { position: relative; width: 100%; aspect-ratio: 1536 / 2752; background-size: 100% 100%; background-repeat: no-repeat; overflow: hidden; }
.map .bld { position: absolute; width: 31%; transform: translate(-50%, -72%); border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 2; animation: none; }
.map .bld .spr { width: 100%; max-width: none; aspect-ratio: auto; filter: drop-shadow(0 10px 8px rgba(10, 30, 60, .32)); transition: transform .25s; pointer-events: none; user-select: none; transform-origin: 50% 90%; animation: breathe 3.6s ease-in-out infinite; }
.map .bld.lv0 { width: 18%; transform: translate(-50%, -60%); }
.map .bld.lv0 .spr { animation: floaty 2.4s ease-in-out infinite; opacity: 1; filter: drop-shadow(0 6px 6px rgba(10, 30, 60, .3)); }
.map .bld.lv1 .spr { transform: scale(.82); } .map .bld.lv2 .spr { transform: scale(.92); } .map .bld.lv3 .spr { transform: scale(1); }
.map .bld.lv4 .spr { transform: scale(1.06); filter: drop-shadow(0 0 14px rgba(255, 220, 100, .95)) drop-shadow(0 10px 8px rgba(10, 30, 60, .3)); }
.map .bld.boing .spr { animation: boing .45s cubic-bezier(.3, 1.8, .5, 1); }
.ring { position: absolute; left: 50%; top: 62%; width: 150%; aspect-ratio: 2 / 1; transform: translate(-50%, -50%); border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .95); animation: spin 9s linear infinite, pulse2 1.6s ease-in-out infinite; }
.plus { position: absolute; right: -10%; top: -4%; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 22px/30px "Baloo 2", sans-serif; text-align: center; border: 3px solid #fff; box-shadow: 0 4px 0 var(--accent-2); z-index: 3; animation: pulse 1.4s ease-in-out infinite; }
.tag { display: flex; flex-direction: column; align-items: center; margin-top: -8%; position: relative; z-index: 3; }
.map .bname { background: #fff; border-radius: 10px; padding: 1px 9px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 12.5px; color: var(--ink); box-shadow: 0 3px 0 rgba(20, 30, 70, .18); white-space: nowrap; margin: 0; max-width: none; }
.map .blv { margin-top: 2px; font-size: 11px; letter-spacing: 1px; color: rgba(255,255,255,.55); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.map .blv i { font-style: normal; color: #ffd25a; }
.map .bld.lv0 .blv { background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 99px; letter-spacing: 0; text-shadow: none; font-weight: 800; box-shadow: 0 2px 0 var(--accent-2); }
body[data-theme="space"] .map .bld.lv0 .blv, body[data-theme="space"] .plus { color: #06202a; }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.025; } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes boing { 0% { scale: 1; } 30% { scale: 1.18 .86; } 60% { scale: .94 1.08; } 100% { scale: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse2 { 50% { opacity: .45; } }

/* ambient life on the map */
.amb { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.amb i { position: absolute; display: block; border-radius: 99px; background: rgba(255,255,255,.75); filter: blur(2px); width: 30%; height: 4.5%; animation: drift 38s linear infinite; }
.amb i::before, .amb i::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.amb i::before { width: 45%; height: 160%; left: 18%; top: -70%; } .amb i::after { width: 35%; height: 120%; left: 50%; top: -45%; }
.amb i:nth-child(1) { top: 6%; animation-duration: 46s; animation-delay: -10s; } .amb i:nth-child(2) { top: 44%; animation-duration: 60s; animation-delay: -35s; opacity: .55; } .amb i:nth-child(3) { top: 86%; animation-duration: 52s; animation-delay: -20s; opacity: .6; }
.map-space .amb i { width: 5px; height: 5px; filter: none; background: #fff; border-radius: 50%; animation: twinkle 2.6s ease-in-out infinite; }
.map-space .amb i::before, .map-space .amb i::after { display: none; }
.map-space .amb i:nth-child(1) { left: 8%; top: 8%; } .map-space .amb i:nth-child(2) { left: 88%; top: 30%; animation-delay: -.8s; } .map-space .amb i:nth-child(3) { left: 12%; top: 58%; animation-delay: -1.6s; }
.map-space .amb i:nth-child(4) { left: 90%; top: 86%; animation-delay: -.4s; } .map-space .amb i:nth-child(5) { left: 50%; top: 4%; animation-delay: -2s; } .map-space .amb i:nth-child(6) { left: 4%; top: 92%; animation-delay: -1.1s; }
.map-pixel .amb i { border-radius: 0; filter: none; background: rgba(255,255,255,.9); height: 3.4%; }
.map-pixel .amb i::before, .map-pixel .amb i::after { border-radius: 0; }
.map-island::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,.07) 40px 44px); background-size: 200% 200%; animation: shimmer 14s linear infinite; mix-blend-mode: screen; }
@keyframes drift { from { left: -35%; } to { left: 105%; } }
@keyframes twinkle { 50% { opacity: .15; transform: scale(.5); } }
@keyframes shimmer { to { background-position: 100% 100%; } }

/* host */
.host { bottom: calc(76px + env(safe-area-inset-bottom)); }
.host img { width: 74px; }
.bubble { cursor: pointer; border: 3px solid #fff; background: linear-gradient(180deg, #fff, #f2f5ff); }
.bubble small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.host-mini { position: fixed; left: max(12px, calc(50% - 218px)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 10; width: 60px; height: 60px; border-radius: 50%; border: 3px solid #fff; background: rgba(255,255,255,.85); padding: 4px; box-shadow: var(--shadow); }
.host-mini img { width: 100%; height: 100%; object-fit: contain; }

/* tab bar, chunkier */
.tabbar { border-top: 3px solid #fff; }
.tabbar button.on { background: linear-gradient(180deg, #fff3e9, #ffe2cf); color: var(--accent-2); box-shadow: inset 0 -3px 0 rgba(0,0,0,.06); }
.tabbar button.on span { transform: translateY(-2px) scale(1.12); }
.tabbar button span { transition: transform .2s; }

/* buttons: more game-like */
.btn { border: 3px solid rgba(255,255,255,.55); text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn.big { box-shadow: 0 6px 0 var(--accent-2), 0 10px 20px rgba(0,0,0,.12); }
.btn.ghost { border-color: transparent; }

/* building sheet */
.b-head img { width: 110px; filter: drop-shadow(0 8px 8px rgba(10, 30, 60, .25)); }
.lvrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lvpill { background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 10px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.lvbar { flex: 1; height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; } .lvbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd25a, #ff9a3c); }
.game.locked { opacity: .55; background: var(--soft); box-shadow: none; cursor: default; }
.g-head { display: grid; justify-items: center; gap: 2px; padding: 0 30px; text-align: center; }
.g-emo { font-size: 40px; line-height: 1; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 4px 0 0; }

/* level up */
.levelup { position: relative; }
.levelup img { width: 190px; position: relative; z-index: 1; filter: drop-shadow(0 10px 10px rgba(0,0,0,.2)); }
.burst { position: absolute; left: 50%; top: 100px; width: 320px; height: 320px; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255, 210, 90, .35) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: spin 12s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.lv-tag { position: relative; z-index: 1; font-family: "Baloo 2", sans-serif; font-weight: 800; letter-spacing: .2em; color: #fff; background: linear-gradient(90deg, #ff7a59, #ff4f8b); padding: 3px 14px; border-radius: 99px; }
.levelup h2 { position: relative; z-index: 1; }
.unlocks { display: grid; gap: 6px; justify-items: center; background: #fff8e6; border: 2px dashed #ffd25a; border-radius: 16px; padding: 10px 14px; position: relative; z-index: 1; }
.unlocks span { font-weight: 800; }
.big-emo { font-size: 64px; position: relative; z-index: 1; }
.askq { font-family: "Baloo 2", sans-serif; font-size: 19px; font-weight: 700; text-align: center; }
.answer { background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 16px; text-align: left; width: 100%; }

/* flying stars */
.flystar { position: fixed; z-index: 95; font-size: 26px; color: #ffc61a; text-shadow: 0 2px 0 #b07a00; pointer-events: none; animation: fly 1.1s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes fly { 0% { transform: scale(.4); opacity: 0; } 20% { transform: scale(1.3); opacity: 1; } 100% { left: var(--tx); top: var(--ty); transform: scale(.6); opacity: .9; } }

/* new games */
.meter { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 18px 0 18px 18px; }
.mq { border: 0; border-radius: 16px; min-height: 92px; background: var(--c); color: #fff; font-weight: 800; font-size: 13.5px; padding: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.25); box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.mq.on { outline: 4px solid var(--ink); outline-offset: 2px; transform: scale(1.03); }
.ax { position: absolute; font-size: 11px; font-weight: 800; color: var(--muted); }
.ax-y { left: -14px; top: 50%; transform: rotate(-90deg); } .ax-x { right: 0; bottom: 0; }
.mwords .opt { border-color: var(--c); }
.dots30 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.dots30 i { aspect-ratio: 1; border-radius: 50%; background: var(--soft); border: 2px solid var(--line); }
.dots30 i.on { background: #ffd25a; border-color: #f0b400; }
.pct { text-align: center; font-family: "Baloo 2", sans-serif; font-size: 30px; font-weight: 800; color: var(--accent-2); }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel > div { display: grid; gap: 6px; background: var(--soft); border-radius: 16px; padding: 10px; }
.duel span { background: #fff; border-radius: 10px; padding: 4px 8px; font-weight: 700; font-size: 14px; }
.duel span.same { background: #dff7e9; outline: 2px solid #2fbf71; }
.pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pic { border: 3px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; background: var(--soft); aspect-ratio: 1; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.on { border-color: var(--accent); transform: scale(.96); }
.strip, .e-strip { display: flex; gap: 6px; } .strip img, .e-strip img { width: 32%; border-radius: 10px; border: 2px solid var(--line); aspect-ratio: 1; object-fit: cover; }
.iq { display: grid; gap: 6px; }
.iqi { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 14px; padding: 9px 12px; font-weight: 700; font-size: 14.5px; }
.iqi input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--accent-2); }
.dyk { display: grid; gap: 8px; }
.dyk-i { background: var(--soft); border-radius: 16px; padding: 10px 12px; display: grid; gap: 8px; }
.dyk-i p { font-weight: 700; }
.dyk-i span { display: flex; gap: 8px; }
.dyk-i button { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 7px; font-weight: 800; }
.dyk-i button.on[data-v="y"] { background: #dff7e9; border-color: #2fbf71; } .dyk-i button.on[data-v="n"] { background: #fff4d6; border-color: #ffb400; }
.dyk-res { display: grid; gap: 10px; }
.chip-pick .opt.on { background: #fff4d6; border-color: var(--gold); }
.topics .opt.on, .opts[data-k] .opt.on { background: #fff4d6; border-color: var(--gold); }

/* book */
.bstats { display: flex; gap: 8px; flex-wrap: wrap; }
.bstats span { background: var(--soft); border-radius: 12px; padding: 6px 10px; font-size: 13px; color: var(--ink-2); } .bstats b { font-family: "Baloo 2", sans-serif; font-size: 16px; color: var(--ink); }
.bfilter { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 12px; scrollbar-width: none; }
.bfilter::-webkit-scrollbar { display: none; }
.bfilter button { flex: none; border: 0; background: rgba(255,255,255,.85); border-radius: 99px; padding: 7px 12px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.bfilter button.on { background: var(--ink); color: #fff; }

/* parent: questions from the child */
.pitem.ask textarea { margin-top: 4px; }
.pitem .askq { text-align: left; font-size: 17px; }

/* onboarding worlds */
.ob-themes { grid-template-columns: 1fr 1fr; }
.ob-theme { padding: 6px; gap: 4px; }
.ob-theme.on { border-color: var(--accent); background: #fff7f2; }
.ob-theme.island { border-color: var(--line); background: #fff; } .ob-theme.island.on { border-color: var(--accent); background: #fff7f2; }
.ob-map { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background-size: cover; background-position: center 40%; }
.ob-map img { width: 54%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.ob-theme small { color: var(--muted); font-weight: 700; font-size: 12px; }

/* themes page with the new art */
.tc-art { background-size: cover; background-position: center 45%; min-height: 130px; }
.tc-b { width: 92px !important; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); }
.free { display: inline-block; vertical-align: middle; font-size: 11px; letter-spacing: .08em; background: #2fbf71; color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 4px; }

/* visiting a friend's world */
.map.mini { border-radius: 20px; }
.map.mini .bld { width: 28%; cursor: default; } .map.mini .bld.lv0 { width: 16%; }

@media (prefers-reduced-motion: reduce) { .map .bld .spr, .ring, .plus, .amb i, .mission, .map-island::after, .burst { animation: none !important; } }

.s-world { padding-bottom: 120px; }
.host img { pointer-events: auto; cursor: pointer; }
.host .bubble { transition: opacity .35s, transform .35s; transform-origin: 0 100%; }
.host.folded .bubble { opacity: 0; transform: scale(.4); pointer-events: none; }
.host.folded img { width: 60px; }

/* ============ AI avatar ============ */
.av-ways { display: grid; gap: 8px; }
.way { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: 0 3px 0 var(--line); }
.way span { grid-row: span 2; font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--soft); border-radius: 14px; }
.way b { font-size: 16px; } .way small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.way:first-child { border-color: #ffb48f; background: linear-gradient(180deg, #fff, #fff5ef); }
.av-big { width: 170px; height: 170px; object-fit: contain; border-radius: 50%; background: radial-gradient(circle, #fff3e4, #ffe0c2); padding: 8px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.12)); }
.av-face { display: inline-block; flex: none; border-radius: 50%; background-color: #ffe9d6; background-size: 230%; background-position: 50% 6%; background-repeat: no-repeat; }
.me-on-map { position: absolute; width: 22%; transform: translate(-50%, -82%); border: 0; background: none; padding: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; }
.me-on-map img { width: 100%; filter: drop-shadow(0 6px 5px rgba(10, 30, 60, .35)); animation: hop 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.me-on-map::after { content: ""; width: 70%; height: 10px; margin-top: -6px; border-radius: 50%; background: rgba(0,0,0,.18); filter: blur(2px); }
.suit { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: linear-gradient(90deg, #7a5cfa, #ff4f8b); color: #fff; font-weight: 800; font-size: 11.5px; border-radius: 99px; padding: 4px 10px; border: 2px solid #fff; box-shadow: 0 3px 0 rgba(80, 30, 120, .35); animation: pulse 1.6s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0) scale(1, 1); } 78% { transform: translateY(0) scale(1.06, .94); } 86% { transform: translateY(-14%) scale(.97, 1.03); } 94% { transform: translateY(0) scale(1.03, .97); } }
.drawing { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0; position: relative; }
.dhost { width: 130px; animation: bob 1.6s ease-in-out infinite; }
.brush { position: absolute; top: 20px; right: 28%; font-size: 40px; animation: paint 1.2s ease-in-out infinite; }
@keyframes paint { 0%, 100% { transform: rotate(-20deg) translate(0, 0); } 50% { transform: rotate(15deg) translate(-12px, 8px); } }
.dmsg { font-weight: 800; color: var(--ink-2); min-height: 1.4em; }
.dbar { width: 80%; height: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.dbar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, #ffd25a, #ff7a59, #ff4f8b); animation: load 1.4s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.av-result { width: 220px !important; position: relative; z-index: 1; }
.check-row { display: flex; gap: 10px; align-items: center; font-weight: 800; background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent-2); }
.opt.swc { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.opt.swc.on { box-shadow: 0 0 0 3px var(--ink); }
.dsc .opt.on, .opt.tog.on { background: #fff4d6; border-color: var(--gold); }
.dsc .opt.swc.on { background-color: inherit; }
.e-img.cut { object-fit: contain; max-height: 220px; background: radial-gradient(circle, #fff7ec, #ffe6cc); padding: 8px; }
.field.code input { letter-spacing: .1em; }

/* ============ v3: no mascot, line icons, the avatar messenger ============ */
.ic { width: 1.2em; height: 1.2em; vertical-align: -.22em; flex: none; }
.tabbar button span { position: relative; display: grid; place-items: center; height: 28px; }
.tabbar button span .ic { width: 24px; height: 24px; }
.tabbar .dot { position: absolute; top: -2px; right: -8px; width: 10px; height: 10px; border-radius: 50%; background: #ff4f5e; border: 2px solid #fff; }
.ge .ic { width: 24px; height: 24px; color: var(--ink-2); }
.game:not(.locked) .ge { background: linear-gradient(160deg, #fff3e9, #ffe0cc); } .game:not(.locked) .ge .ic { color: var(--accent-2); }
.g-emo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(160deg, #fff3e9, #ffd9c2); color: var(--accent-2); }
.g-emo .ic { width: 30px; height: 30px; }
.m-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.2); } .m-ico .ic { width: 22px; height: 22px; }
.hud-snd { display: grid; place-items: center; color: var(--ink); } .hud-snd .ic { width: 20px; height: 20px; }
.moodb .ic { width: 34px; height: 34px; color: var(--accent-2); margin-bottom: 2px; }
.e-b .ic { width: 14px; height: 14px; }
.big-emo .ic { width: 64px; height: 64px; color: #2fbf71; }
.pi-e { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--soft); } .pi-e .ic { width: 22px; height: 22px; color: var(--ink-2); }
.way span .ic { width: 24px; height: 24px; color: var(--accent-2); }
.ep-e .ic { width: 42px; height: 42px; color: #ffd25a; }
.tot-card { font-size: 26px; padding: 32px 12px; letter-spacing: -.01em; }
.sub { text-shadow: none; }
/* the tip that replaces the mascot */
.tip { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); width: min(436px, calc(100% - 24px)); z-index: 12; display: flex; gap: 10px; align-items: center;
  background: rgba(20, 24, 48, .82); color: #fff; backdrop-filter: blur(10px); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; cursor: pointer; }
.tip .ic { color: #ffd25a; width: 20px; height: 20px; } .tip b { color: #ffd25a; }
.tip.gone { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
/* onboarding hero without a mascot */
.ob-art { width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; background-size: cover; background-position: center 40%; display: grid; place-items: center; box-shadow: inset 0 -40px 60px rgba(0,0,0,.15); }
.ob-art img { width: 46%; filter: drop-shadow(0 10px 10px rgba(0,0,0,.3)); animation: floaty 3s ease-in-out infinite; }
.ob-brand { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--accent-2); margin-top: 4px; }
.ob-map img { width: 46%; }
/* friends + messenger */
.friend.big { padding: 12px 16px; }
.f-img { width: 64px; height: 64px; object-fit: contain; flex: none; background: radial-gradient(circle at 50% 60%, #eaf2ff, #d6e4ff); border-radius: 50%; padding: 3px; }
.f-img.sm { width: 44px; height: 44px; } .f-img.xl { width: 140px; height: 140px; margin: 0 auto; display: block; }
.send-btn { width: calc(100% - 24px); margin: 10px 12px 0; }
.trips { text-align: center; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.92); margin: 6px 0 4px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.proto-btn { width: calc(100% - 24px); margin: 10px 12px; font-size: 13px; }
.s-friends > .btn.big { width: calc(100% - 24px); margin: 12px; }
.visit-banner { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 0 12px 4px; border: 3px solid #fff; border-radius: 20px; padding: 8px 14px 8px 8px; text-align: left; background: linear-gradient(100deg, #7a5cfa, #ff4f8b); color: #fff; box-shadow: 0 6px 0 rgba(80, 30, 120, .35), var(--shadow); animation: wiggle 3s ease-in-out infinite; }
.visit-banner img { width: 54px; height: 54px; object-fit: contain; background: rgba(255,255,255,.25); border-radius: 50%; }
.visit-banner small { display: block; font-size: 10.5px; letter-spacing: .14em; font-weight: 800; opacity: .9; } .visit-banner b { font-size: 15px; line-height: 1.2; }
.visit-banner > .ic { margin-left: auto; width: 22px; height: 22px; }
.plan { display: flex; align-items: center; gap: 10px; background: #fff; margin: 8px 12px; border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow); }
.plan > .ic { width: 22px; height: 22px; color: var(--accent-2); } .plan span { flex: 1; min-width: 0; } .plan b { display: block; } .plan small { color: var(--muted); font-weight: 700; }
.send-hero { display: flex; align-items: center; justify-content: center; gap: 10px; }
.send-me, .send-to { width: 96px; height: 96px; object-fit: contain; }
.send-me.svgfig svg { width: 96px; height: 96px; }
.send-arrow { width: 30px !important; height: 30px !important; color: var(--accent-2); animation: floaty 1.4s ease-in-out infinite; }
.kinds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.kind { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 2px; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; box-shadow: 0 3px 0 var(--line); }
.kind .ic { width: 24px; height: 24px; color: var(--accent-2); } .kind.on { border-color: var(--accent); background: #fff4ee; }
.kind-body { display: grid; gap: 10px; }
.opts.col { flex-direction: column; align-items: stretch; } .opts.col .opt { border-radius: 14px; text-align: left; }
.opts .opt.on { background: #fff4d6; border-color: var(--gold); }
.gifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gift { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 12px 4px; display: grid; justify-items: center; gap: 4px; font-weight: 800; font-size: 13px; box-shadow: 0 3px 0 var(--line); }
.gift .ic { width: 30px; height: 30px; color: #ff4f8b; } .gift.on { border-color: #ff4f8b; background: #fff0f6; }
.tw { position: relative; } .tw textarea { padding-right: 60px; }
.cnt { position: absolute; right: 12px; bottom: 10px; font-size: 12px; font-weight: 800; color: var(--muted); } .cnt.near { color: #e0533f; }
.preview { text-align: center; font-family: "Baloo 2", sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); min-height: 1.3em; }
/* the trip */
.trip { position: fixed; inset: 0; z-index: 70; background: linear-gradient(180deg, rgba(20, 24, 60, .55), rgba(20, 24, 60, .8)); display: grid; place-items: center; align-content: center; gap: 16px; backdrop-filter: blur(4px); }
.trip-stage { width: min(420px, 100vw); height: 220px; position: relative; overflow: hidden; }
.walker { position: absolute; bottom: 10px; width: 150px; }
.walker .w-img { width: 150px; height: 150px; object-fit: contain; display: block; filter: drop-shadow(0 8px 8px rgba(0,0,0,.35)); }
.walker .svgfig svg { width: 150px; height: 150px; }
.walker.go { animation: walk-out 3s ease-in forwards; } .walker.back { animation: walk-in 1.7s ease-out forwards; }
.walker.go .w-img, .walker.back .w-img { animation: step .35s ease-in-out infinite alternate; }
.walker.back .w-img { transform: scaleX(-1); }
.carry { position: absolute; top: -8px; right: -6px; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); color: #ff4f8b; }
.carry .ic { width: 26px; height: 26px; }
.trip-msg { color: #fff; font-family: "Baloo 2", sans-serif; font-size: 22px; font-weight: 800; text-align: center; }
@keyframes walk-out { 0% { left: 50%; transform: translateX(-50%); } 25% { left: 50%; transform: translateX(-50%) translateY(-6px); } 100% { left: 120%; transform: translateX(0); } }
@keyframes walk-in { from { left: 115%; transform: translateX(0); } to { left: 50%; transform: translateX(-50%); } }
@keyframes step { from { translate: 0 0; rotate: -3deg; } to { translate: 0 -6px; rotate: 3deg; } }
.reply-card { display: grid; justify-items: center; gap: 10px; }
.r-img { width: 150px; height: 150px; object-fit: contain; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.r-bubbles { display: grid; gap: 8px; width: 100%; }
.b-me, .b-them { border-radius: 18px; padding: 10px 14px; font-size: 16px; max-width: 85%; }
.b-me { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.b-them { justify-self: start; background: var(--soft); border-bottom-left-radius: 4px; }
.reply-card.in .b-them { justify-self: center; font-size: 18px; text-align: center; border-radius: 18px; }
.private { display: grid; gap: 10px; justify-items: center; }
.lock-ic { width: 40px !important; height: 40px !important; color: #7a5cfa; }
/* a friend's avatar standing on your map */
.visitor { position: absolute; width: 15%; transform: translate(-50%, -82%); border: 0; background: none; padding: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; }
.visitor img { width: 100%; filter: drop-shadow(0 6px 5px rgba(10, 30, 60, .35)); animation: hop 1.8s ease-in-out infinite; }
.vb { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #fff; color: var(--ink); border-radius: 14px; padding: 5px 10px; font-weight: 800; font-size: 12px; box-shadow: 0 4px 0 rgba(20,30,70,.18); animation: pulse 1.4s ease-in-out infinite; }
.vb::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }

/* ============ v4: item pictures, sharing with friends, dark mode ============ */
.it { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.tot-card { display: grid; justify-items: center; gap: 6px; padding: 16px 12px 18px; }
.tot-img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0,0,0,.12)); }
.opt.pico { display: inline-flex; align-items: center; gap: 2px; }
.chips.pics span { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px 4px 6px; }
.chips.pics .it { width: 26px; height: 26px; margin-right: 2px; }
.rk { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 11px; margin-right: 4px; }
.react { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 14px; padding: 6px 10px; font-size: 14px; }
.react img { width: 30px; height: 30px; object-fit: contain; }
.e-foot .sent { margin-left: 0; margin-right: auto; }
.share-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 99px; padding: 7px 14px; font-weight: 800; font-size: 13.5px; background: var(--soft); color: var(--ink); }
.share-btn .ic { width: 16px; height: 16px; color: var(--accent-2); }
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.target { border: 2px solid var(--line); background: var(--card, #fff); border-radius: 20px; padding: 12px 8px; display: grid; justify-items: center; gap: 4px; box-shadow: 0 3px 0 var(--line); color: var(--ink); }
.target img { width: 64px; height: 64px; object-fit: contain; }
.target .t-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #ffe9ef; color: #ff4f8b; } .target .t-ic .ic { width: 30px; height: 30px; }
.target small { color: var(--muted); font-weight: 700; font-size: 12px; } .target:disabled { opacity: .5; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--soft); padding: 4px; border-radius: 16px; }
.seg button { border: 0; background: none; border-radius: 12px; padding: 9px 4px; font-weight: 800; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--card, #fff); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* ---- dark mode ---- */
:root { --card: #ffffff; }
body.dark { --ink: #eef1ff; --ink-2: #c4c9e8; --muted: #8f96bf; --card: #1a1e38; --line: #2d3357; --soft: #252a4a; --tab: rgba(20, 24, 48, .95); --shadow: 0 10px 30px rgba(0, 0, 0, .45); color-scheme: dark; }
body.dark:not([data-theme="space"]) { background: linear-gradient(180deg, #172042, #0a0d22) fixed !important; }
body.dark.parent { background: #0e1126 !important; }
body.dark .map { filter: brightness(.8) saturate(1.05); }
body.dark .entry, body.dark .pagehead, body.dark .sheet, body.dark .game, body.dark .opt, body.dark .cat, body.dark .pred, body.dark .tcard, body.dark .earn,
body.dark .pcard, body.dark .friend, body.dark .plan, body.dark .moodb, body.dark .ep, body.dark .way, body.dark .kind, body.dark .gift, body.dark .dyk-i button,
body.dark .me, body.dark .hud-snd, body.dark .map .bname, body.dark .stk, body.dark .ob-card, body.dark .empty, body.dark .bfilter button:not(.on), body.dark .soon span,
body.dark .pitem, body.dark .preview-bar, body.dark .ob-theme, body.dark .both, body.dark .iqi, body.dark .dyk-i, body.dark .duel span, body.dark .wres li, body.dark .bubble { background: var(--card); color: var(--ink); border-color: var(--line); }
body.dark .tot-card { background: #262b52; box-shadow: 0 5px 0 #151935; color: var(--ink); }
body.dark .tot-card:last-of-type { background: #1f3550; box-shadow: 0 5px 0 #11203a; }
body.dark .tot-card.chosen { background: #1d4a3a; }
body.dark .hud-stars { background: linear-gradient(180deg, #3a3110, #5a4610); color: #ffd25a; border-color: #2d3357; }
body.dark .me { border-color: #2d3357; }
body.dark .note { background: #2b2614; border-color: #6b5a1c; color: #f3e2a6; }
body.dark .tabbar { border-top-color: #2d3357; }
body.dark .tabbar button.on { background: #2a2f55; color: #ffb48f; }
body.dark .bfilter button.on, body.dark .cat.on { background: #ff7a59; color: #fff; }
body.dark .opt.on, body.dark .opts .opt.on, body.dark .chip-pick .opt.on, body.dark .dsc .opt.on, body.dark .opt.tog.on { background: #3b3216; border-color: #ffb400; color: #ffe08a; }
body.dark .game:not(.locked) .ge, body.dark .g-emo, body.dark .way span { background: #3a2a2a; }
body.dark .entry.sealed { background: linear-gradient(135deg, #1a1e38, #2a2150); }
body.dark .sub, body.dark .trips, body.dark .s-friends .fine { color: #c4c9e8; }
body.dark textarea, body.dark input:not([type=file]):not([type=checkbox]), body.dark select { background: var(--soft); color: var(--ink); border-color: var(--line); }
body.dark .drop { background: var(--soft); border-color: var(--line); color: var(--ink-2); }
body.dark .b-them { background: var(--soft); }
body.dark .levelup .unlocks { background: #2b2614; border-color: #6b5a1c; }
body.dark .e-img.cut, body.dark .av-big, body.dark .f-img { background: radial-gradient(circle, #2a2f55, #1a1e38); }
body.dark .chips span { background: var(--soft); color: var(--ink); }
body.dark .proto { background: rgba(0, 0, 0, .55); }
body.dark .x { background: var(--soft); color: var(--ink); }
body.dark .target .t-ic { background: #3a1f2c; }
.tot-card span { font-size: 24px; line-height: 1.1; }
body.dark .screen .pagehead { background: var(--card); color: var(--ink); }
body.dark .pbtn { background: #2a2f55; color: var(--ink); }
body.dark .bstats span { background: var(--soft); }
body.dark .vb { color: #1d2340; }

/* build-spot ring: a circle whose dashes travel around, laid flat on the ground (rotate the inner circle, squash the outer box) */
.map .ring { width: 150%; aspect-ratio: 1; border: 0; border-radius: 0; transform: translate(-50%, -50%) scaleY(.42); animation: pulse2 1.6s ease-in-out infinite; }
.map .ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .95); animation: spin 9s linear infinite; }

/* install */
.pbtn.inst { display: inline-flex; align-items: center; gap: 5px; background: #ffd25a; color: #3a2a00; }
.pbtn.inst .ic { width: 14px; height: 14px; }
.inst-row { width: 100%; }
.install { display: grid; gap: 10px; justify-items: center; }
.inst-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--shadow); }
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; width: 100%; counter-reset: st; }
.steps li { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 15px; }
.st-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--card, #fff); display: grid; place-items: center; color: var(--accent-2); }
.st-ic .ic { width: 22px; height: 22px; }
.proto > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
