/* Warro Intel — design system.
 *
 * Brand: Obsidian Black (#080808) + Chrome Silver (#CDCBCA) + Laser
 * Crimson Red (#D41514) — the locked palette (Rishi, 2026-11-17).
 * Everything in this file is a tint/shade of those three colours, or the
 * neutral white/black endpoints they tint toward. No other hues.
 * Liquid-glass surfaces + Apple-style fluid motion.
 * HUD details are deliberately restrained: mono micro-labels, thin rules,
 * corner ticks on the venue header only.
 *
 * Tailwind (Play CDN in V1 — see REPORT.md for the planned switch to
 * compiled CSS) handles layout/utilities; this file holds the brand
 * layer: glass, glow, motion, and component classes used by templates.
 */

:root {
  /* Locked palette (Rishi, 2026-11-17). Every other value below is a
     tint/shade of these three — do not introduce new hues. */
  --obsidian: #080808;
  --panel: #101010;
  --chrome: #CDCBCA;
  --chrome-bright: #F5F5F4;
  --chrome-light: #E6E5E5;
  --chrome-soft: #DAD8D7;
  --chrome-dim: #6B6A69;
  --crimson: #D41514;
  --crimson-deep: #9F100F;
  --crimson-light: #E15B5B;
  --crimson-soft: rgba(212, 21, 20, 0.12);
  --crimson-glow: rgba(212, 21, 20, 0.45);
  --glass-fill: rgba(255, 255, 255, 0.04);
  --glass-fill-strong: rgba(8, 8, 8, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(212, 21, 20, 0.07), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, rgba(212, 21, 20, 0.04), transparent 55%),
    var(--obsidian);
  background-attachment: fixed;
}

::selection {
  background: rgba(212, 21, 20, 0.35);
  color: #fff;
}

/* ---- focus visibility (a11y) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- glass surfaces ---- */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
}

.glass-strong {
  background: var(--glass-fill-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.header-glass {
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.4s var(--spring);
}

.header-glass.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

/* Scroll paint fix (hotfix 2.12.1): the sticky header's 18px blur +
 * saturate re-samples its full-width backdrop on EVERY scroll frame,
 * which is what made scrolling jank. While scrolling, swap to a
 * near-opaque background with a cheap 8px blur and no saturate pass;
 * nav.js removes .is-scrolling ~120ms after scrolling stops and the
 * full glass returns. The at-rest look is byte-identical. */
body.is-scrolling .header-glass {
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- hover lift (spring-like) ---- */
.card-hover {
  transition: transform 0.45s var(--spring), border-color 0.45s var(--spring), box-shadow 0.45s var(--spring);
}

.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 21, 20, 0.35);
  box-shadow: 0 0 0 1px rgba(212, 21, 20, 0.12), 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 32px rgba(212, 21, 20, 0.08);
}

/* ---- scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--spring), transform 0.7s var(--spring);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- HUD micro-labels ---- */
.hud-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chrome);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---- nav ---- */
.nav-link {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--chrome);
  transition: color 0.25s var(--spring), background 0.25s var(--spring);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav-link {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--chrome-soft);
  transition: background 0.25s var(--spring);
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.footer-link {
  transition: color 0.25s var(--spring);
}

.footer-link:hover {
  color: #fff;
}

/* ---- search + autocomplete ---- */
.search-input {
  transition: border-color 0.3s var(--spring), box-shadow 0.3s var(--spring), background 0.3s var(--spring);
}

.search-input:hover {
  background: rgba(255, 255, 255, 0.08);
}

.suggest-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(16, 16, 16, 0.96);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.suggest-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--chrome-light);
  cursor: pointer;
  transition: background 0.15s ease;
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(212, 21, 20, 0.12);
}

.suggest-item .suggest-user {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--crimson);
}

/* ---- search overlay (Update 2.3) ----
 * One search box for the whole site: a full-screen glass sheet that
 * opens with a scale+fade spring. The [hidden] rule must win over the
 * display:grid below, or the overlay would show before JS runs. */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 12vh 1rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--spring);
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-overlay-panel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  border-radius: 1.5rem;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 0 0 1px rgba(212, 21, 20, 0.15), 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 64px rgba(212, 21, 20, 0.1);
  transform: translateY(-14px) scale(0.97);
  transition: transform 0.38s var(--spring);
}

.search-overlay.open .search-overlay-panel {
  transform: none;
}

.overlay-scope-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--chrome);
  line-height: 1.5;
}

