/* Sunstone Atlas: fixed page gutters, a balanced welcome, stable card geometry. */
:root {
 --ss-content-edge: 32px;
 --ss-hero-ink: hsl(218 36% 10%);
 --ss-hero-light: hsl(210 30% 98%);
 --ss-hero-glass: hsl(0 0% 100% / .92);
 --ss-hero-line: hsl(0 0% 100% / .35);
 --ss-hero-depth: hsl(218 36% 8% / .24);
 --ss-discord-cover: hsl(235 45% 27%);
}
[data-bs-theme="dark"] { --ss-hero-glass: hsl(218 30% 12% / .94); }
/* Bootstrap's light-mode body resets this token to 1.5; dark mode inherited 1.6. */
body[data-bs-theme] { --bs-body-line-height: 1.6; line-height: 1.6; }
.ss-main .container,.ss-footer .container {
 --bs-gutter-x: calc(var(--ss-content-edge) * 2);
 width: 100%; max-width: none; padding-inline: var(--ss-content-edge);
}
.ss-brand--text { min-width: 0; max-width: 220px; }
.ss-brand--text .ss-brand-word { min-width: 0; display: grid; gap: 5px; }
.ss-brand--text .ss-brand-word b { font-size: 1.65rem; line-height: 1.1; letter-spacing: -.04em; }
.ss-brand--text .ss-brand-word small { max-width: 210px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .7rem/1.35 var(--ss-font); letter-spacing: 0; color: var(--band-muted); }
.ss-masthead { transition: transform .22s ease; }
.ss-masthead.ss-topbar-hidden { transform: translateY(calc(-1 * var(--ss-topbar-h,40px))); }
.ss-blog-viewport { scroll-margin-top: calc(var(--ss-nav-visible-h,var(--ss-nav-h)) + 20px); }
.ss-aside { top: calc(var(--ss-nav-visible-h,var(--ss-nav-h)) + 24px); }
.ss-section-head:not(.ss-section-head--center)::before { margin-top: 0; }

