/* HookBay web portal — low-poly look taken from the game (scripts/ui_theme.gd, time_of_day.gd). */

:root {
	--navy: #16324a;
	--navy-deep: #0b1e2e;
	--navy-glass: rgba(9, 32, 46, 0.72);
	--panel: #f4f6f8;
	--panel-edge: #cfd5dc;
	--ink: #16324a;
	--muted: #6b7f8f;
	--accent: #f29a38;
	--accent-edge: #c56f1c;
	--wood: #b07a45;
	--wood-edge: #6e4522;
	--wood-ink: #fff3dc;
	--sea: #0aa2cc;
	--sea-deep: #075f86;
	--crest: #3ee6d2;
	--sky: #2f9bf2;
	--sky-light: #c2ecff;
	--gold: #f5c542;

	--r-common: #9aa0a6;
	--r-uncommon: #5cb85c;
	--r-rare: #e8c13a;
	--r-epic: #9b59b6;
	--r-legendary: #f08a2c;
	--r-mythic: #d77be8;
	--mythic-gradient: linear-gradient(90deg, #ff7a8a, #ffd166, #5af0c8, #7aa8ff, #c08bff);

	--font-display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
	--font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--radius: 18px;
	--shadow: 0 6px 0 rgba(11, 30, 46, 0.18), 0 18px 40px rgba(11, 30, 46, 0.18);
	--gutter: clamp(16px, 4vw, 40px);
	--max: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.55;
	color: var(--ink);
	background: var(--panel);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */

.nav {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 20;
	padding: 18px 0;
}
.nav--solid { position: sticky; top: 0; background: var(--navy); box-shadow: 0 4px 0 var(--navy-deep); padding: 10px 0; }
.nav .wrap { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--font-display); font-size: 26px; text-shadow: 0 3px 0 rgba(11, 30, 46, 0.45); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 3px 0 rgba(11, 30, 46, 0.4); }
.nav__links { margin-left: auto; display: flex; gap: 6px; }
.nav__links a {
	text-decoration: none; color: #fff; font-weight: 800; font-size: 15px;
	padding: 8px 14px; border-radius: 999px; background: rgba(9, 32, 46, 0.35);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	transition: background 0.2s;
}
.nav__links a:hover, .nav__links a[aria-current='page'] { background: rgba(9, 32, 46, 0.7); }
@media (max-width: 560px) { .nav__links a.nav__hide-sm { display: none; } }

/* ---------- Buttons & store badges ---------- */

.btn {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display); font-size: 20px; text-decoration: none;
	padding: 14px 24px; border-radius: 16px; border: 0; cursor: pointer;
	color: #fff; background: var(--accent);
	box-shadow: 0 5px 0 var(--accent-edge), 0 12px 24px rgba(11, 30, 46, 0.25);
	transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--accent-edge), 0 16px 28px rgba(11, 30, 46, 0.28); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-edge), 0 6px 14px rgba(11, 30, 46, 0.25); }
.btn--ghost { background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.26); box-shadow: inset 0 0 0 2px #fff; }
.btn--ghost:active { box-shadow: inset 0 0 0 2px #fff; }

.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
	display: inline-flex; align-items: center; gap: 12px; min-width: 200px;
	padding: 10px 20px 10px 16px; border-radius: 16px; text-decoration: none;
	color: #fff; background: #0b1e2e;
	box-shadow: 0 5px 0 #000, 0 14px 28px rgba(0, 0, 0, 0.3);
	transition: transform 0.12s, box-shadow 0.12s;
	position: relative;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #000, 0 18px 32px rgba(0, 0, 0, 0.32); }
.store:active { transform: translateY(3px); box-shadow: 0 2px 0 #000; }
.store svg { width: 30px; height: 30px; flex: none; }
.store small { display: block; font-size: 12px; font-weight: 700; opacity: 0.8; line-height: 1.1; }
.store strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.05; }
.store[data-soon]::after {
	content: 'Soon'; position: absolute; top: -9px; right: -8px;
	font-family: var(--font-display); font-size: 13px; padding: 3px 9px; border-radius: 999px;
	background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-edge); transform: rotate(6deg);
}

