@font-face {
  font-family: Nunito;
  src: url("/fonts/nunito-sans.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
  --canvas: #19151d;
  --rail: #211c26;
  --surface: #2a2430;
  --raised: #352d3c;
  --pink: #ff80b0;
  --pink-dark: #492c40;
  --text: #f7f0fa;
  --muted: #b7aabd;
  --line: #44394c;
  --mint: #86dfbd;
  --warn: #ffc48e;
  font-family: Nunito, "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--canvas);
  color: var(--text);
  font-synthesis: none;
  scrollbar-color: #65516e var(--canvas);
  scrollbar-width: thin;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
a,
input,
summary,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button,
select,
input {
  border-radius: 8px;
}
a {
  color: var(--pink);
  text-underline-offset: 4px;
}
::selection {
  background: var(--pink);
  color: var(--canvas);
}
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}
input {
  caret-color: var(--pink);
}
svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.primary,
.secondary,
.quiet,
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  min-height: 40px;
  padding: 9px 14px;
}
.primary {
  background: var(--pink);
  color: #281424;
}
.primary:hover {
  background: #ffa3c6;
}
.secondary {
  background: var(--raised);
  color: var(--text);
}
.secondary:hover {
  background: #493c51;
}
.quiet {
  color: var(--muted);
}
.quiet:hover {
  background: var(--surface);
  color: var(--text);
}
.text-button {
  padding: 4px 6px;
  min-height: 32px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.text-button:hover {
  color: var(--pink);
}
.text-button svg {
  width: 15px;
  height: 15px;
}
.icon-button {
  width: 40px;
  height: 40px;
  padding: 9px;
  color: var(--muted);
  flex: none;
}
.icon-button:hover {
  background: var(--raised);
  color: var(--text);
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 36px;
  border-bottom: 1px solid #332b3a;
  background: var(--rail);
}
.brand {
  display: flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  min-width: 205px;
}
.brand-lockup { display: block; width: 205px; height: auto; flex: none; }
.brand-mark-only { display: none; width: 35px; height: auto; flex: none; }
.nav-current {
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 800;
  border-bottom: 3px solid var(--pink);
  padding-top: 3px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 14px;
}
.top-actions .account-link { min-height: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.top-actions .account-link:hover { border-color: var(--pink); }
.account-link svg { width: 21px; height: 21px; color: var(--pink); }
.account-page-body { min-height: 100vh; display: flex; flex-direction: column; }
.account-topbar { min-height: 76px; padding: 0 clamp(20px, 3vw, 48px); display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--rail); }
.account-shell { flex: 1; display: grid; place-items: center; width: 100%; max-width: none; padding: 42px 20px 60px; }
.account-panel { width: min(440px, 100%); }
.account-panel h1 { margin: 0 0 26px; font-size: 38px; font-weight: 900; line-height: 1.15; letter-spacing: -.03em; }
.account-choice-list { display: flex; justify-content: center; gap: 9px; margin-bottom: 26px; }
.account-provider { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.account-provider:hover { border-color: var(--pink); background: var(--raised); }
.account-provider-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pink-dark); color: var(--pink); font-size: 12px; font-weight: 900; }
.account-divider { margin: 0 0 22px; color: var(--muted); text-align: center; font-size: 12px; }
.account-password-form { display: flex; flex-direction: column; }
.account-password-form label { margin: 0 0 8px; font-weight: 800; font-size: 13px; }
.account-password-form input { width: 100%; min-height: 52px; margin-bottom: 20px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #151118; color: var(--text); font-size: 16px; }
.account-password-form input:focus { border-color: var(--pink); }
.account-password-form button { min-height: 52px; margin-top: 7px; font-weight: 900; }
.account-password-form button[aria-busy="true"]::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: account-spin .8s linear infinite; }
@keyframes account-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .account-password-form button[aria-busy="true"]::after { animation: none; } }
.account-switch { margin: 22px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.account-switch a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 5px; font-weight: 800; }
.account-create-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.account-status { min-height: 22px; margin: 14px 0 0; color: var(--mint); font-size: 13px; text-align: center; }
.account-privacy { display: block; width: fit-content; margin: 6px auto 0; padding: 10px; color: var(--muted); font-size: 12px; }
.account-identity { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.account-synced { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.account-synced span { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.account-synced strong { display: block; color: var(--text); font-size: 26px; font-variant-numeric: tabular-nums; }
.account-return { min-height: 48px; text-decoration: none; }
.account-member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.account-choice-list[hidden], .account-divider[hidden], .account-create-note[hidden], #account-guest[hidden], #account-member[hidden] { display: none; }
@media (max-width: 520px) {
  .account-topbar { min-height: 64px; }
  .account-topbar .brand { min-width: 0; font-size: 19px; }
  .account-topbar .brand-mark { width: 27px; height: 27px; }
  .account-shell { place-items: start center; padding: 60px 22px 32px; }
  .account-panel h1 { font-size: 34px; }
}
.app-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  max-width: 1800px;
  margin: auto;
}
.filters-panel {
  background: var(--rail);
  padding: 28px 24px 170px;
  border-right: 1px solid #332b3a;
}
.rail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 23px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.025em;
  font-weight: 850;
}
h2 {
  font-size: 17px;
  font-weight: 800;
}
h3 {
  font-size: 15px;
  font-weight: 800;
}
#filters {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  font-weight: 750;
}
input,
select {
  background: var(--canvas);
  border: 1px solid var(--line);
  padding: 10px 11px;
  color: var(--text);
  width: 100%;
  min-width: 0;
  font-weight: 650;
  min-height: 40px;
}
input::placeholder {
  color: #a597ad;
}
select {
  cursor: pointer;
  padding-right: 6px;
  font-size: 13px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-size: 12px;
  font-weight: 800;
  padding: 0;
  margin-bottom: 10px;
  width: 100%;
}
.legend-icon {
  float: right;
  width: 15px;
  height: 15px;
  color: var(--pink);
}
.range-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}
.range-fields > span {
  color: var(--muted);
  text-align: center;
}
.range-fields input {
  font-variant-numeric: tabular-nums;
}
.star-slider {
  width: 100%;
  height: 18px;
  min-height: 0;
  margin: 13px 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--pink);
  cursor: pointer;
}
.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.toggle-grid button {
  background: var(--surface);
  border: 1px solid transparent;
  padding: 9px 4px;
  font-size: 12px;
  font-weight: 750;
  min-height: 36px;
}
.toggle-grid button:hover {
  background: var(--raised);
}
.toggle-grid button[aria-pressed="true"] {
  background: var(--pink-dark);
  border-color: #9d5274;
  color: #ffafd0;
}
.subtle-label {
  float: right;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.advanced {
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.advanced summary::-webkit-details-marker {
  display: none;
}
.advanced[open] summary svg {
  transform: rotate(180deg);
}
.advanced-fields {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.metadata-coverage {
  margin-top: 14px;
  line-height: 1.4;
}
.advanced-fields input[type="date"] {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}
.date-fields {
  display: grid;
  gap: 9px;
}
.date-fields label {
  color: var(--muted);
  font-size: 11px;
}
.filter-hint {
  margin-top: 26px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
main {
  padding: 30px 34px 170px;
  min-width: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.catalog-count {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 8px 6px 16px;
  border-radius: 10px;
}
.searchbar > svg {
  color: var(--muted);
}
.searchbar input {
  border: 0;
  background: transparent;
  flex: 1;
  font-size: 14px;
  padding-left: 0;
  min-height: 36px;
}
.searchbar input:focus {
  outline: none;
}
.searchbar:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px var(--pink-dark);
}
.searchbar kbd {
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 6px;
  font-family: inherit;
  font-size: 12px;
  border-radius: 4px;
}
.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  background: var(--raised);
  color: var(--pink);
}
.preset-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}
.preset-row button {
  padding: 8px 13px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  color: var(--muted);
}
.preset-row button:hover {
  color: var(--text);
  background: var(--surface);
}
.preset-row button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--canvas);
}
.active-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 9px;
}
#active-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  flex: 1;
}
.filter-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 7px;
  color: var(--pink);
  font-size: 11px;
  border-radius: 4px;
  background: #382633;
}
.filter-chip svg {
  width: 12px;
  height: 12px;
}
.search-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 17px;
  gap: 10px;
}
.results-count {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.results-count strong {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.style-scope {
  max-width: 70ch;
  margin: 5px 0 10px;
}
.style-scope-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.style-scope .text-button {
  color: var(--pink);
  padding-left: 0;
}
.sort-label select {
  background: transparent;
  border: 0;
  font-size: 12px;
  min-height: 32px;
  padding: 4px 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 18px;
  align-items: start;
}
.map-card {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
}
.card-preview {
  position: absolute;
  right: 48px;
  top: 9px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #19151dcc;
  border: 1px solid #ffffff8a;
}
.card-preview svg {
  width: 16px;
  height: 16px;
}
.card-preview:hover,
.card-preview[aria-pressed="true"] {
  color: var(--pink);
  border-color: var(--pink);
}
.card-select {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  color: var(--text);
}
.card-select:focus-visible {
  outline-offset: -3px;
}
.card-select[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--pink);
}
.artwork {
  height: 154px;
  display: block;
  position: relative;
  overflow: hidden;
  background: #382e40;
}
.artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 9, 21, 0.2) 50%,
    rgba(16, 9, 21, 0.72)
  );
  pointer-events: none;
}
.artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artwork img.failed {
  visibility: hidden;
}
.cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: #c2accb;
  font-size: 11px;
  background: #362b40;
}
.cover-fallback svg {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}
.status-badge {
  position: absolute;
  top: 11px;
  left: 12px;
  background: #19151de8;
  color: var(--mint);
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 1;
  text-transform: capitalize;
}
.owned-badge {
  display: none;
  position: absolute;
  top: 38px;
  left: 12px;
  z-index: 1;
  padding: 3px 7px;
  border-radius: 4px;
  background: #19151de8;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.map-card.is-owned .owned-badge {
  display: block;
}
.status-loved {
  color: #ff9fc6;
}
.status-graveyard,
.status-unknown,
.status-pending {
  color: #d2bedc;
}
.check-marker {
  position: absolute;
  right: 12px;
  top: 11px;
  width: 25px;
  height: 25px;
  border: 1.5px solid #ffffffb5;
  border-radius: 50%;
  background: #19151d80;
  display: grid;
  place-items: center;
  z-index: 1;
}
.check-marker svg {
  width: 16px;
  height: 16px;
  visibility: hidden;
}
.card-select[aria-pressed="true"] .check-marker {
  border-color: var(--pink);
  background: var(--pink);
  color: #251421;
}
.card-select[aria-pressed="true"] .check-marker svg {
  visibility: visible;
}
.cover-stars {
  position: absolute;
  bottom: 11px;
  right: 13px;
  z-index: 1;
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 17px;
  font-weight: 900;
  text-shadow: 0 1px 5px #120e18;
  font-variant-numeric: tabular-nums;
}
.cover-stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}
.card-body {
  display: block;
  padding: 13px 15px 0;
}
.card-artist {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 3px;
}
.card-title {
  display: block;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 21px;
}
.card-mapper {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
}
.card-match {
  display: block;
  color: var(--pink);
  font-size: 11px;
  font-weight: 750;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-weight: 800;
}
.fact small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-right: 0;
}
.diff-bars {
  display: flex;
  gap: 3px;
  align-items: center;
  max-width: 100px;
  overflow: hidden;
}
.diff-bar {
  width: 5px;
  height: 12px;
  border-radius: 2px;
  flex: none;
  background: currentColor;
  opacity: 0.55;
}
.diff-bar.is-match {
  opacity: 1;
  height: 16px;
}
.diff-count {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
}
.card-actions button {
  min-height: 40px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}
