/* Raziboo — site styles. Palette from /marque/couleurs.json. Chunky navy outlines + extruded "block" faces echo the logo. */
@font-face { font-family: "Lilita One"; src: url(/fonts/lilita-latin.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lilita One"; src: url(/fonts/lilita-latin-ext.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lexend"; src: url(/fonts/lexend-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lexend"; src: url(/fonts/lexend-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy: #0B1240;
  --navy-2: #18205c;
  --orange: #FE751B;
  --orange-light: #FEA336;
  --orange-dark: #D43902;
  --cream: #FEF2D3;
  --brown: #9B3D23;
  --pink: #FC5C7C;
  --coral: #FF4F5A;
  --yellow: #FFDD03;
  --lime: #88F203;
  --sky: #29BFFE;
  --sky-light: #8CDCFF;
  --indigo: #7266FD;
  --violet: #C046FD;
  --page: #E6F6FF;
  --ink-soft: #3a4170;
  --line: 3px;
  --lift: 5px;
  --r: 10px;
  --display: "Lilita One", "Arial Black", system-ui, sans-serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; color: var(--navy); background: var(--page); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* Avoid the English flash when the server announced another language. */
html:not([lang="en"]):not(.i18n-ok) [data-i18n],
html:not([lang="en"]):not(.i18n-ok) [data-i18n-html] { visibility: hidden; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.measure { max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--yellow); padding: .6rem 1rem; border: var(--line) solid var(--navy); border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ Buttons: extruded blocks */
.btn {
  --face: var(--orange); --side: var(--orange-dark); --txt: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.1rem; padding: .7rem 1.5rem; border: var(--line) solid var(--navy); border-radius: var(--r);
  background: var(--face); color: var(--txt); font-family: var(--display); font-size: 1.2rem; line-height: 1; text-decoration: none;
  box-shadow: 0 var(--lift) 0 var(--side), 0 var(--lift) 0 var(--line) var(--navy);
  transform: translateY(0); transition: transform .08s ease, box-shadow .08s ease, filter .15s; cursor: pointer;
  text-shadow: 0 2px 0 rgba(11, 18, 64, .35);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(var(--lift)); box-shadow: 0 0 0 var(--side), 0 0 0 var(--line) var(--navy); }
.btn[disabled], .btn[aria-disabled="true"] { --face: #c9cfe0; --side: #9aa3bd; --txt: #4b537a; text-shadow: none; cursor: not-allowed; filter: none; }
.btn[disabled]:active, .btn[aria-disabled="true"]:active { transform: none; box-shadow: 0 var(--lift) 0 var(--side), 0 var(--lift) 0 var(--line) var(--navy); }
.btn--sky { --face: var(--sky); --side: #1484c2; }
.btn--yellow { --face: var(--yellow); --side: #d1a400; --txt: var(--navy); text-shadow: none; }
.btn--white { --face: #fff; --side: #b9c6e6; --txt: var(--navy); text-shadow: none; }
.btn--lime { --face: var(--lime); --side: #57a300; --txt: var(--navy); text-shadow: none; }
.btn--violet { --face: var(--violet); --side: #8a20c2; }
.btn--small { min-height: 2.5rem; padding: .45rem 1rem; font-size: 1.05rem; --lift: 4px; }
.btn--big { min-height: 3.8rem; padding: .9rem 2rem; font-size: 1.45rem; }
.btn--block { width: 100%; }
.btn .gem { width: 1.15em; height: 1.15em; }
.link-btn { background: none; border: 0; padding: .25rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink-soft); font-size: .95rem; }

/* ------------------------------------------------------------------ Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; border-bottom: var(--line) solid #000a33; }
.site-header__in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.wordmark { font-family: var(--display); font-size: 1.75rem; line-height: 1; letter-spacing: .02em; display: inline-flex; }
.wordmark span { -webkit-text-stroke: 5px var(--navy); paint-order: stroke fill; }
.wordmark span:nth-child(1) { color: var(--coral); }
.wordmark span:nth-child(2) { color: var(--orange); }
.wordmark span:nth-child(3) { color: var(--yellow); }
.wordmark span:nth-child(4) { color: var(--lime); }
.wordmark span:nth-child(5) { color: var(--sky); }
.wordmark span:nth-child(6) { color: var(--indigo); }
.wordmark span:nth-child(7) { color: var(--violet); }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { padding: .5rem .85rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.site-nav a:hover { background: var(--navy-2); }
.site-nav a[aria-current="page"] { background: var(--navy-2); box-shadow: inset 0 -3px 0 var(--orange); }
.header-tools { display: flex; align-items: center; gap: .6rem; }
.gems-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem .3rem .5rem; border-radius: 999px; background: var(--navy-2);
  border: 2px solid #2d3780; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.gems-pill .gem { width: 20px; height: 20px; }
.account-link { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; }
.account-link:hover { background: var(--navy-2); }
.account-link__name { max-width: 10ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { border-radius: 8px; border: 2px solid var(--navy); object-fit: cover; background: var(--orange); }
.avatar--sm { width: 32px; height: 32px; }
.avatar--letter { display: inline-grid; place-items: center; font-family: var(--display); color: #fff; font-size: 1.05rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 10px; border: 2px solid #2d3780; background: var(--navy-2); cursor: pointer; color: #fff; }
.icon-btn:hover { border-color: var(--sky); }
.icon-btn .flag { width: 28px; height: 19px; border-radius: 3px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.menu-toggle { display: none; }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 780px) {
  .menu-toggle { display: inline-grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem;
    background: var(--navy); border-bottom: var(--line) solid #000a33; display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .8rem .5rem; font-size: 1.1rem; }
  .account-link__name { display: none; }
  .wordmark { font-size: 1.45rem; }
  .brand img { width: 38px; height: 38px; }
}
@media (max-width: 400px) { .wordmark { display: none; } }

/* ------------------------------------------------------------------ Dialogs */
.dialog { border: var(--line) solid var(--navy); border-radius: 16px; padding: 0; width: min(100% - 2rem, 640px); max-height: min(92vh, 900px);
  background: #fff; color: var(--navy); box-shadow: 0 8px 0 var(--navy); }
.dialog--narrow { width: min(100% - 2rem, 440px); }
.dialog::backdrop { background: rgba(11, 18, 64, .62); }
.dialog__body { padding: 1.75rem; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 1.1rem 1.75rem; border-bottom: 2px solid #dbe4f5; }
.dialog__head h2 { font-size: 1.7rem; }
.close-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.close-btn:hover { background: var(--cream); }
.close-btn svg { width: 18px; height: 18px; }
.nick-mark { width: 96px; height: 96px; margin: -.5rem auto 0; }
#nick-dialog h2, #nick-dialog p:not(.form-error) { text-align: center; }

.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; padding: 1.5rem 1.75rem 1.75rem; }
.lang-choice { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: var(--line) solid var(--navy); border-radius: 12px; background: #fff;
  cursor: pointer; font-weight: 600; text-align: left; box-shadow: 0 4px 0 #b9c6e6; transition: transform .08s, box-shadow .08s; }
.lang-choice:hover { background: #f2f9ff; }
.lang-choice:active { transform: translateY(4px); box-shadow: none; }
.lang-choice[aria-pressed="true"] { background: var(--sky-light); box-shadow: 0 4px 0 var(--navy); }
.lang-choice .flag { width: 36px; height: 24px; border-radius: 4px; box-shadow: 0 0 0 2px var(--navy); flex: none; }

/* ------------------------------------------------------------------ Toasts */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: grid; gap: .6rem; width: min(100% - 2rem, 460px); pointer-events: none; }
.toast { pointer-events: auto; padding: .9rem 1.2rem; border: var(--line) solid var(--navy); border-radius: 12px; background: #fff; font-weight: 600;
  box-shadow: 0 5px 0 var(--navy); animation: toast-in .25s ease-out; }
.toast--success { background: var(--lime); }
.toast--error { background: #ffd6d9; }
.toast--out { opacity: 0; transform: translateY(8px); transition: .35s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------------ Voxel step edge (section transitions) */
.steps-edge { position: relative; }
.steps-edge::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: var(--edge, var(--page)); z-index: 2;
  clip-path: polygon(0 100%, 0 50%, 6% 50%, 6% 0, 13% 0, 13% 50%, 24% 50%, 24% 25%, 31% 25%, 31% 75%, 42% 75%, 42% 25%, 50% 25%, 50% 50%, 61% 50%, 61% 0, 66% 0, 66% 50%, 78% 50%, 78% 75%, 85% 75%, 85% 25%, 94% 25%, 94% 50%, 100% 50%, 100% 100%); }

/* ------------------------------------------------------------------ Home: hero */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(88vh, 860px); display: flex; align-items: flex-end; overflow: hidden; background: #1d2a1e; }
.hero__art { position: absolute; inset: 0; z-index: -2; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11,18,64,.88) 0%, rgba(11,18,64,.62) 38%, rgba(11,18,64,0) 66%), linear-gradient(0deg, rgba(11,18,64,.7) 0%, rgba(11,18,64,0) 45%); }
.hero__in { padding: 3rem 0 6.5rem; display: grid; gap: 1.4rem; max-width: 640px; }
.hero__logo { width: min(400px, 78vw); height: auto; filter: drop-shadow(0 6px 0 rgba(11,18,64,.45)); margin-bottom: .25rem; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3.05rem); text-shadow: 0 3px 0 var(--navy); }
.hero__lead { font-size: 1.15rem; max-width: 52ch; color: #eef3ff; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .4rem; }
.hero__note { font-size: .9rem; color: #c8d2f0; }
.win-ico { width: 1.05em; height: 1.05em; }
@media (max-width: 780px) {
  .hero { min-height: 0; align-items: stretch; flex-direction: column; background: var(--navy); }
  .hero__art { position: relative; aspect-ratio: 4 / 3; }
  .hero__art img { object-position: 50% 50%; }
  .hero::before { display: none; }
  .hero__in { padding: 0 0 5rem; margin-top: -3.5rem; }
  .hero__logo { width: min(300px, 72vw); }
}

/* ------------------------------------------------------------------ Home: the stack of layers (altitude gauge) */
.layers-intro { padding: 4.5rem 0 2.5rem; }
.layers-intro p { font-size: 1.15rem; color: var(--ink-soft); margin-top: .75rem; }
.strata { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.stratum { --bg: #000; --fg: #fff; --tick: rgba(255,255,255,.5); position: relative; background: var(--bg); color: var(--fg); padding: 3.25rem 0 4.25rem; }
.stratum + .stratum { margin-top: -24px; }
.stratum + .stratum::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 26px; background: var(--bg); transform: translateY(-100%);
  clip-path: polygon(0 100%, 0 40%, 9% 40%, 9% 0, 17% 0, 17% 60%, 30% 60%, 30% 20%, 38% 20%, 38% 60%, 52% 60%, 52% 0, 58% 0, 58% 40%, 71% 40%, 71% 70%, 80% 70%, 80% 20%, 91% 20%, 91% 50%, 100% 50%, 100% 100%); }
.stratum__in { display: grid; grid-template-columns: 170px 1fr auto; gap: 2rem; align-items: start; }
.stratum__where { font-family: var(--display); font-size: 1.2rem; padding-top: .3rem; border-top: 4px solid var(--fg); position: relative; padding-right: 1rem; }
.stratum__where::after { content: ""; position: absolute; right: 0; top: -4px; bottom: -999px; width: 4px; background: repeating-linear-gradient(var(--tick) 0 4px, transparent 4px 16px); }
.stratum h3 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.stratum p { margin-top: .6rem; max-width: 60ch; font-size: 1.08rem; }
.stratum__icon { width: 96px; height: 96px; image-rendering: pixelated; padding: 10px; border: var(--line) solid var(--navy); border-radius: 14px; background: var(--fg); box-shadow: 0 5px 0 var(--navy); }
.stratum--moon { --bg: #0B1240; --fg: #fff;
  background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff 99%, transparent), radial-gradient(1px 1px at 33% 70%, #fff 99%, transparent),
  radial-gradient(2px 2px at 58% 18%, #fff 99%, transparent), radial-gradient(1px 1px at 72% 60%, #fff 99%, transparent),
  radial-gradient(1.5px 1.5px at 88% 30%, #fff 99%, transparent), radial-gradient(1px 1px at 46% 45%, #cfd6ff 99%, transparent),
  radial-gradient(1px 1px at 22% 85%, #cfd6ff 99%, transparent), radial-gradient(1.5px 1.5px at 94% 82%, #fff 99%, transparent); }
.stratum--moon .stratum__icon { background: #E8E6F2; }
.stratum--space { --bg: #231a6b; --fg: #fff;
  background-image: radial-gradient(1px 1px at 18% 30%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 66% 24%, #fff 99%, transparent), radial-gradient(1px 1px at 84% 70%, #fff 99%, transparent); }
.stratum--space .stratum__icon { background: var(--indigo); }
.stratum--sky { --bg: #29BFFE; --fg: var(--navy); --tick: rgba(11,18,64,.4); }
.stratum--sky .stratum__icon { background: #fff; }
.stratum--surface { --bg: #7ED23C; --fg: var(--navy); --tick: rgba(11,18,64,.4); }
.stratum--surface .stratum__icon { background: var(--yellow); }
.stratum--sea { --bg: #0E8FB8; --fg: #fff; }
.stratum--sea .stratum__icon { background: var(--sky-light); }
.stratum--caves { --bg: #3a2c4f; --fg: #fff; }
.stratum--caves .stratum__icon { background: var(--violet); }
.stratum--hell { --bg: #D43902; --fg: #fff; background-image: linear-gradient(180deg, #D43902 0%, #FF6A00 100%); padding-bottom: 5rem; }
.stratum--hell .stratum__icon { background: var(--yellow); }
.stratum--surface .stratum__where::before { content: ""; position: absolute; left: -999px; right: 100%; top: -4px; height: 4px; background: var(--fg); }
@media (max-width: 780px) {
  .stratum__in { grid-template-columns: 1fr auto; gap: .9rem 1rem; }
  .stratum__where { grid-column: 1 / -1; border-top: 0; padding: 0; font-size: 1.05rem; opacity: .9; }
  .stratum__where::after, .stratum--surface .stratum__where::before { display: none; }
  .stratum__icon { width: 64px; height: 64px; padding: 6px; grid-row: 2; grid-column: 2; }
  .stratum__body { grid-row: 2; grid-column: 1; }
}

/* ------------------------------------------------------------------ Home: features */
.section { padding: 5rem 0; }
.section__head { margin-bottom: 2.5rem; }
.section__head p { margin-top: .75rem; font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem 2.25rem; list-style: none; margin: 0; padding: 0; }
.feature { display: grid; grid-template-columns: 72px 1fr; gap: 1.1rem; align-items: start; }
.feature__icon { width: 72px; height: 72px; padding: 10px; border: var(--line) solid var(--navy); border-radius: 14px; box-shadow: 0 5px 0 var(--navy); image-rendering: pixelated; }
.feature:nth-child(7n+1) .feature__icon { background: var(--coral); }
.feature:nth-child(7n+2) .feature__icon { background: var(--orange); }
.feature:nth-child(7n+3) .feature__icon { background: var(--yellow); }
.feature:nth-child(7n+4) .feature__icon { background: var(--lime); }
.feature:nth-child(7n+5) .feature__icon { background: var(--sky); }
.feature:nth-child(7n+6) .feature__icon { background: var(--indigo); }
.feature:nth-child(7n+7) .feature__icon { background: var(--violet); }
.feature h3 { font-size: 1.45rem; }
.feature p { margin-top: .35rem; color: var(--ink-soft); }

/* ------------------------------------------------------------------ Home: real screenshots */
.shots { padding-top: 4.5rem; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery li:first-child { grid-column: span 2; grid-row: span 2; }
.gallery figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.gallery a { display: block; flex: 1; border: var(--line) solid var(--navy); border-radius: 14px; overflow: hidden; box-shadow: 0 5px 0 var(--navy); background: var(--navy); }
.gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }
.gallery figcaption { margin-top: .55rem; font-weight: 700; font-size: .95rem; line-height: 1.35; }
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .gallery li:first-child { grid-column: auto; grid-row: auto; } }

/* ------------------------------------------------------------------ Home: what you do + modes */
.do { padding-top: 2rem; }
.features--four { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
@media (max-width: 520px) { .features--four { grid-template-columns: 1fr; } }
.modes { margin-top: 4rem; }
.modes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.mode { border: var(--line) solid var(--navy); border-radius: 18px; box-shadow: 0 6px 0 var(--navy); padding: 1.6rem 1.75rem; }
.mode img { width: 64px; height: 64px; image-rendering: pixelated; float: right; margin: 0 0 .5rem 1rem; }
.mode h3 { font-size: 2rem; }
.mode p { margin-top: .4rem; font-size: 1.1rem; }
.mode--survival { background: var(--lime); }
.mode--dreamer { background: var(--indigo); color: #fff; }
.modes__note { margin-top: 1.25rem; color: var(--ink-soft); font-weight: 600; }
@media (max-width: 700px) { .modes__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Home: creatures */
.creatures { background: var(--cream); padding: 5rem 0 5.5rem; border-block: var(--line) solid var(--navy); }
.hound { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 2rem; align-items: center; background: var(--navy); color: #fff;
  border: var(--line) solid var(--navy); border-radius: 18px; box-shadow: 0 7px 0 #000a33; padding: 1.5rem 2rem 1.5rem 1.5rem; margin-bottom: 2.5rem; }
.hound img { width: 100%; height: auto; background: radial-gradient(circle at 50% 60%, #2d3780 0 55%, transparent 56%); }
.hound h3 { font-size: clamp(2rem, 4vw, 3rem); color: var(--orange-light); }
.hound p { margin-top: .5rem; font-size: 1.12rem; max-width: 46ch; }
.bestiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.beast { text-align: center; }
.beast img { width: 100%; aspect-ratio: 1; height: auto; background: #fff; border: var(--line) solid var(--navy); border-radius: 14px; box-shadow: 0 5px 0 var(--navy); padding: 6px; }
.beast:nth-child(4n+1) img { background: #dff3ff; }
.beast:nth-child(4n+2) img { background: #fff3d6; }
.beast:nth-child(4n+3) img { background: #ecffd9; }
.beast:nth-child(4n+4) img { background: #f3e9ff; }
.beast--hell img { background: #ffe2d1 !important; }
.beast span { display: block; margin-top: .7rem; font-weight: 700; font-size: .98rem; }
.flora-note { margin-top: 2.25rem; font-size: 1.12rem; font-weight: 600; display: flex; gap: .8rem; align-items: center; }
.flora-note img { width: 40px; height: 40px; image-rendering: pixelated; flex: none; }
@media (max-width: 680px) {
  .hound { grid-template-columns: 1fr; padding: 1.25rem; }
  .hound img { max-width: 240px; margin-inline: auto; }
  .bestiary { grid-template-columns: repeat(3, 1fr); gap: .9rem; }
  .beast span { font-size: .85rem; }
}

/* ------------------------------------------------------------------ Home: shop teaser */
.teaser { background: var(--navy); color: #fff; padding: 5rem 0; }
.teaser__in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.teaser p { margin: 1rem 0 1.75rem; font-size: 1.15rem; color: #dfe5ff; max-width: 48ch; }
.teaser__items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.teaser__items:empty { display: none; }
.slot-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.slot-strip li { padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--navy); border: 2px solid var(--navy); }
.slot-strip li:nth-child(7n+1) { background: var(--coral); }
.slot-strip li:nth-child(7n+2) { background: var(--orange); }
.slot-strip li:nth-child(7n+3) { background: var(--yellow); }
.slot-strip li:nth-child(7n+4) { background: var(--lime); }
.slot-strip li:nth-child(7n+5) { background: var(--sky); }
.slot-strip li:nth-child(7n+6) { background: var(--indigo); color: #fff; }
.slot-strip li:nth-child(7n+7) { background: var(--violet); color: #fff; }
@media (max-width: 860px) { .teaser__in { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ FAQ */
.faq { display: grid; gap: .9rem; max-width: 820px; }
.faq details { border: var(--line) solid var(--navy); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--navy); }
.faq summary { cursor: pointer; list-style: none; padding: 1.05rem 3.25rem 1.05rem 1.3rem; font-family: var(--display); font-size: 1.3rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 1.2rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--orange); border: 2px solid var(--navy); border-radius: 3px;
  clip-path: polygon(0 35%, 35% 35%, 35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); max-width: 68ch; }

/* ------------------------------------------------------------------ End band */
.endband { background: var(--orange); border-top: var(--line) solid var(--navy); overflow: hidden; }
.endband__in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3rem 0 0; }
.endband h2 { color: #fff; -webkit-text-stroke: 6px var(--navy); paint-order: stroke fill; }
.endband__in > div { padding-bottom: 3rem; }
.endband .btn { margin-top: 1.25rem; }
.endband img { width: 260px; height: auto; align-self: flex-end; margin-bottom: -40px; }
@media (max-width: 680px) { .endband img { width: 150px; } .endband__in { align-items: flex-end; } }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--navy); color: #cfd6f5; padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer h2 { font-size: 1.15rem; color: #fff; margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer__brand img { width: 160px; height: auto; margin-bottom: .75rem; }
.site-footer__parents { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px solid #232c6e; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
@media (max-width: 780px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ Generic page head */
.page-head { background: var(--sky-light); border-bottom: var(--line) solid var(--navy); padding: 3rem 0 3.5rem; }
.page-head p { margin-top: .6rem; font-size: 1.15rem; color: var(--ink-soft); }
.page-head--navy { background: var(--navy); color: #fff; }
.page-head--navy p { color: #dfe5ff; }

/* ------------------------------------------------------------------ Panels & forms */
.panel { background: #fff; border: var(--line) solid var(--navy); border-radius: 16px; box-shadow: 0 6px 0 var(--navy); padding: 1.75rem; }
.field { display: grid; gap: .35rem; }
.field__label { font-weight: 700; }
.field__hint { font-size: .88rem; color: var(--ink-soft); }
.field input, .field select, .input {
  width: 100%; min-height: 3rem; padding: .65rem .9rem; border: var(--line) solid var(--navy); border-radius: 10px; background: #fff; font-size: 1.05rem; }
.field input:focus, .input:focus, .field select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(41,191,254,.35); }
.field input[aria-invalid="true"] { border-color: var(--coral); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3.25rem; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: #eef5ff; }
.pw-toggle svg { width: 22px; height: 22px; }
.form-error { padding: .75rem 1rem; border-radius: 10px; background: #ffe0e2; border: 2px solid var(--coral); font-weight: 600; }
.form-ok { padding: .75rem 1rem; border-radius: 10px; background: #e7ffd0; border: 2px solid #57a300; font-weight: 600; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--ink-soft); font-size: .95rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: #d3dcef; }

/* Auth layout: card with the mascot peeking over its top edge */
.auth { min-height: calc(100vh - 68px); padding: 5.5rem 0 4rem; background:
  linear-gradient(180deg, var(--sky-light) 0 55%, #7ED23C 55% 58%, #5fb52a 58% 100%); }
.auth__card { position: relative; width: min(100% - 2rem, 470px); margin-inline: auto; }
.auth__mascot { position: absolute; left: 50%; top: 0; width: 132px; height: 132px; transform: translate(-50%, -76%); z-index: 0; }
.auth__card .panel { position: relative; z-index: 1; padding: 2rem 1.75rem 1.75rem; }
.auth h1 { font-size: 2.3rem; text-align: center; }
.auth__lead { text-align: center; color: var(--ink-soft); margin-top: .4rem; }
.auth form { display: grid; gap: 1.05rem; }
.auth__alt { text-align: center; margin-top: 1.25rem; font-size: .98rem; }
.auth__alt a { font-weight: 700; }
.legal-note { font-size: .86rem; color: var(--ink-soft); text-align: center; }
.btn-google { --face: #fff; --side: #b9c6e6; --txt: var(--navy); text-shadow: none; font-family: var(--body); font-weight: 700; font-size: 1.12rem; min-height: 3.5rem; }
.btn-google svg { width: 24px; height: 24px; }
.auth__state { text-align: center; display: grid; gap: 1rem; justify-items: center; }
.auth__state h1 { font-size: 2rem; }

/* Link page code */
.code-box { font-family: var(--display); font-size: clamp(2.2rem, 9vw, 3.4rem); letter-spacing: .12em; text-align: center; padding: 1rem .5rem; border: var(--line) solid var(--navy);
  border-radius: 14px; background: var(--yellow); box-shadow: 0 5px 0 var(--navy); font-variant-numeric: tabular-nums; }
.code-label { text-align: center; font-weight: 700; color: var(--ink-soft); }
.warn-note { font-size: .92rem; background: var(--cream); border: 2px dashed var(--orange); border-radius: 10px; padding: .7rem .9rem; }

/* ------------------------------------------------------------------ Shop */
.shop-head__in { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.wallet { display: flex; align-items: center; gap: 1rem; background: var(--navy-2); border: var(--line) solid #000a33; border-radius: 14px; padding: .6rem .7rem .6rem 1rem; }
.wallet__amount { display: flex; align-items: center; gap: .45rem; font-family: var(--display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.wallet__amount .gem { width: 28px; height: 28px; }
.wallet__label { font-size: .82rem; color: #b9c3ee; display: block; }
.shop-tools { display: grid; gap: 1.1rem; padding: 2rem 0 1rem; }
.shop-tools__row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.shop-search { flex: 1 1 260px; position: relative; }
.shop-search svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-soft); pointer-events: none; }
.shop-search .input { padding-left: 2.6rem; }
.shop-sort { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.shop-sort select { width: auto; min-height: 3rem; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem .1rem .55rem; scrollbar-width: thin; }
.chips__label { font-weight: 700; align-self: center; margin-right: .25rem; white-space: nowrap; }
.chip { flex: none; padding: .45rem .95rem; border: 2px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 700; cursor: pointer; font-size: .95rem; white-space: nowrap; }
.chip:hover { background: #eef7ff; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: 0 3px 0 #000a33; }
.chip--rarity { display: inline-flex; align-items: center; gap: .45rem; }
.chip--rarity::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--rc, #999); border: 2px solid var(--navy); }
.shop-count { color: var(--ink-soft); font-weight: 600; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.25rem; padding: .5rem 0 4rem; }
.item { --rc: #9aa5b1; color: var(--navy); text-decoration: none; position: relative; display: grid; grid-template-rows: auto 1fr; text-align: left; padding: 0; border: var(--line) solid var(--navy); border-radius: 14px; background: #fff;
  box-shadow: 0 5px 0 var(--navy); cursor: pointer; overflow: hidden; transition: transform .12s ease, box-shadow .12s ease; }
.item:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--navy); }
.item:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--navy); }
.item__art { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rc) 35%, #fff) 0 40%, color-mix(in srgb, var(--rc) 70%, #fff) 100%);
  border-bottom: var(--line) solid var(--navy); display: grid; place-items: center; }
.item__art img { width: 82%; height: 82%; object-fit: contain; }
.item__art .item__ph { width: 46%; height: 46%; opacity: .7; }
.item__body { padding: .7rem .85rem .85rem; display: grid; gap: .3rem; align-content: start; }
.item__name { font-family: var(--display); font-size: 1.18rem; line-height: 1.12; }
.item__meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .86rem; }
.rarity-tag { display: inline-block; padding: .08rem .5rem; border-radius: 6px; background: var(--rc); color: #fff; font-weight: 700; font-size: .8rem; border: 2px solid var(--navy); text-shadow: 0 1px 0 rgba(11,18,64,.4); }
.price { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price .gem { width: 18px; height: 18px; }
.badges { position: absolute; top: .55rem; left: .55rem; right: .55rem; display: flex; flex-wrap: wrap; gap: .35rem; z-index: 1; }
.badge { padding: .12rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 700; border: 2px solid var(--navy); background: #fff; }
.badge--new { background: var(--yellow); }
.badge--owned { background: var(--lime); }
.badge--equipped { background: var(--sky); color: #fff; text-shadow: 0 1px 0 rgba(11,18,64,.4); }
.shop-empty, .shop-error { text-align: center; padding: 3rem 1rem 5rem; display: grid; gap: 1rem; justify-items: center; }
.shop-empty img, .shop-error img { width: 72px; height: 72px; image-rendering: pixelated; }
.skeleton { aspect-ratio: .78; border-radius: 14px; background: linear-gradient(90deg, #dbe9f6 0 40%, #eaf4fd 50%, #dbe9f6 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* Item dialog */
.item-dlg { --rc: #9aa5b1; }
.item-dlg__grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; padding: 1.75rem; }
.item-dlg__art { aspect-ratio: 1; border: var(--line) solid var(--navy); border-radius: 14px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rc) 30%, #fff) 0 40%, color-mix(in srgb, var(--rc) 75%, #fff) 100%); box-shadow: 0 5px 0 var(--navy); }
.item-dlg__art img { width: 86%; height: 86%; object-fit: contain; }
.item-dlg__info { display: grid; gap: .8rem; align-content: start; }
.item-dlg__info h2 { font-size: 2rem; }
.item-dlg__tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.slot-tag { padding: .08rem .55rem; border-radius: 6px; border: 2px solid var(--navy); font-weight: 700; font-size: .8rem; background: var(--cream); }
.item-dlg__desc { color: var(--ink-soft); }
.item-dlg__price { display: flex; align-items: center; gap: .45rem; font-family: var(--display); font-size: 1.7rem; }
.item-dlg__price .gem { width: 28px; height: 28px; }
.item-dlg__actions { display: grid; gap: .7rem; }
.item-dlg__msg { font-weight: 600; }
@media (max-width: 600px) { .item-dlg__grid { grid-template-columns: 1fr; } .item-dlg__art { max-width: 220px; width: 100%; margin-inline: auto; } }

/* Gem packs */
.packs { display: grid; gap: .8rem; padding: 0 1.75rem 1rem; }
#gems-dialog .dialog__body { padding-bottom: 1rem; color: var(--ink-soft); }
.pack { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: .85rem 1rem; border: var(--line) solid var(--navy); border-radius: 14px; background: #f5fbff; }
.pack:nth-child(5n+1) .pack__gems { background: var(--sky-light); }
.pack:nth-child(5n+2) .pack__gems { background: var(--sky); }
.pack:nth-child(5n+3) .pack__gems { background: var(--indigo); }
.pack:nth-child(5n+4) .pack__gems { background: var(--violet); }
.pack:nth-child(5n+5) .pack__gems { background: var(--orange); }
.pack__gems { width: 56px; height: 56px; display: grid; place-items: center; border: var(--line) solid var(--navy); border-radius: 12px; }
.pack__gems .gem { width: 30px; height: 30px; }
.pack__amount { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
.pack__bonus { display: inline-block; font-size: .8rem; font-weight: 700; background: var(--lime); border: 2px solid var(--navy); border-radius: 6px; padding: 0 .4rem; margin-top: .2rem; }
.packs-note { padding: 0 1.75rem 1.75rem; font-size: .9rem; color: var(--ink-soft); display: flex; gap: .7rem; align-items: flex-start; }
.packs-note svg { width: 22px; height: 22px; flex: none; margin-top: .1rem; }
@media (max-width: 480px) { .pack { grid-template-columns: auto 1fr; } .pack .btn { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ Account */
.profile { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; }
.avatar--xl { width: 112px; height: 112px; border-width: var(--line); border-radius: 18px; box-shadow: 0 5px 0 #000a33; font-size: 3rem; }
.profile h1 { font-size: clamp(2rem, 5vw, 3rem); word-break: break-word; }
.profile__email { color: #cfd6f5; font-size: .95rem; margin-top: .2rem; }
.level { margin-top: .9rem; max-width: 460px; }
.level__row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.level__n { font-family: var(--display); font-size: 1.35rem; color: var(--yellow); }
.level__xp { font-size: .9rem; color: #cfd6f5; font-variant-numeric: tabular-nums; }
.xpbar { margin-top: .4rem; height: 22px; border: var(--line) solid #000a33; border-radius: 8px; background: var(--navy-2); overflow: hidden; }
.xpbar__fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 18px, #74d602 18px 20px); border-right: 3px solid #000a33; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2.5rem 0; padding: 0; list-style: none; }
.stat { background: #fff; border: var(--line) solid var(--navy); border-radius: 14px; box-shadow: 0 5px 0 var(--navy); padding: 1rem 1.1rem; }
.stat__label { font-size: .88rem; color: var(--ink-soft); font-weight: 600; }
.stat__value { font-family: var(--display); font-size: 2rem; display: flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat__value .gem { width: 26px; height: 26px; }
.stat--date .stat__value { font-size: 1.25rem; padding-top: .35rem; }
.stat:nth-child(1) { background: #e3f6ff; }
.stat:nth-child(2) { background: #fff3d6; }
.stat:nth-child(3) { background: #ecffd9; }
.stat:nth-child(4) { background: #f3e9ff; }
.cos-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.cos-slot { margin-bottom: 2rem; }
.cos-slot h3 { font-size: 1.35rem; margin-bottom: .75rem; display: flex; align-items: center; gap: .6rem; }
.cos-slot h3 small { font-family: var(--body); font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.cos { --rc: #9aa5b1; border: var(--line) solid var(--navy); border-radius: 14px; background: #fff; overflow: hidden; display: grid; box-shadow: 0 4px 0 var(--navy); }
.cos.is-equipped { outline: 4px solid var(--sky); outline-offset: 2px; }
.cos .item__art { aspect-ratio: 4 / 3; }
.cos__body { padding: .55rem .7rem .7rem; display: grid; gap: .45rem; }
.cos__name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.cos-none { color: var(--ink-soft); font-size: .95rem; padding: .25rem 0; }
.account-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-end; }
@media (max-width: 780px) {
  .profile { grid-template-columns: auto 1fr; }
  .profile .account-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .avatar--xl { width: 84px; height: 84px; font-size: 2.3rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------------------ Download */
.dl { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; padding: 3.5rem 0 5rem; }
.dl__main { display: grid; gap: 1.25rem; align-content: start; }
.dl__info { color: var(--ink-soft); font-weight: 600; }
.dl__soon { background: var(--cream); border: var(--line) solid var(--navy); border-radius: 12px; padding: .9rem 1.1rem; font-weight: 600; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: center; }
.steps li::before { content: counter(step); width: 48px; height: 48px; display: grid; place-items: center; font-family: var(--display); font-size: 1.5rem; color: #fff;
  background: var(--orange); border: var(--line) solid var(--navy); border-radius: 10px; box-shadow: 0 4px 0 var(--navy); }
.reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.reqs li { display: flex; gap: .7rem; align-items: center; }
.reqs img { width: 32px; height: 32px; image-rendering: pixelated; }
.dl__art { border: var(--line) solid var(--navy); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 0 var(--navy); }
.dl__art img { width: 100%; height: auto; }
@media (max-width: 860px) { .dl { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Legal + 404 */
.legal { padding: 3rem 0 5rem; }
.legal section { margin-top: 2rem; max-width: 70ch; }
.legal h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.legal p { color: var(--ink-soft); }
.legal__updated { font-size: .92rem; color: var(--ink-soft); margin-top: .5rem; }
.contact-line a { font-weight: 700; color: var(--navy); }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }
.notfound img { width: 120px; margin: 0 auto 1.5rem; image-rendering: pixelated; }
.notfound p { margin: .75rem 0 1.75rem; font-size: 1.15rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 520px) {
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .item__name { font-size: 1rem; }
  .item__meta { flex-wrap: wrap; }
  .cos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ Legal documents (legal / terms / privacy) */
.legal-binding { font-size: .9rem; color: var(--ink-soft); font-style: italic; max-width: 70ch; margin: 0 0 1rem; }
.legal section > div > * + * { margin-top: .75rem; }
.legal ul, .legal ol { color: var(--ink-soft); padding-left: 1.3rem; margin: .5rem 0; }
.legal li + li { margin-top: .35rem; }
.legal a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal-id { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: .45rem 1.25rem; margin: .75rem 0;
  padding: 1rem 1.25rem; background: #fff; border: var(--line) solid var(--navy); border-radius: var(--r); }
.legal-id dt { font-weight: 700; font-size: .92rem; }
.legal-id dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .legal-id { grid-template-columns: 1fr; gap: .1rem; } .legal-id dd { margin-bottom: .5rem; } }
.legal-table { overflow-x: auto; margin: .75rem 0; }
.legal-table table { width: 100%; min-width: 520px; border-collapse: collapse; background: #fff; border: var(--line) solid var(--navy); border-radius: var(--r); font-size: .94rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid #d6e3f0; }
.legal-table th { background: var(--cream); }
.legal-table td { color: var(--ink-soft); }
.legal-toc { margin-top: 2rem; max-width: 70ch; padding: 1rem 1.25rem; background: #fff; border: var(--line) solid var(--navy); border-radius: var(--r); }
.legal-toc h2 { font-size: 1.25rem; }
.legal-toc ol { columns: 2 16rem; margin: .5rem 0 0; }
.legal-toc a { font-weight: 400; text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal section[id] { scroll-margin-top: 96px; }
.consent { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem; font-size: .88rem; line-height: 1.45; cursor: pointer; }
.consent input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--orange); }
.consent a { color: var(--navy); font-weight: 700; text-decoration: underline; }
.consent--error { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 4px; }
.packs-launcher { font-size: .8rem; color: var(--ink-soft); margin-top: .5rem; }

/* ------------------------------------------------------------------ promo agent: gallery note (illustrations) */
.shots__note { margin-top: .35rem; font-size: .85rem; opacity: .72; }

/* ================================================================== BESTIAIRE (bestiaire agent): /creatures + home creature links */
.beast-card--passive, .beast-badge--passive, .beast-chip--passive { --cc: var(--lime); --cc-soft: #ecffd6; }
.beast-card--neutral, .beast-badge--neutral, .beast-chip--neutral { --cc: var(--yellow); --cc-soft: #fff6c4; }
.beast-card--hostile, .beast-badge--hostile, .beast-chip--hostile { --cc: var(--coral); --cc-soft: #ffe1e3; }
.beast-card--birds, .beast-badge--birds, .beast-chip--birds { --cc: var(--sky); --cc-soft: #dcf4ff; }
.beast-card--water, .beast-badge--water, .beast-chip--water { --cc: var(--indigo); --cc-soft: #e5e3ff; }
.beast-card--depths, .beast-badge--depths, .beast-chip--depths { --cc: var(--orange-dark); --cc-soft: #ffe0cf; }
.beast-card--space, .beast-badge--space, .beast-chip--space { --cc: var(--violet); --cc-soft: #f4e2ff; }
.beasts-head { padding: 2.5rem 0 0; overflow: hidden; }
.beasts-head__in { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1.5rem; }
.beasts-head__in > div { padding-bottom: 2.5rem; }
.beasts-head p { max-width: 58ch; }
.beasts-head__mascot { width: 220px; height: auto; margin-bottom: -18px; }
.beasts-tools { display: grid; gap: .9rem; padding: 1.75rem 0 1rem; }
.beasts-search { max-width: 520px; }
.beasts-chips { flex-wrap: wrap; overflow: visible; }
.beast-chip { display: inline-flex; align-items: center; gap: .45rem; }
.beast-chip:not([data-cat="all"])::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--cc); border: 2px solid var(--navy); }
.beast-chip__n { font-weight: 600; font-size: .82rem; opacity: .7; font-variant-numeric: tabular-nums; }
.beasts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.1rem; list-style: none; margin: 0; padding: .5rem 0 2rem; }
.beasts > li { content-visibility: auto; contain-intrinsic-size: auto 230px; }
.beast-card { display: grid; grid-template-rows: auto 1fr auto; gap: .35rem; height: 100%; padding: 0 0 .7rem; text-decoration: none; color: var(--navy);
  background: #fff; border: var(--line) solid var(--navy); border-radius: 14px; box-shadow: 0 5px 0 var(--navy); overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease; }
.beast-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--navy); }
.beast-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--navy); }
.beast-card__art { display: grid; place-items: center; aspect-ratio: 1; border-bottom: var(--line) solid var(--navy);
  background: radial-gradient(circle at 50% 46%, #fff 0 34%, var(--cc-soft) 70%); }
.beast-card__art img { width: 92%; height: 92%; object-fit: contain; }
.beast-card__name { padding: 0 .7rem; font-family: var(--display); font-size: 1.08rem; line-height: 1.12; overflow-wrap: anywhere; }
.beast-badge { justify-self: start; margin: 0 .7rem; padding: .05rem .45rem; border: 2px solid var(--navy); border-radius: 6px; background: var(--cc); font-size: .74rem; font-weight: 700; line-height: 1.4; }
.beast-badge--hostile, .beast-badge--water, .beast-badge--depths, .beast-badge--space { color: #fff; text-shadow: 0 1px 0 rgba(11,18,64,.45); }
.beasts-more { height: 1px; }

.beast-dlg { width: min(100% - 2rem, 1000px); max-height: min(94vh, 980px); overflow: auto; overscroll-behavior: contain; }
.beast-dlg__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; background: #fff; border-bottom: 2px solid #dbe4f5; }
.beast-dlg__bar .close-btn[disabled] { opacity: .35; cursor: default; }
.beast-dlg__hint { margin-right: auto; padding-left: .5rem; font-size: .85rem; color: var(--ink-soft); }
.beast-dlg__grid { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 1.75rem; padding: 1.5rem 1.75rem 2rem; align-items: start; }
.beast-dlg__stage { position: sticky; top: 76px; aspect-ratio: 1; display: grid; place-items: center; border: var(--line) solid var(--navy); border-radius: 18px;
  box-shadow: 0 6px 0 var(--navy); background: radial-gradient(circle at 50% 44%, #fff 0 30%, var(--cc-soft) 62%, color-mix(in srgb, var(--cc) 45%, #fff) 100%); }
.beast-dlg__stage img { width: 96%; height: auto; }
.beast-dlg__info { display: grid; gap: .55rem; align-content: start; min-width: 0; }
.beast-dlg__info h2 { font-size: clamp(2rem, 4vw, 2.8rem); overflow-wrap: anywhere; }
.beast-dlg__info h3 { margin-top: 1rem; font-size: 1.25rem; }
.beast-dlg__desc { font-size: 1.08rem; color: var(--ink-soft); max-width: 52ch; }
.beast-stats { display: grid; gap: .45rem; margin: 0; }
.beast-stat { display: grid; grid-template-columns: minmax(7.5rem, auto) 1fr; gap: .8rem; align-items: center; }
.beast-stat dt { font-weight: 700; font-size: .95rem; min-width: 0; hyphens: auto; overflow-wrap: anywhere; }
.beast-stat dd { margin: 0; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.beast-stat__bar { display: inline-flex; gap: 3px; }
.beast-stat__bar i { width: 15px; height: 15px; border: 2px solid var(--navy); border-radius: 3px; background: #e8eef8; }
.beast-stat__bar i.on { background: var(--orange); box-shadow: inset 0 -3px 0 var(--orange-dark); }
.beast-stat__v { font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.beast-tags, .beast-zones, .beast-drops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.beast-tag { padding: .2rem .65rem; border: 2px solid var(--navy); border-radius: 999px; background: var(--cream); font-size: .88rem; font-weight: 600; }
.beast-tag--hostile { background: #ffd5d8; } .beast-tag--neutral { background: #fff0a8; } .beast-tag--passive { background: #dcffc0; }
.beast-tag--undead, .beast-tag--night { background: #dfe3ff; } .beast-tag--swim { background: #d4f1ff; } .beast-tag--mascot, .beast-tag--berries { background: #ffe2c9; }
.beast-zone { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem .2rem .45rem; border: 2px solid #b9c6e6; border-radius: 8px; background: #fff; font-size: .88rem; }
.beast-zone svg { width: 15px; height: 15px; flex: none; }
.beast-more { justify-self: start; padding: .25rem .7rem; border: 2px solid var(--navy); border-radius: 8px; background: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; }
.beast-more:hover { background: var(--cream); }
.beast-drops { display: grid; gap: .3rem; }
.beast-drops li { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.beast-drops__n { min-width: 3.2rem; font-family: var(--display); font-size: 1.05rem; }
.beast-drops__name { font-weight: 700; }
.beast-drops__p { color: var(--ink-soft); font-size: .88rem; }
.beast-none { color: var(--ink-soft); }
@media (max-width: 760px) {
  .beasts-head__mascot { width: 120px; }
  .beasts-chips { flex-wrap: nowrap; overflow-x: auto; }
  .beast-stat { grid-template-columns: minmax(0, 6.6rem) 1fr; gap: .5rem; }
  .beast-stat__bar i { width: 11px; height: 11px; border-width: 1.5px; }
  .beast-stat__v { font-size: .85rem; }
  .beasts-head__in > div { padding-bottom: 1.5rem; }
  .beasts { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .8rem; }
  .beast-card__name { font-size: .98rem; }
  .beast-dlg { width: 100%; max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; margin: 0; }
  .beast-dlg__grid { grid-template-columns: 1fr; padding: 1rem 1.1rem 2rem; gap: 1rem; }
  .beast-dlg__stage { position: static; width: min(100%, 300px); margin-inline: auto; }
  .beast-dlg__hint { display: none; }
  .beast-dlg__bar .close-btn[data-close] { margin-left: auto; }
}
@media (max-width: 520px) {
  .beasts-head__in { grid-template-columns: 1fr; }
  .beasts-head__mascot { display: none; }
  .beasts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .beast-card { border-radius: 12px; box-shadow: 0 4px 0 var(--navy); padding-bottom: .5rem; gap: .25rem; }
  .beast-card__name { padding: 0 .45rem; font-size: .86rem; }
  .beast-badge { margin: 0 .45rem; font-size: .64rem; padding: 0 .3rem; }
}
/* Home: every creature links to its page. */
.beast a { color: inherit; text-decoration: none; }
a.hound { text-decoration: none; }
.beast a { display: block; border-radius: 14px; }
.beast a img { transition: transform .12s ease, box-shadow .12s ease; }
.beast a:hover img { transform: translateY(-3px); box-shadow: 0 8px 0 var(--navy); }
a.hound:hover { filter: brightness(1.08); }
.creatures__all { display: flex; justify-content: center; margin-top: 2.25rem; }
/* ================================================================== /BESTIAIRE */
