:root {
  --bg: #eef9fd;
  --panel: #ffffff;
  --text: #070707;
  --muted: #646b73;
  --border: #e4e8ec;
  --blue: #00aeef;
  --yellow: #ffc928;
  --red: #ed1c24;
  --black: #050505;
  --soft-blue: #e7f8ff;
  --soft-red: #fff0f1;
  --shadow: 0 12px 32px rgba(5, 5, 5, .06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, var(--yellow) 0 100%) top/100% 9px no-repeat,
    linear-gradient(135deg, rgba(0, 174, 239, .10), rgba(255, 201, 40, .14) 44%, rgba(237, 28, 36, .06)),
    var(--bg);
  color: var(--text);
}
a { color: var(--blue); text-decoration: none; }
button, .button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  padding: 10px 14px;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}
.button.secondary, button.secondary, button.small { background: #eef3f6; color: var(--text); }
button.danger { background: #ffe6e8; color: #a51219; }
button:hover, .button:hover { background: var(--red); color: white; }
button.small { min-height: 30px; padding: 6px 10px; font-size: 12px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background:
    linear-gradient(180deg, rgba(255, 201, 40, .16), rgba(255, 255, 255, .92) 120px),
    white;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  padding: 10px 6px 20px;
}
.brand-logo {
  width: 174px;
  height: 82px;
  object-fit: contain;
  object-position: left center;
}
.login-logo {
  width: 220px;
  max-width: 78%;
  height: auto;
  margin: 0 auto 4px;
}
.brand small, .login-card span, table small, .review-card span, label small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--red));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}
.brand-mark.large { width: 54px; height: 54px; margin: 0 auto; }
nav { display: grid; gap: 6px; }
.nav-link {
  color: var(--text);
  padding: 12px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.nav-link:nth-child(3n+1) { border-left: 4px solid var(--red); }
.nav-link:nth-child(3n+2) { border-left: 4px solid var(--blue); }
.nav-link:nth-child(3n) { border-left: 4px solid var(--yellow); }
.nav-link:nth-child(3n+1).active, .nav-link:nth-child(3n+1):hover { background: var(--red); color: white; border-left-color: var(--red); }
.nav-link:nth-child(3n+2).active, .nav-link:nth-child(3n+2):hover { background: var(--blue); color: white; border-left-color: var(--blue); }
.nav-link:nth-child(3n).active, .nav-link:nth-child(3n):hover { background: var(--yellow); color: var(--black); border-left-color: var(--yellow); }
.login-card {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 16px 6px 4px;
}
.main {
  margin-left: 250px;
  padding: 24px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
h2 { font-size: 18px; margin-bottom: 14px; }
h3 { font-size: 15px; margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.55; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel h2::after {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--blue));
  margin-top: 8px;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.admin-tile {
  display: grid;
  gap: 6px;
  min-height: 112px;
  align-content: center;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.admin-tile:nth-child(3n+1) { border-left-color: var(--red); }
.admin-tile:nth-child(3n+2) { border-left-color: var(--yellow); }
.admin-tile span { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; min-width: 0; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, .85fr); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-grid div {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  border-top: 5px solid var(--blue);
}
.stat-grid div:nth-child(2) { border-top-color: var(--red); }
.stat-grid div:nth-child(3) { border-top-color: var(--yellow); }
.stat-grid div:nth-child(4) { border-top-color: var(--black); }
.stat-grid b { font-size: 28px; display: block; }
.stat-grid span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 11px 10px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.status {
  display: inline-flex;
  background: #fff3bd;
  color: #7a4b00;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 12px;
}
.filters {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
  margin-bottom: 16px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  background: white;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  outline: 3px solid var(--soft-blue);
}
.create-new-field { display: none; margin-top: 8px; }
.create-new-field.show { display: block; }
.person-list { display: grid; gap: 8px; }
.person-rows { display: grid; gap: 8px; }
.person-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.person-row .create-new-field { margin-top: 0; }
.inline-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr) minmax(130px, .7fr) minmax(110px, .7fr) 80px auto;
  gap: 8px;
  align-items: center;
}
.inline-list-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}
.compact-form { margin-top: 8px; }
.actions .compact-form { margin-top: 0; }
.reviewer-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
}
.check-row input { width: auto; }
.copy-link {
  min-width: 320px;
  font-size: 12px;
  color: var(--muted);
}
.link-cell {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.status-grid div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
textarea { min-height: 110px; resize: vertical; }
label { font-weight: 750; font-size: 13px; display: grid; gap: 6px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.span-2 { grid-column: span 2; }
.ai-import {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #f7fbfd;
}
.ai-import small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
}
.stack { display: grid; gap: 12px; }
.game-hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  margin-bottom: 16px;
}
dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 9px 14px;
  margin: 0;
}
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
dd { margin: 0; font-weight: 750; }
.score-row {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) minmax(90px, 160px) 42px;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 13px;
}
.bar {
  height: 8px;
  border-radius: 99px;
  background: #e4e8eb;
  overflow: hidden;
}
.bar i { display: block; height: 100%; border-radius: inherit; }
.bar .blue { background: var(--blue); }
.bar .red { background: var(--red); }
.overall {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 24px;
  font-weight: 850;
  text-align: right;
}
.rating-summary { margin-bottom: 16px; }
.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.summary-head p { margin-bottom: 0; }
.visibility-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.radar-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(320px, .8fr);
  gap: 16px;
  align-items: stretch;
}
.radar-card, .radar-empty {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
  background: white;
}
.radar-wrap {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.radar-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.radar-ring {
  fill: none;
  stroke: #d8dee5;
  stroke-width: 1.15;
}
.radar-axis {
  stroke: #c5ced8;
  stroke-width: 1.35;
}
.radar-area {
  fill: var(--radar-color);
  fill-opacity: .16;
  stroke: var(--radar-color);
  stroke-width: 3;
}
.radar-category circle {
  fill: white;
  stroke: var(--radar-color);
  stroke-width: 3;
}
.radar-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.radar-hotspot > button {
  display: inline-flex;
  max-width: 118px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 6px 16px rgba(5, 5, 5, .08);
  cursor: pointer;
  min-height: 0;
}
.radar-hotspot > button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.radar-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(260px, 74vw);
  background: var(--black);
  color: white;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(5, 5, 5, .22);
  font-size: 12px;
  text-align: left;
}
.radar-tooltip ul {
  margin: 6px 0 0;
  padding-left: 16px;
}
.radar-tooltip li { margin: 3px 0; }
.radar-hotspot:hover .radar-tooltip,
.radar-hotspot:focus-within .radar-tooltip,
.radar-hotspot.is-open .radar-tooltip {
  display: block;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.review-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.asset-library { margin-bottom: 16px; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.asset-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}
.asset-card form { grid-column: 1 / -1; }
.asset-card span, .asset-card small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.asset-thumb, .asset-doc {
  width: 78px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9fb;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 850;
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.upload-form {
  display: grid;
  grid-template-columns: 190px minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.bgg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}
.bgg-results {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.bgg-spotlight {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, .10), rgba(255, 201, 40, .18)),
    white;
  box-shadow: var(--shadow);
}
.bgg-spotlight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.bgg-spotlight h2 {
  font-size: 26px;
  margin: 6px 0;
}
.bgg-spotlight strong {
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--black);
  color: white;
  font-size: 30px;
}
.bgg-spotlight.empty strong { display: none; }
.bgg-console {
  position: sticky;
  top: 18px;
}
.bgg-console textarea {
  min-height: 74px;
}
.bgg-filter-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bgg-note {
  border-top: 1px solid var(--border);
  margin: 14px 0 0;
  padding-top: 12px;
  font-size: 12px;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 166, 223, .18), rgba(237, 28, 36, .08) 45%, rgba(255, 201, 40, .24)),
    var(--bg);
}
.login-panel {
  width: min(440px, 100%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.login-panel label { text-align: left; }
.alert { background: #ffe6e8; color: #9b1118; padding: 10px; border-radius: 8px; font-weight: 700; }
.success { background: var(--soft-blue); color: #005f86; padding: 10px; border-radius: 8px; font-weight: 700; }
.language-form {
  margin: 12px 0;
}
.language-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.language-form select {
  margin-top: 4px;
  padding: 8px 10px;
}
.translated-list-form {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}
.translated-list-form button {
  align-self: end;
}
@media (max-width: 980px) {
  body { overflow-x: hidden; }
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }
  .brand {
    padding: 0 4px 10px;
    gap: 8px;
  }
  .brand-logo {
    width: 164px;
    height: 72px;
  }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 11px; }
  .main { margin-left: 0; padding: 16px; }
  nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .nav-link {
    flex: 0 0 auto;
    padding: 9px 10px;
    font-size: 13px;
  }
  .login-card {
    margin-top: 8px;
    padding: 10px 4px 0;
  }
  .grid.two, .grid.three, .game-hero, .form-grid, .stat-grid, .ai-import { grid-template-columns: 1fr; }
  .radar-grid { grid-template-columns: 1fr; }
  .bgg-layout { grid-template-columns: 1fr; }
  .bgg-console { position: static; }
  .bgg-spotlight {
    align-items: flex-start;
    flex-direction: column;
  }
  .summary-head { flex-direction: column; }
  .visibility-pills { justify-content: flex-start; }
  .radar-hotspot > button {
    max-width: 86px;
    font-size: 10px;
  }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-tile {
    min-height: 0;
    padding: 14px;
    align-content: start;
  }
  .span-2 { grid-column: span 1; }
  .filters { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .inline-grid { grid-template-columns: 1fr; }
  .person-row { grid-template-columns: 1fr; }
  .translated-list-form { grid-template-columns: 1fr; }
  .upload-form { grid-template-columns: 1fr; }
  .reviewer-picker { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .link-cell {
    grid-template-columns: 1fr;
    min-width: 210px;
  }
  .copy-link {
    min-width: 0;
    width: 100%;
    font-size: 11px;
  }
  th, td { padding: 9px 8px; }
}
