/* ==========================================================================
   Decoration layer: color palette, animated background, card shapes, motion.
   Loaded after style.css and built on its theme tokens, so every theme, card size
   and corner style keeps working.
   ========================================================================== */
/* Anything marked hidden stays hidden, even if a rule below gives it a display value. */
[hidden] { display: none !important; }

:root, [data-theme="candy"] { --c1: #FF5FA2; --c2: #FFC93C; --c3: #3DD6A0; --c4: #4DA8FF; --c5: #A66BFF; --blob-o: .55; }
[data-theme="sunset"]   { --c1: #FF6B4A; --c2: #FFB347; --c3: #FF8FB1; --c4: #FFD93D; --c5: #E8456B; --blob-o: .5; }
[data-theme="ocean"]    { --c1: #0A84FF; --c2: #2ED1C4; --c3: #7AD7FF; --c4: #5B6CFF; --c5: #00B894; --blob-o: .45; }
[data-theme="midnight"] { --c1: #C27BFF; --c2: #FF4FD8; --c3: #4DD8FF; --c4: #7CFFB2; --c5: #FFD23F; --blob-o: .32; }
[data-theme="classic"]  { --c1: #2747C4; --c2: #F3C94C; --c3: #9FB0C8; --c4: #E4572E; --c5: #4C9F70; --blob-o: .2; }

/* Bigger pictures */
:root, [data-size="big"] { --card-min: 260px; }
[data-size="huge"] { --card-min: 440px; }
.photo, .detail .photo { width: 86%; height: 86%; }

/* ---------- Animated background ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 46vmax; aspect-ratio: 1; border-radius: 50%; filter: blur(70px);
        opacity: var(--blob-o); animation: drift 28s ease-in-out infinite alternate; }
.b1 { background: var(--c1); top: -18vmax; left: -12vmax; }
.b2 { background: var(--c2); top: 18vh; right: -20vmax; animation-duration: 34s; animation-delay: -8s; }
.b3 { background: var(--c3); bottom: -24vmax; left: 20vw; animation-duration: 30s; animation-delay: -14s; }
.b4 { background: var(--c4); top: 48vh; left: -14vmax; width: 30vmax; animation-duration: 38s; animation-delay: -20s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vmax, 4vmax) scale(1.12); }
  100% { transform: translate(-4vmax, 7vmax) scale(.94); }
}

.shape { position: absolute; opacity: .6; animation: bob 9s ease-in-out infinite alternate; }
.ring { width: 64px; aspect-ratio: 1; border-radius: 50%; border: 10px solid var(--c1); }
.dot { width: 18px; aspect-ratio: 1; border-radius: 50%; background: var(--c4); }
.plus { width: 34px; aspect-ratio: 1;
        background: linear-gradient(var(--c2) 0 0) center / 100% 30% no-repeat,
                    linear-gradient(var(--c2) 0 0) center / 30% 100% no-repeat; }
.squiggle { width: 120px; height: 24px; background: var(--c3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath d='M3 12 Q 18 0 33 12 T 63 12 T 93 12 T 117 12' fill='none' stroke='black' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath d='M3 12 Q 18 0 33 12 T 63 12 T 93 12 T 117 12' fill='none' stroke='black' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.star { width: 34px; aspect-ratio: 1; background: var(--c5);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L14.6 9.4 L24 12 L14.6 14.6 L12 24 L9.4 14.6 L0 12 L9.4 9.4 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L14.6 9.4 L24 12 L14.6 14.6 L12 24 L9.4 14.6 L0 12 L9.4 9.4 Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.tri { width: 40px; aspect-ratio: 1; background: var(--c1); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.s1  { top: 14%; left: 3%; }
.s2  { top: 30%; right: 5%; animation-duration: 7s; }
.s3  { top: 62%; left: 2%; animation-duration: 11s; }
.s4  { top: 9%; right: 24%; animation-duration: 12s; }
.s5  { top: 78%; right: 9%; animation-duration: 8s; }
.s6  { bottom: 6%; left: 42%; width: 44px; border-width: 7px; border-color: var(--c5); animation-duration: 10s; }
.s7  { top: 46%; right: 2%; animation-duration: 13s; }
.s8  { top: 88%; left: 12%; width: 12px; background: var(--c2); }
.s9  { top: 24%; left: 46%; width: 22px; animation-duration: 14s; }
.s10 { top: 55%; left: 24%; width: 22px; background: var(--c1); animation-duration: 9s; }
@keyframes bob { from { transform: translateY(0) rotate(0); } to { transform: translateY(-26px) rotate(25deg); } }

/* ---------- Header: floating glass bar ---------- */
header.top { position: sticky; top: 12px; z-index: 30; padding: 12px 18px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: calc(var(--radius) + 6px); box-shadow: 0 14px 34px -26px rgba(0, 0, 0, .4); }
.logo { background: linear-gradient(100deg, var(--ink) 0 35%, var(--c1) 45%, var(--c4) 55%, var(--ink) 65% 100%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s ease-in-out infinite; }
.logo i { display: inline-block; color: var(--c1); -webkit-text-fill-color: var(--c1); animation: hop 2.4s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
.flag, .search, .sort { background: var(--surface); }

/* ---------- Sidebar: glass panel with colored category icons ---------- */
.sidebar { top: 96px; max-height: calc(100vh - 112px); }
.sidebar nav { background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: calc(var(--radius) + 4px); padding: 10px; }
.cat { align-items: center; justify-content: flex-start; gap: 10px; padding: 6px 10px 6px 6px; transition: background .2s ease; }
.cat .label { flex: 1; }
.icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; font-size: 1rem;
  border-radius: min(50%, calc(var(--radius) / 2 + 4px)); background: color-mix(in srgb, var(--dot) 22%, var(--surface));
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .2s ease; }
.cat:hover .icon { transform: rotate(-12deg) scale(1.15); }
.cat[aria-current] { background: color-mix(in srgb, var(--dot) 16%, var(--surface)); }
.cat[aria-current] .icon { background: var(--dot); }
.subs { border-left: 2px dotted color-mix(in srgb, var(--muted) 45%, transparent); margin-left: 21px; }

/* Small text links under the categories (not a second glass panel). */
.sidebar nav.side-links { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 10px; padding: 0 12px;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; font-size: .75rem; }
.sidebar nav.side-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); }
.sidebar nav.side-links a:hover { color: var(--ink); }

/* ---------- Page title with a wiggling colorful underline ---------- */
.page-title { position: relative; padding-bottom: 14px; }
.page-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 10px;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q 10 0 20 6 T 40 6' fill='none' stroke='black' stroke-width='3.5'/%3E%3C/svg%3E") 0 0 / 40px 10px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q 10 0 20 6 T 40 6' fill='none' stroke='black' stroke-width='3.5'/%3E%3C/svg%3E") 0 0 / 40px 10px repeat-x;
  animation: wiggle 2.5s linear infinite; }
@keyframes wiggle { to { -webkit-mask-position: 40px 0; mask-position: 40px 0; } }

/* ---------- Cards: rise in, spotlight + shapes behind the product, lively hover ---------- */
.card { --ch: calc(var(--h) * var(--hk) + var(--ho));
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.card:hover { transform: translateY(-8px) rotate(-.8deg); }
.card:nth-child(even):hover { transform: translateY(-8px) rotate(.8deg); }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.96); } }

.vitrine { position: relative; isolation: isolate;
  box-shadow: 0 18px 36px -28px hsl(var(--ch) 70% 40% / .55); transition: box-shadow .4s ease; }
.card:hover .vitrine { box-shadow: 0 30px 50px -24px hsl(var(--ch) 80% 45% / .6); }
/* Spotlight behind the product */
.vitrine::before { content: ""; position: absolute; inset: 12%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, hsl(calc(var(--ch) + 50) var(--sat) calc(var(--tile-l) - 9%)) 0%, transparent 68%);
  transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
/* A decorative shape in the corner: ring, tilted square or dot, depending on the card */
.vitrine::after { content: ""; position: absolute; z-index: -1; width: 34%; aspect-ratio: 1; right: -9%; bottom: -9%;
  border-radius: 50%; border: 12px solid hsl(calc(var(--ch) - 35) var(--sat) calc(var(--tile-l) - 15%) / .75);
  transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.card:nth-child(3n) .vitrine::after { border-radius: 24%; right: auto; bottom: auto; left: -8%; top: -10%;
  transform: rotate(18deg); }
.card:nth-child(3n+2) .vitrine::after { border: 0; width: 22%; right: auto; bottom: auto; left: -7%; top: -7%;
  background: hsl(calc(var(--ch) + 90) var(--sat) calc(var(--tile-l) - 12%) / .8); }
.card:hover .vitrine::before { transform: scale(1.18); }
.card:hover .vitrine::after { transform: rotate(120deg) scale(1.15); }
.card:hover .photo, .card:hover .obj { transform: scale(1.08) rotate(-2deg); }
/* Playful uneven corners on some cards (sharp corners stay sharp) */
.card:nth-child(4n+2) .vitrine { border-radius: calc(var(--radius) * 2.4) var(--radius) calc(var(--radius) * 2.4) var(--radius); }
.card:nth-child(4n+3) .vitrine { border-radius: var(--radius) calc(var(--radius) * 2.4) var(--radius) calc(var(--radius) * 2.4); }

.info h3 { font-weight: 600; }
.meta-line .price { background: hsl(var(--ch) var(--sat) var(--tile-l)); color: hsl(var(--ch) 55% 22%);
  padding: 2px 9px; border-radius: var(--pill); font-weight: 500; }
.price:empty { display: none; }
.heart { transition: opacity .2s ease, transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.heart:hover { transform: scale(1.18); }

/* ---------- Buttons ---------- */
.go { background: linear-gradient(100deg, var(--c1), var(--c5), var(--c4)); background-size: 200% 100%; color: #fff;
  transition: background-position .5s ease, transform .3s cubic-bezier(.3, 1.6, .5, 1);
  box-shadow: 0 14px 28px -18px var(--c1); }
.go:hover { background-position: 100% 0; color: #fff; transform: translateY(-2px); }
.more { border: 2px solid transparent; color: var(--ink); font-weight: 600;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4)) border-box;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.more:hover { transform: scale(1.04); }

/* ---------- Item page ---------- */
.detail .vitrine::after { width: 26%; }

/* ---------- Footer: colorful top edge ---------- */
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; width: 160px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5)); }

