/* DogworksTV visual identity: knight-dog mascot (red fur, silver helmet, parchment ribbon)
   + Twitch panels (royal blue icon square with long shadow, slate bar, chunky display type). */

:root {
  --bg: #0e0f13;
  --bg-2: #14161c;
  --surface: #1a1c23;
  --surface-2: #22252e;
  --border: #2c303b;
  --slate: #565e5e;
  --slate-dark: #444b4b;
  --blue: #2b36c9;
  --blue-hi: #3d4af0;
  --blue-soft: rgba(61, 74, 240, 0.16);
  --red: #b3261e;
  --red-hi: #e0453a;
  --parchment: #e9e1c1;
  --parchment-dim: #b9b190;
  --gold: #f2c14e;
  --sky: #48a8ff;
  --text: #eeede8;
  --muted: #9da0aa;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bungee', 'Rubik', sans-serif;
  --font-brand: 'Pirata One', 'Rubik', serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

[hidden] { display: none !important; }

a { color: var(--sky); }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 28px 16px 20px;
  background:
    linear-gradient(180deg, rgba(14, 15, 19, 0.55) 0%, rgba(14, 15, 19, 0.82) 60%, var(--bg) 100%),
    url('assets/banner.png') center 40% / cover no-repeat,
    var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--parchment);
  background: #fff;
  box-shadow: 0 0 0 3px var(--red), var(--shadow);
  object-fit: cover;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-family: var(--font-brand);
  font-size: 42px;
  line-height: 1;
  color: var(--parchment);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, 0.6);
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #fff;
  margin-top: 6px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hero-stats {
  max-width: 1280px;
  margin: 14px auto 0;
  color: var(--parchment-dim);
  font-size: 14px;
}

