/* ==========================================================================
   Autumn's Leaves — news.autumnsleaves.com
   Sculpted-stone theme, taken from the in-game canonical UI
   (client/ui/uiKit.js + the "PC-98 SCULPTED STONE THEME" block in
   client/styles.css):

     - window frames are the game's own hand-drawn 9-slice art
       (Resources/ui/window.png, windowtitle.png, windowarea.png), applied
       with border-image exactly as the game does (same slices and widths);
     - wells, button plaques and the Greek-key band are the uiKit vector
       recipes, baked once to PNG at 2x (Resources/ui/frame-*.png), so the
       site needs no canvas work at load;
     - the palette is the game's --ui-slate-* / gold tokens.

   Rules of the look: square corners, hard 1px edges, no blur, no glow,
   hover = brightness (never a lift). No web fonts, no frameworks.
   ========================================================================== */

:root {
  /* Stone, sampled from the window art (mirrors --ui-slate-* in the game). */
  --slate-well: #0e1116;
  --slate-deep: #1a1d25;
  --slate-low: #2d313e;
  --slate-mid: #424759;
  --slate-hi: #666c82;
  --slate-spec: #8f96ad;
  --panel-bg: #1a1d25;
  --page-bg: #0b0c12;

  /* Gold trim + text (mirrors --ui-gold-* / --ui-text-*). */
  --gold: #c9a24a;
  --gold-bright: #e8cd84;
  --gold-dim: #6e5523;
  --gold-hairline: rgba(212, 176, 96, 0.55);
  --title: #f0dca0;
  --text: #e7e2d4;
  --text-muted: rgba(231, 226, 212, 0.62);
  --text-faint: rgba(231, 226, 212, 0.42);
  --divider: rgba(102, 108, 130, 0.38);
  --success: #8ed88f;
  --danger: #ff9a8a;
  --amber: #e8b04a;

  --btn-bg: linear-gradient(180deg, #4c5266, #353a4a);
  --btn-primary-bg: linear-gradient(180deg, #dcb45c, #a9842f);
  --btn-primary-text: #2a1f08;

  /* Item rarity colours */
  --r-common: #d8d0c4;
  --r-uncommon: #7fd16b;
  --r-rare: #5aa9ff;
  --r-epic: #b884ff;
  --r-legendary: #ff9a3c;
  --r-masterwork: #ffd35a;
  --r-ethereal: #8ff0d2;
  --r-celestial: #86ecff;

  /* Frame art. Slices are in image pixels; the baked vector frames are 2x. */
  --img-window: url("Resources/ui/window.png");
  --img-window-title: url("Resources/ui/windowtitle.png");
  --img-window-area: url("Resources/ui/windowarea.png");
  --img-frame-panel: url("Resources/ui/frame-panel.png");
  --img-frame-well: url("Resources/ui/frame-well.png");
  --img-frame-button: url("Resources/ui/frame-button.png");
  --img-stone: url("Resources/ui/stone-tile.png");

  --font-ui: Tahoma, "Segoe UI", Geneva, Verdana, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --nav-h: 62px;
  --page-w: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--slate-mid) var(--slate-well);
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  /* Speckled stone, the same grain the frames are cut from. */
  background: var(--page-bg) var(--img-stone) repeat;
  background-size: 96px 96px;
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:hover {
  color: #fff3c9;
  text-decoration: underline;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(232, 205, 132, 0.7);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  padding: 8px 12px;
  background: var(--gold);
  color: var(--btn-primary-text);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ----------------------------------------------------------------------
   Frame primitives
   ---------------------------------------------------------------------- */

/* Titled window: windowtitle.png (horned bosses + title band). The header
   (.card-head) sits inside the band, between the bosses. */
.card {
  position: relative;
  border: 6px solid var(--slate-mid);
  border-left-width: 20px;
  border-right-width: 20px;
  border-bottom-width: 22px;
  border-image-source: var(--img-window-title);
  border-image-slice: 90 52 54 52 fill;
  border-image-width: 92px 54px 56px 54px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  /* The art has transparent rounded corners: only the art may paint the
     border area, so the fill is clipped to the padding box. */
  background: var(--panel-bg);
  background-clip: padding-box;
  padding: 0 10px 12px;
  min-height: 152px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 40px;
  margin: 0 20px 8px;
  padding: 0 6px;
  min-width: 0;
}

.card-head h2,
.card-head h3 {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--title);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(201, 162, 74, 0.25);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 1000 auto;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Plain window: window.png (four scroll knots). */
.card.card--plain,
.news-card {
  border: 24px solid var(--slate-mid);
  border-image-source: var(--img-window);
  border-image-slice: 43 44 43 44 fill;
  border-image-width: 45px 46px 45px 46px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  background: var(--panel-bg);
  background-clip: padding-box;
  padding: 6px 8px 8px;
  min-height: 90px;
}

/* Title plate: windowarea.png (statues flanking a tablet, battlement crown).
   Fixed 77px tall: the statues must never stretch vertically. */
.plate {
  display: inline-block;
  height: 77px;
  min-width: min(100%, 340px);
  max-width: 100%;
  margin: 0;
  padding: 0 6px;
  border: 22px solid transparent;
  border-left-width: 52px;
  border-right-width: 52px;
  border-bottom-width: 18px;
  border-image-source: var(--img-window-area);
  border-image-slice: 38 78 35 79 fill;
  border-image-width: 40px 80px 37px 81px;
  border-image-outset: 0;
  border-image-repeat: round;
  color: var(--title);
  font-size: 1rem;
  line-height: 37px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(201, 162, 74, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inset well: carved socket for values, inputs and list rows. */
.well,
.pulse-stat,
.hunt-stat,
.chip,
.drop,
.status-pill,
.auth-form input {
  border: 6px solid var(--slate-deep);
  border-image-source: var(--img-frame-well);
  border-image-slice: 12 fill;
  border-image-width: 6px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  background: var(--slate-well);
}

/* Stone trough + flat fill, like the in-game status bars. */
.bar {
  height: 10px;
  margin-top: 5px;
  background: var(--slate-well);
  border: 1px solid var(--slate-deep);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.7),
    inset 0 -1px 0 rgba(110, 119, 137, 0.3),
    0 0 0 1px rgba(110, 119, 137, 0.22);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #ecc873 0%, #c9a24a 45%, #8f6e27 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 200, 0.45);
  transition: width 0.8s steps(16, end);
}

.divider {
  height: 2px;
  border: 0;
  margin: 12px 0;
  background: linear-gradient(90deg, transparent, var(--slate-hi) 20%, var(--slate-hi) 80%, transparent);
  box-shadow: 0 1px 0 var(--slate-well);
}

/* ----------------------------------------------------------------------
   Buttons: stone plaque rim, face supplied by `background`
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 14px;
  border: 8px solid var(--slate-mid);
  border-image-source: var(--img-frame-button);
  border-image-slice: 20;
  border-image-width: 10px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  background-image: var(--btn-bg);
  background-clip: padding-box;
  color: #efe6d2;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.14s ease;
}

.btn:hover {
  color: #efe6d2;
  text-decoration: none;
  filter: brightness(1.14);
}

.btn:active {
  filter: brightness(0.92);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--gold-bright), 0 0 0 2px rgba(232, 205, 132, 0.7);
}

/* Gold plaque (primary). */
.btn-play {
  background-image: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.btn-play:hover {
  color: var(--btn-primary-text);
}

.btn-outline {
  background-image: var(--btn-bg);
}

.btn-quiet {
  background-image: none;
  background-color: rgba(10, 12, 18, 0.55);
  color: var(--text);
}

.btn-sm {
  padding: 2px 10px;
  font-size: 0.86rem;
}

.btn-block {
  width: 100%;
  margin-top: 6px;
}

/* The hero call to action is the same plaque, cut larger. */
.btn-lg {
  padding: 8px 26px;
  border-width: 12px;
  border-image-width: 15px;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

/* ----------------------------------------------------------------------
   Tabs: squared stone tabs, gold bar on the active one
   ---------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--slate-hi);
}

.tab {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--slate-hi);
  border-bottom: none;
  background: var(--slate-deep);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.tab:hover {
  background: var(--slate-low);
  color: var(--text);
}

.tab.is-active {
  background: var(--slate-low);
  border-color: var(--slate-spec);
  color: var(--gold-bright);
  box-shadow: inset 0 2px 0 var(--gold);
}

/* ----------------------------------------------------------------------
   Navigation: a stone lintel with the Greek-key band along its foot
   ---------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--nav-h);
  padding: 4px clamp(12px, 3vw, 28px) 0;
  background: linear-gradient(180deg, #2d313e, #1a1d25);
  /* Only the bottom edge of the panel band is used: meander + gold hairline. */
  border-style: solid;
  border-color: var(--slate-mid);
  border-width: 0 0 14px;
  border-image-source: var(--img-frame-panel);
  border-image-slice: 28;
  border-image-width: 0 0 14px 0;
  border-image-outset: 0;
  border-image-repeat: round;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--title);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: #fff3c9;
}

.brand img {
  display: block;
  width: 42px;
  height: 42px;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000;
}

.nav-links {
  display: flex;
  align-self: flex-end;
  gap: 4px;
  margin-right: auto;
}

/* Nav entries are the same squared stone tabs as inside the windows. */
.nav-links a {
  padding: 7px 14px 8px;
  border: 1px solid var(--slate-hi);
  border-bottom: none;
  background: var(--slate-deep);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: var(--slate-low);
  border-color: var(--slate-spec);
  color: var(--gold-bright);
  box-shadow: inset 0 2px 0 var(--gold);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  padding: 0 2px;
}

.nav-toggle svg,
.icon-link svg {
  display: block;
  fill: currentColor;
}

.icon-link {
  display: inline-flex;
  padding: 6px;
  border: 1px solid transparent;
  color: var(--text-muted);
}

.icon-link:hover {
  color: var(--gold-bright);
  background: rgba(201, 162, 74, 0.14);
  box-shadow: inset 0 0 0 1px var(--gold-hairline);
}

/* Server status: a carved well with a square signal lamp. */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-dot,
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--slate-hi);
  box-shadow: 0 0 0 1px #000;
  flex-shrink: 0;
}

.status-pill.is-online .status-dot,
.live-dot {
  background: var(--success);
  animation: lamp-blink 1.8s steps(2, jump-none) infinite;
}

.status-pill.is-online {
  color: var(--text);
}

.status-pill.is-maintenance .status-dot {
  background: var(--amber);
}

.status-pill.is-offline .status-dot {
  background: #d9534f;
}

/* A stepped blink, like an indicator lamp, rather than a soft pulse. */
@keyframes lamp-blink {
  from { opacity: 1; }
  to { opacity: 0.45; }
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-welcome {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--title);
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----------------------------------------------------------------------
   Sockets: square carved slots for portraits, icons and initials
   ---------------------------------------------------------------------- */
.medallion,
.auth-avatar,
.feed-icon,
.board-rank {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--slate-well);
  border: 1px solid var(--slate-mid);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.75),
    inset -1px -1px 0 rgba(102, 108, 130, 0.45);
  color: var(--gold-bright);
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
}

.medallion {
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
}

.auth-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}

