:root {
  --bg0: #0c0714;
  --bg1: #120a1c;
  --bg-bottom: #050308;
  --bg-radial-a: rgba(124, 58, 237, 0.25);
  --bg-radial-b: rgba(56, 189, 248, 0.12);
  --topbar-bg-1: rgba(8, 5, 14, 0.92);
  --topbar-bg-2: rgba(8, 5, 14, 0.55);
  --dock-bg: rgba(10, 8, 18, 0.72);
  --dock-border: rgba(255, 255, 255, 0.12);
  --surface: rgba(255,255,255,0.06);
  --surface2: rgba(255,255,255,0.09);
  --text: #f4f4f8;
  --muted: #a8a3b8;
  --line: rgba(255,255,255,0.1);
  --danger: #f43f5e;
  --success: #22c55e;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --color-scheme: dark;
  --field-bg: rgba(8, 6, 14, 0.72);
  --field-bg-hover: rgba(12, 9, 22, 0.88);
  --field-bg-focus: rgba(14, 10, 24, 0.92);
  --field-border: rgba(255, 255, 255, 0.14);
  --field-border-hover: rgba(255, 255, 255, 0.22);
  --field-focus-ring: rgba(168, 85, 247, 0.32);
  --field-danger-border: rgba(244, 63, 94, 0.55);
  --field-danger-ring: rgba(244, 63, 94, 0.22);
  --field-placeholder: color-mix(in srgb, var(--muted) 62%, transparent);
  --autofill-bg: rgba(8, 6, 14, 0.96);
  --select-option-bg: #140c1f;
  --scrollbar-thumb: rgba(168, 85, 247, 0.55);
  --scrollbar-thumb-hover: rgba(168, 85, 247, 0.72);
  --scrollbar-track: rgba(0, 0, 0, 0.28);
  --scrollbar-thumb: color-mix(in srgb, var(--accent, #a855f7) 60%, transparent);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--accent, #a855f7) 80%, transparent);
  --scrollbar-track: color-mix(in srgb, var(--bg1, #120a1c) 65%, black);
  --mouse-glow-size: 280px;
  --mouse-glow-core: color-mix(in srgb, var(--accent, #a855f7) 16%, transparent);
  --mouse-glow-mid: color-mix(in srgb, var(--accent-dim, #7c3aed) 8%, transparent);
  --mouse-x: -9999px;
  --mouse-y: -9999px;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 20% -10%, var(--bg-radial-a), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, var(--bg-radial-b), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg-bottom) 85%);
  color: var(--text);
  font-family: var(--font);
}

html {
  color-scheme: var(--color-scheme, dark);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }

.mouse-light-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--mouse-glow-size);
  height: var(--mouse-glow-size);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: translate3d(calc(var(--mouse-x) - 50%), calc(var(--mouse-y) - 50%), 0);
  background: radial-gradient(circle, var(--mouse-glow-core) 0%, var(--mouse-glow-mid) 38%, transparent 72%);
  filter: blur(16px);
  transition: opacity 0.2s ease-out;
}

body.mouse-glow-active .mouse-light-trail {
  opacity: 0.31;
}

.pokemon-ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.pokemon-ambience::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(168, 85, 247, 0.12), transparent 22%),
    radial-gradient(circle at 92% 24%, rgba(236, 72, 153, 0.1), transparent 20%),
    radial-gradient(circle at 84% 70%, rgba(56, 189, 248, 0.08), transparent 24%);
  opacity: 0.7;
}

.pokemon-ambience-sprite {
  position: absolute;
  width: clamp(70px, 8vw, 124px);
  opacity: 0;
  transform: translate3d(var(--pokemon-start-x, 0), var(--pokemon-start-y, 0), 0) scale(var(--pokemon-scale, 1));
  filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.62)) blur(0.2px) saturate(1.08);
  mix-blend-mode: screen;
  animation: pokemon-ambience-emerge var(--pokemon-duration, 12s) ease-in-out infinite;
  animation-delay: var(--pokemon-delay, 0s);
}

.pokemon-ambience-sprite--left {
  left: max(18px, 5vw);
  top: 15vh;
  --pokemon-start-x: -42px;
  --pokemon-start-y: -8px;
  --pokemon-end-x: 10px;
  --pokemon-end-y: 8px;
  --pokemon-delay: -2s;
  --pokemon-duration: 13s;
  --pokemon-scale: 0.82;
}

.pokemon-ambience-sprite--right {
  right: max(18px, 6vw);
  top: 18vh;
  --pokemon-start-x: 46px;
  --pokemon-start-y: 0;
  --pokemon-end-x: -12px;
  --pokemon-end-y: 12px;
  --pokemon-delay: 2s;
  --pokemon-duration: 14s;
  --pokemon-scale: 0.9;
}

.pokemon-ambience-sprite--lower-left {
  left: max(28px, 12vw);
  bottom: 15vh;
  --pokemon-start-x: -32px;
  --pokemon-start-y: 34px;
  --pokemon-end-x: 12px;
  --pokemon-end-y: -8px;
  --pokemon-delay: 5s;
  --pokemon-duration: 15s;
  --pokemon-scale: 0.72;
}

.pokemon-ambience-sprite--lower-right {
  right: max(20px, 4vw);
  bottom: 22vh;
  --pokemon-start-x: 40px;
  --pokemon-start-y: 28px;
  --pokemon-end-x: -14px;
  --pokemon-end-y: -10px;
  --pokemon-delay: 8s;
  --pokemon-duration: 16s;
  --pokemon-scale: 0.78;
}

