/* ==========================================================================
   JP Game Studios · Direction B "Toy Box"
   Daylight toy-shop world: cream + sky, glossy plastic blocks, trading cards
   on wooden shelves. Display: Lilita One. UI/body: Zen Maru Gothic.
   ========================================================================== */

:root {
  /* surfaces */
  --cream: #FFF5E3;
  --cream-2: #FBE8C8;
  --cream-3: #EBD3AA;
  --paper: #FFFDF7;
  /* ink */
  --ink: #1B2656;
  --ink-2: #4B557F;
  --ink-3: #646C92;   /* small text: 4.7:1 on cream */
  --ink-4: #8A90AE;   /* decoration only (separators, dots), never text */
  /* brand + toy plastics (fill / deep side) */
  --blue: #2B87FF;   --blue-d: #1463DB;
  --sky: #9AD7FF;    --sky-soft: #DCF1FF;
  --sun: #FFC83D;    --sun-d: #E39A0C;
  --coral: #FF8466;  --coral-d: #E0573A;  --coral-deep: #D94E2F;
  --mint: #5EDBB0;   --mint-d: #1FA67A;   --mint-deep: #169A6E;
  --bubble: #FF96C2; --bubble-d: #E5679D;
  --lime: #B6E36A;   --lime-d: #7DB12C;
  --lilac: #BBA6FF;  --lilac-d: #8A6FEF;
  --teal: #16A5C9;

  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Zen Maru Gothic', 'Arial Rounded MT Bold', system-ui, sans-serif;

  --side: 256px;
  --top: 78px;
  --gutter: 32px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);

  /* stone-brick tile for the dungeon teasers */
  --bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='26'%3E%3Cg fill='%23fff' fill-opacity='.06'%3E%3Crect x='1' y='1' width='20' height='11' rx='2.5'/%3E%3Crect x='23' y='1' width='20' height='11' rx='2.5'/%3E%3Crect x='-10' y='14' width='20' height='11' rx='2.5'/%3E%3Crect x='12' y='14' width='20' height='11' rx='2.5'/%3E%3Crect x='34' y='14' width='20' height='11' rx='2.5'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.08'%3E%3Crect x='3' y='2' width='14' height='1.6' rx='.8'/%3E%3Crect x='25' y='2' width='14' height='1.6' rx='.8'/%3E%3Crect x='14' y='15' width='14' height='1.6' rx='.8'/%3E%3Crect x='36' y='15' width='6' height='1.6' rx='.8'/%3E%3Crect x='0' y='15' width='6' height='1.6' rx='.8'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1100px 460px at 82% -180px, rgba(154, 215, 255, .62), rgba(154, 215, 255, 0) 70%) no-repeat,
    radial-gradient(760px 380px at 18% -200px, rgba(255, 200, 61, .20), rgba(255, 200, 61, 0) 70%) no-repeat,
    url("grain.png") repeat,
    var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
}
.coin-ico { width: 26px; height: 26px; flex: none; }

/* ---------- app frame ---------- */
.app {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-rows: var(--top) auto;
  min-height: 100vh;
}

/* ---------- top bar ---------- */
.topbar {
  grid-column: 1 / -1;
  position: sticky; top: 0; z-index: 40;
  display: grid;
  /* brand column ends 6px early so the 20px gap lands the search on the content edge */
  grid-template-columns: var(--brand-w, calc(var(--side) - 6px)) minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: center;
  height: var(--top);
  padding-right: var(--gutter);
  background: rgba(255, 245, 227, .82);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  transition: box-shadow .25s ease;
}
.topbar.scrolled { box-shadow: 0 1px 0 rgba(27, 38, 86, .07), 0 14px 28px -22px rgba(27, 38, 86, .5); }
.brand-cell { display: flex; align-items: center; height: 100%; min-width: 0; }
.m-menu { display: none !important; }

/* LOGO PLACEHOLDER styles: the .brand block is self-contained, swap freely */
.brand { display: flex; align-items: center; gap: 9px; padding-left: 24px; height: 100%; }
.brand-mark { width: 50px; height: 41px; flex: none; transition: transform .45s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-word {
  font-family: var(--display);
  font-size: 21px; line-height: 1; letter-spacing: .1px;
  color: var(--ink);
  transform: skewX(-9deg);
  white-space: nowrap;
}
.brand-word em { font-style: normal; color: var(--blue); }

/* search */
.search { position: relative; width: 100%; max-width: 560px; min-width: 0; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 8px 0 16px;
  background: var(--paper);
  border: 2px solid var(--cream-3);
  border-radius: 17px;
  box-shadow: inset 0 3px 0 rgba(235, 211, 170, .28), 0 3px 0 var(--cream-3);
  transition: border-color .2s, box-shadow .2s;
}
.search-box .ico { color: var(--ink-2); }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 3px 0 var(--blue-d), 0 0 0 6px rgba(43, 135, 255, .14); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); font-weight: 500; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.kbd {
  min-width: 28px; height: 28px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--cream);
  border: 1.5px solid var(--cream-3);
  box-shadow: 0 2px 0 var(--cream-3);
  font-weight: 900; font-size: 13px; color: var(--ink-2);
}
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px);
  padding: 10px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--cream-3), 0 30px 50px -22px rgba(27, 38, 86, .45);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center;
  pointer-events: none;
  transition: opacity .18s ease, transform .25s var(--out);
  z-index: 50;
}
.search.open .suggest { opacity: 1; transform: none; pointer-events: auto; }
.suggest-label { font-family: var(--display); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px 6px; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 14px; }
.suggest-item img { width: 40px; height: 52px; border-radius: 9px; object-fit: cover; object-position: top; box-shadow: 0 2px 0 var(--cream-3); }
.suggest-item b { font-weight: 900; display: block; line-height: 1.2; }
.suggest-item small { color: var(--ink-2); font-weight: 700; font-size: 12.5px; }
.suggest-item.hl, .suggest-item:hover { background: var(--sky-soft); }
.suggest-item mark { background: rgba(255, 200, 61, .55); color: inherit; border-radius: 4px; padding: 0 1px; }
.suggest-empty { padding: 14px 10px; color: var(--ink-2); font-weight: 700; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 8px 6px; }

/* top actions */
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 15px; color: var(--ink);
  transition: background .2s, box-shadow .2s, transform .2s var(--spring);
}
.icon-btn:hover { background: var(--paper); box-shadow: inset 0 0 0 2px var(--cream-3), 0 3px 0 var(--cream-3); }
.icon-btn:active { transform: translateY(2px); }
.icon-btn[aria-expanded="true"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--cream-3), 0 3px 0 var(--cream-3); }
.bubble-count {
  position: absolute; top: 5px; right: 4px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px;
  background: var(--coral-deep); color: #fff;
  border: 2px solid var(--cream);
  font-family: var(--display); font-size: 11px; line-height: 15px; text-align: center;
}
.bubble-count.online { background: var(--mint-deep); }
.divider-v { width: 2px; height: 28px; border-radius: 2px; background: var(--cream-3); margin: 0 6px; opacity: .8; }

[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, -4px);
  padding: 6px 10px; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-family: var(--body); font-weight: 700; font-size: 12.5px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .2s var(--out);
  z-index: 60;
}
[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
[data-tip][aria-expanded="true"]::after { opacity: 0; }

/* ---------- toy buttons (plastic, bevel, coloured side) ---------- */
.toy-btn {
  --c: var(--sun); --d: var(--sun-d); --t: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px;
  border-radius: 15px;
  font-family: var(--display); font-size: 17px; letter-spacing: .3px; line-height: 1;
  color: var(--t);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 72%, white) 0%, var(--c) 58%);
  border: 2px solid var(--d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 4px 0 var(--d), 0 14px 18px -12px var(--d);
  transition: transform .16s var(--out), box-shadow .16s var(--out), filter .2s, opacity .2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.toy-btn .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.toy-btn:hover { transform: translateY(-2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 6px 0 var(--d), 0 18px 22px -12px var(--d); }
.toy-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 1px 0 var(--d), 0 4px 8px -6px var(--d); }
.toy-btn[disabled] { cursor: default; filter: saturate(.2); opacity: .55; transform: none; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 3px 0 var(--d); }
.toy-btn.blue { --c: var(--blue); --d: var(--blue-d); --t: #fff; text-shadow: 0 1px 0 rgba(20, 60, 160, .45); }
.toy-btn.mint { --c: var(--mint); --d: var(--mint-d); --t: var(--ink); }
.toy-btn.coral { --c: var(--coral); --d: var(--coral-d); --t: var(--ink); }
.toy-btn.cream { --c: var(--paper); --d: var(--cream-3); --t: var(--ink); background: var(--paper); }
.toy-btn.sm { height: 38px; padding: 0 14px; font-size: 15px; border-radius: 13px; }
.toy-btn.sm .ico { width: 18px; height: 18px; }
.toy-btn.lg { height: 56px; padding: 0 26px; font-size: 20px; border-radius: 18px; }
.toy-btn.icon-only { width: 46px; padding: 0; }
.toy-btn.sm.icon-only { width: 38px; }
.toy-btn.full { width: 100%; }

/* wallet + avatar */
.wallet {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 6px 0 8px;
  border-radius: 15px;
  background: var(--paper);
  border: 2px solid var(--cream-3);
  box-shadow: 0 3px 0 var(--cream-3);
}
.wallet .coin-ico { width: 28px; height: 28px; transition: transform .6s var(--spring); }
.wallet:hover .coin-ico { transform: rotateY(360deg); }
.wallet-amt { font-family: var(--display); font-size: 18px; letter-spacing: .4px; min-width: 50px; font-variant-numeric: tabular-nums; }
.wallet .add {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--ink);
  background: linear-gradient(180deg, #8AEBC9, var(--mint));
  border: 2px solid var(--mint-d);
  box-shadow: 0 2px 0 var(--mint-d);
  transition: transform .2s var(--spring);
}
.wallet .add .ico { width: 16px; height: 16px; stroke-width: 3; }
.wallet .add:hover { transform: scale(1.1) rotate(90deg); }
.wallet.bump .wallet-amt { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.25); color: var(--sun-d); } }

.avatar {
  position: relative;
  width: 46px; height: 46px; flex: none;
  border-radius: 15px;
  background: #FFD3E4;
  border: 2px solid var(--bubble-d);
  box-shadow: 0 3px 0 var(--bubble-d);
  transition: transform .2s var(--spring);
}
.av-img { position: absolute; inset: 0; border-radius: 13px; overflow: hidden; }
.av-img img { width: 100%; height: 100%; object-fit: cover; }
.avatar:hover { transform: translateY(-2px) rotate(-3deg); }
.avatar .lvl {
  position: absolute; right: -7px; bottom: -7px;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 8px;
  background: var(--sun); border: 2px solid var(--paper);
  box-shadow: 0 2px 0 var(--sun-d);
  font-family: var(--display); font-size: 12px; line-height: 18px; text-align: center; color: var(--ink);
}

/* logged-out state: controls become inline-flex, text blocks stay blocks */
.guest-only { display: none !important; }
body.guest button.guest-only, body.guest a.guest-only { display: inline-flex !important; }
body.guest h1.guest-only, body.guest p.guest-only, body.guest div.guest-only { display: block !important; }
body.guest span.guest-only, body.guest small.guest-only { display: inline !important; }
body.guest .user-only, body.guest .user-only-block, body.guest .board li.me { display: none !important; }
.stretch { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }

/* ---------- dropdown menus (custom, never native select) ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 12px);
  min-width: 240px; padding: 8px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--cream-3), 0 30px 50px -22px rgba(27, 38, 86, .45);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right;
  pointer-events: none;
  transition: opacity .16s ease, transform .24s var(--out);
  z-index: 55;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 2px dashed var(--cream-2); margin-bottom: 6px; }
.menu-head b { display: block; font-weight: 900; font-size: 16px; line-height: 1.2; }
.menu-head small { color: var(--ink-2); font-weight: 700; }
.menu-head .avatar { pointer-events: none; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border-radius: 13px; text-align: left;
  font-weight: 700; font-size: 14.5px; color: var(--ink);
}
.menu-item .ico { width: 20px; height: 20px; color: var(--ink-2); }
.menu-item:hover, .menu-item.hl { background: var(--sky-soft); }
.menu-item .check { margin-left: auto; color: var(--blue); opacity: 0; }
.menu-item[aria-checked="true"] { color: var(--blue-d); }
.menu-item[aria-checked="true"] .check { opacity: 1; }
.menu-item .trail { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.menu-sep { height: 2px; background: var(--cream-2); border-radius: 2px; margin: 6px 6px; }

.notif { position: relative; display: flex; gap: 12px; padding: 10px; border-radius: 14px; }
.notif:hover { background: var(--cream); }
.notif img, .notif > svg { width: 42px; height: 42px; object-fit: contain; flex: none; }
.notif p { margin: 0; font-size: 13.5px; line-height: 1.35; font-weight: 700; }
.notif small { color: var(--ink-3); font-weight: 700; font-size: 12px; }
/* unread: a dot on the icon, so every line of text keeps the same left edge */
.notif.unread::after { content: ""; position: absolute; left: 44px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral-d); box-shadow: 0 0 0 2px var(--paper); }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: var(--top);
  height: calc(100vh - var(--top));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 12px 14px 18px;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