.medallion img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* The initial sits underneath until (and unless) the art loads. */
  background: var(--slate-well);
}

.medallion--lg {
  width: 84px;
  height: 84px;
  font-size: 2rem;
}

/* ----------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 660px);
  padding: 28px 16px 74px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background: #14100f;
  /* Hard cornice where the art meets the stone. */
  border-bottom: 2px solid var(--slate-well);
  box-shadow: 0 1px 0 var(--slate-mid);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: -3;
  animation: hero-drift 40s ease-in-out infinite alternate;
  transform-origin: 50% 40%;
}

@keyframes hero-drift {
  from { transform: scale(1.03); }
  to { transform: scale(1.1) translateY(-1.5%); }
}

/* Darken behind the copy so it reads; a plain shade, not a glow. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 58% 55% at 50% 52%, rgba(11, 12, 18, 0.55) 0%, rgba(11, 12, 18, 0.1) 100%),
    linear-gradient(180deg, rgba(11, 12, 18, 0.35) 0%, rgba(11, 12, 18, 0) 30%, rgba(11, 12, 18, 0.45) 100%);
}

.hero-leaves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-inner {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-logo {
  width: min(340px, 60vw);
  height: auto;
  margin: -22px 0 -30px;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.55));
}

.hero-tagline {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  color: #f3ecdc;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000, 0 2px 8px rgba(0, 0, 0, 0.9);
}

.play-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.play-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.play-caption {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-shadow: 0 1px 0 #000;
}

.play-maintenance {
  display: none;
  font-weight: 700;
  color: var(--danger);
  text-shadow: 0 1px 0 #000;
}

/* Maintenance / offline: Play is disabled, Black Sunset portal is offered. */
.play-cta.is-maintenance .btn-play {
  pointer-events: none;
  filter: grayscale(1) brightness(0.7);
}

