:root {
  --bg: #f4f6f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --line: #c5ccd8;
  --text: #11141b;
  --muted: #3a4250;
  --red: #c62828;
  --yellow: #b8860b;
  --gold: #9a7210;
  --blue: #1e3a8a;
  --ok: #157347;
  --shadow: 0 14px 36px rgba(17, 20, 27, 0.1);
  --tcg-w: 180px;
  --tcg-h: 251px;
  --tcg-detail-w: 245px;
  --tcg-detail-h: 342px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Sans TC", sans-serif;
  background: #f4f6f9;
  color: var(--text);
  letter-spacing: 0.01em;
}
.foil-wash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244,246,249,0.55), rgba(244,246,249,0.92)),
    url("/img/foil.jpg") center/cover;
  opacity: 0.06;
  z-index: 0;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  padding-bottom: 8px;
}
.hero-art {
  position: absolute;
  inset: 0;
  background: url("/img/hero.jpg?v=3") center 42%/cover no-repeat;
  transform: scale(1.04);
}
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0.78) 48%, rgba(244,246,249,0.97) 100%),
    radial-gradient(700px 280px at 80% 10%, rgba(255,203,5,0.12), transparent 60%);
}
.hero-glow::after {
  content: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px 0;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 8px 0 22px;
}
.brand { display: flex; gap: 16px; align-items: center; cursor: pointer; }
.logo {
  width: 168px;
  height: 124px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 0 0 2px var(--gold), 0 10px 24px rgba(17,20,27,0.12);
}
.kicker {
  margin: 0 0 2px;
  font-family: "Share Tech Mono", Sora, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.brand h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: #0d1016;
  text-shadow: none;
}
.brand p { margin: 6px 0 0; color: #2c3340; font-size: 13px; font-weight: 500; }
.top-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; justify-content: flex-end; }
.top-actions #uiLang { min-width: 118px; }
.seg { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #2c3340; font-weight: 600; }
select, input {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
}
.ghost, .danger, .go {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}
.ghost {
  background: #ffffff;
  color: var(--text);
  border: 1px solid #b7c0ce;
  backdrop-filter: none;
}
.danger { background: #fdecea; color: #8a1f16; border: 1px solid #e7b4ad; }
.go {
  background: linear-gradient(180deg, #ffe37a, #f0c419 55%, #c99608);
  color: #1a1403;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(255, 203, 5, 0.25);
}
.mini-poke {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(#fff 50%, var(--red) 50%);
  border: 2px solid #111;
  position: relative;
  flex: 0 0 auto;
}
.mini-poke::after {
  content: "";
  position: absolute; inset: 4px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 50%;
}
#watchCount {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.search-panel {
  background: #ffffff;
  border: 1px solid #c5ccd8;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: stretch; }
#q { font-size: 16px; padding: 15px 16px; min-width: 0; }
.scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  color: #7a5a08;
  background: #fff8e6;
  border: 1px solid #c9a227;
  backdrop-filter: none;
}
.scan-btn:hover { border-color: #9a7210; background: #ffefc2; }
.scan-ico { flex: 0 0 auto; }
.scan-dialog {
  border: 0;
  padding: 0;
  width: min(520px, calc(100% - 16px));
  background: #ffffff;
  color: var(--text);
  border: 1px solid #c5ccd8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scan-dialog::backdrop { background: rgba(17, 20, 27, 0.45); }
.scan-stage {
  position: relative;
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: 62vh;
  overflow: hidden;
}
.scan-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}
.scan-frame {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 12%;
  height: 18%;
  border: 2px solid var(--yellow);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}
.scan-hint {
  margin: 12px 16px 0;
  font-size: 13px;
  color: #2c3340;
  text-align: center;
}
.scan-status {
  margin: 6px 16px 0;
  min-height: 1.3em;
  font-size: 13px;
  color: #7a5a08;
  text-align: center;
}
.scan-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 16px 16px;
}
.scan-bar .go { min-width: 120px; }
.scan-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.filters { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #2c3340; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  background: #ffffff;
  border: 1px solid #b7c0ce;
  border-radius: 999px;
  padding: 7px 13px;
  color: #11141b;
  font-weight: 600;
}
.chip:hover { border-color: var(--gold); color: #7a5a08; }

.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: 0 0 4px;
  margin-top: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.65));
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img {
  width: 120px;
  height: 168px;
  object-fit: cover;
  object-position: center center;
  flex: 0 0 120px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(17,20,27,0.12);
  border: 1px solid #d0d6e0;
  opacity: 0;
  background: #e8ecf2;
}
.marquee img.is-ready { opacity: 1; }
.marquee img.is-broken { display: none !important; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 28px 80px;
}
.showcase { margin: 8px 0 6px; }
.showcase-banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid #c5ccd8;
  box-shadow: var(--shadow);
}
.showcase-banner img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 30%;
}
.showcase-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.94) 42%, #ffffff 100%);
  color: #0d1016;
}
.showcase-copy h2 { margin: 0; font-size: 28px; color: #0d1016; }
.showcase-copy p { margin: 6px 0 0; color: #2c3340; font-weight: 600; }
.is-search .showcase,
.is-search .center-tool,
.is-search .era-rail,
.is-search .type-strip,
.is-search .marquee { display: none; }
.era-rail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 0;
}
.era-rail li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #11141b;
  border: 1px solid #b7c0ce;
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
}
.era-rail b {
  font-family: "Share Tech Mono", Sora, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.era-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  color: #111;
  white-space: nowrap;
}
.era-year {
  font-family: "Share Tech Mono", Sora, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.era-base { background: #e3350d; color: #fff; }
.era-neo { background: #c9a227; }
.era-ex { background: #3b4cca; color: #fff; }
.era-dp { background: #4fc3f7; }
.era-hgss { background: #d4a017; }
.era-bw { background: #eceff1; }
.era-xy { background: #ff6f00; color: #fff; }
.era-sm { background: #f8d030; }
.era-swsh { background: #1565c0; color: #fff; }
.era-sv { background: #26a69a; color: #fff; }
.era-mega { background: #b71c1c; color: #fff; }
.era-now { background: #90a4ae; }
.card.era-base { border-left: 4px solid #e3350d; }
.card.era-neo { border-left: 4px solid #c9a227; }
.card.era-ex { border-left: 4px solid #3b4cca; }
.card.era-dp { border-left: 4px solid #4fc3f7; }
.card.era-hgss { border-left: 4px solid #d4a017; }
.card.era-bw { border-left: 4px solid #cfd8dc; }
.card.era-xy { border-left: 4px solid #ff6f00; }
.card.era-sm { border-left: 4px solid #f8d030; }
.card.era-swsh { border-left: 4px solid #1565c0; }
.card.era-sv { border-left: 4px solid #26a69a; }
.card.era-mega { border-left: 4px solid #b71c1c; }
.status { color: #2c3340; font-size: 15px; font-weight: 600; margin: 16px 2px; min-height: 1.4em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  align-items: stretch;
}
body.is-home .grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.grid-label {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #11141b;
  font-family: "Share Tech Mono", Sora, sans-serif;
}
.card {
  background: #ffffff;
  border: 1px solid #c5ccd8;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-align: left;
  padding: 0;
  min-width: 0;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 24px rgba(17,20,27,0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #9a7210;
  box-shadow: 0 16px 32px rgba(17,20,27,0.12);
}
.holo {
  pointer-events: none;
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.1) 40%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.card:hover .holo { opacity: 1; }
.card.type-fire { border-color: #c86828; }
.card.type-water { border-color: #4a78d0; }
.card.type-grass { border-color: #5aa03c; }
.card.type-lightning { border-color: #d4b020; }
.card.type-psychic { border-color: #d05078; }
.card.type-fighting { border-color: #a02820; }
.card.type-darkness { border-color: #584838; }
.card.type-metal { border-color: #9090a8; }
.card.type-fairy { border-color: #d08098; }
.card.type-dragon { border-color: #6030c8; }
.rank {
  position: absolute;
  z-index: 3;
  top: 6px;
  left: 6px;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7c56a;
  color: #16120a;
  font: 800 12px/1.7em Sora, sans-serif;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.rank.top {
  background: linear-gradient(180deg, #ffe7a3, #d4a84b);
  min-width: 1.9em;
  height: 1.9em;
  font-size: 13px;
  line-height: 1.9em;
}
.art {
  background: #e8ecf2;
  width: var(--tcg-w);
  height: var(--tcg-h);
  flex: 0 0 var(--tcg-w);
  overflow: hidden;
  padding: 0;
  margin: 0;
  align-self: center;
  position: relative;
}
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/foil.jpg") center/cover;
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.card:hover .art::after { opacity: 0.32; }
.art-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e8ecf2;
}
.art img,
.art .card-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
  border: 0;
  opacity: 0;
}
.art img.is-ready,
.art .card-img.is-ready {
  opacity: 1;
}
.art img.is-broken,
.art .card-img.is-broken,
.sheet-art img.is-broken,
.watch-item img.is-broken {
  display: none !important;
}
.art-missing {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #3a4250;
  font-size: 13px;
  background: repeating-linear-gradient(-45deg, #eef1f5, #eef1f5 8px, #e4e8ee 8px, #e4e8ee 16px);
}
.meta {
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}
.meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  flex-wrap: wrap;
}
.card-no {
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #7a5a08;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.name {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  color: #0d1016;
  text-shadow: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.setline {
  color: #2c3340;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  font-size: 12px;
  color: #2c3340;
  font-weight: 600;
  min-width: 0;
  flex-wrap: wrap;
}
.price-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.price-row > span:last-child {
  margin-left: auto;
  text-align: right;
}
.price,
.psa,
.snkr,
.pc,
.pop,
.buyback {
  font-family: Sora, sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}
.price {
  font-size: 16px;
  color: #7a5a08;
  font-weight: 800;
}
.psa {
  font-size: 15px;
  color: #0f6b3a;
  font-weight: 800;
}
.pop {
  font-size: 15px;
  color: #1d4f91;
  font-weight: 800;
}
.snkr {
  font-size: 15px;
  color: #0b5f78;
  font-weight: 800;
}
.pc {
  font-size: 15px;
  color: #8a4b00;
  font-weight: 800;
}
.buyback {
  font-size: 15px;
  color: #b42318;
  font-weight: 800;
}
.buyback-hot {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #e3350d;
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: middle;
}
.buyback-info,
.buyback-line {
  color: #b42318;
  font-weight: 700;
}
.buyback-line {
  font-size: 18px;
  margin: 8px 0 4px;
}
.buyback-match,
.buyback-alt {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.type-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.type-chip {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  color: #111;
}
.hp {
  margin-left: auto;
  font-family: Sora, sans-serif;
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
}
.t-fire { background: #f08030; }
.t-water { background: #6890f0; }
.t-grass { background: #78c850; }
.t-lightning { background: #f8d030; }
.t-psychic { background: #f85888; }
.t-fighting { background: #c03028; color: #fff; }
.t-darkness { background: #705848; color: #fff; }
.t-metal { background: #b8b8d0; }
.t-fairy { background: #ee99ac; }
.t-dragon { background: #7038f8; color: #fff; }
.t-colorless { background: #a8a878; }
.type-strip { display: none; }
.trend {
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  padding: 5px 8px;
  width: fit-content;
}
.trend-up { background: #e8f6ec; color: #0f6b3a; }
.trend-down { background: #fdecea; color: #8a1f16; }
.trend-flat, .trend-wait { background: #eef1f5; color: #2c3340; }
.trend-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.trend-panel p { margin: 6px 0 0; line-height: 1.5; font-size: 13px; }
.trend-title { font-weight: 700; }
.trend-panel.trend-up { background: #e8f6ec; border-color: #8ecda3; }
.trend-panel.trend-down { background: #fdecea; border-color: #e7b4ad; }
.trend-panel.trend-flat { background: #eef1f5; }
.trend-votes {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}
.trend-votes li { margin: 3px 0; }
.trend-src { font-weight: 700; }
.up { color: #0f6b3a; font-weight: 800; }
.down { color: #8a1f16; font-weight: 800; }
.foot {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 28px 28px;
  color: var(--muted);
  font-size: 12px;
  font-family: "Share Tech Mono", "Noto Sans TC", sans-serif;
  letter-spacing: 0.04em;
}
.subprice {
  font-size: 11px;
  line-height: 1.45;
  color: #2c3340;
  margin-top: auto;
  padding-top: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.badge {
  font-size: 11px;
  line-height: 1.2;
  background: #fff4d4;
  color: #7a5a08;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.missing { color: #3a4250; font-size: 14px; line-height: 1.4; font-weight: 600; }

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}
.pager button { background: #ffffff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: #ffffff;
  border-left: 1px solid var(--line);
  z-index: 20;
  padding: 18px;
  overflow: auto;
}
.drawer-head, .drawer-foot { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; }
.watch-total { font-family: Sora, sans-serif; color: #7a5a08; font-size: 22px; font-weight: 800; }
.watch-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.watch-item img {
  width: 45px;
  height: 63px;
  object-fit: cover;
  object-position: center center;
  border-radius: 4px;
  opacity: 0;
  background: #e8ecf2;
}
.watch-item img.is-ready { opacity: 1; }
.scrim {
  position: fixed; inset: 0;
  background: rgba(17,20,27,0.35);
  z-index: 15;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 1080px;
  width: calc(100% - 24px);
  max-height: 92vh;
  margin: auto;
}
dialog::backdrop { background: rgba(17, 20, 27, 0.45); }
.sheet {
  position: relative;
  background: #ffffff;
  border: 1px solid #c5ccd8;
  border-radius: 20px;
  display: grid;
  grid-template-columns: calc(var(--tcg-detail-w) + 24px) minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  max-height: 92vh;
  min-height: 0;
  box-shadow: 0 24px 60px rgba(17,20,27,0.18);
}
.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: 1px solid #b7c0ce;
  border-radius: 999px;
  background: #ffffff;
  color: #11141b;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(17,20,27,0.12);
}
.sheet-close:hover { background: #11141b; color: #ffffff; border-color: #11141b; }
.sheet-art {
  width: var(--tcg-detail-w);
  height: var(--tcg-detail-h);
  max-height: none;
  padding: 0;
  margin: 12px;
  overflow: hidden;
  position: sticky;
  top: 12px;
  background: #e8ecf2;
  box-sizing: border-box;
  border-radius: 12px;
  flex: 0 0 auto;
}
.sheet-art .art-ph {
  position: absolute;
  inset: 0;
}
.sheet-art img,
.sheet-art .art-missing {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border: 0;
  border-radius: 0;
}
.sheet-art img { opacity: 0; }
.sheet-art img.is-ready { opacity: 1; }
.sheet-body {
  padding: 20px 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  min-height: 0;
  max-height: 92vh;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.sheet-body h2 {
  margin: 0;
  padding-right: 48px;
  font-size: 26px;
  line-height: 1.25;
  color: #0d1016;
  text-shadow: none;
}
.sheet-body h3 {
  margin: 22px 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #11141b;
}
.sheet-body h3:first-of-type { margin-top: 18px; }
.kv {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.55;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}
.kv .era-chip { margin-right: 4px; }
.kv .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 10px;
  border-radius: 50%;
  background: #8a93a3;
  flex: 0 0 auto;
}
.price-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 4px;
  font-size: 14px;
  table-layout: auto;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
  color: #11141b;
}
.price-table th { color: #2c3340; }
.price-table td:first-child { color: #11141b; }
.price-table td:not(:first-child), .price-table th:not(:first-child) {
  font-family: Sora, sans-serif;
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
}
.sheet-body .subprice { margin: 6px 0 0; }
.src-note { font-size: 11px; color: #2c3340; font-weight: 600; margin-top: 2px; }
.src-link { font-size: 12px; color: #7a5a08; text-decoration: none; margin-left: 6px; font-weight: 700; }
.src-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.src-actions a {
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #b7c0ce;
  border-radius: 999px;
  padding: 6px 12px;
  color: #11141b;
  font-size: 12px;
  font-weight: 600;
}
.sheet-body .missing { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.actions a, .actions button {
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #b7c0ce;
  border-radius: 10px;
  padding: 9px 12px;
  color: #11141b;
  font-weight: 600;
}
.actions .primary { background: #f0c419; color: #1a1403; border: 0; font-weight: 800; }

.empty, .error {
  grid-column: 1 / -1;
  padding: 40px 12px;
  text-align: center;
  color: var(--muted);
}

.center-tool {
  position: relative;
  z-index: 1;
  margin: 8px 0 22px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #c5ccd8;
  background: #ffffff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.center-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.center-head h2 { margin: 0 0 6px; font-size: 22px; color: #0d1016; }
.center-head p { margin: 0; color: #2c3340; font-size: 13px; max-width: 56ch; line-height: 1.5; font-weight: 500; }
.center-head .upload-btn { align-self: center; }
.center-manual {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.center-manual-hint {
  margin: 0 auto 16px;
  color: #2c3340;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  text-align: center;
  max-width: 62ch;
}
.center-board {
  display: grid;
  grid-template-columns: minmax(92px, auto) auto minmax(92px, auto);
  grid-template-rows: auto auto auto;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
  margin: 0 auto;
  max-width: 520px;
}
.center-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #2c3340;
  margin: 0;
}
.center-slot input {
  width: 88px;
  font-size: 16px;
  padding: 8px 8px;
  border-radius: 12px;
  border: 1px solid #c5ccd8;
  background: #ffffff;
  font-family: Sora, sans-serif;
  text-align: center;
  min-width: 0;
}
.center-slot input:focus {
  outline: 2px solid #e7c56a;
  border-color: #9a7210;
}
.center-slot-top { grid-column: 2; grid-row: 1; }
.center-slot-left { grid-column: 1; grid-row: 2; }
.center-slot-right { grid-column: 3; grid-row: 2; }
.center-slot-bottom { grid-column: 2; grid-row: 3; }
.center-card-frame {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.center-board-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
#centerStage,
#centerCanvas { display: none !important; }
.center-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; justify-content: flex-start; }
.upload-btn { cursor: pointer; }
.center-body {
  display: block;
  margin-top: 16px;
}
.center-stage {
  background: #eef1f5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
#centerCanvas { width: 100%; height: auto; display: block; }
.center-out { max-width: 420px; margin: 0 auto; }
.center-out h3 { margin: 0 0 10px; font-size: 14px; color: #11141b; text-align: center; }
.center-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.center-metrics div {
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.center-metrics b {
  display: block;
  font-family: "Share Tech Mono", Sora, sans-serif;
  font-size: 20px;
  color: #0d1016;
}
.center-metrics span { color: #2c3340; font-size: 12px; font-weight: 600; }
.center-preview-size {
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7a5a08;
}
.center-preview {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 189px;
  height: 264px;
  aspect-ratio: 63 / 88;
  background: #f0c419;
  border: 1px solid #c9a227;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(17, 20, 27, 0.12);
}
.center-preview-inner {
  width: 100%;
  height: 100%;
  background: #1a2744;
  border-radius: 2px;
}
.grade-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grade-table th, .grade-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  color: #11141b;
}
.grade-table td:last-child, .grade-table th:last-child { text-align: right; font-family: Sora, sans-serif; }
.grade-ok { color: #0f6b3a; font-weight: 800; }
.grade-mid { color: #8a4b00; font-weight: 800; }
.center-note { margin: 10px 0 0; font-size: 12px; color: #2c3340; line-height: 1.45; }

@media (max-width: 800px) {
  .hero { min-height: 0; }
  .hero-inner, main, .foot { padding-left: 14px; padding-right: 14px; }
  .top { flex-direction: column; align-items: start; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .brand h1 { font-size: 24px; }
  .logo { width: 120px; height: 88px; }
  .search-row { grid-template-columns: 1fr auto; }
  .search-row .go { grid-column: 1 / -1; }
  .marquee img { width: 86px; height: 120px; flex-basis: 86px; }
  .showcase-banner img { height: 180px; }
  .grid,
  body.is-home .grid {
    grid-template-columns: 1fr;
  }
  .art {
    --tcg-w: 126px;
    --tcg-h: 176px;
    flex-basis: 126px;
    width: 126px;
    height: 176px;
    max-width: 126px;
  }
  .meta { padding: 10px 12px 12px; }
  .name { font-size: 15px; }
  .sheet {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .sheet-art {
    width: var(--tcg-detail-w);
    height: var(--tcg-detail-h);
    max-width: min(245px, 72vw);
    max-height: calc(min(245px, 72vw) * 88 / 63);
    margin: 12px auto 0;
    position: static;
    padding: 0;
  }
  .sheet-art img { width: 100%; height: 100%; object-fit: cover; }
  .sheet-body {
    padding: 16px;
    max-height: none;
    overflow: visible;
  }
  .sheet-close { top: 8px; right: 8px; }
  .center-body { grid-template-columns: 1fr; }
  .center-head { align-items: start; }
  .center-preview { width: 151px; height: 211px; }
  .center-slot input { width: 72px; }
  .center-board { gap: 8px; grid-template-columns: minmax(76px, auto) auto minmax(76px, auto); }
}
