/* Shared site styles for all games. Each game can override the colour tokens in :root.
   Token roles: --night = ink/dark background, --moon = paper/light text, --itch = primary (yellow),
   --sheet = accent (pink), --coil = success (green), --bite = danger (red). */

/* Self-hosted fonts (SIL Open Font License, see assets/fonts/OFL-*.txt). No requests to Google. */
@font-face { font-family: 'Modak'; src: url(fonts/modak-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Grandstander'; src: url(fonts/grandstander-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Bangers'; src: url(fonts/bangers-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --night: #1A1446; --coil: #2FBF4A; --itch: #FFE14D; --sheet: #FF5FA2; --bite: #E8263B; --moon: #FFF4C2;
  --display: 'Modak', 'Arial Rounded MT Bold', system-ui, sans-serif; --body: 'Grandstander', system-ui, sans-serif;
  --comic: 'Bangers', Impact, sans-serif;
  --outline: -3px -3px 0 var(--night), 3px -3px 0 var(--night), -3px 3px 0 var(--night), 3px 3px 0 var(--night);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); overflow: hidden; font-family: var(--body); color: var(--moon);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: none; touch-action: none; }
button { font-family: inherit; }
button:focus-visible { outline: 4px dashed var(--coil); outline-offset: 5px; }
.hidden { display: none !important; }

/* ---------- Shared type + buttons ---------- */
.title { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; color: var(--itch);
  font-size: clamp(40px, 10vw, 84px); text-shadow: var(--outline), 7px 7px 0 var(--sheet); transform: rotate(-3deg); }
.title2 { font-family: var(--display); font-weight: 400; margin: 0; color: var(--itch); font-size: clamp(30px, 7vw, 50px);
  text-shadow: var(--outline), 5px 5px 0 var(--sheet); transform: rotate(-2deg); line-height: 1.1; }
h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 18px 0 0; color: var(--coil); text-shadow: var(--outline); }
p { margin: 0; max-width: 34em; line-height: 1.5; font-size: 17px; font-weight: 500; }
.lede { font-size: 19px; font-weight: 700; }
.kicker { font-weight: 700; opacity: .85; }

.big { font-family: var(--display); font-size: clamp(22px, 5vw, 28px); color: var(--night); background: var(--itch);
  border: 4px solid var(--night); border-radius: 20px; padding: 12px 34px 14px; cursor: pointer; min-height: 56px;
  box-shadow: 0 8px 0 var(--night), 0 8px 0 4px var(--coil); transform: rotate(-1.5deg); margin: 4px 0 10px; }
.big:active { transform: translateY(6px) rotate(-1.5deg); box-shadow: 0 2px 0 var(--night), 0 2px 0 4px var(--coil); }
.ghost { font-weight: 800; font-size: 17px; color: var(--night); background: var(--moon); border: 3px solid var(--night);
  border-radius: 16px; padding: 9px 20px; cursor: pointer; box-shadow: 0 5px 0 var(--night); min-height: 46px; }
.ghost:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--night); }
.ghost:disabled { background: var(--coil); cursor: default; transform: none; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--night); background: var(--itch); font-size: 18px;
  cursor: pointer; box-shadow: 0 4px 0 var(--night); padding: 0; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--night); }