/* ---------- Hero ---------- */

.hero {
	--sky-top: #2f9bf2;
	--sky-horizon: #c2ecff;
	position: relative;
	min-height: max(640px, 100svh);
	display: flex; align-items: center;
	color: #fff; overflow: hidden;
	background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-horizon) 58%, var(--sea) 58.1%, var(--sea-deep) 100%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; touch-action: pan-y; }
.hero__shade {
	position: absolute; inset: 0; pointer-events: none;
	background:
		radial-gradient(ellipse 70% 60% at 22% 48%, rgba(9, 32, 46, 0.32), transparent 70%),
		linear-gradient(180deg, rgba(9, 32, 46, 0.14), transparent 18%);
}
.hero__content { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 150px; pointer-events: none; }
.hero__content > * { pointer-events: auto; }
.hero__copy { max-width: 600px; }
.hero__eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
	padding: 6px 14px; border-radius: 999px; background: var(--navy-glass);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crest); box-shadow: 0 0 10px var(--crest); }
.hero h1 {
	font-size: clamp(64px, 12vw, 148px);
	margin: 18px 0 10px;
	color: #fff;
	text-shadow: 0 4px 0 #f29a38, 0 8px 0 #c56f1c, 0 18px 30px rgba(11, 30, 46, 0.45);
	transform: rotate(-2deg);
	transform-origin: left center;
}
.hero__tagline { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; max-width: 520px; margin: 0 0 28px; text-shadow: 0 2px 10px rgba(11, 30, 46, 0.55); }
.hero__actions { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

.hero__time {
	position: absolute; z-index: 3; right: var(--gutter); bottom: 120px;
	display: flex; gap: 4px; padding: 5px; border-radius: 999px;
	background: var(--navy-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero__time button {
	font: 800 14px var(--font-body); color: #fff; border: 0; cursor: pointer;
	padding: 8px 14px; border-radius: 999px; background: transparent;
	display: inline-flex; align-items: center; gap: 6px;
}
.hero__time button[aria-pressed='true'] { background: var(--accent); box-shadow: 0 3px 0 var(--accent-edge); }
.hero__hint {
	position: absolute; z-index: 3; left: 50%; bottom: 128px; transform: translateX(-50%);
	font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
	color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 6px rgba(11, 30, 46, 0.6);
	pointer-events: none; animation: hint 3s ease-in-out infinite;
}
@keyframes hint { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@media (max-width: 860px) {
	.hero { align-items: flex-start; }
	.hero__shade { background: linear-gradient(180deg, rgba(9, 32, 46, 0.55), rgba(9, 32, 46, 0.1) 60%, transparent); }
	.hero__content { padding-top: 96px; }
	.hero__time { left: 50%; right: auto; transform: translateX(-50%); bottom: 110px; }
	.hero__hint { display: none; }
}

/* Low-poly wave edge between sections */
.edge { display: block; width: 100%; height: 90px; margin-top: -89px; position: relative; z-index: 4; }
.edge--flip { transform: scaleY(-1); margin-top: 0; margin-bottom: -1px; }

/* ---------- Sections ---------- */

.section { padding: 90px 0; position: relative; }
.section--navy { background: var(--navy); color: #fff; }
.section--sea { background: linear-gradient(180deg, #0a7fb0, #075f86); color: #fff; overflow: hidden; }
.section__head { max-width: 680px; margin: 0 0 44px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-weight: 900; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }
.section h2 { font-size: clamp(38px, 5.5vw, 60px); }
.section__head p { font-size: 19px; color: var(--muted); margin: 14px 0 0; }
.section--navy .section__head p, .section--sea .section__head p { color: rgba(255, 255, 255, 0.78); }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature {
	background: #fff; border-radius: var(--radius); padding: 26px 22px 24px;
	box-shadow: 0 5px 0 var(--panel-edge), 0 16px 30px rgba(11, 30, 46, 0.08);
	position: relative; overflow: hidden;
}
.feature__icon { width: 72px; height: 72px; margin-bottom: 16px; }
.feature h3 { font-size: 26px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .worlds { grid-template-columns: 1fr; } }
.world {
	position: relative; border-radius: var(--radius); overflow: hidden; min-height: 300px;
	padding: 22px; display: flex; flex-direction: column; justify-content: flex-end;
	color: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3); isolation: isolate;
}
.world .lowpoly { position: absolute; inset: 0; z-index: -2; }
/* A dark wash under the text, whatever the world's colours. */
.world::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 25%, rgba(5, 15, 25, 0.55) 55%, rgba(5, 15, 25, 0.85)); }
.world > h3, .world > p, .world__meta { position: relative; z-index: 2; }
.world__num { position: absolute; z-index: 2; top: 16px; left: 18px; font-family: var(--font-display); font-size: 15px; padding: 4px 11px; border-radius: 999px; background: rgba(5, 15, 25, 0.55); }
.world__fish { position: absolute; z-index: 1; top: 26px; right: -28px; width: 210px; transform: rotate(-8deg); filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3)); transition: transform 0.4s; }
.world:hover .world__fish { transform: rotate(-4deg) translateX(-14px) scale(1.04); }
.world h3 { font-size: 30px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.45); }
.world p { margin: 6px 0 0; font-size: 15px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.world__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.world .chip { background: rgba(5, 15, 25, 0.5); color: #fff; }
.chip { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); white-space: nowrap; }

/* Fish marquee */
.marquee { overflow: hidden; padding: 10px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 10px; width: max-content; animation: marquee 70s linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation-duration: 400s; } }
.fishcard { width: 190px; flex: none; text-align: center; padding: 6px 4px 12px; border-radius: 16px; transition: background 0.2s; }
.fishcard:hover { background: rgba(255, 255, 255, 0.1); }
.fishcard img { width: 180px; height: 90px; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.25)); }
.fishcard span { display: block; font-weight: 800; font-size: 14px; }
.fishcard small { display: block; font-size: 12px; opacity: 0.65; font-style: italic; }
.fishcard--mythic span { background: var(--mythic-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.stats-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 40px; margin-top: 46px; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 46px; line-height: 1; color: var(--crest); }
.stat span { font-weight: 800; font-size: 14px; opacity: 0.8; }

/* ---------- Catches teaser (home) ---------- */

.teaser { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .teaser { grid-template-columns: 1fr; } }
.teaser__copy p { font-size: 19px; color: rgba(255, 255, 255, 0.8); }
.countdown { display: inline-flex; gap: 8px; align-items: baseline; font-weight: 800; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); margin: 6px 0 24px; }
.countdown b { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--crest); font-variant-numeric: tabular-nums; }