.overlay-kbd-hint {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.78rem;
  color: var(--chrome-dim);
}

/* ---- locked-preview blur (Update 2.3) ----
   The blurred sections on a locked /u page are generic grey-bar
   skeletons, never real data (the API sends none in a preview). The
   blur is a visual cue, not the security boundary — but the content
   is still non-interactive and unselectable so it cannot be
   highlighted or copied. */
.locked-blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- hero search trigger pill (Update 2.3) ---- */
.search-hero-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border-radius: 1rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--chrome-dim);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s var(--spring), box-shadow 0.3s var(--spring), transform 0.3s var(--spring);
}

.search-hero-trigger:hover {
  border-color: rgba(212, 21, 20, 0.5);
  box-shadow: 0 0 0 3px rgba(212, 21, 20, 0.15), 0 20px 48px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.search-hero-kbd {
  flex-shrink: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--chrome);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-bottom-width: 2px;
  border-radius: 0.4rem;
  padding: 0.2rem 0.45rem;
}

/* ---- chips / tabs / buttons ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--chrome-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  transition: border-color 0.25s var(--spring), background 0.25s var(--spring), transform 0.25s var(--spring);
}

a.chip:hover {
  border-color: rgba(212, 21, 20, 0.5);
  background: var(--crimson-soft);
  transform: translateY(-1px);
}

.chip-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.chip-static {
  cursor: default;
}

.chip-active {
  border-color: rgba(212, 21, 20, 0.55);
  background: var(--crimson-soft);
  color: #fff;
}

.tab-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--chrome);
  border: 1px solid transparent;
  transition: all 0.3s var(--spring);
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn-active {
  color: #fff;
  background: rgba(212, 21, 20, 0.14);
  border-color: rgba(212, 21, 20, 0.45);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #D62120, #AA1110);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(212, 21, 20, 0.35), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring), filter 0.3s var(--spring);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 32px rgba(212, 21, 20, 0.45), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--chrome-light);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.3s var(--spring), background 0.3s var(--spring);
}

.btn-ghost:hover {
  border-color: rgba(212, 21, 20, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.page-btn {
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.25s var(--spring), background 0.25s var(--spring);
}

a.page-btn:hover {
  border-color: rgba(212, 21, 20, 0.5);
  background: var(--crimson-soft);
}

.range-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
  color: var(--chrome);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s var(--spring);
}

.range-btn:hover {
  color: #fff;
}

.range-btn-active {
  color: #fff;
  background: rgba(212, 21, 20, 0.16);
  border-color: rgba(212, 21, 20, 0.55);
}

/* ---- avatar tiles (initial letter; real avatars are cached locally
        at index time in a later phase — never hotlinked from Telegram) ---- */
.avatar-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(150deg, rgba(212, 21, 20, 0.55), rgba(212, 21, 20, 0.12) 60%, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(212, 21, 20, 0.35);
  box-shadow: 0 0 24px rgba(212, 21, 20, 0.15);
  flex-shrink: 0;
}

.avatar-tile-lg {
  width: 76px;
  height: 76px;
  border-radius: 1.4rem;
  font-size: 2.1rem;
}

/* ---- hero glow + HUD corner ticks (venue header only) ---- */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 70% 0%, rgba(212, 21, 20, 0.12), transparent 65%);
}

.corner-ticks {
  position: relative;
}

.corner-ticks::before,
.corner-ticks::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(212, 21, 20, 0.6);
  border-style: solid;
  pointer-events: none;
}

.corner-ticks::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 1.5rem;
}

.corner-ticks::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 1.5rem;
}

/* ---- forms ---- */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-input,
.select-input {
  width: 100%;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.7rem 0.9rem;
  font-size: 0.925rem;
  color: var(--chrome-bright);
  outline: none;
  transition: border-color 0.25s var(--spring), box-shadow 0.25s var(--spring);
}

.form-input:focus,
.select-input:focus {
  border-color: rgba(212, 21, 20, 0.7);
  box-shadow: 0 0 0 3px rgba(212, 21, 20, 0.2);
}

.select-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23CDCBCA' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

.select-input option {
  background: var(--panel);
  color: var(--chrome-bright);
}

.form-error {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--crimson-light);
}

/* Mobile: the filter panel collapses behind a toggle (filters.js). */
@media (max-width: 1023px) {
  .filter-panel {
    display: none;
  }
  .filter-panel.open {
    display: block;
  }
}