.hero-stats strong { color: var(--parchment); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:hover { background: var(--blue-hi); }

.btn-ghost {
  background: rgba(14, 15, 19, 0.6);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn .icon { width: 16px; height: 16px; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 15, 19, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.toolbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: minmax(200px, 360px) 1fr;
  gap: 10px 12px;
  align-items: center;
}

.toolbar-inner .toolbar-right { justify-content: flex-end; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.search:focus-within { border-color: var(--blue-hi); }

.search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
}

.chips {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.chip:hover { color: var(--text); border-color: var(--muted); }

.chip .count {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.chip[aria-selected="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.chip-fav .icon { width: 15px; height: 15px; }

.chip-fav[aria-pressed="true"] {
  background: rgba(242, 193, 78, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}

.chip-fav[aria-pressed="true"] .icon { fill: var(--gold); }

.toolbar-right { display: flex; gap: 8px; align-items: center; }

.select select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

/* ---------- Main ---------- */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.loading,
.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 16px;
}

.empty img {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--parchment);
  background: #fff;
  filter: grayscale(0.5);
}

.empty strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 4px;
}

.group + .group { margin-top: 36px; }

/* Panel header, modeled on the channel's Twitch panels */
.panel {
  display: flex;
  align-items: stretch;
  min-height: 56px;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.panel-icon {
  position: relative;
  flex: none;
  width: 64px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  overflow: hidden;
}

/* long diagonal shadow behind the icon */
.panel-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 49.5%, rgba(0, 0, 0, 0.32) 50%);
  clip-path: polygon(50% 50%, 100% 50%, 100% 100%, 50% 100%);
  transform: translate(-8%, -8%) scale(1.6);
  transform-origin: 50% 50%;
}

.panel-icon .icon {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  stroke-width: 2.6;
}

.panel-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px;
  background: var(--slate);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.panel-count {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--parchment);
  background: var(--slate-dark);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.panel-sm { min-height: 48px; margin: 0; border-radius: 0; box-shadow: none; }
.panel-sm .panel-icon { width: 52px; }
.panel-sm .panel-icon .icon { width: 26px; height: 26px; padding: 4px; }
.panel-sm .panel-title { font-size: 20px; }

.panel-close {
  align-self: center;
  margin: 0 10px 0 -48px;
  position: relative;
  background: transparent;
  border-color: transparent;
  color: #fff;
}

.panel-close:hover { background: rgba(0, 0, 0, 0.2); border-color: transparent; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #3a3f4d;
  box-shadow: var(--shadow);
}

.card.is-fav { border-color: rgba(242, 193, 78, 0.55); }
.card.is-hidden { opacity: 0.45; }

.card-media {
  position: relative;
  aspect-ratio: 460 / 215;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  font-family: var(--font-display);
  color: var(--slate);
  font-size: 18px;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 15, 19, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 0.15s, color 0.15s;
}

.fav-btn:hover { transform: scale(1.1); }
.fav-btn .icon { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] { color: var(--gold); }
.fav-btn[aria-pressed="true"] .icon { fill: var(--gold); }

.badges {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: calc(100% - 60px);
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(14, 15, 19, 0.8);
  color: var(--parchment);
  backdrop-filter: blur(4px);
}

.badge-custom { background: var(--red); color: #fff; }

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.card-note {
  margin: 0;
  font-size: 13px;
  color: var(--parchment-dim);
}

.card-note::before { content: '» '; color: var(--red-hi); font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: #b9c0ff;
}

.tag.pvp { background: rgba(224, 69, 58, 0.15); color: #ffb0a8; }
.tag.local { background: rgba(72, 168, 255, 0.14); color: #a9d6ff; }

.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.store-link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 34px;
  border-radius: 8px;
  color: #d6d8de;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.logo {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.logo-steam { --logo: url('assets/steam.svg'); }
.logo-epic { --logo: url('assets/epicgames.svg'); }

.store-link.with-label {
  width: auto;
  display: inline-flex;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.store-link.with-label .logo { width: 18px; height: 18px; }
.store-link.steam:hover { background: #1b2838; border-color: #66c0f4; color: #66c0f4; }
.store-link.epic:hover { background: #fff; border-color: #fff; color: #121212; }

.card-tools { margin-left: auto; display: flex; gap: 4px; }

/* ---------- Dialogs ---------- */
.dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden; /* only .dialog-body scrolls */
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog-narrow { width: min(460px, calc(100vw - 32px)); }

.dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); }

.dialog-card { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }

.dialog-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-label small { font-weight: 400; }

.field > input,
.field > select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
}

.field > input:focus,
.field > select:focus { outline: none; border-color: var(--blue-hi); }

.steam-search {
  position: relative; /* anchors the results dropdown */
  padding: 14px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
}

.steam-search .search { background: var(--surface); }

.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.hint:empty { display: none; }
.hint.warn { color: var(--gold); }
.hint.error { color: var(--red-hi); }

.results {
  /* dropdown over the form below, so it never pushes the rest of the modal down */
  position: absolute;
  z-index: 5;
  top: calc(100% - 8px);
  left: 14px;
  right: 14px;
  list-style: none;
  margin: 0;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(340px, 50dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.results:empty,
.results[hidden] { display: none; }

.results-msg { padding: 10px 8px; font-size: 14px; color: var(--muted); }

.result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.result:hover,
.result:focus-visible { background: var(--surface-2); border-color: var(--border); }
.result[aria-busy="true"] { opacity: 0.6; cursor: progress; }

.result img {
  width: 92px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-2);
}

.result span { flex: 1; min-width: 0; font-size: 14px; }
.result .in-list { font-size: 11px; color: var(--gold); flex: none; }

.form-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  align-items: start;
}

.fields { display: flex; flex-direction: column; gap: 14px; }

.preview {
  margin: 0;
  aspect-ratio: 460 / 215;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview figcaption { font-size: 12px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker label { cursor: pointer; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker .chip { font-size: 12px; padding: 4px 10px; }
.tag-picker input:checked + .chip { background: var(--blue-soft); border-color: var(--blue-hi); color: #c9ceff; }
.tag-picker input:focus-visible + .chip { outline: 2px solid var(--sky); outline-offset: 2px; }

.form-error { margin: 0; color: var(--red-hi); font-size: 13px; }
.form-error:empty { display: none; }

.menu-list { gap: 4px; padding: 10px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover { background: var(--surface-2); }
.menu-item > span { flex: 1; display: flex; flex-direction: column; }
.menu-item small { color: var(--muted); font-size: 12px; }
.menu-item.danger .icon,
.menu-item.danger strong { color: var(--red-hi); }

.switch {
  appearance: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  flex: none;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.switch:checked { background: var(--blue-hi); }
.switch:checked::after { transform: translateX(16px); }

/* ---------- Toast & footer ---------- */
.toast {
  position: fixed;
  /* reset the browser's default popover box (centered, bordered) */
  inset: auto;
  margin: 0;
  border: 0;
  overflow: visible;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--parchment);
  color: #1d1a10;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
}

.footer p { margin: 4px auto; max-width: 720px; }

/* ---------- Account ---------- */
.account-slot { display: contents; }

.btn-steam {
  background: linear-gradient(135deg, #1b2838, #2a475e);
  border-color: #66c0f4;
  color: #fff;
}

.btn-steam:hover { background: linear-gradient(135deg, #22344a, #356285); }
.btn-steam .logo { width: 18px; height: 18px; }

.btn-user { padding: 5px 12px 5px 5px; }
.btn-user img { width: 26px; height: 26px; border-radius: 6px; }

.account-card {
  padding: 14px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-card p { margin: 0; font-size: 14px; }
.account-card .hint { margin: 0; }
.account-head { display: flex; align-items: center; gap: 12px; }
.account-head img { width: 48px; height: 48px; border-radius: 8px; }
.account-head div { display: flex; flex-direction: column; }
.account-head a { font-size: 13px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-actions .btn { background: var(--surface-2); }
.btn-danger { color: var(--red-hi); }

.link-btn {
  all: unset;
  margin-top: 8px;
  font-size: 13px;
  color: var(--sky);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 2px; }
.account-actions .btn-danger[data-armed] { border-color: var(--red-hi); }

.chip-owned .icon { width: 15px; height: 15px; }
.chip-owned[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-hi); color: #c9ceff; }

/* ---------- "Quero jogar" and Steam friends ---------- */
.badge-vote { background: #c2410c; color: #fff; }
.badge-vote .icon { fill: currentColor; }

.vote-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.vote-btn .icon { width: 18px; height: 18px; }
.vote-btn:hover { border-color: #f97316; }
.vote-btn[aria-pressed="true"] { background: rgba(194, 65, 12, 0.25); border-color: #f97316; color: #fdba74; }
.vote-btn[aria-pressed="true"] .icon { fill: currentColor; }
.vote-btn:disabled { opacity: 0.6; cursor: progress; }
.vote-box .hint { margin: 0; }

.friend-tag {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(102, 192, 244, 0.18);
  color: var(--sky);
}

.ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: rank; }
.ranking .hint { margin: 4px 0; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.rank-row:hover { border-color: var(--muted); }
.rank-pos { width: 26px; flex: none; text-align: center; font-family: var(--font-display); color: var(--muted); }
.rank-row:nth-child(1) .rank-pos, li:first-child .rank-pos { color: var(--gold); }
.rank-row img, .rank-row .placeholder-thumb { width: 72px; height: 34px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface-2); }
.rank-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-votes { flex: none; display: inline-flex; align-items: center; gap: 4px; color: #fdba74; font-weight: 700; }
.rank-votes .icon { width: 16px; height: 16px; fill: currentColor; }

/* ---------- "Marcar meus jogos" ---------- */
.mine-platforms { display: flex; gap: 6px; flex-wrap: wrap; }
.mine-platforms input { position: absolute; opacity: 0; pointer-events: none; }
.mine-platforms input:checked + .chip { background: var(--blue-soft); border-color: var(--blue-hi); color: #c9ceff; }
.mine-platforms input:focus-visible + .chip { outline: 2px solid var(--sky); outline-offset: 2px; }

.epic-import {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.epic-import[hidden] { display: none; }
.epic-import-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.epic-import-head > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.epic-import-head small { color: var(--muted); font-size: 13px; }
.epic-guide { font-size: 13px; color: var(--muted); }
.epic-guide summary { cursor: pointer; color: var(--sky); font-weight: 600; }
.epic-guide ol { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.epic-guide p { margin: 0; }
.epic-guide code { word-break: break-all; background: var(--surface); padding: 1px 6px; border-radius: 4px; color: var(--text); }
.epic-guide kbd { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 12px; color: var(--text); }
.epic-import .hint { margin: 0; }

.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.mine-item:hover { background: var(--surface-2); }
.mine-item input { width: 18px; height: 18px; accent-color: var(--blue-hi); flex: none; }
.mine-item img, .mine-item .placeholder-thumb { width: 64px; height: 30px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface-2); }
.mine-item .mine-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-item small { flex: none; font-size: 11px; color: var(--muted); }
.mine-item .found { color: #beee11; }
.mine-item.changed { background: rgba(43, 54, 201, 0.15); }
.mine-item input:disabled + img, .mine-item input:disabled ~ .mine-name { opacity: 0.7; }

/* ---------- Channel list (owner) ---------- */
.channel-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
}
.channel-check input { width: 18px; height: 18px; accent-color: var(--blue-hi); flex: none; }
.channel-check span { display: flex; flex-direction: column; }
.channel-check small { color: var(--muted); font-size: 12px; }

.badge-removed { background: var(--red); color: #fff; }

.suggestions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.suggestions .hint { margin: 4px 0; }
.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.suggestion img, .suggestion .placeholder-thumb { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface-2); }
.suggestion-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.suggestion-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-info small { color: var(--muted); font-size: 12px; }
.suggestion .btn { flex: none; }

/* ---------- "Jogar com quem?" ---------- */
.chip-play .icon { width: 15px; height: 15px; }
.chip-play[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-hi); color: #c9ceff; }

.play-intro { margin: 0; font-size: 14px; color: var(--muted); }

.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.people .hint { margin: 4px 0; }

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.person:hover { background: var(--surface-2); }
.person[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-hi); }
.person img, .person .person-avatar { width: 32px; height: 32px; border-radius: 6px; flex: none; background: var(--surface-2); }
.person-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-name small { font-weight: 400; color: var(--muted); }
.person .icon { width: 18px; height: 18px; color: #c9ceff; visibility: hidden; }
.person[aria-pressed="true"] .icon { visibility: visible; }

/* ---------- Card extras ---------- */
.card { cursor: pointer; }

.card-open {
  all: unset;
  cursor: pointer;
  border-radius: 4px;
}

.card-open:hover { text-decoration: underline; text-decoration-color: var(--blue-hi); text-underline-offset: 3px; }
.card-open:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.badge-owned { background: var(--blue); color: #fff; }
.badge-sale { background: #4c6b22; color: #beee11; font-weight: 700; }
.badge-wish { background: #b8336a; color: #fff; }
.badge-wish .icon { fill: currentColor; }
.chip-wish .icon { width: 15px; height: 15px; }
.chip-wish[aria-pressed="true"] { background: rgba(184, 51, 106, 0.25); border-color: #e05a94; color: #ff9cc6; }
.chip-wish[aria-pressed="true"] .icon { fill: currentColor; }
.wish-sale { color: #ff9cc6; }

.chip-sale .icon { width: 15px; height: 15px; }
.chip-sale[aria-pressed="true"] { background: rgba(76, 107, 34, 0.35); border-color: #beee11; color: #beee11; }

.toast-action {
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: transparent;
  color: #1d1a10;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Detail modal ---------- */
.dialog-detail { width: min(780px, calc(100vw - 32px)); }

.dialog-detail .dialog-card { max-height: calc(100dvh - 34px); }

.detail-hero {
  position: relative;
  flex: none;
  aspect-ratio: 460 / 215;
  max-height: 300px;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
  overflow: hidden;
}

.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}

.detail-hero .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--slate);
  text-align: center;
  padding: 16px;
}

.detail-hero .fav-btn { right: 56px; top: 10px; z-index: 1; }
.detail-hero .detail-share { right: 102px; color: #fff; }

.detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 15, 19, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}

.detail-close:hover { background: rgba(14, 15, 19, 0.9); }

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-head { display: flex; flex-direction: column; gap: 8px; }

.detail-cat {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.detail-cat .icon { width: 15px; height: 15px; }

.detail-title { margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.15; font-weight: 700; }
.detail-genres { margin: 0; font-size: 13px; color: var(--muted); }
.detail-desc { margin: 0; color: #cfd0d6; font-size: 14px; }

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.section-title .icon { width: 18px; height: 18px; color: var(--blue-hi); }
.section-count { color: var(--muted); font-family: var(--font-body); font-size: 13px; font-weight: 600; }

/* prices */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.prices > .hint,
.prices > .price-history { grid-column: 1 / -1; margin: 0; }

.price-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.price-card > .logo { width: 30px; height: 30px; color: #d6d8de; }
.price-card.steam:hover { border-color: #66c0f4; background: #172231; }
.price-card.steam:hover > .logo { color: #66c0f4; }
.price-card.epic:hover { border-color: #fff; }
.price-card.on-sale { border-color: rgba(164, 208, 7, 0.55); }

.price-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.store-name { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-size: 20px; font-weight: 700; }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.price-muted { font-size: 14px; color: var(--muted); font-weight: 500; }
.price-low { font-size: 12px; color: var(--parchment-dim); }
.price-low.good { color: #beee11; }

.discount {
  align-self: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #4c6b22;
  color: #beee11;
  font-weight: 700;
  font-size: 15px;
}

.price-history {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.price-history .icon { width: 16px; height: 16px; color: var(--gold); }
.price-history strong { color: var(--gold); }

.price-card.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--surface-2) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ownership */
.own-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
}

.own-login p { margin: 0; font-size: 14px; color: var(--muted); }

.own-toggles { display: flex; gap: 8px; flex-wrap: wrap; }

.own-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.own-toggle .logo,
.own-toggle .icon { width: 18px; height: 18px; }
.own-toggle:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.own-toggle[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.own-toggle:disabled { cursor: default; opacity: 0.9; }

.owners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.owners .hint { grid-column: 1 / -1; margin: 0; }

.owner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 0;
}

.owner-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); text-decoration: none; }
.owner-link:hover .owner-name { text-decoration: underline; }
.owner img,
.owner-avatar { width: 36px; height: 36px; border-radius: 6px; flex: none; background: var(--surface-2); }
.owner-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-name small { color: var(--muted); font-weight: 400; }
.owner-platforms { display: flex; gap: 4px; color: var(--muted); }
.mini-plat { display: inline-grid; place-items: center; }
.mini-plat .logo,
.mini-plat .icon { width: 16px; height: 16px; }

.detail-footer { flex-wrap: wrap; align-items: center; }
.detail-stores { display: flex; gap: 6px; margin-right: auto; }
.detail-footer .btn .icon { width: 16px; height: 16px; }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .hero { padding-top: 20px; }
  .brand-logo { width: 56px; height: 56px; }
  .brand-name { font-size: 32px; }
  .brand-sub { font-size: 11px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn-primary { flex: 1; justify-content: center; }
  .hide-sm { display: none; }
  .toolbar-inner { grid-template-columns: minmax(0, 1fr); }
  .toolbar-inner > * { min-width: 0; }
  .toolbar-inner .toolbar-right { justify-content: flex-start; flex-wrap: wrap; }
  .toolbar-right .select { flex: 1 1 140px; }
  .toolbar-right .select select { width: 100%; }
  .chips {
    grid-row: auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 2px 16px;
  }
  .grid { grid-template-columns: 1fr; }
  .form-grid,
  .two-col { grid-template-columns: 1fr; }
  .preview { max-width: 260px; }
  .panel-icon { width: 52px; }
  .btn-steam span { display: none; }
  .btn-steam { padding: 9px 12px; }
  .detail-body { padding: 4px 16px 16px; }
  .detail-footer { gap: 6px; }
  .detail-stores .with-label { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
