/* Shopscotch front page (/) and ready-to-shop page (/shop), shown after sign-in: chalk on the playground. Big, thumb-sized targets (48px+), quick motion. */
@font-face { font-family: "Fredoka"; src: url("/static/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #1f2a44; --muted: #5b6478; --bg: #fff8ec; --card: #ffffff; --line: #efe4cf;
  --coral: #f2545b; --sun: #f5b700; --mint: #22c38e; --grape: #8b5cf6;
  --chalk: rgba(31, 42, 68, .07);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f6f1ec; --muted: #b5aba6; --bg: #17141a; --card: #221e26; --line: #3a333f;
  --chalk: rgba(255, 255, 255, .07);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.land {
  min-height: 100dvh; color: var(--ink); font: 400 16px/1.4 "Fredoka", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
.play { max-width: 560px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }

/* the name: "Shop" in ink, then the letters hop in the hopscotch colours */
.word, .sp-word { margin: 0; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.word b, .sp-word b { display: inline-block; font-weight: 700; }
.word b:nth-child(1), .sp-word b:nth-child(1) { color: var(--coral); transform: translateY(-4px); }
.word b:nth-child(2), .sp-word b:nth-child(2) { color: var(--sun); transform: translateY(4px); }
.word b:nth-child(3), .sp-word b:nth-child(3) { color: var(--mint); transform: translateY(-4px); }
.word b:nth-child(4), .sp-word b:nth-child(4) { color: var(--grape); transform: translateY(4px); }
.word b:nth-child(5), .sp-word b:nth-child(5) { color: var(--coral); transform: translateY(-4px); }
.word b:nth-child(6), .sp-word b:nth-child(6) { color: var(--sun); transform: translateY(4px); }

/* splash: four squares drop in and the trolley hops 1 -> 2 -> 3 -> 4 (about 1.2s) */
.splash { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(180deg, #ff8a6b, #f2545b); transition: opacity .35s ease; }
.splash.gone { opacity: 0; pointer-events: none; }
.sp-grid { position: relative; width: 150px; height: 190px; }
.sq { position: absolute; width: 64px; height: 54px; border-radius: 12px; border: 4px solid #fff; display: grid; place-items: center;
  font: 700 1.5rem "Fredoka", system-ui, sans-serif; font-style: normal; color: rgba(31, 42, 68, .8); animation: fd-sq .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.s1 { left: 43px; top: 132px; background: #ffc93c; animation-delay: 0s; }
.s2 { left: 8px; top: 72px; background: #ff6f61; animation-delay: .08s; }
.s3 { left: 78px; top: 72px; background: #3dd6a3; animation-delay: .16s; }
.s4 { left: 43px; top: 12px; background: #a78bfa; animation-delay: .24s; }
.sp-trolley { position: absolute; left: 55px; top: 136px; font-size: 2.1rem; animation: fd-hop 1s ease-in-out .3s both; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
.sp-word { font-size: 2.4rem; color: #fff; animation: fd-sq .4s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
.sp-word b { color: #fff !important; }
@keyframes fd-sq { from { transform: scale(.2); opacity: 0; } }
@keyframes fd-hop {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-30px, -60px); }
  50% { transform: translate(34px, -60px); }
  75%, 100% { transform: translate(0, -122px) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) { .sq, .sp-trolley, .sp-word { animation: none; } }
@media (min-width: 700px) { .play { padding-top: 48px; } }

.sp-tag { margin: -8px 24px 0; text-align: center; color: #fff; font-weight: 600; font-size: 1.05rem; opacity: .95; animation: fd-sq .4s ease .7s both; }
.sp-hop { width: min(64vw, 260px); height: auto; filter: drop-shadow(0 12px 18px rgba(90, 20, 20, .22)); }

/* light: warm peach, not white */
:root:not([data-theme="dark"]) { --bg: #ffdcc8; --card: #fff7f2; --line: #f8c8b0; --chalk: rgba(255, 255, 255, .45); }
:root:not([data-theme="dark"]) body.land { background: linear-gradient(180deg, #ffc9ab 0%, #ffdcc8 38%, #ffeadf 75%, #fff2ea 100%) fixed; }
html, body { overscroll-behavior: none; }
body.land { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* the coral band: the real logo on a cream badge, a greeting, the tagline; the list card slides up over it */
.band { color: #fff; padding: max(22px, env(safe-area-inset-top)) 20px 100px;
  background: linear-gradient(180deg, #ff8a6b, #f2545b); border-radius: 0 0 38px 38px; }
.band-top, .tag { max-width: 528px; margin-left: auto; margin-right: auto; }
.band-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-h { margin: 0; }
/* the logo straight on the coral, one line always: "Shop" in white, the hopscotch letters in light tints that read on coral */
.brand { margin: 0; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 2.5px rgba(255, 255, 255, .85), 0 6px 14px -6px rgba(90, 20, 20, .5); }
.band .word { font-size: 1.6rem; color: #fff; white-space: nowrap; text-shadow: 0 2px 0 rgba(120, 30, 30, .25); }
.band .word b:nth-child(1), .band .word b:nth-child(5) { color: #fff1a8; }
.band .word b:nth-child(2), .band .word b:nth-child(6) { color: #ffd23f; }
.band .word b:nth-child(3) { color: #8ff5cf; }
.band .word b:nth-child(4) { color: #e2d4ff; }
.greet { margin: 0; font-size: .92rem; font-weight: 500; opacity: .9; text-align: right; }
.tag { margin-top: 14px; font-weight: 500; font-size: 1.05rem; padding-right: 130px; }
.play { max-width: 560px; margin: -78px auto 0; padding: 0 16px max(28px, env(safe-area-inset-bottom)); position: relative; }
.list { position: relative; }
.trial-note { display: block; margin: 0 0 14px; padding: 12px 16px; border-radius: 18px; background: #FFF8EC; color: #3b2424;
  text-decoration: none; font-size: .95rem; box-shadow: 0 6px 16px -8px rgba(120, 30, 30, .35); }
.trial-note b { color: #C2353D; }
.at-shop { position: relative; z-index: 2; margin: 0 0 46px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 2px solid #ffd23f; font-size: .92rem; line-height: 1.35; box-shadow: 0 10px 20px -14px rgba(150, 70, 40, .4); }
.mascot { position: absolute; right: 18px; top: -56px; width: 104px; height: auto; filter: drop-shadow(0 6px 8px rgba(120, 40, 30, .2)); }

/* the list, front and centre: tick things off or add them without opening the app */
.list { background: var(--card); border-radius: 22px; padding: 16px 18px 8px; box-shadow: 0 2px 0 var(--line), 0 18px 30px -18px rgba(150, 70, 40, .3); }
.list-top { display: flex; align-items: baseline; justify-content: space-between; }
.list h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
#leftCount { font-weight: 400; font-size: .95rem; color: var(--muted); }
.see { color: var(--muted); font-size: .92rem; padding: 6px 0 6px 12px; }
#items { list-style: none; margin: 6px 0 0; padding: 0; }
#items li { border-bottom: 1.5px dashed var(--line); }
#items button { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 6px 0; border: 0; background: none;
  font: 400 1.05rem "Fredoka", system-ui, sans-serif; color: var(--ink); text-align: left; cursor: pointer; }
#items .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink); display: grid; place-items: center;
  color: #fff; font-size: .85rem; font-weight: 700; transition: background .15s ease, transform .15s ease; }
#items .got .box { background: var(--mint); transform: scale(1.12); }
#items .sub { margin-left: auto; font-size: .85rem; color: var(--muted); text-align: right; }
#items .got .nm { text-decoration: line-through; color: var(--muted); }
#items .empty { padding: 12px 0; color: var(--muted); border: 0; }
.add input { width: 100%; min-height: 48px; border: 0; background: none; padding: 4px 0; font: 600 1rem "Fredoka", system-ui, sans-serif; color: var(--ink); outline: none; }
.add input::placeholder { color: var(--coral); opacity: 1; }
.add input:focus::placeholder { color: var(--muted); }

.go { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; border-radius: 18px;
  font-weight: 700; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, #ff8a6b, var(--coral));
  box-shadow: 0 6px 0 #c2353d, 0 12px 22px -8px rgba(242, 84, 91, .6); transition: transform .12s ease, box-shadow .12s ease; }
.go:active { transform: translateY(4px); box-shadow: 0 2px 0 #c2353d; }

.adventures h2 { margin: 26px 0 12px; font-size: 1.1rem; font-weight: 700; }
.hops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hop { min-height: 70px; border-radius: 16px; color: #fff; background: var(--c); display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 var(--d); transition: transform .12s ease, box-shadow .12s ease; }
.hop:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d); }
.hop span { font-size: 1.6rem; line-height: 1.1; }
.h-race span, .h-farm span, .h-dino span, .h-trip span { display: inline-block; transform: scaleX(-1); }   /* facing the way they go (left to right), like in the games */
.hop em { font-style: normal; font-weight: 600; font-size: .8rem; }
.h-race { --c: #475569; --d: #2c3646; }
.h-space { --c: var(--grape); --d: #6237c9; }
.h-farm { --c: var(--mint); --d: #179669; }
.h-dino { --c: #2e7d32; --d: #1b5e20; }
.h-trip { --c: #2f6b2a; --d: #1f4d1d; }
.h-pirate { --c: #b45309; --d: #78350f; }
.h-robot { --c: #0284c7; --d: #075985; }
.h-potion { --c: #7e22ce; --d: #581c87; }
.h-super { --c: #dc2626; --d: #991b1b; }
.h-garden { --c: #db2777; --d: #9d174d; }
.h-spy { --c: #1f2a44; --d: #0e1528; }

.more { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { min-height: 52px; border-radius: 16px; background: var(--card); box-shadow: 0 2px 0 var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; transition: transform .12s ease; }
.tile:active { transform: scale(.97); }
.foot { margin-top: 22px; text-align: center; }
.motto { margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.install { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 1rem "Fredoka", system-ui, sans-serif;
  color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
.ios { color: var(--muted); font-size: .9rem; }
:root[data-theme="dark"] .band { background: linear-gradient(180deg, #e8705a, #c8424a); }
:root[data-theme="dark"] .h-spy { --c: #0b0f1a; --d: #000; }

/* the front page: same coral header as /shop, Hop on a card over its edge, then two big orange choices */
.front .band { padding-bottom: 96px; }
.front .band { text-align: center; }
.front .tag { padding-right: 0; }
.hello { margin: 4px 0 0; font-size: .92rem; font-weight: 600; color: var(--muted); }
.hop-card { position: relative; text-align: center; background: var(--card); border-radius: 26px; padding: 14px 18px 18px;
  box-shadow: 0 2px 0 var(--line), 0 18px 30px -18px rgba(150, 70, 40, .35); }
.hero-hop { display: block; margin: 0 auto; width: 150px; height: auto; filter: drop-shadow(0 8px 12px rgba(150, 70, 40, .15)); }
#items li.fresh { animation: fresh 1.6s ease-out 2; border-radius: 12px; }
@keyframes fresh { 0% { box-shadow: 0 0 0 0 rgba(242, 84, 91, .75); } 70% { box-shadow: 0 0 0 10px rgba(242, 84, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 84, 91, 0); } }
.hop-says { margin: 2px 0 0; font-size: 1.3rem; font-weight: 700; }
.hop-sub { margin: 4px 0 0; font-weight: 600; color: var(--coral); }
.choices { margin-top: 16px; display: grid; gap: 14px; }
.choice { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 16px 18px; border-radius: 24px; color: #fff;
  transition: transform .12s ease, box-shadow .12s ease; }
.choice:active { transform: translateY(4px); }
.c-ico { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.9rem; background: rgba(255, 255, 255, .24); }
.c-txt { flex: 1; display: flex; flex-direction: column; }
.c-txt b { font-size: 1.3rem; font-weight: 700; }
.c-txt em { font-style: normal; font-size: .95rem; opacity: .92; text-wrap: balance; }
.c-go { font-size: 2rem; line-height: 1; opacity: .85; }
.c-add { background: linear-gradient(135deg, #ffb547, #ff8a3d); box-shadow: 0 6px 0 #d96a1f, 0 14px 26px -10px rgba(255, 138, 61, .6); }
.c-add:active { box-shadow: 0 2px 0 #d96a1f; }
.c-shop { background: linear-gradient(135deg, #ff8a6b, var(--coral)); box-shadow: 0 6px 0 #c2353d, 0 14px 26px -10px rgba(242, 84, 91, .6); }
.c-shop:active { box-shadow: 0 2px 0 #c2353d; }
.front #leftCount { color: inherit; font-size: .95rem; }
.front .foot { margin-top: 26px; }
.more.two { grid-template-columns: repeat(2, 1fr); }

/* the view-only list (/view/<code>) */
#items li.aisle-h { border: 0; padding: 14px 0 2px; font-weight: 700; font-size: .95rem; color: var(--muted); }
.view-note { margin: 10px 0 8px; font-size: .85rem; color: var(--muted); }
.view-try { display: inline-block; margin-top: 6px; font-weight: 600; color: inherit; }

/* view-only list: pictures, what's new since last time, and "I've got everything" */
#items .pic { flex: none; width: 30px; font-size: 1.5rem; line-height: 1; text-align: center; }
#items .pic .pic-svg { width: 1.6rem; height: 1.6rem; vertical-align: middle; }
#items li.new { background: rgba(255, 181, 71, .16); border-radius: 12px; }
#items .new-tag { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700; }
.view-new { margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 181, 71, .2); font-weight: 600; font-size: .92rem; }
.view-done { margin-top: 18px; display: grid; gap: 10px; } .view-done[hidden], .view-new[hidden] { display: none; }
.view-name { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.view-name input { min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); font: inherit; background: var(--card); color: inherit; }
.view-done-btn { min-height: 60px; border: 0; border-radius: 18px; font: inherit; font-size: 1.2rem; font-weight: 700; color: #1f2a44;
  background: var(--mint); box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.view-done-btn:disabled { opacity: .85; }

/* ---- the privacy policy and the terms: plain reading pages ---- */
.legal { max-width: 640px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px max(40px, env(safe-area-inset-bottom)); font-size: 1rem; line-height: 1.55; }
.legal .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.5rem; }
.legal h1 { margin: 22px 0 2px; font-size: 1.8rem; line-height: 1.15; }
.legal h2 { margin: 28px 0 6px; font-size: 1.2rem; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a:not(.brand) { color: var(--coral); text-decoration: underline; text-underline-offset: 2px; }
.legal-date { color: var(--muted); font-size: .9rem; }
.legal-foot { margin-top: 32px; padding-top: 16px; border-top: 2px solid var(--line); font-weight: 600; }