.card-details {
  background: var(--raised);
  color: var(--text);
}
.card-details:hover {
  background: #493c50;
}
.card-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--pink);
  color: #251421;
}
.card-download svg {
  width: 16px;
  height: 16px;
}
.card-download:hover:not(:disabled) {
  background: #ff9bc3;
}
.card-download:disabled {
  opacity: .6;
}
.difficulty-low {
  color: #8cdbed;
}
.difficulty-mid {
  color: #a5e0ad;
}
.difficulty-high {
  color: #ffe299;
}
.difficulty-expert {
  color: #ffaaa7;
}
.difficulty-master {
  color: #dfb1ff;
}
.difficulty-extreme {
  color: #ddd4ff;
}
.map-card:hover .card-title {
  color: var(--pink);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 27px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pagination button {
  font-size: 12px;
}
.pagination svg {
  width: 15px;
  height: 15px;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 70px 20px;
  background: var(--rail);
  border-radius: 14px;
}
.empty > svg {
  width: 32px;
  height: 32px;
  color: var(--pink);
  margin-bottom: 14px;
}
.empty h2 {
  margin-bottom: 9px;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  max-width: 48ch;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.inline-error {
  background: #422a32;
  color: #ffb3c0;
  padding: 12px 15px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 13px;
}
.gallery[aria-busy="true"] {
  opacity: 0.65;
}
.skeleton {
  height: 316px;
  border-radius: 14px;
  background: var(--surface);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 11px;
}
.page-footer a {
  color: var(--muted);
}
.unavailable-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #241b2be8;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.info-page {
  min-height: 100vh;
  padding: 40px 20px;
}
.info-page main {
  max-width: 640px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.info-page h1 { margin: 24px 0 26px; }
.info-page h2 { margin-bottom: 8px; }
.info-page section { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.info-page p { line-height: 1.65; }
.info-page p + p { margin-top: 12px; }
.info-page .study-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--pink);
  color: var(--canvas);
  font-weight: 800;
  text-decoration: none;
}
.info-page .study-contact:hover { background: #ffa3c6; }
.download-dock {
  position: fixed;
  z-index: 5;
  left: 252px;
  right: 0;
  bottom: 0;
  background: #261f2c;
  border-top: 1px solid #514058;
  padding: 15px 34px max(15px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px #100b1429;
}
.dock-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.batch-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}
.selection-button {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  padding: 5px 0;
  color: var(--pink);
}
.selection-button svg {
  width: 18px;
  height: 18px;
}
.selection-button strong {
  font-size: 13px;
}
.destination-button {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  max-width: 260px;
  padding: 9px 5px;
  min-height: 40px;
}
.top-actions .destination-button {
  margin-left: 0;
}
.destination-button:hover {
  color: var(--text);
}
.destination-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.destination-button svg {
  width: 17px;
  height: 17px;
}
.download-button {
  padding: 11px 20px;
  min-height: 44px;
  font-size: 13px;
  white-space: nowrap;
}
.download-dock .dock-main {
  justify-content: space-between;
}
.live-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.live-label span {
  color: var(--muted);
  margin-left: auto;
}
.live-label button {
  color: var(--pink);
}
progress {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: #48364d;
  accent-color: var(--pink);
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #48364d;
}
progress::-webkit-progress-value {
  background: var(--pink);
}
progress::-moz-progress-bar {
  background: var(--pink);
}
#live-progress {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
#live-progress progress {
  margin-top: 7px;
}
#hosted-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
}
.hosted .library-action {
  display: none;
}
.browser-batch-list {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.browser-batch-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.browser-batch-entry:last-child {
  border-bottom: 0;
}
.browser-batch-entry span {
  display: block;
  padding: 10px 2px;
  min-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#owned-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}
.owned-file-label {
  display: block;
  margin-top: 14px;
}
.owned-file-label input {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.recent-panel {
  margin-top: 30px;
  background: var(--rail);
  padding: 20px;
  border-radius: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.job {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.job-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.job-heading strong {
  font-size: 13px;
}
.job-heading button {
  font-size: 12px;
}
.job-stats {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
.job progress {
  margin-top: 12px;
}
.job details {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.job details p {
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.job-complete {
  color: var(--mint);
}
dialog {
  color: var(--text);
  background: var(--rail);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 16px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  box-shadow: 0 18px 70px #0d08166e;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #100b17c7;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.dialog-heading h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
}
.small-dialog {
  width: 440px;
}
.settings-dialog {
  width: 580px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.detail-dialog {
  width: 560px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 0;
  border: 0;
  padding: 0;
}
.dialog-close {
  position: absolute;
  right: 15px;
  top: 14px;
  z-index: 3;
  background: #19151de8;
  color: var(--text);
}
.detail-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--raised);
}
.detail-heading {
  padding: 24px 28px 20px;
}
.detail-heading > p {
  font-size: 13px;
  color: var(--pink);
  margin-bottom: 6px;
}
.detail-heading h2 {
  font-size: 24px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.detail-heading .muted {
  color: var(--muted);
  margin-top: 8px;
  font-size: 12px;
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.detail-actions a {
  font-size: 12px;
}
.detail-diffs {
  padding: 0 28px 28px;
}
.detail-diffs > h3 {
  margin-bottom: 12px;
}
.difficulty {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.difficulty-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}
.difficulty-heading strong {
  overflow-wrap: anywhere;
}
.difficulty-heading > span {
  font-weight: 850;
  white-space: nowrap;
}
.match-label {
  color: var(--mint);
  font-size: 11px;
  display: block;
  margin-bottom: 5px;
}
.diff-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  gap: 10px;
}
.diff-facts > span {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 750;
  gap: 3px;
}
.diff-facts small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin-top: 16px;
}
.score-cell {
  font-size: 11px;
  color: var(--muted);
}
.score-cell strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  margin-top: 4px;
}
.difficulty details {
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
.difficulty dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.difficulty dd {
  margin: 0;
}
.difficulty .source {
  font-size: 11px;
  overflow-wrap: anywhere;
  margin-top: 12px;
  color: var(--muted);
}
.quiet-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 18px;
}
.saved-entry,
.selection-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.saved-entry > button:first-child {
  flex: 1;
  text-align: left;
  padding: 8px 0;
  font-weight: 750;
}
.saved-entry small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.selection-entry > div {
  flex: 1;
  min-width: 0;
}
.selection-entry strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.selection-entry small {
  color: var(--muted);
  font-size: 11px;
}
.selection-entry img {
  width: 58px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
}
.selection-entry .icon-button {
  color: var(--pink);
}
#save-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
#save-form label {
  flex: 1;
}
.library-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.library-stats > div {
  background: var(--surface);
  padding: 12px;
  border-radius: 8px;
}
.library-stats strong {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.library-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.library-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 19px 0;
}
.library-action p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.library-action button {
  font-size: 12px;
}
.settings-dialog details {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
#ingest-progress {
  font-size: 12px;
  color: var(--pink);
  line-height: 1.6;
}
.notice {
  position: fixed;
  z-index: 20;
  top: 90px;
  right: 24px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 14px 20px;
  border-radius: 10px;
  background: var(--text);
  color: var(--canvas);
  font-weight: 750;
  font-size: 13px;
  box-shadow: 0 6px 20px #100b1755;
}
.notice.error {
  background: #ffb3c0;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  left: 10px;
  top: 10px;
  background: var(--pink);
  color: var(--canvas);
  padding: 12px;
}
.mobile-only {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .download-dock {
    left: max(252px, calc((100vw - 1800px) / 2 + 252px));
    right: max(0px, calc((100vw - 1800px) / 2));
  }
}
@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 224px minmax(0, 1fr);
  }
  .filters-panel {
    padding: 26px 20px 160px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main {
    padding: 26px 24px 160px;
  }
  .download-dock {
    left: 224px;
    padding: 13px 24px;
  }
  .topbar {
    padding: 0 25px;
    gap: 22px;
  }
  .brand {
    min-width: 180px;
  }
  .dock-main {
    gap: 10px;
  }
  .destination-button {
    max-width: 170px;
  }
  .download-button {
    padding: 11px 14px;
  }
}
@media (max-width: 840px) {
  .topbar {
    height: 64px;
    padding: 0 18px;
    gap: 16px;
  }
  .brand {
    font-size: 20px;
    min-width: 0;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .nav-current {
    display: none;
  }
  .top-actions {
    gap: 4px;
  }
  .top-actions .quiet {
    padding: 8px;
  }
  .top-actions .quiet span {
    display: none;
  }
  .top-actions svg {
    width: 20px;
    height: 20px;
  }
  .app-layout {
    display: block;
  }
  .filters-panel {
    display: none;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .filters-panel.open {
    display: block;
  }
  #filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .advanced {
    grid-column: 1/-1;
  }
  .advanced-fields {
    grid-template-columns: 1fr 1fr;
  }
  .advanced-fields .date-range {
    grid-column: 1/-1;
  }
  .date-fields {
    grid-template-columns: 1fr 1fr;
  }
  .filter-hint {
    margin: 20px 0 16px;
  }
  .mobile-only {
    display: inline-flex;
  }
  main {
    padding: 22px 18px 195px;
  }
  h1 {
    font-size: 23px;
  }
  .page-heading {
    margin-bottom: 18px;
  }
  .results-toolbar {
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .batch-actions {
    display: none;
    order: 3;
    width: 100%;
  }
  .batch-actions.open {
    display: flex;
  }
  .batch-actions .text-button {
    min-height: 40px;
  }
  #hosted-note {
    display: none;
  }
  .page-heading .secondary {
    font-size: 12px;
    padding: 9px 12px;
  }
  .gallery {
    gap: 14px;
  }
  .artwork {
    height: 130px;
  }
  .card-body {
    padding: 11px 12px 0;
  }
  .card-title {
    font-size: 14px;
  }
  .card-facts {
    gap: 5px;
  }
  .card-mapper {
    font-size: 11px;
  }
  .card-bottom {
    padding-right: 0;
  }
  .diff-bars {
    max-width: 58px;
  }
  .diff-count {
    font-size: 11px;
  }
  .card-actions button {
    min-height: 40px;
  }
  .cover-stars {
    font-size: 16px;
  }
  .download-dock {
    left: 0;
    right: 0;
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }
  .dock-main {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .batch-control {
    min-width: 0;
  }
  .download-button {
    min-width: 160px;
  }
  .results-count {
    gap: 10px;
  }
  .results-count strong {
    font-size: 12px;
  }
  .sort-label select {
    max-width: 140px;
    font-size: 11px;
  }
  .search-actions {
    gap: 5px;
  }
  .preset-row {
    gap: 6px;
  }
  .preset-row button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .pagination {
    font-size: 11px;
  }
  .pagination button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .page-footer {
    font-size: 11px;
  }
  .detail-dialog {
    width: 100%;
    max-width: 100vw;
  }
  .detail-cover {
    height: 195px;
  }
  input:not([type="range"]),
  select,
  textarea,
  .searchbar input,
  .advanced-fields input[type="date"] {
    font-size: 16px;
  }
  .primary,
  .secondary,
  .quiet,
  .icon-button,
  .text-button,
  button,
  input:not([type="range"]),
  select,
  summary {
    min-height: 44px;
  }
  .top-actions .quiet,
  .top-actions .destination-button,
  .text-button,
  .toggle-grid button,
  .preset-row button,
  .sort-label select,
  .card-actions button,
  .batch-actions .text-button {
    min-height: 44px;
  }
  .top-actions .quiet,
  .top-actions .destination-button {
    min-width: 44px;
  }
  .search-submit,
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .card-preview {
    width: 44px;
    height: 44px;
    top: 5px;
    right: 43px;
  }
  .page-footer {
    flex-wrap: wrap;
  }
  .page-footer a,
  .info-page a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
  }
  .brand {
    min-height: 44px;
  }
}
@media (max-width: 430px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .artwork {
    height: 152px;
  }
  .card-body {
    padding: 13px 16px 0;
  }
  .card-title {
    font-size: 16px;
  }
  .card-artist {
    font-size: 12px;
  }
  .card-mapper {
    font-size: 11px;
  }
  .card-facts {
    margin-top: 13px;
  }
  .card-bottom {
    height: 43px;
  }
  .diff-bars {
    max-width: 120px;
  }
  .card-details {
    font-size: 12px;
  }
  .diff-count {
    font-size: 11px;
  }
  .status-badge {
    font-size: 11px;
  }
  .cover-stars {
    font-size: 19px;
  }
  .results-count .text-button {
    font-size: 11px;
  }
  .active-row {
    align-items: flex-start;
  }
  .search-actions {
    margin-top: 2px;
  }
  .search-actions .text-button {
    font-size: 11px;
  }
  .library-stats {
    gap: 7px;
  }
  .library-stats strong {
    font-size: 15px;
  }
  .library-stats > div {
    padding: 10px;
  }
  .small-dialog,
  .settings-dialog {
    padding: 20px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .library-action p {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.15s ease,
      color 0.15s ease,
      box-shadow 0.15s ease;
  }
  .artwork img {
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .map-card:hover .artwork img {
    transform: scale(1.025);
  }
  .detail-dialog[open] {
    animation: panel-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes panel-in {
    from {
      transform: translateX(22px);
      opacity: 0.8;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
}
/* Second pass: keep maps close to search while retaining visible save/share. */
.active-row:not(.has-filters) {
  min-height: 30px;
  margin-bottom: 0;
  margin-top: -2px;
}
.results-toolbar {
  margin-top: 4px;
}
.preset-row {
  margin-bottom: 4px;
}
@media (max-width: 840px) {
  .top-actions .quiet span,
  .top-actions .destination-button span,
  .top-actions .destination-button svg:last-child {
    display: none;
  }
  .top-actions .quiet,
  .top-actions .destination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    padding: 7px;
  }
  .top-actions .quiet svg,
  .top-actions .destination-button svg {
    width: 18px;
    height: 18px;
  }
  .top-actions {
    gap: 5px;
  }
  .topbar {
    gap: 9px;
    padding: 0 16px;
  }
  .brand {
    font-size: 18px;
    gap: 7px;
  }
  .brand-mark {
    width: 25px;
    height: 25px;
  }
  .active-row:not(.has-filters) {
    margin-top: 0;
    min-height: 28px;
  }
  .page-heading {
    margin-bottom: 14px;
  }
  .searchbar {
    gap: 9px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
}
@media (max-width: 380px) {
  .brand-tail {
    display: none;
  }
  .brand {
    font-size: 17px;
  }
  .topbar {
    padding: 0 12px;
  }
}

.reviewed-labels {
  margin: 16px 0;
  padding: 12px;
  background: var(--raised);
  border-radius: 8px;
}
.reviewed-labels strong {
  font-size: 12px;
}
.review-label {
  color: var(--pink);
  font-weight: 700;
}
.label-review form {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.review-status {
  font-size: 12px;
  color: var(--muted);
}

.card-style-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  background: #19151de8;
  color: var(--text);
}
.card-style-label:empty {
  display: none;
}

/* Lazer-inspired triangles stay behind the Discover content. */
.app-layout > main {
  background-image: linear-gradient(to bottom, rgb(25 21 29 / 58%), var(--canvas) 940px), url("/lazer-triangles.svg");
  background-size: 100% 940px, 100% 820px;
  background-position: top left, top left;
  background-repeat: no-repeat;
}

/* Account: artwork on the left, the working form on the right. */
.account-topbar { display: none; }
.account-shell {
  min-height: 100svh;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 550px);
  place-items: stretch;
}
.account-brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #231b2b;
}
.account-brand-panel::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: 0;
  background: url("/lazer-triangles.svg") center / cover no-repeat;
  filter: blur(12px);
}
.account-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(125deg, rgb(25 21 29 / 48%), rgb(25 21 29 / 12%) 48%, rgb(25 21 29 / 42%));
}
.account-brand {
  position: absolute;
  z-index: 3;
  top: clamp(30px, 3vw, 44px);
  left: clamp(32px, 5vw, 76px);
}
.account-brand .brand-lockup { width: clamp(235px, 24vw, 310px); }
.account-art { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; pointer-events: none; }
.account-figure { position: relative; flex: none; width: min(84%, 690px); transform: translateY(10%); filter: drop-shadow(0 20px 55px rgb(15 10 20 / 45%)); }
.account-figure img { display: block; width: 100%; height: auto; }
.account-figure .account-art-board-logo { position: absolute; top: 60.8%; left: 50%; width: 62%; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 8px rgb(16 9 20 / 38%)); }
.account-panel {
  width: 100%;
  display: grid;
  align-items: center;
  padding: 48px clamp(36px, 5vw, 80px);
  border-left: 1px solid var(--line);
  background: #1b161f;
}
.account-panel-inner { width: min(400px, 100%); margin: 0 auto; }
.account-divider { margin: 25px 0 14px; }
.account-choice-list { gap: 22px; margin-bottom: 2px; }
.account-provider-item { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 66px; }
.account-provider {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: #322a38;
}
.account-provider:disabled { opacity: .48; }
.account-provider:not(:disabled):hover { border-color: var(--pink); background: var(--raised); }
.account-provider svg { width: 23px; height: 23px; stroke: none; }
.account-osu-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--pink); color: #42263a; font-size: 9px; font-weight: 1000; }
.account-provider-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.account-provider-item:has(:disabled) .account-provider-label { opacity: .6; }

@media (min-width: 761px) and (max-width: 1200px) {
  .account-figure { width: min(115%, 610px); }
}

@media (max-width: 760px) {
  .account-topbar { display: flex; background: #211c26 url("/lazer-triangles.svg") center / cover no-repeat; }
  .account-topbar .brand-lockup { width: 185px; }
  .account-shell { min-height: calc(100svh - 64px); display: block; }
  .account-brand-panel { display: none; }
  .account-panel { min-height: calc(100svh - 64px); padding: 50px 24px 32px; border-left: 0; align-items: start; }
  .account-panel-inner { max-width: 400px; }
}

@media (max-width: 840px) {
  .topbar .brand-lockup { width: 150px; }
}

@media (max-width: 430px) {
  .topbar .brand-lockup { width: 136px; }
}

@media (max-width: 380px) {
  .topbar .brand-lockup { display: none; }
  .topbar .brand-mark-only { display: block; }
}
