:root {
  color-scheme: light;
  --background: #f4f6fb;
  --panel: #fff;
  --ink: #15223c;
  --muted: #53637d;
  --faint: #64738b;
  --line: #dce4f1;
  --blue: #294bc9;
  --blue-dark: #16369f;
  --wash: #edf1ff;
  --nav-width: 15rem;
  font-family: "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans CJK TC", system-ui, sans-serif;
  background: var(--background);
  color: var(--ink);
  font-size: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
button:focus-visible, input:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #7589f7; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip { position: fixed; inset: .5rem auto auto .5rem; z-index: 10; padding: .5rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
.mobile-only { display: none !important; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--nav-width); display: flex; flex-direction: column; padding: 1.6rem 1rem .8rem; border-right: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; gap: .7rem; align-items: center; padding: 0 .5rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .85rem; color: #f6f8ff; background: #152745; font-size: 1.42rem; }
.brand strong { display: block; font-size: 1.27rem; line-height: 1.12; letter-spacing: -.025em; }
.brand small { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.primary { margin: 1.65rem 0 1.2rem; display: grid; gap: .25rem; }
.nav-button { display: flex; align-items: center; width: 100%; gap: .65rem; border: 1px solid transparent; border-radius: .58rem; text-align: left; color: var(--muted); background: transparent; min-height: 2.38rem; padding: .29rem .58rem; font-size: .9rem; }
.nav-button:hover { background: #f4f6fc; color: var(--ink); }
.nav-button.active { color: var(--blue-dark); font-weight: 690; background: var(--wash); border-color: #e5ebff; }
.nav-icon { display: inline-grid; place-items: center; width: 1.16rem; font-size: 1.19rem; line-height: 1; }
.nav-count { margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; font-size: .77rem; }
.category-area { min-height: 0; overflow-y: auto; scrollbar-width: thin; border-top: 1px solid var(--line); padding: .9rem .1rem 1rem 0; }
.category-area h2 { margin: 0 0 .35rem .63rem; color: var(--faint); font-size: .82rem; font-weight: 700; }
.category-area .nav-button { line-height: 1.25; min-height: 2.13rem; }
.category-area .nav-button span:first-child { min-width: 0; }

main { margin-inline-start: var(--nav-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; height: 3.65rem; padding: 0 clamp(1rem, 2.7vw, 2.65rem); border-bottom: 1px solid var(--line); background: #fcfdff; }
.breadcrumb { text-decoration: none; color: var(--muted); font-weight: 680; font-size: .93rem; }
.breadcrumb span { color: var(--blue); margin-inline-end: .35rem; }
.content { max-width: 100rem; margin: 0 auto; padding: clamp(1rem, 2.7vw, 2.65rem); }
.hero { position: relative; display: grid; align-items: center; min-height: 15.8rem; overflow: hidden; isolation: isolate; border-radius: 1rem; color: #f5f7ff; background: #07152e; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #07152e 0%, #07152e88 43%, transparent 81%), url('/assets/orbital-chart.png') right center / cover no-repeat; }
.hero-body { width: min(100%, 41rem); padding: clamp(1.25rem, 3.1vw, 2.4rem); }
.hero h1 { margin: 0; font-size: clamp(2.18rem, 5vw, 3.2rem); line-height: 1.12; letter-spacing: -.035em; }
.hero p { margin: .7rem 0 1.15rem; color: #d0dcf5; font-size: 1rem; }
.search { display: grid; align-items: center; grid-template-columns: auto minmax(0,1fr) auto; gap: .65rem; padding: .34rem; padding-inline-start: .9rem; background: white; border-radius: .65rem; color: var(--ink); box-shadow: 0 8px 36px #030c2462; }
.search-icon { position: relative; width: .93rem; height: .93rem; border: 1.7px solid #596a8a; border-radius: 50%; }
.search-icon::after { position: absolute; content: ''; width: .38rem; height: 1.7px; background: #596a8a; right: -.29rem; bottom: -.07rem; transform: rotate(45deg); }
.search input { min-width: 0; width: 100%; border: none; padding: .2rem .15rem; background: transparent; min-height: 2.3rem; }
.search input::placeholder { color: #596987; opacity: 1; }
.search button, .download { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--blue); background: var(--blue); color: white; font-weight: 680; padding: .5rem .95rem; border-radius: .45rem; text-decoration: none; }
.search button:hover, .download:hover { background: var(--blue-dark); }
.hero-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.15rem; margin-top: .9rem; color: #cad7f3; font-size: .88rem; }
.hero-stats strong { color: white; font-variant-numeric: tabular-nums; margin-inline-end: .22rem; }

.results-section { margin-top: 1.75rem; scroll-margin-top: .75rem; }
.results-header { display: flex; justify-content: space-between; align-items: flex-end; gap: .7rem; margin-bottom: .85rem; }
.results-header h2 { margin: 0; font-size: 1.5rem; line-height: 1.25; letter-spacing: -.022em; }
.results-header p { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.quiet, .favorite-link { background: transparent; border: none; color: var(--blue-dark); text-align: right; padding: .32rem .2rem; font-size: .88rem; font-weight: 650; }
.quiet:hover { text-decoration: underline; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .62rem .9rem; margin-bottom: .95rem; }
.segments { display: inline-flex; align-items: center; background: #e9edf6; border: 1px solid #e0e7f3; border-radius: .58rem; padding: .22rem; gap: .1rem; }
.segments button { background: transparent; border: 1px solid transparent; border-radius: .42rem; color: var(--muted); padding: .28rem .72rem; font-size: .88rem; }
.segments [aria-pressed='true'] { background: white; color: var(--blue-dark); font-weight: 700; border-color: #dfe6f5; box-shadow: 0 1px 3px #14264c11; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: .48rem; font-size: .875rem; }
.native-select { display: inline-flex; position: relative; align-items: center; min-width: 0; }
.native-select::after { content: ''; position: absolute; right: .75rem; width: .36rem; height: .36rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-.13rem); pointer-events: none; }
.native-select select { appearance: none; min-width: 0; max-width: 100%; padding: .42rem 1.85rem .42rem .65rem; border: 1px solid var(--line); background: white; border-radius: .5rem; }
.paired { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; padding: .32rem .2rem; color: var(--muted); }
.paired input { width: 1rem; height: 1rem; accent-color: var(--blue); }

.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; align-items: stretch; }
.card { display: flex; flex-direction: column; min-width: 0; gap: .68rem; padding: .92rem; min-height: 12.2rem; background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; position: relative; box-shadow: 0 2px 4px #24384a07; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #aebceb; box-shadow: 0 5px 18px #24387012; }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; }
.file-icon { display: grid; place-items: center; width: 2.05rem; height: 2.05rem; border-radius: .53rem; background: #edf1ff; color: var(--blue-dark); font-size: 1.14rem; font-weight: 700; line-height: 1; }
.file-icon.plan { background: #fff0df; color: #92440d; }
.file-kind { color: var(--muted); font-size: .82rem; font-weight: 640; }
.port { display: inline-flex; line-height: 1.3; border-radius: .28rem; padding: .18rem .36rem; color: #455570; background: #eef1f7; font-size: .77rem; font-weight: 700; }
.port[data-port='Unity'] { color: #204090; background: #eaf0ff; }
.port[data-port='Flash'] { color: #784026; background: #fdf0e8; }
.icon-button { display: grid; place-items: center; margin-left: auto; padding: 0; width: 2.2rem; height: 2.2rem; border-radius: .48rem; border: 1px solid transparent; font-size: 1.35rem; line-height: 1; background: transparent; color: var(--muted); }
.icon-button:hover, .icon-button[aria-pressed='true'] { color: var(--blue-dark); background: var(--wash); border-color: #e3e8f9; }
.card h3 { margin: 0; font-size: 1.06rem; line-height: 1.32; overflow-wrap: anywhere; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--blue-dark); text-decoration: underline; }
.card-meta { margin: .33rem 0 0; color: var(--faint); font-size: .82rem; overflow-wrap: anywhere; }
.card p.action { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.card-footer { margin-top: auto; padding-top: .58rem; border-top: 1px solid #edf1f8; display: flex; align-items: flex-start; justify-content: space-between; gap: .47rem; font-size: .8rem; color: var(--muted); }
.card-resource { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-kind { margin-inline-end: .35rem; font-weight: 720; color: #244696; }
.resource-kind[data-kind='消耗'], .resource-kind[data-kind='可能消耗'] { color: #8b480c; }
.card-pair { flex: none; color: var(--blue-dark); font-weight: 650; }
.empty { grid-column: 1/-1; border: 1px dashed #b4c3df; border-radius: .75rem; background: #fff; padding: 2.1rem; text-align: center; }
.empty p { margin: .5rem 0 0; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.25rem; color: var(--muted); font-size: .875rem; }
.pagination button, .secondary { border: 1px solid var(--line); background: white; padding: .4rem .7rem; border-radius: .45rem; color: var(--blue-dark); }
.pagination button:hover:not(:disabled), .secondary:hover { background: var(--wash); }

.drawer { inset: 0 0 0 auto; margin: 0; padding: 0; width: min(36.5rem,100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; background: white; color: var(--ink); box-shadow: -10px 0 60px #0c173531; }
.drawer::backdrop { background: #111e3b65; }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; color: var(--muted); font-weight: 700; font-size: .9rem; }
.drawer-body { padding: 1.25rem 1.25rem 1.65rem; }
.drawer-body h2 { margin: .6rem 0 .2rem; font-size: clamp(1.35rem,4vw,1.9rem); line-height: 1.22; overflow-wrap: anywhere; }
.drawer-body h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.drawer-section { margin: 1.25rem 0 0; }
.drawer-section p { margin: 0 0 .55rem; color: var(--muted); overflow-wrap: anywhere; }
.drawer-meta { margin: .1rem 0 .85rem; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.drawer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .9rem; }
.resource-list { margin: 0; padding: .72rem .8rem; border: 1px solid var(--line); border-radius: .55rem; background: #f8faff; list-style: none; }
.resource-list li { display: grid; grid-template-columns: 5.3rem minmax(0,1fr); gap: .3rem; align-items: start; padding: .35rem 0; overflow-wrap: anywhere; }
.resource-list li + li { border-top: 1px solid #e9edf6; }
.resource-list .resource-kind { font-size: .86rem; }
.details-list { padding-left: 1.25rem; margin: 0; }
.details-list li { padding: .25rem 0; overflow-wrap: anywhere; }
.details-list span { color: var(--muted); font-size: .82rem; }
.hash { font-family: ui-monospace, Consolas, monospace; font-size: .79rem; overflow-wrap: anywhere; }
.feedback { margin-top: .45rem; color: var(--blue-dark); font-size: .87rem; }

@media (max-width: 1200px) { .cards { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 820px) {
  .mobile-only { display: inline-flex !important; }
  .sidebar { display: none; }
  main { margin: 0; }
  .favorite-link { gap: .28rem; align-items: center; }
  .hero::before { background-image: linear-gradient(90deg,#07152ef7 0%,#07152e9e 60%,#07152e55 100%),url('/assets/orbital-chart.png'); }
}
@media (max-width: 555px) {
  .content { padding: .8rem .72rem 1.4rem; }
  .hero { border-radius: .72rem; min-height: 14rem; }
  .hero p { font-size: .9rem; }
  .hero-stats { font-size: .8rem; gap: .3rem .62rem; }
  .search { gap: .35rem; padding-inline-start: .69rem; }
  .search button { padding-inline: .62rem; }
  .cards { grid-template-columns: minmax(0,1fr); }
  .card { min-height: 10.6rem; }
  .filters { display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .native-select select { width: 100%; }
  .drawer-body { padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