/* when the list is taller than the screen, fade the bottom edge so it reads as scrollable */
.sidebar.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent); }
.side-panel {
  position: relative;
  padding: 6px 8px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--cream-2), 0 26px 36px -30px rgba(120, 80, 20, .5);
}
.nav-item {
  --c: var(--blue); --d: var(--blue-d);
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 10px 0 4px;
  border-radius: 13px;
  font-weight: 700; font-size: 14.5px; color: var(--ink);
  transition: background .18s;
}
/* every category gets its own solid toy chip, so the line glyphs carry the same weight as the 3D genre icons */
.nav-item .chip {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  margin-top: -3px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 68%, white) 0%, var(--c) 64%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--d);
  transition: transform .35s var(--spring);
}
.nav-item .chip .ico { width: 18px; height: 18px; stroke-width: 2.4; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .2)); }
.nav-item:hover { background: var(--cream); }
.nav-item:hover .chip { transform: rotate(-8deg) scale(1.06); }
.nav-item.active { background: var(--cream-2); }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); }
.nav-item.genre img { width: 36px; height: 36px; margin: -1px; object-fit: contain; transition: transform .35s var(--spring); }
.nav-item.genre:hover img { transform: scale(1.14) rotate(-8deg); }
.nav-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 4px;
  font-family: var(--display); font-size: 12.5px; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--ink-3);
}
.nav-label::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--cream-2); }

.chest {
  position: relative; overflow: hidden;
  margin-top: 12px; padding: 15px 16px 16px;
  border-radius: 22px;
  background:
    radial-gradient(120px 80px at 85% 10%, rgba(255, 255, 255, .7), transparent 70%),
    linear-gradient(170deg, #BFE6FF, #8FD0FF);
  border: 2px solid #6FB9EE;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 #6FB9EE;
}
.chest-art { position: absolute; right: -2px; top: -2px; width: 88px; height: 77px; transform: rotate(8deg); filter: drop-shadow(0 8px 6px rgba(27, 38, 86, .22)); animation: wobble 3.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(2deg) translateY(-3px); } }
.chest b { display: block; font-family: var(--display); font-size: 18px; line-height: 1.1; font-weight: 400; }
.chest p { margin: 3px 0 11px; max-width: 128px; font-size: 13px; line-height: 1.3; font-weight: 700; color: #2B4A7A; }
.chest .toy-btn { width: 100%; }
.chest.claimed .toy-btn { pointer-events: none; filter: saturate(.3); opacity: .8; }
.chest.claimed .chest-art { animation: none; }

/* ---------- main ---------- */
.main { min-width: 0; padding: 8px var(--gutter) 72px 14px; }
.m-search { display: none; }

.rise { animation: rise .7s var(--out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.section { margin-top: 48px; }
.section.top-games { margin-top: 42px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-title {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 400;
  font-size: 30px; line-height: 1; letter-spacing: .2px;
}
.sec-sub { margin: 7px 0 0; color: var(--ink-2); font-size: 14.5px; font-weight: 700; }
.sec-tools { display: flex; align-items: center; gap: 10px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 14px;
  border-radius: 13px;
  font-weight: 900; font-size: 14px; color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--cream-3);
  box-shadow: 0 3px 0 var(--cream-3);
  transition: transform .15s var(--out), box-shadow .15s;
  white-space: nowrap;
}
.link-btn .ico { width: 18px; height: 18px; stroke-width: 2.6; transition: transform .25s var(--spring); }
.link-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--cream-3); }
.link-btn:hover .ico.go { transform: translateX(3px); }
.link-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cream-3); }
.link-btn[aria-expanded="true"] .ico.chev { transform: rotate(180deg); }
.round-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 13px;
  background: var(--paper); border: 2px solid var(--cream-3); box-shadow: 0 3px 0 var(--cream-3);
  transition: transform .15s var(--out), opacity .2s;
}
.round-btn .ico { width: 18px; height: 18px; stroke-width: 2.8; }
.round-btn:hover { transform: translateY(-1px); }
.round-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cream-3); }
.round-btn[disabled] { opacity: .35; pointer-events: none; }
.round-btn[hidden] { display: none; }

/* greeting strip */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 6px 0 4px; }
.hello-txt { min-width: 0; }
.hello h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: .2px; }
.hello h1 em { font-style: normal; color: var(--blue); }
.hello p { margin: 6px 0 0; color: var(--ink-2); font-weight: 700; }
.streak {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 7px 10px 7px 7px;
  background: var(--paper);
  border: 2px solid var(--cream-2); border-radius: 18px;
  box-shadow: 0 4px 0 var(--cream-2);
}
.streak-flame {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(180deg, #FFB45A, #FF7B3F);
  border: 2px solid #E0572A;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #C94A22;
}
.streak-flame .ico { width: 20px; height: 20px; stroke-width: 2.3; }
.streak-days { display: flex; gap: 6px; }
.streak-days i {
  width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center;
  font-style: normal; font-family: var(--display); font-size: 12px; color: var(--ink-3);
  background: var(--cream); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .04);
}
.streak-days i.on { background: var(--sun); color: var(--ink); box-shadow: 0 2px 0 var(--sun-d); }
.streak-days i.today { background: var(--paper); color: #B26F00; box-shadow: inset 0 0 0 2px var(--sun); }
.streak b { font-family: var(--display); font-weight: 400; font-size: 15px; display: block; line-height: 1.1; white-space: nowrap; }
.streak small { color: var(--ink-2); font-weight: 700; font-size: 12px; white-space: nowrap; }

/* ---------- mood blocks ---------- */
.moods {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
  padding-top: 36px;
}
.mood {
  --c: var(--sun); --d: var(--sun-d);
  position: relative;
  height: 112px;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 6px 13px;
  border-radius: 22px;
  text-align: center;
  font-family: var(--display); font-size: 16px; line-height: 1.05; letter-spacing: .2px;
  color: var(--ink);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 55%, white) 0%, var(--c) 72%);
  border: 2.5px solid var(--d);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, .6),
    inset 0 -4px 0 rgba(0, 0, 0, .05),
    0 6px 0 var(--d),
    0 20px 22px -14px var(--d);
  transition: transform .2s var(--out), box-shadow .2s var(--out);
  -webkit-tap-highlight-color: transparent;
}
.mood::before {
  content: ""; position: absolute; left: 12px; top: 9px;
  width: 30%; height: 9px; border-radius: 9px;
  background: rgba(255, 255, 255, .55);
}
.mood img {
  position: absolute; left: 50%; top: -34px;
  width: 88px; height: 88px;
  transform: translateX(-50%);
  filter: drop-shadow(0 9px 8px rgba(27, 38, 86, .22));
  transition: transform .4s var(--spring);
}
/* every label is two lines, so every icon and label sit at the same height */
.mood span { position: relative; display: block; min-height: 2.1em; }
.mood:hover { transform: translateY(-4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(0, 0, 0, .05), 0 10px 0 var(--d), 0 26px 26px -14px var(--d); }
.mood:hover img { transform: translateX(-50%) translateY(-7px) rotate(-9deg) scale(1.08); }
.mood:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 1px 0 var(--d), 0 6px 10px -8px var(--d); }

/* ---------- trading cards ---------- */
.card {
  --k: var(--blue);
  position: relative;
  display: flex; flex-direction: column;
  padding: 6px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 21px;
  box-shadow: 0 4px 0 var(--cream-3), 0 18px 26px -20px rgba(27, 38, 86, .55);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .45s var(--out), box-shadow .35s var(--out), border-color .3s;
  -webkit-tap-highlight-color: transparent;
}
.card:hover {
  --ty: -6px;
  border-color: color-mix(in oklab, var(--k) 40%, white);
  box-shadow: 0 5px 0 color-mix(in oklab, var(--k) 55%, var(--cream-3)), 0 30px 40px -22px color-mix(in oklab, var(--k) 80%, transparent);
}
.card.tilting { transition: transform .12s linear, box-shadow .35s var(--out), border-color .3s; }
.card-art {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 15px;
  overflow: hidden;
  background: var(--cream-2);
  isolation: isolate;
}
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--out); }
.card:hover .card-art img { transform: scale(1.045); }
.card-art::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(27, 38, 86, .08);
  pointer-events: none;
}
.card-sheen {
  position: absolute; inset: -20%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .6) 48%, rgba(255, 255, 255, 0) 58%);
  transform: translateX(-80%);
  transition: transform 0s;
  pointer-events: none;
  z-index: 2;
}
.card:hover .card-sheen { transform: translateX(80%); transition: transform .9s var(--out); }
.card-play {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(180deg, #FFE08A, var(--sun));
  border: 2.5px solid var(--sun-d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--sun-d), 0 14px 24px -8px rgba(27, 38, 86, .5);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
  transition: opacity .2s, transform .35s var(--spring);
}
.card-play .ico { width: 26px; height: 26px; margin-left: 3px; }
.card:hover .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-meta { padding: 9px 6px 4px; min-width: 0; }
.card-title { display: block; font-weight: 900; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.card-sub img { width: 20px; height: 20px; margin: -2px -1px -2px -2px; object-fit: contain; }
.rate { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 13.5px; color: var(--ink); letter-spacing: .3px; }
.rate .ico { width: 15px; height: 15px; color: var(--sun); stroke: var(--sun-d); stroke-width: 1.4; fill: var(--sun); }
/* one badge at most per card, pinned to the art's corner */
.tag-new {
  position: absolute; left: 8px; bottom: 9px; z-index: 4;
  padding: 4px 9px 3px;
  border-radius: 9px;
  font-family: var(--display); font-size: 12.5px; letter-spacing: .6px; line-height: 1.2;
  color: #fff;
  background: var(--coral-deep); border: 2px solid var(--paper);
  box-shadow: 0 3px 0 #A83A20, 0 6px 12px -6px rgba(0, 0, 0, .4);
  transform: rotate(-5deg);
}
.tag-new.hot { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--sun-d), 0 6px 12px -6px rgba(0, 0, 0, .4); }
.fav {
  position: absolute; right: 13px; bottom: calc(var(--meta-h, 58px) + 8px); z-index: 4;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 253, 247, .92);
  box-shadow: 0 2px 0 rgba(27, 38, 86, .15);
  opacity: 0; transform: scale(.8);
  transition: opacity .2s, transform .3s var(--spring), color .2s;
}
.fav .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.card:hover .fav, .fav.on { opacity: 1; transform: none; }
.fav.on { color: var(--coral-d); }
.fav.on .ico { fill: var(--coral); stroke: var(--coral-d); }
.fav.pop { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.35); } }

