/*
 * 10000x.net compact mobile layer.
 * Mobile-only overrides keep desktop stable while unifying the public site,
 * shop, Faction HQ, and admin tools.
 */

@media (max-width: 768px) {
  :root {
    --mobile-gap: 8px;
    --mobile-radius: 9px;
    --mobile-panel: rgba(12, 20, 29, .94);
    --mobile-line: rgba(116, 151, 191, .20);
  }

  html { scroll-padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body { -webkit-text-size-adjust: 100%; }

  .site-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 8px;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .site-header { margin-bottom: 8px; }
  .site-header-mainrow { gap: 8px; padding-bottom: 7px; }
  .site-brand-inline,
  .site-brand-home { gap: 8px; }

  .compact-logo,
  .brand-logo,
  .site-logo { height: 30px; }

  .compact-banner,
  .brand-server,
  .site-server-banner {
    max-width: min(100%, 230px);
    max-height: 34px;
  }

  .site-menu-toggle { width: 38px; height: 38px; padding: 7px; }
  .site-menu-toggle span { width: 23px; }
  .site-header-status { min-height: 34px; border-radius: 7px; }

  .site-status-chip {
    min-height: 32px;
    padding: 0 5px;
    font-size: 8px;
    letter-spacing: .08em;
  }

  .site-status-chip .site-status-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-main-nav {
    gap: 4px;
    margin-top: 6px;
    padding: 6px;
    border-radius: 9px;
  }

  .site-main-nav a,
  .site-main-nav a:first-child,
  .site-main-nav a:last-child {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 6px !important;
    font-size: 11px;
  }

  .site-nav-icon { width: 15px; min-width: 15px; font-size: 15px; }

  .site-mobile-nav {
    min-height: 59px;
    padding: 3px max(3px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom))
      max(3px, env(safe-area-inset-left));
    background: rgba(5, 12, 19, .975);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, .42);
  }

  .site-mobile-nav a { gap: 2px; }
  .site-mobile-nav a > span { font-size: 18px; }
  .site-mobile-nav small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .01em;
  }

  .site-mobile-nav a.is-active { margin: 0 2px; border-radius: 6px; }
  .site-mobile-nav a.is-active::before { top: -4px; height: 2px; }

  .site-footer {
    width: calc(100% - 16px);
    margin-top: -32px;
    padding: 12px 0 calc(68px + env(safe-area-inset-bottom));
    font-size: 10px;
  }

  .site-footer-inner { gap: 8px; padding-top: 10px; }

  h1,
  .page-title,
  .section-title { letter-spacing: -.025em; }

  button,
  input,
  select,
  textarea { font-size: max(16px, 1em); }

  .btn,
  .button,
  .event-button,
  .lb-button {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 7px;
    font-size: 11px;
  }

  .panel,
  .card,
  .hero-card,
  .panel-card,
  .event-panel,
  .bounty-panel,
  .faction-card,
  .clip-card,
  .admin-card,
  .fm-panel,
  .fm-card { border-radius: var(--mobile-radius); }

  dialog,
  .modal-card,
  .help-modal-card,
  .position-modal-card,
  .image-catalog-modal-card {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 24px);
    padding: 12px;
    border-radius: 10px;
  }

  /* Dashboard */
  .dash-command-grid { gap: var(--mobile-gap); }

  .dash-command-card,
  .dash-main-panel,
  .dash-actions-panel,
  .dash-profile-card { border-radius: 10px; }

  .dash-main-panel,
  .dash-actions-panel,
  .dash-profile-card { padding: 10px; }

  .dash-welcome-row { gap: 8px; margin-bottom: 9px; }
  .dash-mobile-avatar { width: 42px; height: 42px; border-radius: 9px; }
  .dash-title { font-size: clamp(20px, 6.2vw, 24px); line-height: 1.04; }
  .dash-copy { margin-top: 3px; font-size: 10px; line-height: 1.35; }
  .dash-score-ring { width: 62px; height: 62px; padding: 4px; }
  .dash-score-ring strong { font-size: 17px; }
  .dash-score-ring small { font-size: 7px; }

  .dash-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
  }

  .dash-stat {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    min-height: 68px;
    padding: 8px 4px 7px;
    border-radius: 8px;
    text-align: center;
  }

  .dash-stat > div { width: 100%; text-align: center; }
  .dash-stat-icon { display: none; }
  .dash-stat-label {
    margin: 0;
    font-size: 6.5px;
    line-height: 1.15;
    letter-spacing: .08em;
  }

  .dash-stat-value {
    margin-top: 4px;
    font-size: clamp(17px, 5.1vw, 21px);
    line-height: 1;
    white-space: nowrap;
  }

  .dash-playtime-value { justify-items: center; }
  .dash-playtime-value .dash-stat-unit { font-size: 6px; }

  .dash-chart-card { min-height: 0; padding: 9px; border-radius: 8px; }
  .dash-chart-head { margin-bottom: 3px; }
  .dash-chart-head h2 { font-size: 13px; }
  .dash-chart-legend { gap: 7px; font-size: 7px; }
  .dash-chart-svg { height: 108px; }

  .dash-tools { margin-top: 8px; padding-top: 8px; }
  .dash-tools-head h2 { font-size: 13px; }
  .dash-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

  .dash-tool {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 5px;
    min-height: 43px;
    padding: 6px;
    border-radius: 7px;
  }

  .dash-tool strong { font-size: 9px; }

  .dash-tool .dash-tool-icon {
    display: grid;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 12px;
  }

  .dash-tool .dash-tool-arrow { display: none; }
  .dash-actions-title,
  .dash-activity-title { font-size: 15px; }
  .dash-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }

  .dash-btn,
  .dash-quick-grid .dash-btn {
    width: auto;
    justify-content: center;
    min-height: 45px;
    padding: 5px 3px;
    border-radius: 7px;
    gap: 3px;
    font-size: 8px;
    line-height: 1.1;
    text-align: center;
  }

  .dash-btn .dash-btn-icon { font-size: 16px; }
  .dash-recent { margin-top: 9px; padding-top: 9px; }
  .dash-activity-list { gap: 4px; }

  .dash-activity-row {
    min-height: 36px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 9px;
  }

  .dash-activity-row small { font-size: 7px; }

  .dash-profile-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .dash-profile-card .dash-avatar-wrap { display: none; }

  .dash-profile-card .profile-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .dash-profile-card .profile-row {
    min-width: 0;
    padding-bottom: 5px;
  }

  .dash-profile-card .profile-row:nth-child(3) {
    grid-column: 1 / -1;
  }

  .dash-profile-card .profile-role-list { gap: 3px; }
  .dash-profile-card .profile-role {
    padding: 3px 5px;
    border-radius: 5px;
    font-size: 7px;
  }

  .dash-profile-card .profile-score {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
    border-radius: 7px;
  }

  /* Player stats */
  .hero-card.hero-stats-leaderboard {
    min-height: 0;
    padding: 11px;
    border-radius: 10px;
  }

  .stats-hero-top { gap: 8px; margin-bottom: 8px; }
  .stats-player-identity h1 { font-size: 22px; line-height: 1.05; }
  .stats-player-identity img { max-width: 28px; max-height: 20px; }
  .stats-hero-nav { gap: 4px; }

  .stats-hero-nav a {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
  }

  .stats-player-search { gap: 5px; }
  .stats-player-search input {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 7px;
  }

  .stats-player-search .btn { min-height: 38px; }
  .stats-role-box { padding: 7px; border-radius: 7px; }

  .stats-role-box .role-badge,
  .meta-row > *,
  .stats-role-box > * { font-size: 8px; }

  .meta-row { gap: 4px; margin-top: 7px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

  .stat-card {
    min-height: 78px;
    padding: 9px;
    border-radius: 8px;
  }

  .stat-label { font-size: 7px; }
  .stat-value { font-size: 25px; line-height: 1; }
  .stat-sub { font-size: 8px; }
  .stats-layout,
  .events-grid { gap: 8px; }

  .panel-card,
  .event-card { padding: 10px; }

  /* Leaderboard */
  .lb-shell { gap: 8px; }
  .lb-head { gap: 7px; }
  .lb-title h1 { font-size: 22px; line-height: 1.05; }
  .lb-title p { margin-top: 4px; font-size: 10px; line-height: 1.35; }
  .lb-actions,
  .lb-view-tabs { gap: 4px; }

  .lb-actions .lb-button,
  .lb-view-tabs a,
  .lb-view-tabs button {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
  }

  .lb-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .lb-pill {
    justify-content: center;
    min-height: 31px;
    padding: 5px;
    border-radius: 6px;
    font-size: 8px;
    text-align: center;
  }

  .lb-meta .lb-pill:last-child { display: none; }
  .lb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

  .podium-card {
    min-height: 104px;
    padding: 8px 6px;
    border-radius: 8px;
  }

  .podium-rank {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 13px;
  }

  .podium-seen,
  .podium-status { font-size: 6.5px; }
  .podium-name {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .podium-card .role-row,
  .podium-card .podium-role-list {
    gap: 2px;
    margin-top: 4px;
    max-height: 28px;
    overflow: hidden;
  }

  .podium-card .role-badge,
  .podium-card .player-role-badge { padding: 2px 4px; font-size: 5.5px; }

  .podium-card .role-badge:nth-child(n + 3),
  .podium-card .player-role-badge:nth-child(n + 3) { display: none; }

  .podium-stats { grid-template-columns: 1fr; gap: 0; margin-top: 6px; }

  .podium-stat,
  .podium-card .mini-stat {
    min-height: 0;
    padding: 5px;
    border-radius: 6px;
  }

  .podium-stat:not(:first-child),
  .podium-card .mini-stat:not(:first-child) { display: none; }
  .podium-stat span,
  .podium-card .mini-stat span { font-size: 6px; }
  .podium-stat strong,
  .podium-card .mini-stat strong { font-size: 12px; }
  .lb-player-controls { gap: 5px; padding: 7px; }

  .lb-player-controls input {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 7px;
  }

  .mobile-list { gap: 5px; }
  .mobile-card { min-height: 64px; padding: 7px; border-radius: 8px; }
  .mobile-main { gap: 6px; }

  .mobile-rank {
    min-width: 34px;
    height: 28px;
    border-radius: 6px;
    font-size: 11px;
  }

  .mobile-player-name,
  .mobile-name { font-size: 11px; }
  .mobile-card .role-row { display: none; }

  .mobile-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin-top: 5px;
  }

  .mini-stat {
    min-height: 29px;
    padding: 4px 2px;
    border-radius: 5px;
  }

  .mini-stat span { font-size: 5.5px; }
  .mini-stat strong { font-size: 8px; }

  /* Homepage, rules, login, heatmap, wallet, and utility pages */
  .card.pad { padding: 10px; }

  .home-heatmap-hero,
  .heatmap-wrap {
    border-radius: 10px;
  }

  .home-heatmap-heading {
    min-height: 0;
    padding: 10px;
  }

  .home-heatmap-heading h1 {
    margin-top: 3px;
    font-size: 21px;
    line-height: 1.05;
  }

  .home-heatmap-heading .sub {
    margin-top: 4px;
    font-size: 9px;
  }

  .home-heatmap-eyebrow,
  .home-heatmap-live {
    font-size: 7px;
  }

  .heatmap-event-dock {
    gap: 5px;
    padding: 6px;
  }

  .heatmap-event-card {
    min-height: 38px;
    padding: 6px;
    border-radius: 6px;
  }

  .heatmap-popout-button {
    right: 7px;
    bottom: 7px;
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .hero-rules-roadblock {
    min-height: 150px;
  }

  .hero-rules-roadblock h1,
  .policy-hero h1 {
    font-size: 22px;
  }

  .hero-rules-roadblock .sub,
  .policy-hero .sub {
    font-size: 10px;
    line-height: 1.4;
  }

  .rules-grid {
    gap: 7px;
    margin-top: 7px;
  }

  .rules-grid .section-title {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .rules-grid .section-sub { margin-top: 3px; font-size: 9px; }
  .rule-list { margin-top: 6px; padding-left: 8px; }

  .rule-list li {
    margin: 4px 0;
    padding: 0 0 5px 12px;
    font-size: 10px;
    line-height: 1.4;
  }

  .hero-rules-roadblock .tag {
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 8px;
  }

  .hero-rules-roadblock .callout {
    margin-top: 7px;
    padding: 7px;
    border-radius: 7px;
    font-size: 9px;
  }

  .login-shell { gap: 8px; }

  .login-shell .hero-card,
  .tutorial-card,
  .message-card {
    padding: 11px;
    border-radius: 10px;
  }

  .login-shell .hero-copy h1 { font-size: 22px; }
  .login-shell .hero-copy { font-size: 11px; }
  .hero-note { font-size: 9px; line-height: 1.4; }

  .login-btn {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 10px;
  }

  .tutorial-title { font-size: 19px; }
  .tutorial-sub { margin-top: 4px; font-size: 10px; line-height: 1.4; }
  .steps-list { gap: 7px; margin-top: 8px; }

  .tutorial-step {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 96px;
    border-radius: 8px;
  }

  .tutorial-step img {
    width: 96px;
    min-height: 96px;
    height: 100%;
  }

  .tutorial-step-body { padding: 8px; gap: 4px; }
  .tutorial-step-num { width: 24px; height: 24px; font-size: 11px; }
  .tutorial-step h3 { font-size: 12px; }
  .tutorial-step p { font-size: 9px; line-height: 1.35; }
  .help-box { margin-top: 8px; padding: 8px; border-radius: 7px; font-size: 9px; }

  .wallet-shell { gap: 8px; }
  .wallet-hero {
    min-height: 126px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px;
    border-radius: 10px;
  }

  .wallet-kicker { font-size: 7px; }
  .wallet-hero h1 { margin: 4px 0; font-size: 21px; }
  .wallet-hero p { font-size: 9px; line-height: 1.35; }
  .wallet-balance span { font-size: 6px; }
  .wallet-balance strong { font-size: 21px; }
  .wallet-balance small { font-size: 8px; }
  .wallet-grid { gap: 8px; }
  .wallet-card { padding: 10px; border-radius: 9px; }
  .wallet-card h2 { font-size: 15px; }
  .wallet-card-sub { margin-bottom: 8px; font-size: 9px; }
  .wallet-form { gap: 7px; }

  .wallet-form input,
  .wallet-send {
    min-height: 38px;
    border-radius: 7px;
  }

  .wallet-note { font-size: 8px; }
  .wallet-row { gap: 7px; padding: 8px 2px; }
  .wallet-row-title { font-size: 10px; }
  .wallet-row-detail,
  .wallet-row-time { font-size: 8px; }
  .wallet-amount { font-size: 11px; }

  .policy-shell { gap: 8px; }
  .policy-card { padding: 10px; }
  .policy-card h2 { font-size: 15px; }
  .policy-card p,
  .policy-card li { font-size: 10px; line-height: 1.45; }

  /* Events */
  .events-shell { gap: 8px; }

  .events-hero {
    min-height: 148px;
    padding: 11px;
    border-radius: 10px;
  }

  .events-title h1 { font-size: 22px; line-height: 1.05; }
  .events-title p {
    max-width: 40ch;
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.35;
  }

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

  .events-actions .event-button {
    width: auto;
    min-height: 32px;
    padding: 5px 3px;
    border-radius: 6px;
    font-size: 8px;
  }

  .events-pills { gap: 4px; }
  .events-pill {
    min-height: 25px;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 7px;
  }

  .active-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .events-layout { gap: 8px; }
  .event-panel,
  .event-panel-pad { padding: 10px; }
  .event-panel h2 { font-size: 16px; }

  .event-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .event-kpi {
    min-height: 55px;
    padding: 7px;
    border-radius: 7px;
  }

  .event-kpi span { font-size: 6.5px; }
  .event-kpi strong { font-size: 17px; }

  .timeline-row {
    min-height: 42px;
    padding: 6px 8px;
    border-radius: 7px;
  }

  /* Bounties */
  .bounty-shell {
    width: 100%;
    max-width: 100%;
    gap: 8px;
    overflow: hidden;
  }

  .bounty-hero { min-height: 134px; border-radius: 10px; }
  .bounty-hero-copy { padding: 11px; }
  .bounty-hero h1 { font-size: 22px; line-height: 1.05; }
  .bounty-hero p {
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.35;
  }

  .bounty-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .bounty-panel-head,
  .bounty-panel-body { padding: 9px; }
  .bounty-panel-head h2,
  .bounty-list-head h2 { font-size: 15px; }

  .bounty-sort {
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 10px;
  }

  .bounty-list { gap: 5px; }
  .bounty-row {
    grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(48px, .62fr)) 58px;
    gap: 4px;
    padding: 7px;
    border-radius: 7px;
  }

  .bounty-name strong { font-size: 10px; }
  .bounty-name small,
  .bounty-stat span,
  .bounty-stat small { font-size: 6px; }
  .bounty-stat strong { font-size: 9px; }
  .bounty-actions { gap: 3px; }

  .bounty-actions .btn,
  .bounty-actions button,
  .bounty-actions a {
    min-height: 28px;
    padding: 4px;
    border-radius: 5px;
    font-size: 7px;
  }

  .bounty-map { border-radius: 8px; }

  /* Factions */
  .factions-shell { gap: 8px; }
  .factions-hero {
    min-height: 142px;
    padding: 11px;
    border-radius: 10px;
  }

  .factions-hero h1 { font-size: 22px; }
  .factions-hero p { margin-top: 4px; font-size: 10px; }
  .factions-search { margin-top: 8px; gap: 5px; }

  .factions-search input,
  .factions-search .btn {
    min-height: 36px;
    border-radius: 7px;
  }

  .factions-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .f-stat {
    min-height: 58px;
    padding: 7px;
    border-radius: 7px;
  }

  .f-stat span { font-size: 6.5px; }
  .f-stat strong { font-size: 17px; }
  .factions-layout { gap: 8px; }

  .factions-nav {
    position: static;
    padding: 8px;
    border-radius: 8px;
    overflow: hidden;
  }

  .factions-nav h2 { font-size: 12px; }
  .faction-jump-list {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
  }

  .faction-jump-list::-webkit-scrollbar { display: none; }

  .faction-jump {
    flex: 0 0 142px;
    min-height: 38px;
    padding: 5px 7px;
    border-radius: 6px;
    scroll-snap-align: start;
  }

  .faction-jump img { width: 26px; height: 20px; border-radius: 4px; }
  .faction-jump strong { font-size: 9px; }
  .faction-jump small { font-size: 6px; }
  .faction-card { padding: 9px; }

  .faction-card-top {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }

  .faction-flag {
    width: 58px;
    max-width: 58px;
    height: 46px;
    border-radius: 7px;
  }

  .faction-card h2 { font-size: 18px; }
  .faction-badges { gap: 3px; }
  .faction-badge {
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 6px;
  }

  .faction-description,
  .faction-desc {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.4;
  }

  .faction-roster { gap: 4px; margin-top: 8px; }
  .faction-member {
    min-height: 37px;
    padding: 5px 7px;
    border-radius: 6px;
  }

  .faction-roster {
    padding: 8px;
  }

  .faction-roster-head {
    margin-bottom: 5px;
  }

  .faction-roster-head h3 { font-size: 13px; }
  .roster-grid { gap: 4px; }

  .roster-item {
    min-height: 40px;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 6px;
  }

  .roster-player { gap: 6px; }
  .roster-player a { font-size: 10px; }
  .player-mark { width: 24px; height: 24px; font-size: 10px; }

  .roster-role {
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 7px;
  }

  /* Clips */
  .clips-shell,
  .clip-shell { gap: 8px; }
  .clip-hero {
    min-height: 132px;
    padding: 11px;
    border-radius: 10px;
  }

  .clip-hero h1 { font-size: 22px; }
  .clip-hero p {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
  }

  .clip-section-head { gap: 5px; margin-bottom: 7px; }
  .clip-section-head h2 { font-size: 16px; }
  .clip-card { padding: 6px; }

  .clip-card video,
  .clip-card .clip-poster { border-radius: 6px; }
  .discord-clip-copy { padding: 8px 3px 4px; }
  .discord-clip-copy h3 { font-size: 13px; }
  .discord-clip-copy p {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.35;
  }

  .discord-clip-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 5px 3px 2px;
  }

  .clip-share-button {
    width: auto;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 8px;
  }

  /* Shop, cart, and inventory */
  .shop-shell,
  .shop-main { gap: 8px; }

  .hero-card,
  .hero-card.hero-card-home.image-hero {
    min-height: 130px;
    padding: 11px;
  }

  .hero-copy h1,
  .topbar h1,
  .inventory-topbar h1 { font-size: 22px; }
  .hero-copy p { font-size: 10px; line-height: 1.35; }
  .hero-user-stack { min-width: 0; gap: 6px; }
  .hero-user-balance { font-size: 16px; }
  .hero-shop-nav { gap: 4px; }

  .hero-shop-nav a {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
  }

  .category-grid,
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .category-card { min-height: 112px; border-radius: 8px; }
  .category-card-overlay { padding: 8px; }
  .category-card-title { font-size: 14px; }

  .category-card-meta,
  .category-card-sub {
    margin-top: 3px;
    font-size: 8px;
    line-height: 1.25;
  }

  .item-card { border-radius: 8px; }
  .item-image-wrap { padding: 8px; }
  .item-name { padding: 8px 8px 3px; font-size: 12px; }
  .item-price { padding: 0 8px 6px; font-size: 10px; }
  .item-sub { padding: 0 8px 6px; font-size: 8px; }

  .item-actions {
    margin: auto 8px 8px;
    gap: 4px;
  }

  .item-card .btn {
    min-height: 32px;
    margin: 0 8px 8px;
    padding: 5px;
    font-size: 9px;
  }

  .item-card .item-actions .btn { margin: 0; }
  .cart-list { gap: 6px; }

  .cart-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
  }

  .cart-image { width: 62px; height: 62px; border-radius: 7px; }
  .cart-main h3 { font-size: 13px; }
  .cart-sub,
  .inventory-code,
  .muted-small { font-size: 8px; }
  .cart-side { grid-column: 1 / -1; }

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

  .inventory-card {
    gap: 6px;
    padding: 7px;
    border-radius: 8px;
  }

  .inventory-card-image-wrap { border-radius: 7px; }
  .inventory-card h3 { font-size: 12px; }
  .inventory-details { gap: 3px; font-size: 8px; }
  .inventory-actions { gap: 4px; }

  .inventory-pill {
    min-height: 29px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 8px;
  }

  /* Faction HQ */
  .fm-shell { gap: 8px; }

  .fm-admin-switcher {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 9px;
    border-radius: 9px;
  }

  .fm-admin-switcher-copy { gap: 2px; }
  .fm-admin-switcher-copy > span { font-size: 7px; }
  .fm-admin-switcher-copy strong { font-size: 11px; }
  .fm-admin-switcher-copy small {
    font-size: 8px;
    line-height: 1.35;
  }

  .fm-admin-switcher form { grid-column: auto; gap: 4px; }
  .fm-admin-switcher-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .fm-admin-switcher label { gap: 3px; font-size: 7px; }
  .fm-admin-switcher select {
    min-height: 35px;
    padding: 6px 26px 6px 8px;
    border-radius: 6px;
  }

  .fm-hero {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
    border-radius: 10px;
  }

  .fm-hero-flag { width: 58px; height: 48px; border-radius: 7px; }
  .fm-hero-copy h1 { font-size: 21px; }
  .fm-hero-copy p {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.35;
  }

  .fm-hero-badges,
  .fm-hero-actions { gap: 4px; }

  .fm-hero-badges > *,
  .fm-hero-actions a,
  .fm-hero-actions button {
    min-height: 30px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 8px;
  }

  .fm-layout { gap: 8px; }
  .fm-sidebar { padding: 7px; border-radius: 8px; }
  .fm-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .fm-sidebar { overflow: hidden; }
  .fm-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .fm-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .fm-nav a {
    flex: 0 0 auto;
    min-height: 33px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 8px;
  }

  .fm-nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
    min-height: 33px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 8px;
  }

  .fm-panel,
  .fm-card { padding: 9px; }
  .fm-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .fm-stat {
    min-height: 64px;
    padding: 7px;
    border-radius: 7px;
  }

  .fm-stat span { font-size: 6.5px; }
  .fm-stat strong { font-size: 17px; }
  .fm-overview-grid,
  .fm-flag-grid { gap: 6px; }

  .fm-member {
    min-height: 43px;
    padding: 6px;
    border-radius: 7px;
  }

  /* Admin */
  .admin-shell { padding: 8px 0 26px; }
  .admin-top { gap: 7px; margin-bottom: 8px; }
  .admin-top h1 { margin-bottom: 3px; font-size: 22px; }
  .admin-crumbs { font-size: 9px; }
  .admin-pills { gap: 4px; }

  .admin-pills > *,
  .admin-pills .badge,
  .admin-pills .btn {
    min-height: 29px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 8px;
  }

  .admin-layout,
  .admin-side,
  .admin-nav-panel { gap: 7px; }

  .admin-nav-mobile-head {
    min-height: 41px;
    padding: 7px 8px;
    border-radius: 8px;
  }

  .admin-nav-toggle {
    min-height: 31px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 8px;
  }

  .admin-card { border-radius: 9px; }
  .admin-card-pad { padding: 10px; }
  .admin-card h2 { font-size: 16px; }
  .admin-card h3 { font-size: 13px; }

  .stats-grid,
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

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

  .command-card {
    min-height: 92px;
    gap: 5px;
    padding: 8px;
    border-radius: 7px;
  }

  .command-card-icon {
    width: 23px;
    height: 23px;
    border-radius: 6px;
    font-size: 12px;
  }

  .command-card h3 { font-size: 11px; }
  .command-card p { font-size: 8px; line-height: 1.3; }

  .admin-shell label,
  .admin-shell .muted { font-size: 9px; }

  .admin-shell input,
  .admin-shell select,
  .admin-shell textarea {
    min-height: 38px;
    border-radius: 7px;
  }

  .audit-row { border-radius: 7px; }
  .admin-clip-grid,
  .gallery-manage-grid,
  .image-catalog-grid { gap: 6px; }
}