.play-cta.is-maintenance .play-maintenance {
  display: block;
}

.play-cta.is-maintenance .play-caption {
  display: none;
}

.bs-portal-btn {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border: 8px solid var(--slate-mid);
  border-image-source: var(--img-frame-button);
  border-image-slice: 20;
  border-image-width: 10px;
  border-image-repeat: stretch;
  background: var(--btn-bg);
  background-clip: padding-box;
  color: var(--gold-bright);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.bs-portal-btn img {
  height: 28px;
  width: auto;
  display: block;
}

.play-cta.is-maintenance .bs-portal-btn {
  display: inline-flex;
}

.bs-portal-btn:hover {
  filter: brightness(1.14);
}

/* ----------------------------------------------------------------------
   Live ticker: the compact stone band (as around the in-game skill bars)
   ---------------------------------------------------------------------- */
.ticker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 24px);
  max-width: var(--page-w);
  margin: -29px auto 0;
  padding: 5px 8px;
  border: 10px solid var(--slate-mid);
  border-image-source: var(--img-frame-panel);
  border-image-slice: 28 fill;
  border-image-width: 14px;
  border-image-outset: 0;
  border-image-repeat: round;
  background: var(--slate-well);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 0 10px 0 4px;
  border-right: 1px solid var(--divider);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--success);
}

.ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: ticker-scroll var(--ticker-duration, 60s) linear infinite;
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Diamond separator between entries, cut like an inlay. */
.ticker-item::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px #000;
}

.ticker-item time {
  color: var(--text-faint);
  font-size: 0.76rem;
}

/* ----------------------------------------------------------------------
   Page scaffolding
   ---------------------------------------------------------------------- */
.page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 30px clamp(12px, 3vw, 28px) 40px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 372px);
  gap: 22px;
  align-items: start;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head {
  margin: 0 0 10px;
}

.empty-note {
  margin: 0;
  padding: 8px 2px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ----------------------------------------------------------------------
   News
   ---------------------------------------------------------------------- */
.news-card {
  display: block;
  margin-bottom: 14px;
}

.news-head {
  display: block;
  padding: 2px 6px 0;
}

summary.news-head {
  position: relative;
  padding: 2px 40px 4px 6px;
  cursor: pointer;
  list-style: none;
}

summary.news-head::-webkit-details-marker {
  display: none;
}

/* Expand / collapse marker: a small stone plaque with a plus or minus. */
summary.news-head::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--slate-hi);
  background: var(--btn-bg);
  color: var(--gold-bright);
  font-weight: 700;
  line-height: 21px;
  text-align: center;
  box-shadow: inset 1px 1px 0 rgba(143, 150, 173, 0.5), inset -1px -1px 0 rgba(0, 0, 0, 0.5);
}

details[open] > summary.news-head::after {
  content: "\2212";
}

summary.news-head:hover::after {
  filter: brightness(1.2);
}

.news-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 1px 0 var(--slate-well), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.news-date {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Post titles are the one place the serif is used, as in the game's lore text. */
.news-title {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--title);
  text-shadow: 0 1px 0 #000;
}

.news-card--featured .news-title {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
}

.news-lede {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.news-body {
  padding: 8px 6px 4px;
}

details .news-body {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--slate-well);
}

.news-card--featured .news-body {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 2px solid var(--slate-hi);
  box-shadow: inset 0 1px 0 var(--slate-well);
}

.news-body p {
  margin: 0 0 10px;
}

.news-body ul {
  margin: 0 0 12px;
  padding-left: 4px;
  list-style: none;
}

.news-body li {
  position: relative;
  margin-bottom: 4px;
  padding-left: 18px;
}

