/* ───── boot + logo ───── */
.boot { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: var(--bg); }
.boot-mark { width: 96px; height: 96px; background: url(/brand/klukla-mark@2x.png) center/contain no-repeat; animation: bootBob .55s var(--ease) infinite alternate; }
@keyframes bootBob { to { transform: translateY(-14px) rotate(-8deg); box-shadow: 0 20px 0 -6px rgba(37, 30, 82, .25); } }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--surface3); border-top-color: var(--coral); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: .01em; color: var(--ink); }
.logo > span:first-child { flex: none; display: block; }
.logo-mark { height: 56px; width: auto; object-fit: contain; transition: transform .3s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
/* the word in a red badge with a darker rim, like the controller in the logo */
.logo-text { display: inline-block; background: var(--coral); color: #fff; padding: 1px 13px 5px; border-radius: 13px 13px 17px 17px; box-shadow: inset 0 -4px 0 #e33733, 0 0 0 2px #e33733; line-height: 1.15; }

/* ───── app chrome: one bar along the top (components/shell.js), then the page ───── */
body[data-layout="app"] #app { display: block; min-height: 100dvh; }
.maincol { min-width: 0; display: flex; flex-direction: column; }
/* top bar */
.topbar { position: sticky; top: 0; z-index: 90; min-height: calc(var(--topbar-h) + var(--safe-t)); padding: var(--safe-t) clamp(14px, 3vw, 36px) 0; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top-logo { flex: none; } .top-logo .logo { font-size: 24px; gap: 8px; } .top-logo .logo-mark { height: 50px; width: auto; }
.tnavs { display: flex; gap: 4px; flex: none; margin-left: 6px; }
.tnav { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 99px; font-weight: 800; color: var(--ink2); white-space: nowrap; border: 2px solid transparent; transition: background .15s, color .15s; }
.tnav svg { width: 20px; height: 20px; } .tnav-emoji { font-size: 19px; line-height: 1; }
.tnav:hover { background: var(--fill); color: var(--ink); }
.tnav.on { background: var(--coral); color: #fff; border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); }
#tnav-kids.on { background: var(--sun); color: var(--ink); }
.top-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.mechip { display: flex; align-items: center; gap: 8px; height: 44px; max-width: 180px; padding: 0 12px 0 5px; border-radius: 99px; border: 2px solid var(--line2); background: var(--surface); transition: border-color .15s; }
.mechip:hover, .mechip.on { border-color: var(--edge); }
.mename { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .gear.on { border-color: var(--edge); }
.tsearch { position: relative; flex: 0 1 380px; min-width: 120px; }
.tsearch svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.tsearch-in { width: 100%; height: 48px; border-radius: 99px; border: 2px solid var(--line2); background: var(--surface); padding: 0 18px 0 46px; font-weight: 700; outline: none; transition: border-color .15s, box-shadow .15s; }
.tsearch-in:hover { border-color: var(--faint); }
.tsearch-in:focus { border-color: var(--edge); box-shadow: 0 0 0 4px var(--sky-soft); }
.tsearch-in::placeholder { color: var(--faint); }
.questbtn.ready { background: var(--sun-soft); border-color: var(--edge); }
.questbtn.ready svg { animation: giftWiggle 2.4s ease-in-out infinite; }
body:not([data-layout="app"]) .topbar { display: none !important; }
#view { min-height: calc(100dvh - var(--topbar-h)); outline: none; }
body[data-layout="app"] #view { container: main / inline-size; }
body[data-layout="bare"] #view, body[data-layout="game"] #view { min-height: 100dvh; }
.view-in { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } }

/* smaller screens: the page buttons lose their words first, then everything moves onto two rows */
@media (max-width: 1180px) { .mename { display: none; } .mechip { padding: 0 3px; } }
@media (max-width: 1020px) { .tnav { padding: 0 12px; } .tnav-t { display: none; } .tnav-emoji { font-size: 21px; } }
@media (max-width: 719px) {
  :root { --topbar-h: 58px; }
  .topbar { flex-wrap: wrap; row-gap: 6px; gap: 6px; padding: var(--safe-t) 12px 8px; }
  .top-logo .logo { font-size: 22px; } .top-logo .logo-mark { height: 44px; }
  .tnavs { order: 5; margin-left: 0; flex: 1 1 100%; }
  .tnav { flex: 1; justify-content: center; height: 40px; padding: 0 10px; } .tnav-t { display: inline; }
  .tsearch { display: none; }              /* the Games page has its own search box */
  .top-acts { gap: 6px; }
  .topbar .stars-pill { height: 40px; font-size: 16px; padding-right: 10px; } .topbar .stars-pill .st { width: 22px; height: 22px; }
  .topbar .iconbtn, .mechip { width: 40px; height: 40px; } .mechip { justify-content: center; }
}
@media (max-width: 520px) { .topbar .gear { display: none; } .tnav { gap: 6px; } }
@media (max-width: 400px) { .top-logo .logo-text { display: none; } .questbtn { display: none; } }

/* ───── pages ───── */
.page { width: min(100%, 1240px); margin: 0 auto; padding: 6px clamp(14px, 3vw, 36px) 80px; }
/* rows that scroll sideways (genre chips, game rows) run out to the edge of the screen instead of being cut off at the page's padding */
.page { --gutter: clamp(14px, 3vw, 36px); }
.page .hscroll { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
/* the genre chips wrap onto more lines instead of running off the side, so every genre is visible */
.page .chips.cats, .page .lib-chips { flex-wrap: wrap; overflow: visible; row-gap: 12px; padding-bottom: 6px; }
@media (max-width: 520px) { .page .chips.cats, .page .lib-chips { gap: 8px; row-gap: 10px; } .page .chips.cats .chip, .page .lib-chips .chip { height: 38px; padding: 0 12px; font-size: 14px; gap: 6px; } .page .chips.cats .chip .emoji { font-size: 16px; } }
.page.narrow { max-width: 800px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 46px); }
.page-head p { margin-top: 6px; }
.kicker { display: inline-block; font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); margin-bottom: 6px; }
.small { font-size: 13px; } .center { text-align: center; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grouphead { font-weight: 900; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.frow { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; transition: background .15s; }
.frow:hover { background: var(--fill); }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 18px; margin-bottom: 8px; background: var(--surface); border: 2px solid var(--line2); }
.notif.unread { border-color: var(--edge); background: var(--grape-soft); }
.notif .ni { font-size: 24px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line2); border-radius: 14px; flex: none; }
.notif .ni .av { width: 40px; height: 40px; }
.ftile { flex: none; width: 152px; padding: 16px 12px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ftile b, .ftile small { max-width: 100%; }
.ft-av { position: relative; } .ft-av .dot { position: absolute; right: -3px; bottom: -3px; }
.friends-empty { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.friends-empty > div:nth-child(2) { flex: 1; min-width: 200px; }
.fe-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; background: var(--grape-soft); border: 2px solid var(--edge); transform: rotate(-5deg); }
/* daily gift + quests (top-bar drawer) */
.daily { display: grid; gap: 4px; }
.today-gift { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 18px; background: var(--sun-soft); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); }
.today-gift .tg-ic { font-size: 32px; line-height: 1; animation: giftWiggle 2.4s ease-in-out infinite; }
.today-gift .tg-copy { flex: 1; min-width: 0; display: grid; }
@keyframes giftWiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-10deg) scale(1.08); } 80% { transform: rotate(10deg) scale(1.08); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } }
.quest { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line2); }
.quest .q-ic { font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface3); flex: none; }
.quest .q-copy { flex: 1; min-width: 0; display: grid; gap: 4px; } .quest .q-copy b { font-size: 14px; } .quest .progress { height: 10px; border-width: 1.5px; }
.quest.done { border-color: var(--edge); background: var(--sun-soft); }
.quest.done .progress i { background: repeating-linear-gradient(-45deg, var(--sun) 0 10px, #ffd35c 10px 20px); }
.quest.claimed { opacity: .55; } .quest .q-done { color: var(--good); width: 24px; }

/* ───── home ───── */
.hub-hello { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; }
.hub-hello h1 { font-size: clamp(28px, 3.4vw, 40px); }
.hub-hello p { color: var(--muted); font-weight: 700; margin-top: 2px; }
.hub-hello .wave { display: inline-block; transform-origin: 70% 80%; animation: wave 2.6s ease-in-out 1s 2; }
@keyframes wave { 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } 50% { transform: none; } }
/* ───── Featured: one short row of picture tiles (views/hub.js), four at once on a computer, swipe on a phone ───── */
.feat { --cols: 4; margin-bottom: clamp(18px, 2.4vw, 28px); }
.feat-head { margin-bottom: 12px; }
.feat-navs { display: none; gap: 8px; margin-left: auto; }
.feat.scrolls .feat-navs { display: flex; }
.feat-nav { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font: 800 24px/1 var(--display); color: var(--ink); background: var(--surface); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); transition: transform .12s, opacity .2s; }
.feat-nav:hover:not(:disabled) { transform: translateY(-1px); } .feat-nav:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.feat-nav:disabled { opacity: .35; cursor: default; }
.feat-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * 16px) / var(--cols)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 2px 8px; margin: -2px -2px 0; }
.feat-row::-webkit-scrollbar { display: none; }
.feat-tile { --accent: var(--grape); position: relative; scroll-snap-align: start; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; border: 2px solid var(--edge); box-shadow: 0 5px 0 var(--edge); background: color-mix(in srgb, var(--accent) 30%, var(--surface)); animation: rise .45s var(--ease) both; animation-delay: calc(min(var(--i), 5) * 50ms); transition: transform .2s var(--ease); }
.feat-tile:hover { transform: translateY(-3px); }
.feat-link { position: absolute; inset: 0; display: block; color: #fff; }
.feat-art { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.feat-tile:hover .feat-art { transform: scale(1.04); }
.feat-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 34px 96px 10px 12px; background: linear-gradient(transparent, rgba(12, 10, 22, .55) 38%, rgba(12, 10, 22, .88)); }
.feat-name { font: 700 clamp(16px, 1.35vw, 19px)/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.feat-live { font-size: 12.5px; font-weight: 800; color: #d9d5ea; }
.feat-live.on { color: #7ef0c2; } .feat-live.on::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #3fd99a; vertical-align: 1px; }
.feat-play { position: absolute; right: 10px; bottom: 10px; z-index: 1; gap: 4px; }
.feat-play svg { width: 14px; height: 14px; }
.feat.skeleton { height: clamp(150px, 13vw, 210px); border-radius: var(--r-lg); background: linear-gradient(100deg, var(--surface3) 30%, var(--surface) 50%, var(--surface3) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@media (max-width: 1180px) { .feat { --cols: 3; } }
@media (max-width: 860px) { .feat { --cols: 2; } }
@media (max-width: 560px) { .feat-row { grid-auto-columns: 80%; gap: 12px; } .feat-info { padding-right: 88px; } }
@media (hover: none) { .feat.scrolls .feat-navs { display: none; } }
@media (prefers-reduced-motion: reduce) { .feat-tile, .feat-art, .feat-row { animation: none; transition: none; scroll-behavior: auto; } }
.hub-body { display: contents; }
.cats { padding-top: 2px; }
.cats .chip { border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); background: var(--c, var(--surface)); }
.cats .chip:hover { box-shadow: 0 4px 0 var(--edge); }
.cats .chip:nth-child(6n+1) { --c: var(--coral-soft); } .cats .chip:nth-child(6n+2) { --c: var(--sky-soft); } .cats .chip:nth-child(6n+3) { --c: var(--mint-soft); }
.cats .chip:nth-child(6n+4) { --c: var(--sun-soft); } .cats .chip:nth-child(6n+5) { --c: var(--grape-soft); } .cats .chip:nth-child(6n+6) { --c: var(--pink-soft); }

/* ───── games list ───── */
.lib-tools { flex-wrap: wrap; }
.searchbox { position: relative; } .searchbox .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.searchbox .input { padding-left: 44px; width: min(100%, 280px); height: 46px; border-radius: 99px; }
@media (min-width: 720px) { .lib-search { display: none; } }      /* the top bar's search box does it on bigger screens */
.lib-chips { margin-bottom: 8px; }

/* ───── game page ───── */
.gd-back { margin-bottom: 14px; }
.gd-hero { --accent: var(--grape); position: relative; border-radius: var(--r-xl); padding: clamp(18px, 3vw, 36px); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); background: color-mix(in srgb, var(--accent) 20%, var(--surface)); overflow: hidden; isolation: isolate; }
.gd-hero::before { content: ""; position: absolute; z-index: -1; left: -12%; bottom: -55%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.gd-hero::after { content: ""; position: absolute; z-index: -1; right: -10px; top: -10px; width: 34%; height: 50%; background-image: radial-gradient(color-mix(in srgb, var(--accent) 48%, var(--surface)) 2.4px, transparent 2.8px); background-size: 20px 20px; }
.gd-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(18px, 3.4vw, 44px); align-items: center; }
.gd-art { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 10; border: 2px solid var(--edge); box-shadow: 0 8px 0 var(--edge); transform: rotate(-2deg); background: var(--surface); transition: transform .4s var(--spring); }
.gd-hero:hover .gd-art { transform: rotate(0) scale(1.01); }
.gd-art img { width: 100%; height: 100%; object-fit: cover; }
.gd-side { display: grid; gap: 12px; min-width: 0; align-content: center; }
.gd-pills { flex-wrap: wrap; gap: 6px; }
.gd-pills .pill { background: var(--surface); border: 1.5px solid var(--edge); font-size: 12.5px; }
.gd-pills .pill.live { background: var(--mint-soft); }
.gd-side h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.02; }
.gd-desc { color: var(--ink2); font-size: 17px; font-weight: 700; }
.gd-head { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-hs { display: grid; justify-items: center; padding: 6px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--edge); min-width: 86px; }
.gd-hs b { font: 600 21px var(--display); line-height: 1.15; } .gd-hs b.score { color: #c98400; }
.gd-hs small { font-size: 10.5px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.gd-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.gd-play { min-height: 66px; font-size: 25px; letter-spacing: .06em; flex: 1 1 220px; max-width: 380px; }
.gd-play svg.ico { width: 26px; height: 26px; }
.gd-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 8px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line2); font-weight: 800; font-size: 14px; }
.gd-chip i { font-style: normal; font-size: 19px; line-height: 1; }
.gd-hint { margin: -2px 0 0; font-weight: 700; }
.gd-hero .petneed { margin-bottom: 0; }
.gd-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 24px; align-items: start; }
.gd-body .card h2 { font-size: 22px; margin-bottom: 14px; }
.gd-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gd-vote p { margin-bottom: 12px; }
.petneed { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; border-radius: 20px; background: var(--sun-soft); border: 2px solid var(--edge); }
.petneed > div:nth-child(2) { flex: 1; min-width: 180px; } .pn-ic { font-size: 34px; }
.ach-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ach { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line2); }
.ach > div:nth-child(2) { flex: 1; min-width: 0; }
.ach:not(.done) { color: var(--muted); } .ach:not(.done) b { color: var(--ink2); }
.ach.done { background: var(--sun-soft); border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); }
.ach-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--surface3); flex: none; }
.ach.done .ach-ic { background: var(--surface); border: 2px solid var(--edge); transform: rotate(-5deg); }
/* the 2D | 3D choice, for games that come in both versions (game page and Settings) */
.modeswitch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 99px; background: var(--surface); border: 2px solid var(--edge); }
.modeswitch button { min-width: 52px; height: 40px; padding: 0 14px; border-radius: 99px; font: 600 16px var(--display); color: var(--muted); transition: background .2s, color .2s; }
.modeswitch button.on { color: #fff; background: var(--grape); }
.gd-view { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--ink2); }