@keyframes pokemon-ambience-emerge {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(var(--pokemon-start-x, 0), var(--pokemon-start-y, 0), 0) scale(var(--pokemon-scale, 1));
  }
  22% {
    opacity: 0.2;
  }
  42% {
    opacity: 0.34;
    transform: translate3d(var(--pokemon-end-x, 0), var(--pokemon-end-y, 0), 0) scale(calc(var(--pokemon-scale, 1) * 1.06));
  }
  62% {
    opacity: 0.12;
  }
  78% {
    opacity: 0;
    transform: translate3d(var(--pokemon-start-x, 0), var(--pokemon-start-y, 0), 0) scale(var(--pokemon-scale, 1));
  }
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .mouse-light-trail {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pokemon-ambience-sprite {
    animation: none;
    opacity: 0.14;
    transform: translate3d(var(--pokemon-end-x, 0), var(--pokemon-end-y, 0), 0) scale(var(--pokemon-scale, 1));
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px calc(12px + env(safe-area-inset-top));
  padding-top: calc(12px + env(safe-area-inset-top));
  background: linear-gradient(180deg, var(--topbar-bg-1), var(--topbar-bg-2));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.guest .topbar { justify-content: center; }
.guest .topbar.topbar-guest { justify-content: space-between; }
.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff, var(--accent, #a855f7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}
.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: min(220px, 58vw);
  display: block;
  object-fit: contain;
}
.topbar-app-start {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-shrink: 0;
}
.topbar-brand {
  flex-shrink: 1;
  min-width: 0;
}
.topbar-brand .brand-logo-img--app {
  height: 32px;
  max-width: min(190px, 50vw);
  object-fit: contain;
}
/* Guest + app logos: comfortable on phones; a bit larger on wide screens */
@media (min-width: 900px) {
  .brand-logo-img {
    height: 52px;
    max-width: min(280px, 32vw);
  }
  .topbar-brand .brand-logo-img--app {
    height: 40px;
    max-width: min(240px, 26vw);
  }
}
.topbar-app .topbar-center { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
.topbar-title {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.95;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Center title duplicates <title> / in-page headings; on phones it collides with the locale control — hide it. */
@media (max-width: 720px) {
  .topbar-app .topbar-center {
    display: none;
  }
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.icon-btn .ui-icon {
  display: block;
  flex-shrink: 0;
}
.icon-btn--with-badge { position: relative; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  background: var(--accent, #a855f7);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.app-notif-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
}
.app-notif-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
body.app-notif-drawer-open {
  overflow: hidden;
}
.app-notif-drawer-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
  transition: background 0.22s ease;
}
.app-notif-drawer.is-open .app-notif-drawer-scrim {
  background: rgba(0, 0, 0, 0.42);
}
.app-notif-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(420px, 100%);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.app-notif-drawer.is-open .app-notif-drawer-panel {
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .app-notif-drawer-panel,
  .app-notif-drawer-scrim {
    transition: none !important;
  }
}
.app-notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px 16px;
  border-bottom: 1px solid var(--line);
}
.app-notif-drawer-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.app-notif-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.app-notif-drawer-close {
  font-size: 1.35rem;
  line-height: 1;
}
.app-notif-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  -webkit-overflow-scrolling: touch;
}
.app-notif-drawer-footer {
  flex-shrink: 0;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.app-notif-drawer-full {
  width: 100%;
  justify-content: center;
  font-size: 0.88rem;
  padding: 10px 14px;
}
.app-notif-drawer-markall {
  font-size: 0.88rem;
  padding: 8px 12px;
  white-space: nowrap;
}
.app-notif-drawer-row {
  display: block;
  margin-bottom: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.app-notif-drawer-row--unread {
  border-color: color-mix(in srgb, var(--accent, #a855f7) 35%, var(--line));
  background: color-mix(in srgb, var(--accent, #a855f7) 6%, var(--surface));
}
.app-notif-drawer-row-title {
  font-size: 0.95rem;
  margin: 0 0 4px;
  line-height: 1.35;
}
.app-notif-drawer-row--unread .app-notif-drawer-row-title {
  font-weight: 700;
}
.app-notif-drawer-row-snippet {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-notif-drawer-row-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.completion-goal-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}
.completion-goal-help-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.78rem;
  font-weight: 800;
}
.completion-help-current {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #a855f7) 35%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent, #a855f7) 8%, var(--surface));
}
.completion-help-drawer .app-notif-drawer-scrim {
  border: 0;
  padding: 0;
}
.completion-help-current h4,
.completion-help-section h4 {
  margin: 0 0 6px;
}
.completion-help-current p,
.completion-help-section p {
  margin: 0;
  line-height: 1.55;
}
.completion-help-section {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.pokemon-set-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.pokemon-set-progress-head-main {
  flex: 1;
  min-width: 0;
}
.pokemon-set-progress-section-toggle {
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 1;
  padding: 8px 10px;
}
.pokemon-set-progress-section-icon {
  display: inline-block;
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}
.pokemon-set-progress-card.is-grid-collapsed .pokemon-set-progress-section-icon {
  transform: rotate(180deg);
}
.pokemon-set-progress-card.is-grid-collapsed .pokemon-set-progress-grid-wrap {
  display: none;
}
.pokemon-set-progress-toolbar {
  margin-top: 12px;
}
.pokemon-set-progress-search {
  width: 100%;
  box-sizing: border-box;
}
.pokemon-set-progress-no-matches {
  margin: 10px 0 0;
}
.pokemon-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.pokemon-set-tile {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.pokemon-set-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pokemon-set-tile-head h4 {
  margin: 0 0 4px;
}
.pokemon-set-tile-head img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.pokemon-set-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
}
.pokemon-set-count strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.pokemon-set-count span,
.pokemon-set-tile-meta {
  font-size: 0.86rem;
}
.pokemon-set-count-unknown strong {
  color: var(--text);
}
.pokemon-set-total-missing {
  margin: 6px 0 0;
  font-size: 0.84rem;
}
.pokemon-set-meter {
  position: relative;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.pokemon-set-meter-planned,
.pokemon-set-meter-owned {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}
.pokemon-set-meter-planned {
  background: rgba(250, 204, 21, 0.32);
}
.pokemon-set-meter-owned {
  min-width: 0;
}
.pokemon-set-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pokemon-set-tile-footer .pokemon-set-tile-meta {
  margin: 0;
}
.pokemon-binder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pokemon-binder-head img {
  max-width: min(180px, 35vw);
  max-height: 80px;
  object-fit: contain;
}
.pokemon-binder-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04), transparent 12%, transparent 88%, rgba(255,255,255,0.04)),
    color-mix(in srgb, var(--surface) 82%, transparent);
}
.pokemon-binder-enter-next {
  animation: pokemonBinderEnterNext 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pokemon-binder-enter-prev {
  animation: pokemonBinderEnterPrev 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pokemon-binder-leave-next {
  animation: pokemonBinderLeaveNext 0.16s ease-in both;
}
.pokemon-binder-leave-prev {
  animation: pokemonBinderLeavePrev 0.16s ease-in both;
}
@keyframes pokemonBinderEnterNext {
  from {
    opacity: 0;
    transform: translateX(42px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes pokemonBinderEnterPrev {
  from {
    opacity: 0;
    transform: translateX(-42px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes pokemonBinderLeaveNext {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0.35;
    transform: translateX(-18px);
  }
}
@keyframes pokemonBinderLeavePrev {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0.35;
    transform: translateX(18px);
  }
}
.pokemon-binder-slot {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.pokemon-binder-slot-art {
  aspect-ratio: 0.72;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.16);
}
.pokemon-binder-card-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-style: preserve-3d;
}
.pokemon-binder-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pokemon-binder-card-back {
  transform: rotateY(180deg);
  background: #12338f;
}
.pokemon-binder-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pokemon-binder-slot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pokemon-binder-slot-art span {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--muted);
}
.pokemon-binder-slot-owned .pokemon-binder-slot-art {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success, #22c55e) 45%, var(--line));
}
.pokemon-binder-slot-wishlist .pokemon-binder-slot-art {
  border-color: rgba(250, 204, 21, 0.45);
}
.pokemon-binder-slot-just-added {
  position: relative;
  z-index: 2;
  animation: pokemonBinderNewCardGlow 1.2s ease-out 1.45s both;
}
.pokemon-binder-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 34%),
    rgba(3, 7, 18, 0.28);
  backdrop-filter: blur(3px);
  animation: pokemonBinderRevealBackdrop 1.55s ease both;
}
.pokemon-binder-reveal-card {
  position: fixed;
  top: 0;
  left: 0;
  width: min(280px, 58vw);
  aspect-ratio: 0.72;
  border-radius: 16px;
  perspective: 1200px;
  transform-origin: top left;
  will-change: transform, opacity;
}
.pokemon-binder-reveal-card .pokemon-binder-card-rotor {
  border-radius: inherit;
  transform: rotateY(180deg);
  transition: transform 0.82s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.pokemon-binder-reveal-card.is-flipped .pokemon-binder-card-rotor {
  transform: rotateY(0deg);
}
.pokemon-binder-reveal-card .pokemon-binder-card-face {
  background: rgba(8, 13, 28, 0.94);
}
.pokemon-binder-reveal-card .pokemon-binder-card-face span {
  font-size: 2rem;
  font-weight: 800;
  color: var(--muted);
}
@keyframes pokemonBinderRevealBackdrop {
  0%, 84% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes pokemonBinderNewCardGlow {
  0% {
    box-shadow: 0 0 0 rgba(96, 165, 250, 0);
  }
  28% {
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34), 0 0 0 2px rgba(255, 255, 255, 0.28);
  }
  100% {
    box-shadow: 0 0 0 rgba(96, 165, 250, 0);
  }
}
.pokemon-binder-slot-missing {
  background: rgba(0, 0, 0, 0.12);
}
.pokemon-binder-slot-missing:not(.pokemon-binder-slot-just-added) .pokemon-binder-slot-art {
  filter: grayscale(1) saturate(0.1);
  opacity: 0.42;
}
.pokemon-binder-slot-missing .pokemon-binder-slot-art img {
  filter: grayscale(1) saturate(0.1);
  opacity: 0.42;
}
.pokemon-binder-slot-missing .pokemon-binder-slot-body {
  opacity: 0.78;
}
.pokemon-binder-slot-missing[data-binder-add-card] {
  cursor: pointer;
}
.pokemon-binder-slot-missing[data-binder-add-card]:hover,
.pokemon-binder-slot-missing[data-binder-add-card]:focus {
  border-color: color-mix(in srgb, var(--accent, #a855f7) 45%, var(--line));
  outline: none;
}
.pokemon-binder-slot-body {
  margin-top: 8px;
  display: grid;
  gap: 2px;
}
.pokemon-binder-slot-body strong {
  font-variant-numeric: tabular-nums;
}
.pokemon-binder-slot-body span {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.25;
}
.pokemon-binder-slot-price {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pokemon-binder-slot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
}
.pokemon-binder-stats-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.pokemon-binder-stats-drawer[hidden] {
  display: none;
}
.pokemon-binder-stats-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}
.pokemon-binder-stats-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100%;
  overflow: auto;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, #000);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.pokemon-binder-stats-drawer.is-open .pokemon-binder-stats-panel {
  transform: translateX(0);
}
body.pokemon-binder-stats-open {
  overflow: hidden;
}
.pokemon-binder-stats-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pokemon-binder-search {
  margin: 0 0 14px;
}
.pokemon-binder-search-input {
  width: 100%;
  box-sizing: border-box;
}
.pokemon-binder-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pokemon-binder-search-filter.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.pokemon-binder-search-no-matches {
  margin: 0 0 14px;
}
.pokemon-binder-pager-search {
  justify-content: center !important;
}
.pokemon-binder-money-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.pokemon-binder-stat-coverage {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--muted);
}
.pokemon-binder-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pokemon-binder-stats-grid .stat-chip {
  min-width: 0;
}
.pokemon-binder-stats-grid .num {
  font-size: clamp(1rem, 4vw, 1.35rem);
  overflow-wrap: anywhere;
}
.pokemon-binder-stats-detail {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}
.pokemon-binder-stats-detail p {
  margin: 8px 0 0;
}
.pokemon-binder-stats-note {
  margin: 14px 0 0;
}
.pokemon-binder-add-dialog .collection-quick-dialog-panel {
  max-width: 560px;
}
.pokemon-binder-add-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.pokemon-binder-add-head img {
  width: 74px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.pokemon-binder-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
@media (max-width: 640px) {
  .pokemon-binder-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }
  .pokemon-binder-slot {
    min-height: 210px;
  }
  .pokemon-binder-stats-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(78vh, 620px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .pokemon-binder-stats-drawer.is-open .pokemon-binder-stats-panel {
    transform: translateY(0);
  }
  .pokemon-binder-add-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pokemon-binder-enter-next,
  .pokemon-binder-enter-prev,
  .pokemon-binder-leave-next,
  .pokemon-binder-leave-prev,
  .pokemon-binder-slot-just-added,
  .pokemon-binder-slot-just-added .pokemon-binder-card-rotor {
    animation: none !important;
  }
}
.notifications-row--unread {
  border-color: color-mix(in srgb, var(--accent, #a855f7) 35%, var(--line));
  background: color-mix(in srgb, var(--accent, #a855f7) 6%, var(--surface));
}
.nav-back { visibility: hidden; pointer-events: none; }
@media (max-width: 720px) {
  .nav-back { visibility: visible; pointer-events: auto; }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 96px;
}
.has-bottom-nav { padding-bottom: 110px; }
.guest-page { padding-top: 32px; }

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.flash-success { border-color: rgba(34, 197, 94, 0.35); }
.flash-error { border-color: rgba(244, 63, 94, 0.45); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent, #a855f7), var(--accent-dim, #7c3aed));
  box-shadow: 0 12px 40px var(--glow, rgba(168,85,247,0.25));
}
.btn-ghost {
  background: transparent;
}
.btn-block { width: 100%; }
.btn-danger { border-color: rgba(244, 63, 94, 0.45); color: #fecdd3; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Trading card item: market chart legend wraps instead of clipping */
.tc-market-chart-root {
  overflow: visible;
  max-width: 100%;
}
.tc-market-chart-root .tc-market-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  max-width: 100%;
}
.tc-market-chart-root .tc-market-chart-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  min-width: 0;
  flex: 1 1 100%;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  text-align: left;
  cursor: default;
  color: inherit;
  font: inherit;
}
.tc-market-chart-root button.tc-market-chart-legend-item {
  cursor: pointer;
}
.tc-market-chart-root button.tc-market-chart-legend-item:hover {
  background: color-mix(in srgb, var(--line) 55%, transparent);
}
.tc-market-chart-root .tc-market-chart-legend-item.is-off {
  opacity: 0.45;
}
.tc-market-chart-root .tc-market-chart-legend-item.is-off .tc-market-chart-legend-swatch {
  background: var(--muted) !important;
}
.tc-market-chart-root .tc-market-chart-legend-swatch {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 3px;
}
.tc-market-chart-root .tc-market-chart-legend-swatch--dash {
  width: 14px;
  height: 2px;
  border-radius: 0;
  margin-top: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--dash-color, #64748b) 0,
    var(--dash-color, #64748b) 5px,
    transparent 5px,
    transparent 9px
  ) !important;
}
.tc-market-chart-root .tc-market-chart-legend-swatch--dot {
  width: 14px;
  height: 2px;
  border-radius: 0;
  margin-top: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--dash-color, #a855f7) 0,
    var(--dash-color, #a855f7) 2px,
    transparent 2px,
    transparent 9px
  ) !important;
}
.tc-market-chart-root .tc-market-chart-legend-hint {
  margin: 0 0 6px;
  flex: 1 1 100%;
  font-size: 0.82rem;
}
.tc-market-chart-root .tc-market-chart-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
}
.badge-chart-ready {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}
@media (min-width: 520px) {
  .tc-market-chart-root .tc-market-chart-legend-item {
    flex: 1 1 min(320px, 100%);
  }
}
.tc-market-chart-root .tc-market-chart-legend-label {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.card + .card { margin-top: 14px; }

.collection-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 720px) {
  .grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Dashboard stat row: five chips (wider breakpoint so five columns fit). */
.dashboard-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) {
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .dashboard-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.stat-chip {
  text-align: center;
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
}
.staff-dash-card {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.stat-chip .num {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.stat-chip small { color: var(--muted); display: block; margin-top: 4px; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.pill.active {
  color: var(--text);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px var(--glow, transparent);
}
button.pill {
  font: inherit;
  cursor: pointer;
  background: var(--surface);
}
button.pill:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: 2px;
}
.stats-tablist {
  row-gap: 8px;
}
.pill.owned-active { border-color: rgba(34, 197, 94, 0.55); color: #bbf7d0; }
.pill.wanted-active { border-color: rgba(234, 179, 8, 0.55); color: #fef08a; }
.pill.played-active { border-color: rgba(56, 189, 248, 0.55); color: #bae6fd; }
.pill.beaten-active { border-color: rgba(52, 211, 153, 0.55); color: #a7f3d0; }

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
}
.toolbar .btn { padding: 10px 12px; font-size: 0.85rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 840px) {
  .form-grid.cols2 { grid-template-columns: 1fr 1fr; }
}

label.field {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="url"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background-color: var(--field-bg);
  color: var(--text);
  font: inherit;
  color-scheme: var(--color-scheme, dark);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Beat OS/native light form styling when theme is dark (and vice versa). */
.app input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]),
.app select,
.app textarea {
  background-color: var(--field-bg);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

/* Dark themes: keep field text and hover readable (guards mixed token sets). */
body.app:not(.theme-light) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]),
body.app:not(.theme-light) select,
body.app:not(.theme-light) textarea {
  background-color: var(--field-bg);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
body.app:not(.theme-light) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(:disabled):hover,
body.app:not(.theme-light) select:not(:disabled):hover,
body.app:not(.theme-light) textarea:not(:disabled):hover {
  background-color: var(--field-bg-hover);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  border-color: var(--field-border-hover);
}
body.app:not(.theme-light) input:focus-visible,
body.app:not(.theme-light) select:focus-visible,
body.app:not(.theme-light) textarea:focus-visible {
  background-color: var(--field-bg-focus);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
body.app:not(.theme-light) select option,
body.app:not(.theme-light) select optgroup {
  background-color: var(--select-option-bg);
  color: var(--text);
}

input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.65);
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
  -webkit-text-fill-color: var(--field-placeholder);
}

input:focus::placeholder,
input:focus-visible::placeholder,
textarea:focus::placeholder,
textarea:focus-visible::placeholder {
  color: color-mix(in srgb, var(--muted) 52%, transparent);
  -webkit-text-fill-color: color-mix(in srgb, var(--muted) 52%, transparent);
}

/* -webkit-text-fill-color on inputs must not bleed into placeholder hints. */
body.app:not(.theme-light) input::placeholder,
body.app:not(.theme-light) textarea::placeholder {
  color: var(--field-placeholder);
  -webkit-text-fill-color: var(--field-placeholder);
}
body.app:not(.theme-light) input:focus::placeholder,
body.app:not(.theme-light) input:focus-visible::placeholder,
body.app:not(.theme-light) textarea:focus::placeholder,
body.app:not(.theme-light) textarea:focus-visible::placeholder {
  color: color-mix(in srgb, var(--muted) 52%, transparent);
  -webkit-text-fill-color: color-mix(in srgb, var(--muted) 52%, transparent);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px var(--field-focus-ring);
  background-color: var(--field-bg-focus);
  color: var(--text);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(:disabled):hover,
select:not(:disabled):hover,
textarea:not(:disabled):hover {
  border-color: var(--field-border-hover);
  background-color: var(--field-bg-hover);
  color: var(--text);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid,
.input-invalid {
  border-color: var(--field-danger-border);
}

input:focus-visible:user-invalid,
select:focus-visible:user-invalid,
textarea:focus-visible:user-invalid,
.input-invalid:focus-visible {
  border-color: rgba(244, 63, 94, 0.72);
  box-shadow: 0 0 0 3px var(--field-danger-ring);
  background-color: var(--field-bg-focus);
  color: var(--text);
}

label.field.field-error {
  color: #fda4af;
}

.field.field-error input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.field.field-error select,
.field.field-error textarea {
  border-color: var(--field-danger-border);
  box-shadow: 0 0 0 3px var(--field-danger-ring);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border: 1px solid var(--field-border);
  box-shadow: 0 0 0 1000px var(--autofill-bg) inset, 0 0 0 3px var(--field-focus-ring);
  transition: background-color 99999s ease-out 0s;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  accent-color: var(--accent, #a855f7);
  cursor: pointer;
  vertical-align: middle;
  color-scheme: var(--color-scheme, dark);
  border: 1px solid var(--field-border);
  background-color: var(--field-bg);
}

textarea {
  min-height: 100px;
  max-height: min(70vh, 520px);
  resize: vertical;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(0, 0, 0, 0.25);
  scrollbar-gutter: stable;
}

select option,
select optgroup {
  background: var(--select-option-bg);
  color: var(--text);
}

input[type="file"] {
  padding: 10px 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin: 8px 0;
}
.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  input,
  select,
  textarea,
  .btn,
  .icon-btn,
  .pill,
  input[type="file"]::file-selector-button {
    transition: none !important;
  }
}

.hero {
  padding: 28px 0 12px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.05;
  margin: 0 0 12px;
}
.hero p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.screenshot-placeholder {
  margin: 28px auto 0;
  max-width: 360px;
  aspect-ratio: 9/19;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(168,85,247,0.25), rgba(0,0,0,0.25)),
    radial-gradient(120px 80px at 30% 20%, rgba(255,255,255,0.12), transparent 65%);
  box-shadow: var(--shadow);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
}
@media (min-width: 768px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-grid .card h3 { margin: 0 0 8px; font-size: 1rem; }
.feature-grid .card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* ——— Public pricing (plan comparison) ——— */
.pricing-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.pricing-hero {
  text-align: left;
  padding-top: 8px;
}
.pricing-hero h1 {
  text-align: left;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.pricing-hero p {
  margin-left: 0;
  margin-right: 0;
  max-width: 42em;
  line-height: 1.55;
}
.pricing-collect-strip {
  margin: 22px 0 6px;
}
.pricing-collect-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 14px 20px;
}
.pricing-collect-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}
.pricing-collect-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--line) 85%, rgba(255, 255, 255, 0.08));
  color: color-mix(in srgb, var(--muted) 50%, rgba(255, 255, 255, 0.9));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.pricing-collect-svg {
  display: block;
}
.pricing-collect-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  max-width: 76px;
  line-height: 1.25;
}
@media (max-width: 420px) {
  .pricing-collect-list {
    justify-content: center;
  }
}
.pricing-empty-card {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 20px 18px;
  text-align: center;
}
.pricing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 12px;
  align-items: stretch;
}
/* Single plan: same left edge as hero & icon strip; cap width for readability */
.pricing-grid:has(.pricing-card:only-child) {
  max-width: min(460px, 100%);
  margin-inline: 0;
  justify-items: stretch;
}
@media (min-width: 720px) {
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
/* Settings billing: let a single plan use full content width */
.settings-billing-plans .pricing-grid:has(.pricing-card:only-child) {
  max-width: none;
}
.settings-billing-plans .pricing-grid {
  margin-top: 0;
}
.pricing-card.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 20px 20px;
  border-radius: calc(var(--radius) + 2px);
  border-color: color-mix(in srgb, var(--line) 88%, rgba(255, 255, 255, 0.14));
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 56px -32px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.pricing-card.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(100% 70% at 50% -10%, color-mix(in srgb, var(--accent, #6366f1) 18%, transparent), transparent 58%);
  pointer-events: none;
  opacity: 0.55;
}
.pricing-card.card > * {
  position: relative;
  z-index: 1;
}
.pricing-card-head {
  margin-bottom: 2px;
}
.pricing-card-badge {
  margin: 0 0 8px;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.95);
  background: color-mix(in srgb, var(--accent, #6366f1) 38%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
}
.pricing-card--current.card {
  border-color: color-mix(in srgb, var(--accent, #6366f1) 50%, var(--line));
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 56px -32px rgba(0, 0, 0, 0.55),
    0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}
.pricing-card-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.pricing-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.pricing-card-price-block {
  margin: 18px 0 4px;
  padding: 14px 0 16px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.pricing-price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.pricing-price-amount {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pricing-price-suffix {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.pricing-feature-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  flex: 1 1 auto;
}
.pricing-feature-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0 0;
  font-size: 0.94rem;
  line-height: 1.45;
}
.pricing-feature-row:first-child {
  margin-top: 0;
}
.pricing-feature-row--plan-start {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.pricing-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: color-mix(in srgb, var(--success, #22c55e) 92%, #ecfdf5);
  background: color-mix(in srgb, var(--success, #22c55e) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--success, #22c55e) 48%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.pricing-check-svg {
  display: block;
  width: 15px;
  height: 15px;
}
.pricing-check-path {
  vector-effect: non-scaling-stroke;
}
.pricing-feature-text {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
}
.pricing-feature-lead {
  display: block;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.98);
}
.pricing-feature-detail {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
}
.pricing-card-footer {
  margin-top: 22px;
  padding-top: 2px;
}
.pricing-card-footer .btn-primary.btn-block {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ——— Landing (marketing home) ——— */
.landing-hero {
  text-align: left;
  padding-bottom: 8px;
}
.landing-hero h1 {
  text-align: left;
  max-width: 16ch;
}
.landing-hero-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 900px) {
  .landing-hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 380px);
    gap: 40px;
  }
}
.landing-hero-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.landing-hero-lead {
  color: var(--muted);
  max-width: 38em;
  margin: 0 0 8px;
  line-height: 1.55;
  font-size: 1.05rem;
}
.landing-hero-ctas {
  justify-content: flex-start;
  margin-top: 18px;
}
.landing-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (min-width: 900px) {
  .landing-hero-visual {
    justify-content: flex-end;
  }
}
.landing-hero-img {
  max-width: min(100%, 320px);
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.55));
}

.landing-covers {
  margin-top: 36px;
}
.landing-covers-intro {
  text-align: center;
  margin-bottom: 20px;
}
.landing-covers-head {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.landing-covers-rule {
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.landing-covers-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 244, 248, 0.92);
  white-space: nowrap;
}
.landing-covers-sub {
  margin: 12px auto 0;
  max-width: 520px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.landing-covers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .landing-covers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}
.landing-cover-card {
  margin: 0;
}
.landing-cover-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.landing-cover-blur {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 145%;
  height: 145%;
  transform: translate(-50%, -50%) scale(1.06);
  object-fit: cover;
  filter: blur(28px) saturate(1.3);
  opacity: 0.78;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .landing-cover-blur {
    filter: blur(12px) saturate(1.1);
    opacity: 0.55;
  }
}
.landing-cover-front {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.landing-covers--games .landing-covers-grid {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.landing-section-title {
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  font-weight: 800;
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.landing-steps {
  margin-top: 42px;
}
.landing-steps-grid {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) {
  .landing-steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
.landing-step {
  position: relative;
  padding-top: 8px;
  padding-left: 8px;
}
.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ede9fe;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(124, 58, 237, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.landing-step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}
.landing-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.landing-showcase {
  margin-top: 48px;
}
.landing-showcase-intro {
  max-width: 640px;
  margin: 0 auto 22px;
  text-align: center;
}
.landing-showcase-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.landing-showcase-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 840px) {
  .landing-showcase-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
.landing-showcase-figure {
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
}
.landing-showcase-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.landing-showcase-figure figcaption {
  padding: 12px 14px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}

.landing-features {
  margin-top: 40px;
}
.landing-feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.landing-feature-visual {
  margin-bottom: 10px;
}
.landing-feature-visual img {
  display: block;
  width: 96px;
  height: auto;
}

.landing-categories {
  margin-top: 44px;
  text-align: center;
}
.landing-categories-lead {
  margin: 0 auto 18px;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.landing-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.landing-category-list li {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.landing-category-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
.landing-category-link:hover,
.landing-category-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
.category-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
}
.category-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.category-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 28px;
}
.category-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}
.category-kpi-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.category-kpi-value {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 700;
}
.category-section {
  margin-top: 24px;
}
.category-section h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.category-list {
  margin: 0;
  padding-left: 18px;
}
.category-list li {
  margin: 0 0 7px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .category-kpis {
    grid-template-columns: 1fr;
  }
}

.landing-bottom-cta {
  margin-top: 44px;
  text-align: center;
  padding: 22px 18px 24px;
}
.landing-bottom-cta-title {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
}
.landing-bottom-cta-text {
  margin: 0 auto 16px;
  max-width: 460px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.landing-bottom-cta-btns {
  justify-content: center;
  margin-top: 0;
}

.collection-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.collection-list .row:last-child { border-bottom: 0; }

/* Dashboard recent activity: hidden until user toggles (reinforce [hidden] vs .card). */
.dashboard-activity-card[hidden] {
  display: none !important;
}
#dashboard-activity:not([hidden]) { scroll-margin-top: 84px; }

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-row:last-child { border-bottom: 0; }
.activity-body { min-width: 0; flex: 1; }
.activity-body strong { font-size: 0.95rem; }
.activity-body a { text-decoration: none; }
.activity-body a:hover { text-decoration: underline; }
.activity-when {
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.link-back {
  font-weight: 600;
}

.shared-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shared-reactions-row.is-busy {
  pointer-events: none;
  opacity: 0.72;
}
.shared-reaction-form {
  margin: 0;
}
.shared-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
.shared-reaction-btn strong {
  font-size: 0.8rem;
  color: var(--muted);
}
.shared-reaction-btn.is-active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.12);
}
.shared-reaction-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.shared-reaction-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.collectors-self-row td {
  background: rgba(168, 85, 247, 0.12);
}

.meta { color: var(--muted); font-size: 0.85rem; }

.item-list { display: flex; flex-direction: column; gap: 12px; }
.item-list[hidden],
.item-grid[hidden],
.collection-binder-grid[hidden] {
  display: none !important;
}
.item-category-section[hidden] {
  display: none !important;
}
.item-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}
.item-row-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.item-row-link:hover h3 {
  text-decoration: underline;
}
.item-row-link:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: 2px;
  border-radius: 10px;
}
.item-row .thumb {
  position: relative;
  width: 56px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}
.item-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-row .thumb .item-cover-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.item-row .thumb .item-cover-tilt img {
  pointer-events: none;
  user-select: none;
}
.cover-beaten-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #34d399, #059669);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  line-height: 1;
}
.cover-beaten-icon-char {
  font-size: 12px;
  font-weight: 800;
}
.item-row h3 { margin: 0 0 4px; font-size: 1rem; }
.item-row .sub { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-right: 6px;
  margin-top: 4px;
}
.badge-owned { color: #bbf7d0; border-color: rgba(34, 197, 94, 0.35); }
.badge-wish { color: #fef08a; border-color: rgba(234, 179, 8, 0.35); }
.badge-cib { color: #bae6fd; border-color: rgba(56, 189, 248, 0.35); }
.stars { color: #facc15; letter-spacing: 2px; font-size: 0.9rem; }
.rating-note { color: var(--muted); font-size: 0.8rem; margin-left: 6px; }
.collectors-rank-delta { display:inline-block; font-size:0.78rem; color:var(--muted); margin-left:6px; }
.collectors-rank-delta.up { color:#86efac; }
.collectors-rank-delta.down { color:#fda4af; }
.chev { color: var(--muted); padding-left: 6px; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 560px) {
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tile {
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(0,0,0,0.22);
}
.tile .cover {
  aspect-ratio: 3/4;
  background: rgba(255,255,255,0.06);
}
.tile .cover img { width: 100%; height: 100%; object-fit: cover; }
.tile .ti { padding: 10px 10px 12px; }
.tile .ti h3 { margin: 0 0 4px; font-size: 0.95rem; line-height: 1.2; }
.tile .ti .sub { color: var(--muted); font-size: 0.78rem; }
.tile-foot {
  display: block;
  text-decoration: none;
  color: inherit;
}
.tile-foot:hover .ti h3 {
  text-decoration: underline;
}
.tile-foot:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: -2px;
}

.collection-binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035), transparent 10%, transparent 90%, rgba(255,255,255,0.035)),
    color-mix(in srgb, var(--surface) 82%, transparent);
}
.collection-binder-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  gap: 9px;
  padding: 9px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.collection-binder-card:hover,
.collection-binder-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #a855f7) 45%, var(--line));
  background: color-mix(in srgb, var(--accent, #a855f7) 7%, rgba(0, 0, 0, 0.18));
}
.collection-binder-art {
  aspect-ratio: 0.72;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,0.06);
}
.collection-binder-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collection-binder-art > span {
  font-size: 2rem;
  font-weight: 800;
  color: var(--muted);
}
.collection-binder-info {
  display: grid;
  gap: 5px;
}
.collection-binder-info h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.25;
}
.collection-binder-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .collection-binder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }
  .collection-binder-card {
    min-height: 226px;
  }
}

.filters {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.25);
  margin: 12px 0;
}
.filters summary { cursor: pointer; font-weight: 700; }
.filters .filters-advanced {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
}
.filters .filters-advanced > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.filters .filters-advanced > summary::-webkit-details-marker {
  display: none;
}
.filters .filters-advanced[open] > summary {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.filters .filters-advanced > .form-grid {
  padding: 0 12px 4px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 520px) {
  .detail-hero { grid-template-columns: 1fr; }
}
.poster {
  width: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
}
.poster img { width: 100%; display: block; }

/* Item view: tilt + zoom (hero + gallery) — see assets/js/item-cover-interactive.js */
.item-cover-stage {
  position: relative;
  perspective: 1000px;
  cursor: zoom-in;
  touch-action: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.item-cover-stage:focus-visible {
  box-shadow: 0 0 0 2px var(--accent, #a855f7);
  border-radius: inherit;
}
.item-cover-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  will-change: transform;
}
.poster .item-cover-stage {
  width: 100%;
  display: block;
}
.poster .item-cover-tilt img {
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}
.tile .cover.item-cover-wrap {
  position: relative;
}
.tile .cover.item-cover-wrap .cover-beaten-icon {
  bottom: 6px;
  right: 6px;
}
.tile .cover .item-cover-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tile .cover .item-cover-tilt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

/* Full-viewport overlay: do NOT use flex row on root (would place backdrop × img in one row). */
.item-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: block;
  box-sizing: border-box;
  margin: 0;
  isolation: isolate;
}
.item-photo-lightbox[hidden] {
  display: none !important;
}
.item-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.item-photo-lightbox--open .item-photo-lightbox-backdrop {
  opacity: 1;
}

.item-photo-lightbox-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(96px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  box-sizing: border-box;
  pointer-events: none;
  perspective: 1400px;
}
.item-photo-lightbox-frame img {
  max-width: min(94vw, 1200px);
  max-height: min(82vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transform: scale(0.82) translateY(28px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease-out,
    filter 0.38s ease-out;
  filter: blur(4px);
  transform-origin: center center;
  will-change: transform, opacity;
}
@media (max-width: 640px) {
  .item-photo-lightbox-frame img {
    max-width: min(98vw, 1200px);
    max-height: min(92vh, 900px);
  }
}
@supports (height: 100dvh) {
  @media (max-width: 640px) {
    .item-photo-lightbox-frame img {
      max-height: min(90dvh, 900px);
    }
  }
}
.item-photo-lightbox--open .item-photo-lightbox-frame img {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0);
}

.item-photo-lightbox-close {
  position: absolute;
  z-index: 2;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 18, 30, 0.85);
  color: #f8fafc;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.28s ease-out 0.08s,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}
.item-photo-lightbox--open .item-photo-lightbox-close {
  opacity: 1;
  transform: scale(1);
}
.item-photo-lightbox-close:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .item-photo-lightbox-backdrop,
  .item-photo-lightbox-frame img,
  .item-photo-lightbox-close {
    transition: none !important;
  }
  .item-photo-lightbox:not([hidden]) .item-photo-lightbox-backdrop {
    opacity: 1 !important;
  }
  .item-photo-lightbox:not([hidden]) .item-photo-lightbox-frame img {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    will-change: auto;
  }
  .item-photo-lightbox:not([hidden]) .item-photo-lightbox-close {
    opacity: 1 !important;
    transform: none !important;
  }
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1fr 1fr 64px 1fr 1fr;
  gap: 6px;
  align-items: center;
  padding: 10px;
  border-radius: 22px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
}
.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 6px 4px;
  border-radius: 14px;
}
.bottom-link .bi { font-size: 1rem; opacity: 0.9; }
.bottom-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}
.bottom-fab {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}
button.bottom-fab {
  color: inherit;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}
.bottom-fab.active-fab {
  box-shadow: 0 0 0 2px var(--accent, rgba(168,85,247,0.7)), 0 18px 40px rgba(0,0,0,0.45);
}
.bottom-fab.bottom-fab--blocked {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
.btn.btn--blocked-add {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}

.onboarding-spotlight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.52);
  pointer-events: none;
}
.onboarding-spotlight-target {
  position: relative;
  z-index: 10001;
  /* Read as “full brightness” vs dimmed chrome; pulse draws the eye without shouting */
  filter: brightness(1.08) saturate(1.06);
  box-shadow:
    0 0 0 3px rgba(192, 132, 252, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(168, 85, 247, 0.45);
  animation: onboarding-spotlight-pulse 2.4s ease-in-out infinite;
}
@keyframes onboarding-spotlight-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(192, 132, 252, 0.9),
      0 0 0 1px rgba(0, 0, 0, 0.2),
      0 12px 32px rgba(0, 0, 0, 0.4),
      0 0 22px rgba(168, 85, 247, 0.38);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(216, 180, 254, 0.98),
      0 0 0 1px rgba(0, 0, 0, 0.12),
      0 16px 40px rgba(0, 0, 0, 0.48),
      0 0 36px rgba(192, 132, 252, 0.62);
  }
}
@media (prefers-reduced-motion: reduce) {
  .onboarding-spotlight-target {
    animation: none;
    filter: brightness(1.06) saturate(1.04);
    box-shadow:
      0 0 0 3px rgba(192, 132, 252, 0.95),
      0 0 0 1px rgba(0, 0, 0, 0.2),
      0 14px 36px rgba(0, 0, 0, 0.45),
      0 0 30px rgba(168, 85, 247, 0.5);
  }
}
.onboarding-spotlight-tip {
  position: fixed;
  z-index: 10002;
  box-sizing: border-box;
  max-width: min(420px, calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  /* JS refines max-height per layout; fallback keeps very small viewports scrollable */
  max-height: min(420px, calc(100dvh - 9rem));
  padding: 16px max(18px, calc(10px + env(safe-area-inset-right, 0px))) 16px max(18px, calc(10px + env(safe-area-inset-left, 0px)));
  border-radius: 16px;
  background: #1a1428;
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  color: #ece8f4;
  font-family: Segoe UI, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  pointer-events: auto;
}
.onboarding-spotlight-tip-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #f8f5ff;
}
.onboarding-spotlight-tip-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #c9c0dc;
}
.onboarding-type-line {
  vertical-align: baseline;
}
.onboarding-type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(192, 132, 252, 0.95);
  animation: onboarding-cursor-blink 0.78s step-end infinite;
}
@keyframes onboarding-cursor-blink {
  50% {
    opacity: 0.15;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 700; font-size: 0.78rem; }

.help { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

.hr { height: 1px; background: var(--line); border: 0; margin: 16px 0; }

.topbar-guest {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-guest-start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  min-width: 0;
}
.topbar-guest-browse {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-guest-browse:hover {
  color: var(--accent, #a855f7);
}
/* ——— Public collector profile (banner + social) ——— */
.collector-public {
  max-width: 720px;
  margin: 0 auto;
}
.collector-public-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.collector-public-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.collector-public-hero-bg--fallback {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(56, 189, 248, 0.2));
}
.collector-public-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 3, 12, 0.94) 0%,
    rgba(5, 3, 12, 0.55) 42%,
    rgba(5, 3, 12, 0.25) 100%
  );
  pointer-events: none;
}
.collector-public-hero-inner {
  position: relative;
  z-index: 1;
  padding: 22px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
@media (min-width: 560px) {
  .collector-public-hero-inner {
    flex-direction: row;
    align-items: flex-end;
    text-align: left;
    gap: 18px;
  }
}
.collector-public-avatar-wrap {
  flex-shrink: 0;
}
.collector-public-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: block;
  background: var(--surface2);
}
.collector-public-avatar--placeholder {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.collector-public-hero-text {
  flex: 1;
  min-width: 0;
}
.collector-public-name {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #f8fafc;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}
.collector-public-handle {
  margin: 4px 0 0;
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.95rem;
}
.collector-public-bio {
  margin: 10px 0 0;
  color: rgba(248, 250, 252, 0.88);
  line-height: 1.45;
  font-size: 0.92rem;
  max-height: min(42vh, 15rem);
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-right: 6px;
}
.collector-public-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 14px;
  justify-content: center;
}
@media (min-width: 560px) {
  .collector-public-stats {
    justify-content: flex-start;
  }
}
.collector-public-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}
.collector-public-stats strong {
  font-size: 1.15rem;
  color: #fff;
}
.collector-public-stats span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(248, 250, 252, 0.65);
}
.collector-public-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
@media (min-width: 560px) {
  .collector-public-actions {
    justify-content: flex-start;
  }
}
.collector-public-inline-form {
  display: inline;
}
.collector-public-login-hint {
  color: rgba(248, 250, 252, 0.85) !important;
  margin-top: 12px !important;
}
.collector-public-more {
  margin-left: 0;
}
.collector-public-more summary {
  list-style: none;
  cursor: pointer;
}
.collector-public-more summary::-webkit-details-marker {
  display: none;
}
.collector-public-more-panel {
  margin-top: 10px;
  padding: 12px;
  text-align: left;
}
.collector-public-section-title {
  margin: 16px 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.collector-public-wishlist {
  margin-top: 22px;
}
.collector-public-wishlist-disclosure > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0 10px;
}
.collector-public-wishlist-disclosure > summary::-webkit-details-marker {
  display: none;
}
.collector-public-wishlist-summary-title {
  margin: 0;
}
.collector-public-wishlist-summary-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-bottom: 0.2em;
  transition: transform 0.2s ease;
}
.collector-public-wishlist-disclosure[open] .collector-public-wishlist-summary-chevron {
  transform: rotate(-135deg);
  margin-bottom: 0;
  margin-top: 0.15em;
}
@media (prefers-reduced-motion: reduce) {
  .collector-public-wishlist-summary-chevron {
    transition: none;
  }
}
.collector-public-wishlist-disclosure-body {
  padding-top: 2px;
}
.collector-public-wishlist .collector-public-wish-thumb,
.collector-public-wishlist .collector-public-wish-thumb--empty {
  width: 96px;
  height: 96px;
}
.collector-public-wishlist .collector-public-wish-thumb {
  object-fit: contain;
}
.collector-public-wishlist-intro {
  margin: 0 0 14px;
  line-height: 1.45;
}
.collector-public-wishlist-subh {
  margin: 16px 0 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.collector-public-wishlist-subh:first-of-type {
  margin-top: 4px;
}
.collector-public-wishlist-grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .collector-public-wishlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .collector-public-wishlist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.collector-public-wish-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.collector-public-wish-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}
.collector-public-wish-thumb--empty {
  border: 1px dashed var(--line);
}
.wishlist-share-page .collector-public-wish-thumb,
.wishlist-share-page .collector-public-wish-thumb--empty {
  width: 112px;
  height: 112px;
}
.wishlist-share-page .collector-public-wish-thumb {
  object-fit: contain;
  background: var(--surface2);
}
.wishlist-share-page img.collector-public-wish-thumb[src] {
  cursor: zoom-in;
}
.wishlist-share-page img.collector-public-wish-thumb[src]:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: 2px;
}

.collector-public-wish-body {
  min-width: 0;
  flex: 1;
}
.collector-public-wish-title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}

/* Public collectors directory — responsive profile cards */
.browse-collectors-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.browse-collectors-count-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.browse-collectors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 520px) {
  .browse-collectors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .browse-collectors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}
.browse-collector-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, var(--surface) 48%);
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
.browse-collector-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 1;
}
.browse-collector-card > * {
  position: relative;
  z-index: 2;
}
.browse-collector-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .browse-collector-card {
    transition: none;
  }
  .browse-collector-card:hover {
    transform: none;
  }
}
.browse-collector-card-top {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  outline: none;
}
.browse-collector-card-banner {
  height: 108px;
  background-size: cover;
  background-position: center;
  background-color: rgba(124, 58, 237, 0.2);
}
.browse-collector-card-banner--fallback {
  background: linear-gradient(125deg, rgba(124, 58, 237, 0.45), rgba(56, 189, 248, 0.2));
}
.browse-collector-card-avatar-ring {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 42%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(168, 85, 247, 0.35));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.browse-collector-card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface2);
  border: 2px solid rgba(12, 10, 20, 0.95);
}
.browse-collector-card-avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  opacity: 0.85;
  border: 2px solid rgba(12, 10, 20, 0.95);
}
.browse-collector-card-body {
  padding: 52px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.browse-collector-card-name {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  margin: 0;
}
.browse-collector-card-name:hover {
  color: var(--accent);
}
.browse-collector-card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: -2px;
}
.browse-collector-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}
.browse-collector-chip {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.browse-collector-card-bio {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.browse-collector-card-actions {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.browse-collector-card-follow {
  display: inline;
  margin: 0;
}
.browse-collector-card-follow button {
  margin: 0;
}
.browse-collector-card-badge {
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fde68a;
  background: rgba(234, 179, 8, 0.12);
}
.browse-collector-card-muted {
  font-size: 0.78rem !important;
  text-align: center;
  width: 100%;
}

.browse-collector-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.browse-collector-row:last-child {
  border-bottom: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.locale-switch { margin: 0; }
.locale-switch-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.locale-switch-label span:first-child { display: none; }
@media (min-width: 400px) {
  .locale-switch-label span:first-child { display: inline; }
}
.locale-select {
  appearance: none;
  background-color: var(--field-bg);
  border: 1px solid var(--field-border);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 28px 6px 10px;
  font-size: 0.78rem;
  max-width: 140px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.locale-switch-compact .locale-select { max-width: 120px; padding-right: 24px; }

/* Global staff-edited announcement (below topbar) */
.site-banner {
  width: 100%;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(56, 189, 248, 0.12));
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.site-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
}
@media (min-width: 960px) {
  .site-banner-inner { padding-left: 24px; padding-right: 24px; }
}

/* PWA install prompt (fixed above safe area; lifted on app shell with bottom nav) */
.pwa-install-banner {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  margin-inline: auto;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 20px));
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--dock-bg, rgba(14, 9, 22, 0.96));
  border: 1px solid var(--dock-border, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
body.app:not(.guest) .pwa-install-banner {
  bottom: calc(108px + env(safe-area-inset-bottom));
}
.pwa-install-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.pwa-install-banner-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
  text-align: center;
}
.pwa-install-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.pwa-install-banner .btn-sm {
  font-size: 0.82rem;
  padding: 8px 14px;
}

/* ——— Admin app shell (sidebar + sections) ——— */
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.admin-masthead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-top));
  padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(8,5,14,0.96), rgba(8,5,14,0.88));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 25;
}
.admin-masthead-brand {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 0;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(14, 9, 22, 0.98), rgba(8, 5, 14, 0.99));
  border-right: 1px solid var(--line);
  z-index: 40;
}
.admin-sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.admin-sidebar-brand-link {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #fff, var(--accent, #a855f7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-sidebar-brand-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 12px 10px;
  overflow-y: auto;
}
.admin-sidebar-footer {
  flex-shrink: 0;
  padding: 12px 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.admin-sidebar-footer .admin-nav-group {
  margin-bottom: 0;
}
.admin-nav-group {
  margin-bottom: 18px;
}
.admin-nav-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px 8px;
  opacity: 0.9;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.admin-nav-item:hover {
  background: var(--surface);
  border-color: var(--line);
}
.admin-nav-item.is-active {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #fff;
}
.admin-nav-item-muted {
  color: var(--muted);
  font-weight: 500;
}
.admin-nav-item-muted:hover {
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.25);
}
.admin-sidebar-backdrop {
  display: none;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}
