/* ==========================================================================
   Habbend navigation console (2026-11).
   One bordered card: the bar (brand · Rares / Badges / Lookup · Hotel ▾ ·
   Tools ▾ · search palette · account · theme) and the newest-rares strip
   under it. On phones the bar carries a tab strip and the menu folds into a
   sheet below the card. Loaded after habbend.css and the theme sheets only
   while nav_console_mode allows it (lib/nav_console.php), so everything in
   here is scoped to .site-console and the classic header is untouched.
   Tokens come from the theme sheets; the pixel font is --font-pixel.
   ========================================================================== */

.site-console {
  position: relative;
  z-index: 40;
  margin: 0 0 1.25rem;
  border: 1px solid var(--content-box-border, var(--panel-border));
  border-radius: 12px;
  background: var(--content-box-bg, var(--bg-elevated));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
  color: var(--fg);
  font-family: var(--font-pixel, var(--font));
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

.site-console a {
  text-decoration: none;
}

.site-console .sc-icon {
  display: block;
  flex: 0 0 auto;
}

/* —— Row 1: the bar —— */
.sc-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 3.25rem; /* 52px */
  min-width: 0;
  padding: 0 0.5rem 0 0.625rem;
}

.sc-grow {
  flex: 1 1 auto;
  min-width: 0.25rem;
}

/* Brand: the H at 24×34 and a quiet wordmark. */
.sc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  height: 2.5rem;
  padding: 0 0.5rem 0 0.125rem;
  color: var(--fg);
}

.sc-brand:hover {
  color: var(--fg);
}

.site-console .sc-logo {
  position: relative;
  display: block;
  width: 24px;
  height: 34px;
  line-height: 0;
}

.site-console .sc-logo .logo {
  display: block;
  width: 24px;
  height: 34px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.site-console .sc-logo .logo--highlight {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.sc-brand:hover .logo--highlight,
.sc-brand:focus-visible .logo--highlight {
  opacity: 1;
}

.sc-wordmark {
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.2px;
  line-height: 1;
}

/* Primary links: 30px tall, 13px text, the current one carries a 2px accent rule. */
.sc-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
  margin-left: 0.375rem;
}

.sc-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

/* habbend.css gives every .dropdown summary its own chevron; the console draws one. */
.sc-link::-webkit-details-marker,
.sc-link::marker,
.site-console .sc-menu > summary::after,
.site-console .sc-menu > summary::before {
  display: none;
  content: none;
}

.sc-link:hover,
.sc-link:focus-visible {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.sc-link.is-current {
  color: var(--fg);
}

.sc-link.is-current::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.sc-link--menu .sc-chev {
  width: 10px;
  height: 10px;
  transition: transform 120ms ease;
}

/* Menus: a <details> dropdown, two columns of icon + title + one line. */
.sc-menu {
  position: relative;
}

.sc-menu[open] > .sc-link {
  color: var(--fg);
  background: var(--control-bg);
}

.sc-menu[open] > .sc-link .sc-chev {
  transform: scaleY(-1);
}

.sc-menu-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: 31.25rem;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--chrome-sheet-border, var(--content-box-border));
  border-radius: 12px;
  background: var(--chrome-sheet, var(--content-box-bg));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sc-menu--tools .sc-menu-panel {
  width: 29rem;
}

.sc-menu-label {
  grid-column: 1 / -1;
  margin: 6px 0 2px;
  padding: 0 10px;
  font-size: 0.6875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.sc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--fg);
}

.sc-row:hover,
.sc-row:focus-visible {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.sc-row[aria-current="page"] {
  background: var(--accent-soft);
}

.sc-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--fg);
}

