    :root {
      --bg:          #0f0f13;
      --surface:     #18181f;
      --surface2:    #1f1f2a;
      --border:      #2a2a38;
      --text:        #e8e8f0;
      --text-dim:    #7a7a99;
      --text-muted:  #4a4a66;
      --accent:      #a78bfa;
    --color-fantastic: #d4a017;
    --color-great: #7c3aed;
    --color-good: #2563eb;
    --color-okay: #c2620a;
    --color-lame: #7c5c3a;
    --color-mixed: #6b7280;
    --color-unrated: #3a3a4a;
    }

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

    html { scrollbar-color: var(--accent) transparent; scrollbar-width: thin; }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
    ::-webkit-scrollbar-thumb:hover { background: #bfa0ff; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      line-height: 1.6;
      min-height: 100vh;
    }

    /* ── Header ── */
    header {
      padding: 2.5rem 2rem 1.5rem;
      max-width: 1100px;
      margin: 0 auto;
    }

    header h1 {
      font-family: 'Syne', sans-serif;
      font-size: clamp(1.8rem, 4vw, 2.8rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--text);
    }

    header h1 span { color: var(--accent); }

    .year-label {
      font-family: 'Syne', sans-serif;
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--accent);
      margin-top: 0.3rem;
      letter-spacing: -0.01em;
    }

    /* ── Year tabs ── */
    .year-tabs {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 2rem;
      display: flex;
      flex-direction: column;
      gap: 0;
      border-bottom: 1px solid var(--border);
    }

    .year-tabs-row {
      display: flex;
      gap: 0;
      align-items: flex-end;
      flex-wrap: wrap;
    }

    .year-tab {
      background: transparent;
      border: none;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
      color: var(--text-muted);
      padding: 0.6rem 1.2rem;
      font-family: 'Syne', sans-serif;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
      letter-spacing: 0.02em;
    }

    .year-tab:hover { color: var(--text); }

    .year-tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    /* ── Toolbar (filter bar + view toggle) ── */
    .toolbar {
      max-width: 1100px;
      margin: 1.25rem auto 0;
      padding: 0 2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }

    /* ── Filter bar ── */
    .filter-bar {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      align-items: center;
      flex: 1;
    }

    .filter-label {
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      margin-right: 0.25rem;
    }

    .filter-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text-dim);
      padding: 0.3rem 0.8rem;
      border-radius: 99px;
      font-size: 0.8rem;
      font-family: 'Inter', sans-serif;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .filter-btn:hover { border-color: var(--accent); color: var(--text); }

    .filter-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: #0f0f13;
      font-weight: 600;
    }

    /* ── View toggle ── */
    .view-toggle {
      display: flex;
      gap: 2px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 3px;
      flex-shrink: 0;
    }

    .view-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      width: 30px;
      height: 28px;
      border-radius: 5px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
    }

    .view-btn:hover { color: var(--text); background: var(--surface2); }

    .view-btn.active {
      background: var(--accent);
      color: #0f0f13;
    }

    /* ── Game list ── */
    main {
      max-width: 1100px;
      margin: 2rem auto 4rem;
      padding: 0 2rem;
    }

    .game-count {
      margin: 0;
      text-align: left;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .view-toggle-col {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
      flex-shrink: 0;
    }

    .game-list {
      display: flex;
      flex-direction: column;
      gap: 1px;
      background: var(--border);
      border-radius: 12px;
      overflow: hidden;
    }

    /* ── Game row ── */
    .game-row {
      display: grid;
      grid-template-columns: 60px 1fr auto;
      background: var(--surface);
      transition: background 0.15s ease;
      position: relative;
    }

    .game-row:hover { background: var(--surface2); }

    .game-row::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 3px;
      background: var(--row-accent);
      opacity: 0.7;
    }

    .game-row.clickable { cursor: pointer; }
    .game-row.clickable:hover .game-title { color: var(--accent); }

    /* ── Cover ── */
    .game-cover-wrap {
      width: 60px;
      min-height: 80px;
      flex-shrink: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--surface2);
    }

    .game-cover {
      width: 60px;
      height: 80px;
      object-fit: cover;
      display: block;
    }

    .cover-placeholder {
      width: 60px;
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Syne', sans-serif;
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--text-muted);
    }

    /* ── Hover dim + title overlay (shared across List/Tier/GOTY covers) ── */
    .cover-hover { position: relative; }

    .cover-hover img,
    .cover-hover .cover-placeholder,
    .cover-hover .tier-cover-placeholder,
    .cover-hover .goty-slot-cover,
    .cover-hover .goty-slot-placeholder {
      transition: filter 0.15s ease;
    }

    .cover-hover:hover img,
    .cover-hover:hover .cover-placeholder,
    .cover-hover:hover .tier-cover-placeholder,
    .cover-hover:hover .goty-slot-cover,
    .cover-hover:hover .goty-slot-placeholder {
      filter: brightness(0.35);
    }

    .cover-hover-title {
      display: none;
      position: absolute;
      inset: 0;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0.3rem;
      color: #fff;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 0.7rem;
      line-height: 1.15;
      overflow: hidden;
      pointer-events: none;
      z-index: 5;
    }

    .cover-hover:hover .cover-hover-title { display: flex; }

    .goty-slot-goty .cover-hover-title { font-size: 0.95rem; }

    /* ── Body ── */
    .game-body {
      padding: 1rem 1.25rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 0.35rem;
      min-width: 0;
    }

    .game-title {
      font-family: 'Syne', sans-serif;
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.15s ease;
    }

    .game-review {
      font-size: 0.84rem;
      color: var(--text-dim);
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ── Rating column ── */
    .game-rating-col {
      padding: 1rem 1.25rem 1rem 0.75rem;
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }

    .rating-pill {
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      padding: 0.25rem 0.65rem;
      border-radius: 99px;
      background: color-mix(in srgb, var(--row-accent) 15%, transparent);
      color: var(--row-accent);
      border: 1px solid color-mix(in srgb, var(--row-accent) 30%, transparent);
      white-space: nowrap;
    }

    /* ── Empty state ── */
    .empty {
      text-align: center;
      padding: 4rem 2rem;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    /* ── Tier view ── */
    .tier-view {
      display: flex;
      flex-direction: column;
      gap: 1px;
      background: var(--border);
      border-radius: 12px;
      overflow: hidden;
    }

    .tier-row {
      display: flex;
      align-items: stretch;
      background: var(--surface);
      min-height: 150px;
      position: relative;
    }

    .tier-row:hover { background: var(--surface2); }

    .tier-row::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 3px;
      background: var(--tier-color);
      opacity: 0.7;
    }

    .tier-label-col {
      width: 140px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-right: 1px solid var(--border);
    }

    .tier-rating-img {
      width: 140px;
      height: 140px;
      object-fit: contain;
      display: block;
    }

    .tier-rating-pill {
      font-family: 'Syne', sans-serif;
      font-size: 0.8rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--tier-color);
      text-align: center;
      white-space: nowrap;
    }

    .tier-covers {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 14px 16px;
      align-items: flex-start;
      align-content: flex-start;
      flex: 1;
    }

    .tier-cover-item {
      position: relative;
      width: 88px;
      flex-shrink: 0;
      cursor: grab;
    }

    .tier-cover-item:active { cursor: grabbing; }

    .tier-cover-item img,
    .tier-cover-placeholder {
      width: 88px;
      height: 117px;
      object-fit: cover;
      display: block;
      border-radius: 4px;
      border: 1px solid var(--border);
    }

    .tier-cover-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--surface2);
      font-family: 'Syne', sans-serif;
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--text-muted);
      border-radius: 4px;
      border: 1px solid var(--border);
    }

    .tier-empty {
      padding: 1rem;
      color: var(--text-muted);
      font-size: 0.82rem;
      font-style: italic;
      align-self: center;
    }

    .tier-cover-item.dragging {
      opacity: 0.35;
      outline: 2px dashed var(--accent);
      outline-offset: 2px;
      border-radius: 4px;
    }

    .tier-covers.drag-over {
      background: color-mix(in srgb, var(--tier-color) 8%, transparent);
      outline: 2px dashed var(--tier-color);
      outline-offset: -4px;
      border-radius: 4px;
    }

    .tier-cover-item.drop-before {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* ── GOTY view ── */
    .goty-view {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .goty-slots {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .goty-row-main {
      display: flex;
      justify-content: center;
    }

    .goty-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.25rem;
    }

    .goty-slot {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
    }

    .goty-slot-art {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.25rem;
    }

    .goty-slot-cover-box {
      position: relative;
      cursor: grab;
    }

    .goty-slot-cover-box.dragging {
      opacity: 0.35;
      outline: 2px dashed var(--accent);
      outline-offset: 2px;
      border-radius: 6px;
    }

    .goty-slot-cover {
      display: block;
      object-fit: cover;
      border-radius: 6px;
      border: 1px solid var(--border);
    }

    .goty-slot-goty .goty-slot-cover {
      width: 220px;
      height: 293px;
    }

    .goty-grid .goty-slot-cover {
      width: 130px;
      height: 173px;
    }

    .goty-slot-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--surface2);
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      color: var(--text-muted);
      font-size: 2rem;
    }

    .goty-slot-empty {
      width: 130px;
      height: 173px;
      border: 2px dashed var(--border);
      border-radius: 6px;
      background: var(--surface);
    }

    .goty-slot-goty .goty-slot-empty {
      width: 220px;
      height: 293px;
    }

    .goty-slot.drag-over .goty-slot-empty,
    .goty-slot.drag-over .goty-slot-cover-box {
      outline: 2px dashed var(--accent);
      outline-offset: 2px;
      border-radius: 6px;
    }

    .goty-remove-btn {
      display: none;
      position: absolute;
      top: -8px;
      right: -8px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: #0f0f13;
      color: var(--text);
      font-size: 0.95rem;
      line-height: 1;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      z-index: 6;
    }

    .goty-slot-cover-box:hover .goty-remove-btn { display: flex; }

    .goty-remove-btn:hover { background: var(--surface2); color: var(--accent); }

    .goty-slot-label {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      color: var(--text);
      text-align: center;
      font-size: 0.85rem;
    }

    .goty-slot-goty .goty-slot-label {
      font-size: 1.1rem;
    }

    .goty-candidates-heading {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 1rem;
      color: var(--text-dim);
      border-top: 1px solid var(--border);
      padding-top: 1.25rem;
    }

    .goty-candidates {
      background: transparent;
      padding: 0;
    }

    /* ── Off-screen container used to rasterize an export image ── */
    .export-capture {
      position: fixed;
      left: -100000px;
      top: 0;
      background: var(--bg);
      padding: 28px;
      box-sizing: border-box;
    }

    .export-capture .goty-slots { margin-top: 6px; }

    /* ── Responsive ── */
    @media (max-width: 600px) {
      header, .year-tabs, .game-count, .toolbar, main { padding-left: 1rem; padding-right: 1rem; }
      .game-body { padding: 0.75rem 0.9rem; }
      .tier-label-col { width: 110px; }
      .tier-rating-img { width: 64px; height: 64px; }
      .tier-cover-item { width: 66px; }
      .tier-cover-item img, .tier-cover-placeholder { width: 66px; height: 88px; }
      .goty-grid { grid-template-columns: repeat(2, 1fr); }
      .goty-slot-goty .goty-slot-cover, .goty-slot-goty .goty-slot-empty { width: 150px; height: 200px; }
      .goty-grid .goty-slot-cover, .goty-grid .goty-slot-empty { width: 96px; height: 128px; }
    }
