    :root {
      --red:       #D42B2B;
      --red-dark:  #A01E1E;
      --red-glow:  rgba(212,43,43,0.25);
      --black:     #0A0A0A;
      --surface:   #141414;
      --surface-2: #1C1C1C;
      --surface-3: #242424;
      --border:    #2E2E2E;
      --border-2:  #3A3A3A;
      --text:      #F2F2F2;
      --text-muted:#888;
      --text-dim:  #555;
      --gold:      #C9A84C;
      --silver:    #8A9BA8;
      --bronze:    #8B6349;
      --green:     #2E8B3A;
      --yellow:    #C9940A;
      --font-head: 'Bebas Neue', sans-serif;
      --font-sub:  'Barlow Condensed', sans-serif;
      --font-body: 'Barlow', sans-serif;
      --font-mono: 'IBM Plex Mono', monospace;
      --radius:    4px;
      --radius-lg: 8px;
    }

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

    html { scroll-behavior: smooth; }

    body {
      background: var(--black);
      color: var(--text);
      font-family: var(--font-body);
      font-size: 15px;
      line-height: 1.6;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Scrollbar ── */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--surface); }
    ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

    /* ── Typography ── */
    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-head);
      letter-spacing: 0.03em;
      line-height: 1.1;
    }
    .label {
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    a { color: var(--red); text-decoration: none; }
    a:hover { color: #ff4444; }
    code, .mono { font-family: var(--font-mono); }

    /* ── Layout ── */
    .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
    .container-sm { max-width: 680px; margin: 0 auto; padding: 0 24px; }
    main { flex: 1; padding: 40px 0 80px; }

    /* ── Navigation ── */
    .nav {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .nav-inner {
      display: flex;
      align-items: center;
      gap: 0;
      height: 74px;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
    }
    .nav-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      margin-right: 32px;
      flex-shrink: 0;
    }
    .nav-logo-mark {
      width: 58px;
      height: 58px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .nav-logo-mark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    .nav-logo-text {
      display: flex;
      flex-direction: column;
      line-height: 1.1;
    }
    .nav-logo-top {
      font-family: var(--font-head);
      font-size: 20px;
      color: var(--text);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .nav-logo-top span { color: var(--red); }
    .nav-logo-bottom {
      font-family: var(--font-head);
      font-size: 16px;
      color: var(--text);
      letter-spacing: 0.45em;
      text-transform: uppercase;
    }
    .nav-links {
      display: flex;
      align-items: center;
      gap: 4px;
      flex: 1;
      list-style: none;
    }
    .nav-links a {
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 6px 12px;
      border-radius: var(--radius);
      transition: color 0.15s, background 0.15s;
    }
    .nav-links a:hover,
    .nav-links a.active { color: var(--text); background: var(--surface-3); }
    .nav-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    /* ── Buttons ── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-sub);
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 8px 18px;
      border-radius: var(--radius);
      border: 1px solid transparent;
      cursor: pointer;
      transition: all 0.15s;
      text-decoration: none;
      white-space: nowrap;
    }
    .btn-primary {
      background: var(--red);
      color: #fff;
      border-color: var(--red);
    }
    .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
    .btn-outline {
      background: transparent;
      color: var(--text-muted);
      border-color: var(--border-2);
    }
    .btn-outline:hover { color: var(--text); border-color: var(--text-muted); background: var(--surface-3); }
    .btn-ghost {
      background: transparent;
      color: var(--text-muted);
      border-color: transparent;
    }
    .btn-ghost:hover { color: var(--text); background: var(--surface-3); }
    .btn-sm { padding: 5px 12px; font-size: 11px; }
    .btn-danger { background: #7a1a1a; border-color: #7a1a1a; color: #fff; }
    .btn-danger:hover { background: #a01e1e; border-color: #a01e1e; color: #fff; }
    .btn-success { background: var(--green); border-color: var(--green); color: #fff; }
    .btn-success:hover { background: #236b2d; color: #fff; }

    /* ── Cards ── */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
    }
    .card-sm { padding: 16px; }
    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    .card-title {
      font-family: var(--font-head);
      font-size: 20px;
      letter-spacing: 0.04em;
    }

    /* ── Page header ── */
    .page-header {
      border-bottom: 1px solid var(--border);
      padding-bottom: 24px;
      margin-bottom: 32px;
    }
    .page-header h1 {
      font-size: clamp(32px, 5vw, 52px);
      color: var(--text);
    }
    .page-header .subtitle {
      color: var(--text-muted);
      margin-top: 6px;
      font-size: 15px;
    }
    .red-bar {
      width: 48px;
      height: 3px;
      background: var(--red);
      margin-bottom: 12px;
    }

    /* ── Tables ── */
    .table-wrap { overflow-x: auto; }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }
    thead tr { border-bottom: 2px solid var(--border-2); }
    thead th {
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 10px 12px;
      text-align: left;
      white-space: nowrap;
    }
    tbody tr {
      border-bottom: 1px solid var(--border);
      transition: background 0.1s;
    }
    tbody tr:hover { background: var(--surface-2); }
    tbody td { padding: 12px 12px; vertical-align: middle; }
    .rank-num {
      font-family: var(--font-mono);
      font-size: 13px;
      color: var(--text-muted);
      width: 40px;
    }
    .rank-1 { color: var(--gold); font-weight: 500; }
    .rank-2 { color: var(--silver); }
    .rank-3 { color: var(--bronze); }

    /* ── Rating badge ── */
    .rating-badge {
      font-family: var(--font-mono);
      font-size: 15px;
      font-weight: 500;
      color: var(--text);
    }
    .rating-up   { color: #4CAF50; }
    .rating-down { color: var(--red); }

    /* ── Record badge ── */
    .record {
      font-family: var(--font-mono);
      font-size: 13px;
      color: var(--text-muted);
    }

    /* ── Weight class pill ── */
    .wc-pill {
      display: inline-block;
      font-family: var(--font-sub);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: 20px;
      border: 1px solid var(--border-2);
      color: var(--text-muted);
      white-space: nowrap;
    }
    .wc-pill.combat  { border-color: #7a2020; color: #E07070; }
    .wc-pill.plastic { border-color: #1a5c7a; color: #70C0E0; }
    .wc-pill.sumo    { border-color: #5c4a1a; color: #E0C070; }
    .wc-pill.balloon { border-color: #2a5c2a; color: #70E070; }

    /* ── Forms ── */
    .form-group { margin-bottom: 20px; }
    .form-label {
      display: block;
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 12px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 6px;
    }
    .form-input,
    .form-select,
    .form-textarea {
      width: 100%;
      background: var(--surface-2);
      border: 1px solid var(--border-2);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-body);
      font-size: 15px;
      padding: 10px 14px;
      transition: border-color 0.15s, box-shadow 0.15s;
      outline: none;
    }
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
      border-color: var(--red);
      box-shadow: 0 0 0 3px var(--red-glow);
    }
    .form-select { cursor: pointer; }
    .form-select option { background: var(--surface-2); }
    .form-textarea { min-height: 100px; resize: vertical; }
    .form-hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
    .form-error {
      font-size: 12px;
      color: #ff6b6b;
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .form-input.has-error,
    .form-select.has-error { border-color: #ff6b6b; }

    /* ── Flash messages ── */
    .flash-container { padding: 12px 0 0; }
    .flash {
      padding: 12px 16px;
      border-radius: var(--radius);
      border-left: 3px solid;
      margin-bottom: 8px;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .flash.success { background: rgba(46,139,58,0.15); border-color: var(--green); color: #7ee08a; }
    .flash.error   { background: rgba(212,43,43,0.15); border-color: var(--red); color: #ff9090; }
    .flash.warning { background: rgba(201,148,10,0.15); border-color: var(--yellow); color: #e8c060; }
    .flash.info    { background: rgba(100,140,200,0.15); border-color: #648cc8; color: #90b0f0; }
    .flash-close { cursor: pointer; opacity: 0.6; font-size: 18px; line-height: 1; background: none; border: none; color: inherit; }

    /* ── Status badges ── */
    .badge {
      display: inline-block;
      font-family: var(--font-sub);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: 3px;
    }
    .badge-green   { background: rgba(46,139,58,0.2);   color: #7ee08a; }
    .badge-red     { background: rgba(212,43,43,0.2);   color: #ff8080; }
    .badge-yellow  { background: rgba(201,148,10,0.2);  color: #e8c060; }
    .badge-blue    { background: rgba(70,130,200,0.2);  color: #80b0f0; }
    .badge-gray    { background: rgba(100,100,100,0.2); color: #999; }

    /* ── Robot avatar ── */
    .robot-avatar {
      width: 48px;
      height: 48px;
      border-radius: var(--radius);
      object-fit: cover;
      background: var(--surface-3);
      border: 1px solid var(--border);
      flex-shrink: 0;
    }
    .robot-avatar-lg {
      width: 120px;
      height: 120px;
    }
    .robot-name-link {
      font-weight: 600;
      color: var(--text);
      font-size: 15px;
    }
    .robot-name-link:hover { color: var(--red); }

    /* ── Stat grid ── */
    .stat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 12px;
    }
    .stat-box {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 16px;
    }
    .stat-value {
      font-family: var(--font-head);
      font-size: 28px;
      color: var(--text);
      line-height: 1;
    }
    .stat-label {
      font-family: var(--font-sub);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-top: 4px;
    }

    /* ── Tabs ── */
    .tabs {
      display: flex;
      gap: 0;
      border-bottom: 1px solid var(--border);
      margin-bottom: 24px;
      overflow-x: auto;
    }
    .tab-link {
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 13px;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 12px 18px;
      border-bottom: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s;
      white-space: nowrap;
      text-decoration: none;
      display: block;
    }
    .tab-link:hover { color: var(--text); }
    .tab-link.active { color: var(--text); border-bottom-color: var(--red); }

    /* ── Dividers ── */
    .divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

    /* ── Grid utilities ── */
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    @media (max-width: 768px) {
      .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    }

    /* ── Flex utilities ── */
    .flex { display: flex; }
    .flex-center { display: flex; align-items: center; }
    .flex-between { display: flex; align-items: center; justify-content: space-between; }
    .gap-8  { gap: 8px; }
    .gap-12 { gap: 12px; }
    .gap-16 { gap: 16px; }
    .gap-24 { gap: 24px; }
    .mt-4  { margin-top: 4px; }
    .mt-8  { margin-top: 8px; }
    .mt-16 { margin-top: 16px; }
    .mt-24 { margin-top: 24px; }
    .mt-32 { margin-top: 32px; }
    .mb-8  { margin-bottom: 8px; }
    .mb-16 { margin-bottom: 16px; }
    .mb-24 { margin-bottom: 24px; }
    .text-muted { color: var(--text-muted); }
    .text-red   { color: var(--red); }
    .text-sm    { font-size: 13px; }
    .text-right { text-align: right; }
    .hidden { display: none !important; }

    /* ── Pagination ── */
    .pagination {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 24px;
      justify-content: center;
    }
    .page-link {
      font-family: var(--font-mono);
      font-size: 13px;
      padding: 6px 11px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--text-muted);
      transition: all 0.15s;
    }
    .page-link:hover { border-color: var(--border-2); color: var(--text); }
    .page-link.current { background: var(--red); border-color: var(--red); color: #fff; }
    .page-link.disabled { opacity: 0.3; pointer-events: none; }

    /* ── Footer ── */
    .footer {
      background: var(--surface);
      border-top: 1px solid var(--border);
      padding: 32px 0;
      margin-top: auto;
    }
    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .footer-brand {
      font-family: var(--font-head);
      font-size: 18px;
      color: var(--text-muted);
      letter-spacing: 0.05em;
    }
    .footer-brand span { color: var(--red); }
    .footer-links {
      display: flex;
      gap: 20px;
      list-style: none;
    }
    .footer-links a {
      font-family: var(--font-sub);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-dim);
    }
    .footer-links a:hover { color: var(--text-muted); }
    .footer-copy {
      font-size: 12px;
      color: var(--text-dim);
      width: 100%;
      text-align: center;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    /* ── Empty state ── */
    .empty-state {
      text-align: center;
      padding: 60px 24px;
      color: var(--text-muted);
    }
    .empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
    .empty-state h3 { font-family: var(--font-head); font-size: 22px; margin-bottom: 8px; color: var(--text); }
    .empty-state p { font-size: 14px; }

    /* ── Alert box ── */
    .alert {
      padding: 14px 16px;
      border-radius: var(--radius);
      border-left: 3px solid;
      margin-bottom: 20px;
      font-size: 14px;
    }
    .alert-warning { background: rgba(201,148,10,0.12); border-color: var(--yellow); }
    .alert-info    { background: rgba(70,130,200,0.12); border-color: #648cc8; }
    .alert-error   { background: rgba(212,43,43,0.12);  border-color: var(--red); }

    /* ── Hamburger button ── */
    .nav-hamburger {
      display: none;
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 8px;
      margin-left: auto;
      z-index: 201;
    }
    .nav-hamburger svg { display: block; }
    .nav-hamburger:hover { color: var(--text); }

    /* ── Mobile overlay ── */
    .mobile-menu {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.85);
      z-index: 200;
      padding: 80px 24px 40px;
      overflow-y: auto;
      flex-direction: column;
      gap: 4px;
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
      font-family: var(--font-sub);
      font-weight: 600;
      font-size: 16px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
      display: block;
      text-decoration: none;
    }
    .mobile-menu a:hover,
    .mobile-menu a.active { color: var(--text); }
    .mobile-menu .mobile-divider {
      border: none;
      border-top: 1px solid var(--border-2);
      margin: 12px 0;
    }
    .mobile-menu .btn { margin-top: 8px; justify-content: center; width: 100%; }

    /* ── Responsive nav ── */
    @media (max-width: 640px) {
      .nav-links { display: none; }
      .nav-actions { display: none; }
      .nav-hamburger { display: block; }
      .nav-logo-top { font-size: 16px; }
      .nav-logo-bottom { font-size: 13px; letter-spacing: 0.45em; }
    }