.sc-row-icon--green {
  color: var(--success, #34d399);
}

.sc-row-icon--accent {
  color: var(--accent);
}

.sc-row-icon--gold {
  color: var(--warn, #f59e0b);
}

.sc-row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sc-row-title {
  font-size: 0.875rem;
  line-height: 1.1;
}

.sc-row-desc {
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search: the classic palette markup, drawn as a 36px field with a 10px
   corner. Expanded (⌘K) it keeps habbend.css's centred sheet. */
.site-console .site-header-search {
  flex: 0 1 16.375rem;
  min-width: 7rem;
  max-width: 16.375rem;
  margin: 0 0 0 0.25rem;
}

.site-console .site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 6px 0 10px;
  border: 1px solid var(--content-box-border, var(--panel-border));
  border-radius: 10px;
  background: var(--field-bg);
}

.site-console .site-search-icon {
  position: static;
  width: 14px;
  height: 14px;
  transform: none;
  color: var(--muted);
}

.site-console .site-search-input,
.site-console .site-search-input.rares-filter-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.8125rem;
  color: var(--fg);
}

.site-console .site-search-input:focus,
.site-console .site-search-input.rares-filter-input:focus {
  outline: none;
  box-shadow: none;
}

.site-console .site-search-form:focus-within {
  border-color: var(--accent);
}

.site-console .site-search-kbd {
  position: static;
  transform: none;
  padding: 2px 5px;
  border: 1px solid var(--content-box-border, var(--panel-border));
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1;
}

/* Grouped results need the room: rare names, a meta line and a price. */
.site-console .site-header-search.is-expanded {
  flex: none;
  width: min(42rem, calc(100vw - 1.5rem));
  max-width: none; /* the compact field's cap above must not clamp the open sheet */
}

.site-console .site-header-search.is-expanded .site-search-form {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.site-console .site-header-search.is-expanded .site-search-input,
.site-console .site-header-search.is-expanded .site-search-input.rares-filter-input {
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--content-box-border, var(--panel-border));
  border-radius: 10px;
  background: var(--field-bg);
  font-size: 1rem;
}

/* Palette: filter row, group headings, the hit shapes per kind. */
.sc-palette-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 2px 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--panel-border);
}

.sc-palette-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.sc-palette-tab span {
  font-size: 0.6875rem;
  opacity: 0.7;
}

.sc-palette-tab:hover {
  color: var(--fg);
}

.sc-palette-tab.is-active {
  background: var(--control-bg);
  color: var(--fg);
}

.sc-palette-hit .sc-palette-head {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--control-bg);
}

/* The 64×55 head render at about half size, nudged so the face fills the circle. */
.sc-palette-hit .sc-palette-head img {
  width: 34px;
  max-width: none;
  height: 29px;
  margin: -1px 0 0 -3px;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sc-palette-hit--badge img {
  object-fit: contain;
}

.sc-palette-online {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success, #34d399);
}

.sc-palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  padding: 6px 4px 2px;
  border-top: 1px solid var(--panel-border);
}

.sc-palette-foot .catalogue-search-all {
  font-size: 0.75rem;
}

.sc-palette-group {
  margin: 0.5rem 0 0.15rem;
  padding: 0 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.sc-palette-group:first-child {
  margin-top: 0.15rem;
}

.sc-palette-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--control-bg);
  color: var(--fg);
}

.sc-palette-glyph svg {
  display: block;
  width: 14px;
  height: 14px;
}

/* Actions: account, theme, and on phones search + menu. */
.sc-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 0.375rem;
}

.site-console .btn.sc-icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--fg);
}

.site-console .btn.sc-icon-btn:hover {
  background: var(--control-bg);
}

.site-console .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon--open,
.site-console .site-menu-toggle:not([aria-expanded="true"]) .site-menu-toggle-icon--close {
  display: none;
}

.site-console .site-menu-toggle[aria-expanded="true"] {
  background: var(--control-bg);
}