/* Gold diamond bullets instead of browser discs. */
.news-body li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.news-body h4 {
  margin: 16px 0 6px;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.news-body strong {
  color: #fff6de;
}

.news-legal {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ----------------------------------------------------------------------
   Realm pulse
   ---------------------------------------------------------------------- */
.pulse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.pulse-stat {
  padding: 4px 8px 5px;
}

.pulse-stat dt {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pulse-stat dd {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #000;
}

.pulse-stat--live dd {
  color: var(--success);
}

/* ----------------------------------------------------------------------
   Leaderboards
   ---------------------------------------------------------------------- */
.board-list,
.hunted-list,
.feed-list,
.goal-list,
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-bottom: 1px solid var(--divider);
  font-size: 0.88rem;
}

.board-row:last-child {
  border-bottom: 0;
}

.board-rank {
  width: 24px;
  height: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* The podium ranks are raised plaques (lit top-left), the rest are sockets. */
.board-row[data-rank="1"] .board-rank,
.board-row[data-rank="2"] .board-rank,
.board-row[data-rank="3"] .board-rank {
  border-color: #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.45), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.board-row[data-rank="1"] .board-rank { color: #2a1f08; background: linear-gradient(180deg, #ecc873, #a9842f); }
.board-row[data-rank="2"] .board-rank { color: #14171d; background: linear-gradient(180deg, #c5cad6, #8f96ad); }
.board-row[data-rank="3"] .board-rank { color: #241204; background: linear-gradient(180deg, #c98f5c, #8a5a30); }

.board-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-score {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board-level {
  min-width: 44px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.board-row.is-you {
  background: rgba(201, 162, 74, 0.14);
  box-shadow: inset 2px 0 0 var(--gold);
}

.board-row.is-you .board-name::after {
  content: "You";
  margin-left: 8px;
  padding: 0 6px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ----------------------------------------------------------------------
   Most hunted
   ---------------------------------------------------------------------- */
.hunted-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--divider);
}

.hunted-row:last-child {
  border-bottom: 0;
}

.hunted-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}

.hunted-top a {
  color: var(--text);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunted-top a:hover {
  color: var(--gold-bright);
}

.hunted-count {
  color: var(--gold-bright);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ----------------------------------------------------------------------
   Feed
   ---------------------------------------------------------------------- */
.feed-list {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-mid) var(--slate-well);
}

.feed-list::-webkit-scrollbar {
  width: 10px;
}

.feed-list::-webkit-scrollbar-track {
  background: var(--slate-well);
  box-shadow: inset 1px 0 0 var(--slate-deep);
}

.feed-list::-webkit-scrollbar-thumb {
  border: 1px solid var(--slate-well);
  background: linear-gradient(90deg, var(--slate-hi), var(--slate-mid));
  box-shadow: inset 1px 1px 0 var(--slate-spec);
}

.feed-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 4px 6px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 0.86rem;
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item.is-new {
  animation: feed-flash 2.4s steps(6, end);
}

@keyframes feed-flash {
  from { background: rgba(201, 162, 74, 0.35); }
  to { background: transparent; }
}

.feed-icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.feed-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.feed-item[data-kind="find"] .feed-icon { color: var(--r-legendary); }
.feed-item[data-kind="first"] .feed-icon { color: var(--gold-bright); }
.feed-item[data-kind="craft"] .feed-icon { color: var(--r-masterwork); }
.feed-item[data-kind="global-spell"] .feed-icon { color: var(--r-epic); }
.feed-item[data-kind="blessing"] .feed-icon { color: #fff2b0; }
.feed-item[data-kind="event"] .feed-icon { color: var(--danger); }

.feed-text {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.feed-text b,
.ticker-item b {
  color: var(--text);
  font-weight: 700;
}

.feed-time {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.rarity-common { color: var(--r-common); }
.rarity-uncommon { color: var(--r-uncommon); }
.rarity-rare { color: var(--r-rare); }
.rarity-epic { color: var(--r-epic); }
.rarity-legendary { color: var(--r-legendary); }
.rarity-masterwork { color: var(--r-masterwork); }
.rarity-ethereal { color: var(--r-ethereal); }
.rarity-celestial { color: var(--r-celestial); }

a[class*="rarity-"] {
  font-weight: 700;
}

/* ----------------------------------------------------------------------
   Personal band
   ---------------------------------------------------------------------- */
.you {
  margin-bottom: 30px;
}

.you-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.5fr) minmax(260px, 1fr);
  grid-template-areas:
    "character hunt goals"
    "character hunt away";
  gap: 16px;
}

.you-character { grid-area: character; }
.you-hunt { grid-area: hunt; }
.you-goals { grid-area: goals; }
.you-away { grid-area: away; }

.you-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.you-teaser h2 {
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--title);
  text-shadow: 0 1px 0 #000;
}

.you-teaser p {
  margin: 4px 0 0;
  color: var(--text-muted);
  max-width: 78ch;
}

/* Character card */
.you-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.char-avatar {
  width: 88px;
  height: 88px;
  font-size: 2.3rem;
  margin-top: 4px;
}

.char-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--title);
  text-shadow: 0 1px 0 #000;
  overflow-wrap: anywhere;
}

.char-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.char-level {
  display: inline-block;
  padding: 0 8px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 var(--slate-well), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.xp {
  width: 100%;
  text-align: left;
}

.xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin: 2px 0;
}

.chip {
  padding: 2px 6px 3px;
  text-align: left;
  min-width: 0;
}

.chip--wide {
  grid-column: 1 / -1;
}

.chip-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chip-value {
  display: block;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.you-character .btn {
  margin-top: auto;
  width: 100%;
  white-space: normal;
}

/* Your hunt */
.you-hunt {
  display: flex;
  flex-direction: column;
}

.hunt-foot {
  margin-top: auto;
}

.hunt-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.hunt-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hunt-name {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  color: var(--title);
  text-shadow: 0 1px 0 #000;
  overflow-wrap: anywhere;
}

.hunt-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.fact {
  padding: 0 7px;
  border: 1px solid var(--slate-mid);
  background: var(--slate-deep);
  box-shadow: inset 1px 1px 0 rgba(102, 108, 130, 0.35);
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.fact--boss {
  border-color: #7d2a25;
  color: var(--danger);
}

.hunt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.hunt-stat {
  padding: 3px 8px 5px;
}

.hunt-stat b {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #000;
}

.hunt-stat span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* The headline fact reads like a line of quest text: gold bar, dark slab. */
.hunt-note {
  margin: 0 0 12px;
  padding: 7px 10px;
  background: var(--slate-well);
  border: 1px solid var(--slate-low);
  box-shadow: inset 3px 0 0 var(--gold);
  color: var(--text);
  font-size: 0.9rem;
}

.sub-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.sub-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--slate-hi), transparent);
  box-shadow: 0 1px 0 var(--slate-well);
}

.drop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.drop {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 1px 4px 1px 1px;
  font-size: 0.84rem;
}

.drop .medallion {
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

.drop a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop small {
  color: var(--text-muted);
}

.hunt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--slate-hi);
  box-shadow: inset 0 1px 0 var(--slate-well);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-list li {
  padding: 0 7px;
  border: 1px solid var(--slate-low);
  background: var(--slate-well);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.mini-list b {
  color: var(--gold-bright);
}

/* Goals */
.goal-list li {
  padding: 5px 0 7px;
  border-bottom: 1px solid var(--divider);
}

.goal-list li:last-child {
  border-bottom: 0;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}

.goal-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.goal-desc {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----------------------------------------------------------------------
   Explore tiles: the window frame laid OVER the art (as on the minimap)
   ---------------------------------------------------------------------- */
.explore {
  margin-top: 36px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  display: block;
  min-height: 290px;
  color: var(--text);
  isolation: isolate;
}

.tile:hover {
  text-decoration: none;
  color: var(--text);
}

.tile img {
  position: absolute;
  left: 26px;
  top: 26px;
  width: calc(100% - 52px);
  height: calc(100% - 52px);
  max-width: none;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.9) brightness(0.86);
  transition: filter 0.2s ease;
}

.tile:hover img {
  filter: saturate(1.05) brightness(1.08);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 28px solid transparent;
  border-image-source: var(--img-window);
  border-image-slice: 43 44 43 44;
  /* Drawn smaller than the art (as the game's minimap does) so the knots
     overlap the picture without the frame's dark lip covering it. */
  border-image-width: 30px 31px 30px 31px;
  border-image-repeat: stretch;
  pointer-events: none;
  z-index: 1;
}

.tile-body {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 12px 12px;
  background: rgba(14, 17, 22, 0.9);
  border-top: 1px solid var(--slate-hi);
  box-shadow: 0 -1px 0 var(--slate-well);
  z-index: 0;
}

.tile-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--title);
  text-shadow: 0 1px 0 #000;
}

.tile-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.tile-cta svg {
  fill: currentColor;
}

/* ----------------------------------------------------------------------
   Footer: the band again, this time as a threshold
   ---------------------------------------------------------------------- */
.site-footer {
  margin-top: 20px;
  padding: 22px 16px 34px;
  border-style: solid;
  border-color: var(--slate-mid);
  border-width: 14px 0 0;
  border-image-source: var(--img-frame-panel);
  border-image-slice: 28;
  border-image-width: 14px 0 0 0;
  border-image-repeat: round;
  background: linear-gradient(180deg, #1a1d25, #0e1116);
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 4px 0 0;
}

/* ----------------------------------------------------------------------
   Modals (auth + Black Sunset portal)
   ---------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 6, 10, 0.8);
}

/* The account window is the same titled window the game uses. */
.modal-panel {
  width: 100%;
  max-width: 400px;
  border: 6px solid var(--slate-mid);
  border-left-width: 20px;
  border-right-width: 20px;
  border-bottom-width: 22px;
  border-image-source: var(--img-window-title);
  border-image-slice: 90 52 54 52 fill;
  border-image-width: 92px 54px 56px 54px;
  border-image-repeat: stretch;
  background: var(--panel-bg);
  background-clip: padding-box;
  padding: 0 10px 10px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  margin: 0 20px 10px;
  padding: 0 6px;
}

.modal-title {
  color: var(--title);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(201, 162, 74, 0.25);
}

.modal-close {
  padding: 0 7px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1.2;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--gold-bright);
  background: rgba(201, 162, 74, 0.14);
  box-shadow: inset 0 0 0 1px var(--gold-hairline);
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 5px 8px;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
}

.auth-form input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--gold);
}

.auth-form-error {
  min-height: 1.1rem;
  margin-top: 3px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--danger);
}

