/* petsimevent.fun - shared styles
   Look: Pet Simulator 99's own menus - white rounded panels with a thick navy outline and a
   chunky bottom edge, gradient title bars, outlined bubble text, green / blue / red buttons,
   all sitting on a bright sky. A night-sky dark theme sits at the end (html[data-theme=dark]). */

:root {
  /* colour */
  --sky-top: #7fd8ff;
  --sky-bottom: #3a8dff;
  --ink: #1b2440;            /* outlines */
  --heading: #1b2440;        /* headings and strong text */
  --text: #2b3553;           /* body text */
  --muted: #6b7697;
  --panel: #ffffff;
  --panel-soft: #f2f6ff;     /* rows, inputs */
  --line: #dbe4f7;
  --blue-1: #5fd4ff;  --blue-2: #1f86ff;
  --green-1: #8cff5c; --green-2: #22c21c;
  --red-1: #ff7a7a;   --red-2: #e3262b;
  --gold-1: #ffe066;  --gold-2: #ff9f1c;
  --purple-1: #d59bff; --purple-2: #8a3cff;
  --good: #1fa51a;
  --warn: #e08a00;
  --bad: #e3262b;

  /* rarity (the game's colours) */
  --r-basic: #9aa3b5; --r-rare: #3fb8ff; --r-epic: #b65cff; --r-legendary: #ff9f1c;
  --r-mythical: #ff3b6b; --r-huge: #ffcc00; --r-titanic: #20e3c2; --r-garg: #ff5ad1;

  /* type */
  --font-display: "Fredoka", "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;

  /* shape */
  --radius: 22px;
  --radius-sm: 14px;
  --stroke: 4px;
  --edge: 0 6px 0 var(--ink);           /* the chunky bottom edge under panels */
  --edge-sm: 0 4px 0 var(--ink);
  --wrap: 1140px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  font: 500 16px/1.55 var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse at 15% -10%, rgba(255, 255, 255, .55), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 255, 255, .35), transparent 40%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 70%) fixed;
  background-color: var(--sky-bottom);
}

/* soft cloud texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 2px, transparent 2.5px);
  background-size: 34px 34px;
}

img { max-width: 100%; }
a { color: var(--blue-2); }
:focus-visible { outline: 4px solid var(--gold-1); outline-offset: 3px; border-radius: 10px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- outlined bubble text (the game's titles) ---------- */
.bubble {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
  paint-order: stroke fill;
  -webkit-text-stroke: 6px var(--ink);
  text-shadow: 0 4px 0 var(--ink);
}

h1, h2, h3 { font-family: var(--font-display); color: var(--heading); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

/* ---------- header + tabs ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  padding-block: 12px;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(58, 141, 255, .92), rgba(58, 141, 255, .75));
  backdrop-filter: blur(8px);
  border-bottom: var(--stroke) solid var(--ink);
  z-index: -1;
}
.header-row { display: flex; align-items: center; gap: 18px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { width: 42px; height: 42px; }
.logo span { font-size: 1.6rem; }

.tabs {
  display: flex;
  gap: 10px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 4px 10px;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(180deg, #7cc6ff, #3c8fff);
  box-shadow: var(--edge-sm);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tab:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.tab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tab[aria-current="page"] { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }

/* ---------- panels ---------- */
main { padding-block: 26px 60px; display: grid; gap: 26px; }

.panel {
  background: var(--panel);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--edge);
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: var(--stroke) solid var(--ink);
  border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}
.panel-head h2, .panel-head h3 { color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.panel-head.gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.panel-head.green { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.panel-head.purple { background: linear-gradient(180deg, var(--purple-1), var(--purple-2)); }
.panel-head.red { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.panel-body { padding: 20px; display: grid; gap: 16px; }
.panel-note { font-size: .9rem; color: var(--muted); }

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 1rem var(--font-display);
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--green-1), var(--green-2));
  box-shadow: var(--edge-sm);
  cursor: pointer;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.blue { background: linear-gradient(180deg, var(--blue-1), var(--blue-2)); }
.btn.gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.btn.red { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.btn.small { padding: 6px 14px; font-size: .92rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 .82rem var(--font-display);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--heading);
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel-soft);
  white-space: nowrap;
  justify-self: start;
  width: max-content;
}
.chip.good { background: #d9ffcf; color: #136b10; }
.chip.bad { background: #ffd9d9; color: #9b1116; }
.chip.warn { background: #fff0c7; color: #8a5400; }
.chip.live::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(31, 165, 26, .25);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(31, 165, 26, 0); } }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font: 700 .82rem var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.input, .select {
  width: 100%;
  font: 600 1rem var(--font-body);
  color: var(--heading);
  padding: 11px 14px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  box-shadow: inset 0 3px 0 rgba(27, 36, 64, .08);
}
.input::placeholder { color: #98a2c0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.toolbar .field { flex: 1 1 200px; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented button {
  font: 700 .95rem var(--font-display);
  color: var(--heading);
  padding: 7px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--panel-soft);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}

/* ---------- grids ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.split { display: grid; gap: 26px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- stat tiles (stock) ---------- */
.stock-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  box-shadow: var(--edge-sm);
}
.stock-top { display: flex; align-items: center; gap: 12px; }
/* pet picture in a rounded square, like the game's own pet cards; the art is zoomed a touch so its
   own outline sits under the frame instead of showing as a second border */