/* ───── profile ───── */
.p-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 4vw, 48px); align-items: center; padding: clamp(18px, 3vw, 36px); border-radius: var(--r-xl); background: var(--sky-soft); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); }
.p-hero::before { content: ""; position: absolute; z-index: -1; right: -8%; bottom: -60%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: rgba(74, 168, 255, .14); }
.p-stage { position: relative; width: clamp(210px, 25vw, 290px); aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; border: 2px solid var(--edge); background: radial-gradient(70% 45% at 50% 88%, #fff 0 30%, transparent 70%), linear-gradient(180deg, #fff8ee, var(--grape-soft)); }
.p-stage .stage3d, .ae-stage .stage3d { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.p-stage .stage3d:active, .ae-stage .stage3d:active { cursor: grabbing; }
.p-stage > .av-art { position: absolute; inset: 6% 8% 4%; width: auto; height: auto; }
.p-stage.p-badge { width: auto; aspect-ratio: auto; border: 0; background: none; overflow: visible; display: grid; place-items: center; }
.p-stage.p-badge .p-pet { width: 64px; right: -18px; bottom: -6px; }
.p-stage.p-badge .av { width: clamp(110px, 14vw, 150px); height: clamp(110px, 14vw, 150px); box-shadow: 0 6px 0 var(--edge); }
.p-pet { position: absolute; right: 2%; bottom: 3%; width: 36%; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(37, 30, 82, .25)); }
.stage-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--edge); font-size: 12px; font-weight: 900; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.stage-hint.gone { opacity: 0; }
.p-info h1 { font-size: clamp(30px, 5vw, 50px); }
.p-handle { color: var(--muted); font-weight: 800; margin-top: 4px; }
.lvl { display: flex; align-items: center; gap: 12px; margin: 18px 0; max-width: 480px; }
.lvl .progress { flex: 1; }
.lvl-badge { font-family: var(--display); background: var(--sun); color: #15131f; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--edge); font-weight: 600; white-space: nowrap; }
.lvl small { font-weight: 800; }
.next-reward { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line2); font-size: 14px; max-width: 480px; } .next-reward .nr-ic { font-size: 20px; } .next-reward .link { margin-left: auto; }
.p-actions { flex-wrap: wrap; }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.pstat { padding: 16px 18px; border-radius: var(--r-lg); background: var(--c, var(--surface)); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pstat:nth-child(1) { --c: var(--sun-soft); } .pstat:nth-child(2) { --c: var(--coral-soft); } .pstat:nth-child(3) { --c: var(--mint-soft); } .pstat:nth-child(4) { --c: var(--grape-soft); }
.pstat small { color: var(--ink2); font-weight: 900; text-transform: uppercase; font-size: 11px; letter-spacing: .1em; }
.pstat b { font: 600 clamp(20px, 3vw, 28px) var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; }
.recent-i { --accent: var(--grape); flex: none; width: 180px; border-radius: 20px; overflow: hidden; background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); padding: 5px; transition: transform .25s var(--spring); }
.recent-i:hover { transform: translateY(-4px) rotate(-1deg); }
.recent-i img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: 14px; } .recent-i b { display: block; padding: 8px 6px 4px; font-size: 14px; }

/* ───── avatar editor ───── */
.ae-grid { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ae-left { position: sticky; top: calc(var(--topbar-h) + 12px); }
.ae-stage { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); background: radial-gradient(70% 45% at 50% 88%, #fff 0 30%, transparent 70%), linear-gradient(180deg, var(--sky-soft), var(--grape-soft)); }
.ae-stage > .av-art { position: absolute; inset: 6% 10% 4%; width: auto; height: auto; }
.ae-actions { margin-top: 18px; justify-content: space-between; flex-wrap: wrap; }
.ae-right.card { padding: 18px; }
.ae-tabs { margin: -4px -4px 12px; flex-wrap: wrap; gap: 6px; }
.ae-tabs .tab { padding: 8px 14px; }
.ae-subs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 14px; }
.ae-subs::-webkit-scrollbar { display: none; } .ae-subs[hidden] { display: none; }
.ae-subs .chip { height: 38px; padding: 0 14px; font-size: 14px; }
.ae-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.opt { position: relative; border-radius: 20px; padding: 8px 6px; background: var(--surface2); border: 2px solid var(--line2); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .2s var(--spring), border-color .15s, background .15s; }
.opt:hover { transform: translateY(-3px); border-color: var(--edge); }
.opt.on { background: var(--sun-soft); border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); }
.opt-art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.opt small { font-weight: 800; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.15; min-height: 28px; }
.opt.on small { color: var(--ink); }
.opt.locked .opt-art { opacity: .55; filter: grayscale(.5); }
.opt-lock { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.7); color: #fff; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 900; }
.opt-lock svg { width: 12px; height: 12px; }
.opt.r-rare:not(.on) { border-color: #a9d6ff; }
.opt.r-epic:not(.on) { border-color: #c9b2ff; background: var(--grape-soft); }
.opt.r-legendary:not(.on) { border-color: #f2c94c; background: var(--sun-soft); }
.av-art { width: 100%; height: 100%; display: grid; place-items: center; } .av-art > img { width: 100%; height: 100%; object-fit: contain; }
.av-art.incoming { position: absolute; inset: 0; }
img.thumb3d { opacity: 0; transition: opacity .15s; } img.thumb3d.ready { opacity: 1; }
.ae-colors { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 2px dashed var(--line2); }
.ae-colors:empty { display: none; }
.ae-colors > .muted { font-weight: 800; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--edge); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7); transition: transform .2s var(--spring); }
.swatch.big { width: 60px; height: 60px; } .swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--sun), 0 0 0 5px var(--edge); }
.ae-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.ae-label { margin: 18px 0 10px; font-weight: 900; color: var(--muted); font-size: 14px; }
.buy-prev { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 24px; background: var(--surface2); border: 2px solid var(--line2); display: grid; place-items: center; padding: 8px; }