.bs-portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  background: rgba(5, 6, 10, 0.92);
}

.bs-portal-panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #120e0a;
  overflow: hidden;
}

/* Single chrome: the iframe owns its toolbar; the parent only floats a close. */
.bs-portal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 5;
  border: 1px solid var(--slate-hi);
  background: var(--slate-deep);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 9px;
}

.bs-portal-close:hover {
  color: var(--gold-bright);
}

.bs-portal-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.bs-portal-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #120e0a;
  display: block;
}

.bs-portal-gate-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.bs-portal-gate-card {
  max-width: 420px;
  border: 24px solid var(--slate-mid);
  border-image-source: var(--img-window);
  border-image-slice: 43 44 43 44 fill;
  border-image-width: 45px 46px 45px 46px;
  border-image-repeat: stretch;
  background: var(--panel-bg);
  background-clip: padding-box;
  padding: 8px 12px 12px;
}

.bs-portal-gate-card .btn {
  margin-top: 12px;
}

/* ----------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .you-grid {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
    grid-template-areas:
      "character hunt"
      "goals away";
  }

  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Room for the tab row beside the status and account controls: first the
   wordmark steps aside, then the tabs fold into the menu plaque. */
@media (max-width: 1340px) {
  .brand-name {
    display: none;
  }
}