.back { align-self: flex-start; background: none; border: 0; color: var(--moon); font-weight: 800; font-size: 17px; cursor: pointer; padding: 8px 4px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
a.big, a.ghost { display: inline-block; text-decoration: none; }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; z-index: 5; overflow-y: auto; display: flex; padding: max(20px, env(safe-area-inset-top)) 16px 28px;
  background: radial-gradient(circle at 50% 38%, #2b2378 0%, var(--night) 70%); }
.screen.dim { background: radial-gradient(circle at 50% 42%, rgba(43,35,120,.93) 0%, rgba(26,20,70,.97) 70%); }
.wrap { position: relative; z-index: 1; margin: auto; width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.coil { position: fixed; left: 50%; top: 50%; width: 150vmax; height: 150vmax; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
.coil path { fill: none; stroke: var(--coil); stroke-width: 13; stroke-linecap: round; opacity: .14; }
.topbar { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 14px; z-index: 2; display: flex; gap: 10px; align-items: center; }
.coins { background: var(--night); border: 3px solid var(--itch); border-radius: 30px; padding: 4px 14px; font-weight: 800; font-size: 17px; }

/* Title */
.mascot { display: flex; align-items: flex-end; gap: 4px; margin: 26px 0 -8px; }
.mascot svg { width: clamp(100px, 22vw, 160px); height: auto; animation: hover 1.8s ease-in-out infinite; }
.bubble { background: #fff; color: var(--night); border: 4px solid var(--night); border-radius: 22px; padding: 8px 14px; font-weight: 800;
  font-size: 16px; line-height: 1.3; margin-bottom: 64px; position: relative; transform: rotate(3deg); max-width: 190px; }
.bubble::after { content: ""; position: absolute; left: -17px; bottom: 12px; border: 10px solid transparent; border-right: 14px solid var(--night); }
@keyframes hover { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
.logo { display: flex; flex-direction: column; align-items: center; font-size: clamp(54px, 13vw, 110px); }
.subtitle { font-family: var(--body); font-weight: 900; font-size: clamp(17px, 3.6vw, 24px); color: var(--night); background: var(--coil);
  border: 3px solid var(--night); border-radius: 30px; padding: 2px 18px 4px; margin-top: 6px; text-shadow: none; transform: rotate(4deg);
  box-shadow: 0 4px 0 var(--night); white-space: nowrap; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 520px; }
.menu-grid .ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; }
.menu-grid small { font-weight: 600; font-size: 13px; opacity: .75; }

/* Week map: tear-off calendar pages */
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; width: 100%; margin-top: 8px; }
.page { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 10px 14px; cursor: pointer;
  background: var(--moon); color: var(--night); border: 4px solid var(--night); border-radius: 6px 6px 16px 16px; box-shadow: 0 7px 0 var(--night);
  font-family: var(--body); transform: rotate(-2deg); }
.page:nth-child(even) { transform: rotate(1.5deg); }
.page:active { box-shadow: 0 2px 0 var(--night); translate: 0 5px; }
.page::before { content: ""; position: absolute; top: 8px; left: 22%; right: 22%; height: 9px;
  background: radial-gradient(circle, var(--night) 4px, transparent 4.5px) 0 0 / 33.3% 100% repeat-x; }
.page .day { font-family: var(--display); font-size: 30px; color: var(--bite); line-height: 1.1; }
.page .room { font-weight: 700; font-size: 14px; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; }
.page .stars { font-size: 24px; color: #e0a800; letter-spacing: 2px; -webkit-text-stroke: 1px var(--night); }
.page .stars i { font-style: normal; color: transparent; }
.page.boss { background: var(--bite); color: var(--moon); }
.page.boss .day { color: var(--itch); text-shadow: var(--outline); }
.page.locked { background: #8f8bc0; cursor: not-allowed; box-shadow: 0 4px 0 var(--night); }
.page.locked .day { color: var(--night); opacity: .55; }

/* Intro + pest cards */
.quote { background: #fff; color: var(--night); border: 4px solid var(--night); border-radius: 22px; padding: 12px 20px; font-weight: 800;
  font-size: 18px; transform: rotate(-1deg); box-shadow: 6px 6px 0 var(--sheet); }
.goal { font-weight: 800; color: var(--itch); }
.pests { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; }
.pest { position: relative; width: 170px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px 14px;
  background: var(--itch); color: var(--night); border: 4px solid var(--night); border-radius: 14px; box-shadow: 0 6px 0 var(--night); transform: rotate(-2deg); }
.pest:nth-child(even) { transform: rotate(2deg); }
.pest img { width: 110px; height: 110px; }
.pest b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.15; }
.pest span { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pest .ribbon { position: absolute; top: -14px; right: -10px; background: var(--sheet); color: #fff; border: 3px solid var(--night);
  border-radius: 10px; padding: 1px 10px; font-weight: 800; font-size: 13px; transform: rotate(8deg); }
.pest.unknown { background: #8f8bc0; }
.pest .q { font-family: var(--display); font-size: 70px; line-height: 110px; height: 110px; color: var(--night); opacity: .5; }

/* Shop */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; width: 100%; }
.item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; background: rgba(255,244,194,.08);
  border: 3px dashed rgba(255,244,194,.35); border-radius: 18px; }
.item.on { border: 3px solid var(--coil); background: rgba(47,191,74,.15); }
.item .emoji { font-size: 48px; line-height: 1.1; }
.item b { font-weight: 800; font-size: 16px; }
.item .ghost { font-size: 15px; padding: 6px 14px; min-height: 40px; }
.item .try { background: var(--sheet); color: #fff; }
.trial-tag { font-weight: 800; font-size: 14px; color: var(--itch); }
#trialNote:empty { display: none; }

/* Help */
.rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 34em; }
.rules li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.45; font-weight: 600; }
.rules .emoji { font-size: 24px; line-height: 1.1; flex: none; }
.rules b { color: var(--itch); margin-right: 4px; }

/* Results */
.stars { display: flex; gap: 10px; justify-content: center; min-height: 0; }
.star { font-size: 64px; line-height: 1; color: var(--itch); -webkit-text-stroke: 3px var(--night); transform: scale(0); }
.star.on { animation: pop .45s cubic-bezier(.3, 1.8, .5, 1) forwards; }
.star.off { color: rgba(255,244,194,.18); -webkit-text-stroke: 3px rgba(255,244,194,.3); transform: scale(1); }
@keyframes pop { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
#resTitle { color: var(--coil); font-size: clamp(36px, 8vw, 68px); }
.msg { font-size: 18px; font-weight: 700; color: #fff; }
.tally { display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
#resScore { font-family: var(--display); font-size: clamp(48px, 12vw, 90px); color: var(--itch); text-shadow: var(--outline), 6px 6px 0 var(--sheet); line-height: 1; }
.coinsWon { font-weight: 800; color: var(--itch); white-space: pre; }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 4; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) 14px 0; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#score { font-family: var(--display); font-size: 28px; color: var(--itch); text-shadow: var(--outline), 4px 4px 0 var(--sheet); line-height: 1; padding-left: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--night); border: 3px solid var(--moon); border-radius: 30px;
  padding: 2px 12px; font-weight: 800; font-size: 15px; white-space: nowrap; }
#bumps { display: flex; gap: 7px; align-items: center; padding-top: 10px; }
.bump { width: 15px; height: 15px; border-radius: 50%; border: 3px solid var(--moon); background: rgba(255,244,194,.12); transition: transform .2s, background .2s; }
.bump.hit { background: var(--bite); border-color: var(--night); transform: scale(1.35); box-shadow: 0 0 0 3px var(--bite); }
.hud-right { display: flex; align-items: center; gap: 8px; }
#sib { font-size: 26px; line-height: 1; }
#wake { width: 80px; height: 12px; border: 3px solid var(--night); background: var(--moon); border-radius: 8px; overflow: hidden; }
#wakeFill { display: block; height: 100%; width: 0; background: var(--sheet); transition: width .15s; }
#pauseBtn { pointer-events: auto; }
#bossBar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-weight: 800; }
#bossBar .bar { width: min(320px, 55vw); height: 16px; border: 3px solid var(--night); background: var(--moon); border-radius: 10px; overflow: hidden; }
#bossFill { display: block; height: 100%; width: 100%; background: var(--bite); transition: width .3s; }
#powers { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
#powers .chip { border-color: var(--coil); font-size: 17px; }

/* ---------- Rewarded ad offers + test ad screen ---------- */
.reward { display: flex; flex-direction: column; align-items: center; font-family: var(--body); font-weight: 900; font-size: 18px; line-height: 1.25;
  color: #fff; background: var(--sheet); border: 4px solid var(--night); border-radius: 18px; padding: 10px 22px; cursor: pointer;
  box-shadow: 0 6px 0 var(--night); transform: rotate(1deg); animation: pop .4s cubic-bezier(.3, 1.8, .5, 1); max-width: 100%; }
.reward small { font-weight: 700; font-size: 13px; opacity: .9; }
.reward:active { transform: translateY(4px) rotate(1deg); box-shadow: 0 2px 0 var(--night); }
.reward:disabled { background: var(--coil); color: var(--night); cursor: default; transform: rotate(1deg); }
.adscreen { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10,6,40,.92); }
.adbox { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center;
  background: #fff; color: var(--night); border: 4px solid var(--night); border-radius: 20px; box-shadow: 8px 8px 0 var(--coil); }
.adbox b { font-family: var(--display); font-weight: 400; font-size: 28px; }
.adtag { align-self: flex-start; background: var(--itch); border: 2px solid var(--night); border-radius: 8px; padding: 0 8px; font-weight: 800; font-size: 13px; }
.adbar { width: 100%; height: 14px; border: 3px solid var(--night); border-radius: 8px; overflow: hidden; }
.adbar i { display: block; height: 100%; width: 0; background: var(--coil); }

/* ---------- Site links on the title screen ---------- */
.site-links { display: flex; gap: 22px; justify-content: center; margin-top: 4px; }
.site-links a { color: var(--moon); opacity: .75; font-weight: 700; font-size: 15px; }

/* ---------- Content pages (About, Privacy) ---------- */
html.doc, html.doc body { overflow: auto; height: auto; min-height: 100%; user-select: text; -webkit-user-select: text; }
html.doc body { background: radial-gradient(circle at 50% 0, #2b2378, var(--night) 60%) fixed; }
.doc main { max-width: 680px; margin: 0 auto; padding: 28px 20px 64px; }
.doc .back { display: block; width: fit-content; margin-bottom: 18px; text-decoration: none; color: var(--moon); }
.doc .title2 { display: inline-block; margin-bottom: 8px; }
.doc h2 { font-family: var(--display); font-weight: 400; color: var(--coil); font-size: 24px; margin: 34px 0 8px; text-shadow: var(--outline); }
.doc p, .doc li { font-size: 17px; line-height: 1.65; max-width: none; margin: 0 0 12px; }
.doc ul { padding-left: 22px; margin: 0 0 12px; }
.doc a { color: var(--itch); font-weight: 700; }
.doc a.big { color: var(--night); }                 /* .doc a would otherwise turn button text yellow-on-yellow */
.doc a.ghost { color: var(--night); }
.doc code { background: rgba(255,244,194,.12); padding: 1px 6px; border-radius: 6px; font-size: 15px; }
.doc .note { background: var(--moon); color: var(--night); border: 3px solid var(--night); border-radius: 14px; padding: 12px 16px;
  box-shadow: 5px 5px 0 var(--sheet); font-weight: 600; margin: 18px 0; }
.doc .note a { color: var(--bite); }
.doc .play { display: inline-block; text-decoration: none; margin-top: 18px; }
.doc footer { margin-top: 44px; font-size: 14px; opacity: .7; }

/* ---------- Home page (game portal) ---------- */
.doc main.home-main { max-width: 1180px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 18px 48px; }
.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin: 10px 0 34px; }
.clock { font-family: var(--comic); font-size: 22px; letter-spacing: .1em; color: var(--bite); background: #111; border: 3px solid var(--night);
  border-radius: 10px; padding: 2px 14px; margin: 0; box-shadow: 0 0 18px rgba(232,38,59,.45); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; }
.card[hidden] { display: none; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 18px 22px; transition: transform .15s;
  background: radial-gradient(circle at 50% 20%, var(--glow), var(--night) 75%); color: var(--moon); border: 4px solid var(--night);
  border-radius: 26px; box-shadow: 0 10px 0 var(--night), 0 10px 0 4px var(--itch); }
.card.bzzz { --night: #1A1446; --moon: #FFF4C2; --itch: #FFE14D; --sheet: #FF5FA2; --coil: #2FBF4A; --glow: #3a2f9a; transform: rotate(-1deg); }
.card.plink { --night: #10233F; --moon: #EAF6FF; --itch: #FFD23F; --sheet: #56CFE1; --coil: #7BD389; --glow: #24497a; transform: rotate(-.5deg); }
.card.dhum { --night: #24102E; --moon: #FFF3D6; --itch: #FFB300; --sheet: #FF3D7F; --coil: #2EC4B6; --glow: #4a1f5c; transform: rotate(.8deg); }
.card.chappal { --night: #2A1A12; --moon: #FFEBD2; --itch: #FFC93C; --sheet: #3D8BFF; --coil: #7ED957; --glow: #5a3424; transform: rotate(-.8deg); }
.card.bartan { --night: #16241F; --moon: #F2FFF7; --itch: #C6F432; --sheet: #FF5D8F; --coil: #52D1DC; --glow: #2f5a4f; transform: rotate(.6deg); }
.card.bhaag { --night: #1C120C; --moon: #FFF1DC; --itch: #FFA62B; --sheet: #FF5E7E; --coil: #3CC9B0; --glow: #4a2a17; transform: rotate(-.6deg); }
.card.kaand { --night: #13201A; --moon: #F4FFE8; --itch: #B8F24A; --sheet: #FF5C8A; --coil: #FF9F1C; --glow: #2c4a3a; transform: rotate(.5deg); }
.card.laddoo { --night: #2A0710; --moon: #FFF4E0; --itch: #FFC21A; --sheet: #FF4F8B; --coil: #2EC4B6; --glow: #6a1530; transform: rotate(-.7deg); }
.card.fridge { --night: #0F1E33; --moon: #F2F8FF; --itch: #FFD447; --sheet: #FF6FA8; --coil: #5CE1B9; --glow: #1f3a5f; transform: rotate(.7deg); }
.card.family { --night: #0B2B26; --moon: #F3FFF9; --itch: #FFD166; --sheet: #FF4D5E; --coil: #25D366; --glow: #145247; transform: rotate(-.5deg); }
.card.chipkali { --night: #2A2414; --moon: #FFF8E1; --itch: #E9F27A; --sheet: #FF6F91; --coil: #33C1B1; --glow: #4d4424; transform: rotate(.6deg); }
.card.cricket { --night: #13151F; --moon: #FFF6E0; --itch: #B6F03C; --sheet: #1E88E5; --coil: #FFB347; --glow: #2b2350; transform: rotate(-.6deg); }
.card.road { --night: #1A1622; --moon: #FFF3E0; --itch: #FFD23F; --sheet: #FF4F9A; --coil: #2ECC71; --glow: #3a2f55; transform: rotate(.6deg); }
.card.maggi { --night: #1B1430; --moon: #FFF7E6; --itch: #F7C948; --sheet: #FF5FA2; --coil: #3DDC84; --glow: #3b2d66; transform: rotate(-.4deg); }
.card.kahan { --night: #2B1B2E; --moon: #FFF1E6; --itch: #FFB84D; --sheet: #FF5C7A; --coil: #4FD1C5; --glow: #4b2f4f; transform: rotate(-.5deg); }
.card.gaadi { --night: #1C1A14; --moon: #FBF6E9; --itch: #FFC23D; --sheet: #FF4F6D; --coil: #3ED6A4; --glow: #47401f; transform: rotate(.6deg); }
.card.rishta { --night: #33102E; --moon: #FFF3E6; --itch: #FFB31A; --sheet: #FF3D7F; --coil: #5FE3A1; --glow: #702060; transform: rotate(-.6deg); }
.card.patang { --night: #06243A; --moon: #FFF6E5; --itch: #FFCB47; --sheet: #FF5C8A; --coil: #7CF0C8; --glow: #0f4c6e; transform: rotate(.5deg); }
.card.holi { --night: #1D1235; --moon: #FFF8EE; --itch: #FFD23F; --sheet: #FF3D9A; --coil: #2ED47A; --glow: #4a2a7a; transform: rotate(-.4deg); }
.card.takkar { --night: #160F1F; --moon: #FFF5E6; --itch: #FFD23F; --sheet: #FF3B3B; --coil: #4FC3F7; --glow: #3a1f4a; transform: rotate(.5deg); }
.card.carrom { --night: #20140C; --moon: #FFF6E8; --itch: #F6C453; --sheet: #D7263D; --coil: #3DDC84; --glow: #5a3420; transform: rotate(-.5deg); }
.card.molbhaav { --night: #241338; --moon: #FFF3E0; --itch: #FFC93C; --sheet: #FF4FA0; --coil: #2EE6C5; --glow: #4f2a6b; transform: rotate(.6deg); }
.card.wfh { --night: #1b1a2e; --moon: #F5F3FF; --itch: #FFC93C; --sheet: #6264A7; --coil: #3DDC84; --glow: #3a3870; transform: rotate(-.5deg); }
.card.ladder { --night: #0B1622; --moon: #F4F8FF; --itch: #FFD166; --sheet: #EF476F; --coil: #06D6A0; --glow: #1b3a5a; transform: rotate(.5deg); }
.card.bingo { --night: #1E2235; --moon: #FFF6E6; --itch: #FFD23F; --sheet: #FF6B6B; --coil: #4ECDC4; --glow: #3a4066; transform: rotate(-.6deg); }
.card.oncall { --night: #0D1117; --moon: #E6EDF3; --itch: #F0B429; --sheet: #F85149; --coil: #3FB950; --glow: #1f2a37; transform: rotate(.6deg); }
.card.sabzi { --night: #1A2410; --moon: #FFFBEA; --itch: #FFCF33; --sheet: #FF4E50; --coil: #8BD450; --glow: #3d5220; transform: rotate(-.6deg); }
.card.khidki { --night: #160F24; --moon: #FFF6E5; --itch: #FFC93C; --sheet: #FF4F7B; --coil: #3DDC97; --glow: #3a2458; transform: rotate(.6deg); }
.card.cooker { --night: #14112B; --moon: #FFF8EC; --itch: #FFD23F; --sheet: #FF5C8A; --coil: #FF9933; --glow: #2b1f5c; transform: rotate(-.5deg); }
.card.lift { --night: #1B1530; --moon: #FFF7E8; --itch: #FFB627; --sheet: #FF5C8A; --coil: #3DDC97; --glow: #3a2f60; transform: rotate(.5deg); }
.card.pani { --night: #0E2233; --moon: #F2FBFF; --itch: #FFC857; --sheet: #3FC1FF; --coil: #45E0A8; --glow: #1d4a66; transform: rotate(-.5deg); }
.card.signal { --night: #14121C; --moon: #FFF6E6; --itch: #FFD23F; --sheet: #FF4F8B; --coil: #33E37A; --glow: #3a2a4a; transform: rotate(.6deg); }
.card.chhat { --night: #1A1426; --moon: #FFF5E1; --itch: #FFC23D; --sheet: #FF5E7E; --coil: #3DDBB0; --glow: #45305c; transform: rotate(-.6deg); }
.card.kabootar { --night: #1C1A2E; --moon: #FFF8EC; --itch: #FFC53D; --sheet: #4CC9F0; --coil: #3DDC97; --glow: #35325a; transform: rotate(.5deg); }
.card.devil { --night: #1B1530; --moon: #FFF6E0; --itch: #FFCF3F; --sheet: #F2453D; --coil: #45D6A0; --glow: #2F5D46; transform: rotate(-.5deg); }
.card.penalty { --night: #13202A; --moon: #FFF8E7; --itch: #FFD23F; --sheet: #E63946; --coil: #3DDC84; --glow: #2b5a3e; transform: rotate(.6deg); }
.card.tiffin { --night: #1E1430; --moon: #FFF7EA; --itch: #FFB627; --sheet: #FF4FA3; --coil: #3DDC97; --glow: #3b2a5a; transform: rotate(-.6deg); }
.card.rasgulla { --night: #2A1408; --moon: #FFF8EC; --itch: #FFC233; --sheet: #E8332A; --coil: #45D483; --glow: #5a3218; transform: rotate(.5deg); }
.card.jhoola { --night: #20123A; --moon: #FFF6E8; --itch: #FFC93C; --sheet: #FF4A2E; --coil: #4BE0A8; --glow: #3b2466; transform: rotate(-.5deg); }
.card.roti { --night: #2A160E; --moon: #FFF3E0; --itch: #FFB627; --sheet: #FF5E5B; --coil: #7BD389; --glow: #5b3422; transform: rotate(-.5deg); }
.card.buffet { --night: #1F0A14; --moon: #FFF4E0; --itch: #FFC233; --sheet: #FF4F8B; --coil: #3DDC97; --glow: #7a1f4f; transform: rotate(.5deg); }
.card.wheelie { --night: #1A1024; --moon: #FFF5E6; --itch: #FFB23F; --sheet: #FF4F7B; --coil: #2EE6C5; --glow: #B5466B; transform: rotate(-.6deg); }
.card.tapri { --night: #1C120C; --moon: #FFF4E2; --itch: #FF9933; --sheet: #E63946; --coil: #3DDC84; --glow: #5a3a26; transform: rotate(.5deg); }
.card.tawa { --night: #0B1C2C; --moon: #FFF6E5; --itch: #FFB627; --sheet: #FF6B35; --coil: #2EC4B6; --glow: #1f4a6e; transform: rotate(-.5deg); }
.card.local { --night: #14101C; --moon: #FFF6E6; --itch: #FFD23F; --sheet: #8B1E3F; --coil: #3DDC84; --glow: #8B1E3F; transform: rotate(.6deg); }
.card.gubbara { --night: #20123A; --moon: #FFF6E8; --itch: #FFD23F; --sheet: #FF5FA2; --coil: #3DDC97; --glow: #3b2466; transform: rotate(-.6deg); }
.card.machli { --night: #0F2230; --moon: #FFF8E8; --itch: #FFB627; --sheet: #FF4D4D; --coil: #5BE37D; --glow: #1d4a5e; transform: rotate(.5deg); }
.card.paperfight { --night: #16202E; --moon: #FFF9EE; --itch: #FFC233; --sheet: #FF5C8A; --coil: #42D392; --glow: #2a3a52; transform: rotate(-.6deg); }
.card.scooty { --night: #14202B; --moon: #FFF7E8; --itch: #FFB627; --sheet: #4CC3FF; --coil: #5BE37D; --glow: #24405a; transform: rotate(.5deg); }
.card.bandar { --night: #20170F; --moon: #FFF6E2; --itch: #FFC233; --sheet: #FF5D8F; --coil: #4CD98A; --glow: #5a3a22; transform: rotate(-.5deg); }
.card.charades { --night: #1F1147; --moon: #FFF4E0; --itch: #FFD23F; --sheet: #FF5DA2; --coil: #2EE59D; --glow: #3d2585; transform: rotate(-.6deg); }
.card.shhh { --night: #0E2433; --moon: #FDF1DC; --itch: #FFB627; --sheet: #FF6B6B; --coil: #3DDC97; --glow: #22617a; transform: rotate(1deg); }
.card-art { width: 104px; height: 96px; margin-bottom: -4px; }
.card h2, .card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3vw, 38px); line-height: 1; margin: 0; color: var(--itch);
  text-shadow: var(--outline), 5px 5px 0 var(--sheet); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.card h2 small, .card h3 small { font-family: var(--body); font-weight: 900; font-size: 17px; color: var(--night); background: var(--coil); border: 3px solid var(--night);
  border-radius: 30px; padding: 1px 12px 3px; text-shadow: none; transform: rotate(3deg); font-size: 14px; }
.card p { font-size: 15px; line-height: 1.5; max-width: 32em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; }
.tags li { font-weight: 800; font-size: 12.5px; border: 2px solid var(--moon); border-radius: 20px; padding: 2px 10px; }
.card .big { text-decoration: none; margin-top: auto; color: var(--night); font-size: 20px; padding: 8px 22px 10px; min-height: 0; }
.card .big::after { content: ""; position: absolute; inset: 0; border-radius: 26px; }          /* the whole card is the link */
.card:hover, .card:focus-within { transform: translateY(-5px) rotate(0); }
.card .progress { font-weight: 800; font-size: 13.5px; color: var(--itch); min-height: 1.2em; margin: -4px 0 0; -webkit-line-clamp: unset; }
.card .progress:empty { display: none; }
.badge { position: absolute; top: -12px; right: 16px; z-index: 1; font-family: var(--comic); font-size: 17px; letter-spacing: .06em; color: #fff;
  background: var(--bite); border: 3px solid var(--night); border-radius: 10px; padding: 1px 10px; transform: rotate(6deg); animation: pop .4s cubic-bezier(.3, 1.8, .5, 1); }

/* Hero stats, game of the day, filters */
.stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 4px 0 0; }
.stats li { font-weight: 700; font-size: 15px; border: 2px solid rgba(255,244,194,.35); border-radius: 30px; padding: 3px 14px; }
.stats b { font-family: var(--display); font-weight: 400; color: var(--itch); font-size: 18px; margin-right: 4px; }
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 34px); color: var(--itch); text-shadow: var(--outline); margin: 0 0 14px; }
.featured { margin: 0 0 44px; }
.featured-card { display: grid; grid-template-columns: 220px 1fr auto; grid-template-rows: auto auto auto; align-items: center; text-align: left;
  column-gap: 26px; row-gap: 8px; padding: 22px 30px; transform: rotate(-.4deg); }
.featured-card .card-art { grid-row: 1 / span 4; width: 200px; height: 180px; margin: 0; }
.featured-card h3 { align-items: flex-start; font-size: clamp(36px, 4.5vw, 54px); }
.featured-card p { -webkit-line-clamp: unset; font-size: 16.5px; }
.featured-card .tags { justify-content: flex-start; }
.featured-card .big { grid-column: 3; grid-row: 1 / span 4; margin: 0; font-size: 24px; padding: 12px 28px 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.filters button { font-family: var(--body); font-weight: 800; font-size: 15px; color: var(--moon); background: transparent; cursor: pointer;
  border: 3px solid rgba(255,244,194,.35); border-radius: 30px; padding: 6px 14px; }
.filters button i { font-style: normal; opacity: .7; margin-left: 2px; }
.filters button[aria-pressed="true"] { background: var(--itch); color: var(--night); border-color: var(--night); box-shadow: 0 4px 0 var(--night); }
.home-text { margin-top: 54px; }
.home-text h2 { font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--itch); text-shadow: var(--outline); margin: 30px 0 10px; }
.home-text p, .home-text li { font-size: 17px; line-height: 1.65; max-width: none; }
.home-text .facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.facts li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 3px solid rgba(255,244,194,.25); border-radius: 18px; background: rgba(255,244,194,.05); font-size: 15.5px; line-height: 1.5; }
.facts .emoji { font-size: 30px; line-height: 1.2; }
.facts b { font-family: var(--display); font-weight: 400; font-size: 21px; color: var(--itch); }
.home-footer { display: flex; gap: 22px; justify-content: center; margin-top: 44px; }
.home-footer a { color: var(--moon); font-weight: 700; opacity: .8; }

/* Home grid: 3 across on desktop, 2 on tablets, compact rows on phones */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-card { grid-template-columns: 150px 1fr; }
  .featured-card .card-art { width: 150px; height: 140px; }
  .featured-card .big { grid-column: 2; grid-row: auto; justify-self: start; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; gap: 18px; }
  .cards .card { display: grid; grid-template-columns: 84px 1fr; column-gap: 14px; row-gap: 6px; text-align: left; align-items: center; padding: 16px 14px 18px; }
  .cards .card > * { grid-column: 2; }
  .cards .card .card-art { grid-column: 1; grid-row: 1 / span 2; width: 84px; height: 80px; margin: 0; }
  .cards .card h2 { align-items: flex-start; font-size: 28px; }
  .cards .card p { -webkit-line-clamp: 2; font-size: 14.5px; }
  .cards .card .tags { display: none; }                         /* keep phone rows compact */
  .cards .card .big { grid-column: 1 / span 2; justify-self: stretch; text-align: center; }
  .featured-card { grid-template-columns: 1fr; text-align: center; padding: 20px 16px; }
  .featured-card .card-art { grid-row: auto; justify-self: center; width: 130px; height: 120px; }
  .featured-card h3 { align-items: center; }
  .featured-card .tags { justify-content: center; }
  .featured-card .big { grid-column: 1; justify-self: center; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -18px; scrollbar-width: none; }
  .filters button { flex: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .bubble { margin-bottom: 44px; font-size: 14px; max-width: 160px; }
  .menu-grid { gap: 10px; }
  .menu-grid .ghost { font-size: 16px; padding: 10px 6px; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .page .day { font-size: 26px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pest { width: 150px; }
  .pest img { width: 90px; height: 90px; }
  #hud { padding-left: 10px; padding-right: 10px; }
  #score { font-size: 22px; }
  .chip { font-size: 13px; padding: 1px 9px; }
  #bumps { gap: 5px; }
  .bump { width: 12px; height: 12px; border-width: 2px; }
  #wake { width: 46px; }
  #sib { font-size: 20px; }
  .round { width: 40px; height: 40px; }
}
@media (max-width: 400px) {
  .home-hero .subtitle { font-size: 15px; padding: 2px 12px 3px; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .mascot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reward { animation: none; }
  .mascot svg { animation: none; }
  .star.on { animation: none; transform: scale(1); }
  .badge { animation: none; }
  .card { transition: none; }
}

/* Modak's digits fill in under the thick outline, so scores use extra-bold Grandstander */
#score, #resScore, .stats b { font-family: var(--body); font-weight: 900; letter-spacing: .02em; }

/* ---------- Home: live clock, your nights, continue, search, favourites ---------- */
.clockline { margin: -4px 0 0; font-weight: 800; font-size: 15px; color: var(--itch); }
.home-main .me { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: -14px 0 36px; }
.neend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: none; font-size: 15.5px; font-weight: 700; text-align: center; }
.neend b { color: var(--itch); }
.neend .tag { font-family: var(--comic); letter-spacing: .06em; font-size: 15px; color: var(--night); background: var(--itch); border: 2px solid var(--night); border-radius: 8px; padding: 0 8px; transform: rotate(-3deg); }
.continue { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cont { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; text-decoration: none; color: var(--moon); font-weight: 800; font-size: 15px;
  background: radial-gradient(circle at 20% 30%, var(--glow), var(--night) 90%); border: 3px solid var(--itch); border-radius: 18px; box-shadow: 0 5px 0 var(--night); transition: transform .15s; }
.cont:hover, .cont:focus-visible { transform: translateY(-3px); }
.cont img { border-radius: 10px; }
.cont span { display: flex; flex-direction: column; line-height: 1.2; }
.cont small { font-size: 11.5px; color: var(--itch); }
.toolbar { display: flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
#search { flex: 1; min-width: 200px; font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--night); background: var(--moon);
  border: 3px solid var(--night); border-radius: 16px; padding: 10px 16px; box-shadow: 0 4px 0 var(--night); }
#search:focus { outline: 4px dashed var(--coil); outline-offset: 3px; }
.toolbar .ghost { white-space: nowrap; }
.nothing { text-align: center; margin: 10px auto 24px; font-weight: 800; }
.fav { position: absolute; top: 10px; left: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); font-size: 19px; line-height: 1; cursor: pointer; }
.fav:hover { background: rgba(0,0,0,.55); }
.fav.pop { animation: pop .35s cubic-bezier(.3, 1.8, .5, 1); }
.fsBtn svg { display: block; margin: auto; }
@media (max-width: 640px) {
  .cards .card .fav { top: 10px; left: auto; right: 10px; width: 34px; height: 34px; font-size: 17px; }
  .cont { padding: 6px 12px 6px 6px; font-size: 14px; }
  .cont img { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .fav.pop { animation: none; }
}

/* ---------- Home: night sky over the hero, the mosquito, trophy cabinet ---------- */
html.home, html.home body { overflow-x: clip; }                 /* the full-width sky must not add a sideways scroll */
.home-hero { position: relative; padding-bottom: 130px; margin-bottom: 18px; }
.home-hero > :not(.sky):not(.mozzie) { position: relative; z-index: 1; }
.sky { position: absolute; z-index: 0; top: -60px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,140,90,.16), transparent 60%), linear-gradient(#0b0a26, rgba(11,10,38,0) 75%); }
.sky .stars { position: absolute; inset: 0 0 90px; animation: twinkle 3.5s ease-in-out infinite alternate;
  background: radial-gradient(1.6px 1.6px at 30px 40px, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 140px 90px, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 220px 20px, #fff 50%, transparent 52%), radial-gradient(1px 1px at 90px 150px, #fff 50%, transparent 52%) 0 0 / 260px 190px; }
.sky .stars.two { background-size: 340px 230px; background-position: 120px 60px; animation-delay: -1.7s; opacity: .7; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.sky .moon { position: absolute; top: 70px; right: max(6vw, 24px); width: 64px; height: 64px; border-radius: 50%;
  box-shadow: inset -15px 5px 0 0 #FFF3C4, 0 0 50px rgba(255,243,196,.25); transform: rotate(-20deg); }
.sky .kite { position: absolute; top: 130px; left: -60px; font-size: 30px; animation: kite 38s linear infinite; }
@keyframes kite { 0% { transform: translate(0, 0) rotate(-10deg); } 25% { transform: translate(28vw, -40px) rotate(8deg); } 50% { transform: translate(55vw, 10px) rotate(-6deg); }
  75% { transform: translate(80vw, -30px) rotate(10deg); } 100% { transform: translate(110vw, 0) rotate(-10deg); } }
.skyline { position: absolute; left: 0; bottom: 0; width: 100%; height: 150px; }
.skyline .win { fill: rgba(255,217,138,.1); transition: fill .6s; }
.skyline .win.on { fill: #FFD98A; }
.mozzie { position: absolute; z-index: 2; top: 40%; left: 10%; font-size: 22px; background: none; border: 0; padding: 8px; cursor: crosshair; animation: buzz 9s ease-in-out infinite; }
.mozzie.splat { animation: none; cursor: default; transform: scale(1.6); filter: grayscale(1); }
@keyframes buzz { 0% { transform: translate(0, 0); } 15% { transform: translate(18vw, -60px) rotate(12deg); } 30% { transform: translate(40vw, 20px) rotate(-8deg); }
  45% { transform: translate(62vw, -90px); } 60% { transform: translate(70vw, 40px) rotate(10deg); } 75% { transform: translate(35vw, -20px); } 90% { transform: translate(8vw, 50px) rotate(-12deg); } 100% { transform: translate(0, 0); } }

.trophies { max-width: 760px; margin: -10px auto 40px; border: 3px solid rgba(255,244,194,.3); border-radius: 22px; background: rgba(255,244,194,.05); }
.trophies[open] { border-color: var(--itch); }
.trophies summary { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; padding: 12px 18px; cursor: pointer; list-style: none; font-weight: 800; }
.trophies summary::-webkit-details-marker { display: none; }
.trophies .rank { font-size: 16px; }
.trophies .rank b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--itch); text-shadow: var(--outline); }
.trophies .open-label { font-size: 15px; color: var(--night); background: var(--itch); border: 2px solid var(--night); border-radius: 12px; padding: 3px 12px; box-shadow: 0 3px 0 var(--night); }
.trophies[open] .open-label { background: var(--coil); }
.trophy-body { padding: 0 18px 18px; }
.rankbar { height: 14px; border: 3px solid var(--night); background: var(--moon); border-radius: 10px; overflow: hidden; }
.rankbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coil), var(--itch)); transition: width .8s; }
.rank-next { font-size: 14px; font-weight: 700; margin: 6px 0 14px; max-width: none; opacity: .85; }
.trophy-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trophy-grid li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px; border-radius: 16px;
  background: radial-gradient(circle at 50% 20%, #3a2f9a, var(--night) 80%); border: 3px solid var(--itch); box-shadow: 0 4px 0 var(--night); }
.trophy-grid .ic { font-size: 30px; line-height: 1.2; }
.trophy-grid b { font-size: 14px; color: var(--itch); }
.trophy-grid small { font-size: 12px; line-height: 1.3; opacity: .85; }
.trophy-grid li.locked { background: rgba(255,244,194,.04); border-color: rgba(255,244,194,.2); box-shadow: none; }
.trophy-grid li.locked .ic { filter: grayscale(1); opacity: .35; }
.trophy-grid li.locked b { color: var(--moon); opacity: .6; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 92vw; text-align: center;
  font-weight: 900; color: var(--night); background: var(--itch); border: 3px solid var(--night); border-radius: 16px; padding: 10px 18px; box-shadow: 0 6px 0 var(--night);
  animation: pop .45s cubic-bezier(.3, 1.8, .5, 1); }
@media (max-width: 640px) {
  .home-hero { padding-bottom: 110px; }
  .skyline { height: 120px; }
  .sky .moon { top: 54px; width: 46px; height: 46px; box-shadow: inset -11px 4px 0 0 #FFF3C4, 0 0 36px rgba(255,243,196,.25); }
  .cards .card h2 { padding-right: 34px; }                      /* room for the heart */
  .trophies summary { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .stars, .sky .kite, .mozzie, .toast { animation: none; }
  .sky .kite { display: none; }
}

/* ---------- Home: themed rows that scroll sideways (browsing "All"); filters and search use the grid ---------- */
.cards[hidden], .shelves[hidden] { display: none; }
.shelves { display: flex; flex-direction: column; gap: 30px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.shelf-title { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.2vw, 30px); color: var(--itch); text-shadow: var(--outline); margin: 0; }
.shelf-title small { font-family: var(--body); font-weight: 800; font-size: 13px; color: var(--moon); text-shadow: none; opacity: .7; margin-left: 4px; }
.shelf-head p { flex: 1; min-width: 180px; font-size: 14.5px; font-weight: 700; opacity: .75; }
.shelf-arrows { display: flex; gap: 8px; margin-left: auto; align-self: center; }
.shelf-arrows .ghost { min-height: 38px; padding: 4px 14px; font-size: 15px; }
.shelf-arrows .ghost:disabled { opacity: .3; background: var(--moon); cursor: default; }
.shelf-row { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 18px 8px 26px; margin: 0 -8px; }
.shelf-row > .card { flex: 0 0 300px; scroll-snap-align: start; }
@media (hover: none) { .shelf-arrows { display: none; } }
@media (max-width: 640px) {
  .shelves { gap: 22px; }
  .shelf-row { gap: 14px; padding: 16px 18px 24px; margin: 0 -18px; scroll-padding: 0 18px; }
  .shelf-row > .card { flex-basis: 74vw; max-width: 290px; padding: 18px 14px 20px; }
  .shelf-row .card .tags { display: none; }
  .shelf-row .card h2 { font-size: 26px; }
  .shelf-row .card .card-art { width: 84px; height: 78px; }
}

/* ---------- Scrollbars: a yellow pill on a night track instead of the default grey ---------- */
/* Chrome, Edge, Safari: full styling. (Setting scrollbar-color/width would switch Chrome back to plain bars, so those are Firefox-only below.) */
html.doc::-webkit-scrollbar { width: 14px; }
html.doc::-webkit-scrollbar-track { background: #0f0c2e; border-left: 2px solid rgba(255,244,194,.08); }
html.doc::-webkit-scrollbar-thumb { background: linear-gradient(var(--itch), #FFB627); border: 3px solid #0f0c2e; border-radius: 10px; min-height: 60px; }
html.doc::-webkit-scrollbar-thumb:hover { background: linear-gradient(#FFF07A, var(--itch)); }
.shelf-row::-webkit-scrollbar { height: 10px; }
.shelf-row::-webkit-scrollbar-track { background: rgba(255,244,194,.08); border-radius: 10px; margin: 0 8px; }
.shelf-row::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--coil), var(--itch)); border: 2px solid var(--night); border-radius: 10px; }
.shelf-row::-webkit-scrollbar-thumb:hover { background: var(--itch); }
@supports not selector(::-webkit-scrollbar) {
  html.doc { scrollbar-color: var(--itch) #0f0c2e; }
  .shelf-row { scrollbar-color: var(--itch) rgba(255,244,194,.08); scrollbar-width: thin; }
}
@media (max-width: 640px) {
  .shelf-row::-webkit-scrollbar { height: 0; }                  /* phones: swipe, the peeking card says "more this way" */
}

/* ---------- Shared across every game: the way home, and touch behaviour ---------- */
.homeBtn { display: grid; place-items: center; text-decoration: none; }
.homeLink { color: var(--moon); font-weight: 800; font-size: 15px; opacity: .8; margin-top: 4px; }
.homeLink:hover { opacity: 1; }
html:not(.doc), html:not(.doc) body { overscroll-behavior: none; -webkit-touch-callout: none; }   /* no pull-to-refresh or long-press callouts mid-game */
button, a, .big, .ghost { touch-action: manipulation; }                                           /* fast taps never turn into a double-tap zoom */
