/* Game catalog — one stylesheet, mobile first, light/dark from the system */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --text: #16181d;
  --muted: #5f6673;
  --border: #dde0e7;
  --accent: #4f46e5;
  --accent-text: #ffffff;
  --accent-soft: #e6e5ff;
  --good: #15803d;
  --mid: #b45309;
  --bad: #b91c1c;
  --good-bg: #dcfce7;
  --mid-bg: #fef3c7;
  --bad-bg: #fee2e2;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 14px rgb(0 0 0 / 6%);
  --radius: 12px;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --surface-2: #22262e;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --border: #2c313b;
    --accent: #8b85ff;
    --accent-text: #0f1115;
    --accent-soft: #2a2858;
    --good: #4ade80;
    --mid: #fbbf24;
    --bad: #f87171;
    --good-bg: #133222;
    --mid-bg: #3a2c0b;
    --bad-bg: #3d1515;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 6px 18px rgb(0 0 0 / 30%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}
h3 {
  font-size: 1rem;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0 4px;
  border-radius: 4px;
}

/* ------------------------------------------------------------- top bar --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}

.nav-toggle {
  margin-left: auto;
  font-size: 1.4rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 2px 10px;
  cursor: pointer;
}

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: 8px var(--gutter) 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
body.nav-open .nav {
  display: flex;
}

.nav-link {
  color: var(--text);
  padding: 10px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 999px;
}
.user-chip:hover,
.user-chip.active {
  background: var(--surface-2);
  text-decoration: none;
}
/* avatar menu: Meu perfil / Sair */
.user-menu {
  position: relative;
}
.user-menu > summary {
  list-style: none;
  cursor: pointer;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu .caret {
  color: var(--muted);
  font-size: 0.8rem;
}
.user-menu-list {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  margin-top: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.user-menu-list a {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}
.user-menu-list a:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.user-menu-list form {
  margin: 0;
}
.user-menu-logout {
  display: block;
  width: 100%;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.user-menu-logout:hover {
  background: var(--surface-2);
}
.user-menu-email {
  font-size: 0.8rem;
  padding: 4px 10px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar.initial {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.85rem;
}

.fake-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.fake-user label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fake-label {
  color: var(--muted);
  white-space: nowrap;
}
.fake-user select {
  width: auto;
  padding: 4px 8px;
  font-size: 0.9rem;
}

.dev-banner {
  background: var(--mid-bg);
  color: var(--mid);
  font-size: 0.8rem;
  text-align: center;
  padding: 3px var(--gutter);
}

@media (min-width: 1000px) {
  .nav-toggle {
    display: none;
  }
  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    flex: 1;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    gap: 2px;
  }
  .nav-link {
    padding: 6px 10px;
  }
  .nav-user {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }
  /* desktop: the avatar menu drops down over the page */
  .user-menu-list {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    box-shadow: var(--shadow);
  }
}

/* ---------------------------------------------------------------- base --- */

.page {
  padding: 16px var(--gutter) 48px;
  max-width: 1500px;
  margin: 0 auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.panel.narrow {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.badge.alert {
  background: var(--bad);
  color: #fff;
}
.badge {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.btn.primary:hover {
  filter: brightness(1.08);
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--bad);
  border-color: var(--bad);
  background: transparent;
}
.btn.small {
  padding: 4px 10px;
  font-size: 0.85rem;
}
.btn.big {
  padding: 14px 18px;
  font-size: 1.05rem;
  flex-direction: column;
}
.btn.big small {
  font-weight: 400;
  opacity: 0.85;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
  font: inherit;
  font-size: 1rem; /* >= 16px: no zoom on iPhone */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack label > span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.row > label {
  flex: 1 1 160px;
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0 6px 6px 0;
  white-space: nowrap;
}
.chip:hover {
  text-decoration: none;
  filter: brightness(0.95);
}
.sortbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-bottom: 10px;
}
.sortbar-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 8px;
  margin-bottom: 6px;
}
.chip.sort-chip {
  border: 1px solid transparent;
}
.chip.sort-chip.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.chip.small {
  font-size: 0.72rem;
  padding: 1px 7px;
  margin: 0 4px 4px 0;
}

.score {
  display: inline-grid;
  place-items: center;
  min-width: 2.2em;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}
.score.high {
  background: var(--good-bg);
  color: var(--good);
}
.score.mid {
  background: var(--mid-bg);
  color: var(--mid);
}
.score.low {
  background: var(--bad-bg);
  color: var(--bad);
}
.score.none,
.score.diff {
  background: var(--surface-2);
  color: var(--muted);
}

.woke {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.woke.low {
  background: var(--good-bg);
  color: var(--good);
}
.woke.mid {
  background: var(--mid-bg);
  color: var(--mid);
}
.woke.high {
  background: var(--bad-bg);
  color: var(--bad);
}
.woke.none {
  background: var(--surface-2);
  color: var(--muted);
}

.empty {
  color: var(--muted);
  padding: 32px 0;
  text-align: center;
}
.ok {
  background: var(--good-bg);
  color: var(--good);
  padding: 8px 12px;
  border-radius: 10px;
}
.error {
  color: var(--bad);
}
.warn {
  background: var(--mid-bg);
  color: var(--text);
  border-left: 4px solid var(--mid);
  padding: 8px 12px;
  border-radius: 8px;
}
.warn ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 4px 0 0;
}
.form-msg {
  font-size: 0.9rem;
}
.form-msg.ok {
  padding: 2px 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 2px;
}
.tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  white-space: nowrap;
}
.tab:hover {
  text-decoration: none;
  background: var(--surface-2);
}
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.tab.active .badge {
  background: var(--accent-text);
  color: var(--accent);
}

/* ------------------------------------------------------------- catalog --- */

.catalog-layout {
  display: block;
}

.catalog-head .sub {
  color: var(--muted);
  margin: 0 0 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar .search {
  flex: 1 1 100%;
}
.toolbar .sort {
  flex: 1 1 auto;
  width: auto;
}

.result-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

/* filters: drawer on the phone, sidebar on the PC */
.filters {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(88vw, 340px);
  z-index: 50;
  overflow-y: auto;
  background: var(--surface);
  padding: 14px var(--gutter) 24px;
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow);
}
body.filters-open .filters {
  transform: none;
}
.filters-backdrop {
  display: none;
}
body.filters-open .filters-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / 45%);
}
.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filters-head h2 {
  margin: 0;
}

.fgroup {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}
.fgroup > summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.fgroup > summary::-webkit-details-marker {
  display: none;
}
.fgroup > summary::before {
  content: "▸";
  color: var(--muted);
  transition: transform 0.15s;
}
.fgroup[open] > summary::before {
  transform: rotate(90deg);
}

.fvalues {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.fvalues.cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
  font-size: 0.95rem;
}
.chk input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}
.chk .cnt {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.fnums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.num-field span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.filters-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
@media (min-width: 900px) {
  .js .filters-actions .btn.primary {
    display: none; /* with JS the grid updates by itself; on the phone it closes the drawer */
  }
  .catalog-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .filters {
    position: sticky;
    top: 72px;
    inset: auto;
    width: auto;
    max-height: calc(100vh - 88px);
    transform: none;
    transition: none;
    box-shadow: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: auto;
  }
  .close-filters,
  .filters-toggle,
  body.filters-open .filters-backdrop {
    display: none;
  }
  .toolbar .search {
    flex: 1 1 320px;
  }
  .toolbar .sort {
    flex: 0 0 240px;
  }
}

/* ---------------------------------------------------------------- grid --- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 560px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
  }
}
/* catalog grid: only 2/3/4/6/8 columns — they all divide the 48-game page, so the last row is always full */
.catalog-main {
  container-type: inline-size;
}
@container (min-width: 540px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@container (min-width: 740px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@container (min-width: 1040px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@container (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, opacity 0.25s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.card.leaving {
  opacity: 0;
  transform: scale(0.95);
}
.card-link {
  color: var(--text);
  display: block;
}
.card-link:hover {
  text-decoration: none;
}
.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.no-cover {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}
.card-woke {
  position: absolute;
  top: 8px;
  left: 8px;
}
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
}
.card-woke .woke,
.card-score .score {
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}
/* red WOKE stamp over the cover when woke >= 5 */
.card-cover img.card-stamp,
.tl-cover img.card-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgb(255 255 255 / 70%));
}
/* admin woke edit form inside the Woke / Based panel */
.woke-edit {
  margin-top: 12px;
}
.woke-edit > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}
.woke-edit > summary::-webkit-details-marker {
  display: none;
}
.woke-edit[open] > summary {
  margin-bottom: 10px;
}
/* platform chips below the genre/style chips (outlined, to tell them apart) */
.chip.plat {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.chip.plat:hover {
  color: var(--accent);
  border-color: var(--accent);
}
/* mini brand icon inside a platform chip (SVG used as a mask -> takes the chip's gray) */
.chip .pi {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 5px;
  vertical-align: -0.15em;
  background: currentColor;
  -webkit-mask: var(--pi) center / contain no-repeat;
  mask: var(--pi) center / contain no-repeat;
}
.game-info .chip.plat {
  font-size: 0.78rem;
  padding: 1px 8px;
  margin: 0 4px 3px 0;
}
.card-body {
  padding: 8px 10px 4px;
}
.card-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin: 4px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.my-status {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.card-tags {
  padding: 2px 10px 0;
}
.quick {
  display: flex;
  gap: 6px;
  padding: 6px 10px 10px;
  margin-top: auto;
}
.mark {
  flex: 1;
  font: inherit;
  font-size: 1rem;
  padding: 4px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.mark:hover {
  background: var(--surface-2);
}
.mark[aria-pressed="true"].mark-interest {
  background: var(--good-bg);
  border-color: var(--good);
  color: var(--good);
}
.mark[aria-pressed="true"].mark-doubt {
  background: var(--mid-bg);
  border-color: var(--mid);
  color: var(--mid);
}
.mark[aria-pressed="true"].mark-no_interest {
  background: var(--bad-bg);
  border-color: var(--bad);
  color: var(--bad);
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.pg {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
a.pg:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.pg.current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.pg.off {
  opacity: 0.35;
}

/* ---------------------------------------------------------- game page --- */

.back {
  margin: 0 0 12px;
}

.game {
  max-width: 1150px;
  margin: 0 auto;
}

.game-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.game-cover {
  align-self: center;
  width: min(70vw, 300px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.game-cover img {
  width: 100%;
}
.game-info h1 {
  font-size: 1.7rem;
}
.game-sub {
  color: var(--muted);
  margin: 0 0 8px;
}
.note {
  background: var(--surface-2);
  padding: 6px 10px;
  border-radius: 8px;
}
.scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 4px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
.score-box .score {
  font-size: 1.3rem;
  min-width: 2.4em;
}
.status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-buttons .mark {
  flex: 1 1 auto;
  padding: 8px 12px;
}
.played-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.played-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.played-row .mark {
  flex: 1 1 auto;
  padding: 8px 12px;
}
.mark[aria-pressed="true"].played-finished {
  background: var(--good-bg);
  border-color: var(--good);
  color: var(--good);
}
.mark[aria-pressed="true"].played-unfinished {
  background: var(--mid-bg);
  border-color: var(--mid);
  color: var(--mid);
}
.card-year {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}
/* card: Terminei / Tô no meio — "off" (gray, faded) until chosen */
.card-played {
  display: contents;
}
.played-toggle {
  flex: 0 0 auto;
  font: inherit;
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  opacity: 0.45;
  filter: grayscale(1);
  cursor: pointer;
}
.played-toggle:hover {
  opacity: 0.8;
}
.played-toggle[aria-pressed="true"] {
  opacity: 1;
  filter: none;
}
.played-toggle.played-finished[aria-pressed="true"] {
  color: var(--good);
  border-color: var(--good);
}
.played-toggle.played-unfinished[aria-pressed="true"] {
  color: var(--mid);
  border-color: var(--mid);
}

@media (min-width: 760px) {
  .game-head {
    flex-direction: row;
    align-items: flex-start;
  }
  .game-cover {
    align-self: flex-start;
    flex: 0 0 280px;
  }
  .game-info {
    flex: 1;
  }
  .game-info h1 {
    font-size: 2.1rem;
  }
  .status-buttons .mark,
  .played-row .mark {
    flex: 0 0 auto;
  }
}

/* compact game header: everything beside the cover, within its height */
.game-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.game-title h1 {
  margin: 0;
}
.game-title .next-new {
  margin-left: auto;
}
.game-info .game-sub {
  font-size: 0.9rem;
  margin: 2px 0 8px;
}
.game-info .scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.game-info .score-box {
  flex-direction: row;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  font-size: 0.8rem;
}
.game-info .score-box .score {
  font-size: 0.95rem;
  min-width: 2.2em;
}
.marks-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 8px;
}
.marks-row .status-buttons,
.marks-row .played-row {
  gap: 6px;
  margin: 0;
}
.marks-row .mark {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 0.88rem;
}
.game-info .site-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 8px;
}
.game-info .site-score-line {
  margin: 0;
  font-size: 0.88rem;
}
.game-info .site-score-line .site-score {
  font-size: 0.95rem;
  min-width: 2.2em;
}
.row-label {
  color: var(--muted);
  font-weight: 600;
  margin-right: 6px;
}
.game-info .rate {
  gap: 6px;
}
.game-info .rate-label {
  font-size: 0.85rem;
}
.game-info .rate-buttons {
  grid-template-columns: repeat(11, 28px);
  flex: 0 0 auto;
  max-width: none;
  gap: 3px;
}
.game-info .rate-btn {
  padding: 2px 0;
  font-size: 0.82rem;
  border-radius: 6px;
}
.game-info .tag-groups {
  gap: 2px;
}
.game-info .tag-group {
  grid-template-columns: 96px 1fr;
  align-items: baseline;
  gap: 6px;
}
.game-info .tag-group dt {
  font-size: 0.68rem;
}
.game-info .chip.small {
  font-size: 0.78rem;
  margin: 0 4px 3px 0;
}

.tag-groups {
  margin: 0;
  display: grid;
  gap: 10px;
}
.tag-group {
  display: grid;
  gap: 2px;
}
.tag-group dt {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-group dd {
  margin: 0;
}
@media (min-width: 640px) {
  .tag-group {
    grid-template-columns: 130px 1fr;
    align-items: baseline;
  }
}

.summary {
  margin: 0;
  white-space: pre-line;
}

/* rows are always even: 1 per row (narrow), 2 per row (medium), half the photos per row (wide)
   --two / --half are set inline by the page from the photo count */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .gallery {
    grid-template-columns: repeat(var(--two, 2), 1fr);
  }
}
@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(var(--half, 3), 1fr);
  }
}
.gallery a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  cursor: zoom-in;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.gallery a:hover img {
  transform: scale(1.04);
}

.videos {
  display: grid;
  gap: 12px;
}
@media (min-width: 1100px) {
  .videos {
    grid-template-columns: 1fr 1fr;
  }
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.points {
  margin: 8px 0 0;
  padding-left: 20px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline .tl-year {
  flex: 0 0 3.2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline li.current {
  font-weight: 700;
}
.timeline li.current .tl-title::after {
  content: " ← este";
  color: var(--accent);
  font-weight: 400;
}
.timeline .chip {
  margin-left: 6px;
}
.timeline li.kind-cancelled .tl-title {
  text-decoration: line-through;
  color: var(--muted);
}

/* ------------------------------------------------------------ franchises --- */

/* list: same .grid / .card as the catalog */
.fr-list-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.fr-search {
  margin: 4px 0 12px;
  max-width: 520px;
}
.fr-card .card-cover img {
  object-position: center;
}
.fr-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  background: rgb(0 0 0 / 62%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}
.fr-card-count {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.fr-card-count strong {
  color: var(--text);
}
.fr-card-tags {
  padding-bottom: 8px;
}

/* profile */
.fr-profile {
  max-width: 1150px;
  margin: 0 auto;
}
.fr-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
}
.fr-hero-media {
  position: absolute;
  inset: 0;
  cursor: zoom-in;
}
.fr-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fr-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 88%) 0%, rgb(0 0 0 / 55%) 35%, rgb(0 0 0 / 0%) 70%);
  pointer-events: none;
}
.fr-hero-text {
  position: relative;
  z-index: 1;
  padding: 72px 16px 16px;
  color: #fff;
  pointer-events: none;
}
.fr-hero-text a {
  pointer-events: auto;
}
.fr-hero h1 {
  font-size: 1.8rem;
  margin: 0 0 4px;
  text-shadow: 0 2px 10px rgb(0 0 0 / 50%);
}
.fr-kicker {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.fr-tagline {
  margin: 0;
  font-size: 1.02rem;
  max-width: 60ch;
  opacity: 0.95;
}
.fr-hero.no-img {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  box-shadow: none;
  border: 1px solid var(--border);
}
.fr-hero.no-img::after {
  display: none;
}
.fr-hero.no-img .fr-hero-text {
  color: var(--text);
  padding-top: 40px;
}
.fr-hero.no-img h1 {
  text-shadow: none;
}
@media (min-width: 760px) {
  .fr-hero {
    aspect-ratio: 21 / 8;
    min-height: 0;
    max-height: 440px;
  }
  .fr-hero-text {
    padding: 0 28px 24px;
  }
  .fr-hero h1 {
    font-size: 2.6rem;
  }
  .fr-tagline {
    font-size: 1.15rem;
  }
}
@media (max-width: 759px) {
  .fr-hero:not(.no-img) {
    aspect-ratio: 4 / 3;
  }
}
.fr-hero.no-img {
  aspect-ratio: auto;
}

.fr-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
@media (min-width: 640px) {
  .fr-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.fr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
}
.fr-stat strong {
  font-size: 1.4rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.fr-stat span {
  color: var(--muted);
  font-size: 0.78rem;
}
.fr-fact-list {
  margin: 0;
  display: grid;
  gap: 8px;
}
.fr-fact {
  display: grid;
  gap: 2px;
}
.fr-fact dt {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fr-fact dd {
  margin: 0;
}
.fr-fact .chip {
  margin-bottom: 4px;
}
@media (min-width: 640px) {
  .fr-fact {
    grid-template-columns: 150px 1fr;
    align-items: baseline;
    gap: 8px;
  }
}

.fr-columns {
  display: grid;
  gap: 0 16px;
}
@media (min-width: 900px) {
  .fr-columns {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
  }
  .fr-columns.single {
    grid-template-columns: 1fr;
  }
}
.fr-about p {
  margin: 0 0 12px;
  line-height: 1.65;
}
.fr-about p:last-child {
  margin-bottom: 0;
}
.fr-sources {
  font-size: 0.82rem;
}
.fr-highlights ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.fr-highlights li {
  position: relative;
  padding-left: 22px;
  line-height: 1.5;
}
.fr-highlights li::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

.fr-section {
  margin-bottom: 16px;
}
.fr-section h2 .muted {
  font-weight: 400;
}
.fr-derived > p.muted {
  margin: -6px 0 12px;
  font-size: 0.88rem;
}

/* chronology: vertical line, a dot per game, the catalog's games highlighted with their cover */
.fr-chrono-sub {
  margin: -6px 0 12px;
  font-size: 0.88rem;
}
.fr-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.tl-item {
  display: grid;
  grid-template-columns: 3.1em 18px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  position: relative;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(3.1em + 8px + 8px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.tl-item:first-child::before {
  top: 12px;
}
.tl-item:last-child::before {
  bottom: calc(100% - 12px);
}
.tl-item .tl-year {
  padding-top: 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tl-dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--muted);
}
.tl-item.in-cat .tl-dot {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tl-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 3px 0 9px;
  min-width: 0;
}
.tl-item.new-year:not(:first-child) .tl-body {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.tl-item.new-year:not(:first-child) .tl-year,
.tl-item.new-year:not(:first-child) .tl-dot {
  margin-top: 8px;
}
.tl-item.new-year.in-cat:not(:first-child) .tl-dot {
  margin-top: 11px;
}
.tl-item.in-cat .tl-body {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 2px 0 8px;
  border-top: 0;
}
.tl-cover {
  position: relative;
  flex: 0 0 44px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.tl-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tl-title {
  font-weight: 600;
  line-height: 1.3;
}
.tl-item:not(.in-cat) .tl-title {
  color: var(--muted);
  font-weight: 500;
}
.tl-item.in-cat .tl-title a {
  color: var(--text);
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.8rem;
}
.tl-tags .chip {
  margin: 0;
}
.tl-in {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tl-in .score {
  font-size: 0.75rem;
}
.tl-out {
  color: var(--muted);
}
.tl-note {
  font-size: 0.82rem;
}
.tl-kind-upcoming {
  background: var(--good-bg);
  color: var(--good);
}
.tl-kind-cancelled {
  background: var(--bad-bg);
  color: var(--bad);
}
.tl-item.kind-cancelled .tl-title {
  text-decoration: line-through;
}

.meta p {
  margin: 4px 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* nota do site */
.site-score-line {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.site-score-line .site-score {
  font-size: 1.4rem;
  min-width: 2.6em;
}
.rate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.rate-label {
  color: var(--muted);
  font-size: 0.9rem;
}
.rate-buttons {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 4px;
  flex: 1 1 100%;
  max-width: 520px;
}
.rate-btn {
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 7px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}
.rate-btn:hover {
  background: var(--surface-2);
}
.rate-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
@media (min-width: 760px) {
  .rate-buttons {
    flex: 0 1 520px;
  }
}

/* comentários */
.comments h2 .count {
  font-weight: 400;
  font-size: 0.9em;
}
.comment-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.comment-form textarea {
  resize: vertical;
  min-height: 4.5em;
}
.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.comment-head time {
  font-size: 0.85rem;
}
.comment-del {
  margin-left: auto;
}
.comment-text {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ lightbox --- */

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: rgb(0 0 0 / 94%);
  color: #fff;
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox::backdrop {
  background: rgb(0 0 0 / 90%);
}
.lightbox img {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: contain; /* small screenshots grow to fill the screen */
  user-select: none;
  touch-action: pan-y pinch-zoom;
}
.lightbox button {
  position: absolute;
  background: rgb(0 0 0 / 45%);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover {
  background: rgb(255 255 255 / 20%);
}
.lb-close {
  top: 12px;
  right: 12px;
  font-size: 1.3rem !important;
}
.lb-prev {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.lb-count {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --------------------------------------------------- pending / add / me --- */

.pending-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.pending {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.pending.just-added {
  border-color: var(--good);
}
.pending.has-error {
  border-color: var(--bad);
}
.pending-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.pending-main .btn {
  margin-left: auto;
}
.pending-error {
  margin-top: 8px;
  background: var(--bad-bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.pending-error p {
  margin: 0 0 4px;
}
.pending.saving {
  opacity: 0.6;
}
.pending.is-ambiguous {
  border-color: var(--mid);
}
.pending.is-ambiguous .pending-error {
  background: var(--mid-bg);
}
.pending-error .candidates {
  margin: 0 0 4px;
  padding-left: 20px;
}
.add-form {
  margin: 0 0 16px;
}
.add-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.add-row {
  display: flex;
  gap: 8px;
}
.add-row input,
.add-row textarea {
  flex: 1 1 auto;
}
.add-row {
  align-items: flex-start;
}
.add-row textarea {
  resize: vertical;
  min-height: 2.6em;
}
/* a pasted list keeps one game per line */
.pending-main strong {
  white-space: pre-line;
}
.add-form .form-msg {
  margin: 6px 0 0;
}
.catalog-run-btn {
  border-color: var(--accent);
  color: var(--accent);
}
.add-examples {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.add-examples .chip {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  margin: 0 0 0 6px;
}
.add-help {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.add-help p {
  margin: 0 0 6px;
}
.add-help ol {
  margin: 0;
  padding-left: 20px;
}
.add-help li {
  margin: 2px 0;
}
.catalog-running {
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--mid-bg);
  color: var(--mid);
}
/* modal (Catalogar pendentes) */
.modal {
  max-width: min(520px, calc(100vw - 32px));
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.modal::backdrop {
  background: rgb(0 0 0 / 0.55);
}
.modal h2 {
  margin: 0 0 10px;
}
.modal p {
  margin: 0 0 10px;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.pending-error pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  max-height: 300px;
  overflow: auto;
}

.login-choices {
  display: grid;
  gap: 10px;
}

/* ------------------------------------------------- own login (/login …) --- */

.auth-box {
  max-width: 420px;
  margin-top: 8px;
  padding: 24px 20px;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
}
.auth-logo:hover {
  text-decoration: none;
}
.auth-logo img {
  border-radius: 14px;
}
.auth-box h1 {
  text-align: center;
  font-size: 1.3rem;
}
.auth-sub {
  text-align: center;
  margin-top: 0;
}
.auth-error {
  background: var(--bad-bg);
  color: var(--bad);
  padding: 8px 12px;
  border-radius: 10px;
}
.google-btn {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 600;
  gap: 10px;
  background: #fff;
  color: #1f1f1f;
  border-color: #c7c9cf;
}
.google-btn:hover {
  background: #f3f4f6;
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin: 18px 0;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
.auth-submit {
  width: 100%;
  padding: 12px 18px;
  font-size: 1.05rem;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 0;
}
.auth-small {
  font-size: 0.9rem;
  margin-bottom: 0;
}
.code-input {
  font-size: 1.4rem !important;
  letter-spacing: 0.35em;
  text-align: center;
}
.pw-field {
  position: relative;
}
.pw-field input {
  padding-right: 46px;
}
.pw-toggle {
  display: none;
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
}
.js .pw-toggle {
  display: inline-flex;
}
.pw-toggle[aria-pressed="true"] {
  opacity: 1;
}
.pw-toggle:hover {
  background: var(--surface-2);
}

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px 16px;
}
.platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.platform-row select {
  width: 130px;
  flex: none;
}

/* --------------------------------------------------------------- admin --- */

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th,
td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
td.actions {
  white-space: nowrap;
  text-align: right;
}
td.actions .btn {
  margin-left: 4px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.inline-form input[type="text"] {
  width: auto;
  flex: 1 1 150px;
}
.inline-form .grow {
  flex: 3 1 200px;
}
.inline-form .chk {
  font-size: 0.9rem;
}
.w-num {
  width: 80px !important;
  flex: none !important;
}
.value-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.value-list li {
  border-bottom: 1px solid var(--border);
}
.value-list .val {
  min-width: 140px;
}
.tag-values {
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.tag-values > summary {
  cursor: pointer;
  font-weight: 600;
}
.tag-edit {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0;
}
.tag-edit legend {
  font-weight: 600;
  padding: 0 6px;
}