/* ───── store ───── */
.store-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 3vw, 38px); border-radius: var(--r-xl); background: var(--mint-soft); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); }
.store-hero::before { content: ""; position: absolute; z-index: -1; right: 12%; top: -70%; width: 34%; aspect-ratio: 1; border-radius: 50%; background: rgba(47, 212, 163, .14); }
.store-hero::after { content: "🛍️"; position: absolute; z-index: -1; right: 24%; bottom: -12px; font-size: 92px; opacity: .2; transform: rotate(-12deg); }
.store-hero h1 { font-size: clamp(34px, 5vw, 54px); } .store-hero p { color: var(--ink2); font-weight: 700; max-width: 540px; margin-top: 6px; }
.stars-pill.big { height: 66px; font-size: 30px; padding: 0 26px 0 12px; box-shadow: 0 5px 0 var(--edge); } .stars-pill.big .st { width: 42px; height: 42px; }
.store-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.scard { --rb: var(--surface2); position: relative; display: flex; flex-direction: column; text-align: left; border-radius: 22px; background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); padding: 7px 7px 9px; gap: 8px; transition: transform .2s var(--spring), box-shadow .2s; overflow: hidden; animation: rise .4s var(--ease) both; }
.scard:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--edge); }
.scard:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--edge); }
.scard.r-rare { --rb: var(--sky-soft); } .scard.r-epic { --rb: var(--grape-soft); } .scard.r-legendary { --rb: var(--sun-soft); }
.scard.r-legendary::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%); transform: translateX(-100%); animation: shine 3.4s infinite; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.sc-art { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 16px; background: var(--rb); display: grid; place-items: center; padding: 8px; }
.ipreview { width: 100%; height: 100%; display: grid; place-items: center; } .ipreview svg { width: 100%; height: 100%; }
.sc-art .ipreview { position: absolute; inset: 8px; width: auto; height: auto; }
.ipreview.emojibox .emoji { font-size: clamp(46px, 7vw, 66px); filter: drop-shadow(0 6px 6px rgba(37, 30, 82, .2)); }
.ipreview.lg { width: 134px; height: 134px; } .ipreview.lg .emoji { font-size: 80px; }
.sc-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 0 4px; } .sc-info b { font-size: 15px; line-height: 1.2; }
.sc-price { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 13px; font: 600 18px var(--display); background: var(--sun); border: 2px solid var(--edge); color: #15131f; }
/* the Store's front page: browse chips, shelves (horizontal rows), the list header */
.store-browse { display: flex; flex-wrap: nowrap; gap: 8px; margin: 4px calc(-1 * var(--gutter, 16px)) 12px; padding: 4px var(--gutter, 16px); overflow-x: auto; scrollbar-width: none; } .store-browse::-webkit-scrollbar { display: none; } .store-browse .chip { flex: none; }
@media (min-width: 900px) { .store-browse { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } } .store-browse .chip.on { background: var(--coral); color: #fff; }
.store-shelves { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.store-row .scard { flex: 0 0 172px; scroll-snap-align: start; }
.store-listhead { display: flex; justify-content: flex-end; align-items: center; margin: 4px 0 10px; } .store-listhead > .row { margin-right: auto; }
.store-listtitle { margin: 0; font-size: 22px; } .store-sort { display: flex; align-items: center; gap: 8px; } .store-sort select { width: auto; height: 40px; }
.store [hidden] { display: none !important; }
.sc-marks { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.sc-mark { padding: 2px 8px; border-radius: 99px; font: 700 12px var(--display); border: 2px solid var(--edge); background: var(--surface); color: var(--ink); }
.sc-mark.sale { background: var(--coral); color: #fff; } .sc-mark.feat { background: var(--sun); } .sc-mark.new { background: var(--mint); } .sc-mark.limited { background: var(--sky-soft); }
.scard.featured { box-shadow: 0 0 0 3px var(--sun), var(--pop); }
.sc-was { font-size: 14px; opacity: .6; margin-right: 2px; } .buy-deal { margin: 10px 0 0; font-weight: 700; color: var(--bad); }
.sc-price .st { width: 22px; height: 22px; } .sc-price svg.ico { width: 18px; height: 18px; }
.sc-price.cant { background: var(--surface3); color: var(--muted); border-color: var(--line2); }
.sc-price.own { background: var(--mint-soft); color: var(--good); border-color: var(--line2); }
.sc-price.reward { background: var(--grape-soft); color: #5a2fd6; border-color: var(--line2); }

/* ───── settings / parent ───── */
.srow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 2px dashed var(--line); } .srow:last-child { border: 0; padding-bottom: 0; } .srow:first-child { padding-top: 0; }
.srow > div:first-child { min-width: 0; }
.set-me { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.set-me b { font-size: 21px; font-family: var(--display); font-weight: 600; }
.name-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.name-wait { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; background: var(--surface3); }
.name-wait .emoji { font-size: 26px; } .name-wait > div { flex: 1; min-width: 0; }
.name-ask { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .name-ask > div { flex: 1; min-width: 180px; }
.ticks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; } .ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink2); font-weight: 700; } .ticks li svg { color: var(--good); margin-top: 2px; }
.card.safety { background: var(--mint-soft); border-color: var(--edge); }
.card h3 { font-size: 21px; }
.gate { max-width: 440px; margin: 40px auto; padding: 34px 26px; } .gate-ic { width: 76px; height: 76px; border-radius: 24px; background: var(--grape); color: #fff; border: 2px solid var(--edge); box-shadow: var(--pop); display: grid; place-items: center; margin: 0 auto 16px; transform: rotate(-5deg); } .gate-ic svg { width: 38px; height: 38px; }
.gate h2 { margin-bottom: 6px; font-size: 28px; } .gate .input { margin-top: 18px; }
.usage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; } .usage .card { display: flex; flex-direction: column; } .usage b { font: 600 32px var(--display); }
.prow { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 2px dashed var(--line); flex-wrap: wrap; } .prow:last-child { border: 0; }
.p-ic { width: 48px; height: 48px; border-radius: 15px; background: var(--grape-soft); border: 2px solid var(--edge); display: grid; place-items: center; flex: none; }
.p-txt { flex: 1 1 200px; min-width: 0; } .p-ctl { flex: none; max-width: 100%; }
.field { display: grid; gap: 4px; }

/* ───── landing ───── */
.landing { position: relative; overflow: hidden; }
.l-header { position: relative; z-index: 5; display: flex; align-items: center; gap: 14px; width: min(100%, 1280px); margin: 0 auto; padding: calc(var(--safe-t) + 18px) clamp(16px, 4vw, 48px) 0; }
.l-header .logo, .l-header .btn { flex: none; white-space: nowrap; }      /* never squeezed or pushed off the screen */
@media (max-width: 560px) { .l-header .l-head-play { display: none; } .l-header { gap: 10px; } }
@media (max-width: 380px) { .l-header .logo { font-size: 22px; gap: 7px; } .l-header .logo-mark { height: 48px; width: auto; } .l-header .btn-sm { padding-inline: 12px; font-size: 14px; } }   /* small phones and iPhone Display Zoom (320 wide) */
.l-link { color: var(--ink2); font-weight: 800; padding: 8px 12px; border-radius: 12px; white-space: nowrap; } .l-link:hover { background: var(--fill); color: var(--ink); }
.l-hero { width: min(100%, 1280px); margin: 0 auto; min-height: min(calc(100dvh - 80px), 760px); padding: 30px clamp(16px, 4vw, 48px) 50px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px; align-items: center; }
.l-hero > * { min-width: 0; }
.l-title { display: flex; flex-direction: column; font-size: clamp(40px, 5.4vw, 72px); line-height: 1; letter-spacing: -.005em; margin: 18px 0 18px; font-weight: 700; }
.l-title span { display: block; width: fit-content; animation: rise .7s var(--ease) both; }
.w1 { color: var(--ink); } .w2 { color: var(--coral); animation-delay: .1s !important; } .w3 { color: var(--sun); animation-delay: .2s !important; }
.l-sub { font-size: clamp(19px, 2.3vw, 25px); color: var(--ink2); max-width: 500px; font-weight: 800; }
.l-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.l-have { margin: 16px 0 0; }
.l-trust { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 8px 14px; border-radius: 99px; background: var(--mint-soft); color: #0b5c45; font-weight: 800; font-size: 14px; } .l-trust svg { color: var(--good); }
.l-hero-art { position: relative; height: clamp(360px, 44vw, 560px); }
.l-blob { position: absolute; inset: 6% 2% 4% 6%; border-radius: 44% 56% 52% 48% / 52% 44% 56% 48%; background: var(--sun-soft); border: 2px solid var(--edge); }
.float-card { --accent: var(--grape); position: absolute; width: 54%; border-radius: 24px; overflow: hidden; background: var(--surface); border: 2px solid var(--edge); box-shadow: 0 7px 0 var(--edge); padding: 6px; }
.float-card img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: 18px; } .float-card span { display: block; padding: 8px 8px 4px; font: 600 17px var(--display); }
.float-card.f0 { right: 0; top: 0; transform: rotate(5deg); animation: floatA 7s ease-in-out infinite; } .float-card.f1 { left: 0; top: 30%; transform: rotate(-6deg); animation: floatB 8s ease-in-out infinite; z-index: 2; } .float-card.f2 { right: 6%; bottom: 0; transform: rotate(3deg); animation: floatA 9s 1s ease-in-out infinite; z-index: 3; width: 46%; }
@keyframes floatA { 50% { transform: translateY(-14px) rotate(3deg); } } @keyframes floatB { 50% { transform: translateY(12px) rotate(-3deg); } }
.float-star { position: absolute; z-index: 4; } .float-star .st { width: 46px; height: 46px; filter: drop-shadow(0 3px 0 var(--edge)); }
.float-star.s1 { left: 38%; top: -2%; animation: bob 3s infinite; } .float-star.s2 { left: 2%; top: 12%; animation: bob 4s 1s infinite; } .float-star.s3 { right: 44%; bottom: 6%; animation: bob 3.5s .5s infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.l-shape { position: absolute; z-index: 1; border: 2px solid var(--edge); }
.l-shape.c1 { width: 54px; height: 54px; border-radius: 50%; background: var(--mint); right: 4%; top: 46%; animation: bob 5s infinite; }
.l-shape.c2 { width: 40px; height: 40px; border-radius: 12px; background: var(--pink); left: 30%; bottom: 2%; transform: rotate(18deg); }
.l-strip { width: min(100% - 32px, 1180px); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.l-feat { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; background: var(--c); border: 2px solid var(--edge); box-shadow: var(--pop); font-weight: 800; }
.l-feat i { font-style: normal; font-size: 30px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--edge); flex: none; transform: rotate(-5deg); }
.l-feat b { display: block; font: 600 19px var(--display); }
.l-feat small { color: var(--ink2); font-weight: 700; }
.l-feat:nth-child(1) { --c: var(--coral-soft); } .l-feat:nth-child(2) { --c: var(--sky-soft); } .l-feat:nth-child(3) { --c: var(--mint-soft); } .l-feat:nth-child(4) { --c: var(--sun-soft); }
.l-sec { width: min(100%, 1280px); margin: 0 auto; padding: 64px clamp(16px, 4vw, 48px); }
.l-sec-head { margin-bottom: 26px; } .l-sec-head h2, .l-split h2, .l-cta-band h2 { font-size: clamp(32px, 4.6vw, 52px); } .l-sec-head.center { text-align: center; }
.l-sec .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (min-width: 900px) { .l-sec .grid { grid-template-columns: repeat(3, 1fr); } }
.l-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.l-split > * { min-width: 0; }
.l-split-copy p { color: var(--ink2); font-size: 19px; margin-top: 14px; max-width: 490px; font-weight: 700; }
.friends-art { position: relative; height: 360px; border-radius: var(--r-xl); background: var(--sky-soft); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); overflow: hidden; }
.friends-art::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: -40%; height: 70%; border-radius: 50%; background: rgba(74, 168, 255, .14); border-top: 2px solid var(--edge); }
.room-chip { position: absolute; left: 50%; top: 22px; transform: translateX(-50%) rotate(-2deg); text-align: center; padding: 8px 22px; border-radius: 18px; background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); z-index: 2; } .room-chip small { display: block; font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 900; } .room-chip b { font: 700 30px var(--display); letter-spacing: .14em; color: var(--coral); }
.lobby-heads { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; gap: clamp(8px, 2vw, 20px); z-index: 1; }
.lobby-heads .av { width: clamp(70px, 9vw, 104px); height: clamp(70px, 9vw, 104px); box-shadow: 0 5px 0 var(--edge); animation: bob 4s ease-in-out infinite; }
.lobby-heads .av:nth-child(2) { animation-delay: .5s; margin-bottom: 18px; } .lobby-heads .av:nth-child(3) { animation-delay: 1s; } .lobby-heads .av:nth-child(4) { animation-delay: 1.5s; margin-bottom: 18px; }
.bubble { position: absolute; z-index: 3; background: var(--surface); color: var(--ink); font-weight: 900; padding: 7px 14px; border-radius: 16px; border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); animation: bob 3s ease-in-out infinite; } .b1 { left: 7%; top: 40%; } .b2 { left: 47%; top: 34%; font-size: 22px; } .b3 { right: 6%; top: 46%; }
.bubble.tag { font-size: 15px; white-space: nowrap; } .friends-art .bubble.tag.b1 { left: 6%; top: 46%; } .friends-art .bubble.tag.b2 { left: 50%; top: 40%; transform: translateX(-50%); font-size: 15px; } .friends-art .bubble.tag.b3 { right: 5%; top: 52%; }
.friends-art .room-chip b { white-space: nowrap; font-size: clamp(20px, 3vw, 26px); letter-spacing: .04em; }
@media (max-width: 560px) { .friends-art .bubble.tag { font-size: 13px; padding: 5px 10px; } .friends-art .bubble.tag.b1 { top: 42%; left: 3%; } .friends-art .bubble.tag.b2 { top: 30%; } .friends-art .bubble.tag.b3 { top: 48%; right: 3%; } }
.l-split-copy .l-note { font-size: 15px; color: var(--muted); margin-top: 14px; }
.cc-art { position: relative; height: 460px; border-radius: var(--r-xl); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); overflow: hidden; background: radial-gradient(70% 45% at 50% 88%, #fff 0 30%, transparent 70%), linear-gradient(180deg, var(--grape-soft), var(--pink-soft)); }
.cc-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.cc-stage .stage3d { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.cc-wait { font-size: 64px; animation: bob 2s infinite; }
.cc-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.one-flow { display: grid; grid-template-columns: 1fr 70px 1.2fr; align-items: center; gap: 10px; }
.one-core { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 26px 20px; border-color: var(--edge); box-shadow: 0 5px 0 var(--edge); background: var(--grape-soft); }
.one-core .av { width: 120px; height: 120px; }
.one-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .one-tags .pill { background: var(--surface); border: 1.5px solid var(--edge); }
.one-lines { height: 6px; background: repeating-linear-gradient(90deg, var(--edge) 0 10px, transparent 10px 20px); background-size: 20px 6px; animation: dash 1s linear infinite; border-radius: 4px; } @keyframes dash { to { background-position: 20px 0; } }
.one-games { display: grid; gap: 12px; } .one-game { --accent: var(--grape); display: flex; align-items: center; gap: 12px; padding: 7px 18px 7px 7px; border-radius: 20px; background: var(--surface); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); } .one-game img { width: 88px; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px; } .one-game span { font: 600 18px var(--display); }
.l-cta-band { text-align: center; width: min(100% - 32px, 1180px); margin: 20px auto 40px; padding: 56px 20px 60px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-radius: var(--r-xl); background: var(--coral); color: #fff; border: 2px solid var(--edge); box-shadow: 0 7px 0 var(--edge); position: relative; overflow: hidden; isolation: isolate; }
.l-cta-band::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 2.4px, transparent 2.8px); background-size: 22px 22px; }
.l-cta-band p { margin-bottom: 14px; font-size: 19px; font-weight: 800; opacity: .95; }
.l-cta-band .btn { --b: var(--sun); --c: var(--ink); }
.l-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; width: min(100%, 1280px); margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) calc(var(--safe-b) + 28px); color: var(--muted); font-weight: 700; font-size: 14px; border-top: 2px dashed var(--line2); }
.l-footer a { color: var(--ink2); font-weight: 800; } .l-footer a:hover { text-decoration: underline; }