.pet-icon {
  width: 64px; height: 64px;
  flex-shrink: 0;
  display: inline-grid; place-items: center;
  border-radius: 22%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #fff, #dfe8fb);
  border: 3px solid var(--ink);
}
.pet-icon img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.pet-icon.ring-titanic { box-shadow: 0 0 0 4px var(--r-titanic); }
.pet-icon.ring-garg { box-shadow: 0 0 0 4px var(--r-garg); }
.pet-icon.ring-huge { box-shadow: 0 0 0 4px var(--r-huge); }
.stock-name { font: 700 1.2rem var(--font-display); color: var(--heading); }
.stock-sub { font-size: .9rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.stat b { display: block; font: 700 clamp(.95rem, 1.6vw, 1.15rem) var(--font-display); white-space: nowrap; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.meter {
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, var(--green-1), var(--green-2));
  border-right: 3px solid var(--ink);
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}
.meter.gold > i { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.meter.red > i { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.meter-row { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 3px solid var(--ink); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; white-space: nowrap; }
th {
  font: 700 .8rem var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-soft);
  border-bottom: 3px solid var(--ink);
}
tbody tr:nth-child(even) td { background: #f8faff; }
tbody tr:hover td { background: #eaf3ff; }
td.num, th.num { text-align: right; }
td:first-child { white-space: normal; min-width: 190px; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell img { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; }
@media (max-width: 640px) {
  th, td { padding: 9px 10px; }
  td:first-child { min-width: 150px; }
}
tr.chase td { background: #fff7d6 !important; font-weight: 700; }
tr.chase.titanic td { background: #dcfff8 !important; }
tr.chase.garg td { background: #ffe3f6 !important; }

/* ---------- egg cards ---------- */
.egg-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px 14px;
  text-align: center;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, var(--panel-soft));
  box-shadow: var(--edge-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.egg-card:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink); }
.egg-card img { width: 86px; height: 86px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(27, 36, 64, .25)); }
.egg-card .egg-name { font: 700 1rem var(--font-display); color: var(--heading); line-height: 1.2; }
.egg-card .egg-best { font-size: .82rem; color: var(--muted); }
.egg-card .egg-best b { color: var(--heading); }

/* ---------- modal ---------- */
.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}
.modal::backdrop { background: rgba(14, 22, 48, .55); backdrop-filter: blur(3px); }
.modal .panel { max-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.modal .panel-body { overflow-y: auto; }
.modal-close { border: 3px solid var(--ink); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  padding: 26px;
}
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.hero p.lead { font-size: 1.08rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.countdown { display: flex; gap: 10px; flex-wrap: wrap; }
.countdown div {
  min-width: 74px;
  text-align: center;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, var(--panel-soft));
  box-shadow: var(--edge-sm);
}
.countdown b { display: block; font: 700 1.8rem var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.feature-card { display: grid; gap: 10px; padding: 18px; text-decoration: none; color: inherit; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); }
.feature-card { transition: transform .12s ease, box-shadow .12s ease; }
.feature-card .icon-bubble {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: var(--edge-sm);
}
.feature-card .icon-bubble svg { width: 28px; height: 28px; }

.pet-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pet-tile {
  display: grid; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center;
  border: 3px solid var(--ink); border-radius: var(--radius-sm); background: var(--panel-soft); box-shadow: var(--edge-sm);
}
.pet-tile img { width: 72px; height: 72px; object-fit: contain; }
.pet-tile b { font: 700 .9rem var(--font-display); color: var(--heading); line-height: 1.2; }
.pet-tile span { font-size: .78rem; color: var(--muted); }

/* ---------- lists ---------- */
.tips { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.tips li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft);
}
.tips li .dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1rem var(--font-display); color: #fff;
  border: 3px solid var(--ink);
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}
.tips li.no .dot { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.tips li.yes .dot { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.tips b { color: var(--heading); }

/* ---------- code ---------- */
.code {
  display: flex; align-items: stretch; gap: 0;
  border: 3px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--edge-sm);
}
.code code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  padding: 14px 16px; background: #141b33; color: #c9f3ff;
  font: 600 .92rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
}
.code button { border: none; border-left: 3px solid var(--ink); border-radius: 0; box-shadow: none; }
.code button:hover, .code button:active { transform: none; box-shadow: none; }

/* ---------- states ---------- */
.empty, .loading, .error {
  padding: 26px; text-align: center; color: var(--muted);
  border: 3px dashed var(--line); border-radius: var(--radius-sm);
}
.error { color: var(--bad); border-color: #ffc2c2; }
.loading::before {
  content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 10px;
  border: 5px solid var(--line); border-top-color: var(--blue-2); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; font-family: var(--font-display); color: var(--heading); }

/* ---------- footer ---------- */
.site-footer { padding-block: 26px 40px; color: #eaf4ff; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; gap: 8px; }
  .tabs { margin-left: 0; width: 100%; }
  .logo span { font-size: 1.35rem; }
  .panel-body { padding: 16px; }
  .hero { padding: 18px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .countdown div { min-width: 62px; }
}

/* ---------- links that look like text ---------- */
.row-link { color: var(--heading); font-weight: 800; text-decoration: none; }
.row-link:hover { color: var(--blue-2); text-decoration: underline; }
a.name-cell { color: inherit; text-decoration: none; font-weight: 700; }
a.name-cell:hover { color: var(--blue-2); }
.back-link { justify-self: start; color: #fff; font: 700 1rem var(--font-display); text-decoration: none; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.back-link:hover { text-decoration: underline; }
tr.current td { background: #e3f3ff !important; }

/* ---------- pet page ---------- */
.pet-hero {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 26px;
}
@media (max-width: 720px) { .pet-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }
.pet-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .chip-row, .variant-controls { justify-content: center; } }

.pet-art {
  position: relative;
  width: min(240px, 70vw);
  aspect-ratio: 1;
  max-width: 100%;
  display: grid;
  place-items: center;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fff 0, #e6eeff 60%, #c9d8fb 100%);
  box-shadow: var(--edge);
  overflow: hidden;
}
.pet-art img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(27, 36, 64, .25)); }
.pet-art.fill { border-radius: 22%; }
.pet-art.fill img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); filter: none; }
.pet-art.rainbow img { animation: rainbow 2.4s linear infinite; }
@keyframes rainbow { to { filter: hue-rotate(360deg) saturate(1.6) drop-shadow(0 6px 0 rgba(27, 36, 64, .25)); } from { filter: hue-rotate(0deg) saturate(1.6) drop-shadow(0 6px 0 rgba(27, 36, 64, .25)); } }
.pet-art.shiny::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 76% 22%, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 68% 74%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 30% 70%, #fff 0 2px, transparent 3px),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .65) 45%, transparent 60%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 250% 100%;
  animation: shine 2.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine { from { background-position: 0 0, 0 0, 0 0, 0 0, 120% 0; } to { background-position: 0 0, 0 0, 0 0, 0 0, -120% 0; } }

.variant-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font: 700 1rem var(--font-display); color: var(--heading); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 64px; height: 34px; padding: 3px;
  border: 3px solid var(--ink); border-radius: 999px;
  background: var(--panel-soft); box-shadow: 0 3px 0 var(--ink);
  transition: background .2s ease;
}
.switch-knob {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink);
  transition: transform .2s ease;
}
.switch input:checked + .switch-track { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(28px); }
.switch input:focus-visible + .switch-track { outline: 4px solid var(--gold-1); outline-offset: 3px; }