/* ---- doc pages (methodology / about) ---- */
.doc-section {
  margin-top: 2.5rem;
}

.doc-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-section p,
.doc-section li {
  color: var(--chrome);
  line-height: 1.75;
  font-size: 0.95rem;
}

.doc-section p {
  margin-top: 0.9rem;
}

.doc-section ul {
  margin-top: 0.9rem;
  list-style: disc;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.doc-section strong {
  color: var(--chrome-bright);
  font-weight: 600;
}

.doc-section a {
  color: var(--crimson);
}

.doc-section a:hover {
  color: #fff;
}

.doc-section code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 0.35rem;
  padding: 0.1rem 0.4rem;
  color: var(--chrome-bright);
}

.formula {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 21, 20, 0.25);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #F4C4C4;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* ---- FAQ accordion ---- */
.faq-item {
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(212, 21, 20, 0.5);
  color: var(--crimson);
  font-size: 1.1rem;
  font-weight: 400;
  transition: transform 0.35s var(--spring);
}

.faq-item[open ] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.25rem 1.1rem;
  color: var(--chrome);
  font-size: 0.925rem;
  line-height: 1.75;
}

.faq-item a {
  color: var(--crimson);
}

.faq-item a:hover {
  color: #fff;
}

/* ---- uPlot theme (growth chart) ---- */
.uplot {
  font-family: ui-monospace, monospace;
}

.u-wrap {
  width: 100% !important;
}

.u-legend {
  color: var(--chrome);
}

.u-series th,
.u-series td {
  color: var(--chrome-soft);
}

.u-title {
  color: var(--chrome-bright);
}

/* ---- line clamp (venue descriptions) ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================================================================
 * Mobile / Android optimisation (Update 2.11)
 *
 * Rishi's rule: nothing may break on a phone. The section below is
 * the whole mobile layer — breakpoints, 44px touch targets, stacked
 * tables, the full-screen search overlay, and the profile-icon nav.
 * Locked palette only (Obsidian #080808 / Chrome #CDCBCA / Crimson
 * #D41514); no new hues, no new assets.
 * ================================================================== */

/* ---- global overflow + media guards ---- */
html,
body {
  /* `clip` (not `hidden`) keeps position:sticky working on the header
     while still guaranteeing zero horizontal scroll. */
  overflow-x: clip;
}

img,
video,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

/* Long usernames, URLs and IDs must wrap instead of overflowing. */
p,
li,
td,
dd,
blockquote {
  overflow-wrap: break-word;
}

code,
.font-mono {
  overflow-wrap: anywhere;
}

/* ---- profile-icon nav (Update 2.11) ----
 * The logged-in username used to sit as text in the nav and had no
 * room on a phone. It is now a 44px avatar circle (initial letter)
 * that opens a panel on tap/click: Account, credits balance, Top up,
 * Log out. Icon everywhere — the full name lives inside the panel,
 * never in the header bar. */
.profile-nav {
  position: relative;
}

.profile-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(150deg, rgba(212, 21, 20, 0.55), rgba(212, 21, 20, 0.12) 60%, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(212, 21, 20, 0.45);
  box-shadow: 0 0 20px rgba(212, 21, 20, 0.18);
  cursor: pointer;
  transition: border-color 0.25s var(--spring), box-shadow 0.25s var(--spring), transform 0.25s var(--spring);
}

.profile-btn:hover,
.profile-btn[aria-expanded="true"] {
  border-color: rgba(212, 21, 20, 0.8);
  box-shadow: 0 0 0 3px rgba(212, 21, 20, 0.18), 0 0 24px rgba(212, 21, 20, 0.3);
}

.profile-btn:active {
  transform: scale(0.96);
}

.profile-btn img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 264px;
  max-width: calc(100vw - 2rem);
  border-radius: 1.25rem;
  padding: 0.5rem;
  background: rgba(16, 16, 16, 0.97);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(212, 21, 20, 0.08);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.22s var(--spring), transform 0.22s var(--spring);
}

.profile-panel[hidden] {
  display: none;
}

.profile-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.profile-panel-head {
  padding: 0.75rem 0.85rem 0.85rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 0.4rem;
}

.profile-panel-name {
  font-weight: 700;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.profile-panel-handle {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--crimson);
  overflow-wrap: anywhere;
}

.profile-panel-credits {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chrome-light);
  background: rgba(212, 21, 20, 0.12);
  border: 1px solid rgba(212, 21, 20, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-variant-numeric: tabular-nums;
}