/* Sunstone Realm: the server mark floats in its world, with familiar Minecraft shortcuts. */
:root { --ss-realm-fg: hsl(210 30% 98%); --ss-realm-muted: hsl(210 24% 86%); --ss-realm-shadow: hsl(219 45% 5% / .55); }
.ss-hero.ss-hero--realm { display: block; min-height: 0; padding: 0; color: var(--ss-realm-fg); background: var(--ss-hero-ink); }
.ss-hero.ss-hero--realm::after { background: linear-gradient(180deg,hsl(219 40% 8% / .28),hsl(219 40% 8% / .48) 48%,hsl(219 40% 8% / .66)); }
.ss-hero--realm .ss-layer--panorama { object-position: center 48%; }
.ss-hero--realm .ss-hero-minecraft { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 460px; padding-block: 50px 42px; }
.ss-realm-launch { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,380px) minmax(0,1fr); align-items: center; gap: 48px; }
.ss-realm-brand { grid-column: 2; grid-row: 1; text-align: center; min-width: 0; }
.ss-realm-logo { display: block; width: 100%; height: 110px; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 6px 14px var(--ss-realm-shadow)); }
.ss-realm-title { margin: 0; color: var(--ss-realm-fg); font: 800 3.5rem/1.1 var(--ss-display); text-shadow: 0 3px 12px var(--ss-realm-shadow); }
.ss-realm-title { overflow-wrap: anywhere; }
.ss-realm-slogan { margin: 19px auto 0; color: var(--ss-realm-fg); max-width: 42ch; font: 500 1.03rem/1.55 var(--ss-font); text-wrap: balance; text-shadow: 0 2px 8px var(--ss-realm-shadow); }
.ss-realm-link { display: flex; align-items: center; gap: 16px; width: fit-content; max-width: 100%; min-height: 76px; padding: 10px 0; border: 0; border-radius: 12px; background: transparent; color: var(--ss-realm-fg); text-align: left; text-shadow: 0 2px 8px var(--ss-realm-shadow); }
.ss-realm-link:hover { color: var(--ss-realm-fg); }
.ss-realm-link:hover .ss-realm-icon { color: var(--ss-accent); }
.ss-realm-ip { grid-column: 1; grid-row: 1; justify-self: start; cursor: pointer; }
.ss-realm-discord { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; }
.ss-realm-icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; font-size: 2.65rem; color: var(--ss-realm-fg); filter: drop-shadow(0 3px 7px var(--ss-realm-shadow)); transition: color .18s; }
.ss-realm-icon .ss-discord-icon { width: 48px; height: 38px; }
.ss-realm-link-copy { display: grid; gap: 5px; min-width: 0; }
.ss-realm-link-copy small { color: var(--ss-realm-muted); font: 500 .78rem/1.3 var(--ss-font); }
.ss-realm-link-copy b { color: var(--ss-realm-fg); font: 750 1.3rem/1.2 var(--ss-display); overflow-wrap: anywhere; }
.ss-realm-link-copy > span { display: flex; align-items: center; gap: 6px; color: var(--ss-realm-muted); font: 500 .76rem/1.3 var(--ss-font); }
.ss-realm-discord .ss-realm-link-copy > span { justify-content: flex-end; }
.ss-realm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.ss-realm-actions .btn { min-height: 52px; min-width: 170px; padding: 13px 22px; border-radius: 12px; font-size: .95rem; }
.ss-realm-store { border: 1px solid hsl(0 0% 100% / .55); background: hsl(219 40% 8% / .28); color: var(--ss-realm-fg); box-shadow: none; }
.ss-realm-store:hover { border-color: var(--ss-realm-fg); background: hsl(219 40% 8% / .5); color: var(--ss-realm-fg); }
.ss-realm-season { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin-top: 24px; color: var(--ss-realm-muted); font: 500 .8rem/1.4 var(--ss-font); text-shadow: 0 2px 7px var(--ss-realm-shadow); }
.ss-realm-season .ss-live { width: 6px; height: 6px; flex: none; }
.ss-realm-countdown { display: flex; gap: 9px; font-variant-numeric: tabular-nums; color: var(--ss-realm-fg); }
.ss-realm-countdown b { display: inline-block; min-width: 2ch; font-weight: 650; }
.ss-realm-dispatch { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; min-height: 44px; color: var(--ss-realm-fg); font-size: .85rem; }
.ss-realm-dispatch:hover { color: var(--ss-realm-fg); text-decoration: underline; }
.ss-realm-dispatch small { color: var(--ss-realm-muted); }
.ss-main > .ss-hero--realm + .ss-stats { margin-top: 0; }
/* Keep all three tracks within the featured category; artwork may shrink, the footer may not. */
@media(min-width:576px) {
 .ss-cats .ss-cat--xl { min-height: 0; grid-template-rows: auto minmax(0,1fr) auto; }
 .ss-cats .ss-cat--xl .ss-cat-stage { width: min(100%,345px); height: 100%; min-height: 0; max-height: 100%; aspect-ratio: auto; margin-block: 0; align-self: stretch; }
 .ss-cats .ss-cat--xl .ss-cat-stage--world img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
 .ss-cats .ss-cat--xl .ss-cat-foot { flex: none; min-height: 54px; margin-top: 12px; }
}

