/* Hearthkin Woods: the shared top bar and footer, the same on every page.
   The markup comes from Website/chrome/header.html and footer.html, stamped into
   each page by Website/sync_chrome.py. Change it there, run the script, never by
   hand in a page. This file carries its own colours, so it also works on the
   pages that do not load style.css (home, wallpapers, cinematics). */
.topbar, .site-foot {
  --c-bg: #ffffff; --c-bg2: #e8eef6; --c-card: #ffffff; --c-line: rgba(20,36,64, .14);
  --c-ink: #142440; --c-muted: #3c5274; --c-accent: #2b4c7e; --c-accent-ink: #ffffff;
  --c-gold: #ffb648; --c-dark: #1c3458;
  --c-font: "Plus Jakarta Sans", system-ui, sans-serif;
  font-family: var(--c-font);
}
.topbar *, .site-foot * { box-sizing: border-box; }

/* The page stops growing at 1920px and sits in the middle of a wider screen, its
   two edges melting into the page's own colour. Only the bar still runs edge to edge. */
body { position: relative; max-width: 1920px; margin-inline: auto; overflow-x: clip; }
@media (min-width: 1921px) {
  body::before, body::after { content: ""; position: absolute; top: 0; bottom: 0; width: 140px; z-index: 15; pointer-events: none; background: inherit; }
  body::before { left: 0; -webkit-mask-image: linear-gradient(90deg, #000, transparent); mask-image: linear-gradient(90deg, #000, transparent); }
  body::after { right: 0; -webkit-mask-image: linear-gradient(270deg, #000, transparent); mask-image: linear-gradient(270deg, #000, transparent); }
  body:not(.home):not(.fill) > .topbar { width: 100vw; margin-left: calc(960px - 50vw); }
  /* the footer's colour runs to both screen edges too, over the melted page edges */
  .site-foot { position: relative; z-index: 16; box-shadow: 0 0 0 100vmax var(--c-bg2); clip-path: inset(0 -100vmax); }
  body.fill::before, body.fill::after, body.bare::before, body.bare::after { content: none; }
}
/* pages that size themselves to the screen's height (Make Your Hero, a wallpaper shown bare) keep the whole width */
body.fill, body.bare { max-width: none; }

/* the studio's name (footer) and the live server light beside "Server status" */
.studio-name { font: 800 .72rem/1 var(--c-font); letter-spacing: .22em; text-decoration: none; }
.site-foot .status-link { display: inline-flex; align-items: center; gap: 7px; }
.site-foot [data-server-dot] { width: 8px; height: 8px; border-radius: 50%; background: #8d8067; }
.site-foot [data-server-dot][data-up="yes"] { background: #3fae5e; box-shadow: 0 0 6px rgba(63, 174, 94, .6); }
.site-foot [data-server-dot][data-up="no"] { background: #d2502f; }

/* the bar: cream at the top of the page and still cream once it scrolls */
.topbar { display: block; position: sticky; top: 0; left: 0; right: 0; z-index: 20; margin: 0; padding: 0; color: var(--c-ink);
  background: rgba(255,255,255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line); transition: background-color .25s, box-shadow .25s; }
body.home > .topbar { position: fixed; }
.topbar.solid, .topbar.menu-open { background: rgba(255,255,255, .98); box-shadow: 0 6px 22px rgba(20,36,64, .16); }
.topbar-in { display: flex; align-items: center; gap: 28px; min-height: 74px; margin: 0 auto; max-width: 1920px;
  padding-left: max(clamp(16px, 3vw, 44px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(16px, 3vw, 44px), env(safe-area-inset-right, 0px)); }

/* the sign. The bar and footer show one picture with all three creatures (bar.webp, 2026-11-13,
   so the words never move); the home page's big sign still swaps creatures (nav.js). */
.sign { position: relative; display: block; flex: none; }
.sign img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .7s ease; }
.sign img.on { opacity: 1; }
.brand { display: inline-flex; align-items: flex-start; text-decoration: none; }
.brand .sign { height: 54px; aspect-ratio: 402 / 192; filter: drop-shadow(0 2px 4px rgba(28,52,88, .22)); }
.brand .tm { font: 600 .62rem/1 var(--c-font); color: var(--c-muted); margin: 2px 0 0 1px; }

.topbar .nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.topbar .nav-link, .topbar .nav-toggle { color: var(--c-ink); text-decoration: none; font: 600 .95rem/1.3 var(--c-font); background: none; border: 0; cursor: pointer; padding: 6px 0; text-shadow: none; letter-spacing: 0; text-transform: none; }
.topbar .nav-link:hover, .topbar .nav-toggle:hover, .topbar .nav-toggle[aria-expanded="true"], .topbar .nav-link[aria-current="page"] { color: var(--c-accent); }
.topbar .nav-menu { position: relative; }
.topbar .caret { display: inline-block; margin-left: 5px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.topbar .nav-panel { display: none; position: absolute; right: 0; top: calc(100% + 12px); min-width: 240px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; padding: 8px; box-shadow: 0 20px 40px rgba(20,36,64, .22); }
.topbar .nav-toggle[aria-expanded="true"] + .nav-panel { display: grid; }
/* The account button: a round person icon right of Play, opening Account / Log out (as most sites do). */
.topbar .nav-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1.5px solid var(--c-line); background: var(--c-card); color: var(--c-ink); transition: color .15s, border-color .15s; }
.topbar .nav-avatar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.topbar .nav-avatar:hover, .topbar .nav-avatar[aria-expanded="true"] { color: var(--c-accent); border-color: var(--c-accent); }
.topbar .nav-panel a, .topbar .nav-sheet a { display: grid; color: var(--c-ink); text-decoration: none; font: 700 1.02rem/1.35 var(--c-font); padding: 11px 14px; border-radius: 8px; }
.topbar .nav-panel a span, .topbar .nav-sheet a span { font-weight: 400; font-size: .8rem; color: var(--c-muted); }
.topbar .nav-panel a:hover, .topbar .nav-sheet a:hover, .topbar .nav-panel a[aria-current="page"] { background: rgba(43,76,126, .1); }

/* the one green button in the bar */
.nav-cta { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .45em; white-space: nowrap;
  font: 700 .92rem/1.2 var(--c-font); letter-spacing: .02em; color: var(--c-accent-ink); background: var(--c-accent); text-decoration: none;
  padding: .7em 1.3em; border-radius: 999px; box-shadow: 0 4px 16px rgba(43,76,126, .3); transition: transform .15s, filter .15s; }
.nav-cta:hover { transform: translateY(-2px); filter: brightness(1.08); color: var(--c-accent-ink); }
.nav-cta[href="/play/"]::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%) no-repeat; background-size: 250% 100%; background-position: 100% 0; animation: nav-cta-shine 3s ease-in-out infinite; }
@keyframes nav-cta-shine { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.topbar :focus-visible, .site-foot :focus-visible { outline: 3px solid var(--c-ink); outline-offset: 3px; }

/* phones: logo, Menu, the button; Menu opens one sheet with every other link */
.nav-burger { display: none; align-items: center; gap: 7px; color: var(--c-ink); font: 600 .9rem/1 var(--c-font); background: none; border: 0; padding: 10px 2px; cursor: pointer; }
.nav-burger i { display: grid; gap: 3px; }
.nav-burger i b { display: block; width: 16px; height: 2px; border-radius: 1px; background: currentColor; }
.nav-sheet { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% + 4px); max-height: calc(100vh - 140px); overflow-y: auto; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; padding: 8px; box-shadow: 0 20px 40px rgba(20,36,64, .25); }
.nav-sheet hr { border: 0; border-top: 1px solid var(--c-line); margin: 6px 8px; }
@media (max-width: 760px) {
  .brand .sign { height: 42px; }
  .topbar-in { min-height: 62px; gap: 12px; }
  .topbar .nav-links { gap: 14px; flex-wrap: nowrap; }
  .topbar .nav-links .nav-menu:not(.nav-acct), .topbar .nav-links > .nav-link { display: none !important; }
  .topbar .nav-avatar { width: 36px; height: 36px; }
  .nav-burger { display: inline-flex; }
  .topbar.menu-open .nav-sheet { display: grid; }
  .nav-cta { font-size: .85rem; padding: .6em 1em; }
}
@media (max-width: 380px) { .nav-cta { padding: .55em .85em; } }

/* footer */
.site-foot { margin: 0; padding: 0; background: var(--c-bg2); border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: .9rem; line-height: 1.6; text-align: left; }
.site-foot .foot-in { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 28px 16px; }
.site-foot .col { display: grid; gap: 2px; align-content: start; justify-items: start; }
.site-foot .col b { font: 800 .72rem/1.4 var(--c-font); letter-spacing: .16em; color: var(--c-ink); }
.site-foot a { color: var(--c-muted); text-decoration: none; }
.site-foot a:hover { color: var(--c-accent); }
.site-foot .brand .sign { height: 48px; }
.site-foot .blurb { max-width: 32ch; margin: 0; }
.site-foot .follow { display: grid; gap: 8px; margin-top: 14px; }
.site-foot .soc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.site-foot a.soc { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: var(--brand); box-shadow: 0 2px 0 rgba(20,36,64, .25); transition: transform .12s; }
.site-foot a.soc:hover { color: #fff; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .site-foot a.soc { transition: none; } }
.site-foot .base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 12px 16px; border-top: 1px solid var(--c-line); font-size: .82rem; }
.site-foot .studio-name { color: var(--c-ink); }
@media (max-width: 820px) { .site-foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 24px 16px; } .site-foot .col:first-child { grid-column: 1 / -1; } }

/* The Parents & Schools menu and footer column carry class="edu", on show since 2026-11-19.
   To park them again: .topbar .edu, .site-foot .edu { display: none !important; }
   (with that rule off, the footer needs repeat(3, ...) in .cols again) */

@media (prefers-reduced-motion: reduce) { .nav-cta::after { animation: none; display: none; } .topbar, .nav-cta, .sign img { transition: none; } }