.profile-panel-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--chrome-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--spring), color 0.2s var(--spring);
}

.profile-panel-item:hover,
.profile-panel-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.profile-panel-item-danger {
  color: var(--crimson-light);
}

.profile-panel-item-danger:hover,
.profile-panel-item-danger:focus-visible {
  background: rgba(212, 21, 20, 0.12);
  color: #fff;
}

/* On phones the panel becomes a full-width sheet pinned under the
   header, so it never clips at the right edge of a 360px screen. */
@media (max-width: 1023px) {
  .profile-panel {
    position: fixed;
    top: 68px;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
    transform-origin: top center;
  }
}

/* ---- touch targets: 44px minimum (Update 2.11) ---- */
.nav-link,
.tab-btn,
.page-btn,
.range-btn,
.chip,
.mobile-nav-link,
.suggest-item,
.btn-primary,
.btn-ghost,
.faq-item summary {
  min-height: 44px;
}

.tab-btn,
.page-btn,
.range-btn,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
}

.form-input,
.select-input {
  min-height: 44px;
}

/* ---- stacked tables (Update 2.11) ----
 * Tables with .stack-table become labelled cards under ~700px: the
 * header row hides, each row becomes a block, and every cell shows
 * its column name from data-label (cells without data-label — the
 * name column — show no label). Desktop keeps the real table. */
@media (max-width: 700px) {
  .stack-table thead {
    display: none;
  }
  .stack-table,
  .stack-table tbody,
  .stack-table tr,
  .stack-table td {
    display: block;
    width: 100%;
  }
  .stack-table tr {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .stack-table tr:last-child {
    border-bottom: 0;
  }
  .stack-table td {
    padding: 0.15rem 0;
    text-align: left !important;
    border: 0;
  }
  .stack-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--chrome-dim);
    margin-bottom: 0.1rem;
  }
}

/* ---- mobile type + forms (Update 2.11) ---- */
@media (max-width: 767px) {
  /* Body copy never drops below 15px on a phone. */
  body {
    font-size: 15px;
  }
  .doc-section p,
  .doc-section li {
    font-size: 0.95rem;
  }
  .faq-item summary {
    font-size: 0.95rem;
  }
  .faq-item p {
    font-size: 0.95rem;
  }
  /* 16px inputs stop iOS/Android zooming into the field on focus. */
  .form-input,
  .select-input,
  .search-input,
  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="number"],
  textarea {
    font-size: 16px;
  }
  /* Chips and tab pills get full touch height on phones. */
  .chip,
  .tab-btn,
  .range-btn {
    min-height: 44px;
  }
  /* Stat tiles: values shrink a touch so 7-digit numbers fit a
     two-column row on a 360px screen. The doubled class beats the
     Tailwind .text-2xl utility regardless of stylesheet order. */
  .stat-chip-value.stat-chip-value {
    font-size: 1.35rem;
  }
}

/* ---- search overlay: full-screen sheet on mobile (Update 2.11) ---- */
@media (max-width: 767px) {
  .search-overlay {
    padding: 0;
    place-items: stretch stretch;
  }
  .search-overlay-panel {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 1rem 1rem 1.5rem;
    /* Safe area for notched Android phones. */
    padding-top: max(1rem, env(safe-area-inset-top));
    transform: translateY(12px);
  }
  .search-overlay.open .search-overlay-panel {
    transform: none;
  }
  /* No physical keyboard on a phone — the hint is noise there. */
  .overlay-kbd-hint {
    display: none;
  }
  .search-hero-kbd {
    display: none;
  }
}

/* ---- small-screen layout fixes (Update 2.11) ---- */
@media (max-width: 480px) {
  /* The venue header's action buttons stack full-width instead of
     squeezing side by side (venue.html carries .venue-actions). */
  .venue-actions {
    width: 100%;
  }
  .venue-actions .btn-primary,
  .venue-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  /* Avatar tiles shrink slightly so card titles keep room. */
  .avatar-tile {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
  .avatar-tile-lg {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
  }
}

/* Hero 3D: the showcase is desktop-only (hidden lg:block in
   home.html) and hero-model.js gates on fine pointer + >=1024px, so
   phones never download the GLB or Three.js. This rule is a second
   lock: even if the markup gate were removed, the model mount stays
   hidden below lg. */
@media (max-width: 1023px) {
  [data-hero-model] {
    display: none !important;
  }
}