/* ───── who's playing / link / friend code ───── */
.login { min-height: 100dvh; display: flex; flex-direction: column; }
.login-top { display: flex; align-items: center; padding: calc(var(--safe-t) + 18px) clamp(16px, 4vw, 40px); width: min(100%, 1280px); margin: 0 auto; }
.login-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 16px 60px; }
.login-main h1 { font-size: clamp(36px, 6vw, 58px); margin-bottom: 8px; }
.login-main > p.muted { font-weight: 700; font-size: 17px; }
.who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 32px; max-width: 820px; }
.who-tile { position: relative; }
.who-btn { width: 156px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 16px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); transition: transform .25s var(--spring), box-shadow .2s; }
.who-btn:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 9px 0 var(--edge); }
.who-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--edge); }
.who-btn b { font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-av { width: 108px; height: 108px; margin-bottom: 8px; }
.who-av.av { border-width: 2px; }
.who-av.plus { border-radius: 50%; background: var(--coral); color: #fff; border: 2px solid var(--edge); display: grid; place-items: center; } .who-av.plus svg { width: 50px; height: 50px; }
.who-tile:nth-child(4n+1) .who-btn { background: var(--sun-soft); } .who-tile:nth-child(4n+2) .who-btn { background: var(--sky-soft); } .who-tile:nth-child(4n+3) .who-btn { background: var(--mint-soft); } .who-tile:nth-child(4n+4) .who-btn { background: var(--pink-soft); }
.who-tile:last-child .who-btn { background: var(--surface); border-style: dashed; box-shadow: none; }
.who-x { position: absolute; top: -10px; right: -10px; width: 36px; height: 36px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; border: 2px solid var(--edge); } .who-x svg { width: 18px; height: 18px; }
.login-main p a:not(.btn) { color: var(--sky); font-weight: 800; }
.login-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.linkbox { text-align: center; display: grid; gap: 12px; justify-items: center; max-width: 380px; }
.linkcode { font: 700 clamp(24px, 8.5vw, 46px)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; padding: 12px 16px; max-width: 100%; white-space: nowrap; border-radius: 16px; background: var(--sun-soft); border: 2px solid var(--edge); user-select: all; }
.linkqr { width: 190px; padding: 10px; border-radius: 14px; background: var(--surface); border: 2px solid var(--edge); } .linkqr svg { display: block; width: 100%; height: auto; }
.linkinput { margin-top: 24px; text-align: center; font: 700 28px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; max-width: 320px; height: 64px; border-color: var(--edge); }
.link-msg { min-height: 24px; margin: 10px 0 0; color: var(--bad); font-weight: 800; }
.login-main .btn-lg { margin-top: 16px; } .l-have { margin: 14px 0 0; }
.friend-av { width: 130px; height: 130px; margin: 0 auto 12px; box-shadow: 0 5px 0 var(--edge); }
.big-emoji { font-size: 60px; margin-bottom: 8px; }

/* privacy page */
.legal { min-height: 100vh; }
.legal-body { max-width: 780px; margin: 0 auto 40px; padding: 8px clamp(16px, 4vw, 32px) calc(var(--safe-b) + 48px); line-height: 1.6; }
.legal-body h1 { font-size: clamp(30px, 5vw, 44px); margin: 8px 0 4px; }
.legal-sec h2 { font-size: 22px; margin: 32px 0 8px; }
.legal-sec p, .legal-sec li, .legal-box li { font-weight: 600; color: var(--ink2); }
.legal-sec ul, .legal-box ul { margin: 8px 0 8px 20px; padding: 0; } .legal-sec li, .legal-box li { margin: 6px 0; }
.legal-box { margin: 22px 0 6px; padding: 18px 22px; border-radius: 20px; background: var(--mint-soft); border: 2px solid var(--edge); box-shadow: var(--pop); }
.legal-box.kids { background: var(--sun-soft); } .legal-box.kids p { margin: 6px 0 0; font-weight: 600; }
.legal-table { overflow-x: auto; margin: 10px 0; border: 2px solid var(--edge); border-radius: 16px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 15px; } .legal-table th, .legal-table td { white-space: normal; text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--edge); font-weight: 600; color: var(--ink2); }
.legal-table th { background: var(--sky-soft); font-weight: 800; color: var(--ink); } .legal-table tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .legal-table table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; } .legal-table thead { display: none; } .legal-table tr { padding: 8px 0; border-bottom: 1px solid var(--edge); } .legal-table td { border: 0; padding: 2px 12px; white-space: normal; overflow-wrap: anywhere; } .legal-table td:first-child { font-weight: 800; color: var(--ink); } }
.contact-list p { margin: 0 0 12px; font-weight: 600; } .contact-list p:last-child { margin: 0; } .contact-list b { display: block; }
.legal a.btn { text-decoration: none; color: inherit; }
.legal a { color: var(--sky); text-decoration: underline; font-weight: 800; }