.admin-main-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.admin-page-head {
  margin-bottom: 24px;
}
.admin-page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.admin-page-head .help {
  margin: 0;
  max-width: 52rem;
  line-height: 1.55;
}

.admin-community-subnav {
  margin: 0 0 22px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.admin-community-subnav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-community-subnav-row--secondary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-community-subnav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.admin-community-subnav-link:hover {
  background: var(--surface);
  border-color: rgba(168, 85, 247, 0.35);
  color: #fff;
}
.admin-community-subnav-link.is-active {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.45);
  color: #fff;
}
.admin-community-subnav-sublink {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.admin-community-subnav-sublink:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}
.admin-community-anchor {
  scroll-margin-top: 1rem;
}
.admin-community-anchor + .admin-community-anchor {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.admin-community-anchor-heading {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

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

/** Bot trap for cheat/login POST; keep off-screen inside positioned form */
.cheat-add-form,
.auth-form-protected,
#community-post-form {
  position: relative;
}
.cheat-add-form .cheat-honeypot,
.auth-form-protected .auth-honeypot,
#community-post-form .community-post-honeypot {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.admin-section {
  margin-bottom: 28px;
}
.admin-section:last-child {
  margin-bottom: 0;
}
.admin-section-head {
  margin-bottom: 12px;
}
.admin-section-head h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.admin-section-head .help {
  margin: 0;
  font-size: 0.82rem;
}
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.admin-panel + .admin-panel {
  margin-top: 14px;
}
.admin-panel-tight {
  padding: 14px 16px;
}
.admin-panel .filters {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.admin-cron-copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.admin-cron-copy-input {
  flex: 1 1 240px;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}
.admin-cron-steps li {
  margin-bottom: 6px;
}
.admin-cron-mode-fieldset legend {
  padding: 0;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.admin-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.admin-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.admin-tile:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.08);
  transform: translateY(-1px);
}
.admin-tile-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.admin-tile-meta {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}
.admin-table-wrap .table {
  min-width: 560px;
}

