/* Kroko portal. Layout: sticky bar, mascot greeting, featured hero, mood carousels, category grids.
   One committed look: a deep night-swamp backdrop so the game covers glow. */
:root {
  --bg: #05061c;
  --bg-2: #0a0c2e;
  --surface: #11143c;
  --surface-2: #1d2260;
  --line: rgba(255, 255, 255, .1);
  --text: #f6f8ff;
  --muted: #aab6e8;
  --green: #6dff2e;
  --green-deep: #2fb300;
  --yellow: #ffd23f;
  --yellow-deep: #e0a800;
  --pink: #ff2e93;
  --cyan: #22e3ff;
  --ink: #101a3a;
  --radius: 20px;
  --font-display: 'Russo One', 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: min(1240px, 100%);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Backdrop: soft glows + drifting bubbles */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(92, 225, 230, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 20%, rgba(61, 220, 132, .16), transparent 60%),
    radial-gradient(800px 600px at 60% 110%, rgba(255, 93, 143, .14), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

/* Top bar */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(5, 6, 28, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: .3px; }
.logo img { border-radius: 14px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover img { transform: rotate(-10deg) scale(1.1); }
.logo span { background: linear-gradient(180deg, #7dffb0, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin-left: 8px; padding: 0 16px; height: 46px; border-radius: 999px; background: var(--surface); border: 2px solid transparent; color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--green); color: var(--text); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; white-space: nowrap; transition: transform .12s, filter .15s; }
.btn:active { transform: scale(.96); }
.btn-surprise { background: linear-gradient(180deg, #ff8fb1, var(--pink)); color: #3a0a1c; box-shadow: 0 4px 0 #c2305f; }
.btn-surprise:hover .dice { animation: roll .5s ease; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
@keyframes roll { 50% { transform: rotate(180deg) scale(1.3); } 100% { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .logo span { display: none; }
  .btn-surprise .lbl { display: none; }
  .btn-surprise { padding: 0 14px; font-size: 22px; }
  .btn-ghost { padding: 0 14px; font-size: 15px; }
  .search { margin-left: 0; }
}

/* Greeting: one slim line (hello, promises, change of universe), so the featured game and the shelves come first */
.hello { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 16px 0 6px; padding: 10px 12px 10px 22px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.hello[hidden] { display: none; }
.hello-text { flex: 1 1 300px; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; }
.hello p { margin: 0; color: var(--muted); font-size: 15px; }
.parents-mascot { border-radius: 50%; object-fit: cover; }
.brand img, .logo img { border-radius: 12px; }
.hello .mascot { flex: none; width: clamp(96px, 16vw, 170px); height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.hello h1 { font-size: clamp(20px, 2.2vw, 26px); }
.hello h1 em { font-style: normal; color: #ffd23f; }
.promises { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.promises li { font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: 999px; background: rgba(61, 220, 132, .14); color: #8ff5bd; border: 1px solid rgba(61, 220, 132, .3); }
@media (max-width: 1100px) { .promises { display: none; } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* Hero */
.hero:empty { display: none; }
.hero { margin: 14px 0 8px; }
.hero-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: stretch;
  min-height: 340px; border-radius: 28px; overflow: hidden; text-decoration: none; isolation: isolate;
  background: var(--hero, var(--surface)); box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.hero-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #0b1030 0%, #0b1030 34%, rgba(11, 16, 48, .75) 42%, transparent 58%); }
.hero-text { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; padding: clamp(20px, 4vw, 44px); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--yellow); }
.hero-text h2 { font-size: clamp(30px, 5vw, 58px); text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.hero-text p { margin: 0; font-size: clamp(16px, 2vw, 21px); color: #e6ebff; max-width: 28ch; }
.play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 14px 30px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); color: #3a2a00;
  background: linear-gradient(180deg, #ffe680, var(--yellow)); box-shadow: 0 6px 0 var(--yellow-deep), 0 14px 30px rgba(255, 210, 63, .35);
  animation: pulse 2.2s ease-in-out infinite;
}
.hero-card:hover .play { animation: none; transform: translateY(-2px) scale(1.04); }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 66%; z-index: 0; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: transform .6s ease; }
.hero-card:hover .hero-art img { transform: scale(1.05); }
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.hero-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--yellow); width: 30px; border-radius: 999px; }
@keyframes pulse { 50% { transform: scale(1.05); } }
/* Phones: the cover fills the card and the title sits on it, so the first shelf shows on the first screen. */
@media (max-width: 720px) {
  .hero-card { display: block; min-height: 0; aspect-ratio: 16 / 10; border-radius: 22px; }
  .hero-card::after { background: linear-gradient(0deg, rgba(8, 10, 34, .96) 0%, rgba(8, 10, 34, .7) 30%, transparent 58%); }
  .hero-art { inset: 0; width: 100%; height: 100%; }
  .hero-text { position: absolute; inset: auto 0 0 0; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 12px; padding: 14px 16px 16px; }
  .hero-text .eyebrow { flex-basis: 100%; font-size: 11px; }
  .hero-text h2 { flex: 1 1 0; min-width: 0; font-size: clamp(22px, 6.4vw, 28px); }
  .hero-text p { display: none; }
  .hero-text .play { flex: none; margin: 0; padding: 10px 18px; font-size: 18px; }
  .hero-dots { margin-top: 8px; }
}

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.chips > :last-child { margin-right: 40px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; cursor: pointer; background: var(--surface); border: 2px solid transparent; font-family: var(--font-display); font-weight: 600; white-space: nowrap; transition: background .15s, transform .12s; }
.chip:hover { background: var(--surface-2); transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--green); color: #06301a; }
.chip small { opacity: .7; font-weight: 600; margin-left: 4px; }

/* Rows */
.row { margin-top: 26px; }
.row-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.row-head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.row-head small { color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 18px; }
/* Strips: one line of same-size tiles that scrolls sideways (every shelf, "Continue playing") */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; padding: 6px 2px 16px; margin: -6px -2px 0; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
.strip > * { scroll-snap-align: start; }
.strip.two-rows { grid-template-rows: auto auto; }
/* A shelf with one or two games: wide cards instead of a half-empty strip */
.strip.few { grid-auto-flow: row; grid-template-columns: repeat(var(--n), minmax(0, 520px)); overflow: visible; }
.strip.few .tile { flex-direction: row; }
.strip.few .tile-art { flex: 0 0 52%; aspect-ratio: 16 / 10; }
.strip.few .tile-body { justify-content: center; padding: 14px 18px; }
.strip.few .tile-body h3 { font-size: 22px; white-space: normal; }
.strip.few .tile-body p { font-size: 15px; -webkit-line-clamp: 3; min-height: 0; }
/* Shelf head: title, count, "See all" */
.row-head { flex-wrap: wrap; }
.see-all { margin-left: auto; flex: none; align-self: center; padding: 7px 16px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-family: var(--font-display); font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.see-all:hover { background: var(--surface-2); }
.see-all span { font-size: 1.2em; line-height: 0; }
.see-all.back { margin-left: 0; order: -1; }
.shelf-title { margin-bottom: -10px; }
.shelf-title .row-head h2 { font-size: clamp(24px, 3vw, 34px); }
/* The brain shelf: first, framed, two rows, with its kinds (board games, mazes, puzzles) as pills */
.shelf-brain { padding: 18px 18px 4px; border-radius: 28px; background: linear-gradient(135deg, rgba(124, 77, 255, .26), rgba(34, 227, 255, .08) 70%); box-shadow: inset 0 0 0 1px rgba(170, 140, 255, .5), 0 0 44px rgba(124, 77, 255, .2); }
.shelf-brain .shelf-head { margin-bottom: 4px; }
.shelf-brain .shelf-head h2 { font-size: clamp(24px, 3vw, 34px); }
.shelf-tag { margin: 0 0 10px; color: #e3ddff; font-size: 15px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pill { padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); color: var(--text); font-weight: 800; font-size: 14px; transition: background .15s; }
.pill:hover { background: rgba(255, 255, 255, .2); }
.pill small { opacity: .7; margin-left: 2px; }
.chip-brain { box-shadow: inset 0 0 0 2px rgba(170, 140, 255, .8); }
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* Strips run to the screen edges, two tiles and a peek of the next one */
  .strip { grid-auto-columns: calc((100% - 22px) * .45); gap: 11px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .shelf-brain { margin-inline: -8px; padding: 14px 8px 2px; border-radius: 22px; }
  .shelf-brain .strip { margin-inline: -8px; padding-inline: 8px; scroll-padding-inline: 8px; }
  .shelf-brain .shelf-head, .shelf-brain .shelf-tag, .shelf-brain .pills { padding-inline: 6px; }
  .strip .tile-body p, .strip .tile-meta .cta { display: none; }
  .strip.few { grid-template-columns: 1fr; margin-inline: 0; padding-inline: 0; }
  .strip.few .tile { flex-direction: column; }
  .strip.few .tile-art { flex: none; }
  .strip.few .tile-body p { display: -webkit-box; }
  .see-all { padding: 6px 12px; font-size: 14px; }
  .row-head { flex-wrap: nowrap; }
  .shelf-head h2 { min-width: 0; font-size: 21px; }
  .shelf-head small { display: none; }
  .shelf-brain .shelf-head h2 { font-size: 22px; }
  .shelf-tag { font-size: 13.5px; line-height: 1.35; }
  .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -6px; padding-inline: 6px; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; }
}

/* Tile */
.tile {
  position: relative; display: flex; flex-direction: column; min-width: 0; text-decoration: none;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 24px rgba(0, 0, 0, .25);
  transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), box-shadow .18s;
  animation: rise .45s both; animation-delay: calc(var(--i, 0) * 40ms);
}
.tile:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 12px 0 rgba(0, 0, 0, .25), 0 22px 36px rgba(0, 0, 0, .4), 0 0 0 3px var(--tint, var(--green)); }
.tile-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint, var(--surface-2)); }
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-art img { transform: scale(1.08); }
.tile-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 12, 34, .35); opacity: 0; transition: opacity .15s; }
.tile-play span { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--yellow); color: #3a2a00; font-size: 26px; padding-left: 4px; box-shadow: 0 5px 0 var(--yellow-deep); transform: scale(.6); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.tile:hover .tile-play { opacity: 1; }
.tile:hover .tile-play span { transform: scale(1); }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 12px; min-width: 0; }
.tile-body h3 { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tile-meta span { white-space: nowrap; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.tile-meta .rec { color: var(--yellow); }
.ribbon { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; background: var(--pink); color: #fff; box-shadow: 0 3px 0 #c2305f; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 520px) {
  .tile-body { padding: 8px 10px 10px; }
  .tile-body h3 { font-size: 16px; }
  .tile-body p { font-size: 13px; }
}
.empty { color: var(--muted); padding: 30px 0; font-size: 18px; }

/* Records strip */
.records { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.record { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--surface); text-decoration: none; }
.record img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.record b { color: var(--yellow); font-family: var(--font-display); font-size: 18px; }
.record span { font-size: 14px; color: var(--muted); }

/* Footer */
.foot { margin-top: 48px; padding-block: 26px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; text-align: center; }
.foot p { margin: 4px 0; }

/* Game view + parents view: full-screen layers routed on the hash */
#view:empty { display: none; }
.layer { position: fixed; inset: 0; z-index: 50; overflow-y: auto; background: var(--bg); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding-block: 8px; background: rgba(13, 19, 48, .92); backdrop-filter: blur(10px); }
.bar h1 { flex: 1; min-width: 0; font-size: clamp(18px, 2.6vw, 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .best { color: var(--yellow); font-family: var(--font-display); white-space: nowrap; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); cursor: pointer; font-size: 20px; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.stage { position: relative; background: #070a1c; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); height: min(74vh, 760px); min-height: 440px; }
.stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.stage:fullscreen { border-radius: 0; height: 100vh; }
.info { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
.card h2 { font-size: 21px; margin-bottom: 8px; }
.card p { margin: 0 0 10px; color: #dfe5ff; }
.card .lead { font-family: var(--font-display); font-size: 21px; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }
.top10 { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.top10 li { counter-increment: rank; display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.top10 li::before { content: counter(rank); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); font-family: var(--font-display); font-size: 14px; }
.top10 li:first-child::before { background: var(--yellow); color: #3a2a00; }
.top10 b { font-family: var(--font-display); font-size: 18px; }
.top10 time { margin-left: auto; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .layer.game .wrap.play-wrap { padding-left: 0; padding-right: 0; }
  .stage { border-radius: 0; height: calc(100svh - 62px - env(safe-area-inset-top, 0px)); min-height: 380px; }
  .info { grid-template-columns: 1fr; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .layer.game .row { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Parents */
.parents { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 20px 40px; }
.parents img { width: 100%; height: auto; }
.parents h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.parents h3 { font-size: 20px; margin: 18px 0 6px; color: var(--green); }
.parents p { margin: 0 0 8px; max-width: 65ch; color: #dfe5ff; }
@media (max-width: 720px) { .parents { grid-template-columns: 1fr; } .parents img { width: 150px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Kroko Arcade: night, neon, energy ---------- */
:root { --neon: 0 0 0 1px rgba(34, 227, 255, .35), 0 0 22px rgba(34, 227, 255, .22); --orange: #ff7a1a; }
h1, h2, h3 { font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.tile h3, .hero-text h2, .hello h1 { font-style: italic; }
.tile h3 { text-transform: none; letter-spacing: .01em; }
.sky { background:
  radial-gradient(900px 520px at 88% -12%, rgba(34, 227, 255, .2), transparent 60%),
  radial-gradient(760px 520px at -5% 18%, rgba(109, 255, 46, .13), transparent 60%),
  radial-gradient(820px 600px at 60% 112%, rgba(255, 46, 147, .16), transparent 60%),
  linear-gradient(180deg, var(--bg-2), var(--bg)); }
.sky::after { content: ''; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(34, 227, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 227, 255, .06) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 95%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 95%); }
.top { border-bottom: 1px solid rgba(34, 227, 255, .25); box-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
/* Header logo: the realistic Kroko head + the name set in type (crisp at any size, no cartoon art). */
.logo .logo-head { width: 44px; height: 44px; flex: none; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px var(--green), 0 0 18px rgba(109, 255, 46, .45); }
.logo:hover .logo-head { transform: rotate(-8deg) scale(1.08); }
.logo-word { font-family: 'Russo One', var(--font-display); font-weight: 400; font-style: italic; font-size: 30px; line-height: 1.15; letter-spacing: .03em; text-transform: uppercase; padding-right: .12em; white-space: nowrap;
  background: linear-gradient(180deg, #f1ffd9 0%, #a8ff6a 42%, #45d40a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #0b3d00) drop-shadow(0 0 12px rgba(109, 255, 46, .42)); }
.hello { background: rgba(10, 12, 46, .85); box-shadow: inset 0 0 0 1px rgba(34, 227, 255, .25); }
.hello h1 em { color: var(--green); text-shadow: 0 0 18px rgba(109, 255, 46, .55); }
.tile { border: 1px solid rgba(34, 227, 255, .16); transition: transform .18s, box-shadow .18s, border-color .18s; }
.tile:hover { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 28px rgba(34, 227, 255, .4), 0 18px 40px rgba(0, 0, 0, .5); }
.row-head h2 { text-shadow: 0 0 16px rgba(34, 227, 255, .35); }
.chip[aria-pressed="true"] { background: var(--green); color: #05210a; box-shadow: 0 0 20px rgba(109, 255, 46, .5); }
.hero-card { box-shadow: 0 0 0 1px rgba(255, 46, 147, .35), 0 0 30px rgba(255, 46, 147, .18), 0 24px 60px rgba(0, 0, 0, .5); }
.hero-text .play, .daily-cta { background: linear-gradient(180deg, #9dff5c, var(--green)); color: #05210a; box-shadow: 0 0 24px rgba(109, 255, 46, .55), 0 6px 0 var(--green-deep); font-family: var(--font-display); text-transform: uppercase; font-style: italic; }
.eyebrow { color: var(--orange); letter-spacing: .14em; }

/* Profile chip */
.me { display: flex; align-items: center; gap: 8px; flex: none; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid rgba(109, 255, 46, .4); text-decoration: none; min-height: 46px; }
.me:hover { box-shadow: 0 0 18px rgba(109, 255, 46, .4); }
.me-lvl { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, #9dff5c, var(--green)); color: #05210a; font-family: var(--font-display); font-size: 17px; }
.me-info { display: grid; gap: 4px; font-size: 12px; line-height: 1; white-space: nowrap; }
.me-bar, .xp-bar, .tile-prog { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.me-bar { width: 86px; }
.me-bar i, .xp-bar i, .tile-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.me-streak { font-size: 14px; color: var(--orange); font-weight: 800; }
.tile-prog { margin: 8px 0 2px; height: 5px; }

/* Daily challenge + streak */
.daily { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin: 22px 0 6px; }
.daily-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 22px; text-decoration: none; background: linear-gradient(100deg, #1a0f3f, #101a4a); border: 1px solid rgba(255, 122, 26, .55); box-shadow: 0 0 26px rgba(255, 122, 26, .22); overflow: hidden; }
.daily-card img { width: 150px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; flex: none; }
.daily-text { flex: 1; min-width: 0; }
.daily-text h2 { font-size: clamp(18px, 2.4vw, 26px); font-style: italic; margin: 2px 0; }
.daily-text p { margin: 0; color: var(--muted); font-size: 15px; }
.daily-text b { color: var(--green); }
.daily-cta { flex: none; padding: 12px 20px; border-radius: 14px; font-size: 17px; }
.daily.done .daily-card { border-color: rgba(109, 255, 46, .5); box-shadow: none; }
.daily.done .daily-cta { background: transparent; color: var(--green); box-shadow: none; border: 1px solid var(--green); }
.streak { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 12px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); min-width: 170px; }
.streak b { font-family: var(--font-display); font-size: 30px; color: var(--orange); text-shadow: 0 0 16px rgba(255, 122, 26, .5); }
.streak span { font-size: 13px; color: var(--muted); }
.streak-dots { display: flex; gap: 5px; margin-top: 6px; }
.streak-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.streak-dots i.on { background: var(--orange); box-shadow: 0 0 10px rgba(255, 122, 26, .7); }

/* Toast */
.toast { position: fixed; left: 50%; top: calc(74px + env(safe-area-inset-top, 0px)); z-index: 60; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; padding: 12px 22px; border-radius: 999px; background: #0b1238; border: 1px solid var(--green); box-shadow: 0 0 30px rgba(109, 255, 46, .45); font-weight: 800; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .25s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast b { color: var(--green); }

/* Profile page */
.profile { display: grid; gap: 16px; padding-top: 18px; }
.profile-head { display: flex; gap: 20px; align-items: center; }
.profile-head img { border-radius: 24px; flex: none; width: clamp(96px, 18vw, 150px); height: auto; }
.profile-head h2 { font-size: clamp(24px, 4vw, 40px); font-style: italic; margin: 4px 0 10px; }
.xp-bar { height: 14px; max-width: 520px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stats span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid rgba(255, 210, 63, .5); font-size: 15px; }
.badge i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 210, 63, .18); font-style: normal; font-size: 19px; }
.prog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.prog-list a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--surface-2); text-decoration: none; }
.prog-list img { width: 84px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; flex: none; }
.prog-list a > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.prog-list small { color: var(--muted); }
.prog-list em { font-style: normal; color: var(--yellow); font-weight: 800; }

@media (max-width: 720px) {
  .logo { gap: 6px; }
  .logo .logo-head { width: 34px; height: 34px; }
  .logo-word { font-size: 17px; letter-spacing: 0; }
  body[data-u="kids"] .logo-word { font-size: 20px; }
  .search { min-width: 46px; padding: 0 13px; }
  .me-info { display: none; }
  .me { padding-right: 8px; }
  .daily { grid-template-columns: 1fr; }
  .daily-card { flex-wrap: wrap; }
  .daily-card img { width: 96px; }
  .daily-cta { width: 100%; text-align: center; }
  .streak { grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; gap: 10px; padding: 10px 16px; }
  .streak-dots { margin: 0; justify-self: end; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 370px) { .logo-word { display: none; } }
@media (max-width: 720px) {
  .hello { gap: 8px; margin-top: 12px; padding: 10px; border-radius: 18px; }
  .hello-text { flex-basis: 100%; padding-left: 6px; }
  .hello h1 { font-size: 19px; }
  .hello p { display: none; }
  .search input::placeholder { color: transparent; }
}


/* ---------- Universe gate ---------- */
.gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px 16px; overflow: auto; background: radial-gradient(900px 600px at 20% 0%, rgba(255, 210, 63, .18), transparent 60%), radial-gradient(900px 600px at 85% 100%, rgba(34, 227, 255, .2), transparent 60%), #05061c; }
.gate-in { width: min(1100px, 100%); text-align: center; }
.gate h1 { font-size: clamp(28px, 5vw, 56px); font-style: italic; }
.gate h1 em { font-style: inherit; color: var(--green); text-shadow: 0 0 18px rgba(109, 255, 46, .55); }
.gate p { color: var(--muted); margin: 8px 0 22px; }
/* Two cards of the same size side by side, on phones too. Each picture keeps Kroko whole (cap to shoes) and
   centred: the hero art has him at about 82% of its width, so a 3:4 window pinned to the right edge frames him
   in the middle. No transform on the card itself, so the two frames always stay aligned. */
.doors { --door-w: max(140px, min(440px, calc((100vw - 52px) / 2), calc((100vh - 350px) * .75))); display: grid; grid-template-columns: repeat(2, var(--door-w)); justify-content: center; gap: 20px; }
@supports (height: 100svh) { .doors { --door-w: max(140px, min(440px, calc((100vw - 52px) / 2), calc((100svh - 350px) * .75))); } }
.door { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; border-radius: 28px; overflow: hidden; cursor: pointer; background: #0b0e33; text-align: left; transition: box-shadow .2s; }
.door-art { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #000; }
.door-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; transform-origin: 70% 50%; transition: transform .5s; }
/* Arcade: the running pose reaches further left (back shoe), so its window starts a little earlier. */
.door-arcade .door-art img { object-position: 93% 50%; }
.door:hover .door-art img, .door:focus-visible .door-art img { transform: scale(1.04); }
.door:focus-visible { outline: none; }
.door-kids { box-shadow: 0 0 0 3px #ffd23f, 0 0 40px rgba(255, 210, 63, .45); }
.door-arcade { box-shadow: 0 0 0 3px var(--cyan), 0 0 40px rgba(34, 227, 255, .45); }
.door-kids:hover, .door-kids:focus-visible { box-shadow: 0 0 0 4px #ffd23f, 0 0 60px rgba(255, 210, 63, .7); }
.door-arcade:hover, .door-arcade:focus-visible { box-shadow: 0 0 0 4px var(--cyan), 0 0 60px rgba(34, 227, 255, .7); }
.door-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 20px 20px; background: linear-gradient(180deg, #0d1240, #05061c); color: #fff; }
.door-text b { font-family: var(--font-display); font-weight: 400; font-size: clamp(13px, calc(var(--door-w) * .085), 36px); line-height: clamp(22px, calc(var(--door-w) * .11), 46px); white-space: nowrap; text-transform: uppercase; font-style: italic; }
.door-kids .door-text b { font-family: 'Fredoka', 'Baloo 2', system-ui, sans-serif; font-weight: 700; font-style: normal; text-transform: none; color: #ffd23f; font-size: clamp(19px, calc(var(--door-w) * .095), 40px); }
.door-arcade .door-text b { color: var(--green); text-shadow: 0 0 16px rgba(109, 255, 46, .6); }
.door-text small { margin-bottom: 10px; font-size: 15px; color: #dfe6ff; }
.door-text i { margin-top: auto; padding: 10px 20px; border-radius: 999px; font-style: normal; font-weight: 800; color: #05210a; background: linear-gradient(180deg, #9dff5c, var(--green)); }
.door-kids .door-text i { background: linear-gradient(180deg, #ffe680, #ffd23f); color: #3a2a00; }
.btn-world { flex: none; gap: 6px; }
/* "Changer d'univers": in the greeting card (always visible, also on phones) and on the doors page. */
.btn-switch { display: inline-grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 10px; row-gap: 0; margin-top: 14px; height: auto; min-height: 46px; padding: 8px 24px 8px 16px; color: #fff; background: rgba(5, 6, 28, .55); box-shadow: inset 0 0 0 2px var(--cyan), 0 0 22px rgba(34, 227, 255, .35); backdrop-filter: blur(6px); text-shadow: none; }
.btn-switch:hover { background: rgba(5, 6, 28, .75); }
.btn-switch > [aria-hidden] { grid-row: span 2; font-size: 22px; }
.btn-switch small { grid-column: 2; font-family: system-ui, sans-serif; font-size: 12.5px; font-weight: 600; color: #cfe9ff; }
@media (max-width: 720px) { .btn-switch { display: grid; width: 100%; } }
body[data-u="kids"] .btn-switch { box-shadow: inset 0 0 0 2px #ffd23f, 0 6px 18px rgba(0, 0, 0, .3); background: rgba(16, 40, 110, .6); }
.gate-in { position: relative; }
.gate-in:focus { outline: none; }
.gate-close { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer; font-size: 22px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.gate-close:hover, .gate-close:focus-visible { background: rgba(255, 255, 255, .26); }
.door-here { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; color: #05210a; background: linear-gradient(180deg, #9dff5c, var(--green)); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.door-kids .door-here { color: #3a2a00; background: linear-gradient(180deg, #ffe680, #ffd23f); }
.door.is-here.door-kids { box-shadow: 0 0 0 5px #ffd23f, 0 0 60px rgba(255, 210, 63, .7); }
.door.is-here.door-arcade { box-shadow: 0 0 0 5px var(--cyan), 0 0 60px rgba(34, 227, 255, .7); }
@media (max-width: 720px) {
  .doors { gap: 12px; }
  .door { border-radius: 20px; }
  .door-text { padding: 10px 12px 12px; }
  .door-text small { font-size: 12.5px; line-height: 1.3; }
  .door-text i { padding: 7px 14px; font-size: 14px; }
  .door-here { top: 8px; left: 8px; padding: 4px 10px; font-size: 12px; }
  .btn-world .lbl { display: none; }
}

/* ---------- Kroko Kids: soft, round, daylight ---------- */
body[data-u="kids"] { --bg: #1b2a6b; --bg-2: #2a3f9a; --surface: #2c3f96; --surface-2: #3a50b8; --green: #3ddc84; --green-deep: #169c56; --pink: #ff7aa8; --cyan: #7fe7ff; --muted: #d5ddff; --font-display: 'Fredoka', 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif; }
body[data-u="kids"] h1, body[data-u="kids"] h2, body[data-u="kids"] h3 { text-transform: none; font-weight: 700; font-style: normal; letter-spacing: 0; }
body[data-u="kids"] .tile h3, body[data-u="kids"] .hero-text h2, body[data-u="kids"] .hello h1, body[data-u="kids"] .daily-text h2, body[data-u="kids"] .hero-text .play, body[data-u="kids"] .daily-cta { font-style: normal; text-transform: none; }
body[data-u="kids"] .sky { background: radial-gradient(900px 520px at 85% -10%, rgba(255, 210, 63, .28), transparent 60%), radial-gradient(760px 520px at 0% 20%, rgba(61, 220, 132, .22), transparent 60%), radial-gradient(820px 600px at 60% 112%, rgba(255, 122, 168, .22), transparent 60%), linear-gradient(180deg, var(--bg-2), var(--bg)); }
body[data-u="kids"] .sky::after { display: none; }
body[data-u="kids"] .top { background: rgba(27, 42, 107, .9); border-bottom-color: rgba(255, 255, 255, .18); }
body[data-u="kids"] .hello { background: rgba(28, 111, 209, .55); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
body[data-u="kids"] .shelf-brain { background: linear-gradient(135deg, rgba(255, 210, 63, .2), rgba(127, 231, 255, .12) 70%); box-shadow: inset 0 0 0 2px rgba(255, 226, 120, .6), 0 12px 36px rgba(0, 0, 0, .25); }
body[data-u="kids"] .shelf-tag { color: #fff6d6; }
body[data-u="kids"] .chip-brain { box-shadow: inset 0 0 0 2px #ffd23f; }
body[data-u="kids"] .hello h1 em { color: #ffd23f; text-shadow: none; }
body[data-u="kids"] .tile { border-color: rgba(255, 255, 255, .16); border-radius: 26px; }
body[data-u="kids"] .tile:hover { border-color: #ffd23f; box-shadow: 0 0 0 2px #ffd23f, 0 18px 40px rgba(0, 0, 0, .35); }
body[data-u="kids"] .row-head h2 { text-shadow: none; }
body[data-u="kids"] .hero-card { box-shadow: 0 0 0 3px rgba(255, 255, 255, .22), 0 24px 60px rgba(0, 0, 0, .35); }
body[data-u="kids"] .hero-text .play, body[data-u="kids"] .daily-cta { background: linear-gradient(180deg, #ffe680, #ffd23f); color: #3a2a00; box-shadow: 0 6px 0 #e0a800; }
body[data-u="kids"] .chip[aria-pressed="true"] { background: #ffd23f; color: #3a2a00; box-shadow: none; }
body[data-u="kids"] .eyebrow { color: #ffd23f; }
body[data-u="kids"] .logo .logo-head { box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, .3); }
body[data-u="kids"] .logo-word { font-family: 'Fredoka', var(--font-display); font-weight: 700; font-style: normal; text-transform: none; letter-spacing: .01em; background: linear-gradient(180deg, #fffbe0 0%, #ffe680 45%, #ffc21a 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 0 #a86f00) drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.hello .btn-switch { margin-top: 0; }
