
/* Wood rim canvas is z-index 6. Lift header content so dropdowns paint above it. */
.site-header .site-header__inner {
  position: relative;
  z-index: 7;
  overflow: visible;
}
.site-header .nav-rail {
  overflow: visible;
  z-index: 8;
}

/* ---------- grouped nav (desktop) ---------- */
.nav-group { position: relative; display: flex; align-items: center; z-index: 9; }
.nav-group__caret {
  display: inline-grid;
  place-items: center;
  width: 12px;
  margin: 0 0.25rem 0 -0.15rem;
  color: var(--muted);
  opacity: 0.8;
  pointer-events: none;
}
.nav-group__caret svg { transition: transform 0.15s ease; }
.nav-group__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: calc(var(--z-header, 50) + 40);
  display: none;
  min-width: 15rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #1a0e06;
  border-radius: 4px;
  background: linear-gradient(180deg, #27315a, #1a2342);
  box-shadow:
    inset 0 0 0 1px rgb(214 180 94 / 35%),
    0 0 0 4px #573820,
    0 0 0 5px #24150a,
    0 14px 30px rgb(0 0 0 / 60%);
}
/* hover bridge across the gap under the tab */
.nav-group__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-group:hover > .nav-group__menu,
.nav-group:focus-within:not(.is-nav-closed) > .nav-group__menu { display: block; }
.nav-group:hover > .nav-rail__link .nav-group__caret svg,
.nav-group:focus-within:not(.is-nav-closed) > .nav-rail__link .nav-group__caret svg { transform: rotate(180deg); }
/* Soft-nav / mouseleave set .is-nav-closed so focus-within cannot keep the menu stuck open. */
.nav-group.is-nav-closed > .nav-group__menu { display: none !important; }
/* .nav-rail a (shell-ambient) styles every link in the rail; these items opt out of tab styling.
 * Settings is a <button class="nav-group__item"> · same look as the anchors. */
