/* Gilplay — studio + game pages. Display: Fredoka (the game's UI font). Body: Nunito. */
:root {
  --ink: #0b2236;
  --sea: #0a3d5c;
  --sea-2: #0f5a85;
  --sea-3: #1683bd;
  --cream: #fff8ec;
  --sand: #f5e9d2;
  --sand-2: #ead8b6;
  --wood: #a8642a;
  --lemon: #ffcf3f;
  --lemon-2: #ffe27a;
  --lemon-d: #d99a00;
  --coral: #ff7a59;
  --leaf: #3ea36a;
  --text: #1d2b3a;
  --muted: #5d6e7e;
  --on-dark: #f3f8fb;
  --on-dark-muted: #b5cbd9;
  --line: rgba(11, 34, 54, .1);
  --line-dark: rgba(255, 255, 255, .14);
  --r-lg: 28px;
  --r: 18px;
  --shadow: 0 1px 2px rgba(11, 34, 54, .06), 0 12px 32px -8px rgba(11, 34, 54, .18);
  --shadow-lg: 0 2px 4px rgba(11, 34, 54, .08), 0 30px 60px -20px rgba(11, 34, 54, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--text);
  font: 500 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sea-3); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50; transition: background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
  padding-top: env(safe-area-inset-top);
}
.top .bar { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 52px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); transition: transform .4s var(--spring); }
.brand:hover img { transform: rotate(-3deg) scale(1.05); }
.main { display: flex; align-items: center; gap: 4px; }
.main a {
  font-family: var(--display); font-weight: 500; font-size: 1.02rem; color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; transition: background .2s, color .2s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .25);
}
.main a:hover { background: rgba(255, 255, 255, .16); }
.main a[aria-current="page"] { background: rgba(255, 255, 255, .2); }
.main .ext { color: var(--lemon-2); }
.main .ext b { font-weight: 600; font-size: .85em; }
.top.scrolled, .page-wiki .top, .page-inner .top {
  background: rgba(10, 45, 70, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line-dark), 0 10px 30px -12px rgba(0, 0, 0, .4);
}
.top.scrolled .bar { height: 64px; }
.top.scrolled .brand img { height: 42px; }
.top.hidden { transform: translateY(-100%); }
.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--lemon-d);
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 14px 26px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s;
}
.btn:active { transform: translateY(3px); }
.btn-lemon { background: linear-gradient(180deg, var(--lemon-2), var(--lemon)); color: #4a2f00; box-shadow: 0 5px 0 var(--lemon-d), 0 14px 26px -8px rgba(217, 154, 0, .6); }
.btn-lemon:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--lemon-d), 0 18px 30px -8px rgba(217, 154, 0, .7); }
.btn-lemon:active { box-shadow: 0 2px 0 var(--lemon-d); }
.btn-sea { background: linear-gradient(180deg, #1c93d1, var(--sea-3)); color: #fff; box-shadow: 0 5px 0 #0b5c88, 0 14px 26px -10px rgba(11, 92, 136, .6); }
.btn-sea:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #0b5c88, 0 18px 30px -10px rgba(11, 92, 136, .7); }
.btn-sea:active { box-shadow: 0 2px 0 #0b5c88; }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.btn-glass-dark { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(11, 34, 54, .25); }
.btn-glass-dark:hover { background: rgba(11, 34, 54, .06); transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: .98rem; }
.btn.is-soon { opacity: .92; cursor: default; filter: saturate(.85); }
.btn.is-soon:hover { transform: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 500; font-size: .82rem;
  padding: 5px 12px; border-radius: 999px; background: rgba(11, 34, 54, .08); color: var(--muted); letter-spacing: .01em;
}
.pill-soon { background: rgba(255, 207, 63, .2); color: #8a5d00; }
.pill-soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lemon-d); animation: blink 1.6s infinite; }
.pill-live { background: rgba(62, 163, 106, .15); color: #1f7a4a; }
.hero .pill-soon { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(8px); }
.hero .pill-soon::before { background: var(--lemon); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.hero-bg { position: absolute; inset: -6% 0 0; z-index: -3; will-change: transform; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 2.6s var(--ease) both; }
.hero-studio::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 45%, rgba(255, 245, 220, .28), transparent 70%), linear-gradient(180deg, rgba(10, 40, 70, .35) 0, transparent 22%, transparent 70%, rgba(10, 40, 70, .35));
}
.hero-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(6, 30, 50, .78) 0, rgba(6, 30, 50, .45) 38%, transparent 62%), linear-gradient(0deg, rgba(6, 30, 50, .5), transparent 35%); }
.hero-in { position: relative; text-align: center; padding: 120px 20px 140px; display: flex; flex-direction: column; align-items: center; }
.hero-tag { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 560px; margin: 26px auto 26px; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); font-weight: 700; }
.hero-studio .hero-tag { background: rgba(12, 48, 76, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 22px; border-radius: 18px; text-shadow: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.hero-studio .btn-glass { background: rgba(12, 48, 76, .5); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.hero-studio .btn-glass:hover { background: rgba(12, 48, 76, .65); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.wave { position: absolute; left: 0; width: 100%; height: 70px; display: block; }
.hero-wave, .wiki-head .wave { bottom: -1px; fill: var(--cream); }
.top-wave { top: -1px; fill: var(--cream); }
.flip { transform: scaleY(-1); }

.scroll-cue { position: absolute; bottom: 92px; left: 50%; translate: -50% 0; width: 28px; height: 44px; border-radius: 16px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }

/* stars (studio) and sparkles (sea) */
.hero-stars, .hero-sea { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-sea { top: 58%; }
.star, .spark { position: absolute; left: var(--x); top: var(--y); }
.star { width: 14px; height: 14px; scale: var(--s); background: #fff8d6; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: twinkle 3.2s var(--d) infinite; filter: drop-shadow(0 0 6px #ffe9a0); }
.hero-stars.dim .star { opacity: .5; }
.spark { width: 16px; height: 16px; background: #fff; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); animation: twinkle 2.4s var(--d) infinite; }

.gulls { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gull { position: absolute; left: -10%; top: calc(12% + var(--d) * 9%); width: calc(56px - var(--d) * 10px); animation: glide calc(26s + var(--d) * 7s) linear calc(var(--d) * -9s) infinite; }
.gull img { position: absolute; width: 100%; }
.gull img:last-child { animation: flap .5s steps(1) infinite; }
.gull img:first-child { animation: flap .5s steps(1) .25s infinite; }

/* ---------- Animated GILPLAY logo (mirrors the game's StudioIntro) ---------- */
.logo-anim { --w: min(600px, 86vw); position: relative; width: var(--w); aspect-ratio: 1059 / 436; margin-top: calc(var(--w) * .2); animation: logoFloat 6s ease-in-out 2.6s infinite; }
.la-sign { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 22px 30px rgba(40, 20, 0, .45)); animation: signDrop .75s var(--spring) .25s both; }
.la-letters { position: absolute; left: 8%; right: 8%; top: 50%; height: 40.6%; translate: 0 -52%; display: flex; justify-content: center; align-items: center; }
.la-l { position: relative; height: 100%; margin: 0 -.45%; translate: 0 var(--y); rotate: var(--r); animation: stamp .42s var(--spring) calc(.75s + var(--i) * .085s) both; }
.la-l img { height: 100%; width: auto; filter: drop-shadow(0 3px 2px rgba(60, 30, 0, .35)); }
.la-l .dust { position: absolute; left: 50%; bottom: 0; width: 140%; aspect-ratio: 2; translate: -50% 30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(235, 215, 180, .9), rgba(235, 215, 180, 0)); opacity: 0; animation: dust .6s ease-out calc(.86s + var(--i) * .085s) both; }
.la-pad { position: absolute; left: 50%; bottom: 89.5%; width: 31.6%; translate: -50% 10%; transform-origin: 50% 90%; filter: drop-shadow(0 10px 12px rgba(40, 20, 0, .35)); animation: padPop .55s var(--spring) 1.45s both, padBob 3.2s ease-in-out 2.2s infinite; }
.la-sweep {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 248, 220, .95) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 130% 0;
  -webkit-mask: url(/assets/logo/sign.webp) center / 100% 100% no-repeat; mask: url(/assets/logo/sign.webp) center / 100% 100% no-repeat;
  animation: sweep 1.1s ease-in-out 1.75s both, sweep 1.4s ease-in-out 8s infinite;
}

/* ---------- Sections ---------- */
.sec { position: relative; padding: clamp(72px, 10vw, 128px) 0; }
.sec-cream { background: var(--cream); }
.sec-sea { background: radial-gradient(120% 80% at 80% 0, #11618f 0, var(--sea) 45%, #08304a 100%); color: var(--on-dark); overflow: hidden; }
.sec-sea .muted, .sec-sea p { color: var(--on-dark-muted); }
.kicker { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; color: var(--coral); margin-bottom: 10px; }
.sec-sea .kicker { color: var(--lemon); }
.title { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; max-width: 820px; margin-bottom: 40px; }
.hl { background: linear-gradient(90deg, var(--sea-3), #27b3c9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-sea .hl { background: linear-gradient(90deg, var(--lemon), #ffb35c); -webkit-background-clip: text; background-clip: text; }

/* Games grid (studio) */
.games { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; }
.game-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: #fff;
  color: var(--text); text-decoration: none; box-shadow: var(--shadow-lg); transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.game-card:hover { box-shadow: 0 2px 4px rgba(11, 34, 54, .08), 0 40px 80px -24px rgba(11, 34, 54, .45); }
.gc-art { aspect-ratio: 3 / 2; overflow: hidden; }
.gc-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.game-card:hover .gc-art img { transform: scale(1.05); }
.gc-body { display: flex; gap: 18px; align-items: flex-start; padding: 24px 26px 28px; }
.gc-icon { width: 80px; height: 80px; border-radius: 22px; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .35); flex: none; margin-top: -58px; border: 3px solid #fff; }
.gc-body h3 { font-size: 1.7rem; margin: 10px 0 6px; }
.gc-body h3 small { display: block; font-size: .95rem; font-weight: 500; color: var(--muted); margin-top: 4px; }
.gc-body p { color: var(--muted); }
.next-card { background: linear-gradient(160deg, #13405f, var(--ink)); color: var(--on-dark); }
.next-card p { color: var(--on-dark-muted); }
.next-card .pill { background: rgba(255, 255, 255, .1); color: var(--on-dark-muted); }
.next-art { position: relative; flex: 1; min-height: 240px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255, 207, 63, .18), transparent 70%), repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 14px, transparent 14px 28px); }
.next-art img { width: 46%; filter: brightness(0) invert(1); opacity: .08; }
.next-art span { position: absolute; font-family: var(--display); font-weight: 700; font-size: 7rem; color: var(--lemon); text-shadow: 0 0 40px rgba(255, 207, 63, .55); animation: qbob 3s ease-in-out infinite; }

/* Pillars (studio) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { position: relative; padding: 34px 28px 30px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px var(--line-dark); backdrop-filter: blur(6px); transition: transform .4s var(--ease), background .4s; }
.pillar:hover { transform: translateY(-6px); background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); }
.pillar img { width: 104px; height: 104px; object-fit: contain; margin-bottom: 18px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .35)); animation: bob 4s ease-in-out infinite; }
.pillar:nth-child(2) img { animation-delay: -1.3s; }
.pillar:nth-child(3) img { animation-delay: -2.6s; }
.pillar h3 { font-size: 1.45rem; color: #fff; }
.pillar p { margin: 0; }

/* Duo cards */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo-card { padding: 38px 36px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.duo-card h3 { font-size: 1.6rem; }
.duo-card p { color: var(--muted); max-width: 440px; }
.duo-alt { background: linear-gradient(160deg, var(--sand), #fbf1df); box-shadow: inset 0 0 0 1px var(--sand-2); }

/* Marquee */
.sec-gallery { padding: 0; background: var(--cream); overflow: hidden; }
.marquee { padding: 30px 0 80px; mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: clamp(260px, 32vw, 380px); width: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); transition: transform .5s var(--spring); }
.marquee img:nth-child(odd) { rotate: -1.5deg; }
.marquee img:nth-child(even) { rotate: 1.5deg; translate: 0 18px; }
.marquee img:hover { transform: scale(1.04); }

/* ---------- Game page ---------- */
.hero-game { place-items: center start; }
.hero-left { align-items: flex-start; text-align: left; padding-top: 140px; }
.hero-left .hero-tag { margin: 18px 0 28px; text-align: left; max-width: 480px; }
.hero-left .hero-cta { justify-content: flex-start; margin-bottom: 22px; }
.game-icon { width: 112px; height: 112px; border-radius: 30px; box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 255, 255, .9); margin-bottom: 22px; }
.game-title { font-size: clamp(3.4rem, 9vw, 6.4rem); font-weight: 700; line-height: .95; margin: 0; letter-spacing: -.02em; }
.game-title span { display: inline-block; animation: titleIn .9s var(--spring) both; }
.gt-1 { color: #fff; text-shadow: 0 4px 0 #0b4f7a, 0 14px 30px rgba(0, 0, 0, .45); animation-delay: .2s !important; }
.gt-2 { background: linear-gradient(180deg, #8ae6ff, #2fb2ec 60%, #1683bd); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #0b4f7a) drop-shadow(0 14px 24px rgba(0, 0, 0, .4)); animation-delay: .32s !important; }
.game-sub { font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: var(--lemon); margin: 10px 0 0; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); letter-spacing: .02em; }
.floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.floaters img { position: absolute; width: clamp(54px, 6vw, 84px); filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .3)); animation: bob 5s ease-in-out calc(var(--i) * -0.8s) infinite; }
.floaters img:nth-child(1) { right: 6%; top: 18%; }
.floaters img:nth-child(2) { right: 38%; top: 14%; }
.floaters img:nth-child(3) { right: 26%; bottom: 22%; }
.floaters img:nth-child(4) { right: 3%; bottom: 30%; }
.floaters img:nth-child(5) { left: 46%; bottom: 14%; }
.floaters img:nth-child(6) { right: 17%; top: 40%; }

/* Merge toy */
.merge-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.merge-copy p { color: var(--muted); font-size: 1.1rem; max-width: 440px; }
.merge-score { font-family: var(--display); font-size: 1.15rem !important; color: var(--text) !important; }
.merge-score b { color: var(--sea-3); }
.merge-board {
  --cells: 5; display: grid; grid-template-columns: repeat(var(--cells), 1fr); gap: 8px; padding: 16px;
  border-radius: var(--r-lg); background: linear-gradient(160deg, #e9d3a8, #d9bd88); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 #b99555, var(--shadow-lg);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.cell { position: relative; aspect-ratio: 1; border-radius: 16px; background: #f7ebd2; box-shadow: inset 0 2px 4px rgba(120, 80, 20, .18); display: grid; place-items: center; transition: background .2s; }
.cell:nth-child(even) { background: #f2e2c3; }
.cell.target { background: #d8f3d6; box-shadow: inset 0 0 0 3px var(--leaf); }
.cell.sel { box-shadow: inset 0 0 0 3px var(--sea-3); }
.piece { width: 88%; height: 88%; object-fit: contain; cursor: grab; filter: drop-shadow(0 4px 4px rgba(90, 60, 10, .3)); transition: transform .2s var(--spring); }
.piece:hover { transform: scale(1.07); }
.piece.drag { position: fixed; z-index: 100; width: 76px; height: 76px; pointer-events: none; transform: scale(1.15); cursor: grabbing; transition: none; }
.piece.born { animation: born .45s var(--spring); }
.burst { position: absolute; inset: -10%; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 230, 120, .95), rgba(255, 207, 63, 0)); animation: burst .5s ease-out forwards; }
.merge-toast { position: absolute; left: 50%; top: -6px; translate: -50% -100%; white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: .85rem; background: var(--ink); color: #fff; padding: 4px 10px; border-radius: 999px; pointer-events: none; animation: toast 1.1s var(--ease) forwards; z-index: 3; }

/* Features */
.about { max-width: 720px; font-size: 1.15rem; margin-bottom: 50px; }
.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.feat { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; padding: 18px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px var(--line-dark); transition: transform .4s var(--ease), background .4s; }
.feat:hover { transform: translateY(-5px); background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); }
.feat-art { border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6); }
.feat-art img { transition: transform 1s var(--ease); }
.feat:hover .feat-art img { transform: scale(1.06); }
.feat-art img { width: 100%; height: 100%; object-fit: cover; }
.feat-n { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--lemon); letter-spacing: .1em; }
.feat-text h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); color: #fff; margin-top: 4px; }
.feat-text p { font-size: 1.05rem; margin: 0; }

/* Cast */
.cast { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; margin-top: 30px; }
.cast-card { position: relative; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center; }
.cast-card img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 120px 120px 22px 22px;
  background: linear-gradient(180deg, #bfe8fb, #7cc8ec); box-shadow: var(--shadow); transition: transform .45s var(--spring), box-shadow .45s;
}
.cast-card:nth-child(3n+2) img { background: linear-gradient(180deg, #ffe7a8, #ffc65c); }
.cast-card:nth-child(3n) img { background: linear-gradient(180deg, #ffd0c2, #ff9f84); }
.cast-card:hover img, .cast-card.talk img { transform: translateY(-10px) rotate(-1.5deg); box-shadow: var(--shadow-lg); }
.cast-name { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-top: 12px; }
.bubble {
  position: absolute; left: 50%; bottom: calc(100% - 26px); z-index: 5; width: 220px; translate: -50% 10px; scale: .9;
  background: #fff; color: var(--text); font-size: .92rem; font-weight: 700; line-height: 1.4; padding: 12px 14px; border-radius: 16px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, translate .35s var(--spring), scale .35s var(--spring);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; rotate: 45deg; translate: -50% 0; }
.cast-card:hover .bubble, .cast-card.talk .bubble, .cast-card:focus-visible .bubble { opacity: 1; translate: -50% -10px; scale: 1; }
.cast-card:first-child .bubble { left: 0; translate: 0 10px; }
.cast-card:first-child:hover .bubble, .cast-card:first-child.talk .bubble { translate: 0 -10px; }
.cast-card:last-child .bubble { left: auto; right: 0; translate: 0 10px; }
.cast-card:last-child:hover .bubble, .cast-card:last-child.talk .bubble { translate: 0 -10px; }
.cast-card:first-child .bubble::after { left: 30%; }
.cast-card:last-child .bubble::after { left: 70%; }

/* ---------- Wiki ---------- */
.crumbs-band { background: var(--sea); padding-top: 76px; }
.crumbs { font-size: .9rem; color: var(--on-dark-muted); padding-top: 18px; padding-bottom: 0; }
.crumbs a { color: var(--on-dark-muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #fff; }
.crumbs i { margin: 0 8px; font-style: normal; opacity: .6; }
.wiki-head { position: relative; background: radial-gradient(100% 120% at 85% 0, #11618f, var(--sea) 60%); color: #fff; padding: 26px 0 110px; }
.page-wiki main > .wiki-head:first-child { padding-top: 26px; }
body:not(:has(.crumbs-band)) .wiki-head { padding-top: 130px; }
.wh-in { display: flex; gap: 28px; align-items: center; }
.wh-img { width: 120px; height: 120px; object-fit: contain; flex: none; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .35)); border-radius: 26px; }
.wiki-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; margin: 0 0 6px; }
.wiki-head .lead { color: var(--on-dark-muted); font-size: 1.15rem; max-width: 640px; margin: 0; }
.wiki-head .lead a { color: var(--lemon-2); }
.note { background: #fff6dc; border: 1px solid #f3dc9a; border-radius: var(--r); padding: 14px 18px; margin: 0 0 32px; color: #6b5310; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.wcard {
  display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: var(--r-lg); background: #fff; color: var(--text);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .35s var(--spring), box-shadow .35s;
}
.wcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wcard > img { width: 84px; height: 84px; object-fit: contain; flex: none; border-radius: 20px; background: linear-gradient(160deg, var(--sand), #fbf1df); padding: 6px; }
.wcard h3 { font-size: 1.25rem; margin: 0 0 4px; }
.wcard p { color: var(--muted); font-size: .95rem; margin: 0 0 10px; }
.wcard.is-soon > img { filter: saturate(.6); opacity: .85; }
.wcard.chain { flex-direction: column; align-items: flex-start; }
.strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strip b { color: var(--sand-2); font-size: 1.4rem; }
.strip img { border-radius: 14px; background: linear-gradient(160deg, var(--sand), #fbf1df); padding: 4px; }
.chain-grid { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.chain-grid li { position: relative; background: #fff; border-radius: 22px; padding: 18px 12px 14px; text-align: center; box-shadow: var(--shadow); transition: transform .35s var(--spring); }
.chain-grid li:hover { transform: translateY(-4px) rotate(-1deg); }
.chain-grid img { margin: 0 auto 8px; width: 96px; height: 96px; }
.chain-grid .lvl { position: absolute; top: 10px; left: 10px; font-family: var(--display); font-weight: 600; font-size: .8rem; background: var(--sea); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.chain-grid .nm { font-family: var(--display); font-weight: 500; }
.made-by { font-size: 1.05rem; }
.gen { background: #fff; border-radius: var(--r-lg); padding: 26px 28px 18px; margin: 0 0 22px; box-shadow: var(--shadow); }
.gen h2 { font-size: 1.6rem; }
.gen p { color: var(--muted); }

/* ---------- Footer ---------- */
.foot { position: relative; background: var(--ink); color: var(--on-dark-muted); margin-top: 0; }
.foot-wave { top: -69px; fill: var(--ink); }
.foot-in { padding: 40px 0 34px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.foot-brand img { width: 170px; height: auto; margin-bottom: 14px; }
.foot h4 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.foot a { display: block; color: var(--on-dark-muted); text-decoration: none; padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot p a { display: inline; color: var(--lemon-2); }
.foot .small { border-top: 1px solid var(--line-dark); padding-top: 22px; margin: 0 auto; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease) var(--delay, 0s), transform .9s var(--ease) var(--delay, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js .reveal.tilt.in { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.pop { animation: popIn .7s var(--spring) both; }

@keyframes kenburns { from { transform: scale(1.12); filter: saturate(.7) brightness(.85); } to { transform: none; filter: none; } }
@keyframes signDrop { 0% { transform: translateY(-120%) rotate(-6deg); opacity: 0; } 55% { opacity: 1; } 75% { transform: translateY(4%) rotate(1deg); } 100% { transform: none; } }
@keyframes stamp { 0% { transform: scale(2.4); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes dust { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: .9; } 100% { opacity: 0; transform: scale(1.5) translateY(-10%); } }
@keyframes padPop { 0% { transform: translateY(-60%) scale(.2); opacity: 0; } 60% { transform: scale(1.12, .9); opacity: 1; } 80% { transform: scale(.96, 1.05); } 100% { transform: none; opacity: 1; } }
@keyframes padBob { 0%, 100% { translate: -50% 10%; rotate: 0deg; } 50% { translate: -50% 4%; rotate: -2deg; } }
@keyframes sweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@keyframes logoFloat { 0%, 100% { transform: none; } 50% { transform: translateY(-8px); } }
@keyframes titleIn { from { transform: translateY(40px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: scale(.4) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes glide { from { transform: translateX(0) translateY(0); } 50% { transform: translateX(60vw) translateY(-26px); } to { transform: translateX(125vw) translateY(10px); } }
@keyframes flap { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes qbob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes born { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
@keyframes burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes toast { 0% { opacity: 0; translate: -50% -60%; } 20% { opacity: 1; translate: -50% -110%; } 80% { opacity: 1; } 100% { opacity: 0; translate: -50% -150%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
  .gull, .star, .spark { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .games, .duo, .merge-wrap, .feats { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .cast { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; }
  .cast-card { width: calc(25% - 9px); }
  .bubble { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .menu-btn { display: grid; gap: 5px; place-content: center; width: 46px; height: 46px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); cursor: pointer; }
  .menu-btn span { width: 20px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .3s var(--ease), opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .main { position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 22px;
    background: rgba(10, 45, 70, .95); backdrop-filter: blur(16px); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
  .main.open { opacity: 1; transform: none; pointer-events: auto; }
  .main a { padding: 13px 16px; }
  .brand img { height: 44px; }
  .hero-in { padding: 110px 16px 130px; }
  .hero-game { place-items: end start; }
  .hero-shade { background: linear-gradient(0deg, rgba(6, 30, 50, .94) 0, rgba(6, 30, 50, .86) 38%, rgba(6, 30, 50, .4) 56%, transparent 72%); }
  .hero-left { padding-top: 50vh; padding-bottom: 100px; }
  .game-icon { width: 84px; height: 84px; border-radius: 24px; }
  .floaters img:nth-child(n+4) { display: none; }
  .floaters img { width: 48px; }
  .feat { grid-template-columns: 110px 1fr; gap: 16px; padding: 14px; }
  .sec { padding: 64px 0; }
  .wave { height: 44px; }
  .foot-wave { top: -43px; }
  .gc-body { flex-direction: column; gap: 6px; padding: 20px; }
  .gc-icon { margin-top: -54px; }
  .wh-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .wh-img { width: 84px; height: 84px; }
  .scroll-cue { display: none; }
  .duo-card { padding: 28px 24px; }
  .merge-board { gap: 6px; padding: 10px; }
}

/* wiki: content starts right under the header wave */
.wiki-head + .sec { padding-top: 36px; }
.wiki-head { padding-bottom: 96px; }

/* cast quote box (phones; desktop uses the hover bubbles) */
.cast-quote { display: none; margin: 22px 0 0; padding: 16px 20px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); font-weight: 700; }
.cast-quote b { font-family: var(--display); font-weight: 600; color: var(--sea-3); }
.cast-quote.flash { animation: popIn .4s var(--spring); }
@media (max-width: 980px) { .cast-quote { display: block; } }
@media (max-width: 560px) { .cast-card { width: calc(33.33% - 8px); } .cast-name { font-size: .9rem; } }

.sec-cast { padding-bottom: 20px; }
