:root {
  color-scheme: light;
  --cream: #f8f5eb;
  --paper: #fffdf6;
  --white: #fffefa;
  --ink: #293c33;
  --body: #39434d;
  --muted: #52645b;
  --line: #dce1d1;
  --green: #dcebd1;
  --pink: #f6dce2;
  --blue: #dcecf5;
  --yellow: #f8ecc5;
  --leaf: #315440;
  --rose: #91495d;
  --shadow: 0 3px 0 #e6e7d9;
  --radius: 20px;
  --display: "Georgia", "Noto Serif CJK SC", "Songti SC", serif;
  --sans: "Trebuchet MS", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font: 16px/1.53 var(--sans);
  color: var(--body);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; }
img, svg { display: block; }
img { max-width: 100%; }
button, select { font: inherit; }
button, summary { cursor: pointer; }
a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid #a94a65; outline-offset: 4px; }
h1,h2,h3,p,ul,ol,dl,dd { margin: 0; }
h1,h2,h3 { color: var(--ink); line-height: 1.14; }
h1,h2 { font-family: var(--display); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.03em; }
h3 { font-size: 1.09rem; }
:lang(zh) h1,:lang(zh) h2 { letter-spacing: -.035em; }
.shell { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.main { min-height: 65vh; padding-block: 28px 60px; }
.skip { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 10px; background: var(--white); clip-path: inset(50%); }
.skip:focus { clip-path: none; }
.header { background: var(--paper); border-bottom: 1px solid var(--line); }
.head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); line-height: 1.13; }
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; letter-spacing: .11em; }
.lab-mark { display: grid; place-items: center; flex: none; width: 43px; height: 43px; border: 1px solid #daacb5; border-radius: 14px; background: var(--pink); color: var(--leaf); overflow: hidden; }
.lab-mark img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
nav { display: flex; gap: 5px; align-items: center; }
nav a { display: block; padding: 8px 11px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 700; white-space: nowrap; }
nav a[aria-current], nav a:hover { background: var(--green); color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 7px 13px; border-radius: 9px; border: 1px solid #bdc9b9; background: var(--paper); color: var(--leaf); font-size: .86rem; font-weight: 750; text-decoration: none; }
.nft-select { display: block; width: min(100%, 440px); margin: 8px 0 14px; min-height: 40px; border-radius: 9px; border: 1px solid #bdc9b9; background: var(--paper); color: var(--ink); padding: 7px 12px; }
.button:hover { background: var(--green); color: var(--ink); }
.button[aria-pressed="true"], .primary { background: var(--leaf); color: #fffdf4; border-color: var(--leaf); }
.primary:hover { background: #254533; color: #fffdf4; }
.language { flex: none; }
.icon { width: 1.18em; height: 1.18em; flex: none; }
.banner { position: relative; display: grid; grid-template-columns: 1fr minmax(260px, .70fr); background: var(--green); border: 1px solid #c6d8bd; border-radius: 26px; min-height: 221px; overflow: hidden; }
.banner.home { min-height: 254px; grid-template-columns: .94fr 1fr; }
.banner.dex { background: var(--yellow); border-color: #e8d7a3; }
.banner.economy { background: var(--pink); border-color: #e9cad4; }
.banner.archive { background: var(--blue); border-color: #c3d8e4; }
.banner-copy { position: relative; align-self: center; padding: 28px 35px; z-index: 1; }
.banner-copy p { margin-top: 10px; max-width: 44ch; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--leaf); font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 8px; }
.eyebrow .icon { font-size: 1.17rem; }
.banner-media { position: relative; margin: 0; align-self: stretch; min-height: 100%; }
.banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 46%; }
.banner.home .banner-media img { object-position: 78% 68%; }
.banner-media .illustration { height: 100%; }
.banner-media:empty { display: none; }
.banner:not(:has(.banner-media img)) { grid-template-columns: 1fr; }
.home .banner-copy { padding-block: 28px; }
.statusbar { margin-block: 16px 25px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.statusbar summary { display: flex; align-items: center; gap: 12px; padding: 10px 15px; color: var(--muted); font-size: .82rem; }
.statusbar summary::-webkit-details-marker, .node summary::-webkit-details-marker { display: none; }
.statusbar summary::after, .node summary::after { content: "＋"; margin-left: auto; color: var(--leaf); font-weight: 800; }
.statusbar[open] summary::after, .node[open] summary::after { content: "−"; }
.status-label { color: var(--leaf); font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.status-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #557a50; flex: none; }
.status-label.stale { color: #88452d; }
.status-label.stale::before { background: #ae5d3d; }
.status-expanded { padding: 0 16px 14px; display: flex; align-items: center; gap: 16px; font-size: .84rem; }
.status-expanded img, .empty img { width: 95px; border-radius: 11px; }
.status-expanded p+p { margin-top: 4px; }
.section { margin-top: 27px; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.home-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); gap: 18px; align-items: start; }
.panel { min-width: 0; padding: 21px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.heading p, .sub, .note { color: var(--muted); font-size: .9rem; }
.heading p, .sub { margin-top: 5px; }
.note { margin-top: 16px; }
.feature { padding: 25px; }
.feature h2 { text-wrap: balance; }
.specimen-plate { background: linear-gradient(90deg, #f3c9d4 0 10px, var(--paper) 10px); border-color: #e7c9d2; }
.live-case { background: linear-gradient(90deg, #c9dfc4 0 10px, var(--paper) 10px); }
.hold-callout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--yellow); color: var(--ink); }
.hold-callout b { font-family: var(--display); font-size: 1.8rem; line-height: 1; letter-spacing: -.03em; }
.hold-callout small { color: var(--muted); }
.specimen { position: relative; }
.specimen::before { content: ""; position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border: 2px solid #d7c7b4; border-radius: 50%; background: #fffdf8; }
.feature .heading > .button { flex: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 17px; }
.stat { padding: 11px 12px; border-radius: 10px; background: var(--green); color: var(--ink); min-width: 0; }
.stat:nth-child(2) { background: var(--yellow); }
.stat:nth-child(3) { background: var(--pink); }
.stat:nth-child(4) { background: var(--blue); }
.stat b { display: block; font-variant-numeric: tabular-nums; font-size: clamp(1.14rem, 2vw, 1.58rem); line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.stat small { font-size: .76rem; display: block; }
.feature-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; font-weight: 800; }
.events { list-style: none; padding: 0; }
.events li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.events li:last-child { border-bottom: 0; padding-bottom: 0; }
.events time { display: block; color: var(--muted); font-size: .77rem; }
.event-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink); background: var(--blue); }
.event-icon.award { background: var(--green); }
.event-icon.buyback { background: var(--pink); }
.event-icon.hold { background: var(--yellow); }
.data-chart { margin-top: 15px; display: grid; gap: 9px; font-size: .84rem; }
.bar-row { display: grid; grid-template-columns: minmax(68px, .48fr) minmax(50px, 1fr) minmax(38px, auto); align-items: center; gap: 9px; min-height: 25px; }
.bar-row b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-track { height: 13px; background: #eeeee4; border-radius: 3px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 3px; background: #83ac84; }
.bar-track.blue i { background: #78a5bb; }
.bar-track.pink i { background: #d297a7; }
.bar-track.pink i.negative { background: #927189; }
.labels { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 17px; }
.dex-panel { padding: 24px; }
.species { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.specimen { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--type-color, #dce1d1); border-radius: 12px; padding: 12px; }
.species-art { width: 100%; height: 104px; object-fit: contain; margin-bottom: 8px; }
.specimen .number { display: block; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.specimen h3 { margin-bottom: 4px; }
.specimen p { font-size: .77rem; color: var(--muted); }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tag { display: inline-block; background: var(--type-color, #eaede1); color: #25352d; border-radius: 5px; padding: 2px 6px; font-size: .72rem; }
.type-water { --type-color: #cee6f3; }
.type-electric { --type-color: #f6e6a2; }
.type-fire { --type-color: #f9d3bf; }
.type-psychic { --type-color: #f4d4e9; }
.type-dark { --type-color: #dedbe8; }
.type-grass { --type-color: #daebc9; }
.type-ice { --type-color: #ccebea; }
.type-fairy { --type-color: #f8d8e7; }
.type-flying { --type-color: #dbdff5; }
.type-ground { --type-color: #ebd5b7; }
.type-ghost { --type-color: #e3d5ed; }
.type-dragon { --type-color: #d7daf4; }
.type-poison { --type-color: #ead7eb; }
.empty { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 11px; background: #edece1; color: #45574c; font-size: .9rem; }
.empty img { width: 70px; }
.cash-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.cash-legend div { padding: 11px; border-radius: 9px; background: var(--green); font-size: .84rem; }
.cash-legend div+div { background: var(--yellow); }
.cash-legend b { display: block; margin-bottom: 3px; color: var(--ink); }
.journal { display: grid; grid-template-columns: minmax(235px, .34fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.journal-aside .stat-grid { grid-template-columns: 1fr 1fr; }
.journal-aside .button { margin-top: 15px; }
.timeline { list-style: none; padding: 0; display: grid; gap: 14px; }
.round { position: relative; padding-left: 27px; }
.round::before { content: ""; position: absolute; width: 2px; background: #c9d8c0; left: 8px; inset-block: 12px -18px; }
.round:last-child::before { bottom: 4px; }
.round::after { content: ""; position: absolute; width: 11px; height: 11px; background: #72946e; border: 3px solid var(--cream); border-radius: 50%; top: 15px; left: 2px; }
.round-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px; margin-bottom: 10px; }
.round-title time { font-size: .81rem; color: var(--muted); }
.round .panel { padding: 13px 16px; }
.node { border-top: 1px solid var(--line); }
.node summary { display: flex; align-items: center; gap: 9px; padding-block: 7px; font-size: .88rem; }
.node .event-icon { width: 28px; height: 28px; }
.node summary small { margin-left: auto; text-align: right; }
.node summary::after { margin-left: 2px; }
.node-body { padding: 0 4px 11px 38px; display: grid; gap: 4px; font-size: .8rem; }
.node-body code { overflow-wrap: anywhere; color: var(--muted); }
.gap-note { color: var(--muted); font-size: .77rem; display: block; padding: 5px 0 0 36px; }
.catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dataset .heading { align-items: baseline; margin-bottom: 8px; }
.dataset .tag { flex: none; }
.metadata { margin-top: 13px; display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0,1fr); gap: 5px 10px; font-size: .83rem; }
.metadata dt { color: var(--muted); }
.metadata dd { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 13px; }
.footer { border-top: 1px solid var(--line); background: #eaf0e1; }
.footer-inner { display: flex; padding-block: 22px; justify-content: space-between; gap: 14px; align-items: center; font-size: .82rem; color: var(--muted); }
.footer strong { color: var(--ink); }
.footer a { font-weight: 700; }
dialog { width: min(650px,calc(100% - 24px)); max-height: 92vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); padding: 20px; }
dialog::backdrop { background: #26372eb0; }
dialog label { display: inline-grid; margin: 0 12px 10px 0; gap: 3px; font-size: .86rem; }
dialog select { color: var(--ink); background: var(--white); border: 1px solid #bdc9b9; border-radius: 7px; padding: 5px; max-width: 100%; }
.poster-preview { width: auto; max-height: 50vh; margin: 4px auto 12px; border-radius: 10px; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .head { flex-wrap: wrap; justify-content: space-between; gap: 0 14px; padding-block: 11px 6px; }
  nav { order: 3; width: 100%; margin-top: 5px; overflow: auto; }
}
@media (max-width: 820px) {
  .shell { width: calc(100% - 32px); }
  .main { padding-block: 17px 41px; }
  .home-grid, .journal { grid-template-columns: 1fr; }
  .species { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .banner-copy { padding-inline: 22px; }
  .banner { grid-template-columns: 1.1fr minmax(140px, .7fr); }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .brand strong { font-size: .88rem; }
  nav { grid-column: 1 / -1; }
  nav { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; gap: 2px; }
  nav a { white-space: normal; text-align: center; padding: 6px 4px; font-size: .75rem; }
  .grid, .catalog { grid-template-columns: 1fr; }
  .banner, .banner.home { grid-template-columns: 1fr; min-height: 0; }
  .banner-media { height: 137px; min-height: 0; }
  .banner.home .banner-media { height: 113px; }
  .banner-copy, .home .banner-copy { padding: 17px 18px; }
  .banner-copy p { font-size: .9rem; margin-top: 6px; }
  .statusbar { margin-block: 12px 19px; }
  .statusbar summary { flex-wrap: wrap; column-gap: 8px; row-gap: 1px; padding: 8px 10px; font-size: .76rem; }
  .status-expanded img { width: 58px; }
  .stat-grid, .species { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel, .feature, .dex-panel { padding: 15px; }
  .heading { gap: 7px; flex-wrap: wrap; }
  .feature .heading { margin-bottom: 8px; }
  .feature .stat-grid { margin-top: 12px; }
  .round { padding-left: 20px; }
  .round::before { left: 6px; }
  .round::after { left: 0; }
  .round .panel { padding-inline: 10px; }
  .node summary { font-size: .83rem; }
  .cash-legend { gap: 7px; }
  .footer-inner { display: grid; gap: 6px; }
}
.bar-track { position: relative; }
.bar-track[style]::after { content: ""; position: absolute; left: clamp(1px, var(--reference), calc(100% - 2px)); inset-block: 0; border-left: 2px dashed #293c33; }
.node summary:not(:has(small))::after { margin-left: auto; }