/* ───── game host ───── */
.play-root { position: fixed; inset: 0; background: #000; }
.play-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); touch-action: none; }
.play-loader { --accent: var(--grape); position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; overflow: hidden; transition: opacity .5s; background: color-mix(in srgb, var(--accent) 20%, var(--bg)); background-image: radial-gradient(color-mix(in srgb, var(--accent) 40%, var(--surface)) 2.4px, transparent 2.8px); background-size: 24px 24px; }
.play-loader.out { opacity: 0; pointer-events: none; }
.pl-card { position: relative; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 18px; }
.pl-card img { width: min(70vw, 340px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; border: 2px solid var(--edge); box-shadow: 0 7px 0 var(--edge); transform: rotate(-2deg); animation: bob 2.4s ease-in-out infinite; }
.pl-card h2 { font-size: 34px; margin-top: 8px; }
.pl-card .spinner { width: 36px; height: 36px; border-width: 4px; }
.play-handle { position: absolute; z-index: 3; right: 0; top: 38%; width: 32px; height: 64px; border-radius: 18px 0 0 18px; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); border-right: 0; display: grid; place-items: center; opacity: .7; transition: .2s; padding-right: env(safe-area-inset-right); box-sizing: content-box; } .play-handle:hover, .play-handle:active { opacity: 1; width: 42px; } .play-handle svg { width: 20px; height: 20px; }
/* the menu tab: can be dragged (play-handle.js), snaps to the left or right edge, and fades to a thin sliver when idle so it never covers a game */
.play-handle { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; transition: width .2s, opacity .2s; }
.play-handle.left { right: auto; left: 0; border-radius: 0 18px 18px 0; border-left: 0; border-right: 2px solid var(--edge); padding-right: 0; padding-left: env(safe-area-inset-left); }
.play-handle.mini { width: 12px; opacity: .35; } .play-handle.mini svg { opacity: 0; }
.play-handle.dragging { transition: none; opacity: 1; width: 42px; cursor: grabbing; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.play-chat-btn.left { right: auto; left: 0; border-radius: 0 18px 18px 0; border-left: 0; border-right: 2px solid var(--edge); padding-right: 0; padding-left: env(safe-area-inset-left); }
.play-chat-btn { position: absolute; z-index: 3; right: 0; top: calc(38% + 76px); width: 32px; height: 52px; border-radius: 18px 0 0 18px; background: var(--surface); border: 2px solid var(--edge); border-right: 0; font-size: 20px; display: grid; place-items: center; opacity: .75; transition: .2s; padding-right: env(safe-area-inset-right); box-sizing: content-box; } .play-chat-btn:hover, .play-chat-btn:active { opacity: 1; width: 42px; }
.play-feed { position: absolute; z-index: 3; bottom: calc(env(safe-area-inset-bottom) + 14px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; max-width: 92vw; }
.pf-msg { display: flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .94); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); font-size: 15px; font-weight: 700; color: var(--ink); animation: qchat-pop .2s var(--spring); transition: opacity .4s; white-space: nowrap; }
.pf-msg b { color: var(--grape); } .pf-msg.me b { color: var(--mint); } .pf-msg.big span { font-size: 24px; line-height: 1; } .pf-msg.out { opacity: 0; }
.pmenu { display: grid; gap: 10px; }
.pm-stars { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--sun-soft); border: 2px solid var(--line2); font-size: 22px; font-family: var(--display); } .pm-stars .st { width: 30px; height: 30px; }
.pm-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); text-align: left; font-size: 18px; transition: transform .12s, box-shadow .12s; }
.pm-item:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--edge); } .pm-item:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.pm-item svg { width: 22px; height: 22px; }
.pm-item.primary { background: var(--coral); color: #fff; }
.phrases { display: flex; flex-wrap: wrap; gap: 8px; } .emotes { display: flex; flex-wrap: wrap; gap: 8px; }
.emote { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line2); font-size: 30px; transition: transform .2s var(--spring), border-color .15s; } .emote:hover { transform: scale(1.1); border-color: var(--edge); }
/* "turn your phone" screen (play.js: checkOrientation) */
.play-rotate { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: var(--sky-soft); }
.play-rotate h2 { font-size: clamp(26px, 6vw, 36px); } .play-rotate p { margin: 0; font-weight: 700; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.pr-phone { width: 76px; height: 126px; border-radius: 18px; border: 4px solid var(--edge); background: var(--surface); box-shadow: 0 5px 0 var(--edge); position: relative; margin-bottom: 8px; animation: prTurn 2.6s ease-in-out infinite; }
.pr-phone i { position: absolute; left: 50%; bottom: 8px; width: 22px; height: 5px; margin-left: -11px; border-radius: 3px; background: var(--edge); }
.play-rotate.want-portrait .pr-phone { animation-name: prUpright; transform: rotate(90deg); }
@keyframes prTurn { 0%, 15% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@keyframes prUpright { 0%, 15% { transform: rotate(90deg); } 55%, 85% { transform: rotate(0); } 100% { transform: rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .pr-phone { animation: none; } }

/* ───── admin ───── */
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 16px 80px; } .ad-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; } .stat { display: flex; flex-direction: column; } .stat b { font: 600 34px var(--display); }
/* admin Overview: what needs a person, number cards with a trend, the panels */
.ov-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ov-need { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 18px; border: 0; cursor: pointer; font: inherit; color: var(--ink); background: var(--fill2); }
.ov-need b { grid-row: 1 / span 2; font: 600 28px var(--display); min-width: 34px; text-align: center; }
.ov-need span { font-weight: 800; font-size: 14px; line-height: 1.2; } .ov-need small { font-size: 12px; color: var(--muted); }
.ov-need.clear { background: var(--mint-soft); } .ov-need.clear b { color: var(--good); font-size: 22px; }
.ov-need.todo { background: var(--sun-soft); box-shadow: inset 0 0 0 2px var(--warn); }
.ov-need.urgent { background: var(--coral-soft); box-shadow: inset 0 0 0 2px var(--bad); } .ov-need.urgent b { color: var(--bad); }
.ov-need:hover { filter: brightness(.97); } .ov-need:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.ov-tile { gap: 2px; } .ov-tile b { font-size: 30px; }
.ov-spark { width: 100%; height: 26px; margin-top: 8px; } .ov-spark polyline { fill: none; stroke: var(--sky); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ov-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.ov-panel h3 { margin: 0 0 10px; font-size: 17px; } .ov-panel p { margin: 10px 0 0; }
.ov-switches, .ov-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ov-switches li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.ov-switches li b { font-size: 13px; text-align: right; } .ov-switches li.warn b { color: var(--bad); }
.ov-switches .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .ov-switches .dot.on { background: var(--good); } .ov-switches .dot.warn { background: var(--bad); }
.ov-kv li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; } .ov-kv li:last-child { border-bottom: 0; }
.ov-kv li.bad b { color: var(--bad); }
.ov-errors { margin-top: 16px; padding: 16px 18px; } .ov-errors h3 { margin: 0 0 8px; }
.ov-err-list { display: flex; flex-direction: column; gap: 6px; } .ov-err { border: 1.5px solid var(--edge); border-radius: 12px; padding: 8px 12px; background: var(--surface); }
.ov-err summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .ov-err-msg { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.ov-err-stack { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--sky-soft); padding: 8px 10px; border-radius: 10px; max-height: 220px; overflow: auto; }
.ov-server { margin: 12px 2px 0; } .ov-server b { color: var(--ink); } .ov-server .bad { color: var(--bad); font-weight: 800; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; } th.sortable:hover { color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; } .linkbtn:hover { text-decoration: underline; color: var(--sky); }
.tablewrap { overflow-x: auto; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line2); } table { width: 100%; border-collapse: collapse; font-size: 14px; } th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; } th { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
/* admin Store items: the glance, rows, the New item and Edit dialogs */
.sp-glance { margin-bottom: 12px; } .sp-glance .stat b { font-size: 28px; } .sp-unsold { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sp-top ol { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; } .sp-top li b { font: 700 14px inherit; font-family: inherit; }
.ag-row.sp-row { grid-template-columns: 20px 72px minmax(0, 1fr) 70px 104px 64px 52px auto; }
.sp-pic { width: 72px; height: 72px; border-radius: 12px; background: var(--surface3); display: grid; place-items: center; overflow: hidden; flex: none; }
.sp-pic.lg { width: 220px; height: 220px; border-radius: 20px; } .sp-pic img { width: 100%; height: 100%; object-fit: contain; }
.sp-emoji { font-size: 38px; line-height: 1; } .sp-pic.lg .sp-emoji { font-size: 110px; }
.sp-tint i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; box-shadow: 0 0 0 1px var(--line2); }
.sp-sale { background: var(--coral-soft) !important; } .sp-lim { background: var(--sky-soft) !important; }
.sp-price b s { font-weight: 500; font-size: 12px; }
.sp-modal { max-width: 760px !important; width: min(760px, 94vw); text-align: left; max-height: 92vh; overflow: auto; }
.sp-kinds { margin: 10px 0 12px; }
.sp-new { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.sp-preview { position: sticky; top: 0; } .sp-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .sp-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .sp-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--edge, var(--line2)); cursor: pointer; }
.sp-swatches input[type=color] { width: 44px; height: 34px; border: 0; background: none; cursor: pointer; }
.sp-icon { font-size: 28px; height: 52px; width: 90px; } .sp-check { gap: 8px; align-items: center; } .sp-more summary { cursor: pointer; font-weight: 700; margin: 4px 0; }
.sp-salebox { border: 2px dashed var(--line2); border-radius: 14px; padding: 8px 12px 12px; } .sp-salebox legend { font-weight: 800; padding: 0 6px; }
.sp-ai-ask { gap: 8px; margin: 10px 0; flex-wrap: wrap; } .sp-ai-ask .input:first-child { flex: 1 1 240px; } .sp-ai-ask select { width: auto; }
.sp-ai-out { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; } .sp-ai-title { margin: 4px 0 0; }
.sp-ai-wait { display: flex; gap: 10px; align-items: center; padding: 18px; border-radius: 14px; background: var(--grape-soft); font-weight: 700; }
.sp-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--grape); border-right-color: transparent; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.sp-ai-err { color: var(--bad); font-weight: 700; }
.sp-ai-list { display: flex; flex-direction: column; gap: 8px; }
.sp-ai-item { display: grid; grid-template-columns: 20px 72px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line) inset; }
.sp-ai-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .sp-ai-fields p { margin: 0; } .sp-ai-price { width: 90px; height: 38px; }
.sp-ai-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding-top: 6px; border-top: 2px dashed var(--line); }
.sp-tip { padding: 12px 14px; }
@media (max-width: 760px) {
  .ag-row.sp-row { grid-template-columns: 20px 56px minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: 't i m m e' '. p p s s' '. o o en en'; }
  .sp-row > .sp-pic { grid-area: i; width: 56px; height: 56px; } .sp-price { grid-area: p; } .sp-sold { grid-area: s; } .sp-own { grid-area: o; }
  .sp-new { grid-template-columns: 1fr; } .sp-preview { position: static; justify-self: center; } .sp-pic.lg { width: 160px; height: 160px; } .sp-parts, .sp-two { grid-template-columns: 1fr; }
}
/* admin Players tab: sections, rows, the details dialogs */
.pa-nav { margin-bottom: 14px; flex-wrap: wrap; } .pa-nav button { white-space: nowrap; }
.ag-row.pa-row { grid-template-columns: 52px minmax(0, 1fr) 56px 76px 130px auto; } .ag-row.pa-grow { grid-template-columns: 44px minmax(0, 1fr) 96px 104px 130px auto; }
.pa-av { position: relative; width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--surface3); overflow: hidden; display: grid; place-items: center; } .ag-row .pa-av img, .pa-av img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; }
.pa-av.lg { width: 88px; height: 88px; border-radius: 22px; flex: none; }
.pa-dot { position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--surface); }
.pa-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--grape-soft); }
.pa-when b { font-size: 13px; white-space: nowrap; }
.pa-modal { max-width: 900px !important; width: min(900px, 95vw); text-align: left; max-height: 92vh; overflow: auto; }
.pa-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; } .pa-head h3 { margin: 0; } .pa-head p { margin: 2px 0 6px; }
.pa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pa-box { border-radius: 16px; padding: 12px 14px; box-shadow: 0 0 0 2px var(--line) inset; margin-top: 12px; } .pa-grid .pa-box { margin-top: 0; }
.pa-box h4 { margin: 0 0 8px; font-size: 15px; } .pa-box p { margin: 4px 0 8px; }
.pa-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; } .pa-kv dt { color: var(--muted); } .pa-kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pa-actions { display: flex; flex-direction: column; gap: 10px; } .pa-actions .btn { align-self: flex-start; }
.pa-danger { box-shadow: 0 0 0 2px var(--coral-soft) inset; background: color-mix(in srgb, var(--coral-soft) 35%, transparent); } .pa-danger .input { max-width: 320px; }
.pa-picker { display: flex; flex-direction: column; gap: 6px; } .pa-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.pa-pick { display: flex; gap: 8px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; border: 0; background: var(--surface3); cursor: pointer; font: inherit; color: var(--ink); }
.pa-pick .sp-pic { width: 48px; height: 48px; } .pa-pick .sp-emoji { font-size: 26px; } .pa-pick.on { box-shadow: 0 0 0 3px var(--sky) inset; background: var(--sky-soft); } .pa-pick small { display: block; }
.pa-two, .pa-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; } .pa-form .btn { justify-self: start; }
.pa-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; } .pa-on { background: var(--mint-soft) !important; }
.pa-due { margin-top: 14px; padding-top: 10px; border-top: 2px dashed var(--line); } .pa-due h4 { margin: 0 0 4px; }
.pa-explain { margin-bottom: 12px; padding: 12px 16px; } .pa-explain summary { cursor: pointer; font-weight: 800; } .pa-explain ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.5; }
.pa-hint { font-size: 12px; }
@media (max-width: 760px) {
  .ag-row.pa-row, .ag-row.pa-grow { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; } .pa-row > .ag-main, .pa-grow > .ag-main { flex: 1 1 calc(100% - 170px); min-width: 0; order: 1; text-align: left; } .pa-row > .pa-av, .pa-grow > .pa-ic { order: 0; } .pa-row > .ag-edit, .pa-grow > .ag-edit { order: 2; }
  .pa-row > .ag-num, .pa-grow > .ag-num { order: 3; flex-direction: row; gap: 4px; align-items: baseline; } .pa-row > .ag-num:nth-child(3), .pa-grow > .ag-num:nth-child(3) { margin-left: 60px; }
  .pa-av { width: 48px; height: 48px; }
}
/* admin Games tab: toolbar, compact rows, pages */
.ag-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; padding: 14px; }
.ag-top { gap: 10px; flex-wrap: wrap; } .ag-search { flex: 1 1 260px; height: 44px; min-width: 0; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ag-chip { height: 36px; gap: 6px; } .ag-chip.on { background: var(--coral); color: #fff; }
.ag-n { font-size: 12px; opacity: .7; font-weight: 700; }
.ag-filters { gap: 10px; flex-wrap: wrap; align-items: flex-end; } .ag-sel { display: flex; flex-direction: column; gap: 2px; } .ag-sel select { height: 40px; width: auto; min-width: 0; max-width: 100%; }
.ag-head { gap: 10px; margin: 4px 4px 8px; align-items: center; flex-wrap: wrap; }
.ag-tick { width: 20px; height: 20px; accent-color: var(--sky); cursor: pointer; flex: none; }
.ag-bulk { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 8px; border-radius: 16px; background: var(--sky-soft); box-shadow: inset 0 0 0 2px var(--sky); }
.ag-list { display: flex; flex-direction: column; gap: 6px; }
.ag-row { display: grid; grid-template-columns: 20px 72px minmax(0, 1fr) 76px 64px 78px 78px 64px auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 2px var(--line) inset; }
.ag-row.off { opacity: .7; } .ag-row img { width: 72px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
.ag-main { min-width: 0; } .ag-main > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ag-main > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; } .ag-tags .pill { font-size: 11px; padding: 2px 8px; }
.ag-num { display: flex; flex-direction: column; align-items: center; } .ag-num b { font-variant-numeric: tabular-nums; }
.ag-sw { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ag-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 16px 0 4px; } .ag-pager .btn { min-width: 40px; }
@media (max-width: 760px) {
  .ag-row { grid-template-columns: 20px 56px minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: 't i m m e' '. p p l l' '. en en ft ft' '. kd kd . .'; row-gap: 8px; }
  .ag-row > .ag-tick { grid-area: t; } .ag-row > img { grid-area: i; width: 56px; } .ag-row > .ag-main { grid-area: m; } .ag-row > .ag-edit { grid-area: e; }
  .ag-plays { grid-area: p; } .ag-live { grid-area: l; } .ag-en { grid-area: en; } .ag-ft { grid-area: ft; } .ag-kids { grid-area: kd; }
  .ag-row > .ag-num, .ag-row > .ag-sw { flex-direction: row; gap: 8px; justify-content: flex-start; align-items: center; }
}
.ad-game { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; padding: 14px; } .ad-game img { width: 120px; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px; border: 2px solid var(--line2); } .agi { flex: 1 1 200px; min-width: 0; }

/* ───── responsive ───── */
@media (max-width: 960px) {
  .l-hero, .l-split, .ae-grid, .p-hero, .gd-body { grid-template-columns: 1fr; }
  .l-hero { min-height: 0; padding-top: 16px; } .l-hero-art { height: 380px; }
  .l-split.rev .l-split-copy { order: 2; }
  .l-strip { grid-template-columns: 1fr 1fr; }
  .ae-left { position: static; } .ae-stage { aspect-ratio: auto; height: min(56vh, 420px); }
  .p-hero { justify-items: center; text-align: center; } .p-info .row, .lvl, .next-reward { justify-content: center; margin-left: auto; margin-right: auto; }
  .pstats { grid-template-columns: repeat(2, 1fr); }
  .one-flow { grid-template-columns: 1fr; } .one-lines { height: 40px; width: 6px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--edge) 0 10px, transparent 10px 20px); }
  .gd-art { transform: rotate(-1deg); }
}
@media (max-width: 720px) {
  .page { padding-top: 4px; }
  .gd-top { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; } .gcard .desc { display: none; } .gcard h3 { font-size: 16px; } .gcard .meta { font-size: 12px; margin-top: 6px; flex-wrap: wrap; row-gap: 2px; } .gcard .meta > span:nth-child(2) { display: none; }
  .gcard .cat { transform: scale(.88); transform-origin: left top; } .gcard .fav { width: 34px; height: 34px; } .gcard .playchip { width: 40px; height: 40px; }
  .gcard.compact { width: 200px; } .gcard.tile.compact { width: 180px; }
  .store-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .ae-options { grid-template-columns: repeat(3, 1fr); gap: 8px; } .opt small { font-size: 11px; }
  .l-title { font-size: clamp(36px, 10vw, 52px); } .l-hero-art { height: 280px; } .friends-art { height: 300px; } .cc-art { height: 380px; }
  .l-header .l-link { display: none; }
  .ae-stage { height: min(44vh, 340px); }
  .l-strip { grid-template-columns: 1fr; } .l-sec { padding-top: 44px; padding-bottom: 44px; }
  .who-btn { width: 138px; } .who-av { width: 92px; height: 92px; } .who-grid { gap: 14px; }
  .usage { grid-template-columns: 1fr 1fr; } .p-ctl { width: 100%; } .p-ctl .seg { width: 100%; } .p-ctl .seg button { flex: 1; padding: 9px 6px; }
  .gd-hero { padding: 14px; } .gd-top { gap: 14px; } .gd-hs { min-width: 0; flex: 1 1 0; padding: 5px 6px; } .gd-hs b { font-size: 18px; } .gd-hs small { font-size: 9.5px; }
  .gd-desc { font-size: 15px; } .gd-play { max-width: none; min-height: 60px; font-size: 22px; }
  .store-tools { margin-top: 18px; } .srow { flex-wrap: wrap; } .srow > .btn, .srow > .seg, .srow > .modeswitch { margin-left: auto; }
}
@media (hover: none) { .gcard:hover, .scard:hover, .opt:hover, .who-btn:hover, .recent-i:hover { transform: none; } .btn:hover { transform: none; filter: none; } }
@media (max-width: 560px) { .drawer .frow { flex-wrap: wrap; } .drawer .frow > a { flex: 1 1 100% !important; } }   /* phone Friends list: the name gets the full width, the buttons sit below */

