:root {
  color-scheme: dark;
  --bg: #0d0e11;
  --panel: #15171c;
  --line: rgba(255,255,255,.11);
  --muted: #9da1aa;
  --red: #e3222e;
  --red-dark: #8e0711;
  --cream: #f4f1e8;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--cream);
  background:
    radial-gradient(circle at 12% -5%, rgba(227,34,46,.18), transparent 32rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { color: inherit; }
.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; }

.topbar {
  min-height: 116px;
  padding: 24px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(13,14,17,.82);
  backdrop-filter: blur(16px);
}
.title-lockup { display: flex; align-items: center; gap: 15px; }
.set-mark {
  width: 56px; height: 56px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 8px 18px rgba(227,34,46,.3));
  flex: 0 0 auto;
}
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.65rem,3vw,2.5rem); font-weight: 500; letter-spacing: .035em; line-height: .95; text-transform: uppercase; }
h1 span { color: #f0535c; }
.progress-block { display: grid; grid-template-columns: auto minmax(120px,220px) auto; align-items: center; gap: 12px; }
.progress-copy { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.progress-copy strong { font-size: 1.35rem; }
.progress-copy span, .percent { color: var(--muted); font-size: .82rem; }
.progress-track { width: 100%; height: 7px; overflow: hidden; border-radius: 10px; background: #303139; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,#b70f1a,#ff4c56); transition: width .5s ease; }

main { width: min(1500px, 100%); margin: 0 auto; padding: 24px clamp(14px, 3.2vw, 48px) 52px; }
.dashboard { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.stat-card { grid-column: span 1; min-height: 112px; padding: 15px; display: flex; flex-direction: column; appearance: none; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: linear-gradient(145deg,#1a1c22,#131419); cursor: pointer; font: inherit; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease; }
.stat-card.wide { grid-column: span 2; }
.stat-card.accent { border-color: rgba(237,56,67,.42); background: linear-gradient(145deg,rgba(155,11,20,.38),#15161b); }
.stat-card:hover, .stat-card:focus-visible { border-color: rgba(255,91,101,.72); transform: translateY(-2px); outline: none; box-shadow: 0 10px 22px rgba(0,0,0,.26); }
.stat-card[aria-pressed="true"] { border-color: #ff5b65; background: linear-gradient(145deg,rgba(177,16,27,.58),#191a20); box-shadow: 0 0 0 2px rgba(255,91,101,.18); }
.stat-card span { color: #a8abb3; font-size: .76rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.stat-card strong { margin: auto 0 2px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.9rem,3vw,2.7rem); font-weight: 500; letter-spacing: .025em; line-height: 1; }
.stat-card small { overflow: hidden; color: #898c95; font-size: .72rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.stat-card.most-copies { min-height: 126px; }
#statMostCards { overflow: visible; text-overflow: clip; white-space: pre-line; }
.stat-card.top-runs { min-height: 146px; }
#statRunCount { font-size: clamp(1.05rem,2vw,1.5rem); line-height: 1.35; white-space: pre-line; }
#statRunRange { overflow: visible; text-overflow: clip; white-space: pre-line; }
#statRunRange:empty { display: none; }
.control-panel { margin-bottom: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(21,23,28,.94); }
.control-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.search-wrap { position: relative; flex: 1 1 340px; max-width: 460px; }
.search-wrap svg { position: absolute; top: 50%; left: 14px; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: #a8aab1; stroke-width: 2; stroke-linecap: round; }
.search-wrap input { width: 100%; min-height: 46px; padding: 10px 15px 10px 43px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--cream); background: #17191e; font-size: 1rem; }
.search-wrap input:focus { border-color: rgba(255,70,81,.75); box-shadow: 0 0 0 3px rgba(227,34,46,.14); }
.jump-wrap { display: flex; align-items: center; gap: 9px; color: #9ea1aa; font-size: .73rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.jump-wrap select { width: min(300px,28vw); min-height: 46px; padding: 9px 34px 9px 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--cream); background: #17191e; font-size: .86rem; letter-spacing: 0; text-transform: none; }
.jump-wrap select:focus { border-color: rgba(255,70,81,.75); box-shadow: 0 0 0 3px rgba(227,34,46,.14); }
.reset-button { min-height: 44px; padding: 8px 13px; border: 1px solid #3b3d46; border-radius: 8px; color: #d4d5d9; background: #24262c; cursor: pointer; font-size: .82rem; font-weight: 750; }
.reset-button:hover { background: #30323a; }
.filter-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.filter-grid label { min-width: 0; color: #9ea1aa; font-size: .73rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.filter-grid select { width: 100%; min-height: 43px; margin-top: 6px; padding: 8px 30px 8px 10px; border: 1px solid #353740; border-radius: 7px; outline: none; color: #f0eee7; background: #101116; font-size: .78rem; text-transform: none; }
.filter-grid select:focus { border-color: rgba(255,70,81,.75); box-shadow: 0 0 0 3px rgba(227,34,46,.14); }
.filter-note { margin: 10px 0 0; color: #777a83; font-size: .72rem; }
.hint { margin: 0 0 0 auto; color: #858891; font-size: .79rem; }
.mobile-hint { display: none; }
.results-bar { min-height: 42px; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.results-bar > div { display: flex; align-items: baseline; gap: 10px; }
.results-bar strong { font-size: .88rem; }
.results-bar span { color: #9699a2; font-size: .78rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(142px,1fr)); gap: clamp(10px,1.2vw,17px); }
.card {
  position: relative;
  min-height: 205px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: default;
  isolation: isolate;
  background: transparent;
}
.card-face {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  background:
    repeating-radial-gradient(ellipse at 20% 20%, transparent 0 9px, rgba(255,255,255,.08) 10px 12px, transparent 13px 23px),
    linear-gradient(145deg,#ee3944 0%,#87040d 48%,#d21622 100%);
  box-shadow: 0 10px 22px rgba(0,0,0,.28), inset 0 0 0 3px rgba(0,0,0,.2);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
  isolation: isolate;
}
.card.has-rookie-banners .card-face { border-radius: 10px 10px 0 0; }
.card-face::after { content: ""; position: absolute; inset: 5px; z-index: 3; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; pointer-events: none; }
.card-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card-face.has-card-scan .card-image { object-fit: contain; object-position: center; }
.image-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(10,11,14,.05) 20%,rgba(10,11,14,.25) 58%,rgba(10,11,14,.94) 100%); }
.card.owned { cursor: pointer; }
.card.owned .card-face { border-color: #343b48; background: linear-gradient(145deg,#141b26,#05070b 72%); box-shadow: 0 10px 22px rgba(0,0,0,.42), inset 0 0 0 3px rgba(98,116,145,.12); }
.card.owned:hover, .card.owned:focus-within { z-index: 60; }
.card.owned:hover .card-face, .card.owned:focus-visible .card-face { transform: translateY(-4px); box-shadow: 0 17px 32px rgba(0,0,0,.5), 0 0 0 2px rgba(118,132,154,.42); }
.card.owned.landscape-owned .card-face.has-card-scan { border-color: #343b48; background: linear-gradient(145deg,#141b26,#05070b 72%); box-shadow: 0 10px 22px rgba(0,0,0,.42), inset 0 0 0 3px rgba(98,116,145,.12); }
.card.owned.landscape-owned .image-shade { background: linear-gradient(180deg,rgba(4,7,12,.02) 18%,rgba(4,7,12,.16) 55%,rgba(4,7,12,.97) 100%); }
.card:focus-visible { outline: none; }
.card.needed .card-face { border-color: #373941; color: #a9abb1; background: linear-gradient(145deg,#2c2e34,#15161a); box-shadow: inset 0 0 0 3px rgba(0,0,0,.25); }
.card.needed .card-image { filter: grayscale(1) contrast(1.08); }
.card.needed .card-face.has-image { background: #181a1f; }
.card.needed .card-face.has-card-scan { background: #090a0c; }
.card.needed .card-face.has-card-scan .card-image { object-fit: contain; object-position: center; }
.card.needed .card-face.has-card-scan .image-shade { background: linear-gradient(180deg,rgba(10,11,14,.04) 24%,rgba(10,11,14,.18) 55%,rgba(10,11,14,.92) 100%); }
.card.needed .card-face::before { content: "NEEDED"; position: absolute; top: 47%; left: 50%; color: rgba(255,255,255,.075); font: 500 1.5rem Impact, sans-serif; letter-spacing: .12em; transform: translate(-50%,-50%) rotate(-32deg); }
.card.needed .card-face.has-image::before { display: none; }
.searching-stamp {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: calc(100% - 18px);
  box-sizing: border-box;
  padding: 8px 8px 6px;
  border: 3px solid currentColor;
  border-radius: 1px;
  color: rgba(142, 5, 18, var(--stamp-ink, .92));
  background: transparent;
  box-shadow: inset var(--stamp-echo-x, 0) var(--stamp-echo-y, 0) 0 rgba(120, 12, 20, .24);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 900;
  -webkit-text-stroke: .35px currentColor;
  letter-spacing: clamp(.08rem, .28vw, .28rem);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: .45px 0 currentColor, -.45px 0 currentColor, 0 .45px currentColor, 0 -.45px currentColor, var(--stamp-echo-x, 0) var(--stamp-echo-y, 0) 0 rgba(75, 2, 10, .34);
  transform: translate(calc(-50% + var(--stamp-x, 0px)),calc(-50% + var(--stamp-y, 0px))) rotate(var(--stamp-angle, -8deg)) scale(var(--stamp-scale, 1));
  filter: blur(var(--stamp-blur, 0));
  clip-path: polygon(1% 4%, 98% 0, 100% 94%, 97% 100%, 2% 97%, 0 8%);
  pointer-events: none;
}
.searching-stamp::before { content: ""; position: absolute; inset: 2px 1px 1px 2px; border: 2px solid currentColor; opacity: .38; transform: translate(var(--stamp-echo-x, 0),var(--stamp-echo-y, 0)); }
.searching-stamp::after { content: ""; position: absolute; inset: -1px; opacity: .16; background: repeating-linear-gradient(98deg,transparent 0 7px,rgba(14,14,16,.8) 8px 9px,transparent 10px 16px); mix-blend-mode: multiply; pointer-events: none; }
.card-number { position: relative; z-index: 4; align-self: flex-start; min-width: 34px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px; color: white; background: rgba(0,0,0,.46); font-size: .74rem; font-weight: 850; }
.player-block { position: relative; z-index: 4; }
.parallel { display: block; margin-bottom: 5px; color: rgba(255,255,255,.72); font-size: .62rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.player { display: block; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.12rem,1.6vw,1.48rem); font-weight: 500; letter-spacing: .025em; line-height: .98; text-transform: uppercase; }
.card.needed .parallel, .card.needed .card-number { color: #83868e; border-color: #454750; }
.card.needed .card-face.has-card-scan .card-number { color: #fff; border-color: rgba(255,255,255,.38); }
.card.needed .card-face.has-card-scan .parallel { color: rgba(255,255,255,.78); }
.card.needed .card-face.has-card-scan .player { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.9); }
.copy-count { position: absolute; top: 10px; right: 10px; padding: 3px 7px; border-radius: 999px; color: white; background: rgba(12,13,16,.52); font-size: .68rem; font-weight: 800; }
.rookie-banners { display: grid; width: 100%; gap: 0; margin-top: -1px; overflow: hidden; border-radius: 0 0 10px 10px; box-shadow: 0 6px 12px rgba(0,0,0,.28); transition: transform .18s ease; }
.card.owned:hover .rookie-banners, .card.owned:focus-visible .rookie-banners { transform: translateY(-4px); }
.rookie-banner { display: block; width: 100%; box-sizing: border-box; padding: 6px 8px 5px; border-radius: 0; box-shadow: none; font-size: .65rem; font-weight: 900; letter-spacing: .08em; line-height: 1.1; text-align: center; text-transform: uppercase; }
.rookie-banner + .rookie-banner { border-top-width: 0; }
.rookie-banner:last-child { border-radius: 0 0 10px 10px; }
.rookie-card-banner { border: 1px solid #f3d36b; color: #fff; background: #102b50; }
.rookie-gold-cup-banner { border: 1px solid #f3d36b; color: #17130a; background: linear-gradient(180deg,#f1d36a 0%,#c99520 100%); }

.copy-panel {
  position: fixed;
  z-index: 1000;
  top: 50%; left: 50%;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 11px;
  border: 1px solid #444650;
  border-radius: 9px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: #eee;
  background: rgba(18,19,24,.98);
  box-shadow: 0 18px 45px rgba(0,0,0,.6);
  transform: translate(-50%,-50%) scale(.98);
  transition: opacity .13s ease, transform .13s ease;
}
.card:hover .copy-panel, .card:focus-within .copy-panel, .card.is-hovered .copy-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.copy-panel h3 { margin: 0 0 8px; font-size: .82rem; }
.card-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 11px; }
.card-gallery.missing-gallery { grid-template-columns: minmax(0,180px); justify-content: center; }
.detail-image { position: relative; margin: 0; overflow: hidden; border: 1px solid #3b3e47; border-radius: 7px; background: #0c0d11; }
.detail-image img, .image-placeholder { width: 100%; aspect-ratio: 2.5 / 3.5; display: flex; align-items: center; justify-content: center; object-fit: contain; }
.detail-image img { height: auto; }
.image-zoom { width: 100%; padding: 0; display: block; border: 0; color: inherit; background: transparent; cursor: zoom-in; }
.image-placeholder { padding: 10px; color: #8e929b; background: linear-gradient(145deg,#24262c,#121318); text-align: center; font-size: .72rem; font-weight: 800; line-height: 1.35; text-transform: uppercase; }
.image-placeholder small { color: #666a73; font-size: .62rem; font-weight: 600; }
.detail-image figcaption { padding: 5px 7px; color: #aeb0b7; background: #1d1f25; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-align: center; text-transform: uppercase; }
.detail-image.is-missing img { filter: grayscale(1) contrast(1.08); }
.preview-missing-stamp { position: absolute; z-index: 2; top: 45%; left: 50%; width: calc(100% - 14px); padding: 5px 3px 3px; border: 3px solid currentColor; border-radius: 1px; color: rgba(142,5,18,var(--stamp-ink,.92)); font-family: "Courier New",ui-monospace,monospace; font-size: 1.5rem; font-weight: 900; -webkit-text-stroke: .35px currentColor; letter-spacing: .09rem; line-height: 1; text-align: center; text-shadow: .45px 0 currentColor,-.45px 0 currentColor,0 .45px currentColor,0 -.45px currentColor,var(--stamp-echo-x,0) var(--stamp-echo-y,0) 0 rgba(75,2,10,.34); transform: translate(calc(-50% + var(--stamp-x,0px)),calc(-50% + var(--stamp-y,0px))) rotate(var(--stamp-angle,-8deg)) scale(var(--stamp-scale,1)); filter: blur(var(--stamp-blur,0)); clip-path: polygon(1% 4%,98% 0,100% 94%,97% 100%,2% 97%,0 8%); }
.preview-missing-stamp::before { content: ""; position: absolute; inset: 2px 1px 1px 2px; border: 2px solid currentColor; opacity: .38; transform: translate(var(--stamp-echo-x,0),var(--stamp-echo-y,0)); }
.serial-choice { padding: 3px 6px; border: 1px solid #4a4d56; border-radius: 4px; color: #ff7a82; background: #25272e; cursor: pointer; font: inherit; font-weight: 850; }
.serial-choice:hover, .serial-choice:focus-visible, .serial-choice.is-selected { border-color: #ff5b65; color: #fff; background: #c91622; outline: none; }
.serial-unavailable { padding: 3px 6px; color: #666a73; }
.missing-copy-note { margin: 0; color: #aeb0b7; font-size: .75rem; text-align: center; }
.copy-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.copy-table th, .copy-table td { padding: 5px 4px; border-top: 1px solid rgba(255,255,255,.09); }
.copy-table th { width: 40%; color: #a8abb3; text-align: left; font-weight: 650; }
.copy-table td { text-align: right; font-weight: 800; }
.copy-table .not-owned { color: #666a73; font-weight: 500; }
.copy-table .is-owned { color: #ff6871; }
.unlisted-note { margin: 9px 0 0; color: #b8bac1; font-size: .72rem; line-height: 1.35; }

.empty-state { padding: 72px 20px; border: 1px dashed #363841; border-radius: 10px; color: #9699a2; text-align: center; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px clamp(18px,4vw,64px); border-top: 1px solid var(--line); color: #737680; font-size: .73rem; letter-spacing: .08em; text-transform: uppercase; }

.detail-dialog { width: min(430px,calc(100% - 28px)); padding: 0; border: 1px solid #41434d; border-radius: 13px; color: #f2f0e9; background: #17181d; box-shadow: 0 28px 80px rgba(0,0,0,.7); }
.detail-dialog::backdrop { background: rgba(4,5,7,.78); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 3px 0 0; font-size: 1.35rem; line-height: 1.1; }
.dialog-number { color: #f2535d; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: #c7c8cc; background: #24262c; cursor: pointer; font-size: 1.6rem; line-height: 1; }
#dialogTable { padding: 14px 18px 20px; }
#dialogTable .copy-table { font-size: .95rem; }
#dialogTable .copy-table th, #dialogTable .copy-table td { padding: 10px 4px; }
.image-dialog { width: min(94vw,1100px); max-height: 94vh; padding: 12px 14px 14px; border: 1px solid #41434d; border-radius: 13px; color: #f2f0e9; background: #0c0d11; box-shadow: 0 28px 80px rgba(0,0,0,.82); }
.image-dialog::backdrop { background: rgba(2,3,5,.9); backdrop-filter: blur(5px); }
.image-dialog-tools { min-height: 40px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 46px; }
.rotate-image-button { min-width: 44px; min-height: 40px; padding: 4px 12px; border: 1px solid #474a54; border-radius: 7px; color: #f4f1ea; background: #24262c; cursor: pointer; font: inherit; font-size: 1.5rem; line-height: 1; font-weight: 800; }
.rotate-image-button:hover, .rotate-image-button:focus-visible { border-color: #ff5b65; background: #343740; outline: none; }
.image-stage { width: 100%; height: min(76vh,850px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.image-stage img { display: block; max-width: none; max-height: none; object-fit: contain; transition: transform .18s ease; }
.image-dialog p { margin: 9px 0 0; color: #b8bac1; font-size: .82rem; text-align: center; }
.image-dialog-close { position: absolute; top: 8px; right: 8px; z-index: 2; }

@media (max-width: 760px) {
  .image-dialog[open] {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) 12px calc(84px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }
  .image-dialog-tools {
    position: fixed;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 6;
    min-height: 48px;
    flex-wrap: nowrap;
    padding: 7px;
    border: 1px solid #474a54;
    border-radius: 999px;
    background: rgba(12,13,17,.96);
    box-shadow: 0 8px 28px rgba(0,0,0,.55);
    transform: translateX(-50%);
  }
  .image-dialog-close {
    position: static;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .rotate-image-button { min-width: 48px; min-height: 44px; flex: 0 0 48px; }
  .image-stage { height: calc(100dvh - 132px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .image-dialog p { margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 20px; padding: 20px 17px; }
  .set-mark { width: 48px; height: 48px; }
  .progress-block { width: 100%; grid-template-columns: auto 1fr auto; }
  .dashboard { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card, .stat-card.wide { grid-column: span 1; min-height: 104px; }
  .stat-card.wide { grid-column: span 2; }
  .control-head { align-items: stretch; flex-direction: column; }
  .search-wrap { flex-basis: auto; max-width: none; }
  .jump-wrap { width: 100%; align-items: stretch; flex-direction: column; gap: 6px; }
  .jump-wrap select { width: 100%; }
  .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .results-bar { align-items: flex-start; flex-direction: column; gap: 6px; }
  .results-bar > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .hint { margin: 0; }
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .card { min-height: 0; }
  .copy-panel { display: none; }
  .player { font-size: clamp(1rem,5.1vw,1.3rem); }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .dashboard { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .stat-card { grid-column: span 1; }
  .stat-card.wide { grid-column: span 2; }
  .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (min-width: 761px) {
  .searching-stamp { width: calc(100% - 28px); padding: 7px 5px 5px; border-width: 3px; font-size: clamp(1.05rem,1.45vw,1.45rem); letter-spacing: .08em; }
  .preview-missing-stamp { width: calc(100% - 24px); border-width: 3px; font-size: 1.15rem; letter-spacing: .07rem; }
}

@media (min-width: 1181px) {
  .dashboard { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

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