/* Colour changes never interpolate sizes or page snapshots. */
.ss-home-news .ss-news-lead { height: 100%; min-height: 500px; }
.ss-home-news .ss-news-row { min-height: 238px; height: auto; flex: 1 1 0 !important; }
.ss-home-news .ss-news-row .ss-news-thumb { min-height: 0; }
.ss-home-news .ss-news-card:not(.ss-news-row) { display: flex; flex-direction: column; height: 100%; min-height: 370px; }
.ss-home-news .ss-news-card:not(.ss-news-row) .ss-news-thumb { height: 170px; min-height: 170px; aspect-ratio: auto; }
.ss-home-news .ss-news-body { min-width: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.ss-home-news .ss-news-title { font-size: 1.18rem; line-height: 1.25; }
.ss-home-news .ss-news-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ss-home-news .ss-news-foot { margin-top: auto; }
.ss-home-news :is(.ss-news-card,.ss-news-lead,.ss-news-box) { transition-property: background-color,border-color,color,box-shadow; }
.ss-home-news .ss-news-card:hover,.ss-motion .ss-home-news .ss-news-card[data-ss-reveal].is-in:hover { transform: none; }
.ss-home-news img { image-rendering: auto; }
.ss-blog-viewport.is-loading { cursor: progress; }
.ss-blog-viewport.is-loading::after { content: ''; display: block; position: sticky; bottom: 12px; width: 64px; height: 3px; margin: 12px auto -15px; background: var(--ss-accent); border-radius: 3px; }
.ss-blog-viewport .ss-blog-status { padding: 12px 16px; border: 1px solid var(--ss-danger); border-radius: 12px; }

/* Consistent sidebar clipping, including its cover and the last active row. */
.ss-store-catnav { overflow: hidden; border: 1px solid var(--band-card-line); border-radius: 20px; background: var(--band-card); }
.ss-store-catnav .ss-store-side-title { border-radius: 0; }
.ss-store-catnav .ss-store-side-title::before,.ss-store-catnav .ss-store-side-title::after { border-radius: 0; }
.ss-store-catnav .list-group { border-radius: 0; }
.ss-store-catnav .list-group-item { border-radius: 0 !important; border-inline: 0; }
.ss-store-catnav .list-group-item:last-child { border-bottom: 0; }
.ss-store-cartbox { border: 1px solid var(--band-card-line); background: var(--band-card); color: var(--band-fg); border-radius: 20px; box-shadow: var(--ss-shadow-card); }
.ss-store-cartbox .ss-panel-body { padding: 22px; }
.ss-store-cartbox-head { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 11px; margin-bottom: 18px; }
.ss-cartbox-symbol { display: grid; place-items: center; width: 40px; height: 40px; background: var(--ss-accent-soft); color: var(--ss-accent-ink); border-radius: 12px; font-size: 1.3rem; }
.ss-store-cartbox-head .ss-store-side-title { display: block; min-height: 0; padding: 0 !important; background: none; color: var(--band-fg) !important; font: 750 1.15rem/1.3 var(--ss-display); overflow: visible; }
.ss-store-cartbox-head .ss-store-side-title::before,.ss-store-cartbox-head .ss-store-side-title::after { display: none; }
.ss-store-cartbox-head .ss-chip { padding: 6px 8px; font-size: .7rem; }
.ss-store-cartbox-empty { line-height: 1.65; margin-bottom: 20px; }
.ss-store-cartbox .btn { min-height: 44px; border-radius: 11px; font-size: .87rem; }
.ss-store-cartbox .ss-store-balance { padding: 14px; margin-top: 18px; border: 1px solid var(--band-card-line); border-radius: 12px; background: var(--band-sunk); }
.ss-store-block + .ss-store-block { margin-top: 32px; }
.ss-store-cats--sub { grid-auto-rows: 200px; margin-bottom: 0; }
.ss-store-cats--sub > .ss-tile { min-height: 0; height: 100%; }
.ss-store-ranking { margin-top: 0; }
.ss-product { position: relative; isolation: isolate; }
.ss-product:hover,.ss-product:active { transform: none; }
.ss-product:not(.is-out):has(a.stretched-link),.ss-product a.stretched-link::after { cursor: pointer; }
.ss-product .ss-product-foot .btn:hover,.ss-product .ss-product-foot .btn:active { transform: none; }
.ss-product .stretched-link::after { inset: 0; border-radius: var(--ss-r-lg); z-index: 5; }
.ss-product :is(.ss-product-media,.ss-product-body) { position: static; }
.ss-product .ss-product-media { position: relative; }
.ss-product--rank .ss-product-media { display: grid; place-items: center; flex: 0 0 120px; width: 120px; margin: 8px 0 8px 8px; min-height: 142px; }
.ss-product--rank .ss-product-stage { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; aspect-ratio: auto; margin: 0; }
.ss-product--rank .ss-product-stage > img { position: relative; inset: auto; margin: 0; width: 76px; height: 76px; max-height: none; aspect-ratio: 1; object-fit: contain; transform: none; }
.ss-product--rank:hover .ss-product-stage > img { transform: translateY(-3px) rotate(-3deg); }
.ss-product--rank .ss-product-stage .ss-pedestal { position: absolute; width: 86px; bottom: 15px; left: 50%; transform: translateX(-50%); opacity: .5; }
.ss-product--rank .ss-product-name { font-size: 1.2rem; }
.ss-product--rank .ss-product-body { padding: 16px; }
.ss-product--rank .ss-product-stock { z-index: 2; }

/* Community covers share the same image treatment as other panel headings. */
.ss-community-section .ss-panel .ss-panel-head { position: relative; isolation: isolate; overflow: hidden; background: var(--ss-cover-ink); color: var(--ss-cover-light); }
.ss-community-section .ss-panel .ss-panel-head::before { content: ''; display: block; position: absolute; inset: -6px; z-index: -2; background: url(../../img/worlds/citadel-night.webp) center / cover; filter: blur(2px); }
.ss-community-grid > :nth-child(2) .ss-panel-head::before { background-image: url(../../img/worlds/harbor-night.webp); }
.ss-community-section .ss-panel .ss-panel-head::after { content: ''; display: block; position: absolute; inset: 0; z-index: -1; background: hsl(218 36% 8% / .66); }
.ss-community-section .ss-panel:first-child { --ss-cover-art: var(--ss-cover-citadel); }
.ss-community-section .ss-panel-head .ss-panel-title { color: var(--ss-cover-light); }
.ss-dc-board-head { position: relative; isolation: isolate; overflow: hidden; background: var(--ss-discord-cover); }
.ss-dc-board-head::before { content: ''; position: absolute; inset: -14px; z-index: -2; background: url(../../img/brands/discord.svg) 88% 45% / 130px auto no-repeat, url(../../img/worlds/harbor-night.webp) center / cover; filter: blur(4px); opacity: .6; }
.ss-dc-board-head::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,hsl(235 45% 20% / .93),hsl(235 45% 20% / .45)); }
@media(min-width:992px) { .ss-main .ss-section-head .ss-title { font-size: 2.7rem; } }
@media(min-width:992px) and (max-width:1199.98px) { .ss-home-news .ss-news-row { grid-template-columns: 120px minmax(0,1fr); } }
@media(max-width:991.98px) {
 :root { --ss-content-edge: 24px; }
 .ss-home-news .ss-news-row { height: auto; min-height: 160px; }
 .ss-home-news .ss-news-card:not(.ss-news-row) { height: auto; min-height: 320px; }
}
@media(max-width:767.98px) {
 :root { --ss-content-edge: 16px; }
 .ss-home-news .ss-news-lead { height: 400px; min-height: 400px; }
 .ss-home-news .ss-news-card:not(.ss-news-row) { display: grid; grid-template-columns: 112px minmax(0,1fr); min-height: 132px; }
 .ss-home-news .ss-news-card:not(.ss-news-row) .ss-news-thumb { height: 100%; min-height: 132px; }
 .ss-home-news .ss-news-row { min-height: 132px; }
 .ss-home-news .ss-news-title { font-size: 1.05rem; }
 .ss-store-block + .ss-store-block { margin-top: 28px; }
 .ss-store-cats--sub { grid-auto-rows: 160px; }
}
@media(prefers-reduced-motion:reduce) { .ss-masthead { transition: none; } }