/* ---------- top games mosaic ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px 18px;
}
.card.big { grid-column: span 2; grid-row: span 2; padding: 8px; border-width: 2.5px; border-radius: 26px; }
.card.big .card-art { flex: 1; aspect-ratio: auto; min-height: 0; border-radius: 19px; }
.card.big .card-art img { position: absolute; inset: 0; object-position: center 35%; }
.big-meta { display: flex; align-items: center; gap: 16px; padding: 14px 8px 6px 10px; }
.big-meta h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; letter-spacing: .2px; }
.big-meta p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); font-weight: 700; }
.big-meta .toy-btn { margin-left: auto; flex: none; }
.big-stats { display: flex; align-items: center; gap: 14px; padding: 8px 10px 4px; font-size: 13px; font-weight: 900; color: var(--ink-2); }
.big-stats > span { display: inline-flex; align-items: center; gap: 6px; }
.big-stats img { width: 22px; height: 22px; object-fit: contain; }
.big-stats .live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-d); box-shadow: 0 0 0 4px rgba(31, 166, 122, .18); animation: live 1.8s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(31, 166, 122, 0); } }
.big-stats .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--cream-3); }

.sticker {
  position: absolute; top: -16px; right: -14px; z-index: 5;
  width: 84px; height: 84px;
  display: grid; place-items: center; align-content: center;
  border-radius: 50%;
  text-align: center;
  font-family: var(--display); color: var(--ink); line-height: .95;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .6), transparent 45%),
    var(--sun);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--sun-d), 0 12px 18px -8px rgba(27, 38, 86, .45);
  transform: rotate(12deg);
  transition: transform .5s var(--spring);
}
.sticker b { display: block; font-weight: 400; font-size: 26px; }
.sticker small { display: block; font-size: 11.5px; letter-spacing: .5px; }
.card.big:hover .sticker { transform: rotate(-4deg) scale(1.06); }

/* coming soon: a present wrapped in dungeon-stone paper, lit by a torch from below */
.card.soon { cursor: default; }
.soon-art {
  background:
    radial-gradient(95% 42% at 50% 112%, rgba(255, 150, 60, .62), rgba(255, 120, 40, 0) 72%),
    var(--bricks) 0 0 / 44px 26px,
    linear-gradient(170deg, #34448C 0%, #1B2656 78%);
}
.soon-art .torch {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 30% at 50% 104%, rgba(255, 196, 110, .55), rgba(255, 160, 60, 0) 70%);
  animation: flicker 3.4s ease-in-out infinite;
}
@keyframes flicker { 0%, 100% { opacity: .7; } 35% { opacity: 1; } 55% { opacity: .82; } 75% { opacity: .95; } }
.ribbon { position: absolute; background: linear-gradient(90deg, #E0573A, #FF8466 40%, #FF9C82 55%, #E0573A); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .08); }
.ribbon.v { top: 0; bottom: 0; left: 50%; width: 24px; transform: translateX(-50%); }
.ribbon.h { left: 0; right: 0; top: 30%; height: 24px; margin-top: -12px; background: linear-gradient(180deg, #E0573A, #FF8466 40%, #FF9C82 55%, #E0573A); }
.bow { position: absolute; left: 50%; top: 30%; width: 92px; height: 62px; transform: translate(-50%, -58%); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); transition: transform .5s var(--spring); z-index: 2; }
.card.soon:hover .bow { transform: translate(-50%, -62%) rotate(-6deg) scale(1.06); }
.soon-art .string { position: absolute; left: 50%; top: 30%; width: 2px; height: calc(28% + 10px); margin-left: -1px; background: #FFE6DC; border-radius: 2px; transform: rotate(3deg); transform-origin: top center; z-index: 1; }
.soon-tag {
  position: absolute; left: 50%; top: 58%; z-index: 3;
  width: min(80%, 210px);
  padding: 24px 10px 11px;
  transform: translateX(-50%) rotate(-4deg);
  text-align: center;
  background: var(--paper);
  border-radius: 12px 12px 14px 14px;
  box-shadow: 0 4px 0 var(--cream-3), 0 14px 20px -8px rgba(0, 0, 0, .55);
}
/* keyhole where the string goes through */
.soon-tag .keyhole { position: absolute; left: 50%; top: 6px; width: 10px; height: 14px; margin-left: -5px; }
.soon-tag .keyhole::before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.soon-tag .keyhole::after { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 8px; background: var(--ink); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.soon-tag b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.05; }
.soon-tag small { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 900; color: var(--coral-deep); letter-spacing: .6px; text-transform: uppercase; }
.notify { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-size: 12.5px; color: var(--blue-d); }
.notify .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.notify.on { color: var(--mint-deep); }

/* ---------- featured: landscape cards ---------- */
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feat {
  --k: var(--blue); --p: var(--sky-soft);
  position: relative;
  display: flex; flex-direction: column;
  padding: 6px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--cream-3), 0 18px 26px -22px rgba(27, 38, 86, .5);
  transition: transform .3s var(--out), box-shadow .3s var(--out), border-color .3s;
  -webkit-tap-highlight-color: transparent;
}
.feat:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--k) 35%, white); box-shadow: 0 6px 0 color-mix(in oklab, var(--k) 50%, var(--cream-3)), 0 28px 36px -22px color-mix(in oklab, var(--k) 80%, transparent); }
.feat-art { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; isolation: isolate; background: var(--p); }
.feat-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--out); }
.feat:hover .feat-art img { transform: scale(1.04); }
.feat:hover .card-sheen { transform: translateX(80%); transition: transform .9s var(--out); }
.feat-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(27, 38, 86, .08); pointer-events: none; }
.feat-art .toy-btn { position: absolute; right: 12px; bottom: 12px; z-index: 3; }
.feat:hover .feat-art .toy-btn { transform: translateY(-2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 6px 0 var(--d), 0 18px 22px -12px var(--d); }
.feat-body { display: flex; align-items: center; gap: 12px; padding: 12px 10px 6px 6px; min-width: 0; }
.feat-ico { width: 46px; height: 46px; flex: none; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(27, 38, 86, .2)); transition: transform .4s var(--spring); }
.feat:hover .feat-ico { transform: rotate(-8deg) scale(1.08); }
.feat-txt { min-width: 0; }
.feat h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.05; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.3; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- shelves (generic, used where a row outgrows its width) ---------- */
.shelf { position: relative; padding-bottom: 30px; }
.shelf::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFBF2 0, #F8EBD2 17px, #EDD5AC 17px, #F1DDB9 100%);
  box-shadow: inset 0 2px 0 #fff, 0 6px 0 #DDBF8C, 0 26px 30px -18px rgba(120, 80, 20, .5);
  z-index: 0;
}
.shelf-track {
  position: relative; z-index: 1;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr);
  gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 16px 6px 22px;
  margin: -16px -6px -22px;
  scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > * { scroll-snap-align: start; }

/* continue playing */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.slot {
  --k: var(--blue);
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px 10px 10px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--cream-3);
  transition: transform .25s var(--out), box-shadow .25s;
}
.slot:hover { transform: translateY(-3px); box-shadow: 0 6px 0 color-mix(in oklab, var(--k) 50%, var(--cream-3)), 0 22px 30px -20px color-mix(in oklab, var(--k) 80%, transparent); }
.slot img { width: 74px; height: 96px; border-radius: 14px; object-fit: cover; object-position: top; flex: none; box-shadow: 0 3px 0 var(--cream-3); }
.slot-body { flex: 1; min-width: 0; }
.slot-body b { display: block; font-weight: 900; font-size: 15.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-body small { display: block; color: var(--ink-2); font-weight: 700; font-size: 12.5px; margin: 2px 0 10px; }
.progress { height: 14px; border-radius: 8px; background: var(--cream-2); box-shadow: inset 0 2px 0 rgba(120, 80, 20, .1); overflow: hidden; }
.progress i {
  display: block; height: 100%; width: var(--p);
  border-radius: 8px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .28) 0 6px, rgba(255, 255, 255, 0) 6px 12px),
    linear-gradient(180deg, color-mix(in oklab, var(--k) 65%, white), var(--k));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45);
  background-size: 17px 17px, auto;
  animation: stripes 1.2s linear infinite;
}
@keyframes stripes { to { background-position: 17px 0, 0 0; } }
.slot .toy-btn { flex: none; }

/* ---------- studio spotlight: Shop Tycoon, landscape ---------- */
.spot-card {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(320px 200px at 12% 110%, rgba(255, 255, 255, .45), transparent 70%),
    linear-gradient(165deg, #FFE47E 0%, #FFCB45 70%);
  border: 2.5px solid var(--sun-d);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .55), 0 6px 0 var(--sun-d), 0 34px 44px -30px rgba(227, 154, 12, .9);
  isolation: isolate;
}
/* one awning across the whole banner, over the picture too */
.spot-awning { position: absolute; left: 0; right: 0; top: 0; height: 34px; display: flex; z-index: 3; filter: drop-shadow(0 4px 0 rgba(120, 60, 10, .18)); }
.spot-awning i {
  flex: 1;
  background: repeating-linear-gradient(90deg, var(--a) 0 22px, #FFFDF7 22px 44px);
  -webkit-mask: radial-gradient(11px 8px at 11px 24px, #000 98%, transparent) 0 0 / 22px 34px repeat-x, linear-gradient(#000 0 24px, transparent 24px);
  mask: radial-gradient(11px 8px at 11px 24px, #000 98%, transparent) 0 0 / 22px 34px repeat-x, linear-gradient(#000 0 24px, transparent 24px);
}
.spot-copy { position: relative; z-index: 2; padding: 54px 22px 28px 34px; display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-size: 14px; letter-spacing: 1.1px; text-transform: uppercase;
  color: #8A5700;
}
.eyebrow img { width: 26px; height: 26px; object-fit: contain; margin: -4px 0; }
.spot-copy h2 { margin: 10px 0 10px; font-family: var(--display); font-weight: 400; font-size: 42px; line-height: .98; letter-spacing: .2px; }
.spot-copy p { margin: 0 0 20px; max-width: 38ch; font-size: 15px; line-height: 1.5; font-weight: 700; color: #3F3A2E; }
.spot-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.spot-cta .rate { margin-left: 0; font-size: 17px; }
/* on the yellow banner the usual gold star would vanish, so it takes the deeper gold */
.spot-cta .rate .ico { width: 18px; height: 18px; fill: var(--sun-d); stroke: #A86A04; }

/* the street art keeps its own shape: never cropped, it sits under the awning and sets the banner height */
.spot-art { position: relative; align-self: stretch; min-height: 0; margin-top: 24px; overflow: hidden; background: #BFE3FF; }
.spot-art::before { content: ""; display: block; aspect-ratio: 1100 / 623; }
.spot-art::after { content: ""; position: absolute; inset: -30px; z-index: 0; background: url("img/wide-shop.webp") center top / cover; filter: blur(16px) saturate(1.15); opacity: .9; }
.spot-art img { position: absolute; left: 0; bottom: 0; z-index: 1; width: 100%; height: auto; transition: transform 1s var(--out); transform-origin: 50% 100%; }
.spot-card:hover .spot-art img { transform: scale(1.025); }

/* ---------- from the workshop ---------- */
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wk {
  --k: var(--blue);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--cream-3), 0 18px 26px -22px rgba(27, 38, 86, .5);
  transition: transform .3s var(--out), box-shadow .3s var(--out), border-color .3s;
}
.wk:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--k) 35%, white); box-shadow: 0 6px 0 color-mix(in oklab, var(--k) 50%, var(--cream-3)), 0 28px 36px -22px color-mix(in oklab, var(--k) 80%, transparent); }
.wk-art { position: relative; height: 172px; margin: 6px 6px 0; border-radius: 18px; overflow: hidden; background: var(--cream-2); isolation: isolate; }
.wk-art > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--out); }
.wk:hover .wk-art > img { transform: scale(1.045); }
/* workshop art: our 3D icons on a coloured toy plate, so the covers are not repeated again */
.plate-art {
  display: grid; place-items: center;
  background:
    radial-gradient(70% 55% at 50% 118%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%),
    linear-gradient(170deg, var(--c1), var(--c2));
}
.plate-art > img { position: relative; z-index: 1; width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 16px 12px rgba(90, 30, 80, .3)); animation: hover-float 3.6s ease-in-out infinite; transition: none; }
.wk:hover .plate-art > img { transform: none; }
.plate-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.plate-deco.hearts {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='130'%3E%3Cg fill='%23fff' fill-opacity='.75'%3E%3Cpath d='M22 30c-3-4-10-2-9 3 1 4 9 9 9 9s8-5 9-9c1-5-6-7-9-3Z'/%3E%3Cpath d='M150 88c-2-3-7-1.5-6.5 2 .6 3 6.5 6.5 6.5 6.5s6-3.5 6.5-6.5c.5-3.5-4.5-5-6.5-2Z'/%3E%3C/g%3E%3Cg fill='%23FF6FA8' fill-opacity='.5'%3E%3Cpath d='M128 22c-2-3-7-1.5-6.5 2 .6 3 6.5 6.5 6.5 6.5s6-3.5 6.5-6.5c.5-3.5-4.5-5-6.5-2Z'/%3E%3Cpath d='M40 100c-1.6-2.4-5.6-1.2-5.2 1.6.5 2.4 5.2 5.2 5.2 5.2s4.8-2.8 5.2-5.2c.4-2.8-3.6-4-5.2-1.6Z'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cpath d='M80 14l1.6 3.4 3.4 1.6-3.4 1.6L80 24l-1.6-3.4-3.4-1.6 3.4-1.6Z'/%3E%3Cpath d='M166 44l1.2 2.6 2.6 1.2-2.6 1.2-1.2 2.6-1.2-2.6-2.6-1.2 2.6-1.2Z'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 180px 130px;
}
.plate-deco.bunting {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='216' height='44'%3E%3Cpath d='M0 4Q108 34 216 4' fill='none' stroke='%23fff' stroke-width='2' stroke-opacity='.9'/%3E%3Cpath d='M12 7.4 30 12.2 19 30Z' fill='%23FF8466'/%3E%3Cpath d='M48 15.3 66 18.6 55 37Z' fill='%23FFC83D'/%3E%3Cpath d='M84 19.8 102 20.9 92 39.5Z' fill='%235EDBB0'/%3E%3Cpath d='M120 20.8 138 19.6 128 38.6Z' fill='%232B87FF'/%3E%3Cpath d='M156 17.6 174 14 164 32.5Z' fill='%23FF96C2'/%3E%3Cpath d='M192 10.4 208 6.6 201 24.6Z' fill='%23FFFDF7'/%3E%3C/svg%3E") 0 0 / 216px 44px repeat-x,
    radial-gradient(3px 3px at 14% 70%, #fff 98%, transparent) ,
    radial-gradient(3px 3px at 86% 64%, #FFC83D 98%, transparent),
    radial-gradient(2.5px 2.5px at 24% 88%, #FF8466 98%, transparent),
    radial-gradient(2.5px 2.5px at 78% 86%, #fff 98%, transparent);
}
.wk-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 14px 16px 16px; }
.wk-kicker { font-weight: 900; font-size: 12.5px; color: var(--ink-3); }
.wk h3 { margin: 3px 0 6px; font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.05; }
.wk p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--ink-2); }
.wk .toy-btn { margin-top: auto; }
.wk .toy-btn.on { --c: #CFF4E6; --d: var(--mint-d); }
.dungeon-art {
  display: grid; place-items: center;
  background:
    radial-gradient(120px 110px at 16% 58%, rgba(255, 170, 80, .45), transparent 70%),
    radial-gradient(120px 110px at 84% 58%, rgba(255, 170, 80, .45), transparent 70%),
    var(--bricks) 0 0 / 44px 26px,
    linear-gradient(180deg, #2A376F 0%, #1B2656 100%);
}
.dungeon-art > img { width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 16px 12px rgba(0, 0, 0, .45)); animation: hover-float 3.6s ease-in-out infinite; transition: none; }
.wk:hover .dungeon-art > img { transform: none; }
@keyframes hover-float { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -8px; rotate: -2deg; } }
.torch-l, .torch-r { position: absolute; top: 46%; width: 12px; height: 46px; border-radius: 4px 4px 6px 6px; background: linear-gradient(90deg, #6B4322, #9A6634 50%, #6B4322); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.torch-l { left: 14%; } .torch-r { right: 14%; }
.torch-l::before, .torch-r::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% - 4px);
  width: 22px; height: 30px; margin-left: -11px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 70%, #FFF3B0 0 22%, #FFC83D 45%, #FF7B3F 80%);
  box-shadow: 0 0 24px 8px rgba(255, 150, 60, .45);
  animation: flame 1.8s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.torch-r::before { animation-delay: -.7s; }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.08, .94) rotate(3deg); } }