@media (max-width: 1180px) {
  .site-nav {
    padding-bottom: 4px;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
  }

  .brand {
    margin-right: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 14px 0 0;
    padding: 6px 12px 10px;
    background: var(--slate-deep);
    border-bottom: 2px solid var(--slate-well);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid var(--divider);
    background: none;
  }

  .nav-links a:hover,
  .nav-links a.is-active {
    box-shadow: inset 2px 0 0 var(--gold);
    background: var(--slate-low);
  }
}

@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  /* Live rail leads on small screens: it is the freshest content. */
  .rail {
    order: -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

}

@media (max-width: 720px) {
  .you-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "character" "hunt" "goals" "away";
  }

  .rail {
    grid-template-columns: 1fr;
  }

  .you-teaser {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-name,
  .auth-welcome {
    display: none;
  }

  .hero {
    min-height: 0;
    padding-bottom: 60px;
  }

  .explore-grid {
    grid-template-columns: 1fr;
  }

  .tile {
    min-height: 230px;
  }

  .plate {
    display: block;
    min-width: 0;
  }

  .hunt-stat b {
    font-size: 1.1rem;
  }
}

@media (max-width: 420px) {
  .hunt-head {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .medallion--lg {
    width: 64px;
    height: 64px;
  }

  .icon-link {
    display: none;
  }
}

/* Honour reduced-motion: no drift, no marquee, no blink (leaf canvas: site.js). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    animation: none;
  }

  .ticker-viewport {
    overflow-x: auto;
  }
}