@media(max-width:1199.98px) {
 .ss-realm-launch { grid-template-columns: minmax(0,1fr) minmax(240px,320px) minmax(0,1fr); gap: 24px; }
 .ss-realm-link { gap: 10px; }
 .ss-realm-icon { width: 44px; height: 44px; font-size: 2.15rem; }
 .ss-realm-icon .ss-discord-icon { width: 40px; height: 32px; }
 .ss-realm-link-copy b { font-size: 1.1rem; }
}
@media(max-width:991.98px) {
 .ss-hero--realm .ss-hero-minecraft { min-height: 490px; padding-block: 38px 34px; }
 .ss-realm-launch { max-width: 660px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 24px; row-gap: 22px; }
 .ss-realm-brand { grid-column: 1 / -1; grid-row: 1; }
 .ss-realm-logo { width: min(100%,340px); height: 92px; }
 .ss-realm-slogan { margin-top: 14px; }
 .ss-realm-ip { grid-column: 1; grid-row: 2; }
 .ss-realm-discord { grid-column: 2; grid-row: 2; }
 .ss-realm-actions { margin-top: 20px; }
 .ss-realm-season { margin-top: 20px; }
}
@media(max-width:575.98px) {
 .ss-hero--realm .ss-hero-minecraft { min-height: 430px; padding-block: 30px 28px; }
 .ss-realm-launch { column-gap: 12px; row-gap: 18px; }
 .ss-realm-logo { width: min(100%,290px); height: 78px; }
 .ss-realm-title { font-size: 2.8rem; }
 .ss-realm-slogan { font-size: .9rem; margin-top: 12px; }
 .ss-realm-link { gap: 8px; min-height: 60px; padding-block: 5px; }
 .ss-realm-icon { width: 30px; height: 36px; font-size: 1.8rem; }
 .ss-realm-icon .ss-discord-icon { width: 30px; height: 25px; }
 .ss-realm-link-copy { gap: 4px; }
 .ss-realm-link-copy b { font-size: .94rem; }
 .ss-realm-link-copy small,.ss-realm-link-copy > span { font-size: .65rem; }
 .ss-realm-actions { width: 100%; gap: 10px; margin-top: 18px; }
 .ss-realm-actions .btn { min-width: 0; flex: 1 1 140px; min-height: 48px; padding: 11px 12px; font-size: .83rem; }
 .ss-realm-season { gap: 7px; margin-top: 18px; font-size: .72rem; }
 .ss-realm-countdown { gap: 7px; }
 .ss-realm-dispatch { flex-wrap: wrap; font-size: .8rem; }
}
@media(max-width:359.98px) {
 .ss-realm-link-copy b { font-size: .82rem; letter-spacing: -.025em; white-space: nowrap; }
 .ss-realm-icon { width: 26px; }
 .ss-realm-icon .ss-discord-icon { width: 26px; }
}