/* ---------- browse by genre: a wooden cubby organiser ---------- */
.cubbies {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: 26px;
  background: linear-gradient(180deg, #F3DDB3, #E9CB97);
  border: 2px solid #D9B57A;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 5px 0 #CFA768, 0 28px 32px -22px rgba(120, 80, 20, .55);
}
.cubby {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 108px; padding: 12px 14px 12px 10px;
  border-radius: 17px;
  background: linear-gradient(180deg, #F4E2BF 0%, #FFF7E6 42%);
  box-shadow: inset 0 7px 9px -5px rgba(120, 80, 20, .38), inset 0 -2px 0 rgba(255, 255, 255, .7);
  transition: background .25s;
}
.cubby:hover { background: linear-gradient(180deg, #F4E2BF 0%, #FFFDF7 42%); }
.cubby > img, .cubby > svg { width: 72px; height: 72px; flex: none; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(120, 80, 20, .3)); transition: transform .4s var(--spring); }
.cubby:hover > img, .cubby:hover > svg { transform: translateY(-6px) rotate(-8deg) scale(1.06); }
.cubby-txt { min-width: 0; }
.cubby b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.05; }
/* the games in each genre, as a little fan of covers (no count badges) */
.fan { display: flex; height: 40px; margin: 7px 0 2px 1px; }
.fan > img, .fan > i {
  display: block; width: 30px; height: 40px; flex: none;
  margin-right: -9px;
  border-radius: 7px;
  object-fit: cover; object-position: top;
  border: 2px solid var(--paper);
  box-shadow: 0 2px 0 rgba(160, 110, 40, .28), 0 5px 8px -4px rgba(120, 80, 20, .4);
  transform: rotate(-7deg);
  transition: transform .35s var(--spring), margin .35s var(--spring);
}
.fan > :nth-child(2) { position: relative; z-index: 1; transform: rotate(1deg) translateY(-2px); }
.fan > :nth-child(3) { position: relative; z-index: 2; transform: rotate(8deg); }
.fan > :only-child { transform: rotate(-4deg); }
.cubby:hover .fan > * { margin-right: -4px; }
.fan-gift {
  background:
    linear-gradient(90deg, transparent 40%, #FF8466 40% 60%, transparent 60%),
    linear-gradient(180deg, transparent 38%, #FF8466 38% 56%, transparent 56%),
    var(--bricks) 0 0 / 22px 13px,
    linear-gradient(170deg, #34448C, #1B2656);
}
.cubby em { display: -webkit-box; margin-top: 5px; font-style: normal; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--ink-3); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- bottom band: leaderboard + shop ---------- */
.band { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-top: 48px; }
.panel {
  position: relative;
  padding: 22px;
  background: var(--paper);
  border: 2px solid var(--cream-2);
  border-radius: 28px;
  box-shadow: 0 5px 0 var(--cream-3), 0 30px 40px -32px rgba(120, 80, 20, .6);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; display: flex; align-items: center; gap: 10px; }
.panel-head h2 img { width: 36px; height: 36px; margin: -6px 0; object-fit: contain; }
.panel-head h2 .toy-chip { width: 38px; height: 38px; margin: -6px 0; border-radius: 12px; }
.panel-head h2 .toy-chip .ico { width: 21px; height: 21px; }

.seg {
  position: relative;
  display: inline-flex; padding: 4px;
  background: var(--cream);
  border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(120, 80, 20, .08);
}
.seg button {
  position: relative; z-index: 1;
  height: 34px; padding: 0 12px;
  border-radius: 10px;
  font-weight: 900; font-size: 13.5px; color: var(--ink-2);
  transition: color .2s;
}
.seg button[aria-selected="true"] { color: var(--ink); }
.seg .seg-pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--cream-3), 0 0 0 1.5px var(--cream-3);
  transition: transform .35s var(--spring), width .35s var(--spring);
}

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 15px; transition: background .2s; }
.board li:hover { background: var(--cream); }
.board .pos { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: var(--display); font-size: 14px; color: var(--ink-2); background: var(--cream); }
.board li:nth-child(1) .pos { background: linear-gradient(180deg, #FFE38A, var(--sun)); color: var(--ink); box-shadow: 0 2px 0 var(--sun-d); }
.board li:nth-child(2) .pos { background: linear-gradient(180deg, #F2F5FA, #C9D2E3); color: var(--ink); box-shadow: 0 2px 0 #9DA9C2; }
.board li:nth-child(3) .pos { background: linear-gradient(180deg, #FFCFA8, #F09A5E); color: var(--ink); box-shadow: 0 2px 0 #C66F35; }
.board .pfp { width: 40px; height: 40px; border-radius: 13px; overflow: hidden; background: var(--c); border: 2px solid var(--c); box-shadow: 0 3px 0 var(--d); }
.board .pfp img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.board b { font-weight: 900; font-size: 15px; }
.board small { display: block; color: var(--ink-3); font-weight: 700; font-size: 12px; line-height: 1.2; }
.board .score { font-family: var(--display); font-size: 17px; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 6px; }
.board .score .coin-ico { width: 20px; height: 20px; }
.board li.me { background: var(--sky-soft); box-shadow: inset 0 0 0 2px #B8DFFF; }
.board li.me .pos { background: var(--blue); color: #fff; font-size: 12px; box-shadow: 0 2px 0 var(--blue-d); }
.board-anim li { animation: rise .5s var(--out) backwards; animation-delay: calc(var(--i) * 45ms); }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px 4px 0; border-top: 2px dashed var(--cream-2); font-weight: 700; font-size: 13px; color: var(--ink-3); }
.board-foot span { display: inline-flex; align-items: center; gap: 7px; }
.board-foot span .ico { width: 17px; height: 17px; }

.shop-panel {
  overflow: hidden;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(255, 255, 255, .75), transparent 70%),
    linear-gradient(170deg, #D7EEFF 0%, #B9E0FF 100%);
  border-color: #A6D5FA;
  box-shadow: 0 5px 0 #86C1EE, 0 30px 40px -32px rgba(20, 99, 219, .6);
}
.shop-panel .panel-head p { margin: 6px 0 0; color: #2F4A76; font-weight: 700; font-size: 14px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 6px; }
.pack {
  --d: #9CCBF0;
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px 10px;
  border-radius: 20px;
  background: var(--paper);
  border: 2px solid var(--d);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 var(--d);
  text-align: center;
  transition: transform .2s var(--out), box-shadow .2s;
}
.pack:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: inset 0 2px 0 #fff, 0 8px 0 var(--d), 0 20px 24px -16px rgba(20, 99, 219, .6); }
.pack .pack-art { width: 84px; height: 74px; transition: transform .4s var(--spring); overflow: visible; }
.pack:hover .pack-art { transform: translateY(-4px) scale(1.06) rotate(-3deg); }
.pack b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; margin-top: 4px; }
.pack small { color: var(--ink-2); font-weight: 700; font-size: 12.5px; }
/* the bonus is a plain line of text, so each pack carries at most one badge (its ribbon) */
.bonus { margin-top: 4px; font-weight: 900; font-size: 12.5px; line-height: 1.3; white-space: nowrap; color: var(--mint-deep); }
.bonus.none { color: var(--ink-3); }
.pack .price {
  margin-top: 10px; width: 100%;
  height: 36px; display: grid; place-items: center;
  border-radius: 11px;
  font-family: var(--display); font-size: 16px; letter-spacing: .3px;
  color: var(--ink);
  background: linear-gradient(180deg, #8AEBC9, var(--mint));
  border: 2px solid var(--mint-d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--mint-d);
}
.pack .ribbon-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  padding: 3px 10px 2px; border-radius: 8px;
  font-family: var(--display); font-size: 12.5px; letter-spacing: .4px; white-space: nowrap;
  color: #fff; background: var(--coral-deep); box-shadow: 0 2px 0 #A83A20;
  z-index: 2;
}
.pack.pop { --d: #F09A7F; }
.pack.best { --d: var(--sun-d); background: linear-gradient(180deg, #FFF8E2, #FFEFC2); }
.pack.best .ribbon-tag { background: var(--blue-d); box-shadow: 0 2px 0 #0B3F99; }
.skins { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 10px 10px 14px; background: rgba(255, 253, 247, .72); border-radius: 18px; }
.skins-label { font-weight: 900; font-size: 13.5px; color: #2F4A76; }
.skin { width: 48px; height: 48px; flex: none; padding: 3px; border-radius: 15px; background: var(--paper); box-shadow: 0 3px 0 #9CCBF0; transition: transform .3s var(--spring); }
.skin img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.skin:hover { transform: translateY(-3px) rotate(-6deg); }
.skins .toy-btn { margin-left: auto; }
.adfree-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; background: rgba(255, 253, 247, .72); border-radius: 18px; }
.toy-chip {
  --c: var(--mint); --d: var(--mint-d);
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px; color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 62%, white), var(--c));
  border: 2px solid var(--d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--d);
}
.toy-chip .ico { width: 22px; height: 22px; stroke-width: 2.4; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .18)); }
.adfree-row b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.1; }
.adfree-row small { display: block; color: #2F4A76; font-weight: 700; font-size: 12.5px; }
.adfree-row .toy-btn { margin-left: auto; }

/* ---------- footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding: 24px 4px 0;
  border-top: 2px dashed var(--cream-3);
  color: var(--ink-2); font-weight: 700; font-size: 13.5px;
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }
.foot .brand { padding: 0; height: auto; }
.foot .brand-mark { width: 40px; height: 33px; }
.foot .brand-word { font-size: 17px; }

/* ---------- modals (above the phone's full-screen game) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(27, 38, 86, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: relative;
  width: 100%; max-width: 440px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 28px;
  background: var(--paper);
  border: 2.5px solid var(--cream-2);
  border-radius: 30px;
  box-shadow: 0 6px 0 var(--cream-3), 0 40px 80px -30px rgba(27, 38, 86, .6);
  transform: translateY(24px) scale(.96);
  transition: transform .4s var(--spring);
}
.modal.open .sheet { transform: none; }
.sheet.wide { max-width: 740px; }
.sheet:focus { outline: none; }
.sheet-close { position: absolute; top: 16px; right: 16px; }
.sheet h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.sheet .lede { margin: 8px 0 20px; color: var(--ink-2); font-weight: 700; }
.login-art { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.login-art span { --c: #FFD3E4; --d: var(--bubble-d); width: 70px; height: 70px; border-radius: 21px; overflow: hidden; background: var(--c); border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--d), 0 5px 0 2px var(--d), 0 14px 20px -10px rgba(27, 38, 86, .45); }
.login-art span:nth-child(1) { --c: #FFE3EF; transform: rotate(-9deg) translateY(4px); }
.login-art span:nth-child(2) { width: 84px; height: 84px; border-radius: 25px; }
.login-art span:nth-child(3) { --c: #FFE4DA; --d: var(--coral-d); transform: rotate(9deg) translateY(4px); }
.login-art img { width: 100%; height: 100%; object-fit: cover; }
.btn-google {
  width: 100%; height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border-radius: 16px;
  font-weight: 900; font-size: 15.5px;
  background: #fff;
  border: 2px solid var(--cream-3);
  box-shadow: 0 4px 0 var(--cream-3);
  transition: transform .15s var(--out), box-shadow .15s;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--cream-3); }
.btn-google:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cream-3); }
.btn-google svg { width: 22px; height: 22px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-3); font-weight: 900; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--cream-2); border-radius: 2px; }
.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-weight: 900; font-size: 13px; margin: 0 0 6px 4px; }
.field-box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 16px; background: var(--cream); border: 2px solid var(--cream-3); box-shadow: inset 0 3px 0 rgba(120, 80, 20, .06); transition: border-color .2s, box-shadow .2s, background .2s; }
.field-box .ico { color: var(--ink-3); display: block; }
.field-box:focus-within { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(43, 135, 255, .14); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; font-size: 15.5px; line-height: normal; color: var(--ink); padding: 0; }
.field input::placeholder { color: var(--ink-3); font-weight: 500; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 0; }
.perks > div { padding: 12px 8px 10px; border-radius: 16px; background: var(--cream); text-align: center; font-size: 12.5px; font-weight: 900; line-height: 1.25; color: var(--ink-2); }
.perks .toy-chip { width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 12px; }
.perks .toy-chip .ico { width: 19px; height: 19px; }
.perks .coin-ico { display: block; width: 36px; height: 36px; margin: 0 auto 6px; }
.fine { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.fine a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--cream-3); text-underline-offset: 3px; }

.shop-tabs { margin: 18px 0 20px; }
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 6px; }
.shop-pane[hidden] { display: none; }
.skin-card { display: flex; flex-direction: column; align-items: center; padding: 12px 10px 12px; border-radius: 20px; background: var(--cream); border: 2px solid var(--cream-2); box-shadow: 0 3px 0 var(--cream-3); text-align: center; transition: transform .25s var(--out); }
.skin-card:hover { transform: translateY(-4px); }
.skin-card .well { width: 92px; height: 92px; padding: 4px; border-radius: 24px; background: var(--c, var(--sky-soft)); box-shadow: 0 4px 0 var(--d, #A8D6F7), inset 0 3px 0 rgba(255, 255, 255, .6); }
.skin-card .well img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.skin-card b { margin-top: 12px; font-weight: 900; font-size: 14px; line-height: 1.2; }
.skin-card small { color: var(--ink-3); font-weight: 700; font-size: 12px; }
.skin-card .toy-btn { margin-top: 10px; width: 100%; }
.skin-card .toy-btn .coin-ico { width: 20px; height: 20px; }
.skin-card .owned { margin-top: 10px; height: 38px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 13px; font-weight: 900; font-size: 14px; color: var(--mint-deep); background: #D9F6EA; }
.skin-card .owned .ico { width: 18px; height: 18px; stroke-width: 2.8; }
.adfree { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 22px; background: linear-gradient(170deg, #E3F2FF, #C5E4FF); border: 2px solid #86C1EE; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 4px 0 #86C1EE; }
.adfree > svg { width: 84px; height: 84px; flex: none; }
.adfree b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; }
.adfree p { margin: 4px 0 0; color: var(--ink-2); font-weight: 700; font-size: 13.5px; }
.adfree .toy-btn { margin-left: auto; flex: none; }
.adfree-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.adfree-list li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.adfree-list .ico { width: 18px; height: 18px; color: var(--mint-deep); stroke-width: 2.8; }

/* coin burst */
.coin-fx { position: fixed; z-index: 96; width: 26px; height: 26px; pointer-events: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 97;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 18px;
  background: var(--ink); color: #fff; font-weight: 900; font-size: 14.5px;
  box-shadow: 0 5px 0 #0E1638, 0 20px 40px -16px rgba(27, 38, 86, .6);
  transform: translate(-50%, calc(100% + 60px));
  visibility: hidden;
  transition: transform .45s var(--spring), visibility 0s .45s;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--spring), visibility 0s; }
.toast svg { width: 26px; height: 26px; }

/* ==========================================================================
   GAME PAGE
   ========================================================================== */
/* breadcrumb sits under the game, as on the big portals, so the stage starts right under the top bar */
.crumbs { display: flex; align-items: center; gap: 8px; margin: 28px 2px 14px; font-weight: 700; font-size: 13.5px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs .ico { width: 14px; height: 14px; stroke-width: 2.8; }
.crumbs b { color: var(--ink); font-weight: 900; }

.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.stage-card {
  container: stage / inline-size;
  padding: 10px;
  background: var(--paper);
  border: 2.5px solid var(--cream-2);
  border-radius: 30px;
  box-shadow: 0 5px 0 var(--cream-3), 0 34px 50px -34px rgba(120, 80, 20, .6);
}
.stage {
  /* the game gets the height of the screen: top bar (78) + card chrome and title bar (106) + breathing room (16) */
  --sh: clamp(440px, calc(100vh - 200px), 820px);
  position: relative;
  height: var(--sh);
  border-radius: 22px;
  overflow: hidden;
  display: grid; place-items: center;
  isolation: isolate;
  background: #F9D6DF;
}
.stage-bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center; filter: blur(30px) saturate(1.2); opacity: .5; transform: scale(1.1); }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .55) 2.2px, rgba(255, 255, 255, 0) 3px) 0 0 / 30px 30px,
    radial-gradient(circle, rgba(229, 103, 157, .16) 2.2px, rgba(229, 103, 157, 0) 3px) 15px 15px / 30px 30px,
    radial-gradient(70% 60% at 50% 55%, rgba(255, 246, 250, .15), rgba(255, 214, 230, .55)),
    linear-gradient(180deg, rgba(255, 236, 244, .55), rgba(255, 245, 227, .35));
}
.awning {
  position: absolute; left: 0; right: 0; top: 0; height: 32px; z-index: 0;
  background: repeating-linear-gradient(90deg, #FF96C2 0 36px, #FFF5F8 36px 72px);
  -webkit-mask: radial-gradient(18px 11px at 18px 21px, #000 98%, transparent) 0 0 / 36px 32px repeat-x, linear-gradient(#000 0 21px, transparent 21px);
  mask: radial-gradient(18px 11px at 18px 21px, #000 98%, transparent) 0 0 / 36px 32px repeat-x, linear-gradient(#000 0 21px, transparent 21px);
  filter: drop-shadow(0 3px 0 rgba(229, 103, 157, .35));
  opacity: .95;
}
.frame {
  container-type: inline-size;
  position: relative; z-index: 1;
  height: calc(var(--sh) - 26px); aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 253, 247, .95), 0 0 0 8.5px rgba(229, 103, 157, .35), 0 30px 50px -18px rgba(90, 20, 50, .55);
}
.frame > img { width: 100%; height: 100%; object-fit: cover; }
/* once the game runs, the title art never flashes through between screens */
.frame:not([data-state="idle"]) { background: #FFE3EE; }
.frame:not([data-state="idle"]) > img { visibility: hidden; }
.frame-cta {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 0 24px 30px;
  background: linear-gradient(180deg, rgba(27, 38, 86, 0) 50%, rgba(27, 38, 86, .55) 100%);
}
.frame-cta .toy-btn.lg { height: 62px; padding: 0 34px; font-size: 23px; border-radius: 20px; animation: breathe 2.4s ease-in-out infinite; }
.frame-cta .toy-btn.lg .ico { width: 24px; height: 24px; }
.frame-cta small { color: #fff; font-weight: 900; font-size: 13px; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); display: inline-flex; align-items: center; gap: 6px; }
.frame-cta small .ico { width: 16px; height: 16px; }
@keyframes breathe { 50% { transform: translateY(-3px) scale(1.03); } }
.frame-load, .frame-break { position: absolute; inset: 0; display: none; }
.frame-load {
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, #FFF3F8, #FFD7E8);
}
.frame[data-state="loading"] .frame-load, .frame[data-state="ready"] .frame-load { display: flex; }
.frame:not([data-state="idle"]) .frame-cta { display: none; }
.frame-load img { width: 110px; height: 110px; animation: wobble 1.6s ease-in-out infinite; }
.frame-load b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.frame-load .progress { width: 78%; height: 18px; --k: var(--bubble-d); }
.frame-load .progress i { width: 0; transition: width .3s linear; }
.frame-load p { margin: 0; color: var(--ink-2); font-weight: 700; font-size: 13.5px; max-width: 250px; }

/* level break: interstitial video + optional reward video, sized in frame units (cqw) */
.frame-break {
  flex-direction: column; align-items: center; gap: 3.4cqw;
  padding: 6cqw 5cqw 5cqw;
  text-align: center;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .6) 1.6px, rgba(255, 255, 255, 0) 2.2px) 0 0 / 22px 22px,
    radial-gradient(120% 70% at 50% 0%, #FFF4F8 0%, #FFDDEA 70%);
}
.frame[data-state="break"] .frame-break, .frame[data-state="reward"] .frame-break { display: flex; animation: rise .5s var(--out); }
.brk-stars { display: flex; align-items: flex-end; justify-content: center; gap: 1cqw; height: 12cqw; }
.brk-stars svg { width: 10cqw; height: 10cqw; fill: var(--sun); stroke: var(--sun-d); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 .8cqw 0 var(--sun-d)); animation: star-in .6s var(--spring) backwards; }
.brk-stars svg:nth-child(2) { width: 13cqw; height: 13cqw; animation-delay: .12s; }
.brk-stars svg:nth-child(3) { animation-delay: .24s; }
@keyframes star-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.brk-title { display: block; font-family: var(--display); font-weight: 400; font-size: 7.4cqw; line-height: 1; margin-top: -1cqw; }
.brk-coins {
  display: inline-flex; align-items: center; gap: 1.6cqw;
  height: 8.6cqw; padding: 0 3.2cqw 0 1.4cqw;
  border-radius: 3cqw;
  font-family: var(--display); font-size: 4.4cqw; letter-spacing: .2px;
  background: var(--paper); box-shadow: 0 .9cqw 0 #F3B9CF;
}
.brk-coins .coin-ico { width: 6.2cqw; height: 6.2cqw; }
.brk-coins .ico { width: 4.4cqw; height: 4.4cqw; stroke-width: 3; color: var(--bubble-d); }
.brk-coins s { text-decoration-thickness: .5cqw; color: var(--ink-3); }
.brk-card {
  width: 100%;
  padding: 2.4cqw 2.4cqw 2.6cqw;
  border-radius: 5cqw;
  background: var(--paper);
  border: 2px solid #F6D3E1;
  box-shadow: 0 1.2cqw 0 #EFB9CE, 0 6cqw 8cqw -5cqw rgba(90, 20, 50, .45);
  text-align: left;
}
.brk-label { display: flex; align-items: center; gap: 1.6cqw; margin: 0 1cqw 1.8cqw; font-weight: 900; font-size: 2.9cqw; letter-spacing: .25cqw; text-transform: uppercase; color: var(--ink-3); }
.brk-label .brk-len { margin-left: auto; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.brk-label .brk-reward { display: none; margin-left: -.6cqw; color: var(--mint-deep); }
.frame[data-state="reward"] .brk-reward { display: inline; }
.brk-video {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid; place-items: center; align-content: center; gap: .6cqw;
  border-radius: 3.4cqw;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(235, 211, 170, .34) 0 3.2cqw, rgba(235, 211, 170, 0) 3.2cqw 6.4cqw),
    #FFF8EC;
  box-shadow: inset 0 0 0 2px var(--cream-2);
  color: #9E8A67;
}
.brk-play { width: 11cqw; height: 11cqw; display: grid; place-items: center; border-radius: 50%; background: var(--paper); box-shadow: 0 .8cqw 0 var(--cream-3); color: #B9A98D; }
.brk-play .ico { width: 5cqw; height: 5cqw; margin-left: .6cqw; }
.brk-video b { font-family: var(--display); font-weight: 400; font-size: 4cqw; color: #A8977A; }
.brk-video small { font-weight: 900; font-size: 2.8cqw; color: #A8977A; }
.brk-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1.2cqw; background: rgba(235, 211, 170, .6); }
.brk-bar i { display: block; height: 100%; width: 0; background: var(--bubble-d); }
.frame-break.playing .brk-bar i { animation: fill-bar 15s linear forwards; }
@keyframes fill-bar { to { width: 100%; } }
.brk-foot { display: flex; align-items: center; gap: 2.4cqw; margin-top: 2.6cqw; padding: 0 .6cqw; }
.ring { position: relative; width: 11cqw; height: 11cqw; flex: none; display: grid; place-items: center; }
.ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
/* the check that replaces the number when the countdown ends: upright and centred in the ring */
.ring b svg { position: static; display: block; width: 4.6cqw; height: 4.6cqw; transform: none; stroke-width: 3.2; color: var(--mint-deep); }
.ring circle { fill: none; stroke-width: 4; }
.ring .r-bg { stroke: var(--cream-2); }
.ring .r-fg { stroke: var(--bubble-d); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 0; }
.frame-break.playing .ring .r-fg { animation: ring-out 5s linear forwards; }
@keyframes ring-out { to { stroke-dashoffset: 100.5; } }
.ring b { position: relative; font-family: var(--display); font-weight: 400; font-size: 4.6cqw; font-variant-numeric: tabular-nums; }
.brk-msg { flex: 1; min-width: 0; font-weight: 900; font-size: 3.7cqw; line-height: 1.2; }
.brk-foot .toy-btn { height: 10cqw; padding: 0 4cqw; font-size: 4.2cqw; border-radius: 3.2cqw; gap: 1.4cqw; }
.brk-foot .toy-btn .ico { width: 4.2cqw; height: 4.2cqw; }
.brk-foot .toy-btn[hidden] { display: none; }
.brk-link { display: inline-flex; align-items: center; gap: 1.4cqw; margin-top: auto; font-weight: 900; font-size: 3.6cqw; color: var(--blue-d); }
.brk-link .ico { width: 4.4cqw; height: 4.4cqw; stroke-width: 2.4; }
.brk-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.brk-link[hidden] { display: none; }

.stage-chip {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px;
  background: rgba(255, 253, 247, .94);
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(229, 103, 157, .35), 0 16px 26px -16px rgba(90, 20, 50, .5);
  font-weight: 900; font-size: 13.5px; line-height: 1.25;
  max-width: 172px;
}
.stage-chip img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.stage-chip small { display: block; color: var(--ink-3); font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; }
.stage-chip.left { left: 20px; top: 50px; }
.stage-chip.right { right: 20px; top: 50px; }
.stage-chip .progress { width: 96px; height: 10px; margin-top: 5px; --k: var(--bubble-d); }
/* the chips only show when there is real room beside the frame */
@container stage (max-width: 790px) { .stage-chip { display: none; } }
@media (max-width: 1359px) { .stage-chip { display: none !important; } }

.gamebar { display: flex; align-items: center; gap: 14px; padding: 14px 6px 4px 8px; }
.gamebar .by a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* game icon: our 3D genre icon on a glossy plate, used instead of yet another crop of the cover */
.app-ico {
  --c1: #FFD6E7; --c2: #FF9CC6; --d: #E5679D;
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, var(--c1), var(--c2));
  border: 2px solid var(--d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--d);
}
.app-ico img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(90, 20, 50, .25)); }
.app-ico.sm { width: 44px; height: 44px; border-radius: 13px; }
.app-ico.xs { width: 30px; height: 30px; border-radius: 10px; border-width: 1.5px; box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6), 0 2px 0 var(--d); }
.gamebar h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: .2px; }
.gamebar .by { margin-top: 5px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
@container stage (max-width: 720px) { .gamebar .by-genre { display: none; } }
@container stage (max-width: 650px) { .gamebar .by-count { display: none; } }
.gamebar .by .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4); }
.gamebar .by .rate { margin-left: 0; font-size: 14.5px; }
.gb-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.vote { display: inline-flex; align-items: stretch; height: 46px; border-radius: 15px; background: var(--paper); border: 2px solid var(--cream-3); box-shadow: 0 3px 0 var(--cream-3); overflow: hidden; }
.vote button { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; font-family: var(--display); font-size: 16px; letter-spacing: .3px; transition: background .2s, color .2s; }
.vote button + button { border-left: 2px solid var(--cream-2); }
.vote button:hover { background: var(--cream); }
.vote button .ico { width: 20px; height: 20px; transition: transform .35s var(--spring); }
.vote button[aria-pressed="true"] { color: var(--mint-deep); }
.vote button[aria-pressed="true"] .ico { fill: rgba(94, 219, 176, .35); transform: rotate(-12deg) scale(1.12); }
.vote button.down[aria-pressed="true"] { color: var(--coral-d); }
.vote button.down[aria-pressed="true"] .ico { fill: rgba(255, 132, 102, .3); }
.sq-btn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--paper); border: 2px solid var(--cream-3); box-shadow: 0 3px 0 var(--cream-3); transition: transform .15s var(--out), box-shadow .15s, color .2s; }
.sq-btn .ico { width: 21px; height: 21px; }
.sq-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--cream-3); }
.sq-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cream-3); }
.sq-btn.on { color: var(--coral-d); }
.sq-btn.on .ico { fill: var(--coral); stroke: var(--coral-d); }