.admin-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-pill-ok {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.admin-pill-warn {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.admin-code-inline {
  display: inline-block;
  max-width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--muted);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.admin-toolbar-grow {
  flex: 1 1 200px;
  min-width: 0;
}
.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-user-actions {
  min-width: 220px;
}
.admin-trophy-reset-details {
  margin-top: 8px;
}
.admin-trophy-reset-details > summary {
  cursor: pointer;
  list-style: none;
}
.admin-trophy-reset-details > summary::-webkit-details-marker {
  display: none;
}
.admin-trophy-reset-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
}
.admin-trophy-reset-submit:not(:disabled) {
  color: var(--danger, #c62828);
  border-color: color-mix(in srgb, var(--danger, #c62828) 35%, transparent);
}

/* Cheat sequences: curated SVG icons only (stored as JSON IDs) */
.cheat-vis-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.cheat-vis-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--line);
}
.cheat-vis-slot svg {
  display: block;
  color: var(--text);
}
.cheat-visual-picker .btn.cheat-vis-add {
  padding: 6px 8px;
}
.cheat-visual-picker .cheat-vis-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cheat-visual-picker .cheat-vis-add svg {
  display: block;
}
.cheat-vis-preview-chip {
  font-size: 0.75rem;
}
.admin-input-compact {
  width: 140px;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  .admin-input-compact {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
.btn-compact {
  font-size: 0.78rem;
  padding: 8px 12px;
}
.admin-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
}
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-btn-danger {
  color: #fca5a5 !important;
}
.admin-btn-danger:hover {
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
}

@media (max-width: 899px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 100vw - 48px);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .admin-layout.is-sidebar-open .admin-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .admin-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .admin-layout.is-sidebar-open .admin-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 900px) {
  .admin-masthead {
    display: none !important;
  }
  .admin-layout {
    flex-direction: row;
    align-items: stretch;
  }
  .admin-sidebar {
    position: relative;
    order: -1;
    width: 268px;
    flex: 0 0 268px;
    transform: none !important;
    box-shadow: none;
    min-height: 100vh;
  }
  .admin-main {
    flex: 1;
    min-width: 0;
    padding: 28px 28px 40px;
  }
  .admin-sidebar-backdrop {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .admin-table .table th,
  .admin-table .table td {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

/* Catalog lookup first on add / edit item */
.item-catalog-lookup-top {
  margin-bottom: 4px;
}
.item-catalog-lookup-top .item-catalog-panel-wrap:not([hidden]) + .item-catalog-panel-wrap:not([hidden]) {
  margin-top: 12px;
}
.item-catalog-lookup-top .catalog-setup-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

/* Game catalog lookup (add / edit item) */
.catalog-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.2);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
}
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.catalog-toolbar .catalog-query {
  flex: 1 1 180px;
  min-width: 0;
}
.catalog-scan-card-btn {
  flex: 0 0 auto;
  padding: 8px 10px;
  line-height: 0;
}
.catalog-scan-card-icon {
  display: block;
}
.tc-card-scan-dialog .tc-card-scan-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.catalog-platform-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.catalog-platform-label {
  margin-bottom: 0;
  font-size: 0.78rem;
}
.catalog-platform-select {
  max-width: 100%;
  width: 100%;
}
@media (min-width: 520px) {
  .catalog-platform-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .catalog-platform-label {
    flex-shrink: 0;
    margin: 0;
    min-width: 8rem;
  }
  .catalog-platform-select {
    flex: 1;
    min-width: 0;
    max-width: 420px;
  }
}
.catalog-hit-platforms {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c4b5fd;
  line-height: 1.35;
  margin-bottom: 4px;
}
.catalog-query {
  flex: 1 1 200px;
  min-width: 0;
}
.catalog-results {
  margin-top: 14px;
  min-height: 1.5em;
}
/* Avoid last hit row sitting under the floating bottom dock on phones */
.page.has-bottom-nav .catalog-results {
  padding-bottom: 28px;
}
.catalog-hit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.catalog-hit:last-child {
  border-bottom: 0;
}
.catalog-hit-thumb {
  width: 56px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.catalog-hit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-hit-body {
  flex: 1;
  min-width: 0;
}
.catalog-hit-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.catalog-hit-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.admin-tc-coverage {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.admin-tc-coverage-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.admin-tc-coverage-intro,
.admin-tc-coverage-cutoff {
  margin: 0 0 8px;
}
.admin-tc-coverage-block {
  margin: 14px 0;
}
.admin-tc-coverage-provider {
  margin: 0 0 8px;
  font-size: 0.88rem;
}
.admin-tc-coverage-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  gap: 6px 16px;
  margin: 0;
  font-size: 0.88rem;
}
.admin-tc-coverage-grid dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.admin-tc-coverage-grid dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.admin-tc-coverage-grid--items {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.admin-tc-coverage-throughput {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.admin-tc-coverage-throughput .admin-tc-coverage-provider {
  margin-bottom: 8px;
}
.admin-cron-guidance {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 92%, var(--line));
}
.admin-cron-guidance-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.admin-cron-guidance-list {
  margin: 10px 0 0;
  padding-left: 1.2rem;
}
.admin-cron-guidance-list li {
  margin-bottom: 8px;
}
.admin-cron-guidance-env {
  margin-top: 12px;
  font-size: 0.82rem;
}
.admin-tc-coverage-roadmap {
  margin: 14px 0 0;
  font-size: 0.82rem;
}
.admin-tc-coverage-roadmap code {
  font-size: 0.8rem;
}
.admin-tc-coverage-global {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
}
.admin-set-warm-form select {
  max-width: 28rem;
  width: 100%;
}

.admin-catalog-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-catalog-status-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.admin-catalog-status-list li:last-child {
  border-bottom: 0;
}
.admin-catalog-status-name {
  display: inline-block;
  font-weight: 700;
  margin-right: 10px;
  min-width: 7rem;
}
.admin-catalog-env {
  margin: 8px 0 0;
  font-size: 0.8rem;
}
.admin-catalog-form-sub {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-catalog-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.admin-catalog-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.admin-catalog-image-card {
  margin: 0;
}
.admin-catalog-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

/* ——— Quick collection modal (add item form) ——— */
.collection-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.collection-field-head .collection-field-label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.collection-quick-open {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #a855f7);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
}
.collection-quick-open:hover {
  filter: brightness(1.08);
}
.collection-quick-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 28px);
  width: min(440px, 100%);
  background: transparent;
}
.collection-quick-dialog::backdrop {
  background: rgba(8, 5, 14, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: collectionQuickBackdropIn 0.28s ease-out both;
}
@keyframes collectionQuickBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.collection-quick-dialog-panel {
  margin: 0;
  padding: 22px 20px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.collection-quick-dialog[open] .collection-quick-dialog-panel {
  animation: collectionQuickModalIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes collectionQuickModalIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.92);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
.collection-quick-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.collection-quick-dialog-err {
  color: #fecaca;
  margin-top: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .collection-quick-dialog::backdrop {
    animation: none;
  }
  .collection-quick-dialog[open] .collection-quick-dialog-panel {
    animation: none;
  }
}

/* App-wide alert / confirm (replaces window.alert / confirm) */
.trackibles-ui-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 28px);
  width: min(400px, 100%);
  background: transparent;
}
.trackibles-ui-dialog::backdrop {
  background: rgba(8, 5, 14, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: collectionQuickBackdropIn 0.28s ease-out both;
}
.trackibles-ui-dialog-panel {
  margin: 0;
  padding: 22px 20px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.trackibles-ui-dialog[open] .trackibles-ui-dialog-panel {
  animation: collectionQuickModalIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.trackibles-ui-dialog-msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.trackibles-ui-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
@media (prefers-reduced-motion: reduce) {
  .trackibles-ui-dialog::backdrop {
    animation: none;
  }
  .trackibles-ui-dialog[open] .trackibles-ui-dialog-panel {
    animation: none;
  }
}

.flash-info {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.06));
}

/* Trophy unlock toasts */
.trophy-toast-stack {
  position: fixed;
  z-index: 45;
  top: calc(58px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.trophy-toast {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px 12px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent, #a855f7) 42%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent, #a855f7) 14%, var(--bg1)),
    color-mix(in srgb, #38bdf8 10%, var(--bg1))
  );
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transform: translateX(110%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.trophy-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}
.trophy-toast.is-leaving {
  transform: translateX(110%);
  opacity: 0;
  transition-duration: 0.22s;
}
.trophy-toast-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg1));
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.trophy-toast-dismiss:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 14%, var(--bg1));
}
.trophy-toast-visual {
  flex-shrink: 0;
}
.trophy-toast-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg0) 82%, var(--surface2));
  padding: 6px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #a855f7) 28%, var(--line));
}
.trophy-toast.is-visible .trophy-toast-icon {
  animation: trophy-toast-icon-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes trophy-toast-icon-pop {
  0% { transform: scale(0.82); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.trophy-toast-body {
  min-width: 0;
  padding-right: 22px;
}
.trophy-toast-kicker {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(168, 85, 247, 0.95);
}
.unlock-toast--game-mode {
  border-color: color-mix(in srgb, #22c55e 42%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #38bdf8 10%, var(--bg1)),
    color-mix(in srgb, #22c55e 14%, var(--bg1))
  );
}
.unlock-toast--game-mode .trophy-toast-kicker {
  color: rgba(74, 222, 128, 0.95);
}
.unlock-toast-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg0) 82%, var(--surface2));
  box-shadow: 0 0 0 1px color-mix(in srgb, #22c55e 28%, var(--line));
}
.unlock-toast--game-mode.is-visible .unlock-toast-emoji {
  animation: trophy-toast-icon-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.trophy-toast-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.trophy-toast-desc {
  margin: 0 0 6px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}
.trophy-toast-link {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 650;
  color: rgba(56, 189, 248, 0.95);
  text-decoration: none;
}
.trophy-toast-link:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .trophy-toast-stack {
    top: calc(58px + env(safe-area-inset-top, 0px));
    bottom: auto;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
  }
  .trophy-toast {
    transform: translateY(-110%);
  }
  .trophy-toast.is-visible {
    transform: translateY(0);
  }
  .trophy-toast.is-leaving {
    transform: translateY(-110%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .trophy-toast,
  .trophy-toast.is-visible,
  .trophy-toast.is-leaving {
    transition: opacity 0.15s ease;
    transform: none;
  }
  .trophy-toast.is-visible .trophy-toast-icon {
    animation: none;
  }
}

.wishlist-match-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent, #a855f7) 58%, rgba(255,255,255,0.16));
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--accent, #a855f7) 22%, transparent), transparent 42%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(168, 85, 247, 0.12));
  box-shadow: 0 16px 46px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.04) inset;
  scroll-margin-top: 96px;
}
.wishlist-match-card:focus {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: 3px;
}
.wishlist-match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wishlist-match-head .help {
  margin: 6px 0 0;
}
.wishlist-match-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f5f3ff;
  border: 1px solid rgba(255,255,255,0.14);
  background: color-mix(in srgb, var(--accent, #a855f7) 34%, rgba(255,255,255,0.08));
}
.wishlist-match-prompt {
  margin: 14px 0 10px;
  color: var(--text);
  font-weight: 700;
}
.wishlist-match-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wishlist-match-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 54px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  cursor: pointer;
}
.wishlist-match-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent, #a855f7) 78%, white);
  background: color-mix(in srgb, var(--accent, #a855f7) 18%, rgba(0,0,0,0.18));
}
.wishlist-match-option input {
  margin-top: 3px;
  accent-color: var(--accent, #a855f7);
}
.wishlist-match-sticky {
  position: sticky;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 18;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent, #a855f7) 46%, rgba(255,255,255,0.12));
  border-radius: 16px;
  background: rgba(12, 7, 20, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0,0,0,0.34);
}
.wishlist-match-sticky strong,
.wishlist-match-sticky span {
  display: block;
}
.wishlist-match-sticky span {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .wishlist-match-head {
    display: block;
  }
  .wishlist-match-pill {
    display: inline-block;
    margin-top: 10px;
  }
  .wishlist-match-options {
    grid-template-columns: 1fr;
  }
  .wishlist-match-option {
    min-height: 48px;
  }
  .wishlist-match-sticky {
    bottom: calc(96px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
  }
  .wishlist-match-sticky .btn {
    width: 100%;
  }
}

/* Trophies */
.trophies-page-head {
  margin-bottom: 20px;
}
.trophies-intro {
  max-width: 42rem;
}
.trophies-progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--muted);
}
.trophies-progress-label strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.trophies-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
  border: 1px solid var(--line);
}
.trophies-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #38bdf8);
  transition: width 0.35s ease;
}
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.trophy-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.trophy-card--unlocked {
  border-color: rgba(168, 85, 247, 0.35);
}
.trophy-card--locked {
  opacity: 0.72;
}
.trophy-card--locked .trophy-card-icon {
  filter: grayscale(1) brightness(0.85);
}
.trophy-card-visual {
  position: relative;
  flex-shrink: 0;
}
.trophy-card-icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
}
.trophy-lock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.trophy-card-body {
  min-width: 0;
}
.trophy-card-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.trophy-card-desc {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.trophy-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(34, 197, 94, 0.95);
}
.trophy-card-meta-muted {
  color: var(--muted);
}
.dashboard-trophy-card .trophies-progress-bar {
  height: 6px;
}
.admin-row-active td {
  background: rgba(168, 85, 247, 0.12);
}

/* Camera barcode scanner */
.barcode-scan-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(96vw, 520px);
}
.barcode-scan-dialog::backdrop {
  background: rgba(7, 5, 13, 0.82);
  backdrop-filter: blur(10px);
}
.barcode-scan-panel {
  margin: 0;
  padding: 14px;
}
.barcode-scan-title {
  margin: 0 0 8px;
}
.barcode-scan-status {
  margin: 0 0 10px;
}
.barcode-scan-video-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.barcode-scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.barcode-scan-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Community thread composer */
.community-composer-textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.community-composer-body-wrap {
  position: relative;
  margin: 0 0 10px;
}
.community-composer-textarea--with-counter {
  box-sizing: border-box;
  padding-bottom: 2rem;
  padding-right: 5rem;
}
.community-composer-counter--overlay {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 20px);
  text-align: right;
  line-height: 1.25;
  pointer-events: none;
  user-select: none;
  padding: 2px 0 2px 8px;
  margin: 0;
  border-radius: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--surface, #141820) 82%, transparent);
}
.community-composer-textarea:focus + .community-composer-counter--overlay,
.community-composer-body-wrap:focus-within .community-composer-counter--overlay {
  background: color-mix(in srgb, var(--surface, #141820) 92%, transparent);
}
.community-composer-textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #a855f7) 55%, var(--field-border));
  box-shadow: 0 0 0 3px var(--field-focus-ring, rgba(168, 85, 247, 0.32));
}
.community-composer-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 10px;
  margin: 0 0 8px;
}
.community-composer-toolbar-row .community-composer-tools {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.community-composer-toolbar-row .community-composer-format-help {
  flex-shrink: 0;
  align-self: center;
}
.community-composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.community-composer-btn {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 4px 10px;
  font-size: 0.9rem;
  border-radius: 8px;
}
.community-composer-emoji-details {
  position: relative;
}
.community-composer-emoji-details summary {
  list-style: none;
  cursor: pointer;
}
.community-composer-emoji-details summary::-webkit-details-marker {
  display: none;
}
.community-composer-emoji-grid {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 6px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 10px;
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field-bg-focus, rgba(14, 10, 24, 0.96));
  box-shadow: var(--shadow);
}
.community-composer-emoji {
  margin: 0;
  padding: 6px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}
