:root {
  --bg: #0b0c10;
  --bg-elev: #12141b;
  --surface: #171a23;
  --surface-hover: #1d212d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f7;
  --text-dim: #9aa3b5;
  --text-muted: #6c7486;

  /* Category accents matching pocket_apps.c */
  --c-games: #8be36b;
  --c-tools: #6cc6ff;
  --c-play: #ff5fa2;
  --c-time: #ffb547;
  --c-focus: #5ee6b0;

  /* Exit badge colors */
  --exit-down-bg: rgba(108, 198, 255, 0.12);
  --exit-down-border: rgba(108, 198, 255, 0.35);
  --exit-down-text: #8dd3ff;

  --exit-menu-bg: rgba(139, 227, 107, 0.12);
  --exit-menu-border: rgba(139, 227, 107, 0.35);
  --exit-menu-text: #a5ed8a;

  --exit-ok-bg: rgba(255, 95, 162, 0.14);
  --exit-ok-border: rgba(255, 95, 162, 0.45);
  --exit-ok-text: #ff8bbd;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Monaco, monospace;
  --radius: 16px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(108, 198, 255, 0.08), transparent 40%),
    radial-gradient(circle at 82% 18%, rgba(255, 95, 162, 0.07), transparent 42%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 12, 16, 0.78);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-tools), var(--c-play));
  box-shadow: 0 0 12px rgba(108, 198, 255, 0.7);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 15px;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.topbar-nav a:hover {
  color: var(--text);
}

.topbar-nav .nav-highlight {
  color: var(--c-tools);
  background: rgba(108, 198, 255, 0.1);
  border: 1px solid rgba(108, 198, 255, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-focus);
  box-shadow: 0 0 10px var(--c-focus);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(100deg, #ffffff 10%, #8dd3ff 55%, #ff8bbd 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 540px;
}

.hero-lead strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #6cc6ff, #5ee6b0);
  color: #081018;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Interactive Hardware Device Bezel */
.hero-device-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-frame {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(165deg, #222633, #12141c);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 16px 14px 16px 18px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.device-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 4px;
}

.device-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-games);
  box-shadow: 0 0 8px var(--c-games);
}

.device-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-screen {
  flex: 1;
  aspect-ratio: 3 / 4;
  background: #050608;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #090a0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device-keys {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 6px 0;
}

.hw-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hw-key-cap {
  width: 10px;
  height: 36px;
  border-radius: 5px;
  background: linear-gradient(180deg, #3b4254, #232734);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.hw-key-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.style-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 12px;
}

.style-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.style-tab.active {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.device-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 0;
  text-align: center;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 32px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-tools);
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

/* Exit Master Matrix */
.exit-section {
  background: linear-gradient(180deg, rgba(23, 26, 35, 0.55), rgba(11, 12, 16, 0));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.exit-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.exit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exit-card.exit-down { border-top: 3px solid var(--c-tools); }
.exit-card.exit-menu { border-top: 3px solid var(--c-games); }
.exit-card.exit-ok { border-top: 3px solid var(--c-play); }

.exit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exit-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.exit-card h3 {
  margin: 0;
  font-size: 18px;
}

.exit-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
}

.exit-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exit-list strong, .exit-desc strong {
  color: var(--text);
}

.exit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exit-chips span {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

.exit-note {
  font-size: 13px;
  color: var(--exit-ok-text);
  background: var(--exit-ok-bg);
  border: 1px solid var(--exit-ok-border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.exit-filter-btn {
  margin-top: auto;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.exit-filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Exit Badges */
.exit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-down {
  background: var(--exit-down-bg);
  border: 1px solid var(--exit-down-border);
  color: var(--exit-down-text);
}

.badge-menu {
  background: var(--exit-menu-bg);
  border: 1px solid var(--exit-menu-border);
  color: var(--exit-menu-text);
}

.badge-ok {
  background: var(--exit-ok-bg);
  border: 1px solid var(--exit-ok-border);
  color: var(--exit-ok-text);
}

/* Keycaps */
kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #252a38;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  line-height: 1.4;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--c-tools);
}

/* Quick Start */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-time);
}

.quick-card h3 {
  margin: 0;
  font-size: 17px;
}

.quick-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
}

.quick-sub {
  font-size: 13px !important;
}

.quick-shot {
  margin-top: auto;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #07080b;
  max-height: 190px;
}

.quick-shot img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.25s;
}