/* ad slots: framed, labelled, calm */
.ad { display: block; }
.ad-label { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; font-size: 11.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); }
.ad-label button { font-weight: 900; font-size: 12px; letter-spacing: .3px; text-transform: none; color: var(--blue-d); display: inline-flex; align-items: center; gap: 4px; }
.ad-label button .ico { width: 14px; height: 14px; }
.ad-label button:hover { text-decoration: underline; text-underline-offset: 3px; }
.ad-box {
  position: relative;
  display: grid; place-items: center;
  margin: 0 auto;
  border-radius: 18px;
  background:
    repeating-linear-gradient(135deg, rgba(235, 211, 170, .38) 0 12px, rgba(235, 211, 170, 0) 12px 24px),
    var(--paper);
  border: 2px solid var(--cream-2);
  box-shadow: inset 0 0 0 6px var(--paper);
  text-align: center;
}
.ad-box > div { transition: opacity .3s ease; }
.ad-box span { display: block; font-family: var(--display); font-size: 15px; letter-spacing: .4px; color: #A8977A; }
.ad-box small { display: block; font-weight: 900; font-size: 12px; color: #A8977A; }
/* one ad at a time: while a video plays in the game, the banner slot empties and says so */
.ad-box::after {
  content: "Paused while the video plays";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 900; font-size: 12.5px; color: var(--ink-3);
  opacity: 0; transition: opacity .3s ease;
}
body.in-break .ad-box { background: var(--paper); border-style: dashed; pointer-events: none; }
body.in-break .ad-box > div { opacity: 0; }
body.in-break .ad-box::after { opacity: 1; }
body.in-break .ad-label button { visibility: hidden; }
.ad-300 { width: 300px; height: 250px; }
.ad-320 { width: 320px; max-width: 100%; height: 100px; }
.ad-note { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font-size: 12.5px; font-weight: 700; color: var(--ink-3); line-height: 1.35; }
.ad-note .ico { width: 16px; height: 16px; flex: none; color: var(--mint-deep); }

.rail { display: grid; gap: 22px; }
.rail-box { padding: 16px; background: var(--paper); border: 2px solid var(--cream-2); border-radius: 24px; box-shadow: 0 4px 0 var(--cream-3); }
.rail-box h3 { margin: 2px 4px 12px; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1; }
.mini { display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: 16px; transition: background .2s, transform .25s var(--out); }
.mini:hover { background: var(--cream); transform: translateX(3px); }
.mini img { width: 60px; height: 80px; border-radius: 12px; object-fit: cover; object-position: top; flex: none; box-shadow: 0 2px 0 var(--cream-3); }
.mini b { display: block; font-weight: 900; font-size: 14px; line-height: 1.2; }
.mini small { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 700; font-size: 12.5px; margin-top: 2px; }
.mini .rate { margin-left: 0; font-size: 12.5px; }
.mini .go { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--cream); color: var(--ink-2); opacity: 0; transition: opacity .2s; }
.mini .go .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.mini:hover .go { opacity: 1; }

.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: stretch; }
.about { display: grid; grid-template-columns: minmax(0, 1fr); }
.about h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 24px; }
.about p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: #2E3A6B; max-width: 68ch; }
.about h3 { margin: 22px 0 12px; font-family: var(--display); font-weight: 400; font-size: 19px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--cream); }
.steps b { display: block; font-weight: 900; font-size: 14.5px; line-height: 1.2; }
.steps small { display: block; color: var(--ink-2); font-weight: 700; font-size: 12.5px; line-height: 1.35; }
.keycap {
  --c: var(--blue); --d: var(--blue-d);
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 62%, white), var(--c));
  border: 2px solid var(--d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 4px 0 var(--d);
}
.keycap .ico { width: 22px; height: 22px; stroke-width: 2.3; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .2)); }
.news { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 18px; background: linear-gradient(170deg, #FFF0F6, #FFE1EE); box-shadow: 0 3px 0 #F5B3CF; transition: transform .2s var(--out); }
.news:hover { transform: translateY(-2px); }
.news .app-ico { width: 56px; height: 56px; }
.news b { display: block; font-weight: 900; font-size: 14px; line-height: 1.2; }
.news small { display: block; margin-top: 2px; color: var(--ink-2); font-weight: 700; font-size: 12.5px; line-height: 1.35; }
.highlights { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
.highlights li { padding: 10px 12px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 -3px 0 var(--cream-2); }
.highlights b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; color: var(--bubble-d); }
.highlights small { display: block; margin-top: 2px; font-weight: 700; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  --c: var(--sky-soft); --d: #A8D6F7;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 6px;
  border-radius: 13px;
  font-weight: 900; font-size: 14px;
  background: var(--c);
  border: 2px solid var(--d);
  box-shadow: 0 3px 0 var(--d);
  transition: transform .15s var(--out);
}
.tag img { width: 30px; height: 30px; object-fit: contain; }
.tag:hover { transform: translateY(-2px) rotate(-1deg); }

.stats { display: grid; gap: 12px; align-content: start; }
.score-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 24px; background: linear-gradient(170deg, #FFF3D2, #FFE6A8); border: 2px solid #F3C866; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 4px 0 var(--sun-d); }
.score-card .big-num { font-family: var(--display); font-size: 48px; line-height: .9; }
.score-card .stars { display: flex; gap: 2px; margin-bottom: 4px; }
.score-card .stars .ico { width: 18px; height: 18px; fill: var(--sun); stroke: var(--sun-d); stroke-width: 1.4; }
/* 4.8: the fifth star is filled to 80% of its visible width (the glyph spans 3.7 to 20.3 of 24, so 71% of the box) */
.star-part { position: relative; width: 18px; height: 18px; flex: none; }
.score-card .stars .star-empty { fill: #FFF3CF; }
.star-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--f, 100%); overflow: hidden; }
.star-fill .ico { display: block; }
.score-card small { color: #6E500E; font-weight: 900; font-size: 12.5px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 11px 14px; border-radius: 18px; background: var(--paper); border: 2px solid var(--cream-2); box-shadow: 0 3px 0 var(--cream-2); }
.fact small { display: block; color: var(--ink-3); font-weight: 900; font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; }
.fact b { font-weight: 900; font-size: 15px; }
.fair { padding: 16px; border-radius: 22px; background: linear-gradient(170deg, #E9F6FF, #D3ECFF); border: 2px solid #A6D5FA; box-shadow: 0 4px 0 #86C1EE; }
.fair-head { display: flex; align-items: center; gap: 10px; }
.fair-head .toy-chip { width: 36px; height: 36px; border-radius: 12px; }
.fair-head .toy-chip .ico { width: 19px; height: 19px; }
.fair-head b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1; }
.fair p { margin: 10px 0 12px; font-size: 13.5px; line-height: 1.45; font-weight: 700; color: #2F4A76; }
.fair-links { display: grid; gap: 8px; margin-bottom: 12px; }
.fair-links button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: rgba(255, 253, 247, .85); box-shadow: 0 2px 0 #A6D5FA; font-weight: 900; font-size: 13.5px; color: var(--blue-d); text-align: left; transition: transform .15s var(--out), background .2s; }
.fair-links button:hover { background: var(--paper); transform: translateX(3px); }
.fair-links .ico { width: 17px; height: 17px; stroke-width: 2.5; }

/* related games: the home page trading cards */
.more-games { margin-top: 44px; }
.more-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; align-items: start; }

.playbar, .immersive-bar { display: none; }

/* ---------- game page on desktop: the sidebar folds into an icon rail so the game gets the room ---------- */
@media (min-width: 901px) {
  body[data-page="game"] { --side: 84px; --brand-w: 250px; }
  body[data-page="game"] .sidebar { padding: 6px 2px 22px 16px; }
  body[data-page="game"] .side-panel { padding: 6px; border-radius: 22px; }
  body[data-page="game"] .nav-item { justify-content: center; gap: 0; height: 42px; padding: 0; font-size: 0; }
  body[data-page="game"] .nav-item.active::before { left: -6px; }
  body[data-page="game"] .nav-label { padding: 8px 6px 7px; font-size: 0; }
  body[data-page="game"] .chest { display: grid; place-items: center; height: 62px; margin-top: 12px; padding: 0; border-radius: 20px; overflow: visible; }
  body[data-page="game"] .chest b, body[data-page="game"] .chest p { display: none; }
  body[data-page="game"] .chest-art { position: static; width: 50px; height: 44px; }
  body[data-page="game"] .chest .toy-btn { position: absolute; inset: 0; width: auto; height: auto; padding: 0; font-size: 0; color: transparent; background: none; border: 0; box-shadow: none; border-radius: inherit; }
  body[data-page="game"] .chest.claimed { opacity: .6; }
  body[data-page="game"] .main { padding-left: 14px; }
}
@media (min-width: 901px) and (max-width: 1180px) { body[data-page="game"] { --brand-w: 222px; } }
@media (min-width: 901px) and (max-height: 820px) { body[data-page="game"] .nav-item { height: 38px; } }
@media (min-width: 901px) and (max-height: 790px) { body[data-page="game"] .chest { display: none; } }
/* rail tooltip (lives on <body> so the scrolling rail never clips it) */
.rail-tip {
  position: fixed; z-index: 70; left: 0; top: 0;
  padding: 7px 11px; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-weight: 900; font-size: 13px; white-space: nowrap;
  box-shadow: 0 10px 20px -10px rgba(27, 38, 86, .6);
  opacity: 0; pointer-events: none;
  transition: opacity .15s, translate .2s var(--out);
  translate: -4px 0;
}
.rail-tip.show { opacity: 1; translate: 0 0; }
.rail-tip::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: inherit; border-radius: 2px; transform: rotate(45deg); }

@media (min-width: 1200px) {
  .about { grid-template-columns: minmax(0, 1fr) 268px; column-gap: 28px; }
  .about-side { padding-left: 26px; border-left: 2px dashed var(--cream-2); }
  .about-side h3 { margin-top: 2px; }
  .about .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
.tabbar, .scrim { display: none; }
.drawer-head { display: none; }
.phone-slot { display: none; }

@media (max-width: 1320px) {
  .kbd, .wide-only { display: none !important; }
  .mood img { width: 80px; height: 80px; top: -30px; }
  .mood { font-size: 14.5px; }
}
@media (max-height: 800px) and (min-width: 901px) {
  .nav-item { height: 36px; }
  .nav-item .chip { width: 30px; height: 30px; border-radius: 10px; margin-top: -3px; }
  .nav-item .chip .ico { width: 16px; height: 16px; }
  .nav-item.genre img { width: 32px; height: 32px; }
  .nav-label { padding-top: 9px; }
  .chest { padding: 12px 14px; }
  .chest p { display: none; }
  .chest b { margin: 6px 0 10px; }
  .chest-art { width: 70px; height: 61px; }
}
@media (max-width: 1180px) {
  :root { --side: 228px; --gutter: 24px; }
  .play-layout, .info-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-template-columns: 300px minmax(0, 1fr); }
  .band { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slots > :nth-child(3) { display: none; }
  .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* the wrapped present fills the rest of the last row as a wide gift */
  .mosaic .card.soon { grid-column: span 3; }
  .mosaic .card.soon .card-art { flex: 1; aspect-ratio: auto; min-height: 190px; }
  /* landscape and related rows become swipe rows */
  .featured, .more-row {
    grid-template-columns: none; grid-auto-flow: column;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin: -8px calc(var(--gutter) * -1) -14px -14px; padding: 8px var(--gutter) 14px 14px; scroll-padding: 0 var(--gutter) 0 14px;
  }
  .featured::-webkit-scrollbar, .more-row::-webkit-scrollbar { display: none; }
  .featured > *, .more-row > * { scroll-snap-align: start; }
  .featured { grid-auto-columns: calc((100% - 14px - 18px) / 2.15); }
  .more-row { grid-auto-columns: calc((100% - 14px - 3 * 18px) / 4.3); }
  /* the street picture goes on top, at its own shape */
  .spot-card { grid-template-columns: minmax(0, 1fr); }
  .spot-art { order: -1; margin-top: 24px; }
  .spot-copy { padding: 22px 26px 26px; }
  .spot-copy h2 br { display: none; }
  .spot-copy p { max-width: 60ch; }
  .moods {
    grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: calc((100% - 5 * 14px) / 5.4);
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin: 0 0 0 -14px; padding: 36px 0 14px 14px;
    scroll-snap-type: x mandatory; scroll-padding-left: 14px;
  }
  .moods::-webkit-scrollbar { display: none; }
  .mood { scroll-snap-align: start; }
  .work { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .streak-days { display: none; }
  .wk-art { height: 140px; }
  .dungeon-art > img, .plate-art > img { width: 96px; height: 96px; }
  .spot-copy h2 { font-size: 38px; }
}

@media (max-width: 900px) {
  :root { --top: 64px; --gutter: 16px; }
  body { font-size: 14.5px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 0 12px 0 14px; }
  .brand { padding-left: 0; gap: 7px; }
  .brand-mark { width: 40px; height: 33px; }
  .brand-word { font-size: 17px; }
  .m-menu { display: grid !important; width: 40px; height: 40px; margin: 0 4px 0 -6px; }
  .topbar > .search, .top-actions .desk-only, .divider-v { display: none !important; }
  .top-actions { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; border-radius: 13px; }
  .wallet { height: 40px; padding: 0 10px 0 6px; border-radius: 13px; gap: 6px; }
  .wallet .coin-ico { width: 24px; height: 24px; }
  .wallet-amt { font-size: 16px; min-width: 0; }
  .wallet .add { display: none; }
  .avatar { width: 40px; height: 40px; border-radius: 13px; }
  .av-img { border-radius: 11px; }
  .avatar .lvl { min-width: 19px; height: 19px; font-size: 11px; line-height: 15px; right: -6px; bottom: -6px; }
  [data-tip]::after { display: none; }
  .menu { position: fixed; left: 12px; right: 12px; top: calc(var(--top) + 6px); min-width: 0; width: auto !important; }
  /* the account menu opened from the tab bar rises as a bottom sheet, near the thumb */
  /* the blurred top bar is the containing block for fixed children, so measure from its bottom edge */
  .menu.sheet-up { top: auto; bottom: calc(var(--top) + 92px + env(safe-area-inset-bottom, 0px) - 100vh); bottom: calc(var(--top) + 92px + env(safe-area-inset-bottom, 0px) - 100dvh); transform: translateY(10px) scale(.98); transform-origin: bottom center; }
  .menu.sheet-up.open { transform: none; }

  .sidebar {
    position: fixed; z-index: 70; top: 0; left: 0; bottom: 0;
    width: min(320px, 86vw); height: auto;
    padding: 14px 12px 24px;
    background: var(--cream);
    border-radius: 0 28px 0 0;
    box-shadow: 30px 0 60px -30px rgba(27, 38, 86, .5);
    transform: translateX(-104%);
    transition: transform .4s var(--out);
    -webkit-mask-image: none !important; mask-image: none !important;
  }
  body.drawer-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(27, 38, 86, .35); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  /* the drawer head stays put while the list scrolls */
  .drawer-head { position: sticky; top: -14px; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: -14px -12px 10px; padding: 14px 16px 10px; background: var(--cream); }
  .nav-item { height: 42px; }

  .main { padding: 4px var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px)); }
  .m-search { display: block; margin: 6px 0 2px; }
  .m-search .search { max-width: none; }
  .m-search .search-box { height: 46px; border-radius: 15px; }

  .hello { gap: 12px; margin: 12px 0 0; }
  .hello h1 { font-size: 22px; line-height: 1.1; }
  .hello p { display: none !important; }
  .streak { height: 40px; gap: 7px; padding: 0 10px 0 4px; border-radius: 14px; box-shadow: 0 3px 0 var(--cream-2); }
  .streak-flame { width: 29px; height: 29px; border-radius: 9px; border-width: 1.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 2px 0 #C94A22; }
  .streak-flame .ico { width: 16px; height: 16px; }
  .streak b { font-size: 14px; }
  .streak small, .streak-days { display: none; }

  .section { margin-top: 30px; }
  .sec-title { font-size: 25px; }
  .sec-sub { font-size: 13.5px; }
  .sec-head { margin-bottom: 16px; }
  .sec-tools .round-btn, .sec-tools .menu-wrap { display: none; }
  .sec-head > div:first-child { min-width: 0; }

  .moods { grid-auto-columns: 100px; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 30px var(--gutter) 14px; scroll-padding: 0 var(--gutter); }
  .mood { height: 96px; font-size: 14px; border-radius: 19px; padding-bottom: 11px; }
  .mood::before { height: 7px; top: 8px; left: 10px; }
  .mood img { width: 70px; height: 70px; top: -25px; }

  .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .mosaic .card.soon { grid-column: 1 / -1; }
  .mosaic .card.soon .card-art { min-height: 200px; }
  .sticker { width: 72px; height: 72px; top: -12px; right: -8px; }
  .sticker b { font-size: 22px; }
  .sticker small { font-size: 10px; }
  .card { border-radius: 19px; padding: 5px; }
  .card-art { border-radius: 14px; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 12px; }
  .card-play { display: none; }
  .fav { display: none; }
  .card { --meta-h: 54px; }
  .tag-new { left: 7px; bottom: 8px; font-size: 11.5px; padding: 3px 8px 2px; }
  .big-meta { flex-wrap: wrap; gap: 12px; padding: 12px 6px 4px; }
  .big-meta h3 { font-size: 25px; }
  .big-meta .toy-btn { margin-left: 0; width: 100%; }
  /* same reading order as desktop: cover, meta, title, description, Play */
  .big-stats { padding: 12px 6px 0; gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
  .big-meta { padding-top: 8px; }

  .shelf-track { grid-auto-columns: calc((100% - 3 * 14px) / 3.5); gap: 14px; }

  .slots { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: -6px calc(var(--gutter) * -1) -10px; padding: 6px var(--gutter) 10px; scroll-padding: 0 var(--gutter); gap: 12px; }
  .slots::-webkit-scrollbar { display: none; }
  .slots > :nth-child(3) { display: flex; }
  .slot { scroll-snap-align: start; }
  .slot img { width: 64px; height: 84px; }

  .spot-card { border-radius: 26px; }
  .spot-awning { height: 28px; }
  .spot-art { margin-top: 18px; }
  .spot-copy { padding: 16px 18px 20px; }
  .spot-copy h2 { font-size: 31px; margin: 8px 0 8px; }
  .spot-copy p { font-size: 14px; margin-bottom: 16px; }
  .spot-cta { gap: 12px; width: 100%; }
  .spot-cta .toy-btn { flex: 1 1 100%; }

  .featured, .more-row { margin: -8px calc(var(--gutter) * -1) -14px; padding: 8px var(--gutter) 14px; scroll-padding: 0 var(--gutter); gap: 12px; }
  .featured { grid-auto-columns: 84%; }
  .more-row { grid-auto-columns: calc((100% - 12px) / 1.8); }
  .feat { border-radius: 22px; padding: 5px; }
  .feat-art { border-radius: 17px; }
  .feat h3 { font-size: 18px; }
  .feat p { font-size: 13px; }
  .feat-ico { width: 40px; height: 40px; }
  .more-games { margin-top: 34px; }
  .work { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: -6px calc(var(--gutter) * -1) -12px; padding: 6px var(--gutter) 12px; scroll-padding: 0 var(--gutter); gap: 12px; }
  .work::-webkit-scrollbar { display: none; }
  .wk { scroll-snap-align: start; }
  .wk-art { height: 150px; }

  .cubbies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; border-radius: 22px; }
  .cubby { min-height: 78px; gap: 8px; padding: 8px 10px 8px 6px; border-radius: 14px; }
  .cubby > img, .cubby > svg { width: 54px; height: 54px; }
  .cubby b { font-size: 16.5px; }
  .cubby em { display: none; }

  .band { gap: 18px; margin-top: 34px; }
  .panel { padding: 18px 14px; border-radius: 24px; }
  .panel-head { flex-wrap: wrap; }
  .panel-head h2 { font-size: 23px; }
  .board li { grid-template-columns: 30px 36px 1fr auto; gap: 10px; padding: 7px 6px; }
  .board .pfp { width: 36px; height: 36px; border-radius: 11px; }
  .board .score { font-size: 15px; }
  .seg button { padding: 0 10px; font-size: 13px; }
  .packs { gap: 8px; }
  .pack { padding: 14px 5px 8px; }
  .pack .pack-art { width: 70px; height: 62px; }
  .pack b { font-size: 18px; }
  .bonus { font-size: 11.5px; }
  .pack .ribbon-tag { font-size: 11px; padding: 3px 7px 2px; }
  .skins { gap: 8px; padding: 10px; }
  .skins-label { display: none; }
  .skin { width: 46px; height: 46px; }
  .adfree-row { flex-wrap: wrap; }
  .adfree-row > div { flex: 1; min-width: 0; }
  .adfree-row .toy-btn { width: 100%; margin-left: 0; }

  .foot { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 40px; }

  /* docked to the bottom edge: nothing of the page shows under or around it */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 247, .97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 2px solid var(--cream-2);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -14px 30px -20px rgba(27, 38, 86, .4);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-weight: 900; font-size: 11px; color: var(--ink-3); -webkit-tap-highlight-color: transparent; }
  .tab .ico { width: 24px; height: 24px; stroke-width: 2.2; transition: transform .3s var(--spring); }
  .tab.active { color: var(--ink); }
  .tab.active .ico { color: var(--blue); }
  .tab:active .ico { transform: scale(.85); }
  .tab-shop-btn {
    width: 58px; height: 58px; margin-top: -26px;
    display: grid; place-items: center;
    border-radius: 20px;
    color: var(--ink);
    background: linear-gradient(180deg, #FFE08A, var(--sun));
    border: 2.5px solid var(--sun-d);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--sun-d), 0 12px 20px -8px rgba(227, 154, 12, .7);
    transform: rotate(-4deg);
  }
  .tab-shop-btn .ico { width: 28px; height: 28px; stroke-width: 2.4; color: var(--ink) !important; }
  .tab.shop { color: var(--ink); }
  .tab-av { width: 26px; height: 26px; border-radius: 9px; background: #FFD3E4; box-shadow: 0 0 0 2px var(--bubble-d); overflow: hidden; }
  .tab-av img { width: 100%; height: 100%; object-fit: cover; }

  .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: calc(100vw - 32px); }

  .modal { padding: 0; place-items: end center; }
  .sheet { max-width: none; border-radius: 30px 30px 0 0; padding: 26px 18px 30px; max-height: 92vh; transform: translateY(100%); transition: transform .45s var(--out); }
  .sheet.wide { max-width: none; }
  .login-art { margin-bottom: 14px; }
  .login-art span { width: 60px; height: 60px; border-radius: 18px; }
  .login-art span:nth-child(2) { width: 72px; height: 72px; border-radius: 21px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 10px; }
  .adfree { flex-wrap: wrap; }
  .adfree > svg { width: 68px; height: 68px; }
  .adfree > div { flex: 1; min-width: 0; }
  .adfree .toy-btn { margin-left: 0; width: 100%; }
  .adfree-list { grid-template-columns: 1fr; }

  /* game page: a slim Play bar replaces the tab bar so nothing covers the ad */
  body[data-page="game"] .tabbar { display: none; }
  body[data-page="game"] .main { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  body[data-page="game"] .brand-word { font-size: 16px; }
  .section.top-games { margin-top: 26px; }
  .playbar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 0 12px env(safe-area-inset-bottom, 0px) 12px;
    background: rgba(255, 253, 247, .97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 2px solid var(--cream-2);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -14px 30px -20px rgba(27, 38, 86, .4);
    transform: translateY(110%);
    transition: transform .4s var(--out);
  }
  .playbar.show { transform: none; }
  .playbar-txt { flex: 1; min-width: 0; }
  .playbar-txt b { display: block; font-weight: 900; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .playbar-txt small { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; color: var(--ink-2); }
  .playbar-txt .rate { margin-left: 0; font-size: 12.5px; }

  .crumbs { display: none; }
  .stage-card { padding: 6px; border-radius: 26px; margin: 8px -4px 0; }
  .stage { height: auto; padding: 34px 16px 16px; border-radius: 21px; }
  .frame { height: auto; width: 100%; max-width: 300px; margin-top: 0; }
  .frame-cta { padding-bottom: 22px; }
  .frame-cta .toy-btn.lg { height: 54px; font-size: 20px; padding: 0 28px; }
  .gamebar { display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 12px 4px 4px; gap: 12px; row-gap: 12px; }
  .gamebar .app-ico { width: 48px; height: 48px; border-radius: 14px; }
  .gamebar .by { flex-wrap: wrap; row-gap: 2px; font-size: 12.5px; }
  .gamebar .gb-actions { grid-column: 1 / -1; }
  .gamebar h1 { font-size: 24px; }
  .gb-actions { margin-left: 0; width: 100%; }
  .gb-actions .vote { flex: 1; }
  .vote button { flex: 1; justify-content: center; }
  .gb-actions .theater { display: none; }
  /* clear space between the vote / save / share buttons and the banner, so nobody taps an ad by mistake */
  .phone-slot { display: block; width: 100%; max-width: 324px; margin: 10px auto 0; }
  .phone-slot .ad-label { margin: 0 2px 8px; }
  .ad.desk-ad { display: none; }
  .rail { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .info-grid { margin-top: 24px; }
  .about p { font-size: 15px; }
  .play-layout { gap: 26px; }
}

@media (max-width: 420px) { body[data-page="game"] .topbar .menu-wrap:has(#notif-menu) { display: none; } body[data-page="game"] .topbar .brand-word { font-size: 15.5px; } }
/* small Androids (360): the JP mark alone, so the bell and wallet never sit on the wordmark */
@media (max-width: 380px) { .topbar .brand-word { display: none; } }

/* tablets: 3-column mosaic, centred bars */
@media (min-width: 600px) and (max-width: 900px) {
  .slots { grid-auto-columns: 47%; }
  .frame { max-width: 420px; }
  .gamebar { display: flex; padding: 14px 6px 4px 8px; }
  .gamebar .app-ico { width: 54px; height: 54px; border-radius: 16px; }
  .gamebar h1 { font-size: 28px; }
  .gb-actions { margin-left: auto; width: auto; }
  .gb-actions .vote { flex: none; }
  .gb-actions .theater { display: grid; }
  .rail-box { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .rail-box h3 { grid-column: 1 / -1; }
  .highlights { max-width: none; }
  .work { grid-auto-columns: 46%; }
  .cubbies { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cubby { flex-direction: column; text-align: center; padding: 12px 6px; }
  .cubby .fan { justify-content: center; }
}

/* phones: 2-column mosaic, the present goes back to a normal card */
@media (max-width: 699px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.big { grid-column: 1 / -1; grid-row: auto; }
  .card.big .card-art { flex: none; aspect-ratio: 4 / 3.3; }
  .card.big .card-art img { object-position: center 0%; }
  .mosaic .card.soon { grid-column: auto; }
  .card.soon .card-art, .mosaic .card.soon .card-art { flex: none; aspect-ratio: 3 / 4; min-height: 0; }
  .soon-tag { width: 88%; padding: 21px 6px 9px; }
  .soon-tag b { font-size: 14.5px; }
  .soon-tag small { font-size: 10px; letter-spacing: .3px; }
  .bow { width: 70px; height: 48px; }
  .ribbon.v { width: 18px; }
  .ribbon.h { height: 18px; margin-top: -9px; }
  .shelf-track { grid-auto-columns: 150px; }
  /* the No.1 seal sits inside the card edge */
  .sticker { top: -10px; right: 10px; width: 76px; height: 76px; }

  /* top bar without blur, so sheets can be fixed to the screen */
  .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 245, 227, .97); }

  /* account and notification menus rise as bottom sheets with a dimmed page behind them */
  .menu, .menu.sheet-up {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0;
    width: auto !important; min-width: 0; max-height: 82vh; overflow-y: auto;
    padding: 10px 12px calc(18px + env(safe-area-inset-bottom, 0px));
    border-width: 2px 0 0; border-radius: 26px 26px 0 0;
    transform: translateY(104%); transform-origin: bottom center;
    transition: transform .4s var(--out), opacity .25s ease, box-shadow .3s ease;
    box-shadow: 0 0 0 100vmax rgba(27, 38, 86, 0);
  }
  .menu::before { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--cream-3); }
  .menu.open, .menu.sheet-up.open { transform: none; box-shadow: 0 0 0 100vmax rgba(27, 38, 86, .38); }
  .menu .menu-item { padding: 13px 12px; font-size: 15px; }
  body.menu-open .topbar { z-index: 75; }
  body.menu-open .scrim { pointer-events: auto; background: transparent; opacity: 1; }

  /* game page: the frame takes the full content width */
  .stage-card { padding: 4px; margin: 6px -4px 0; }
  .stage { padding: 18px 0 0; border-radius: 22px; }
  .awning { height: 28px; }
  .frame { width: 100%; max-width: none; border-radius: 16px 16px 22px 22px; box-shadow: none; }
  .frame::after { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; box-shadow: inset 0 0 0 3px rgba(255, 253, 247, .92), inset 0 0 0 4.5px rgba(229, 103, 157, .3); pointer-events: none; }
  .gamebar { padding: 12px 8px 6px; }

  /* immersive play: the game fills the phone, one slim bar to leave it */
  .immersive-bar {
    position: fixed; z-index: 86; left: 0; right: 0; top: 0;
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 10px 0;
    align-items: center; gap: 10px;
    background: var(--ink); color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
  }
  body.immersive .immersive-bar { display: flex; }
  body.immersive { overflow: hidden; }
  body.immersive .topbar, body.immersive .playbar { visibility: hidden; }
  /* no ancestor may trap the full-screen frame: no containment, no isolation */
  body.immersive .stage-card { container-type: normal; }
  body.immersive .stage { isolation: auto; }
  body.immersive .frame {
    position: fixed; z-index: 85; left: 0; right: 0; bottom: 0; top: calc(56px + env(safe-area-inset-top, 0px));
    width: 100%; height: auto; aspect-ratio: auto;
    border-radius: 0;
  }
  body.immersive .frame::after { display: none; }
  body.immersive .frame-break { justify-content: center; }
  body.immersive .brk-link { margin-top: 2cqw; }
  .imm-exit {
    display: inline-flex; align-items: center; gap: 4px;
    height: 38px; padding: 0 12px 0 6px;
    border-radius: 12px;
    font-weight: 900; font-size: 14px; color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16);
  }
  .imm-exit .ico { width: 20px; height: 20px; stroke-width: 2.6; }
  .imm-title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .imm-title b { font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .imm-coins { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-family: var(--display); font-size: 15px; letter-spacing: .3px; }
  .imm-coins .coin-ico { width: 22px; height: 22px; }
  body.guest .imm-title { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* real logo (version C, tilted square): full lockup, mark-only on the narrowest screens */
.brand-logo { display: block; height: 40px; width: auto; flex: none; transition: transform .45s var(--spring); }
.brand:hover .brand-logo { transform: rotate(-2deg) scale(1.03); }
.brand-mark-only { display: none; height: 36px; width: auto; }
.foot .brand-logo { height: 32px; }
@media (max-width: 760px) { .brand-logo { height: 32px; } }
@media (max-width: 380px) { .topbar .brand-logo { display: none; } .topbar .brand-mark-only { display: block; } }