.community-composer-emoji:hover {
  background: var(--surface2);
}
.community-post-image-field-label {
  margin-top: 10px;
}
.community-post-image-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  width: 100%;
}
.community-post-image-file-wrap {
  flex: 1 1 0;
  min-width: 0;
}
.community-post-image-file-input {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.9rem;
}
.community-post-image-submit {
  flex: 0 0 auto;
}
.community-library-picker-actions-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 26rem;
}
.community-library-picker-row .community-library-delete-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.community-library-picker-row .community-library-delete-btn:hover {
  color: var(--danger);
}
.community-mention {
  color: #93c5fd;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
.community-mention:hover {
  text-decoration: underline;
}
.community-mention-dd {
  position: absolute;
  z-index: 30;
  margin: 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.community-mention-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
}
.community-mention-dd-item:hover,
.community-mention-dd-item:focus-visible {
  background: rgba(168, 85, 247, 0.12);
}
.community-post-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 10px;
}
.community-post-reactions--pop .community-reaction-emoji {
  animation: communityReactionPop 0.45s ease;
}
@keyframes communityReactionPop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.35) rotate(-6deg);
  }
  70% {
    transform: scale(1.12) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
.community-post-reaction-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 36px;
}
.community-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text);
  min-height: 36px;
}
.community-reaction-chip.is-mine {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.12);
}
.community-reaction-chip--readonly {
  cursor: default;
  opacity: 0.95;
}
.community-reaction-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.community-reaction-chip.is-mine .community-reaction-count {
  color: #fff;
}
.community-reaction-emoji {
  font-size: 1.15rem;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
}
.community-reaction-add-details {
  position: relative;
}
.community-reaction-add-summary {
  list-style: none;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.85rem;
}
.community-reaction-add-details summary::-webkit-details-marker {
  display: none;
}
.community-reaction-picker {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  z-index: 25;
  max-width: min(100vw - 24px, 320px);
}
@media (max-width: 520px) {
  .community-reaction-picker {
    left: auto;
    right: 0;
  }
}
.community-reaction-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
}
.community-reaction-pick:hover,
.community-reaction-pick:focus-visible {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.1);
}
.community-reaction-emoji--picker {
  font-size: 1.65rem;
  display: block;
  animation: communityReactionIdle 2.8s ease-in-out infinite;
}
@keyframes communityReactionIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
.community-reaction-pick:hover .community-reaction-emoji--picker,
.community-reaction-pick:focus-visible .community-reaction-emoji--picker {
  animation: communityReactionWiggle 0.55s ease;
}
@keyframes communityReactionWiggle {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-10deg) scale(1.08);
  }
  50% {
    transform: rotate(8deg) scale(1.05);
  }
  75% {
    transform: rotate(-5deg) scale(1.03);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}