.quick-shot:hover img {
  transform: scale(1.03);
}

.shot-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 11px;
  background: rgba(11, 12, 16, 0.8);
  color: var(--text);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Directory Controls */
.controls-bar {
  position: sticky;
  top: 60px;
  z-index: 30;
  background: rgba(11, 12, 16, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.cat-tab.active {
  background: #eef1f7;
  color: #0b0c10;
  border-color: #eef1f7;
}

.cat-tab .count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-games { background: var(--c-games); }
.dot-tools { background: var(--c-tools); }
.dot-play  { background: var(--c-play); }
.dot-time  { background: var(--c-time); }
.dot-focus { background: var(--c-focus); }

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

.exit-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

.pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.pill.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-strong);
  color: var(--text);
}

.pill-down.active { background: var(--exit-down-bg); border-color: var(--exit-down-border); color: var(--exit-down-text); }
.pill-menu.active { background: var(--exit-menu-bg); border-color: var(--exit-menu-border); color: var(--exit-menu-text); }
.pill-ok.active   { background: var(--exit-ok-bg);   border-color: var(--exit-ok-border);   color: var(--exit-ok-text); }

.search-box input {
  width: 240px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--c-tools);
}

/* Category Groups & App Cards */
.cat-group {
  margin-bottom: 44px;
}

.cat-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.cat-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
}

.cat-group-sub {
  font-size: 13px;
  color: var(--text-muted);
}

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

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
}

.app-card:hover {
  border-color: var(--border-strong);
}

.app-card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(255, 138, 92, 0.12), rgba(23, 26, 35, 0.95) 55%);
  border-color: rgba(255, 138, 92, 0.35);
}

.app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-en {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.app-summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.app-body-with-shot {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 14px;
  align-items: start;
}

.app-thumb {
  width: 104px;
  height: 136px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  cursor: zoom-in;
  background: #050608;
  flex-shrink: 0;
}

.app-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.key-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.key-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
}

.key-row span {
  color: var(--text-dim);
}

.exit-detail {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.exit-detail strong {
  color: var(--text);
}

.octave-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #ff8a5c;
  color: #140b06;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  align-self: flex-start;
}

.octave-cta:hover {
  filter: brightness(1.08);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 52px;
  margin-top: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-info {
  max-width: 480px;
}

.footer-note {
  margin: 10px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-note a, .back-top {
  color: var(--c-tools);
  text-decoration: none;
  font-size: 13.5px;
}

/* Xiaohongshu QR — Topbar Popover */
.xhs-nav-wrap {
  position: relative;
}

.xhs-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.xhs-nav-btn:hover,
.xhs-nav-wrap.open .xhs-nav-btn {
  border-color: rgba(255, 36, 66, 0.55);
  background: rgba(255, 36, 66, 0.12);
}

.xhs-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff2442;
  box-shadow: 0 0 8px rgba(255, 36, 66, 0.7);
}

.xhs-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 212px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(20, 22, 30, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}

@media (hover: hover) {
  .xhs-nav-wrap:hover .xhs-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.xhs-nav-wrap.open .xhs-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.xhs-qr-img {
  width: 176px;
  height: 176px;
  border-radius: 10px;
  background: #fff;
  display: block;
  margin: 0 auto 10px;
}

.xhs-pop-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.xhs-pop-sub {
  margin: 3px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Xiaohongshu QR — Footer Card */
.footer-xhs {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.footer-xhs-qr {
  width: 148px;
  height: 148px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  cursor: zoom-in;
}

.footer-xhs-qr img {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-xhs-title {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.footer-xhs-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

.footer-xhs-sub span {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer-xhs {
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 18px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 6, 10, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
}

.lightbox-figure figcaption {
  font-size: 13px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .exit-matrix,
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 40px 0 32px;
  }
}

@media (max-width: 600px) {
  .brand-tag { display: none; }
  .topbar-nav { gap: 12px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .search-box, .search-box input { width: 100%; }
  .app-body-with-shot { grid-template-columns: 1fr; }
  .app-thumb { width: 100%; height: 180px; }
}