/* Log in: the one saturated control in the bar. */
.sc-login {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #1a47b8;
  border-radius: 9px;
  background-color: #2563eb;
  background-image: linear-gradient(180deg, #3b7bff, #2156d9);
  color: #fff;
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(37, 99, 235, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.sc-login:hover,
.sc-login:focus-visible {
  color: #fff;
  background-image: linear-gradient(180deg, #4a86ff, #2a60e6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(37, 99, 235, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.sc-login:active {
  background-image: linear-gradient(180deg, #2156d9, #2563eb);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Theme toggle: a ghost square; habbend.css picks the sun or the moon. */
.site-console .btn.site-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.site-console .btn.site-theme-toggle:hover {
  background: var(--control-bg);
}

.site-console .site-theme-toggle-icon {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

/* Account: head + name; the menu lists the member pages and log out. */
.sc-user {
  position: relative;
}

.sc-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px 0 5px;
  border: 1px solid var(--content-box-border, var(--panel-border));
  border-radius: 10px;
  background: var(--control-bg);
  color: var(--fg);
  font-size: 0.8125rem;
  cursor: pointer;
  list-style: none;
}

.sc-user-trigger::-webkit-details-marker {
  display: none;
}

.sc-user-trigger:hover,
.sc-user[open] > .sc-user-trigger {
  background: var(--control-bg-hover, var(--control-bg));
}

.sc-user-head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--bg-elevated);
}

/* The 64×55 head render at half size, nudged so the face sits in the circle. */
.sc-user-head img {
  width: 32px;
  max-width: none; /* habbend.css caps img at 100%, which squashed the head in its circle */
  height: 28px;
  margin: 0 0 0 -3px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sc-user-head--lg {
  width: 32px;
  height: 32px;
  border-radius: 16px;
}

.sc-user-head--lg img {
  width: 40px;
  height: 34px;
  margin: 0 0 0 -4px;
}

.sc-user-head-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.sc-user-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-console .sc-user-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 15.625rem;
  box-sizing: border-box;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--chrome-sheet-border, var(--content-box-border));
  border-radius: 12px;
  background: var(--chrome-sheet, var(--content-box-bg));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.sc-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
}

.sc-user-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 0.875rem;
}

.sc-user-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.site-console .sc-user-menu a,
.site-console .sc-user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.site-console .sc-user-menu a:hover,
.site-console .sc-user-menu button:hover,
.site-console .sc-user-menu a[aria-current="page"] {
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  color: var(--fg);
}

.site-console .sc-user-menu .sc-icon {
  color: var(--muted);
}

.site-console .sc-user-menu hr {
  width: auto;
  margin: 4px 6px;
  border: 0;
  border-top: 1px solid var(--panel-border);
}

.site-console .sc-user-menu form {
  margin: 0;
}

.site-console .sc-user-menu button {
  color: var(--muted);
}

/* —— Row 2: the newest-rares strip —— */
.sc-ticker {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 10px;
  border-top: 1px solid var(--panel-border);
  border-radius: 0 0 12px 12px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

html[data-theme="light"] .sc-ticker,
html[data-theme="paper"] .sc-ticker {
  background: rgba(30, 36, 44, 0.04);
}

.sc-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.sc-ticker-pill--trending {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warn, #f59e0b);
}

.sc-ticker-pill:hover {
  filter: brightness(1.12);
}

.sc-ticker-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.sc-ticker-list li {
  display: flex;
  flex: 0 0 auto;
}

.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  box-sizing: border-box;
  padding: 0 9px 0 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 0.8125rem;
  white-space: nowrap;
}

html[data-theme="light"] .sc-chip,
html[data-theme="paper"] .sc-chip {
  border-color: var(--panel-border);
  background: var(--field-bg);
}

.sc-chip:hover {
  color: var(--fg);
  border-color: var(--content-box-border, var(--panel-border));
}

.sc-chip img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sc-chip-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--control-bg);
  font-size: 0.6875rem;
  color: var(--muted);
}

.sc-chip-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--warn, #f59e0b);
  font-size: 0.75rem;
}

.sc-chip-price img {
  width: 13px;
  height: 13px;
}

.sc-chip-muted {
  color: var(--muted);
  font-size: 0.75rem;
}

.sc-ticker-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.sc-ticker-more:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

/* Phone-only pieces stay out of the desktop tree. */
.sc-tabs,
.sc-sheet {
  display: none;
}

/* Keep the labels' room on narrow desktops: the kbd hint goes first. */
@media (min-width: 769px) and (max-width: 900px) {
  .site-console .site-search-kbd {
    display: none;
  }

  .site-console .site-header-search {
    min-width: 6rem;
  }
}

/* ==========================================================================
   Phone (≤768px, the fold habbend-ui.js already uses for the menu)
   ========================================================================== */