/* ---------- Podium (shared) ---------- */

.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 14px; align-items: end; }
.podium__slot { display: flex; flex-direction: column; }
.podium__slot--1 { order: 2; }
.podium__slot--2 { order: 1; }
.podium__slot--3 { order: 3; }
.catchcard {
	--rc: var(--r-rare);
	position: relative; border-radius: var(--radius); padding: 16px 16px 18px;
	background: #fff; color: var(--ink); text-align: center; cursor: pointer;
	box-shadow: 0 0 0 3px var(--rc), 0 6px 0 3px color-mix(in srgb, var(--rc) 60%, #000), 0 20px 34px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s;
	border: 0; font: inherit; width: 100%;
}
.catchcard:hover { transform: translateY(-4px) rotate(-0.5deg); }
.catchcard__rank {
	position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
	width: 40px; height: 40px; display: grid; place-items: center;
	font-family: var(--font-display); font-size: 22px; color: #fff;
	clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
	background: var(--rc);
}
.catchcard__img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; margin: 8px 0 2px; filter: drop-shadow(0 8px 6px rgba(11, 30, 46, 0.2)); }
.catchcard__species { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.catchcard__variant { font-size: 13px; font-style: italic; color: var(--muted); min-height: 1.4em; }
.catchcard__player { font-weight: 800; font-size: 15px; margin-top: 8px; }
.catchcard__nums { display: flex; justify-content: center; gap: 12px; margin-top: 8px; font-weight: 800; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.catchcard__nums b { color: var(--ink); }
.podium__slot--1 .catchcard { padding-top: 22px; }
.podium__slot--1 .catchcard__species { font-size: 26px; }
.podium__base {
	height: 46px; margin: 12px 6px 0; border-radius: 0 0 12px 12px;
	background: linear-gradient(180deg, var(--wood), #8f5f33); box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.15), 0 5px 0 var(--wood-edge);
	display: grid; place-items: center; font-family: var(--font-display); color: var(--wood-ink); font-size: 22px;
}
.podium__slot--1 .podium__base { height: 76px; }
.podium__slot--3 .podium__base { height: 30px; }

.rarity { display: inline-block; font-weight: 900; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--rc); }
.rarity--mythic { background: var(--mythic-gradient); color: #3a1450; }
.r0 { --rc: var(--r-common); }
.r1 { --rc: var(--r-uncommon); }
.r2 { --rc: var(--r-rare); }
.r3 { --rc: var(--r-epic); }
.r4 { --rc: var(--r-legendary); }
.r5 { --rc: var(--r-mythic); }
.catchcard.r5 { box-shadow: 0 0 0 3px #ffd166, 0 0 0 6px #c08bff, 0 20px 34px rgba(0, 0, 0, 0.3); }
.catchcard.r5 .catchcard__rank { background: var(--mythic-gradient); }
@media (max-width: 640px) {
	.podium { grid-template-columns: 1fr; }
	.podium__slot--1, .podium__slot--2, .podium__slot--3 { order: 0; }
	.podium__base { display: none; }
	.podium { gap: 22px; }
	.catchcard, .podium__slot--1 .catchcard { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: center; text-align: left; padding: 14px; }
	.catchcard__img { grid-column: 1; grid-row: 1 / span 5; margin: 0; }
	.catchcard > :not(.catchcard__img):not(.catchcard__rank) { grid-column: 2; }
	.catchcard__rank { left: 12px; top: -14px; transform: none; width: 32px; height: 32px; font-size: 18px; }
	.catchcard .rarity { justify-self: start; }
	.catchcard__player { margin-top: 4px; }
	.catchcard__nums { justify-content: flex-start; gap: 8px; font-size: 13px; margin-top: 4px; }
	.catchcard__species, .podium__slot--1 .catchcard__species { font-size: 20px; }
}

/* ---------- Final CTA & footer ---------- */

.cta { text-align: center; padding: 110px 0 120px; color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.cta .lowpoly { position: absolute; inset: 0; z-index: -1; }
.cta h2 { font-size: clamp(42px, 7vw, 76px); text-shadow: 0 4px 0 var(--accent-edge), 0 14px 26px rgba(0, 0, 0, 0.3); }
.cta p { font-size: 20px; font-weight: 700; margin: 14px auto 30px; max-width: 520px; }
.cta .stores { justify-content: center; }
.cta__icon { width: 108px; height: 108px; border-radius: 26px; margin: 0 auto 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 20px 30px rgba(0, 0, 0, 0.25); transform: rotate(-6deg); }

.footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.7); padding: 34px 0; font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.footer .brand { font-size: 20px; }
.footer .brand img { width: 30px; height: 30px; border-radius: 8px; }
.footer nav { display: flex; gap: 18px; margin-left: auto; }
.footer a { text-decoration: none; font-weight: 700; }
.footer a:hover { color: #fff; }

.lowpoly svg { width: 100%; height: 100%; display: block; }

/* ---------- Catches page ---------- */

.page-head { position: relative; color: #fff; padding: 64px 0 120px; overflow: hidden; isolation: isolate; }
.page-head .lowpoly { position: absolute; inset: 0; z-index: -1; }
.page-head h1 { font-size: clamp(46px, 8vw, 92px); text-shadow: 0 4px 0 var(--accent-edge), 0 14px 30px rgba(0, 0, 0, 0.3); }
.page-head p { font-size: 19px; font-weight: 700; max-width: 620px; margin: 12px 0 0; }
.page-head__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }

.notice {
	display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 700;
	padding: 12px 16px; border-radius: 14px; background: #fff4e3; color: #7a4510; box-shadow: inset 0 0 0 2px #f5c992;
	margin-bottom: 26px;
}

.segmented { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(9, 32, 46, 0.55); backdrop-filter: blur(6px); }
.segmented button, .filters button {
	font: 800 14px var(--font-body); border: 0; cursor: pointer; border-radius: 999px; padding: 8px 14px;
	color: inherit; background: transparent; white-space: nowrap;
}
.segmented button { color: #fff; }
.segmented button[aria-pressed='true'] { background: var(--accent); box-shadow: 0 3px 0 var(--accent-edge); }

.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: -80px 0 50px; position: relative; z-index: 5; }
@media (max-width: 800px) { .summary { grid-template-columns: repeat(2, 1fr); } }
.summary div { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.summary b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.1; }
.summary span { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.board-podium { margin-bottom: 60px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar h2 { font-size: 36px; }
.toolbar__link { font-weight: 800; color: var(--sea-deep); text-decoration: none; }
.toolbar__link:hover { text-decoration: underline; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--panel-edge); }
.filters button[aria-pressed='true'] { background: var(--navy); color: #fff; box-shadow: 0 3px 0 var(--navy-deep); }
.filters + .filters { margin-top: 8px; }
.filter-label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); align-self: center; margin-right: 4px; }


.board { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.row {
	--rc: var(--r-common);
	display: grid; grid-template-columns: 40px 112px minmax(0, 1.3fr) auto minmax(0, 1fr) 170px;
	gap: 14px; align-items: center; padding: 8px 18px 8px 10px; border-radius: 14px; cursor: pointer;
	background: #fff; box-shadow: inset 5px 0 0 var(--rc), 0 3px 0 var(--panel-edge);
	transition: transform 0.12s, box-shadow 0.12s;
}
.row:hover { transform: translateX(4px); box-shadow: inset 5px 0 0 var(--rc), 0 3px 0 var(--panel-edge), 0 10px 22px rgba(11, 30, 46, 0.08); }
.row:focus-visible, .catchcard:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.row__rank { font-family: var(--font-display); font-size: 22px; text-align: center; color: var(--muted); }
.row__img { width: 112px; height: 56px; object-fit: contain; }
.row__name { min-width: 0; }
.row__name strong { display: block; font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__name em { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__parts { display: flex; align-items: center; gap: 10px; }
.row__parts .rarity { min-width: 92px; text-align: center; }
.row__player { font-weight: 800; font-size: 15px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__player small { display: block; font-weight: 700; color: var(--muted); font-size: 12px; }
.row__score { text-align: right; }
.row__score b { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1; }
@media (max-width: 1060px) {
	.row { grid-template-columns: 34px 84px minmax(0, 1fr) 120px; grid-template-areas: 'rank img name score' 'rank img parts score' 'rank img player score'; row-gap: 3px; }
	.row__rank { grid-area: rank; }
	.row__img { grid-area: img; width: 84px; height: 42px; }
	.row__name { grid-area: name; }
	.row__parts { grid-area: parts; }
	.row__player { grid-area: player; }
	.row__score { grid-area: score; }
	.row__parts .rarity { min-width: 0; }
}
@media (max-width: 480px) {
	.row { grid-template-columns: 24px 60px minmax(0, 1fr) 76px; gap: 8px; padding-right: 10px; }
	.row__img { width: 60px; height: 30px; }
	.row__name strong { font-size: 15px; }
	.row__score b { font-size: 22px; }
	.row__parts .gem b { display: none; }
	.row__parts .gem { width: 14px; padding: 0; }
}
.board__more { display: flex; justify-content: center; margin-top: 22px; }
.empty { padding: 40px; text-align: center; color: var(--muted); font-weight: 800; background: #fff; border-radius: 16px; }

.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.record { background: rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 12px; text-align: center; cursor: pointer; border: 0; color: #fff; font: inherit; transition: background 0.2s; }
.record:hover { background: rgba(255, 255, 255, 0.16); }
.record img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; }
.record strong { display: block; font-size: 14px; font-weight: 900; }
.record span { font-family: var(--font-display); font-size: 24px; color: var(--crest); }
.record small { display: block; font-size: 12px; opacity: 0.7; }

/* Specimen plate dialog */
.plate { border: 0; padding: 0; border-radius: 24px; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.plate::backdrop { background: rgba(9, 25, 38, 0.65); backdrop-filter: blur(4px); }
.plate__top { position: relative; padding: 28px 24px 14px; text-align: center; color: #fff; overflow: hidden; isolation: isolate; }
.plate__top .lowpoly { position: absolute; inset: 0; z-index: -1; }
.plate__top img { width: 88%; margin: 0 auto; aspect-ratio: 2 / 1; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.35)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
.plate__top h3 { font-size: 34px; margin-top: 6px; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.plate__top em { opacity: 0.85; }
.plate__body { padding: 18px 24px 24px; }
.plate__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.plate__grid div { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 0 var(--panel-edge); }
.plate__grid span { display: block; font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.plate__grid b { font-size: 17px; }
.plate__code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; text-align: center; color: var(--muted); }
.plate__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(9, 32, 46, 0.6); color: #fff; font-size: 20px; line-height: 1; z-index: 2; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Score pieces ---------- */

.t0 { --tc: #c9d1d9; --ti: #4d5b67; }
.t1 { --tc: var(--r-uncommon); --ti: #fff; }
.t2 { --tc: var(--r-rare); --ti: #3d3000; }
.t3 { --tc: var(--r-epic); --ti: #fff; }
.t4 { --tc: var(--r-legendary); --ti: #fff; }
.gems { display: inline-flex; gap: 4px; vertical-align: middle; }
.gem {
	display: inline-flex; align-items: center; justify-content: center; min-width: 14px; height: 18px; padding: 0 7px;
	background: var(--tc); color: var(--ti); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
	font-size: 11px; letter-spacing: 0.02em;
}
.gem:not(:has(b)) { width: 16px; padding: 0; }
.gem b { font-weight: 900; }
.gem-pill { display: inline-block; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: var(--tc); color: var(--ti); white-space: nowrap; }

.sbar { display: flex; height: 8px; border-radius: 99px; background: #e3e8ed; overflow: hidden; margin-top: 6px; width: 100%; }
.sbar i { display: block; height: 100%; }
.sbar__g { background: #5a7fd0; }
.sbar__l { background: #2fc4b2; }
.sbar__c { background: linear-gradient(90deg, #f29a38, #d77be8); }

.catchcard__meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
.catchcard__score { margin-top: 10px; }
.catchcard__score b { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; }
.catchcard__score small { color: var(--muted); font-weight: 800; margin-left: 4px; }
.podium__slot--1 .catchcard__score b { font-size: 42px; }
@media (max-width: 640px) {
	.catchcard__meta { justify-content: flex-start; }
	.catchcard__score b, .podium__slot--1 .catchcard__score b { font-size: 26px; }
	.catchcard__score { margin-top: 4px; }
	.catchcard .sbar { grid-column: 1 / -1; }
}

.record .gems { margin: 4px 0; }

/* Specimen sheet */
.plate { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.plate__who { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.plate__score { background: #fff; border-radius: 16px; padding: 14px 16px; margin: 14px 0 6px; box-shadow: 0 2px 0 var(--panel-edge); }
.plate__score .label { display: block; font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.plate__score b { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1; }
.plate__score small { color: var(--muted); font-weight: 800; margin-left: 6px; }
.plate__score .sbar { height: 12px; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; font-weight: 700; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend b { font-family: var(--font-body); font-size: 14px; font-weight: 900; }
.plate h4 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 18px 0 8px; }
.parts { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 0 var(--panel-edge); font-size: 15px; }
.parts th, .parts td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #edf0f3; }
.parts tr:last-child th, .parts tr:last-child td { border-bottom: 0; }
.parts thead th { font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; background: #f7f9fa; }
.parts tbody th { font-weight: 900; }
.parts .num { text-align: right; white-space: nowrap; }
.parts .muted { color: var(--muted); }
.plate__note { font-size: 14px; color: var(--muted); margin: 8px 2px 0; }
.plate__note b { color: var(--ink); }

/* How the score works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.how__card { position: relative; background: #fff; border-radius: var(--radius); padding: 24px 22px 22px 22px; box-shadow: 0 5px 0 var(--panel-edge), 0 16px 30px rgba(11, 30, 46, 0.06); }
.how__card--wide { grid-column: 1 / -1; }
.how__n { position: absolute; top: -14px; left: 20px; width: 36px; height: 36px; display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; color: #fff; background: var(--accent); clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.how__card h3 { font-size: 26px; margin: 4px 0 8px; }
.how__card p { color: var(--muted); margin: 0 0 12px; }
.how__aside { font-weight: 800; color: var(--ink) !important; }
.how__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.how__list li { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.how__list .rarity { min-width: 96px; text-align: center; }
.parts-scroll { overflow-x: auto; }
.parts--grid td small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.parts--grid { min-width: 520px; }
.unlock { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.unlock li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.unlock .rarity { min-width: 96px; text-align: center; }
.formula { margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.formula > div b { font-family: var(--font-display); font-weight: 400; font-size: 24px; }
.formula p { margin: 8px 0 0; color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.formula p b { color: #fff; }
.board-legend { justify-content: flex-end; color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- Combinations (home) ---------- */

.combos__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .combos__grid { grid-template-columns: 1fr; gap: 28px; } }
.combos__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.combos__steps li {
	display: grid; grid-template-columns: 26px 92px minmax(0, 1fr) auto; align-items: center; gap: 10px;
	padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.05);
	opacity: 0.35; transform: translateX(-10px); transition: opacity 0.5s, transform 0.5s, background 0.5s;
}
.combos__steps li.is-on { opacity: 1; transform: none; background: rgba(255, 255, 255, 0.1); }
.combos__steps li:last-child.is-on { background: rgba(242, 154, 56, 0.2); box-shadow: inset 0 0 0 2px rgba(242, 154, 56, 0.6); }
.combos__op { font-family: var(--font-display); font-size: 24px; color: var(--accent); text-align: center; }
.combos__steps b { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: #fff; white-space: nowrap; }
.combos__steps span:not(.combos__op) { font-weight: 800; color: rgba(255, 255, 255, 0.8); }
.combos__steps em { font-style: normal; font-weight: 900; color: var(--crest); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
	.combos__steps li { grid-template-columns: 18px 64px minmax(0, 1fr); }
	.combos__steps em { grid-column: 2 / -1; font-size: 14px; }
	.combos__steps b { font-size: 22px; }
}
.combos__meter { text-align: center; position: relative; padding: 10px 0; }
.combos__mag { font-family: var(--font-display); font-size: 30px; color: var(--accent); line-height: 1; }
.combos__mag sup { font-size: 0.6em; }
.combos__count {
	font-family: var(--font-display); font-size: clamp(46px, 8.5vw, 104px); line-height: 1; margin: 8px 0 6px;
	font-variant-numeric: tabular-nums; color: #fff;
	text-shadow: 0 4px 0 var(--accent), 0 8px 0 var(--accent-edge), 0 18px 30px rgba(0, 0, 0, 0.35);
}
.combos.is-done .combos__count { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes pop { 40% { transform: scale(1.08) rotate(-1.5deg); } }
.combos__label { font-weight: 800; color: rgba(255, 255, 255, 0.8); font-size: 18px; }
.ladder { position: relative; height: 16px; margin: 26px 8px 34px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.ladder__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3ee6d2, #ffd166, #f29a38, #d77be8); box-shadow: 0 0 18px rgba(242, 154, 56, 0.5); }
.ladder__ticks span { position: absolute; top: 22px; transform: translateX(-50%); font-weight: 800; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.ladder__ticks span::before { content: ''; position: absolute; top: -22px; left: 50%; width: 2px; height: 16px; background: rgba(9, 32, 46, 0.6); }
.combos__rarest { color: rgba(255, 255, 255, 0.8); margin: 0 auto; max-width: 420px; }
.combos__rarest b { color: var(--accent); }

.roller {
	margin-top: 50px; display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 24px; align-items: center;
	padding: 22px 26px; border-radius: 22px; background: #fff; color: var(--ink);
	box-shadow: 0 6px 0 #0b1e2e, 0 24px 40px rgba(0, 0, 0, 0.3);
}
@media (max-width: 860px) { .roller { grid-template-columns: 1fr; text-align: center; } .roller__parts li { justify-content: center; } .roller__line { justify-content: center; } }
.roller__fish { border-radius: 16px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 35%, #fff), #eef3f6 70%); }
.roller__fish img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(11, 30, 46, 0.25)); }
.roller__info h3 { font-size: 30px; }
.roller__info em { display: block; color: var(--muted); font-size: 14px; }
.roller__info .kicker { margin-bottom: 4px; }
.roller__line { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-weight: 900; }
.roller__parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.roller__parts li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.roller__parts li > span:first-child { width: 42px; font-weight: 900; text-align: left; }
.roller__parts i { flex: 1; min-width: 0; color: var(--muted); }
@media (max-width: 860px) { .roller__parts i { flex: 0 1 auto; } }
.roller__score { text-align: center; display: grid; justify-items: center; gap: 2px; }
.roller__score > span { font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.roller__score b { font-family: var(--font-display); font-weight: 400; font-size: 54px; line-height: 1; }
.roller__score small { color: var(--muted); font-weight: 800; margin-bottom: 12px; }
.how > * { min-width: 0; }
@media (max-width: 480px) {
	.row__parts { gap: 6px; }
	.row__parts .rarity { font-size: 10px; padding: 3px 7px; letter-spacing: 0.02em; }
}
/* Specimen sheet tables stack on phones: name, value and rarity on one line, the odds below. */
@media (max-width: 560px) {
	.plate__body { padding: 16px 14px 20px; }
	.plate .parts, .plate .parts tbody { display: block; }
	.plate .parts thead { display: none; }
	.plate .parts tr { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 9px 12px; border-bottom: 1px solid #edf0f3; }
	.plate .parts tr:last-child { border-bottom: 0; }
	.plate .parts th, .plate .parts td { padding: 0; border: 0; }
	.plate .parts .num { grid-column: 2 / -1; text-align: left; white-space: normal; font-size: 13px; color: var(--muted); }
	.plate__grid { grid-template-columns: 1fr; }
}