/* overflow guards */
.ae-grid > *, .gd-hero > *, .p-hero > *, .l-split > *, .l-hero > * { min-width: 0; }

/* admin → Stats (portal/stats.js). Chart colours follow the data-viz palette: blue / orange series, a blue ramp for amounts. */
.st-root, .admin { --series-1: #2a78d6; --series-2: #eb6834; --st-surface: var(--surface); --st-grid: #e1e0d9; --st-axis: #c3c2b7; --st-empty: #f2f1ee; }
.st-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; } .st-tiles.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.st-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; } .st-tile b { font: 600 28px system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); }
.st-delta { font-size: 13px; font-weight: 700; color: var(--muted); } .st-delta.up { color: #006300; } .st-delta.down { color: #d03b3b; } .st-delta .muted { font-weight: 500; }
.st-sec { margin-bottom: 16px; } .st-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; } .st-head h3 { margin: 0; } .st-head p { margin: 4px 0 0; max-width: 70ch; }
.st-tools { display: flex; gap: 8px; flex: none; } .st-sub { margin: 18px 0 8px; font-size: 15px; }
.st-chartwrap { position: relative; } .st-chart { width: 100%; height: auto; display: block; touch-action: pan-y; } .st-heat { max-width: 720px; }
.st-chart .st-grid { stroke: var(--st-grid); stroke-width: 1; } .st-chart .st-axis { stroke: var(--st-axis); stroke-width: 1; } .st-chart .st-cross { stroke: var(--st-axis); stroke-width: 1; }
.st-chart .st-tick { fill: var(--muted); font: 11px system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.st-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink2); margin-bottom: 4px; } .st-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.st-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid rgba(11, 11, 11, .12); box-shadow: 0 8px 22px -10px rgba(30, 20, 70, .35); font-size: 13px; white-space: nowrap; }
.st-tip-t { color: var(--muted); font-size: 12px; margin-bottom: 2px; } .st-tip-r { display: flex; align-items: center; gap: 6px; } .st-tip-r i { width: 10px; height: 3px; border-radius: 2px; } .st-tip-r b { font-variant-numeric: tabular-nums; }
.st-key { display: flex; align-items: center; gap: 4px; margin-top: 6px; } .st-key i { width: 18px; height: 10px; border-radius: 3px; }
.st-spend { width: 96px; height: 34px; padding: 4px 8px; }
.st-tbtn { margin-top: 8px; } .st-table { margin-top: 8px; } .st-table td.num { font-variant-numeric: tabular-nums; }
/* Stats: summary, health marks, families funnel, the games table */
.st-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-sum { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: baseline; font-size: 15px; line-height: 1.4; }
.st-sum i { font-style: normal; font-weight: 800; text-align: center; color: var(--muted); } .st-sum.up i { color: #006300; } .st-sum.down i { color: #d03b3b; } .st-sum.warn i { color: var(--warn); }
.st-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; } .st-flags.long { flex-direction: column; gap: 6px; }
.st-flag { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--fill2); cursor: help; }
.st-flags.long .st-flag { white-space: normal; font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 12px; }
.st-flag.warn { background: var(--sun-soft); color: var(--ink); } .st-flag.good { background: var(--mint-soft); color: var(--ink); } .st-flag.new { background: var(--sky-soft); color: var(--ink); }
.st-funnel { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.st-fstep { display: grid; grid-template-columns: minmax(150px, 230px) 1fr 54px minmax(0, 170px); gap: 10px; align-items: center; font-size: 14px; }
.st-fbar { height: 14px; border-radius: 7px; background: var(--fill2); overflow: hidden; } .st-fbar i { display: block; height: 100%; border-radius: 7px; background: var(--series-1); }
.st-fstep b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .st-fstep { grid-template-columns: 1fr 50px; } .st-fstep .st-fbar { grid-column: 1 / -1; order: 3; } .st-fstep > .small { grid-column: 1 / -1; order: 4; } }
.st-games th:first-child, .st-games td.st-name { position: sticky; left: 0; z-index: 1; background: var(--card, var(--surface, #fff)); box-shadow: 1px 0 0 var(--line); }
.st-games td.st-name { min-width: 140px; }
.st-unplayed-row { gap: 10px; margin-top: 10px; align-items: center; } .st-unplayed { margin: 6px 0 0; line-height: 1.6; }
.st-sort { cursor: pointer; user-select: none; } .st-row { cursor: pointer; } .st-row:hover td { background: var(--surface2); }
.st-coh { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; } .st-coh.none { color: var(--faint); } .st-coh.partial { outline: 2px dotted var(--ink2); outline-offset: -3px; }
.st-lines { display: grid; gap: 8px; } .st-line { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--sun-soft); border: 2px solid var(--line2); font-weight: 700; color: var(--ink); }
.st-sec code { word-break: break-all; }

/* phones: the PLAY button of a game page is docked just above the tab bar (game.js moves the button there), so it is always in sight and there is only one */
.gd-float { display: none; }
@media (max-width: 719px) {
  .gd-float { display: flex; position: fixed; z-index: 94; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 16px); animation: gd-in .35s var(--spring, ease) both; }
  .gd-float .gd-play { flex: 1; max-width: none; min-height: 60px; font-size: 22px; box-shadow: 0 5px 0 var(--edge), 0 16px 30px -10px rgba(0, 0, 0, .6); animation: gd-call 1s var(--ease, ease) .5s 1; }
  .gd-cta:empty { display: none; }
  body.has-gd-float #view { padding-bottom: calc(var(--safe-b) + 100px); }       /* room at the end of the page, so the bar never covers the last thing */
}
@keyframes gd-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes gd-call { 0%, 100% { transform: none; } 40% { transform: scale(1.04); } 70% { transform: scale(.99); } }
@media (prefers-reduced-motion: reduce) { .gd-float, .gd-float .gd-play { animation: none; } }

/* Home: "Jump back in", the games you played last, at the top: small picture tiles in a row that scrolls sideways; one tap plays */
.jump { margin: 2px 0 18px; }
.jump-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .jump-head h2 { font-size: 20px; } .jump-head .sh-ic { width: 32px; height: 32px; font-size: 17px; border-radius: 11px; }
.jump-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 10px; margin: 0 -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.jump-row::-webkit-scrollbar { display: none; }
.jump-tile { --accent: var(--grape); flex: none; width: 112px; display: grid; gap: 6px; justify-items: center; text-align: center; scroll-snap-align: start; color: var(--ink); }
.jump-art { position: relative; display: block; width: 112px; aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--edge); background: color-mix(in srgb, var(--accent) 25%, var(--surface)); transition: transform .2s var(--spring, ease), box-shadow .2s; }
.jump-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jump-go { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: #fff; border: 2px solid var(--edge); box-shadow: 0 2px 0 var(--edge); }
.jump-go svg { width: 15px; height: 15px; margin-left: 2px; }
.jump-name { font-size: 13.5px; line-height: 1.2; max-width: 112px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jump-tile:active .jump-art { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
@media (hover: hover) { .jump-tile:hover .jump-art { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 7px 0 var(--edge); } }
.jump-tile:focus-visible { outline: none; } .jump-tile:focus-visible .jump-art { outline: 3px solid var(--sky, #4fb3ff); outline-offset: 3px; }
@media (max-width: 719px) { .jump-tile, .jump-art, .jump-name { width: 92px; max-width: 92px; } .jump-art { border-radius: 18px; } .jump-row { gap: 10px; } .jump-head h2 { font-size: 18px; } }

@media (max-width: 760px) {   /* admin filter chips and section buttons: one row you can swipe, instead of many lines */
  .admin .ag-chips, .admin .pa-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .admin .ag-chips::-webkit-scrollbar, .admin .pa-nav::-webkit-scrollbar { display: none; } .admin .ag-chips > *, .admin .pa-nav > * { flex: none; }
}

/* PLAY for a child who plays with bots (views/start.js): "How do you want to play?" */
.start-page { max-width: 760px; margin: 0 auto; }
.start-card { margin-top: 10px; border-radius: var(--r-xl, 28px); padding: clamp(18px, 3vw, 32px); border: 2px solid var(--edge); box-shadow: 0 6px 0 var(--edge); background: color-mix(in srgb, var(--accent, var(--grape)) 16%, var(--surface)); }
.start-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; } .start-head img { width: 110px; aspect-ratio: 16/10; object-fit: cover; border-radius: 16px; border: 2px solid var(--edge); }
.start-head h1 { margin: 2px 0 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; }
.start-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.start-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 18px; border-radius: 20px; border: 2px solid var(--edge); background: var(--surface); box-shadow: 0 4px 0 var(--edge); cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s var(--spring, ease); }
.start-choice:hover { transform: translateY(-3px); } .start-choice:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--edge); }
.start-choice .sc-ic { font-size: 28px; letter-spacing: -4px; } .start-choice b { font: 600 20px var(--display); } .start-choice small { color: var(--muted); font-weight: 700; }
.start-choice.solo { background: var(--mint-soft); }
.start-page.busy .start-choice { opacity: .5; pointer-events: none; } .st-status { min-height: 1.4em; margin: 14px 0 0; font-weight: 700; }
.fam-pill { margin-left: 6px; font-size: 11px; padding: 1px 7px; vertical-align: 2px; background: var(--mint-soft); }   /* a friend from a connected family (Friends list) */
/* play dates: the banner on Home, the code box in Friends */
.pd-host { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; } .pd-host:empty { display: none; }
.pd-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--edge); background: linear-gradient(135deg, var(--sun-soft), var(--coral-soft)); }
.pd-ic { font-size: 36px; animation: rise .6s var(--ease) both; } .pd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pd-text b { font: 600 20px var(--display); } .pd-text small { color: var(--muted); font-weight: 700; }
.pd-codebox { margin-top: 12px; padding: 14px; } .pd-codebox .input { flex: 1; min-width: 0; }