.stat-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.big-stat { display: grid; gap: 4px; padding: 14px 16px; align-content: start; }
.big-stat > span { font: 700 .78rem var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.big-stat b { font: 700 1.7rem var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.2; }
.big-stat b.good { color: var(--good); }
.big-stat b.bad { color: var(--bad); }
.big-stat small { font-size: .82rem; color: var(--muted); }
.demand-bars { display: flex; align-items: end; gap: 4px; height: 34px; padding-top: 4px; }
.demand-bars i {
  flex: 1; border: 2px solid var(--ink); border-radius: 5px; background: #fff;
  transition: background .3s ease;
}
.demand-bars i:nth-child(1) { height: 28%; } .demand-bars i:nth-child(2) { height: 36%; }
.demand-bars i:nth-child(3) { height: 44%; } .demand-bars i:nth-child(4) { height: 52%; }
.demand-bars i:nth-child(5) { height: 60%; } .demand-bars i:nth-child(6) { height: 68%; }
.demand-bars i:nth-child(7) { height: 76%; } .demand-bars i:nth-child(8) { height: 84%; }
.demand-bars i:nth-child(9) { height: 92%; } .demand-bars i:nth-child(10) { height: 100%; }
.demand-bars i.on { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }

.chart { display: grid; gap: 8px; min-height: 120px; }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-label { font: 700 13px var(--font-body); fill: var(--muted); }
.chart-readout { font: 700 1.1rem var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.chart-readout span { font: 600 .85rem var(--font-body); color: var(--muted); margin-left: 6px; }
a.pet-tile { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.pet-tile:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink); }
.stock-sub.row-link { font-weight: 600; color: var(--muted); }
.bars { display: grid; gap: 10px; }
.meter.blue > i { background: linear-gradient(180deg, var(--blue-1), var(--blue-2)); }

/* egg cards: long names and categories wrap instead of being cut off */
.egg-card { min-width: 0; align-content: start; }
.egg-card .egg-name { max-width: 100%; overflow-wrap: anywhere; }
.egg-card .egg-cat {
  max-width: 100%;
  width: auto;
  justify-self: center;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.egg-card .egg-best { max-width: 100%; overflow-wrap: anywhere; }
.switch-label { line-height: 1.3; }

[hidden] { display: none !important; }
a.egg-card { text-decoration: none; }
.egg-art { border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff 0, #fff6d8 60%, #ffe08a 100%); }
.item-card img { width: 72px; height: 72px; }
.item-detail { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: center; }
.item-detail img { width: 110px; height: 110px; object-fit: contain; border: 3px solid var(--ink); border-radius: var(--radius-sm); background: var(--panel-soft); }
@media (max-width: 480px) { .item-detail { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }
.modal .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- clan search ---------- */
#search-msg.loading, #search-msg.error { padding: 14px; border-radius: var(--radius-sm); border: 3px dashed var(--line); text-align: center; color: var(--muted); }
#search-msg.error { color: var(--bad); border-color: #ffc2c2; }
.clan-avatars { position: relative; width: min(220px, 60vw); justify-self: center; }
.avatar-big { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border: var(--stroke) solid var(--ink); border-radius: 28px; background: radial-gradient(circle at 50% 38%, #fff 0, #dfe8fb 100%); box-shadow: var(--edge); }
.clan-icon { position: absolute; right: -10px; bottom: -10px; width: 38%; height: auto; aspect-ratio: 1; object-fit: cover; border: var(--stroke) solid var(--ink); border-radius: 18px; background: #fff; box-shadow: var(--edge-sm); }
.mate { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mate img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; flex-shrink: 0; }
.tips li.yes .mate b { color: var(--good); }
.name-cell span { overflow-wrap: anywhere; }
td.rank-cell, th.rank-cell { min-width: 0; width: 3.5em; white-space: nowrap; }

/* warnings on pet pages */
.alerts { display: grid; gap: 12px; }
.alert {
  display: grid; gap: 4px;
  padding: 14px 18px;
  border: 3px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: var(--edge-sm);
  background: #fff7d6; color: var(--heading);
}
.alert b { font: 700 1.1rem var(--font-display); }
.alert.bad { background: #ffe1e1; }
.alert.bad b { color: var(--bad); }
.alert.warn b { color: var(--warn); }

/* ---------- Filters popout ---------- */
.filter-anchor { position: relative; align-self: end; }
.count-badge {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  font: 700 .8rem var(--font-display); color: var(--heading);
  -webkit-text-stroke: 0;
  background: var(--gold-1); border: 2px solid var(--ink); border-radius: 999px;
}
.filter-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 30;
  width: min(460px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  display: flex; flex-direction: column;
  box-shadow: var(--edge), 0 18px 40px rgba(14, 22, 48, .35);
}
.filter-pop .panel-head { padding: 10px 16px; }
.filter-pop .panel-body { overflow-y: auto; gap: 14px; padding: 16px; }
.pop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pop-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 4px; }
@media (max-width: 640px) {
  .filter-anchor { position: static; }
  .filter-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: max(16px, env(safe-area-inset-bottom, 0px)); width: auto; max-height: 80vh; }
}

/* decor list */
.decor-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-soft); }
.decor-tier { color: var(--muted); font-weight: 700; font-size: .8rem; margin-left: 4px; }

/* ---------- section menu (left side) ---------- */
section.panel[id] { scroll-margin-top: calc(var(--head-h, 90px) + 14px); }
.side-nav {
  position: fixed;
  z-index: 15;
  top: calc(var(--head-h, 90px) + 26px);
  left: max(16px, calc(50vw - var(--wrap) / 2 - 212px));
  width: 186px;
  max-height: calc(100vh - var(--head-h, 90px) - 52px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--panel);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--edge-sm);
}
.side-nav[hidden], .side-nav-toggle[hidden] { display: none; }
.side-nav-title {
  font: 700 .78rem var(--font-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 8px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  color: var(--heading);
  font: 600 .95rem var(--font-display);
  text-decoration: none;
  line-height: 1.2;
}
.side-nav a:hover { background: var(--panel-soft); }
.side-nav a.on { background: #fff3c4; border-color: var(--ink); }
.side-nav-toggle { display: none; }

/* room for the menu beside the page when the side gutter is too narrow for it */
@media (min-width: 1000px) and (max-width: 1599px) {
  body.has-side-nav main.wrap { margin-left: 218px; margin-right: auto; max-width: min(var(--wrap), calc(100vw - 218px)); }
  .side-nav { left: 16px; }
}
/* phones and tablets: a "Sections" button bottom-left opens the menu */
@media (max-width: 999px) {
  .side-nav { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 52px); left: 16px; width: min(260px, calc(100vw - 32px)); max-height: 60vh; display: none; }
  .side-nav.open { display: grid; }
  .side-nav-toggle { display: inline-flex; position: fixed; z-index: 16; left: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
}

/* ---------- event page tabs ---------- */
.page-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.page-tabs a {
  font: 700 1.05rem var(--font-display);
  color: var(--heading);
  text-decoration: none;
  padding: 9px 20px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--edge-sm);
  transition: transform .12s ease;
}
.page-tabs a:hover { transform: translateY(-2px); }
.page-tabs a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}
.tab-pane { display: grid; gap: 26px; }
.tab-pane[hidden] { display: none; }
@media (max-width: 560px) { .page-tabs a { padding: 7px 14px; font-size: .95rem; } }

/* (i) button that opens a panel's explanation */
.head-title { display: flex; align-items: center; gap: 10px; }
.info-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%;
  background: #fff; color: var(--heading);
  font: 700 .95rem/1 var(--font-display); font-style: italic;
  cursor: pointer; box-shadow: 0 2px 0 var(--ink);
}
.info-btn[aria-expanded="true"] { background: #fff3c4; }
.info-note { background: var(--panel-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.info-note .tips { margin-bottom: 10px; }
.tip-line { margin-top: 12px; font-weight: 700; color: var(--muted); }

.nowrap { white-space: nowrap; }

/* Squishy Gift tab */
.gift-top { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.gift-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: var(--radius-sm); background: var(--panel-soft); min-width: 0; }
.gift-card > img { width: 52px; height: 52px; flex-shrink: 0; object-fit: contain; }
.gift-card .gift-pet { width: 52px; height: 52px; }
.gift-card b { display: block; font: 700 1.25rem var(--font-display); color: var(--heading); line-height: 1.15; }
.gift-card small { color: var(--muted); font-weight: 700; }
a.gift-card { text-decoration: none; }
a.gift-card:hover { background: #fff3c4; }
tr.gift-huge td { background: #fff7d1; font-weight: 800; }
.cat-tag { color: var(--muted); font-weight: 700; font-size: .8rem; margin-left: 6px; }

/* icons beside names */
.pet-icon.sm { width: 38px; height: 38px; border-width: 2px; border-radius: 24%; }
.icon-slot { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--panel-soft); }
.rainbow-icon { filter: saturate(1.6) hue-rotate(25deg); }
.shiny-icon { filter: drop-shadow(0 0 4px #fff6a8) brightness(1.08); }
.rainbow-icon.shiny-icon { filter: saturate(1.6) hue-rotate(25deg) drop-shadow(0 0 4px #fff6a8); }

/* item page tier links (look like the segmented buttons) */
.segmented a.tier-link {
  font: 700 .95rem var(--font-display); color: var(--heading); text-decoration: none;
  padding: 7px 14px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--panel-soft); box-shadow: 0 3px 0 var(--ink);
}
.segmented a.tier-link[aria-current="page"] {
  color: #fff; background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
}

/* ---------- stats page ---------- */
.split.even { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.stats-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.stats-live { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.stats-live .muted { color: #fff; font-weight: 700; }
.big-stat small .good { color: var(--good); font-weight: 800; }
.big-stat small .bad { color: var(--bad); font-weight: 800; }
.online-tile b { color: var(--good); }
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(46, 204, 64, .6); animation: live-pulse 1.8s infinite; vertical-align: 1px; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(46, 204, 64, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 64, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.bar-list { display: grid; gap: 6px; }
.bar-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 6px 10px; border-radius: 10px; background: var(--panel-soft); overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(72, 160, 255, .28), rgba(72, 160, 255, .14)); border-radius: 10px; }
.bar-row.faint .bar-fill { background: rgba(107, 118, 151, .12); }
.bar-label, .bar-num { position: relative; min-width: 0; }
.bar-label { font-weight: 700; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label small { font-weight: 700; }
.bar-num { font-weight: 800; color: var(--heading); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-num small { color: var(--muted); font-weight: 700; margin-left: 4px; }
.mini-head { font-size: 1rem; margin-bottom: 8px; color: var(--muted); }

/* home: event at a glance */
.glance-pet { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.glance-pet .pet-icon { width: 28px; height: 28px; border-width: 2px; }
.glance-pet .pet-icon.ring-huge, .glance-pet .pet-icon.ring-titanic, .glance-pet .pet-icon.ring-garg { box-shadow: 0 0 0 2px var(--r-huge); }
.glance-pet .pet-icon.ring-titanic { box-shadow: 0 0 0 2px var(--r-titanic); }
.glance-pet .pet-icon.ring-garg { box-shadow: 0 0 0 2px var(--r-garg); }
.glance-table td b { font-family: var(--font-display); }
.glance-card { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; transition: transform .12s ease; }
.glance-icon { width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 22%; background: radial-gradient(circle at 50% 40%, #fff, #dfe8fb); }
.glance-icon img { width: 46px; height: 46px; object-fit: contain; }
.glance-text { display: grid; gap: 3px; min-width: 0; }
.glance-card:hover { transform: translateY(-2px); }
.glance-text > span { font: 700 .78rem var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.glance-card b { font: 700 1.6rem var(--font-display); color: var(--heading); }
.glance-card small { color: var(--muted); font-size: .88rem; line-height: 1.35; }

/* feedback button + form */
.feedback-btn {
  position: fixed; z-index: 17;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 6px;
}
.feedback-dialog { width: min(560px, calc(100vw - 32px)); }
.feedback-dialog textarea.input { resize: vertical; min-height: 110px; font: 600 1rem var(--font-body); }
.feedback-dialog .pop-actions { align-items: center; }
.fb-msg { font-weight: 800; color: var(--heading); }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media print { .feedback-btn { display: none; } }

/* stats: feedback list */
.fb-list { display: grid; gap: 12px; }
.fb-item { display: grid; gap: 8px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: var(--radius-sm); background: var(--panel); }
.fb-item.done { opacity: .6; background: var(--panel-soft); }
.fb-top, .fb-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fb-top { justify-content: flex-start; }
.fb-top .muted { margin-left: auto; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; color: var(--heading); }
.fb-actions span:last-child { display: inline-flex; gap: 8px; }

/* event page: stock across the top, then two columns (box odds + decor | gift + customers) */
.event-grid { display: grid; gap: 26px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.event-col { display: grid; gap: 26px; min-width: 0; }
@media (max-width: 980px) { .event-grid { grid-template-columns: minmax(0, 1fr); } }
.event-col .panel-head .segmented button { padding: 5px 11px; font-size: .85rem; }
.event-col .gift-top { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.event-col .gift-card { padding: 8px 12px; gap: 10px; }
.event-col .gift-card > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.event-col .gift-card b { display: inline; font-size: 1.1rem; }
.event-col .gift-card > img, .event-col .gift-card .gift-pet { width: 38px; height: 38px; }
.scroll-box { max-height: 340px; overflow-y: auto; }
.scroll-box thead th { position: sticky; top: 0; z-index: 1; }
.event-col th, .event-col td { padding: 8px 10px; }
.event-col td { font-size: .92rem; }
.event-col .name-cell { gap: 8px; }
.event-col .name-cell img, .event-col .icon-slot { width: 30px; height: 30px; }
.event-col .name-cell span { white-space: nowrap; }
.event-col .cat-tag { display: none; }

/* game changes: compact side box */
.changes-fresh { color: #fff; font-weight: 800; font-size: .85rem; opacity: .9; }
.change-list { display: grid; gap: 6px; }
.change-when { font: 700 .82rem var(--font-display); color: var(--muted); letter-spacing: .03em; margin: 2px 0 2px; }
.change-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--panel-soft); border-left: 5px solid var(--muted); }
.change-row.nerf { border-left-color: var(--bad); }
.change-row.buff { border-left-color: var(--good); }
.change-text { display: grid; min-width: 0; }
.change-text b { font-size: .95rem; color: var(--heading); }
.change-text small { color: var(--muted); font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.change-pct { font: 700 .95rem var(--font-display); white-space: nowrap; color: var(--heading); }
.change-row.nerf .change-pct { color: var(--bad); }
.change-row.buff .change-pct { color: var(--good); }
.link-btn { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--blue-2); font: 700 .88rem var(--font-body); cursor: pointer; text-decoration: underline; }
td.good { color: var(--good); font-weight: 800; }
td.bad { color: var(--bad); font-weight: 800; }

/* wide screens: Game changes floats in the empty space right of the page and stays put while scrolling
   (narrower screens keep it at the top of the right column) */
@media (min-width: 1860px) {
  .changes-box {
    position: fixed;
    z-index: 15;
    top: calc(var(--head-h, 90px) + 26px);
    right: calc((100vw - var(--wrap)) / 2 - 356px);
    width: 330px;
    max-height: calc(100vh - var(--head-h, 90px) - 110px);
    display: flex;
    flex-direction: column;
  }
  .changes-box .panel-body { overflow-y: auto; }
  .changes-box .panel-head h2 { font-size: 1.5rem; }
}
.scroll-box.tall { max-height: 720px; }
.expand-btn { justify-self: center; margin-top: 10px; }
#found-panel .panel-body { display: grid; }
.found-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.select.small { width: auto; padding: 6px 34px 6px 12px; font-size: .9rem; border-width: 3px; }
.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; }

/* ---------- stats page: compact dashboard ---------- */
body[data-page="stats"] main { gap: 16px; padding-top: 18px; }
.stats-title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.stats-compact { display: grid; gap: 16px; }
.stats-compact .panel-head { padding: 8px 14px; gap: 8px; }
.stats-compact .panel-head h2 { font-size: 1.2rem; -webkit-text-stroke-width: 4px; }
.stats-compact .panel-body { padding: 12px 14px; }
.stats-compact .segmented button { padding: 4px 10px; font-size: .82rem; }
.stats-compact .chip { font-size: .72rem; }
.stat-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-row .big-stat { padding: 10px 12px; gap: 2px; }
.stat-row .big-stat b { font-size: 1.35rem; }
.stat-row .big-stat small { font-size: .74rem; line-height: 1.3; }
.stats-grid { display: grid; gap: 16px; align-items: start; }
.stats-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.stats-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.stats-compact .bar-list { gap: 4px; }
.stats-compact .bar-row { min-height: 28px; padding: 4px 8px; font-size: .88rem; }
.stats-compact .chart { min-height: 0; }
.stats-compact .fb-list { max-height: 330px; overflow-y: auto; gap: 8px; }
.stats-compact .fb-item { padding: 8px 10px; border-width: 2px; }
.compact-table { max-height: 260px; overflow-y: auto; }
.compact-table th, .compact-table td { padding: 6px 10px; font-size: .88rem; }
.compact-table thead th { position: sticky; top: 0; }
.stats-compact .stats-live .muted { font-size: .85rem; }
#forget { justify-self: start; color: #fff; }

/* stats: one calm header colour, wide chart, Feedback takes two thirds of the last row */
.stats-compact .panel-head,
.stats-compact .panel-head.gold, .stats-compact .panel-head.green, .stats-compact .panel-head.purple, .stats-compact .panel-head.red {
  background: linear-gradient(180deg, #5aa9ff, #3c8fff);
}
.stats-compact .panel { box-shadow: 0 4px 0 var(--ink); }
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stats-grid.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 900px) { .stats-grid.wide-right { grid-template-columns: minmax(0, 1fr); } }
.stats-compact #feedback-panel .fb-list { max-height: 300px; }
.stats-compact .bar-fill { background: linear-gradient(90deg, rgba(72, 160, 255, .22), rgba(72, 160, 255, .08)); }
.stats-compact .bar-row { background: #f6f9ff; }
.compact-table th, .compact-table td { padding: 6px 8px; }
.compact-table th { font-size: .7rem; }
.compact-table td:first-child { min-width: 0; }
/* stats: boxes in the same row stretch to the same height, so there are no gaps under short ones */
.stats-compact .stats-grid { align-items: stretch; }
.stats-compact .stats-grid > .panel { display: flex; flex-direction: column; }
.stats-compact .stats-grid > .panel > .panel-body { flex: 1; }
/* stats: the box grows, but the lists inside keep their normal row height */
.stats-compact .stats-grid > .panel > .panel-body { display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; }
.stats-compact .bar-list { align-content: start; flex: 0 0 auto; }
.stats-compact .bar-row { flex: 0 0 auto; }
/* stats: "Show N more" at the bottom of a box, and full site names in Came from */
.more-btn {
  margin-top: auto; align-self: stretch; padding: 6px 10px; border: 2px dashed var(--line); border-radius: 10px;
  background: none; color: var(--blue-2); font: 700 .85rem var(--font-body); cursor: pointer;
}
.more-btn:hover { background: var(--panel-soft); border-style: solid; }
#referrers .bar-label { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
#referrers .bar-row { align-items: flex-start; }
/* stats: device groups with their systems indented under them */
.dev-group { display: grid; gap: 3px; }
.dev-group + .dev-group { margin-top: 8px; }
.bar-row.sub { margin-left: 18px; min-height: 24px; padding: 2px 8px; font-size: .82rem; background: transparent; }
.bar-row.sub .bar-fill { background: rgba(72, 160, 255, .12); }
.bar-row.sub .bar-label { font-weight: 600; color: var(--muted); }
#systems:empty { display: none; }
.meter.purple > i { background: linear-gradient(180deg, var(--purple-1), var(--purple-2)); }
.avg-row { color: var(--heading); font-weight: 700; }
.avg-row b { font-family: var(--font-display); }
.avg-row small { color: var(--muted); font-weight: 700; }

/* ---------- account menu (right end of the nav bar) ---------- */
.account-slot { position: relative; flex-shrink: 0; min-width: 40px; padding-bottom: 6px; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 1rem var(--font-display); color: #fff; text-decoration: none; white-space: nowrap;
  padding: 5px 12px 5px 6px; border: 3px solid var(--ink); border-radius: 999px;
  background: linear-gradient(180deg, #7cc6ff, #3c8fff); box-shadow: var(--edge-sm); cursor: pointer;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
}
.acct-btn.signin { padding: 8px 18px; background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.acct-btn:hover { transform: translateY(-1px); }
.acct-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; object-fit: cover; flex-shrink: 0; }
.acct-initial { display: inline-grid; place-items: center; font: 700 1rem var(--font-display); color: var(--heading); -webkit-text-stroke: 0; background: #fff3c4; }
.acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 240px;
  display: grid; padding: 8px; gap: 2px; border-radius: var(--radius-sm);
}
.acct-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; margin-bottom: 4px; border-bottom: 2px solid var(--line); }
.acct-head .acct-avatar { width: 40px; height: 40px; }
.acct-head b { display: block; font: 700 1.05rem var(--font-display); color: var(--heading); }
.acct-head small { color: var(--muted); font-weight: 700; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 10px; background: none;
  font: 700 .95rem var(--font-body); color: var(--heading); text-decoration: none; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--panel-soft); }
.acct-menu .danger { color: var(--bad); }
@media (max-width: 720px) { .acct-name { display: none; } .acct-btn { padding: 4px; } .acct-btn svg { display: none; } .acct-btn.signin { padding: 7px 14px; } }
@media (max-width: 640px) {
  .account-slot { order: 2; margin-left: auto; padding-bottom: 0; }
  .tabs { order: 3; }
}

/* ---------- sign-in and account pages ---------- */
.auth-wrap { max-width: 900px; }
.auth-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); align-items: stretch; }
.auth-card { display: flex; flex-direction: column; }
.auth-card .panel-body { flex: 1; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; text-decoration: none; }
.auth-btn.discord { background: linear-gradient(180deg, #7983f5, #5865f2); }
.auth-btn.roblox { background: linear-gradient(180deg, #4b5563, #1f2937); }
.auth-btn.off { opacity: .55; cursor: not-allowed; }
.auth-btn .soon { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--heading); -webkit-text-stroke: 0; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.auth-msg { padding: 12px 16px; border: 3px solid var(--ink); border-radius: var(--radius-sm); font-weight: 800; background: #fff; }
.auth-msg.bad { background: #ffd9d9; color: #9b1116; }
.auth-msg.warn { background: #fff0c7; color: #8a5400; }
.auth-msg.good { background: #d9ffcf; color: #136b10; }
.auth-fine { color: #fff; font-weight: 700; font-size: .9rem; text-align: center; }
.account-id { display: flex; align-items: center; gap: 16px; }
.account-id .acct-avatar { width: 72px; height: 72px; border-width: 3px; font-size: 2rem; }
.account-id h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.method-list { display: grid; gap: 8px; }
.method-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft); }
.method-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--ink); font: 700 1rem var(--font-display); color: var(--heading); overflow: hidden; }
.method-icon img { width: 100%; height: 100%; object-fit: cover; }
.method-text { flex: 1; min-width: 0; display: grid; }
.method-text b { color: var(--heading); }
.method-text small { color: var(--muted); font-weight: 700; }
.auth-grid.single { grid-template-columns: minmax(0, 480px); justify-content: center; }

/* "@" in front of username boxes */
.at-input { position: relative; display: flex; align-items: center; }
.at-input > span { position: absolute; left: 14px; font: 800 1rem var(--font-body); color: var(--muted); pointer-events: none; }
.at-input .input { padding-left: 30px; }

/* privacy policy and terms */
.legal { max-width: 860px; }
.legal-body { display: grid; gap: 10px; line-height: 1.6; }
.legal-body h2 { font-size: 1.25rem; margin-top: 10px; }
.legal-body ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-body code { background: var(--panel-soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* account page: profile picture */
.pfp-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pfp-preview .acct-avatar { width: 88px; height: 88px; border-width: 3px; font-size: 2.2rem; }
.pfp-title { font: 700 1.05rem var(--font-display); color: var(--heading); }
.pfp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pfp-actions label.btn { cursor: pointer; }

/* ---------- dark mode: a night sky, same chunky look ---------- */
:root[data-theme="dark"] {
  --sky-top: #1a2a5c;
  --sky-bottom: #0a1130;
  --ink: #03061a;
  --heading: #f1f5ff;
  --text: #d3dbf3;
  --muted: #97a3c6;
  --panel: #18213f;
  --panel-soft: #222c54;
  --line: #33406c;
  --good: #63e35d;
  --warn: #ffb547;
  --bad: #ff6b70;
  color-scheme: dark;
}
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 15% -10%, rgba(120, 150, 255, .22), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(180, 120, 255, .14), transparent 40%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 70%) fixed;
  background-color: var(--sky-bottom);
}
[data-theme="dark"] body::after { background-image: radial-gradient(rgba(255, 255, 255, .10) 1.5px, transparent 2px); }
:where([data-theme="dark"]) a { color: #7cc0ff; }
[data-theme="dark"] .site-header::before { background: linear-gradient(180deg, rgba(14, 22, 56, .94), rgba(14, 22, 56, .8)); }
[data-theme="dark"] .input::placeholder { color: #6f7ba3; }

/* white boxes become panel colours */
[data-theme="dark"] :is(.stat, .meter, .switch-knob, .demand-bars i, .clan-icon, .mate img, .info-btn,
  .acct-avatar, .auth-btn .soon, .auth-msg, .method-icon) { background: var(--panel-soft); }
[data-theme="dark"] :is(.egg-card, .countdown div) { background: linear-gradient(180deg, #26315e, var(--panel-soft)); }
[data-theme="dark"] :is(.pet-icon, .glance-icon) { background: radial-gradient(circle at 50% 40%, #3a4785, #1f2950); }
[data-theme="dark"] :is(.pet-art, .avatar-big) { background: radial-gradient(circle at 50% 38%, #3d4b8c 0, #26315f 60%, #1a2245 100%); }
[data-theme="dark"] .egg-art { background: radial-gradient(circle at 50% 38%, #5a5130 0, #3d3520 60%, #2a2416 100%); }

/* tables */
[data-theme="dark"] tbody tr:nth-child(even) td { background: #1d2749; }
[data-theme="dark"] tbody tr:hover td { background: #29366a; }
[data-theme="dark"] tr.chase td, [data-theme="dark"] tr.gift-huge td { background: #3b3218 !important; }
[data-theme="dark"] tr.chase.titanic td { background: #133b39 !important; }
[data-theme="dark"] tr.chase.garg td { background: #3d1838 !important; }
[data-theme="dark"] tr.current td { background: #1d3560 !important; }
[data-theme="dark"] .stats-compact .bar-row { background: var(--panel-soft); }

/* highlights and notes */
[data-theme="dark"] :is(.side-nav a.on, .info-btn[aria-expanded="true"], a.gift-card:hover, .acct-initial) { background: #4a3c12; }
[data-theme="dark"] .alert { background: #3b3218; }
[data-theme="dark"] .alert.bad { background: #4a1a24; }
[data-theme="dark"] :is(.chip.good, .auth-msg.good) { background: #173d1d; color: #8ff08a; }
[data-theme="dark"] :is(.chip.bad, .auth-msg.bad) { background: #4a1a24; color: #ffb3b6; }
[data-theme="dark"] :is(.chip.warn, .auth-msg.warn) { background: #45341a; color: #ffd27a; }

/* charts */
[data-theme="dark"] .chart-dot { fill: var(--heading); }
[data-theme="dark"] .chart-cursor { stroke: var(--muted); }

/* fade between light and dark when the theme button is pressed */
.theme-xfade::view-transition-old(root), .theme-xfade::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

/* ---------- theme switch (nav bar): a day sky with a sun, a night sky with a moon ---------- */
.theme-btn {
  position: relative; flex-shrink: 0; width: 76px; height: 40px; padding: 0; margin-bottom: 6px;
  border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; cursor: pointer;
  background: #2f86d6; box-shadow: var(--edge-sm), inset 0 3px 6px rgba(0, 0, 0, .28);
  transition: background-color .55s ease, transform .12s ease;
  view-transition-name: theme-btn;
}
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn:active { transform: scale(.94); }
.theme-btn > span { position: absolute; pointer-events: none; }
.ts-rings {
  left: -53px; top: 50%; width: 140px; height: 140px; transform: translate(0, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, .2) 0 21px, rgba(255, 255, 255, .13) 21px 31px, rgba(255, 255, 255, .07) 31px 42px, transparent 42px);
  transition: transform .6s cubic-bezier(.45, 1.35, .55, 1);
}
.ts-clouds { right: -4px; bottom: -6px; width: 56px; height: 30px; transition: transform .55s ease; }
.ts-clouds svg, .ts-stars svg { display: block; width: 100%; height: 100%; }
.ts-stars { left: 6px; top: 3px; width: 40px; height: 28px; opacity: 0; transform: translateY(-14px); transition: opacity .5s ease, transform .55s ease; }
.ts-knob {
  left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff27a, #ffd21f 55%, #f2b400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35), inset -2px -3px 3px rgba(190, 120, 0, .35);
  transition: transform .6s cubic-bezier(.45, 1.35, .55, 1);
}
.ts-moon {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0; transform: rotate(-90deg);
  background:
    radial-gradient(circle at 63% 26%, #9da3b1 0 2.6px, transparent 3.1px),
    radial-gradient(circle at 36% 58%, #9da3b1 0 4.6px, transparent 5.1px),
    radial-gradient(circle at 73% 66%, #9da3b1 0 3.2px, transparent 3.7px),
    radial-gradient(circle at 35% 30%, #f1f3f7, #c3c7d1 60%, #a7acb9);
  box-shadow: inset -2px -3px 3px rgba(60, 66, 84, .35);
  transition: opacity .45s ease, transform .6s ease;
}
[data-theme="dark"] .theme-btn { background-color: #1c1f2e; }
[data-theme="dark"] .ts-rings { transform: translate(36px, -50%); background: radial-gradient(circle, rgba(255, 255, 255, .13) 0 21px, rgba(255, 255, 255, .08) 21px 31px, rgba(255, 255, 255, .04) 31px 42px, transparent 42px); }
[data-theme="dark"] .ts-knob { transform: translateX(36px); }
[data-theme="dark"] .ts-moon { opacity: 1; transform: none; }
[data-theme="dark"] .ts-clouds { transform: translateY(110%); }
[data-theme="dark"] .ts-stars { opacity: 1; transform: none; }
::view-transition-old(theme-btn) { display: none; }
::view-transition-new(theme-btn) { animation: none; }
@media (max-width: 640px) {
  .theme-btn { order: 2; margin: 0 0 0 auto; }
  .theme-btn + .account-slot { margin-left: 0; }
}

/* ---------- owner user pages (/u/ and /u/@name) ---------- */
.user-table td:first-child { min-width: 220px; }
.user-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.user-cell span { display: grid; line-height: 1.25; }
.user-cell b { color: var(--heading); font-family: var(--font-display); }
.user-cell small { color: var(--muted); font-weight: 700; }
.user-cell:hover b { text-decoration: underline; }
.user-table .chip-row { gap: 4px; flex-wrap: nowrap; }
.discord-chip { background: #5865f2; color: #fff; }
.roblox-chip { background: #2b313b; color: #fff; }
.user-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.user-pic .acct-avatar { width: 96px; height: 96px; border-width: 4px; font-size: 2.4rem; }
.user-id { display: grid; gap: 6px; min-width: 0; }
.user-id h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); overflow-wrap: anywhere; }
.user-handle { color: var(--muted); font-weight: 800; font-size: 1.05rem; }
.user-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); align-items: start; }
.method-icon img { width: 100%; height: 100%; object-fit: cover; }

.acct-menu-label { margin: 6px 8px 2px; padding-top: 8px; border-top: 2px solid var(--line); font: 700 .72rem var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acct-menu #acct-logout { margin-top: 4px; border-top: 2px solid var(--line); border-radius: 0 0 8px 8px; }
.dev-chip { background: linear-gradient(180deg, var(--purple-1), var(--purple-2)); color: #fff; font-size: .68rem; vertical-align: middle; }
.user-dev { display: grid; gap: 6px; justify-items: start; margin-left: auto; max-width: 260px; }

/* ---------- nav bar, cleaned up: logo · tabs · [search · theme · account] ---------- */
.site-header { padding-block: 10px 8px; }
.header-row { position: relative; gap: 14px; }
.logo img { width: 40px; height: 40px; }
.logo span { font-size: 1.5rem; }
.tabs { margin-left: 6px; gap: 8px; padding: 4px 4px 9px; }
.tab { padding: 6px 15px; font-size: .98rem; }
.nav-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-bottom: 5px; flex-shrink: 0; }
.nav-tools > * { order: 0; margin: 0; }
.nav-tools .theme-btn { margin: 0; }
.nav-tools .account-slot { padding-bottom: 0; min-width: 0; }
.acct-btn { height: 40px; }

/* search field: rounded, outlined, glows gold while typing */
:root { --search-bg: #ffffff; }
:root[data-theme="dark"] { --search-bg: #0f152d; }
.nav-search { position: relative; }
.search-field {
  display: flex; align-items: center; gap: 8px; width: 270px; height: 40px; padding: 0 8px 0 12px;
  border: 3px solid var(--ink); border-radius: 14px; background: var(--search-bg); box-shadow: var(--edge-sm);
  transition: box-shadow .2s ease, width .25s ease;
}
.search-field .search-icon { flex-shrink: 0; color: var(--muted); transition: color .2s ease; }
.search-field:focus-within { width: 320px; box-shadow: 0 0 0 3px var(--gold-1), 0 0 14px 2px rgba(255, 184, 28, .55), var(--edge-sm); }
.search-field:focus-within .search-icon { color: var(--gold-2); }
.search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0;
  font: 700 .98rem var(--font-body); color: var(--heading);
}
.search-field input::placeholder { color: var(--muted); font-weight: 600; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-key {
  flex-shrink: 0; font: 800 .75rem var(--font-body); color: var(--muted); padding: 1px 7px;
  border: 2px solid var(--line); border-radius: 7px; line-height: 1.3;
}
.search-field:focus-within .search-key { display: none; }

/* the round magnifier button used when there isn't room for the field */
.search-toggle {
  display: none; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--search-bg); color: var(--heading);
  box-shadow: var(--edge-sm); transition: transform .12s ease, box-shadow .2s ease;
}
.search-toggle:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px var(--gold-1), var(--edge-sm); }

/* results */
.search-results {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 45; width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border-radius: var(--radius-sm); display: grid; gap: 6px;
}
.sr-group { display: grid; gap: 2px; }
.sr-group + .sr-group { border-top: 2px solid var(--line); padding-top: 6px; }
.sr-title { font: 700 .72rem var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 2px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: inherit; }
.sr-item:hover, .sr-item.active { background: var(--panel-soft); }
.sr-item.active { box-shadow: inset 0 0 0 2px var(--gold-2); }
.sr-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 22%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #fff, #dfe8fb); }
[data-theme="dark"] .sr-icon { background: radial-gradient(circle at 50% 40%, #3a4785, #1f2950); }
.sr-icon img { width: 100%; height: 100%; object-fit: contain; }
.sr-icon .acct-avatar { width: 100%; height: 100%; border: 0; border-radius: 0; }
.sr-text { display: grid; min-width: 0; line-height: 1.25; }
.sr-text b { font-family: var(--font-display); color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-text b mark { background: none; color: var(--gold-2); }
.sr-text small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.sr-empty { padding: 10px; color: var(--muted); font-weight: 700; }
.sr-empty.small { padding: 2px 10px 6px; font-size: .8rem; }

/* not enough room: the field becomes the round button and opens across the bar */
@media (max-width: 1180px) {
  .search-toggle { display: grid; }
  .search-field { display: none; }
  .nav-search { position: static; }
  .nav-search.open .search-field, .nav-search.open .search-field:focus-within {
    display: flex; position: absolute; z-index: 46; top: 0; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: auto;
  }
  .search-results { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: auto; top: 54px; }
  .search-key { display: none; }
}
@media (max-width: 900px) { .logo span { display: none; } }
@media (max-width: 640px) {
  .logo span { display: inline; font-size: 1.3rem; }
  .nav-tools { order: 2; margin-left: auto; gap: 8px; padding-bottom: 0; }
  .nav-tools .theme-btn { width: 64px; height: 36px; }
  .nav-tools .theme-btn .ts-knob { width: 24px; height: 24px; }
  [data-theme="dark"] .nav-tools .theme-btn .ts-knob { transform: translateX(28px); }
  [data-theme="dark"] .nav-tools .theme-btn .ts-rings { transform: translate(28px, -50%); }
  .search-toggle { width: 36px; height: 36px; }
  .acct-btn { height: 36px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
}
@media (max-width: 400px) { .logo span { display: none; } }

/* tabs that don't fit fade out at the edge instead of being cut off */
.tabs { flex: 0 1 auto; min-width: 0; --fade-l: 0px; --fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); }
.tabs.fade-r { --fade-r: 36px; }
.tabs.fade-l { --fade-l: 36px; }

/* ---------- public profiles (/u/@name) ---------- */
.profile-wrap { max-width: 960px; }
.profile-card { overflow: hidden; }
.profile-banner { height: 150px; border-bottom: var(--stroke) solid var(--ink); position: relative; }
.profile-banner::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 2px, transparent 2.5px); background-size: 22px 22px; }
.banner-sky { background: linear-gradient(135deg, #7fd8ff, #3a8dff); }
.banner-gold { background: linear-gradient(135deg, #ffe066, #ff9f1c); }
.banner-green { background: linear-gradient(135deg, #8cff5c, #1fa51a); }
.banner-purple { background: linear-gradient(135deg, #d59bff, #6f2bd9); }
.banner-red { background: linear-gradient(135deg, #ff8a7a, #d81f2b); }
.banner-pink { background: linear-gradient(135deg, #ffb3e6, #ff4fae); }
.banner-teal { background: linear-gradient(135deg, #7ff5e0, #0fa595); }
.banner-night { background: linear-gradient(135deg, #3b3f8f, #0d1030); }
.profile-main { padding: 0 24px 22px; }
.profile-main > .loading { padding-top: 20px; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -64px; position: relative; z-index: 1; }
.profile-pic .acct-avatar { width: 128px; height: 128px; border-width: 5px; font-size: 3.2rem; box-shadow: var(--edge); background-color: var(--panel); }
.profile-actions { padding-bottom: 6px; display: flex; gap: 8px; }
.profile-info { display: grid; gap: 8px; margin-top: 12px; }
.profile-name { font-size: clamp(1.7rem, 4.5vw, 2.4rem); overflow-wrap: anywhere; }
.profile-handle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-weight: 800; font-size: 1.05rem; }
.badge { font: 700 .72rem var(--font-display); letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); color: #fff; -webkit-text-stroke: 0; }
.badge-dev { background: linear-gradient(180deg, var(--purple-1), var(--purple-2)); }
.badge-early { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--ink); }
.profile-bio { white-space: pre-line; font-size: 1.05rem; color: var(--text); max-width: 60ch; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.profile-meta-item, .profile-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); text-decoration: none; }
.profile-link { padding: 4px 12px 4px 8px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel-soft); color: var(--heading); }
a.profile-link:hover { border-color: var(--ink); }
.profile-link.discord svg { color: #5865f2; }
.profile-link small { color: var(--muted); font-weight: 700; }
.profile-missing { padding: 24px 0 6px; display: grid; gap: 6px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; cursor: pointer; border: 3px solid var(--ink); border-radius: 50%; background: var(--panel); color: var(--heading); box-shadow: var(--edge-sm); }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn.small { width: 30px; height: 30px; border-width: 2px; box-shadow: none; font-weight: 800; }
.icon-btn:disabled { opacity: .35; cursor: default; transform: none; }
.profile-menu-wrap { position: relative; }
.profile-menu { width: 230px; }
.profile-menu button { text-align: left; }
.locked-box { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 10px; color: var(--muted); }
.locked-box b { font: 700 1.2rem var(--font-display); color: var(--heading); }
.showcase-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.showcase-card { display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; text-align: center; text-decoration: none; border: 3px solid var(--ink); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, var(--panel-soft)); box-shadow: var(--edge-sm); transition: transform .12s ease; }
[data-theme="dark"] .showcase-card { background: linear-gradient(180deg, #26315e, var(--panel-soft)); }
.showcase-card:hover { transform: translateY(-3px); }
.showcase-art { width: 84px; height: 84px; display: grid; place-items: center; }
.showcase-art img { width: 100%; height: 100%; object-fit: contain; }
.showcase-card b { font: 700 .95rem var(--font-display); color: var(--heading); line-height: 1.2; }
.showcase-card small { font-weight: 800; color: var(--muted); }
.report-dialog { width: min(480px, calc(100vw - 32px)); padding: 20px; color: var(--text); }
.report-dialog::backdrop { background: rgba(5, 8, 25, .55); }
@media (max-width: 640px) {
  .profile-banner { height: 110px; }
  .profile-main { padding: 0 16px 18px; }
  .profile-top { margin-top: -52px; }
  .profile-pic .acct-avatar { width: 100px; height: 100px; font-size: 2.6rem; }
}

/* ---------- My account: profile editing and privacy ---------- */
.field-label { font: 700 .82rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#bio { resize: vertical; min-height: 76px; font: 600 1rem var(--font-body); max-width: 560px; }
.banner-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.banner-swatch { width: 54px; height: 34px; border-radius: 10px; border: 3px solid var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); padding: 0; }
.banner-swatch[aria-checked="true"] { outline: 3px solid var(--gold-1); outline-offset: 2px; }
.showcase-edit { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.showcase-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft); }
.showcase-chip img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.showcase-chip > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.showcase-chip b { font: 700 .92rem var(--font-display); color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input.mini { padding: 2px 6px; font-size: .8rem; height: auto; border-width: 2px; }
.showcase-add { position: relative; max-width: 420px; }
.showcase-results { left: 0; right: auto; width: 100%; top: calc(100% + 6px); }
.showcase-results .sr-item { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; }
.showcase-results .sr-item:hover { background: var(--panel-soft); }
.privacy-list { display: grid; gap: 12px; }
.privacy-list .switch-label small { font-family: var(--font-body); font-weight: 700; }
.switch input:disabled + .switch-track { opacity: .45; }
.account-id { position: relative; }
.view-profile { position: absolute; right: 0; top: 0; }
@media (max-width: 640px) { .view-profile { position: static; order: 3; } }

/* ---------- following ---------- */
.profile-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.profile-stats button { background: none; border: 0; padding: 2px 0; cursor: pointer; font: 700 1rem var(--font-body); color: var(--muted); }
.profile-stats button b { font: 700 1.1rem var(--font-display); color: var(--heading); }
.profile-stats button:not(:disabled):hover { color: var(--heading); text-decoration: underline; }
.profile-stats button:disabled { cursor: default; }
.follows-you { font-size: .72rem; background: var(--panel-soft); color: var(--muted); }
.follow-btn { min-width: 112px; }
.follow-btn.following .off { display: none; }
.follow-btn.following:hover { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.follow-btn.following:hover .on { display: none; }
.follow-btn.following:hover .off { display: inline; }
.follow-btn.requested { background: linear-gradient(180deg, #c8d0e4, #97a3c0); }
.gold-btn { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.profile-tabs-head { padding-block: 8px; }
.profile-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-tabs button {
  font: 700 1.05rem var(--font-display); color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  background: rgba(255, 255, 255, .18); border: 3px solid transparent; border-radius: 999px; padding: 4px 16px; cursor: pointer;
}
.profile-tabs button[aria-selected="true"] { background: rgba(27, 36, 64, .28); border-color: var(--ink); }
.profile-tabs button:hover { background: rgba(27, 36, 64, .18); }
.people-list { display: grid; gap: 8px; }
.person-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft); }
.person-row .user-cell .acct-avatar { width: 44px; height: 44px; }
.person-row .badge { font-size: .62rem; padding: 1px 7px; vertical-align: middle; }
.more-btn { justify-self: center; }
.req-actions { display: flex; gap: 6px; flex-shrink: 0; }
#request-list .user-cell { flex: 1; min-width: 0; }

/* ---------- notifications ---------- */
.bell-slot { position: relative; }
.bell-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--search-bg); color: var(--heading); box-shadow: var(--edge-sm);
  transition: transform .12s ease;
}
.bell-btn:hover { transform: translateY(-2px) rotate(-8deg); }
.bell-count {
  position: absolute; top: -7px; right: -9px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font: 800 .72rem var(--font-body); color: #fff;
  background: linear-gradient(180deg, var(--red-1), var(--red-2)); border: 2px solid var(--ink);
}
.bell-menu { width: min(380px, calc(100vw - 24px)); padding: 6px; gap: 0; right: -60px; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 8px; border-bottom: 2px solid var(--line); }
.bell-head b { font: 700 1.05rem var(--font-display); color: var(--heading); }
.bell-settings { font-weight: 800; font-size: .85rem; }
.bell-list { max-height: min(60vh, 460px); overflow-y: auto; display: grid; gap: 2px; padding: 4px 0; }
.bell-all { display: block; text-align: center; padding: 8px; font-weight: 800; border-top: 2px solid var(--line); text-decoration: none; }
.bell-empty { padding: 18px 12px; color: var(--muted); font-weight: 700; text-align: center; }
.note { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; position: relative; }
.note.unread { background: var(--panel-soft); }
.note.unread::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 60%; transform: translateY(-50%); border-radius: 4px; background: var(--blue-2); }
.note-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.note-link:hover .note-text { color: var(--heading); }
.note-pic { flex-shrink: 0; }
.note-pic .acct-avatar { width: 40px; height: 40px; }
.note-sym { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--c1), var(--c2)); color: #fff; font: 700 1.1rem var(--font-display); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.note-text { display: grid; gap: 1px; line-height: 1.3; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.note-text b { color: var(--heading); }
.note-text small { color: var(--muted); font-weight: 800; font-size: .75rem; }
.note-actions { display: flex; gap: 4px; flex-shrink: 0; }
.note-actions .btn { padding: 5px 10px; font-size: .82rem; }
.note-done { font-weight: 800; font-size: .82rem; color: var(--muted); flex-shrink: 0; }
.notes-wrap { max-width: 760px; }
.note-list { display: grid; gap: 4px; }
.note-list .note { padding: 10px 12px; }
@media (max-width: 640px) {
  .bell-btn { width: 36px; height: 36px; }
  .bell-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

/* ---------- profile look: patterns, banner picture, accent, frames, status, clan ---------- */
.profile-banner.pattern-none::after { background-image: none; }
.profile-banner.pattern-stripes::after { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0 14px, transparent 14px 28px); background-size: auto; }
.profile-banner.pattern-stars::after { background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1.5px, transparent 2px), radial-gradient(circle, rgba(255, 255, 255, .3) 1px, transparent 1.5px); background-size: 46px 46px, 23px 23px; background-position: 0 0, 11px 13px; }
.profile-banner.pattern-paws::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' fill='white' fill-opacity='.22'%3E%3Cellipse cx='30' cy='36' rx='9' ry='7'/%3E%3Ccircle cx='19' cy='26' r='3.6'/%3E%3Ccircle cx='26' cy='20' r='3.6'/%3E%3Ccircle cx='34' cy='20' r='3.6'/%3E%3Ccircle cx='41' cy='26' r='3.6'/%3E%3C/svg%3E"); background-size: 60px 60px; }
.profile-banner.pattern-waves::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='24'%3E%3Cpath d='M0 12 Q20 0 40 12 T80 12' fill='none' stroke='white' stroke-opacity='.25' stroke-width='4'/%3E%3C/svg%3E"); background-size: 80px 24px; }
.profile-banner.has-img { background-size: cover; background-position: center; }
.profile-banner.has-img::after { background-image: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .25)); background-size: auto; }

/* accent colour: the tab bar, counts and tags on a profile */
[data-accent] { --acc1: var(--blue-1); --acc2: var(--blue-2); }
[data-accent="gold"] { --acc1: var(--gold-1); --acc2: var(--gold-2); }
[data-accent="green"] { --acc1: var(--green-1); --acc2: var(--green-2); }
[data-accent="purple"] { --acc1: var(--purple-1); --acc2: var(--purple-2); }
[data-accent="red"] { --acc1: var(--red-1); --acc2: var(--red-2); }
[data-accent="pink"] { --acc1: #ffb3e6; --acc2: #ff4fae; }
[data-accent="teal"] { --acc1: #7ff5e0; --acc2: #0fa595; }
.profile-wrap[data-accent] .profile-tabs-head { background: linear-gradient(180deg, var(--acc1), var(--acc2)); }
.profile-wrap[data-accent] .profile-stats b { color: var(--acc2); }
.profile-wrap[data-accent] .showcase-card:hover { border-color: var(--acc2); }
.accent-blue { background: linear-gradient(135deg, var(--blue-1), var(--blue-2)); }
.accent-gold { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); }
.accent-green { background: linear-gradient(135deg, var(--green-1), var(--green-2)); }
.accent-purple { background: linear-gradient(135deg, var(--purple-1), var(--purple-2)); }
.accent-red { background: linear-gradient(135deg, var(--red-1), var(--red-2)); }
.accent-pink { background: linear-gradient(135deg, #ffb3e6, #ff4fae); }
.accent-teal { background: linear-gradient(135deg, #7ff5e0, #0fa595); }

/* picture frames: a coloured ring around the profile picture */
.profile-pic { position: relative; display: inline-grid; border-radius: 50%; }
.profile-pic:not(.frame-none)::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; z-index: -1; border: 3px solid var(--ink); }
.profile-pic:not(.frame-none) .acct-avatar { border-color: transparent; }
.frame-gold::before { background: conic-gradient(#fff3a6, #ffb81c, #ffe066, #e08a00, #fff3a6); }
.frame-rainbow::before { background: conic-gradient(#ff5a5a, #ffb81c, #ffe066, #5be255, #3fb8ff, #b65cff, #ff5ad1, #ff5a5a); animation: frame-spin 6s linear infinite; }
.frame-ice::before { background: conic-gradient(#e8fbff, #7fd8ff, #c9f3ff, #3fb8ff, #e8fbff); }
.frame-fire::before { background: conic-gradient(#ffe066, #ff7a1a, #e3262b, #ff9f1c, #ffe066); animation: frame-spin 3s linear infinite; }
.frame-sparkle::before { background: radial-gradient(circle at 20% 25%, #fff 0 2px, transparent 3px), radial-gradient(circle at 78% 70%, #fff 0 2.5px, transparent 3.5px), radial-gradient(circle at 70% 15%, #fff 0 1.5px, transparent 2.5px), conic-gradient(#d59bff, #ffb3e6, #fff3a6, #7fd8ff, #d59bff); }
@keyframes frame-spin { to { transform: rotate(360deg); } }
.profile-top .profile-pic:not(.frame-none)::before { inset: -9px; }

.profile-status { display: inline-block; justify-self: start; padding: 5px 14px; border-radius: 16px 16px 16px 4px; background: var(--panel-soft); border: 2px solid var(--line); font-weight: 700; color: var(--heading); max-width: 100%; overflow-wrap: anywhere; }
.clan-tag { font: 700 .62em var(--font-display); color: var(--muted); text-decoration: none; vertical-align: middle; letter-spacing: .04em; }
a.clan-tag:hover { color: var(--heading); }
.showcase-grid.featured { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.showcase-grid.featured .showcase-card:first-child { grid-column: span 2; grid-row: span 2; align-content: center; }
.showcase-grid.featured .showcase-card:first-child .showcase-art { width: 180px; height: 180px; }
.showcase-grid.featured .showcase-card:first-child b { font-size: 1.25rem; }

/* My account: the look editor */
.look-editor { display: grid; gap: 18px; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .look-editor { grid-template-columns: 1fr; } }
.look-preview { position: sticky; top: 90px; border: 3px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); box-shadow: var(--edge-sm); }
.look-preview .profile-banner { height: 84px; }
.look-body { display: grid; gap: 6px; padding: 0 14px 14px; }
.look-body .profile-pic { margin-top: -36px; justify-self: start; }
.look-body .profile-pic .acct-avatar { width: 64px; height: 64px; border-width: 4px; font-size: 1.7rem; background-color: var(--panel); }
.look-body .profile-pic:not(.frame-none)::before { inset: -6px; }
.look-name { font: 700 1.2rem var(--font-display); color: var(--heading); }
.look-body .profile-status { font-size: .85rem; padding: 3px 10px; }
.look-accent { justify-self: start; margin-top: 4px; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--ink); font: 700 .8rem var(--font-display); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; background: linear-gradient(180deg, var(--acc1), var(--acc2)); }
.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-choice { padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel-soft); color: var(--heading); font: 700 .88rem var(--font-display); cursor: pointer; }
.chip-choice[aria-checked="true"] { border-color: var(--ink); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--ink); }
.profile-pic { isolation: isolate; }
@media (max-width: 1420px) and (min-width: 1181px) {
  .search-field { width: 210px; }
  .search-field:focus-within { width: 280px; }
  .nav-tools { gap: 8px; }
}
.acct-menu .note-link { display: flex; padding: 0; font: inherit; background: none; border-radius: 0; }
.acct-menu .note-link:hover { background: none; }
.acct-menu .bell-head a { display: inline; padding: 0; font: 800 .85rem var(--font-body); color: var(--blue-2); }
:where([data-theme="dark"]) .acct-menu .bell-head a { color: #7cc0ff; }
.acct-menu .bell-all { display: block; text-align: center; color: var(--blue-2); }
.bell-menu .bell-head { width: 100%; gap: 10px; }
.bell-menu .bell-head { display: flex; justify-content: space-between; align-items: center; }
.acct-menu .bell-head a { width: auto; flex: none; }

/* search stays a small magnifier button until it's used, at every screen size */
@media (min-width: 1181px) {
  .search-toggle { display: grid; }
  .search-field { display: none; }
  .nav-search.open .search-field, .nav-search.open .search-field:focus-within {
    display: flex; position: absolute; right: 0; top: 0; z-index: 46; width: 340px; animation: search-open .22s ease-out;
  }
  .nav-search.open .search-toggle { visibility: hidden; }
  .search-results { top: 52px; }
}
@keyframes search-open { from { width: 40px; opacity: .5; } }

/* phones: profile buttons stay on one line, tabs fit one row */
.profile-actions .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .profile-actions { gap: 6px; padding-bottom: 2px; }
  .profile-actions .btn { padding: 8px 12px; font-size: .9rem; }
  .profile-actions .follow-btn { min-width: 0; }
  .profile-tabs { flex-wrap: nowrap; gap: 4px; }
  .profile-tabs button { font-size: .92rem; padding: 4px 11px; -webkit-text-stroke-width: 3px; }
}
.showcase-grid > p { grid-column: 1 / -1; }

/* friends: you follow each other */
.friends-chip { font-size: .72rem; color: #fff; background: linear-gradient(180deg, var(--green-1), var(--green-2)); border: 2px solid var(--ink); }
.follow-btn.following.friends { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.follow-btn.following.friends:hover { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.friend-tag { color: var(--good); font-weight: 800; }
@media (max-width: 640px) { .profile-tabs { overflow-x: auto; scrollbar-width: none; } .profile-tabs::-webkit-scrollbar { display: none; } .profile-tabs button { flex-shrink: 0; } }

/* ---------- moderation ---------- */
.mod-form { display: grid; gap: 10px; max-width: 560px; }
.mod-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.mod-log { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.mod-entry { display: grid; gap: 2px; padding: 8px 12px; border-left: 4px solid var(--line); background: var(--panel-soft); border-radius: 0 10px 10px 0; }
.mod-entry b { color: var(--heading); font-size: .92rem; }
.mod-entry small { color: var(--muted); font-weight: 700; }
.mod-limit .method-icon { font-size: 1.1rem; }
.limits-notice ul { margin: 6px 0 0; padding-left: 20px; font-weight: 700; }

.clan-pill { font: 700 .9rem var(--font-display); color: var(--good); margin-left: 4px; }

/* review queue */
.pending-note { color: var(--warn); font-weight: 800; }
.review-row { align-items: flex-start; }
.review-row .method-text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.review-text { font-weight: 700; color: var(--heading); white-space: pre-line; overflow-wrap: anywhere; }

/* alerts on this device */
.device-push { padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft); }
.device-push b { color: var(--heading); font-family: var(--font-display); }
.device-push p { margin: 2px 0 0; }
.device-push-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-menu .bell-push { display: block; text-align: center; padding: 8px; font-weight: 800; font-size: .85rem; border-top: 2px solid var(--line); color: var(--heading); }

/* reports queue */
.reports-wrap { max-width: 900px; }
.report-list { display: grid; gap: 12px; }
.report-card { display: grid; gap: 8px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-soft); }
.report-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-who .acct-avatar { width: 48px; height: 48px; }
.report-name { display: grid; flex: 1; min-width: 0; }
.report-name b { font-family: var(--font-display); color: var(--heading); }
.report-name small { color: var(--muted); font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.report-msg { font-weight: 700; color: var(--heading); white-space: pre-line; overflow-wrap: anywhere; }
.report-ctx { font-size: .88rem; overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.report-out { font-weight: 700; font-size: .85rem; }
.menu-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 999px; font-size: .72rem; color: #fff; background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.acct-menu .dev-locked { font-size: .82rem; white-space: normal; color: var(--muted); }

/* dev unlock */
.devgate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 25, .6); backdrop-filter: blur(4px); }
.devgate-card { width: min(420px, 100%); }
.devgate-card .btn { width: 100%; }
.dev-unlock { margin-top: 4px; }