.nav-rail .nav-group__item,
.nav-rail button.nav-group__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #f4e8c8;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.nav-rail .nav-group__item .news-unread-dot { top: 0.55rem; right: 0.45rem; }
.nav-rail .nav-group__item b { font-size: 0.98rem; line-height: 1.15; }
.nav-rail .nav-group__item small { font-size: 0.8rem; font-weight: 500; color: #cdbf9f; }
.nav-rail .nav-group__item:hover,
.nav-rail .nav-group__item:focus-visible { color: #fff6dc; background: rgb(255 255 255 / 8%); }
.nav-rail .nav-group__item[aria-current="page"] { color: #f4e8c8; background: rgb(47 91 176 / 45%); box-shadow: inset 0 0 0 1px rgb(110 160 255 / 35%); }
.nav-rail .nav-group__item[aria-current="page"]::after { content: none; }
/* On a child page (Incubator, Arcade) the group tab keeps the "you are here" underline. */
.nav-group.is-child-current > .nav-rail__link { position: relative; }
.nav-group.is-child-current > .nav-rail__link::after {
  content: "";
  position: absolute;
  left: 0.1rem;
  right: 0.1rem;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, transparent 6%, currentColor 14%, currentColor 86%, transparent 94%, transparent 100%);
}
.nav-rail__link--phone-only { display: none; }
/* The Chikonomicon tab is a button (it opens the book); make it read like the other tabs. */
button.nav-rail__link--chikonomicon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 650;
  color: #b9a4d8;
  cursor: pointer;
  white-space: nowrap;
}
button.nav-rail__link--chikonomicon:active { transform: translateY(1px); }
button.nav-rail__link--chikonomicon:focus-visible { outline: 3px solid #f3cf74; outline-offset: 2px; }

/* Phone drawer. Same grouped tabs as the desktop header, stacked, with the menus open. */
.nav-drawer-btn,
.nav-drawer-scrim { display: none; }
@media (max-width: 45rem) {
  .nav-drawer-btn {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0;
    padding: 0;
    border: 1px solid #1a0e06;
    border-radius: 4px;
    background: rgb(14 9 6 / 62%);
    color: #f4e8c8;
    box-shadow: inset 0 3px 9px rgb(0 0 0 / 65%), 0 1px 0 rgb(255 220 170 / 22%);
    cursor: pointer;
  }
  .nav-drawer-btn svg { width: 1.35rem; height: 1.35rem; display: block; }
  .nav-drawer-scrim {
    display: block;
    position: fixed;
    inset: 0;
    /* Under the header. The drawer lives inside that stacking context, so a higher scrim covers it and eats clicks. */
    z-index: calc(var(--z-header, 40) - 1);
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(2 6 14 / 55%);
    cursor: pointer;
  }
  .nav-drawer-scrim[hidden] { display: none; }
  html[data-nav-open="1"] { overflow: hidden; }
  html[data-auth="1"] { --header-h: 3.15rem; }
  .site-header__inner {
    height: var(--header-h);
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding-block: 0;
    gap: 0.35rem;
  }
  .site-header__inner > .nav-drawer-btn {
    grid-column: 1;
    width: 2.15rem;
    height: 2.15rem;
    align-self: center;
  }
  .site-header__inner > .brand {
    grid-column: 2;
    justify-self: center;
    align-self: center;
  }
  .brand--header-logo .brand__logo { height: 1.85rem; }
  .site-header__inner > .header-end {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
  }
  .header-avatar { width: 2.15rem; height: 2.15rem; }
  .site-header__inner > .nav-rail {
    position: fixed; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column; flex-wrap: nowrap;
    align-items: stretch; gap: 0.22rem; width: min(19rem, 88vw); max-width: none; margin: 0;
    padding: 0.4rem 0.4rem 0.65rem; z-index: calc(var(--z-header, 40) + 80); overflow: auto;
    transform: translateX(-105%);
    background: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1.2px) 0 0 / 7px 7px, linear-gradient(180deg, #27315a 0%, #1a2342 100%);
    box-shadow: 8px 0 24px rgb(0 0 0 / 45%); transition: transform 0.18s ease;
  }
  html[data-nav-open="1"] .site-header__inner > .nav-rail { transform: none; }
  html[data-nav-open="1"] #chiken-fps { visibility: hidden; }
  .site-header__inner > .nav-rail .nav-group {
    display: flex; flex-direction: column; align-items: stretch; gap: 0.12rem; margin: 0;
    padding: 0.18rem 0.28rem 0.22rem; box-shadow: none; border-radius: 6px;
    background: rgb(8 12 28 / 42%); border: 1px solid rgb(255 255 255 / 8%); width: 100%; box-sizing: border-box;
  }
  .site-header__inner > .nav-rail .nav-group > .nav-rail__link,
  .site-header__inner > .nav-rail .nav-group > button.nav-rail__link {
    display: flex; align-items: center; justify-content: center; text-align: center; position: relative;
    pointer-events: none; min-height: 0; padding: 0.02rem 0.2rem 0.16rem; border: 0; border-radius: 0;
    background: none; box-shadow: none; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  }
  .site-header__inner > .nav-rail .nav-group > .nav-rail__link::after,
  .site-header__inner > .nav-rail .nav-group > button.nav-rail__link::after {
    content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 1px; background: currentColor; opacity: 0.7; pointer-events: none;
  }
  .site-header__inner > .nav-rail .nav-group > .nav-rail__link .nav-rail__ico,
  .site-header__inner > .nav-rail .nav-group > .nav-rail__link .nav-group__caret,
  .site-header__inner > .nav-rail .nav-group > button.nav-rail__link .nav-rail__ico,
  .site-header__inner > .nav-rail .nav-group > button.nav-rail__link .nav-group__caret { display: none; }
  .nav-group--coop { --nav-rail: #f0c050; }
  .nav-group--lodge { --nav-rail: #8fd18a; }
  .nav-group--community { --nav-rail: #8eb6ff; }
  .nav-group--shop { --nav-rail: #e2a0ff; }
  .nav-group--chikonomicon { --nav-rail: #ffb089; }
  .nav-group--coop > .nav-rail__link, .nav-group--coop > button.nav-rail__link,
  .nav-group--lodge > .nav-rail__link, .nav-group--community > .nav-rail__link,
  .nav-group--shop > .nav-rail__link, .nav-group--chikonomicon > .nav-rail__link,
  .nav-group--chikonomicon > button.nav-rail__link { color: var(--nav-rail); }
  .nav-group__menu,
  html[data-nav-open="1"] .nav-group.is-nav-closed > .nav-group__menu {
    position: static; display: flex !important; flex-direction: column; gap: 0.1rem;
    min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
  }
  .nav-group__menu li { display: block; }
  .nav-group__menu::before { content: none; }
  .nav-rail .nav-group__item,
  .nav-rail button.nav-group__item {
    border: 1px solid #1a0e06; border-radius: 3px; padding: 0.28rem 0.45rem 0.28rem 0.7rem; box-shadow: none;
    background: linear-gradient(180deg, rgb(255 220 160 / 6%), transparent 40%), rgb(12 18 36 / 72%);
  }
  .nav-rail .nav-group__item b { font-size: 0.86rem; }
  .nav-rail .nav-group__item small { font-size: 0.7rem; line-height: 1.15; }
  .nav-rail .nav-group__item::before {
    content: ""; position: absolute; left: 0.28rem; top: 0.22rem; bottom: 0.22rem; width: 3px;
    border-radius: 3px; background: var(--nav-rail, #f0c050); pointer-events: none;
  }
  .nav-rail .nav-group__item:hover,
  .nav-rail .nav-group__item:focus-visible {
    background: linear-gradient(180deg, rgb(255 220 160 / 12%), transparent 42%), rgb(22 32 58 / 88%);
  }
  .nav-rail__label { display: inline; }
  .nav-group__caret { display: none; }
  .nav-rail__link--phone-only { display: none; }
}
/* Waiting room · the village tabs bounce back here, so the header stays quiet. */
body:has(.pending-panel) .nav-rail,
body:has(.pending-panel) .nav-drawer-btn,
body:has(.pending-panel) .header-wallet { display: none; }

/* ---------- header door: icon only, bright red, 44px tap target ---------- */
.header-door {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -4px -6px -4px -4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #ff6a55;
  cursor: pointer;
}
.header-door:hover { color: #ff9585; }
.header-door:active { transform: translateY(1px); }
.header-door:focus-visible { outline: 3px solid #f3cf74; outline-offset: 2px; }
@media (max-width: 1000px) {
  html[data-auth="1"] .profile-drop .header-notify.btn,
  .header-door { display: none; }
}

/* ---------- log-out confirm ---------- */
.logout-confirm { max-width: min(26rem, calc(100vw - 1.5rem)); }
.logout-confirm__who { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 3px; border: 1px solid #1a0e06; background: rgb(14 9 6 / 55%); box-shadow: inset 0 3px 9px rgb(0 0 0 / 65%); }
.logout-confirm__who > div { display: flex; flex-direction: column; min-width: 0; }
.logout-confirm__who b { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-confirm__who small { font-size: 0.8rem; color: var(--muted); }
.logout-confirm__face { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; background: #5ab4f0; box-shadow: 0 0 0 1px #d6b45e, 0 2px 0 #000; }
.logout-confirm__face img { width: 100%; height: 100%; object-fit: cover; }
.logout-confirm__copy { margin: 0.75rem 0; line-height: 1.4; }
.logout-confirm__actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.logout-confirm__go { color: #fff1e8; background: linear-gradient(180deg, #d4624c, #a83c2b 55%, #7f2619); border-color: #3a0e08; }


/* ---------- purse photo: rounded square, brass rim ---------- */
.header-avatar {
  flex: none;
  display: grid;
  place-items: center;
  /* Match .header-door (44px) so the plaque tools share one size. */
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(233 194 95 / 50%);
  border-radius: 14px;
  background: #5ab4f0;
  color: var(--ink);
  position: relative;
  overflow: visible;
  cursor: pointer;
  box-shadow: 0 3px 8px rgb(0 0 0 / 45%);
}
.header-avatar:hover { box-shadow: 0 4px 10px rgb(0 0 0 / 50%); }
.header-avatar:active { transform: translateY(1px); box-shadow: 0 2px 5px rgb(0 0 0 / 40%); }
.header-avatar:focus-visible { outline: 3px solid #f3cf74; outline-offset: 3px; }
.header-avatar .profile-btn__avatar,
.header-avatar .profile-btn__fallback { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; background: #3a4a62; overflow: hidden; }
.presence-bulb{position:absolute;top:-2px;left:-2px;z-index:3;width:9px;height:9px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#e9ffe8,#3dcc4a 42%,#146b28);box-shadow:0 0 0 2px #0c1410,0 0 5px #2fbf45}
.header-avatar .notify-badge--header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  transform: translate(40%, -40%);
}
.header-avatar .profile-btn__fallback .icon { width: 1.5rem; height: 1.5rem; }

/* ---------- head tools: gear matches the red close X plate (size + chrome) ---------- */
.modal-wood-head__tools { display: inline-flex; align-items: flex-start; gap: 0.5rem; flex: 0 0 auto; }
.modal-wood-head__tools form { display: contents; }
.modal__tool {
  /* Same footprint as .modal__close · wood face (not red). */
  --modal-close-size: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--modal-close-size);
  height: var(--modal-close-size);
  min-width: var(--modal-close-size);
  min-height: var(--modal-close-size);
  margin: 0;
  padding: 0;
  border: 1px solid #2a0a06;
  border-radius: 3px;
  background: linear-gradient(180deg, #8a6038, #5a3a20 55%, #3a2412);
  color: #fff3e6;
  cursor: pointer;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 30%),
    inset 0 -2px 3px rgb(0 0 0 / 35%),
    0 0 0 1px #d6b45e,
    0 2px 0 #000;
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.modal__tool svg {
  display: block;
  width: 14px;
  height: 14px;
}
.modal__tool:hover,
.modal__tool:focus-visible {
  border-color: #2a0a06;
  background: linear-gradient(180deg, #a07444, #6a4528 55%, #4a2e18);
  color: #fff;
  transform: none;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 35%),
    inset 0 -2px 3px rgb(0 0 0 / 35%),
    0 0 0 1px #d6b45e,
    0 1px 0 #000;
}
.modal__tool:focus { outline: none; }
.modal__tool:active {
  transform: translateY(1px);
  border-color: #1a0e06;
  background: linear-gradient(180deg, #6a4528, #3a2412 60%, #2a180c);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 220 170 / 25%),
    inset 0 2px 3px rgb(0 0 0 / 40%),
    0 0 0 1px #2a1208,
    0 0.05rem 0.16rem rgb(20 8 0 / 55%);
}

/* ---------- player pop-up ---------- */
.player-pop { max-width: min(46rem, calc(100vw - 1.5rem)); }
.player-pop__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
.player-pop__col { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
@media (min-width: 45rem) {
  .player-pop__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
}
@media (max-width: 45rem) {
  .modal__tool { --modal-close-size: 2.2rem; }
  .modal__tool svg { width: 1.15rem; height: 1.15rem; }
  .header-avatar { width: 2.15rem; height: 2.15rem; }
  .player-pop__cols { display: flex; flex-direction: column; }
  .player-pop__col { display: contents; }
  .player-purse { order: 1; }
  .player-top { order: 2; }
  .player-pop__col--who > .player-pop__label { order: 3; }
  .player-pop__col--who > .player-links { display: contents; }
  .player-pop__col--who > .player-links > .player-link:not(.player-link--support):not(.player-link--logout) { order: 4; }
  .player-pop__col--stuff > .player-pop__label { order: 5; }
  .player-pop__col--stuff > .player-links { order: 6; }
  .player-link--support { order: 7; }
  .player-pop__col--who > .player-links > .player-link.player-link--logout { order: 8; }
}
.player-link--logout { display: flex; }
.player-pop__label { margin: 0.1rem 0 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.player-top,
.player-link {
  border: 1px solid #1a0e06;
  border-radius: 3px;
  background: rgb(14 9 6 / 55%);
  box-shadow: inset 0 3px 9px rgb(0 0 0 / 65%);
}
.player-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.7rem; }
.player-top__face { display: grid; place-items: center; width: 84px; height: 84px; border: 2px solid #d6b45e; border-radius: 16px; overflow: hidden; background: #5ab4f0; box-shadow: 0 2px 0 #000; }
.player-top__face img,
.player-top__face .profile-btn__avatar { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.player-top__face .profile-btn__fallback { width: 100%; height: 100%; border-radius: 0; background: #3a4a62; }
.player-top__face .profile-btn__fallback .icon { width: 2.6rem; height: 2.6rem; }
.player-top__who { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.player-top__name { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top__line { margin: 0; font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-level { position: relative; height: 22px; margin-top: 0.3rem; border: 1px solid #000; border-radius: 3px; background: #05070f; overflow: hidden; }
.player-level__fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #5a8ee8, #2f5bb0); }
.player-level__text { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; height: 100%; padding: 0 8px; font-size: 0.76rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 0 #000; }
.player-purse { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.player-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 759px) {
  .player-links { grid-template-columns: minmax(0, 1fr); }
}
.player-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  text-align: left;
  font: inherit;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.player-link:hover { border-color: rgb(214 180 94 / 45%); }
.player-link:active { transform: translateY(1px); }
.player-link:focus-visible { outline: 3px solid #f3cf74; outline-offset: 2px; }
.player-link__glyph { width: 26px; height: 26px; flex: none; }
.player-link__text { display: flex; flex-direction: column; min-width: 0; }
.player-link__text b { font-size: 0.98rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-link__text small { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-link__badge { position: absolute; top: 6px; right: 8px; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: #d8402a; color: #fff; font-size: 0.7rem; font-weight: 700; text-align: center; }
@media (min-width: 45rem) {
  .player-pop__cols .player-links { grid-template-columns: minmax(0, 1fr); }
}


@media (min-width: calc(45rem + 1px)) {
  /* Match :root --header-h so content offset and the band stay in sync. */
  html[data-auth="1"] .site-header__inner { --header-h: 5rem; }
  html[data-auth="1"] .site-header__inner {
    width: 100%;
    max-width: none;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding-inline: 0.85rem;
  }
  html[data-auth="1"] .site-header__inner > .brand { margin: 0; }
  .brand--header-logo { display: block; flex: none; }
  .brand--header-logo .brand__logo { display: block; height: 58px; width: auto; filter: drop-shadow(0 3px 5px rgb(0 0 0 / 70%)); }

  /* nav fills the gap between the logo and the profile button */
  html[data-auth="1"] .site-header__inner > .nav-rail { justify-self: stretch; width: 100%; min-width: 0; }
  html[data-auth="1"] .nav-rail {
    justify-content: space-evenly;
    width: 100%;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 4px;
    border: 1px solid #1a0e06;
    border-radius: 4px;
    background: rgb(14 9 6 / 60%);
    box-shadow: inset 0 3px 9px rgb(0 0 0 / 65%), 0 1px 0 rgb(255 220 170 / 22%);
  }
  html[data-auth="1"] .nav-rail .nav-group { border-radius: 3px; }
  /* phone-only tabs stay hidden on desktop (the dropdowns carry them) */
  html[data-auth="1"] .nav-rail .nav-rail__link.nav-rail__link--phone-only { display: none; }
  html[data-auth="1"] .nav-rail .nav-rail__link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f4e8c8;
    text-shadow: 0 1px 0 rgb(0 0 0 / 80%);
    white-space: nowrap;
  }
  /* Coop is short but the caret was eating its padding · give the label room. */
  html[data-auth="1"] .nav-rail .nav-group--coop > .nav-rail__link {
    padding-inline: 12px 14px;
    min-width: 5.75rem;
  }
  html[data-auth="1"] .nav-rail .nav-group--coop > .nav-rail__link .nav-rail__label {
    overflow: visible;
  }
  html[data-auth="1"] .nav-rail .nav-group__caret { margin: 0 0.35rem 0 0; color: #cdbf9f; }
  html[data-auth="1"] .nav-rail .nav-rail__ico { display: block; width: 22px; height: 22px; color: #e8c46a; flex: none; }
  html[data-auth="1"] .nav-rail .nav-rail__link:hover { background: rgb(255 255 255 / 7%); filter: none; }
  /* "you are here": blue plank, glowing */
  html[data-auth="1"] .nav-rail .nav-rail__link[aria-current="page"],
  html[data-auth="1"] .nav-rail .nav-group.is-child-current > .nav-rail__link {
    background: linear-gradient(180deg, #2f5bb0, #1d3a78);
    border-color: #0d1a36;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%), 0 0 16px rgb(70 130 255 / 40%);
  }
  html[data-auth="1"] .nav-rail .nav-rail__link[aria-current="page"]::after,
  html[data-auth="1"] .nav-rail .nav-group.is-child-current > .nav-rail__link::after { content: none; }

  @media (max-width: 1399px) {
    html[data-auth="1"] .nav-rail .nav-rail__link { padding: 8px 9px; gap: 7px; font-size: 1rem; }
    .brand--header-logo .brand__logo { height: 46px; }
    html[data-auth="1"] .site-header__inner { gap: 10px; }
  }
  /* Bell + avatar match the 44px door tap target. */
  html[data-auth="1"] .profile-drop .header-notify.btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    color: #fff8f0;
    overflow: visible;
  }
  html[data-auth="1"] .profile-drop .header-notify.btn:active { transform: translateY(var(--btn-drop)); }
  html[data-auth="1"] .profile-drop .header-notify__glyph {
    width: 1.7rem;
    height: 1.7rem;
  }
  html[data-auth="1"] .profile-drop .header-notify__glyph .icon {
    width: 1.7rem;
    height: 1.7rem;
  }
  /* Count sits outside the plate so a two-digit number can grow. */
  html[data-auth="1"] .profile-drop .header-notify .notify-badge--header {
    top: 0;
    right: 0;
    transform: translate(58%, -58%);
    min-width: 1.7rem;
    width: auto;
    height: 1.7rem;
    padding: 0 0.32rem;
    font-size: 0.95rem;
    line-height: 1;
  }
  html[data-auth="1"] .profile-drop .header-avatar {
    width: 44px;
    height: 44px;
  }

  /* tools plaque: bell, profile photo, purse, door in one dark recess */
  html[data-auth="1"] .header-end { gap: 12px; }
  html[data-auth="1"] .profile-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px;
    border: 1px solid #1a0e06;
    border-radius: 13px;
    background: rgb(14 9 6 / 62%);
    box-shadow: inset 0 3px 9px rgb(0 0 0 / 65%), 0 1px 0 rgb(255 220 170 / 22%);
  }
  html[data-auth="1"] .header-wallet { flex-direction: row; align-items: center; gap: 14px; margin: 0; }
  html[data-auth="1"] .header-wallet__row {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "icon num" "icon label";
    column-gap: 8px;
    row-gap: 0;
    align-items: center;
    text-align: left;
    color: #f4e8c8;
  }
  html[data-auth="1"] .header-wallet__row > :first-child { grid-area: icon; width: 28px; height: 28px; }
  html[data-auth="1"] .header-wallet__row > span:last-child { grid-area: num; font-size: 1.08rem; font-weight: 700; line-height: 1; white-space: nowrap; }
  html[data-auth="1"] .header-wallet__row::after { content: attr(data-label); grid-area: label; font-size: 0.76rem; font-weight: 400; color: #cdbf9f; line-height: 1.1; white-space: nowrap; }
}
/* Words stay while the bar has room. Padding only tightens above the icon switch. */
@media (min-width: 1181px) and (max-width: 90rem) {
  html[data-auth="1"] .nav-rail .nav-rail__link { padding: 5px 6px; gap: 4px; font-size: 0.84rem; }
  html[data-auth="1"] .nav-rail .nav-rail__ico { width: 18px; height: 18px; }
  html[data-auth="1"] .nav-rail .nav-group--coop > .nav-rail__link { min-width: 0; padding-inline: 6px; }
}
/* Icons from here down to the phone drawer. Words overlap the purse and the clock above this. */
@media (max-width: 1180px) and (min-width: calc(45rem + 1px)) {
  html[data-auth="1"] .nav-rail__label,
  html[data-auth="1"] .nav-group__caret { display: none; }
  html[data-auth="1"] .nav-rail .nav-rail__link,
  html[data-auth="1"] button.nav-rail__link--chikonomicon {
    gap: 0;
    padding: 5px;
    min-width: 2.4rem;
    justify-content: center;
  }
  html[data-auth="1"] .nav-rail .nav-group--coop > .nav-rail__link { min-width: 2.4rem; padding-inline: 5px; }
  html[data-auth="1"] .nav-rail .nav-rail__ico { display: block; width: 22px; height: 22px; }
}


:root {
--hdr-quilt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='0 0 26 16'%3E%3Cpath d='M0 8L13 0l13 8-13 8z' fill='none' stroke='%23000' stroke-opacity='.5' stroke-width='1.2'/%3E%3Cpath d='M0 8L13 0l13 8' fill='none' stroke='%239fb2ff' stroke-opacity='.07' stroke-width='1' transform='translate(0 1)'/%3E%3C/svg%3E");
--hdr-bed: linear-gradient(180deg, #131b40, #0a1029 70%, #080c20);
}
.hdr-trim,
.hdr-banner { display: none; }
html[data-auth="1"] .site-header {
background:
radial-gradient(60% 160% at 0% 100%, rgb(160 40 120 / 30%), transparent 60%),
radial-gradient(50% 160% at 100% 0%, rgb(110 50 170 / 26%), transparent 60%),
var(--hdr-quilt) 0 0 / 26px 16px,
var(--hdr-bed);
box-shadow: 0 8px 22px rgb(0 0 0 / 55%);
}
.site-footer {
background:
radial-gradient(60% 160% at 0% 0%, rgb(160 40 120 / 28%), transparent 60%),
radial-gradient(50% 160% at 100% 100%, rgb(110 50 170 / 24%), transparent 60%),
var(--hdr-quilt) 0 0 / 26px 16px,
var(--hdr-bed);
box-shadow: 0 -8px 22px rgb(0 0 0 / 45%);
}
.site-footer__copy,
.site-footer__legal a { color: #d9c9a2; }
.site-footer__legal a:hover,
.site-footer__legal a[aria-current="page"] { color: #fff6e4; }
@media (max-width: 45rem) {
html[data-auth="1"] { --header-h: 4.15rem; }
html[data-auth="1"] .site-header__inner {
height: var(--header-h);
box-sizing: border-box;
padding-top: 2px;
padding-bottom: 4px;
align-items: center;
}
html[data-auth="1"] .site-header__inner > .brand {
justify-self: start;
min-width: 0;
}
html[data-auth="1"] .brand--header-logo .brand__logo {
height: auto;
width: auto;
max-height: calc(var(--header-h) - 8px);
max-width: calc(40vw - 3.6rem);
object-fit: contain;
object-position: left center;
}
html[data-auth="1"] .site-header.pixel-frame--bar::after { content: ""; }
}
@media (min-width: calc(45rem + 1px)) {
html[data-auth="1"] .site-header {
background:
radial-gradient(60% 160% at 0% 100%, rgb(160 40 120 / 30%), transparent 60%),
radial-gradient(50% 160% at 100% 0%, rgb(110 50 170 / 26%), transparent 60%),
var(--hdr-quilt) 0 0 / 26px 16px,
var(--hdr-bed);
box-shadow: 0 8px 22px rgb(0 0 0 / 55%);
}
html[data-auth="1"] .site-header.pixel-frame--bar::after { content: none; }
html[data-auth="1"] .site-header__inner {
box-sizing: border-box;
height: 100%;
align-items: center;
padding-top: 0;
padding-bottom: 0;
}
html[data-auth="1"]:has(#chiken-fps[data-fps-dock="header-brand"]:not([hidden])) .site-header__inner > .brand {
margin-right: 2.6rem;
}
html[data-auth="1"] .site-header {
width: min(var(--content-w), calc(100% - var(--space-8)));
left: 0;
right: 0;
margin-inline: auto;
}
body:has(.admin-shell.pixel-frame) .site-header {
width: min(96vw, 120rem, calc(100% - var(--space-4)));
}
body:has(.village-viewport) .site-header {
width: 100%;
}
html[data-auth="1"] .hdr-trim {
display: block;
position: absolute;
inset: 0;
z-index: auto;
pointer-events: none;
background:
linear-gradient(180deg, #2a1604 0, #fff0b0 1px, #f0c862 22%, #b57d22 50%, #7a4c12 62%, #e8b752 82%, #3a2006 100%) left top / 100% 8px no-repeat,
linear-gradient(180deg, #2a1604 0, #fff0b0 1px, #f0c862 22%, #b57d22 50%, #7a4c12 62%, #e8b752 82%, #3a2006 100%) left bottom / 100% 8px no-repeat,
linear-gradient(90deg, #2a1604 0, #e6b450 18%, #fff0b0 40%, #c38a2a 65%, #7a4c12 85%, #2a1604 100%) left top / 6px 100% no-repeat,
linear-gradient(90deg, #2a1604 0, #e6b450 18%, #fff0b0 40%, #c38a2a 65%, #7a4c12 85%, #2a1604 100%) right top / 6px 100% no-repeat;
}
.hdr-trim > i { position: absolute; display: block; }
.hdr-trim__corner { width: 36px; height: 36px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' width='40' height='40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3bf'/%3E%3Cstop offset='.28' stop-color='%23f2c862'/%3E%3Cstop offset='.55' stop-color='%23c38a2a'/%3E%3Cstop offset='.78' stop-color='%23e9b955'/%3E%3Cstop offset='1' stop-color='%237a4c12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0h40v4H9a5 5 0 0 0-5 5v31H0z' fill='url(%23g)' stroke='%232a1604' stroke-width='.8'/%3E%3Cg fill='none' stroke='url(%23g)' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M8 18c0-6 4-10 10-10 4 0 6 3 4 6s-6 1-5-1'/%3E%3Cpath d='M24 8c4 0 7-1 9-3'/%3E%3Cpath d='M8 24c0 4-1 7-3 9'/%3E%3C/g%3E%3Cpath d='M15 15l4-2-1 4z' fill='%23fff3bf'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.hdr-trim__corner--tl { top: 0; left: 0; }
.hdr-trim__corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.hdr-trim__corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.hdr-trim__corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }
.hdr-trim__crest {
top: -1px;
left: 50%;
z-index: 20;
width: 196px;
height: 38px;
transform: translateX(-50%);
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' width='200' height='40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3bf'/%3E%3Cstop offset='.28' stop-color='%23f2c862'/%3E%3Cstop offset='.55' stop-color='%23c38a2a'/%3E%3Cstop offset='.78' stop-color='%23e9b955'/%3E%3Cstop offset='1' stop-color='%237a4c12'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23cfeaff'/%3E%3Cstop offset='.35' stop-color='%235aa8ff'/%3E%3Cstop offset='.7' stop-color='%231f5fd8'/%3E%3Cstop offset='1' stop-color='%230b2a78'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='w'%3E%3Cg fill='url(%23g)' stroke='%233a2006' stroke-width='.9' stroke-linejoin='round'%3E%3Cpath d='M94 11C78 2 50-1 20 5c22 3 46 7 72 15z'/%3E%3Cpath d='M93 16C76 10 52 9 30 15c20 1 42 5 62 10z'/%3E%3Cpath d='M93 21C78 17 60 18 44 24c16 0 32 2 48 6z'/%3E%3Cpath d='M94 26c-10-1-21 1-30 6 10-1 20 0 30 2z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fff6cf' stroke-opacity='.55' stroke-width='.8'%3E%3Cpath d='M86 11C70 6 50 4 30 6'/%3E%3Cpath d='M86 17C72 13 56 12 40 15'/%3E%3C/g%3E%3C/g%3E%3Cuse href='%23w' transform='translate(200 0) scale(-1 1)'/%3E%3Cpath d='M100 1l15 17-15 21-15-21z' fill='url(%23g)' stroke='%233a2006' stroke-width='1'/%3E%3Cpath d='M100 6l10 12-10 15-10-15z' fill='url(%23b)' stroke='%2306163f' stroke-width='.8'/%3E%3Cpath d='M100 6l10 12h-10z' fill='%23fff' fill-opacity='.28'/%3E%3Cpath d='M95 13l5-5 2 2-5 5z' fill='%23fff' fill-opacity='.75'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
filter: drop-shadow(0 2px 2px rgb(0 0 0 / 70%));
}
.hdr-trim__notch {
bottom: calc(4px - var(--gem-h, 26px) / 2);
left: 50%;
width: var(--gem-w, 20px);
height: var(--gem-h, 26px);
transform: translateX(-50%);
background: var(--frame-notch) center / 100% 100% no-repeat;
filter: drop-shadow(0 0 5px rgb(176 92 255 / 65%)) drop-shadow(0 1px 1px rgb(0 0 0 / 60%));
}
html[data-auth="1"] .site-header .site-header__inner { z-index: auto; }
html[data-auth="1"] .site-header .nav-rail { position: relative; z-index: 12; }
html[data-auth="1"] .nav-group { z-index: auto; }
html[data-auth="1"] .profile-drop.open { z-index: 4; }
html[data-auth="1"] .site-header__inner > .nav-rail {
justify-self: center;
width: max-content;
max-width: 100%;
margin-top: 0;
}
html[data-auth="1"] .nav-rail {
gap: 4px;
width: max-content;
max-width: 100%;
justify-content: center;
padding: 4px;
border: 0;
border-radius: 3px;
background: none;
box-shadow: none;
}
html[data-auth="1"] .nav-rail .nav-rail__link {
color: #f6e7c1;
font-weight: 700;
text-shadow: 0 1px 0 #000, 0 0 6px rgb(0 0 0 / 60%);
}
html[data-auth="1"] .nav-rail .nav-rail__link::before { content: none; }
html[data-auth="1"] .brand--header-logo .brand__logo {
height: calc(var(--header-h) - 18px);
width: auto;
max-width: min(12.5rem, 22vw);
object-fit: contain;
object-position: left center;
}
html[data-auth="1"] .nav-rail .nav-rail__ico { color: #f0c050; filter: drop-shadow(0 1px 0 #000); }
html[data-auth="1"] .nav-rail .nav-group__caret { color: #e8d6a8; }
html[data-auth="1"] .nav-rail .nav-rail__link:hover { background: rgb(120 150 255 / 10%); }
html[data-auth="1"] .nav-rail .nav-rail__link[aria-current="page"],
html[data-auth="1"] .nav-rail .nav-group.is-child-current > .nav-rail__link {
color: #fff1cc;
background: linear-gradient(180deg, #4682f4 0%, #2457d0 48%, #163c9e 100%);
border-color: #081845;
box-shadow:
inset 0 1px 0 rgb(210 230 255 / 60%),
inset 0 -2px 0 rgb(0 0 0 / 28%),
0 0 0 1px rgb(130 175 255 / 40%),
0 0 14px rgb(60 120 255 / 45%);
}
html[data-auth="1"] .nav-rail .nav-rail__link[aria-current="page"] .nav-rail__ico,
html[data-auth="1"] .nav-rail .nav-group.is-child-current > .nav-rail__link .nav-rail__ico { color: #ffd76a; }
html[data-auth="1"] .nav-group__menu { z-index: 40; }
html[data-auth="1"] .nav-group--shop > .nav-group__menu,
html[data-auth="1"] .nav-group--chikonomicon > .nav-group__menu {
left: auto;
right: 0;
}
html[data-auth="1"] .nav-group__menu {
border: 2px solid transparent;
border-radius: 3px;
background: linear-gradient(180deg, #18214a, #0d1430) padding-box, linear-gradient(180deg, #fbe39a, #c99232 40%, #f2c862 62%, #7a4c12) border-box;
box-shadow: 0 0 0 1px #160c02, 0 14px 30px rgb(0 0 0 / 65%);
}
html[data-auth="1"] .profile-drop {
gap: 0;
padding: 0;
border: 0;
border-radius: 0;
background: none;
box-shadow: none;
}
html[data-auth="1"] .site-header__inner > .header-end { margin-right: 20px; }
html[data-auth="1"] .profile-drop .header-avatar {
border: 1px solid rgb(233 194 95 / 50%);
border-radius: 14px;
box-shadow: 0 3px 8px rgb(0 0 0 / 45%);
}
html[data-auth="1"] .header-wallet__row > span:last-child {
font-family: var(--font-display);
font-size: 1.12rem;
color: #f6e7c1;
text-shadow: 0 1px 0 #000;
}
html[data-auth="1"] .header-wallet__row::after { color: #d9c9a2; }
@media (min-width: 1560px) {
html[data-auth="1"] .site-header__inner--banners {
grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
align-items: center;
}
html[data-auth="1"] .site-header__inner--banners > .brand { grid-column: 1; }
html[data-auth="1"] .site-header__inner--banners > .hdr-banner--l {
grid-column: 2;
justify-self: end;
margin-right: 20px;
}
html[data-auth="1"] .site-header__inner--banners > .nav-rail {
grid-column: 3;
justify-self: center;
width: max-content;
max-width: 100%;
}
html[data-auth="1"] .site-header__inner--banners > .hdr-banner--r {
grid-column: 4;
justify-self: start;
margin-left: 20px;
}
html[data-auth="1"] .site-header__inner--banners > .header-end { grid-column: 5; }
html[data-auth="1"] .hdr-banner {
display: block;
position: relative;
align-self: start;
width: 42px;
height: calc(3.25rem + 6px);
margin-top: 8px;
}
.hdr-banner__flag {
position: absolute;
z-index: 1;
inset: 0 4px;
display: block;
background: linear-gradient(180deg, #f6d27a, #b47d26 55%, #e2ac48);
clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
filter: drop-shadow(0 3px 3px rgb(0 0 0 / 70%));
}
.hdr-banner__flag::before {
content: "";
position: absolute;
inset: 0 3px 3px;
background:
linear-gradient(90deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 14%) 45%, rgb(0 0 0 / 0%) 55%),
linear-gradient(180deg, #3f78e8, #1d4cb8 55%, #0f2c78);
clip-path: polygon(0 0, 100% 0, 100% 79%, 50% 97%, 0 79%);
}
.hdr-banner__flag::after {
content: "";
position: absolute;
top: 22%;
left: 50%;
width: 32px;
height: 32px;
transform: translateX(-50%);
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3bf'/%3E%3Cstop offset='.28' stop-color='%23f2c862'/%3E%3Cstop offset='.55' stop-color='%23c38a2a'/%3E%3Cstop offset='.78' stop-color='%23e9b955'/%3E%3Cstop offset='1' stop-color='%237a4c12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)' stroke='%233a2006' stroke-width='.7' stroke-linejoin='round'%3E%3Cpath d='M6.2 13.2C4.4 11.6 3.7 9 4.2 6.4c1.5 1.3 2.6 2.8 3.4 4.6z'/%3E%3Cpath d='M5.6 15.2c0-3.6 2.7-5.6 5.7-5.8l1-3.2c.4-1.6 1.7-2.6 3.1-2.4l.6-1.3.8 1.4 1.3-.5-.1 1.6c.8.5 1.2 1.4 1.1 2.3l1.8.6-1.8.8c-.3 1.6-1.2 2.7-2.3 3.4 1 .7 1.8 1.8 1.8 3.2 0 2.9-2.9 4.9-6.6 4.9-3.8 0-6.4-2-6.4-5z'/%3E%3C/g%3E%3Cpath d='M8.8 14.6c1.8-1.7 4.6-1.8 6.4.1-1.7 1.9-4.6 2.1-6.4-.1z' fill='%238a5a14' fill-opacity='.55'/%3E%3Ccircle cx='16.6' cy='6.1' r='.75' fill='%232a1604'/%3E%3Cpath d='M10.4 20.2v2.3M13.8 20.2v2.3' stroke='%23e2ac48' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
filter: drop-shadow(0 1px 1px rgb(0 0 0 / 70%));
}
.hdr-banner--r .hdr-banner__flag::after { transform: translateX(-50%) scaleX(-1); }
}
@media (max-width: 1199px) {
.hdr-trim__crest { width: 130px; height: 26px; }
}
}
@media (max-width: 1100px) {
html[data-auth="1"] .site-header,
body:has(.page-viewport) .site-footer {
left: 0.4rem;
right: 0.4rem;
width: auto;
margin-left: 0;
margin-right: 0;
}
.page {
padding-left: 0.4rem;
padding-right: 0.4rem;
box-sizing: border-box;
}
}