.community-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.community-composer-counter {
  font-size: 0.85rem;
  color: var(--muted);
}
.community-composer-counter[data-over="1"] {
  color: var(--danger);
}
.community-post-ajax-status {
  margin-top: 10px;
  min-height: 1.25em;
}
.community-composer-format-help {
  position: relative;
  flex-shrink: 0;
}
.community-composer-format-help > summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
}
.community-composer-format-help > summary::-webkit-details-marker {
  display: none;
}
.community-composer-format-help-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 25;
  min-width: 260px;
  max-width: min(92vw, 380px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.community-composer-format-help-panel .help {
  font-size: 0.88rem;
  line-height: 1.45;
}
/* Thread images: comfortable inline size on large screens; full image in shared lightbox */
.community-post-image .item-cover-stage {
  display: block;
  width: 100%;
  max-width: min(100%, 640px);
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
}
.community-post-image .item-cover-tilt img {
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}
.community-post-body strong {
  font-weight: 650;
  color: color-mix(in srgb, var(--text) 92%, var(--accent, #a855f7));
}
.community-post-code {
  display: inline;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface2);
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.community-post-strike {
  text-decoration: line-through;
  color: var(--muted);
}
.community-thread-post--pinned {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #a855f7) 45%, transparent);
}
.community-thread-post-pin-badge {
  border-color: color-mix(in srgb, var(--accent, #a855f7) 35%, var(--line));
  color: color-mix(in srgb, var(--text) 88%, var(--accent, #a855f7));
}
.community-directory-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
}
.community-directory-live-region[aria-busy="true"] {
  opacity: 0.72;
  transition: opacity 0.15s ease;
}
.community-directory-tools input[type="search"] {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field-bg, var(--surface));
  color: inherit;
}
.community-directory-hot-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  background: color-mix(in srgb, var(--danger, #f97316) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger, #f97316) 45%, var(--line));
}

/* Item cover photo uploader: pickers, preview, and crop dialog. */
.item-cover-uploader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-cover-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.item-cover-preview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg1, #120a1c) 70%, transparent);
}
.item-cover-preview[hidden] {
  display: none !important;
}
.item-cover-preview img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
.item-cover-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item-photo-uploader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-photo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.item-photo-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.item-photo-preview-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg1, #120a1c) 70%, transparent);
}
.item-photo-preview-row img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
.item-photo-preview-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 480px) {
  .item-cover-preview {
    flex-direction: column;
  }
  .item-cover-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .item-cover-preview-actions {
    flex-direction: row;
    width: 100%;
  }
  .item-cover-preview-actions .btn {
    flex: 1;
  }
  .item-photo-preview-list {
    grid-template-columns: 1fr;
  }
  .item-photo-preview-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }
  .item-photo-preview-row img {
    width: 86px;
    height: 86px;
  }
}

.item-cover-crop-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg0, #0c0714);
  color: inherit;
  overflow: hidden;
}
.item-cover-crop-dialog::backdrop {
  background: #000;
}
.item-cover-crop-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: var(--bg0, #0c0714);
}
.item-cover-crop-head {
  display: flex;
  flex-direction: column;
}
.item-cover-crop-stage {
  flex: 1 1 auto;
  position: relative;
  width: 100%;
  min-height: 0;
  height: 70vh;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}
.item-cover-crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.item-cover-crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.item-cover-crop-mask {
  display: none;
}
.item-cover-crop-rect {
  position: absolute;
  box-sizing: border-box;
  border: 3px solid #fff;
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 1px), rgba(255, 255, 255, 0.7) calc(33.333% - 1px), rgba(255, 255, 255, 0.7) calc(33.333% + 1px), transparent calc(33.333% + 1px)),
    linear-gradient(to right, transparent calc(66.666% - 1px), rgba(255, 255, 255, 0.7) calc(66.666% - 1px), rgba(255, 255, 255, 0.7) calc(66.666% + 1px), transparent calc(66.666% + 1px)),
    linear-gradient(to bottom, transparent calc(33.333% - 1px), rgba(255, 255, 255, 0.7) calc(33.333% - 1px), rgba(255, 255, 255, 0.7) calc(33.333% + 1px), transparent calc(33.333% + 1px)),
    linear-gradient(to bottom, transparent calc(66.666% - 1px), rgba(255, 255, 255, 0.7) calc(66.666% - 1px), rgba(255, 255, 255, 0.7) calc(66.666% + 1px), transparent calc(66.666% + 1px));
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.75),
    0 0 16px rgba(0, 0, 0, 0.8);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}