/* admin Quiz tab (portal/quiz-admin.js): ask Claude, then check every question */
.qa-ask { display: flex; flex-direction: column; gap: 10px; padding: 16px; margin-bottom: 12px; } .qa-ask h3 { margin: 0; }
.qa-fields { gap: 10px; flex-wrap: wrap; align-items: flex-end; } .qa-fields .btn { height: 44px; } .qa-grow { flex: 1 1 220px; } .qa-grow input { width: 100%; }
.qa-age { width: 90px; height: 40px; } .qa-fields select { height: 40px; }
.qa-run { padding: 12px 14px; background: var(--grape-soft); margin-top: 4px; } .qa-run ul { margin: 6px 0 0; padding-left: 18px; }
.qa-cover { padding: 12px 14px; margin-bottom: 12px; } .qa-cover summary { cursor: pointer; } .qa-cover table { margin-top: 10px; }
.qa-list { display: flex; flex-direction: column; gap: 10px; }
.qa-q { display: flex; flex-direction: column; gap: 8px; padding: 14px; } .qa-q.live { box-shadow: 0 0 0 2px var(--mint) inset; } .qa-q.off { opacity: .75; }
.qa-blank { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 12px; box-shadow: 0 0 0 2px var(--sky) inset; } .qa-blank h3 { margin: 0; }
.qa-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .qa-tags .pill { font-size: 12px; padding: 2px 9px; }
.qa-st.draft { background: var(--sun-soft, #fff3c4); } .qa-st.live { background: var(--mint-soft, #dcfbea); }
.qa-question { font-weight: 800; font-size: 16px; height: 44px; }
.qa-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qa-ans { display: flex; align-items: center; gap: 6px; } .qa-ans span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; }
.qa-ans.right span { background: #2fb86a; } .qa-ans.wrong span { background: #ef4f6b; } .qa-ans input { flex: 1; min-width: 0; height: 40px; }
.qa-ans.right input { box-shadow: 0 0 0 2px #2fb86a inset; }
.qa-note { margin: 0; } .qa-actions { gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .qa-answers { grid-template-columns: 1fr; } }
.qa-blank[hidden] { display: none; }
/* "Add Klukla to your home screen": the card on Home and the steps behind it (components/install-help.js) */
.install-host:empty { display: none; } .install-host { margin-bottom: 14px; }
.install-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--edge); background: linear-gradient(135deg, var(--sky-soft), var(--mint-soft)); animation: rise .5s var(--ease) both; }
.install-card.urgent { background: linear-gradient(135deg, var(--sun-soft), var(--coral-soft)); }
.ic-ic { font-size: 36px; flex: none; } .ic-text { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ic-text b { font: 600 20px var(--display); } .ic-text small { color: var(--muted); font-weight: 700; }
.ic-btns { display: flex; align-items: center; gap: 12px; flex: none; } .ic-later { font-weight: 800; color: var(--muted); }
@media (max-width: 560px) { .install-card { flex-wrap: wrap; } .ic-text { flex: 1 1 calc(100% - 60px); } .ic-btns { flex: 1 1 100%; justify-content: flex-end; } }
.ih-modal { text-align: left; } .ih-modal h3 { text-align: center; } .ih-modal .actions { justify-content: center; }
.ih-why { margin: 0 0 4px; text-align: center; }
.ih-steps { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 12px; }
.ih-step { display: flex; gap: 12px; align-items: flex-start; } .ih-txt { flex: 1; min-width: 0; line-height: 1.45; padding-top: 3px; }
.ih-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 17px var(--display); color: #fff; background: var(--sky); box-shadow: 0 3px 0 var(--edge); }
.ih-pic { display: inline-grid; place-items: center; width: 30px; height: 30px; vertical-align: middle; margin: 0 2px; border-radius: 9px; color: #1a7cf0; background: var(--surface); border: 1.5px solid var(--edge); }
.ih-code { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; } .ih-code .input { width: 100%; font-size: 14px; } .ih-ok { font-weight: 800; color: var(--mint-ink, #1f9d5a); }
.ih-code .linkcode { font-size: clamp(22px, 7vw, 34px); }
/* the parents' page (views/parents.js): where adverts send grown-ups */
@media (max-width: 520px) { .l-header .l-parents { display: none; } }        /* phones: the footer has the link; the logo and "I'm a grown-up" must fit */
.parents-page .pp-for { background: var(--sky-soft); font-weight: 800; } @media (max-width: 640px) { .parents-page .pp-for { display: none; } }
.pp-hero { width: min(100%, 1280px); margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 20px; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.pp-hero h1 { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.04; } .pp-hero h1 span { color: var(--sky); }
.pp-sub { font-size: clamp(17px, 1.8vw, 20px); font-weight: 700; color: var(--ink2); margin-top: 16px; max-width: 560px; }
.pp-promise { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; max-width: 520px; }
.pp-promise li { display: flex; gap: 8px; align-items: center; font-weight: 800; } .pp-promise li span { color: var(--mint); display: inline-flex; }
.pp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; } .pp-cta.light { justify-content: center; margin-top: 4px; }
.pp-cta.light .btn-ghost { background: rgba(255, 255, 255, .92); }
.pp-hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transform: rotate(3deg); }
.pp-card { position: relative; border-radius: 20px; overflow: hidden; border: 3px solid var(--edge); box-shadow: 0 6px 0 var(--edge); background: var(--surface); aspect-ratio: 16 / 10; }
.pp-card img { width: 100%; height: 100%; object-fit: cover; display: block; } .pp-card span { position: absolute; left: 8px; bottom: 8px; background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 13px; }
.pp-card.k1, .pp-card.k3, .pp-card.k5 { transform: translateY(22px); }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pp-safe { padding: 20px; } .pp-safe h3 { margin: 8px 0 6px; font-size: 21px; } .pp-safe p { color: var(--ink2); font-weight: 600; line-height: 1.5; } .pp-ic { font-size: 34px; }
.pp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: none; }
.pp-steps li { padding: 20px; position: relative; } .pp-steps b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--coral); color: #fff; font: 600 22px var(--display); box-shadow: 0 3px 0 var(--edge); }
.pp-steps h3 { margin: 12px 0 6px; font-size: 21px; } .pp-steps p { color: var(--ink2); font-weight: 600; line-height: 1.5; }
.pp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.pp-plan { padding: 22px; } .pp-plan h3 { font-size: 24px; } .pp-plan.best { background: var(--sky-soft); }
.pp-price { font: 600 24px var(--display); color: var(--coral); margin: 6px 0 4px; }
.pp-small { max-width: 760px; margin: 18px auto 0; font-weight: 700; } .pp-small a, .pp-who a { color: var(--sky); font-weight: 800; }
.pp-faq { display: grid; gap: 10px; max-width: 860px; margin: 0 auto; } .pp-faq details { padding: 14px 18px; } .pp-faq summary { cursor: pointer; font-weight: 800; font-size: 18px; } .pp-faq p { margin-top: 8px; color: var(--ink2); font-weight: 600; line-height: 1.55; }
.pp-who .card { max-width: 860px; margin: 0 auto; padding: 22px; } .pp-who p { margin-top: 8px; font-weight: 600; color: var(--ink2); line-height: 1.55; }
@media (max-width: 860px) { .pp-hero { grid-template-columns: 1fr; padding-top: 22px; } .pp-hero-art { order: -1; transform: rotate(2deg); max-width: 520px; margin-bottom: 30px; } .pp-grid, .pp-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pp-grid, .pp-steps { grid-template-columns: 1fr; } .pp-promise { grid-template-columns: 1fr; } .pp-hero-art .pp-card:nth-child(n+5) { display: none; } .pp-cta .btn { flex: 1 1 100%; } }
.dress-card { background: linear-gradient(135deg, var(--grape-soft), var(--sky-soft)); } .dress-card .pd-ic .av { width: 56px; height: 56px; }

/* ───── the Kids zone (views/kids.js) and the way into it ───── */
.kidszone-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; padding: 20px 24px; border-radius: 26px; border: 2px solid var(--edge); box-shadow: 0 5px 0 var(--edge);
  background: radial-gradient(120% 140% at 0% 0%, #ffd66b 0 22%, transparent 60%), linear-gradient(120deg, #ffb020, #ff7ab6 55%, #8b7bff); color: #2a1300; }
.kidszone-head h2 { font-size: clamp(26px, 3.4vw, 36px); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.kidszone-head p { margin-top: 4px; font-weight: 700; color: #3b1d00; max-width: 640px; }
.kidszone-head .kz-ic { font-size: clamp(44px, 6vw, 64px); line-height: 1; flex: none; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .2)); }
.kidszone-head .btn { margin-left: auto; flex: none; background: rgba(255, 255, 255, .9); color: #2a1300; }
.kidszone-link { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 10px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line2); font-weight: 700; color: var(--ink2); transition: border-color .15s; }
.kidszone-link:hover { border-color: var(--sun); color: var(--ink); } .kidszone-link b { color: var(--sun); } .kidszone-link > span:first-child { font-size: 22px; } .kidszone-link svg { width: 18px; height: 18px; margin-left: auto; }
.hub-kids .section-head { flex-wrap: wrap; } .hub-kids-sub { font-weight: 700; }
@media (max-width: 600px) { .kidszone-head { flex-wrap: wrap; padding: 16px; gap: 12px; } .kidszone-head .btn { margin-left: 0; } }
/* "How do you want to play?" groups, and the play-link waiting room (views/start.js, views/join.js, docs/INVITES.md) */
.start-group + .start-group { margin-top: 22px; }
.start-group h2 { margin: 0 0 4px; font: 600 20px var(--display); } .start-group > p { margin: 0 0 10px; }
.start-choice.link { background: color-mix(in srgb, var(--accent, var(--grape)) 22%, var(--surface)); }
.join-page [hidden] { display: none !important; }
.join-page { max-width: 760px; margin: 0 auto; } .join-card.gone { text-align: center; }
.inv-table { margin: -8px 0 12px; font-weight: 700; }
.inv-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.inv-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 18px; border: 2px solid var(--edge); background: var(--surface); text-align: center; }
.inv-seat.me { border-color: var(--accent, var(--grape)); } .inv-seat small { color: var(--muted); font-weight: 700; }
.inv-seat.empty { border-style: dashed; background: transparent; } .inv-seat.empty b { color: var(--muted); }
.inv-q { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--edge); font: 600 20px var(--display); color: var(--muted); }
.inv-go { display: flex; justify-content: center; margin-top: 16px; } .inv-go:empty { display: none; }
.inv-invite { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--edge); } .inv-invite > b { display: block; margin-bottom: 8px; }
.inv-urlrow { display: flex; } .inv-url { flex: 1; min-width: 0; font: 700 16px var(--body, inherit); padding: 10px 12px; border-radius: 12px; border: 2px solid var(--edge); background: var(--surface); color: var(--ink); }
.inv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .inv-acts .btn { flex: 1 1 120px; justify-content: center; }
.inv-wa { background: #25d366; color: #0b2b17; border-color: #1da851; }