/* ---------- New / Hot / Trending stickers on product photos ---------- */
.stickers { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px; pointer-events: none; }
.sticker { font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; padding: 4px 9px; border-radius: var(--pill); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5);
  transform: rotate(-4deg); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1); }
.sticker:nth-child(2) { transform: rotate(3deg); }
.sticker-hot { background: linear-gradient(135deg, #FF3D3D, #FF9A3D); }
.sticker-hot::before { content: "🔥 "; }
.sticker-trending { background: linear-gradient(135deg, #8A3DFF, #FF4FD8); }
.sticker-trending::before { content: "↗ "; }
.sticker-new { background: linear-gradient(135deg, #00B386, #3DD6A0); }
.sticker-new::before { content: "✦ "; }
.card:hover .sticker { transform: rotate(-8deg) scale(1.08); }
.card:hover .sticker:nth-child(2) { transform: rotate(6deg) scale(1.08); }
.sticker-hot { animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(255, 120, 60, .25), 0 6px 14px -8px rgba(0, 0, 0, .5); } }
.detail .stickers { top: 18px; left: 18px; }
.detail .sticker { font-size: .8rem; padding: 6px 12px; }

/* ---------- Welcome (first visit) ---------- */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
  min-height: calc(100vh - 160px); padding-block: 40px; }
.welcome-text { display: grid; gap: 18px; justify-items: start; animation: rise .8s cubic-bezier(.2, .8, .2, 1) backwards; }
.welcome-kicker { margin: 0; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.welcome-title { margin: -6px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 8vw, 5.6rem); line-height: .95;
  background: linear-gradient(100deg, var(--ink) 0 40%, var(--c1) 50%, var(--c4) 60%, var(--ink) 70% 100%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s ease-in-out infinite; }
.welcome-title i { font-style: normal; color: var(--c1); -webkit-text-fill-color: var(--c1); }
.welcome-lead { margin: 0; font-size: 1.15rem; line-height: 1.55; max-width: 46ch; }
.welcome-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; max-width: 48ch; }
.welcome-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.welcome-points b { color: var(--ink); }
.wp-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--dot) 25%, var(--surface)); font-size: 1.05rem; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.welcome-go { padding: 16px 30px; font-size: 1.05rem; }
.welcome-alt { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.welcome-alt:hover { color: var(--ink); }

.welcome-collage { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wtile { --ch: calc(var(--h) * var(--hk) + var(--ho)); aspect-ratio: 1; display: grid; place-items: center;
  border-radius: var(--radius); box-shadow: 0 20px 36px -26px hsl(var(--ch) 70% 40% / .6);
  background: linear-gradient(160deg, hsl(calc(var(--ch) + 15) var(--sat) var(--tile-l)), hsl(calc(var(--ch) - 15) var(--sat) calc(var(--tile-l) - 4%)));
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) backwards, floaty 6s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(0) rotate(0); } to { transform: translateY(-10px) rotate(1.5deg); } }
.wtile .photo { width: 82%; height: 82%; }
.wtile:nth-child(odd) { animation-duration: .8s, 7s; }
.wtile:nth-child(3n) { animation-duration: .8s, 8s; }
.w1 { grid-column: span 2; grid-row: span 2; animation-delay: .05s, 0s; }
.w2 { animation-delay: .12s, -2s; } .w3 { animation-delay: .19s, -4s; } .w4 { animation-delay: .26s, -1s; }
.w5 { animation-delay: .33s, -3s; } .w6 { animation-delay: .4s, -5s; } .w7 { animation-delay: .47s, -2.5s; } .w8 { animation-delay: .54s, -1.5s; }
.wtile:nth-child(4n+2) { border-radius: calc(var(--radius) * 2.4) var(--radius); }

@media (max-width: 860px) {
  .welcome { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-block: 24px; }
  .welcome-collage { order: -1; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .w1 { grid-column: auto; grid-row: auto; }
  .w5, .w6, .w7, .w8 { display: none; }
}

/* ---------- Price history ---------- */
.price-history { max-width: 760px; margin-top: 48px; padding: 24px 26px; border-radius: calc(var(--radius) + 6px);
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.price-history h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.ph-summary { margin: 0 0 14px; color: var(--muted); }
.ph-chart { position: relative; }
.ph-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.ph-grid { stroke: var(--line); stroke-width: 1; }
.ph-axis { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.ph-tick { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.ph-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ph-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; transition: r .15s ease; }
.ph-dot.active { r: 6; }
.ph-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ph-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); display: grid; gap: 1px; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: .78rem; white-space: nowrap; }
.ph-tip b { font-family: var(--mono); font-size: .85rem; }
.ph-table { margin-top: 10px; font-size: .85rem; }
.ph-table summary { cursor: pointer; color: var(--muted); }
.ph-compare { display: inline-block; margin-top: 12px; font-size: .85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ph-compare:hover { color: var(--ink); }
.ph-table table { margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ph-table th, .ph-table td { text-align: left; padding: 4px 18px 4px 0; border-bottom: 1px solid var(--line); }
.ph-table th { color: var(--muted); font-weight: 500; }
.lowest { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: var(--pill); font-family: var(--body);
  font-size: .72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00B386, #3DD6A0); vertical-align: middle; }

/* ---------- Page numbers ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 44px; }
.pager .numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.pager .num, .pager .step { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: var(--pill); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s ease; }
.pager a:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c1) 18%, var(--surface)); }
.pager .num[aria-current] { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c5)); }
.pager .step[aria-disabled] { opacity: .4; }
.pager .gap { align-self: center; color: var(--muted); }

/* ---------- Play ---------- */
.play-hub, .game-page { padding-top: 32px; }
.play-lead { color: var(--muted); margin: 14px 0 28px; }
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.game-card { position: relative; overflow: hidden; display: grid; gap: 8px; align-content: start; padding: 28px;
  border-radius: calc(var(--radius) + 6px); background: color-mix(in srgb, var(--dot) 20%, var(--surface));
  box-shadow: 0 20px 40px -30px var(--dot); transition: transform .4s cubic-bezier(.3, 1.4, .5, 1);
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; }
.game-card:nth-child(2) { animation-delay: 80ms; }
.game-card:nth-child(3) { animation-delay: 160ms; }
.game-card::after { content: ""; position: absolute; width: 160px; aspect-ratio: 1; right: -50px; top: -50px;
  border-radius: 50%; border: 22px solid color-mix(in srgb, var(--dot) 35%, transparent);
  transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.game-card:hover { transform: translateY(-6px) rotate(-1deg); }
.game-card:hover::after { transform: rotate(90deg) scale(1.2); }
.game-emoji { font-size: 3.4rem; line-height: 1; transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); }
.game-card:hover .game-emoji { transform: rotate(-12deg) scale(1.15); }
.game-name { font-family: var(--display); font-size: 1.5rem; }
.game-pitch { color: var(--muted); }
.game-best { font-family: var(--mono); font-size: .8rem; color: var(--ink); }
.game-go { margin-top: 8px; font-weight: 700; color: var(--ink); }

.game-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.scores { display: flex; gap: 10px; }
.scores span { background: var(--surface); border-radius: var(--pill); padding: 6px 14px; color: var(--muted); font-size: .9rem; }
.scores b { color: var(--ink); font-family: var(--mono); margin-left: 4px; }
.stage { position: relative; width: min(100%, 480px, calc((100vh - 220px) * .75)); margin-inline: auto;
  border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: 0 30px 60px -36px var(--c1); }
.stage[style*="1 / 1"] { width: min(100%, 520px, calc(100vh - 220px)); }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 24px; text-align: center; background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay[hidden] { display: none; }
.overlay-emoji { font-size: 4rem; line-height: 1; animation: hop 1.8s ease-in-out infinite; }
.overlay-title { margin: 0; font-family: var(--display); font-size: 2rem; }
.overlay-text { margin: 0; color: var(--muted); max-width: 30ch; }
.overlay .go { min-width: 180px; margin-top: 6px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.overlay-hint { margin: 0; font-size: .8rem; color: var(--muted); }
.overlay.celebrate .overlay-title { background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4));
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.other-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.other-games a { background: var(--surface); border-radius: var(--pill); padding: 8px 16px; font-weight: 600; }
.other-games a:hover { background: color-mix(in srgb, var(--c3) 22%, var(--surface)); }

/* ---------- Small screens ---------- */
@media (max-width: 800px) {
  .sidebar { top: auto; max-height: none; }
  .sidebar nav { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
  .icon { width: 26px; height: 26px; font-size: .85rem; }
  .subs { margin-left: 0; }
  .side-links { display: none; }  /* phones: the footer is reachable once auto-loading stops */
}
@media (max-width: 680px) {
  [data-size="big"] { --card-min: 160px; }
  header.top { top: 8px; padding: 10px 12px; }
  .blob { filter: blur(50px); }
  .s3, .s7, .s9, .s10 { display: none; }
  .vitrine::after { border-width: 8px; }
}

/* Anyone who asked their device for less motion gets none. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Shelves on the main page: New, Trending, then Everything ---------- */
.shelf { margin-bottom: 44px; }
.shelf-head { position: relative; display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px;
  padding-bottom: 12px; border-bottom: 2px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.shelf-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: min(180px, 40%); height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--c1), var(--c3), var(--c4)); }
.shelf-head h2 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1;
  font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
.shelf-trending .shelf-head::after { background: linear-gradient(90deg, var(--c2), var(--c1), var(--c5)); }
.shelf-head-all { margin-top: 8px; }
.shelf-nav { margin-left: auto; display: flex; gap: 6px; }
.shelf-step { width: 34px; height: 34px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--ink); font-size: 1.2rem; line-height: 1;
  cursor: pointer; transition: transform .15s, background .15s; }
.shelf-step:hover { background: var(--ink); color: var(--bg); transform: scale(1.06); }
.shelf-all { color: var(--muted); font-weight: 600; white-space: nowrap; }
.shelf-all:hover { color: var(--ink); }
/* One row that scrolls sideways: three cards across on a wide screen, like the grid below. */
.shelf-row { display: grid; grid-auto-flow: column; gap: 24px;
  grid-auto-columns: max(var(--card-min), calc((100% - 48px) / 3));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 10px 6px 20px; margin: -10px -6px 0; scrollbar-width: thin; }
.shelf-row > .card { scroll-snap-align: start; }
@media (max-width: 680px) {
  .shelf-nav { display: none; }
  .shelf-all { margin-left: auto; }
  .shelf-row { gap: 14px; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.controls:has(.page-title.visually-hidden) { justify-content: flex-end; }
/* While browse.js fetches the next category or page */
.main.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s .1s; }