@media (max-width: 430px) {
  .compact-logo,
  .site-logo { height: 27px; }

  .compact-banner,
  .site-server-banner { max-width: 184px; max-height: 31px; }
  .dash-stat-value { font-size: 17px; }
  .dash-stat-icon { display: none; }
  .stats-hero-top,
  .stats-player-search { align-items: stretch; }

  .stats-player-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .lb-head,
  .topbar,
  .inventory-topbar { align-items: stretch; }

  .factions-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 370px) {
  .site-shell { width: min(100%, calc(100% - 12px)); }
  .compact-banner,
  .site-server-banner { max-width: 160px; }
  .site-status-chip { font-size: 7px; }
  .dash-stat { min-height: 64px; }
  .dash-stat-label { font-size: 6px; }
  .dash-stat-value { font-size: 15px; }

  .bounty-row {
    grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(48px, .65fr)) 54px;
  }

  .bounty-row > :nth-child(4) { display: none; }
  .podium-card { padding-inline: 4px; }
}

/*
 * Mobile density pass 2.
 * Prioritize scan speed, reduce repeated framing, and replace desktop-sized
 * browsers/tables with compact phone-native controls.
 */
@media (max-width: 768px) {
  :root {
    --mobile-gap: 6px;
    --mobile-radius: 7px;
  }

  html { scroll-padding-top: 6px; }

  .site-shell {
    width: min(100%, calc(100% - 10px));
    padding-top: 5px;
  }

  .site-header { margin-bottom: 6px; }
  .site-header-mainrow { padding-bottom: 5px; }

  .compact-logo,
  .brand-logo,
  .site-logo { height: 27px; }

  .compact-banner,
  .brand-server,
  .site-server-banner {
    max-width: min(100%, 210px);
    max-height: 30px;
  }

  .site-menu-toggle {
    width: 35px;
    height: 35px;
    padding: 6px;
  }

  .site-menu-toggle span { width: 21px; }
  .site-header-status { min-height: 30px; }
  .site-status-chip { min-height: 28px; font-size: 7px; }

  .site-mobile-nav { min-height: 55px; }
  .site-mobile-nav a > span { font-size: 16px; }
  .site-mobile-nav small { font-size: 7px; }

  .site-footer { width: calc(100% - 10px); }

  .card.pad,
  .panel-card,
  .event-panel-pad,
  .bounty-panel-head,
  .bounty-panel-body { padding: 8px; }

  .btn,
  .button,
  .event-button,
  .lb-button {
    min-height: 32px;
    padding: 6px 9px;
  }

  /* Dashboard: keep the command center above the fold on common phones. */
  .dash-main-panel,
  .dash-actions-panel,
  .dash-profile-card { padding: 8px; }

  .dash-welcome-row { margin-bottom: 7px; }
  .dash-title { font-size: clamp(19px, 5.8vw, 22px); }
  .dash-score-ring { width: 56px; height: 56px; }
  .dash-score-ring strong { font-size: 15px; }
  .dash-score-ring.is-rank strong { max-width: 50px; font-size: 13px; }

  .dash-stat-grid { margin-bottom: 6px; }
  .dash-stat { min-height: 62px; padding: 6px 3px; }
  .dash-stat-value { font-size: clamp(16px, 4.8vw, 19px); }
  .dash-chart-card { padding: 7px; }
  .dash-chart-svg { height: 92px; }
  .dash-tools { margin-top: 6px; padding-top: 6px; }

  .dash-tool {
    min-height: 39px;
    padding: 4px 5px;
  }

  .dash-btn,
  .dash-quick-grid .dash-btn {
    min-height: 40px;
    padding: 4px 2px;
  }

  .dash-btn .dash-btn-icon { font-size: 14px; }
  .dash-recent { margin-top: 7px; padding-top: 7px; }
  .dash-activity-row { min-height: 32px; padding: 4px 6px; }
  .radar-card { padding: 8px; }
  .radar-pings { margin-top: 7px; }
  .radar-ping-row { padding: 7px 8px; }
  .radar-footer { margin-top: 7px; }

  /* Stats: reduce chrome while retaining every metric and role. */
  .hero-card.hero-stats-leaderboard { padding: 9px; }
  .stats-hero-top { margin-bottom: 6px; }
  .stats-player-identity h1 { font-size: 20px; }
  .stats-hero-nav a { min-height: 29px; padding: 5px 7px; }
  .stats-player-search input,
  .stats-player-search .btn { min-height: 34px; }
  .stats-role-box { padding: 6px; }
  .meta-row { margin-top: 5px; }

  .stat-card {
    min-height: 68px;
    padding: 7px;
  }

  .stat-value { font-size: 22px; }

  /* Leaderboard: surface actual rankings sooner. */
  .lb-shell { gap: 6px; }

  .lb-head.image-hero {
    min-height: 108px;
    padding: 9px;
    border-radius: 9px;
  }

  .lb-title h1 { font-size: 20px; }
  .lb-title p {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.28;
  }

  .lb-kicker { font-size: 6px; }
  .lb-actions .lb-button { min-height: 29px; padding: 5px; }
  .lb-view-tabs { padding: 3px; }

  .lb-view-tabs a,
  .lb-view-tabs button {
    min-height: 29px;
    padding: 5px;
  }

  .lb-pill { min-height: 27px; padding: 4px; }
  .podium-card { min-height: 92px; padding: 6px 5px; }
  .podium-rank { width: 25px; height: 25px; font-size: 11px; }
  .podium-name { margin-top: 4px; font-size: 9px; }
  .podium-card .role-row,
  .podium-card .podium-role-list { margin-top: 3px; max-height: 22px; }
  .podium-card .podium-role-list > :nth-child(n + 2) { display: none; }
  .podium-stats { margin-top: 4px; }
  .podium-stat,
  .podium-card .mini-stat { padding: 4px; }

  .lb-player-controls { gap: 4px; padding: 6px; }
  .lb-player-controls input { min-height: 34px; }
  .lb-mobile-sort { gap: 4px; }
  .lb-mobile-sort-field select,
  .lb-mobile-direction { min-height: 34px; }
  .lb-note { display: none; }
  .mobile-card { min-height: 58px; padding: 6px; }
  .mobile-stats { margin-top: 4px; }

  /* Events: one clear event switcher and native compact standings cards. */
  .events-shell { gap: 6px; }

  .events-hero {
    min-height: 0;
    gap: 7px;
    padding: 9px;
    border-radius: 8px;
  }

  .events-hero-top { gap: 7px; }
  .events-title h1 { font-size: 20px; }

  .events-title p {
    max-width: 52ch;
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.3;
  }

  .events-actions .event-button {
    min-height: 28px;
    padding: 4px 3px;
    font-size: 7px;
  }

  .events-pill {
    min-height: 21px;
    padding: 3px 5px;
    font-size: 6px;
  }

  .events-hero > .events-pills .event-pill:nth-child(n + 4) { display: none; }
  .events-hero > .active-event-grid { display: none; }

  .event-mobile-switcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 6px 7px;
    border: 1px solid rgba(106, 167, 255, .30);
    border-radius: 7px;
    background: rgba(5, 12, 20, .78);
  }

  .event-mobile-switcher > span {
    color: #9fb2c8;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .event-mobile-switcher select {
    width: 100%;
    min-width: 0;
    min-height: 33px;
    padding: 5px 28px 5px 8px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 6px;
    background: #0a131d;
    color: #fff;
    font-weight: 800;
  }

  .events-layout,
  .event-side { gap: 6px; }
  .event-panel-head { gap: 6px; margin-bottom: 7px; }
  .event-panel-head h2 { font-size: 17px; }
  .event-subtitle { margin-top: 2px; font-size: 8px; line-height: 1.3; }
  .event-status { padding: 4px 6px; font-size: 7px; }

  .event-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 7px;
  }

  .event-kpi { min-height: 45px; padding: 6px; }
  .event-kpi span { font-size: 6px; }
  .event-kpi strong { margin-top: 3px; font-size: 15px; }
  .holder-card { gap: 6px; margin-top: 7px; padding: 7px; }
  .holder-name { font-size: 17px; }
  .flag-img { width: 36px; height: 24px; }

  .board-controls {
    display: grid;
    gap: 5px;
    padding: 7px;
  }

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

  .board-tab {
    min-height: 29px;
    padding: 4px 2px;
    border-radius: 5px;
    font-size: 7px;
  }

  .event-search { min-height: 33px; padding: 5px 7px; }
  .event-table-wrap { overflow: visible; padding: 6px; }
  .event-table,
  .event-table tbody { display: block; width: 100%; min-width: 0; }
  .event-table thead { display: none; }
  .event-table tbody { display: grid; gap: 4px; }

  .event-table tr.event-board-row {
    width: 100%;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 6px;
    background: rgba(0,0,0,.17);
  }

  .event-table tr.event-player-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) repeat(3, 40px);
    gap: 3px;
    align-items: center;
  }

  .event-table tr.event-control-row {
    display: grid;
    grid-template-columns: 30px minmax(70px, 1fr) 44px 49px 52px;
    gap: 3px;
    align-items: center;
  }

  .event-table th,
  .event-table td {
    min-width: 0;
    padding: 3px 2px;
    border: 0;
    font-size: 8px;
    line-height: 1.2;
  }

  .event-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #7f8d9d;
    font-size: 5px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .event-table td:nth-child(1)::before,
  .event-table td:nth-child(2)::before { display: none; }
  .event-player-row > td:last-child { display: none; }

  .event-table .rank-badge {
    min-width: 27px;
    padding: 4px 3px;
    border-radius: 5px;
    font-size: 8px;
  }

  .event-table .holder-line { gap: 4px; }
  .event-table .holder-line .flag-img { width: 25px; height: 17px; }
  .event-table .event-pill { padding: 3px; font-size: 5px; }
  .history-list { gap: 4px; }
  .history-card { gap: 4px; padding: 7px; }
  .history-title { font-size: 9px; }
  .event-side .event-panel { border-radius: 7px; }

  /* Faction browser: select one faction, then expand only the roster needed. */
  .factions-shell { gap: 6px; }

  .factions-hero {
    min-height: 0;
    gap: 6px;
    padding: 9px;
  }

  .factions-hero-top { gap: 6px; }
  .factions-hero h1 { font-size: 20px; }
  .factions-sub { margin-top: 2px; font-size: 9px; }
  .factions-hero-side { gap: 5px; }

  .factions-stats {
    display: flex;
    gap: 4px;
  }

  .f-stat {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-height: 31px;
    padding: 5px 7px;
  }

  .f-stat span,
  .f-stat .k { font-size: 6px; }
  .f-stat strong,
  .f-stat .v { margin-top: 0; font-size: 14px; }
  .faction-manage-cta { min-height: 33px; padding: 5px 8px; font-size: 8px; }
  .factions-search { margin-top: 0; min-height: 34px; padding: 6px 8px; }
  .factions-layout { gap: 6px; }
  .factions-nav { gap: 5px; padding: 6px; }
  .faction-nav-title { font-size: 9px; }

  .faction-quick-select {
    display: block;
    width: 100%;
    min-height: 34px;
    padding: 5px 28px 5px 8px;
    border: 1px solid rgba(90,160,255,.3);
    border-radius: 6px;
    background: #0a131d;
    color: #f4f8fc;
    font-weight: 800;
  }

  .faction-jump-list { display: none; }
  .factions-grid { gap: 6px; }
  .faction-card { scroll-margin-top: 6px; }

  .faction-card > summary.faction-card-summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 7px;
    min-height: 47px;
    padding: 5px 7px;
    color: #f2f6fb;
    cursor: pointer;
    list-style: none;
  }

  .faction-card-summary::-webkit-details-marker { display: none; }

  .faction-card-summary img,
  .faction-card-summary-mark {
    width: 38px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    object-fit: cover;
    background: rgba(255,255,255,.05);
  }

  .faction-card-summary-mark {
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
  }

  .faction-card-summary-copy { min-width: 0; }
  .faction-card-summary-copy strong,
  .faction-card-summary-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .faction-card-summary-copy strong { font-size: 10px; }
  .faction-card-summary-copy small { margin-top: 2px; color: #8392a4; font-size: 6px; }
  .faction-card-summary-count { color: #a9b7c7; font-size: 7px; font-weight: 850; white-space: nowrap; }
  .faction-card-summary-chevron { color: #7eaef6; font-size: 11px; transition: transform .16s ease; }
  .faction-card[open] > .faction-card-summary { border-bottom: 1px solid rgba(255,255,255,.07); }
  .faction-card[open] > .faction-card-summary .faction-card-summary-chevron { transform: rotate(180deg); }

  .faction-card-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .faction-card-top .faction-flag-wrap { display: none; }
  .faction-flag,
  .faction-flag-placeholder {
    width: 44px;
    height: 36px;
    max-width: 44px;
    border-radius: 6px;
  }

  .faction-flag-placeholder { font-size: 13px; }
  .faction-meta { gap: 5px; }
  .faction-title-row { gap: 4px; }
  .faction-card h2 { font-size: 15px; }
  .faction-badges { gap: 2px; }

  .faction-badge {
    padding: 2px 4px;
    font-size: 5.5px;
  }

  .faction-description,
  .faction-desc {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .faction-roster-details > summary.faction-roster-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border-top: 1px solid rgba(255,255,255,.07);
    color: #dce8f6;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
  }

  .faction-roster-summary::-webkit-details-marker { display: none; }
  .faction-roster-summary > span:last-child { color: #8190a2; font-size: 7px; }
  .faction-roster-chevron { display: inline-block; margin-left: 3px; transition: transform .16s ease; }
  .faction-roster-details[open] .faction-roster-chevron { transform: rotate(180deg); }
  .faction-roster { margin-top: 0; padding: 6px; }
  .faction-roster-head { display: none; }

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

  .roster-item {
    min-height: 31px;
    gap: 3px;
    padding: 4px 5px;
  }

  .roster-player { min-width: 0; gap: 3px; }
  .roster-player a {
    min-width: 0;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-mark { display: none; }
  .roster-role { padding: 2px 3px; font-size: 5px; }

  /* Remaining public areas: reduce decorative height, preserve imagery. */
  .bounty-hero { min-height: 108px; }
  .bounty-hero-copy { padding: 9px; }
  .bounty-hero h1 { font-size: 20px; }
  .bounty-row { padding: 6px; }

  .clip-hero { min-height: 104px; padding: 9px; }
  .clip-hero h1 { font-size: 20px; }
  .clip-card { padding: 5px; }
  .discord-clip-copy { padding-top: 6px; }
  .discord-clip-footer { padding-top: 3px; }

  .hero-card,
  .hero-card.hero-card-home.image-hero {
    min-height: 110px;
    padding: 9px;
  }

  .hero-copy h1,
  .topbar h1,
  .inventory-topbar h1 { font-size: 20px; }
  .hero-copy p { font-size: 9px; line-height: 1.3; }
  .hero-shop-nav a { min-height: 29px; padding: 5px 7px; }
  .category-card { min-height: 94px; }
  .category-card-overlay { padding: 7px; }
  .item-grid,
  .category-grid,
  .inventory-grid { gap: 5px; }
  .item-image-wrap { padding: 6px; }
  .item-name { padding: 6px 6px 2px; font-size: 11px; }
  .item-price { padding: 0 6px 4px; }
  .item-card .btn { min-height: 29px; margin: 0 6px 6px; }

  /* Faction HQ and admin: dense controls, still touch-friendly. */
  .fm-admin-switcher { padding: 7px; }
  .fm-admin-switcher select { min-height: 33px; }
  .fm-hero { padding: 8px; }
  .fm-hero-copy h1 { font-size: 19px; }
  .fm-hero-badges > *,
  .fm-hero-actions a,
  .fm-hero-actions button { min-height: 28px; }
  .fm-sidebar { padding: 5px; }
  .fm-nav a,
  .fm-nav button { min-height: 30px; padding: 5px 7px; }
  .fm-panel,
  .fm-card { padding: 7px; }
  .fm-stat { min-height: 56px; }
  .fm-member { min-height: 38px; padding: 5px; }

  .admin-shell { padding-top: 5px; }
  .admin-top h1 { font-size: 20px; }
  .admin-card-pad { padding: 8px; }
  .admin-nav-mobile-head { min-height: 37px; }
  .admin-nav-toggle { min-height: 29px; }
  .command-card { min-height: 80px; padding: 6px; }
  .admin-shell input,
  .admin-shell select,
  .admin-shell textarea { min-height: 34px; }
}

@media (max-width: 370px) {
  .compact-banner,
  .site-server-banner { max-width: 174px; }

  .event-table tr.event-player-row {
    grid-template-columns: 28px minmax(0, 1fr) repeat(3, 36px);
  }

  .event-table tr.event-control-row {
    grid-template-columns: 28px minmax(64px, 1fr) 41px 46px 47px;
  }

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