@media (max-width: 768px) {
  .sc-bar {
    gap: 6px;
    padding: 0 6px 0 8px;
  }

  .sc-brand {
    gap: 7px;
    padding-right: 4px;
  }

  .site-console .sc-logo,
  .site-console .sc-logo .logo {
    width: 22px;
    height: 31px;
  }

  .sc-nav,
  .sc-grow,
  .site-console .btn.site-theme-toggle {
    display: none;
  }

  /* The field hides behind the icon; expanded it is habbend.css's sheet. */
  .site-console .site-header-search:not(.is-expanded) {
    display: none;
  }

  .site-console .btn.sc-icon-btn {
    display: inline-flex;
  }

  /* Search · Log in / head · menu, left to right (habbend.css orders the
     classic toggle first). */
  .site-console .btn.site-menu-toggle {
    order: 10;
  }

  .sc-actions {
    margin-left: auto;
  }

  .sc-login {
    height: 36px;
  }

  .sc-user-name {
    display: none;
  }

  .sc-user-trigger {
    padding-right: 5px;
  }

  /* Tab strip: the five most-used pages, one tap, scrolls sideways. */
  .sc-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px;
    border-top: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.18);
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-theme="light"] .sc-tabs,
  html[data-theme="paper"] .sc-tabs {
    background: rgba(30, 36, 44, 0.04);
  }

  .sc-tabs::-webkit-scrollbar {
    display: none;
  }

  .sc-tabs a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 40px;
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .sc-tabs a.is-current {
    color: var(--fg);
  }

  .sc-tabs a.is-current::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
  }

  /* The strip rides under the tabs; chips scroll instead of fading. */
  .sc-ticker {
    height: auto;
    padding: 6px 8px;
    border-radius: 0 0 12px 12px;
  }

  .sc-ticker-list {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }

  .sc-ticker-list::-webkit-scrollbar {
    display: none;
  }

  .sc-ticker-more {
    display: none;
  }

  /* The sheet: three tiles, grouped rows, appearance, log out. */
  .sc-sheet {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 46;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    max-height: min(80vh, calc(100vh - 5rem));
    padding: 12px 10px 14px;
    border: 1px solid var(--chrome-sheet-border, var(--content-box-border));
    border-radius: 12px;
    background: var(--chrome-sheet, var(--content-box-bg));
    box-shadow: var(--shadow, 0 14px 32px rgba(0, 0, 0, 0.4));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .js .sc-sheet.is-open,
  html:not(.js) .sc-sheet {
    display: flex;
  }

  html:not(.js) .sc-sheet {
    position: static;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
  }

  .sc-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .sc-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 76px;
    border: 1px solid var(--content-box-border, var(--panel-border));
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.875rem;
  }

  .sc-tile.is-current {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .sc-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--fg);
  }

  .sc-tile-icon--rares {
    color: var(--accent);
  }

  .sc-tile-icon--badges {
    color: var(--warn, #f59e0b);
  }

  .sc-tile-icon--head {
    overflow: hidden;
    border-radius: 15px;
    background: var(--control-bg);
  }

  .sc-tile-icon--head img {
    width: 38px;
    max-width: none;
    height: 33px;
    margin: 0 0 0 -4px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
  }

  .sc-sheet-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sc-sheet-label {
    margin: 0 0 4px;
    padding: 0 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
  }

  .sc-sheet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 8px;
    border-radius: 9px;
    color: var(--fg);
    font-size: 0.9375rem;
  }

  .sc-sheet-row:hover,
  .sc-sheet-row[aria-current="page"] {
    background: color-mix(in srgb, var(--fg) 6%, transparent);
  }

  .sc-sheet-row .sc-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .sc-sheet-row-meta {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--muted);
  }

  .sc-sheet-quick {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .sc-sheet-quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--control-bg);
    color: var(--fg);
    font-size: 0.8125rem;
    text-align: center;
  }

  .sc-sheet-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 0;
    border-top: 1px solid var(--panel-border);
    font-size: 0.8125rem;
    color: var(--muted);
  }

  .sc-theme-proxy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--content-box-border, var(--panel-border));
    border-radius: 8px;
    background: var(--control-bg);
    color: var(--fg);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
  }

  .sc-theme-proxy .site-theme-toggle-icon {
    width: 14px;
    height: 14px;
  }

  /* habbend.css shows the sun in dark mode and the moon in light; the label follows. */
  html[data-theme="light"] .sc-theme-proxy-label--to-light,
  html:not([data-theme="light"]) .sc-theme-proxy-label--to-dark {
    display: none;
  }

  .sc-sheet-logout {
    display: flex;
    justify-content: center;
    margin: 0;
  }

  .sc-sheet-logout button {
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
  }

  .site-console .sc-user-menu {
    width: 15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-console .sc-logo .logo--highlight,
  .sc-link--menu .sc-chev {
    transition: none;
  }
}