.item-cover-crop-rect::before,
.item-cover-crop-rect::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.item-cover-crop-rect::before {
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  left: 33.333%;
  right: 33.333%;
}
.item-cover-crop-rect::after {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  top: 33.333%;
  bottom: 33.333%;
}
.item-cover-crop-handle {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  background: #fbbf24;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.item-cover-crop-handle[data-handle="nw"] {
  left: -24px;
  top: -24px;
  cursor: nwse-resize;
}
.item-cover-crop-handle[data-handle="ne"] {
  right: -24px;
  top: -24px;
  cursor: nesw-resize;
}
.item-cover-crop-handle[data-handle="sw"] {
  left: -24px;
  bottom: -24px;
  cursor: nesw-resize;
}
.item-cover-crop-handle[data-handle="se"] {
  right: -24px;
  bottom: -24px;
  cursor: nwse-resize;
}
.item-cover-cropping-active,
.item-cover-cropping-active * {
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.item-cover-crop-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.item-cover-cropper-open {
  overflow: hidden !important;
}
@media (max-width: 480px) {
  .item-cover-crop-stage {
    min-height: 0;
  }
  .item-cover-crop-foot .btn {
    flex: 1;
    min-width: 0;
  }
  .item-cover-crop-foot > span {
    display: none;
  }
}

/* Consent banner (neutral filename avoids ad-block false positives on *cookie*.js) */
.site-consent {
  position: fixed;
  z-index: 99990;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.site-consent-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 18px;
  pointer-events: auto;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(22, 18, 32, 0.96), rgba(14, 12, 22, 0.98));
  backdrop-filter: blur(14px);
}
.site-consent-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.site-consent-intro {
  margin: 0 0 10px;
}
.site-consent-links {
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.site-consent-links a {
  color: color-mix(in srgb, var(--accent, #a855f7) 85%, #fff);
}
.site-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.site-consent-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.site-consent-cb {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  cursor: pointer;
}
.site-consent-cb input {
  margin-top: 3px;
}
/* Sit above the mobile bottom nav on the main app shell */
body.app:not(.guest):not(.admin-shell) .site-consent {
  bottom: 76px;
}

.guest-legal-footer {
  margin-top: 28px;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.legal-footer-nav {
  font-size: 0.9rem;
}
.legal-footer-nav a {
  color: color-mix(in srgb, var(--accent, #a855f7) 80%, #fff);
  text-decoration: none;
}
.legal-footer-nav a:hover {
  text-decoration: underline;
}
.legal-footer-sep {
  margin: 0 6px;
  opacity: 0.45;
}

.pokedex-hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pokedex-hero-copy {
  flex: 1;
  min-width: min(100%, 220px);
}
.pokedex-progress-ring {
  --pokedex-ring-size: 88px;
  width: var(--pokedex-ring-size);
  height: var(--pokedex-ring-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(farthest-side, var(--surface, #111) 62%, transparent 63%),
    conic-gradient(
      hsl(217 91% 60%) calc(var(--pokedex-pct, 0) * 1%),
      rgba(255, 255, 255, 0.12) 0
    );
  flex-shrink: 0;
}
.pokedex-progress-ring--sm {
  --pokedex-ring-size: 72px;
  margin-top: 10px;
}
.pokedex-progress-ring-label {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pokedex-collection-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.pokedex-collection-filter select {
  min-width: min(100%, 220px);
}
.pokedex-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.pokedex-toolbar .pokedex-search {
  flex: 1 1 180px;
  min-width: 0;
}
.pokedex-toolbar .pokedex-filter-pills {
  flex: 1 1 100%;
}
.pokedex-search {
  width: 100%;
  box-sizing: border-box;
}
.pokedex-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pokedex-filter-pills .is-active {
  border-color: color-mix(in srgb, hsl(217 91% 60%) 55%, var(--line));
  color: hsl(217 91% 75%);
}
.pokedex-species-tile[hidden],
.pokedex-species-tile.pokedex-species-tile--filtered-out {
  display: none !important;
}
.pokedex-generation[hidden],
.pokedex-generation.pokedex-generation--filtered-out {
  display: none !important;
}
.pokedex-generation {
  margin-top: 18px;
  width: 100%;
}
.pokedex-generation-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
}
.pokedex-species-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 520px) {
  .pokedex-species-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
  }
}
@media (min-width: 900px) {
  .pokedex-species-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
  }
}
.pokedex-species-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  min-height: 118px;
  padding: 8px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, #fff 9%, var(--surface));
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pokedex-species-tile:hover,
.pokedex-species-tile:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, hsl(217 91% 60%) 45%, var(--line));
}
.pokedex-species-dex {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pokedex-species-art {
  width: 100%;
  max-width: 64px;
  height: 56px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}
.pokedex-species-art img {
  width: 100%;
  height: 100%;
  max-height: 56px;
  object-fit: contain;
}
.pokedex-species-tile--missing .pokedex-species-art img {
  filter: grayscale(1) brightness(1.35) contrast(0.55);
  opacity: 0.45;
}
.pokedex-species-tile--wishlist {
  border-color: color-mix(in srgb, #facc15 50%, var(--line));
}
.pokedex-species-tile--collected {
  border-color: color-mix(in srgb, #22c55e 45%, var(--line));
}
.pokedex-species-tile--collected .pokedex-species-name {
  font-weight: 600;
}
.pokedex-species-status-mark {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 700;
  pointer-events: none;
}
.pokedex-species-status-mark--owned {
  color: #bbf7d0;
  background: color-mix(in srgb, #22c55e 35%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 55%, transparent);
}
.pokedex-species-status-mark--wish {
  color: #fef08a;
  background: color-mix(in srgb, #eab308 28%, transparent);
  border: 1px solid color-mix(in srgb, #eab308 50%, transparent);
}
.pokedex-species-status-mark--missing {
  display: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed color-mix(in srgb, var(--muted) 55%, var(--line));
  font-size: 0.55rem;
}
.pokedex-species-grid.pokedex-show-missing-color .pokedex-species-status-mark--missing {
  display: inline-flex;
}
.pokedex-ownership-legend {
  margin: 0 0 10px;
  font-size: 0.82rem;
}
.pokedex-species-name {
  width: 100%;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pokedex-species-prints {
  display: none;
}
.pokedex-no-matches {
  margin: 0 0 8px;
}
.pokedex-species-head-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pokedex-species-head-sprite {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.pokedex-species-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.pokedex-species-stat-card {
  display: flex;
  flex-direction: column;
}
.pokedex-species-stat-line {
  margin: 0;
}
.pokedex-expensive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pokedex-expensive-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pokedex-expensive-list img {
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.pokedex-expensive-list strong {
  display: block;
  font-size: 0.88rem;
}
.pokedex-species-search {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}
.pokedex-species-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
}
.pokedex-card-grid .pokedex-card-tile {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.pokedex-card-grid .pokedex-card-tile:focus-visible {
  outline: 2px solid var(--accent, #a855f7);
  outline-offset: -2px;
}
.pokedex-card-tile--lifted {
  visibility: hidden;
  pointer-events: none;
}
.pokedex-card-tile--just-added {
  animation: pokedexCardJustAdded 1.35s ease-out 1;
}
@keyframes pokedexCardJustAdded {
  0% {
    box-shadow: 0 0 0 rgba(96, 165, 250, 0);
  }
  35% {
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34), 0 0 0 2px rgba(255, 255, 255, 0.28);
  }
  100% {
    box-shadow: 0 0 0 rgba(96, 165, 250, 0);
  }
}
.pokedex-card-stage {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pokedex-card-stage[hidden] {
  display: none !important;
}
.pokedex-card-stage.is-open {
  pointer-events: auto;
}
.pokedex-card-stage.is-closing {
  pointer-events: none;
}
.pokedex-card-stage.is-closing .pokedex-card-stage-panel {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.pokedex-card-stage.is-closing .pokedex-card-stage-scrim {
  animation: none;
  opacity: 0;
  transition: opacity 0.5s ease 0.28s;
}
.pokedex-card-stage-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 38%),
    rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(6px);
  animation: pokedexStageBackdropIn 0.28s ease both;
}
.pokedex-card-stage-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: calc(100dvh - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 12px 18px;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pokedex-card-stage-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}
.pokedex-card-stage-card-host {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
}
.pokedex-card-stage-card {
  position: fixed;
  top: 0;
  left: 0;
  aspect-ratio: 0.72;
  border-radius: 16px;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 3;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.pokedex-card-stage-card.is-animating {
  transition:
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.pokedex-card-stage-card.is-centered {
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}
.pokedex-card-stage-card-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: rgba(8, 13, 28, 0.94);
}
.pokedex-card-stage-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pokedex-card-stage-card-inner span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  font-weight: 800;
  color: var(--muted);
}
.pokedex-card-stage-panel {
  flex: 0 0 auto;
  width: 100%;
  max-width: min(440px, calc(100vw - 24px));
  max-height: min(48vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface, #111827) 92%, transparent);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s ease, transform 0.32s ease;
  pointer-events: none;
  scrollbar-width: thin;
}
.pokedex-card-stage-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pokedex-card-stage-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  line-height: 1.2;
}
.pokedex-card-stage-set {
  margin: 0 0 2px;
}
.pokedex-card-stage-subtitle,
.pokedex-card-stage-price {
  margin: 0 0 4px;
  line-height: 1.35;
}
.pokedex-card-stage-prices {
  width: 100%;
  margin: 2px 0 0;
}
.pokedex-card-stage-prices[hidden] {
  display: none !important;
}
.pokedex-card-stage-prices h4 {
  margin: 8px 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.pokedex-card-stage-prices h4:first-child {
  margin-top: 0;
}
.pokedex-card-stage-prices-source {
  margin: 6px 0 2px;
  font-size: 0.76rem;
  font-weight: 600;
}
.pokedex-card-stage-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  line-height: 1.3;
}
.pokedex-card-stage-prices-table th,
.pokedex-card-stage-prices-table td {
  padding: 3px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  vertical-align: top;
  text-align: left;
}
.pokedex-card-stage-prices-table th {
  width: 34%;
  color: var(--muted);
  font-weight: 500;
}
.pokedex-card-stage-prices-table tr:last-child th,
.pokedex-card-stage-prices-table tr:last-child td {
  border-bottom: none;
}
.pokedex-card-stage-prices-note {
  margin: 6px 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
}
.pokedex-card-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
body.pokedex-card-stage-open {
  overflow: hidden;
}
/* FAB speed dial (arc around +) — never cover the dock + button */
.fab-speed-dial {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.fab-speed-dial-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(7, 5, 13, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  cursor: pointer;
}
.fab-speed-dial.is-open .fab-speed-dial-scrim {
  opacity: 1;
  pointer-events: auto;
}
.fab-speed-dial-actions {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom) + 10px + 27px);
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
}
.fab-speed-dial-action {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0) scale(0);
  transform-origin: 50% 100%;
  transition:
    transform 0.36s cubic-bezier(0.22, 1.12, 0.42, 1),
    opacity 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  will-change: transform, opacity;
}
.fab-speed-dial.is-open .fab-speed-dial-action {
  pointer-events: auto;
}
.fab-speed-dial-action--top {
  transition-delay: 0.1s;
}
.fab-speed-dial-action--left {
  transition-delay: 0.05s;
}
.fab-speed-dial-action--right {
  transition-delay: 0s;
}
.fab-speed-dial-action-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.fab-speed-dial-action-icon .ui-icon {
  display: block;
  flex-shrink: 0;
}
.fab-speed-dial-action--top .fab-speed-dial-action-icon {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #c084fc) 55%, #fff 12%), rgba(255, 255, 255, 0.08));
  border-color: color-mix(in srgb, var(--accent, #c084fc) 45%, rgba(255, 255, 255, 0.25));
}
.fab-speed-dial-action-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.24s ease;
}
.fab-speed-dial.is-open .fab-speed-dial-action--top {
  opacity: 1;
  transform: translate(-50%, -108px) scale(1);
  transition-delay: 0.06s;
}
.fab-speed-dial.is-open .fab-speed-dial-action--left {
  opacity: 1;
  transform: translate(calc(-50% - 78px), -58px) scale(1);
  transition-delay: 0.1s;
}
.fab-speed-dial.is-open .fab-speed-dial-action--right {
  opacity: 1;
  transform: translate(calc(-50% + 78px), -58px) scale(1);
  transition-delay: 0.14s;
}
.fab-speed-dial.is-open .fab-speed-dial-action--top .fab-speed-dial-action-label {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.16s;
}
.fab-speed-dial.is-open .fab-speed-dial-action--left .fab-speed-dial-action-label {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}
.fab-speed-dial.is-open .fab-speed-dial-action--right .fab-speed-dial-action-label {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.24s;
}
.bottom-fab.bottom-fab--speed-dial-open {
  box-shadow:
    0 0 0 2px var(--accent, rgba(168, 85, 247, 0.75)),
    0 18px 40px rgba(0, 0, 0, 0.45);
}
.bottom-fab span {
  display: inline-block;
  transition: transform 0.32s cubic-bezier(0.22, 1.12, 0.42, 1);
}
.bottom-fab.bottom-fab--speed-dial-open span {
  transform: rotate(45deg);
}
body.fab-speed-dial-open .bottom-nav {
  z-index: 45;
}
@media (prefers-reduced-motion: reduce) {
  .fab-speed-dial-scrim,
  .fab-speed-dial-action,
  .fab-speed-dial-action-label,
  .bottom-fab span {
    transition: none;
  }
  .fab-speed-dial-action--top,
  .fab-speed-dial-action--left,
  .fab-speed-dial-action--right,
  .fab-speed-dial.is-open .fab-speed-dial-action--top,
  .fab-speed-dial.is-open .fab-speed-dial-action--left,
  .fab-speed-dial.is-open .fab-speed-dial-action--right,
  .fab-speed-dial.is-open .fab-speed-dial-action--top .fab-speed-dial-action-label,
  .fab-speed-dial.is-open .fab-speed-dial-action--left .fab-speed-dial-action-label,
  .fab-speed-dial.is-open .fab-speed-dial-action--right .fab-speed-dial-action-label {
    transition-delay: 0s;
  }
}
body.theme-light .fab-speed-dial-scrim {
  background: rgba(12, 10, 20, 0.35);
}
body.theme-light .fab-speed-dial-action-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
body.theme-light .fab-speed-dial-action-label {
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
}
.tc-quick-scan-match-picker {
  margin: 8px 0 4px;
}
.tc-quick-scan-match-picker-label {
  margin: 0 0 6px;
}
.tc-quick-scan-match-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tc-quick-scan-match-picker-row .btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
}
.pokedex-species-add-dialog .collection-quick-dialog-panel {
  max-width: 520px;
}
@keyframes pokedexStageBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pokedexStagePanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pokedex-card-stage-card,
  .pokedex-card-stage-scrim,
  .pokedex-card-stage-panel,
  .pokedex-card-tile--just-added {
    animation: none !important;
    transition: none !important;
  }
  .pokedex-card-stage-panel.is-visible {
    opacity: 1;
    transform: none;
  }
}
.pokedex-card-tile--missing .cover img {
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.pokedex-card-grid.pokedex-show-missing-color .pokedex-card-tile--missing .cover img {
  filter: none;
  opacity: 1;
}
.pokedex-species-tile--missing .pokedex-species-art img {
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.pokedex-species-grid.pokedex-show-missing-color .pokedex-species-tile--missing .pokedex-species-art img {
  filter: none;
  opacity: 1;
}
.pokedex-color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.04);
}
.pokedex-color-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pokedex-color-toggle.is-active {
  border-color: hsl(217 91% 60%);
  background: color-mix(in srgb, hsl(217 91% 60%) 14%, transparent);
}
.pokedex-card-tile--owned {
  border-color: color-mix(in srgb, #22c55e 45%, var(--line));
}
.pokedex-card-tile--wishlist {
  border-color: color-mix(in srgb, #facc15 45%, var(--line));
}
.pokedex-card-cover {
  position: relative;
}
.pokedex-card-tile .ti .pokedex-card-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px;
}
.pokedex-card-status .badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  line-height: 1.25;
  margin: 0;
}
.pokedex-badge-missing {
  display: none;
  color: var(--muted);
  border-color: color-mix(in srgb, var(--muted) 40%, var(--line));
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}
.pokedex-card-grid.pokedex-show-missing-color .pokedex-badge-missing {
  display: inline-flex;
}
.pokedex-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  color: var(--muted);
}

.pokedex-species-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 8px;
}
.pokedex-catalog-sync-meta {
  margin: -4px 0 8px;
}
.pokedex-refresh-prints {
  flex-shrink: 0;
}
.pokedex-species-toolbar .pokedex-search {
  flex: 1;
  min-width: 0;
}
.pokedex-filters-open {
  flex-shrink: 0;
  position: relative;
}
.pokedex-filters-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: hsl(217 91% 60%);
  color: #fff;
}
.pokedex-species-results {
  margin: 0 0 10px;
}
.pokedex-species-no-matches {
  margin: 0 0 14px;
}
.pokedex-filters-drawer {
  position: fixed;
  inset: 0;
  z-index: 95;
}
.pokedex-filters-drawer[hidden] {
  display: none;
}
.pokedex-filters-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.pokedex-filters-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 97%, #fff);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.pokedex-filters-drawer.is-open .pokedex-filters-panel {
  transform: translateX(0);
}
body.pokedex-filters-open {
  overflow: hidden;
}
.pokedex-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.pokedex-filters-head h3 {
  margin: 0;
  font-size: 1.15rem;
}
.pokedex-filters-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 20px;
}
.pokedex-filters-section-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.pokedex-filters-section-label:first-child {
  margin-top: 0;
}
.pokedex-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pokedex-filter-chip {
  display: inline-flex;
  cursor: pointer;
}
.pokedex-filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pokedex-filter-chip span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pokedex-filter-chip input:checked + span {
  border-color: hsl(217 91% 60%);
  background: color-mix(in srgb, hsl(217 91% 60%) 18%, transparent);
  color: hsl(217 91% 78%);
}
.pokedex-filter-chip-type {
  gap: 6px;
}
.pokedex-type-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.pokedex-type-dot--grass { background: #3fa744; }
.pokedex-type-dot--fire { background: #e54a2b; }
.pokedex-type-dot--water { background: #3293f5; }
.pokedex-type-dot--electric,
.pokedex-type-dot--lightning { background: #f8d030; }
.pokedex-type-dot--psychic { background: #ef6a8a; }
.pokedex-type-dot--fighting { background: #c22e28; }
.pokedex-type-dot--dark { background: #6b4f71; }
.pokedex-type-dot--steel,
.pokedex-type-dot--metal { background: #9eb7c6; }
.pokedex-type-dot--fairy { background: #ec8fea; }
.pokedex-type-dot--dragon { background: #536aae; }
.pokedex-type-dot--normal,
.pokedex-type-dot--colorless { background: #a8a77a; }
.pokedex-type-dot--flying { background: #a98ff3; }
.pokedex-type-dot--ground { background: #db8b3f; }
.pokedex-type-dot--rock { background: #bda059; }
.pokedex-type-dot--bug { background: #91a119; }
.pokedex-type-dot--poison { background: #a657bc; }
.pokedex-type-dot--ghost { background: #6f6fac; }
.pokedex-type-dot--ice { background: #4fd0c8; }
.pokedex-index-results {
  margin: 0 0 8px;
}
.pokedex-filters-foot {
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
@media (max-width: 640px) {
  .pokedex-filters-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(88vh, 720px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .pokedex-filters-drawer.is-open .pokedex-filters-panel {
    transform: translateY(0);
  }
}

/* Light themes (Collector, Light): flat cards, solid primary buttons, catalog-style chips */
html:has(body.theme-light),
body.theme-light {
  background: var(--bg0);
}
body.theme-light .mouse-light-trail {
  opacity: 0;
  pointer-events: none;
}
body.theme-light .card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
body.theme-light .btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
body.theme-light .btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--glow);
}
body.theme-light .btn-primary:hover {
  background: var(--accent-dim);
}
body.theme-light .btn-ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent);
}
body.theme-light .btn-danger {
  color: #be123c;
  border-color: rgba(190, 18, 60, 0.35);
  background: #fff;
}
body.theme-light .topbar {
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
body.theme-light .pokedex-species-tile {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
body.theme-light .pokedex-species-tile:hover,
body.theme-light .pokedex-species-tile:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 12%, transparent);
}
body.theme-light .pokedex-filter-pills .is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
body.theme-light .pokedex-filter-chip span {
  background: var(--surface);
  color: var(--text);
}
body.theme-light .pokedex-filter-chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
body.theme-light .pokedex-filters-panel {
  background: #fff;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.12);
}
body.theme-light .pokedex-filters-scrim {
  background: rgba(15, 23, 42, 0.35);
}
body.theme-light .pokedex-filters-active-badge {
  background: var(--accent);
}
body.theme-light .stat-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
body.theme-light .stat-chip .num {
  color: var(--text);
}
body.theme-light .item-row {
  background: var(--surface);
  box-shadow: var(--shadow);
}
body.theme-light .item-row .thumb {
  background: color-mix(in srgb, var(--bg0) 65%, var(--surface));
}
body.theme-light .pill {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
body.theme-light .pill.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  box-shadow: none;
}
body.theme-light .trophies-progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
}
body.theme-light .bottom-nav {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
body.theme-light .bottom-link.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
}
body.theme-light .bottom-fab {
  background: var(--surface);
  border-color: var(--line);
  color: var(--accent);
  box-shadow: var(--shadow);
}
body.theme-light .bottom-fab.active-fab {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

/* Light themes: form fields must stay readable (hover/focus/native overrides). */
body.theme-light {
  --field-border-hover: rgba(15, 23, 42, 0.28);
  --field-placeholder: color-mix(in srgb, var(--muted) 76%, transparent);
}
body.theme-light input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]),
body.theme-light select,
body.theme-light textarea {
  background-color: var(--field-bg);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  border-color: var(--field-border);
}
body.theme-light input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(:disabled):hover,
body.theme-light select:not(:disabled):hover,
body.theme-light textarea:not(:disabled):hover {
  background-color: var(--field-bg-hover);
  color: var(--text);
  border-color: var(--field-border-hover);
}
body.theme-light input:focus-visible,
body.theme-light select:focus-visible,
body.theme-light textarea:focus-visible {
  background-color: var(--field-bg-focus);
  color: var(--text);
}
body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
  color: var(--field-placeholder);
  -webkit-text-fill-color: var(--field-placeholder);
}
body.theme-light select option,
body.theme-light select optgroup {
  background-color: var(--select-option-bg);
  color: var(--text);
}
body.theme-light input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-light input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.theme-light input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.72;
}
body.theme-light input[type="checkbox"],
body.theme-light input[type="radio"] {
  background-color: var(--field-bg);
  border-color: var(--field-border);
  accent-color: var(--accent);
}

body[data-theme="collector"] {
  background: var(--bg0);
}
