:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #202822;
  background: #f5f3eb;
  --paper: #fffdf7;
  --line: #e4e1d5;
  --muted: #585e52;
  --green: #174235;
  --red: #ad3c28;
  --gold: #7c5310;
  --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #4e7967; outline-offset: 3px; }
.wrap { width: min(1112px, calc(100% - 64px)); margin-inline: auto; }
.masthead { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; color: var(--green); font-size: 15px; font-weight: 800; text-decoration: none; }
.brand-dot { margin-inline: 2px; }
.ball { position: relative; display: inline-block; flex: none; width: 28px; height: 28px; border: 2px solid #24392e; border-radius: 50%; background: linear-gradient(#c85037 0 46%, #24392e 46% 54%, #f5ebce 54%); }
.ball::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 10px; height: 10px; border: 2px solid #24392e; border-radius: 50%; background: #fff7e1; transform: translate(-50%, -50%); }
.demo-label { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #ded9c8; border-radius: 100px; color: #57594a; font-size: 12px; white-space: nowrap; }
.demo-label span { width: 6px; height: 6px; border-radius: 50%; background: #9b6d32; }
.hero { display: grid; grid-template-columns: 1fr 1fr; position: relative; isolation: isolate; min-height: 256px; overflow: hidden; border: 1px solid #1f473a; border-radius: 27px; background: #163f33; color: #fff6df; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 55% 120%, #356a50, transparent 67%); }
.hero-copy { align-self: center; z-index: 1; padding: 31px 0 39px 49px; }
.hero h1 { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-size: clamp(2.75rem, 5.6vw, 5.125rem); font-weight: 900; line-height: 1.15; letter-spacing: -.07em; }
.hero h1 span { color: #f8d98b; }
.hero p { margin-top: 14px; color: #eceddc; font-size: 15px; line-height: 1.55; letter-spacing: .045em; }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 37%; overflow: hidden; background: linear-gradient(0deg, #163f3360, transparent 52%), url("assets/hero.jpg") center 34% / cover; mask-image: linear-gradient(90deg, transparent, #000 35%); }
.hero-art img { position: absolute; width: clamp(120px, 22vw, 229px); height: 90%; right: 11%; bottom: 12px; object-fit: contain; filter: drop-shadow(0 12px 16px #1a442c92); }
.search-panel { position: relative; margin: -28px auto 22px; width: calc(100% - 52px); background: var(--paper); padding: 19px 25px 15px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 22px #3932270c; }
#search-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.search-controls { display: flex; gap: 9px; }
.search-input { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; padding: 0 13px; min-height: 48px; background: #f7f6ef; border: 1px solid #dedcd0; border-radius: 10px; }
.search-input:focus-within { border-color: #548373; box-shadow: 0 0 0 2px #e3eadf; }
.search-input input { width: 100%; min-width: 0; align-self: stretch; padding: 0; background: transparent; border: 0; outline: 0; font-size: 16px; color: inherit; }
.search-input input:focus-visible { outline: 0; }
.search-input input::placeholder { color: #696e60; }
.lens { display: inline-block; position: relative; flex: none; width: 14px; height: 14px; border: 1.8px solid #56655c; border-radius: 50%; margin: 0 2px 3px 0; }
.lens::after { content: ""; position: absolute; width: 6px; height: 2px; border-radius: 2px; background: #56655c; top: 10px; left: 9px; transform: rotate(47deg); transform-origin: left; }
.primary { min-width: 112px; padding: 0 18px; min-height: 48px; border: 1px solid #9a321f; border-radius: 10px; color: #fff9f0; background: var(--red); font-weight: 750; }
.primary:hover { background: #902f20; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; color: var(--muted); font-size: 12px; }
.examples button, .text-button { min-height: 44px; padding: 3px 5px; border: 0; background: transparent; color: var(--green); font-weight: 700; }
.examples button:hover, .text-button:hover { text-decoration: underline; }
.examples button span { color: var(--muted); font-weight: 400; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.search-results { padding: 23px 26px; margin-bottom: 18px; }
.search-results h2 { font-size: 22px; }
.search-results p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.candidate-list { display: grid; gap: 8px; list-style: none; margin: 15px 0 0; padding: 0; }
.candidate { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf8ee; text-align: left; }
.candidate:hover { background: #edf0e5; border-color: #a9b7a8; }
.candidate-copy { flex: 1; min-width: 0; }
.candidate-copy strong, .candidate-copy small { display: block; overflow-wrap: anywhere; }
.candidate-copy strong { font-size: 15px; }
.candidate-copy small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.arrow { color: var(--green); font-size: 21px; }
.profile-panel { padding: 23px 26px 25px; margin-bottom: 18px; }
.identity { display: flex; align-items: center; gap: 13px; }
.identity-copy { flex: 1; min-width: 0; }
.identity h2 { font-size: 25px; overflow-wrap: anywhere; line-height: 1.2; }
.handle { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 49px; height: 49px; flex: none; background: #e2ead9; border: 1px solid #cad9bf; border-radius: 14px; color: #254f3f; font-size: 23px; font-weight: 800; }
.avatar.compact { width: 39px; height: 39px; border-radius: 11px; font-size: 18px; }
.avatar[data-palette="1"] { color: #804521; background: #f6e3ca; border-color: #e8d1b0; }
.avatar[data-palette="2"] { color: #3f4f73; background: #e6e9f2; border-color: #d1d9e8; }
.progress-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 7px 5px; background: #f4f5eb; border: 1px solid #e7e8da; border-radius: 12px; padding: 12px 13px 11px; }
.stat:nth-child(3) { background: #faf2df; border-color: #ece1c9; }
.stat:nth-child(4) { background: #f8ede5; border-color: #ecded1; }
.stat dt { color: var(--muted); font-size: 13px; }
.stat dd { margin: 0; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat:nth-child(3) dd { color: var(--gold); }
.stat:nth-child(4) dd { color: #893d2e; }
.stat strong { font-size: 22px; line-height: 1; }
.stat small { font-size: 12px; color: var(--muted); }
.stat dd:last-child { grid-column: 1 / -1; line-height: 0; }
progress { width: 100%; height: 5px; border: 0; border-radius: 6px; overflow: hidden; background: #e1e5d9; accent-color: #387459; }
progress::-webkit-progress-bar { background: #e1e5d9; }
progress::-webkit-progress-value { background: #387459; }
.stat:nth-child(3) progress::-webkit-progress-bar { background: #eadfca; }
.stat:nth-child(3) progress::-webkit-progress-value { background: #a46d1d; }
.stat:nth-child(4) progress { accent-color: #a5523f; }
.stat:nth-child(4) progress::-webkit-progress-bar { background: #eddbcf; }
.stat:nth-child(4) progress::-webkit-progress-value { background: #a5523f; }
.recent, .collection { margin-top: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 11px; }
.section-heading h3 { font-size: 21px; line-height: 1.3; }
.section-heading span { color: var(--muted); font-size: 13px; }
.recent-grid, .collection-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recent-card { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 12px; min-width: 0; min-height: 94px; padding: 9px 10px; border: 1px solid #e0e7d9; border-radius: 14px; background: #f0f3e9; }
.recent-card.shiny { background: #f9efda; border-color: #ecdfc1; }
.sprite { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.entry-copy { min-width: 0; }
.entry-copy strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.entry-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.chip { display: inline-block; padding: 3px 6px; border-radius: 6px; background: #e1e9da; color: #2b5141; font-size: 11px; font-weight: 750; white-space: nowrap; }
.shiny .chip { background: #f2dfaa; color: #674509; }
.boss .chip { background: #eed8c9; color: #843626; }
.recent-card .chip { margin-bottom: 5px; }
.collection { padding: 23px 26px 26px; }
.filters { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 13px; }
.segmented { display: flex; gap: 3px; padding: 3px; border: 1px solid #e1e1d4; border-radius: 10px; background: #f2f2e9; }
.segmented button { min-height: 44px; border: 0; border-radius: 7px; padding-inline: 16px; font-size: 14px; font-weight: 700; background: transparent; }
.segmented button:hover { background: #e1e8db; }
.segmented button[aria-pressed="true"] { color: #fffdf6; background: var(--green); }
.map-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.map-filter select { min-height: 44px; max-width: 100%; padding-inline: 11px; border: 1px solid #ddded2; border-radius: 9px; background: #f6f6ee; color: #263b31; font-size: 16px; }
.filter-info { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 11px 0 15px; }
.collection-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dex-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e1e6da; border-radius: 13px; padding: 8px; background: #fbfbf3; }
.dex-card.shiny { background: #fff9e9; border-color: #ebdfbb; }
.dex-card.boss { background: #fdf2eb; border-color: #ecd8ca; }
.dex-card .card-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; margin-bottom: 3px; }
.number { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dex-card .sprite { border-radius: 8px; background: radial-gradient(ellipse at 50% 65%, #e1eddb, #f0f3e8 69%); }
.dex-card.shiny .sprite { background: radial-gradient(ellipse at 50% 65%, #f5e7ba, #f9f1dc 69%); }
.dex-card.boss .sprite { background: radial-gradient(ellipse at 50% 65%, #f1dfd1, #f8ece4 69%); }
.dex-card .entry-copy { padding: 8px 1px 2px; }
.dex-card .entry-copy strong { line-height: 1.4; }
.dex-card .entry-copy small { line-height: 1.4; }
.message { padding: 18px 12px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.profile-panel .message, .collection .message { background: #f3f2e9; border-radius: 10px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-top: 24px; margin-bottom: 26px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .stat { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 28px); }
  .masthead { min-height: 60px; }
  .hero { grid-template-columns: 1fr; border-radius: 19px; min-height: 162px; }
  .hero-copy { padding: 23px 10px 41px 19px; }
  .hero h1 { font-size: clamp(2.18rem, 10vw, 3.2rem); }
  .hero p { margin-top: 8px; font-size: 12px; max-width: 15em; letter-spacing: 0; }
  .hero-art { left: 32%; background-position: center, 65% 36%; mask-image: linear-gradient(90deg, transparent, #000 53%); }
  .hero-art img { width: 50%; height: 80%; right: 3%; bottom: 10%; }
  .search-panel { margin-top: -21px; margin-bottom: 15px; width: calc(100% - 14px); padding: 13px 12px 3px; border-radius: 15px; }
  .search-input { gap: 8px; padding-inline: 9px; }
  .primary { min-width: 60px; padding-inline: 10px; }
  .search-results, .profile-panel, .collection { padding: 16px 13px; border-radius: 16px; }
  .search-results { margin-bottom: 14px; }
  .identity { gap: 9px; }
  .identity h2 { font-size: 21px; }
  .avatar { width: 43px; height: 43px; font-size: 20px; }
  .progress-grid { margin-top: 13px; gap: 5px; }
  .stat { padding: 8px 5px; gap: 5px; }
  .stat strong { font-size: 18px; }
  .stat small { font-size: 11px; }
  .stat dt { font-size: 12px; }
  .recent, .collection { margin-top: 18px; }
  .section-heading h3 { font-size: 18px; }
  .recent-grid { gap: 5px; }
  .recent-card { grid-template-columns: 1fr; gap: 0; padding: 6px; border-radius: 9px; }
  .recent-card .sprite { max-width: 69px; justify-self: center; }
  .entry-copy strong { font-size: 13px; }
  .entry-copy small { font-size: 11px; }
  .filters { gap: 7px; }
  .segmented button { padding-inline: 10px; }
  .map-filter { gap: 5px; }
  .map-filter select { padding-inline: 6px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .dex-card { padding: 5px; border-radius: 9px; }
  .dex-card .chip { padding-inline: 4px; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 20px); }
  .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-filter { flex-wrap: wrap; }
}
