:root {
  color-scheme: light;
  --paper: #f5f5ed;
  --ink: #182923;
  --muted: #52645b;
  --line: #d8ded3;
  --mint: #d6eddf;
  --green: #135b51;
  --round: 22px;
  font: 16px/1.55 "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 10% 0%, #e7eee0, transparent 45rem), var(--paper); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #cb6539; outline-offset: 3px; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header { min-height: 82px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; }
.mark, .tile-mark { display: grid; place-items: center; background: var(--tile, #174e45); color: #f0f7ea; }
.mark { width: 30px; height: 30px; border-radius: 9px; }
.mark::before, .tile-mark::before {
  content: "";
  width: 49%; height: 49%;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent 45%, var(--tile, #174e45) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, var(--tile, #174e45) 45% 55%, transparent 55%), currentColor;
}
.nav-link, .back { font-size: .88rem; color: var(--green); font-weight: 650; }
.nav-link span { margin-left: 5px; }
.hero, .detail-heading { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--round); background: #113831; }
.hero { min-height: 356px; display: grid; align-items: center; }
.hero-image { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.hero-image { z-index: -2; object-position: center; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #102a26 1%, #102a26ec 20%, #102a2680 49%, transparent 74%); }
.hero-copy { padding: clamp(22px, 6vw, 70px); color: #f5fbf3; }
.kicker { font-size: .75rem; line-height: 1.4; letter-spacing: .12em; font-weight: 650; }
.hero-copy .kicker { font-family: "IBM Plex Mono", Menlo, monospace; color: #c0e6d6; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 5.2rem); letter-spacing: -.055em; margin: 15px 0 12px; }
.hero-description { color: #e0eee5; max-width: 32ch; font-size: clamp(.92rem, 2vw, 1.1rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; border-radius: 999px; padding: 11px 18px; color: #173a31; background: var(--mint); width: max-content; font-size: .9rem; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-actions .button-secondary { color: #f5fbf3; background: #102a267d; box-shadow: inset 0 0 0 1px #a5cfc291; }
.hero-actions .button-secondary:hover { background: #315c50; }
.button:hover { background: #c6e9d7; }
.source-address { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 5px 14px; margin-top: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcf7; color: var(--muted); font-size: .8rem; }
.source-address code { color: var(--green); overflow-wrap: anywhere; user-select: all; font-family: Menlo, monospace; }
.copy-source, .shot-viewer button { cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; color: var(--green); background: #f0f6ec; font-size: .8rem; font-weight: 650; }
.copy-source:hover, .shot-viewer button:hover { background: var(--mint); }
.catalog-block { margin-top: 37px; }
.featured, .gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 5px 4px 9px; margin-inline: -4px; }
.featured { margin-top: 14px; }
.feature-card { flex: 0 0 calc((100% - 28px) / 3); min-width: 240px; aspect-ratio: 16/9; border-radius: 17px; position: relative; overflow: hidden; isolation: isolate; scroll-snap-align: start; color: white; background: radial-gradient(ellipse at 95% 10%, var(--tile), #132a27 88%); }
.card-art, .card-preview { position: absolute; z-index: -2; }
.card-art { width: 100%; height: 100%; inset: 0; object-fit: cover; }
.card-preview { left: 61%; top: 13%; width: 35%; height: auto; min-height: 60%; border: 4px solid #ffffff30; border-radius: 13px; transform: rotate(10deg); transform-origin: top center; box-shadow: 0 9px 22px #0b24277a; }
.feature-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(80deg, #091c19b8, #091c1921 76%), linear-gradient(0deg, #091c19c2, transparent 58%); }
.feature-card:hover .card-arrow { background: #ffffff30; }
.feature-icon { position: absolute; top: 16px; left: 17px; }
.feature-icon .package-icon { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px #ffffff45; }
.card-copy { display: grid; gap: 2px; position: absolute; inset: auto 44px 17px 17px; }
.card-copy strong { font-size: clamp(1rem, 2vw, 1.25rem); overflow-wrap: anywhere; }
.card-copy .kicker { color: #d4e9df; }
.card-arrow { position: absolute; right: 13px; bottom: 14px; border: 1px solid #ffffff84; border-radius: 50%; width: 32px; text-align: center; line-height: 30px; }
.catalog-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.catalog-search { display: block; width: min(100%, 290px); }
.catalog-search input { width: 100%; border: 1px solid #b9c9be; background: #fcfcf8; color: var(--ink); border-radius: 11px; padding: 8px 12px; }
.catalog-search input::placeholder { color: #596c61; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.empty-state { padding: 18px 0 28px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.filters a { border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; font-size: .82rem; background: #fcfcf7; }
.filters a:hover { background: var(--mint); }
.filters a[aria-current="true"] { color: #144939; background: #deeee1; border-color: #b6d3c0; font-weight: 650; }
.filters span, .row-version { font: .78rem Menlo, monospace; color: var(--muted); margin-left: 5px; }
.category { scroll-margin-top: 16px; margin-bottom: 24px; }
.category h3 { font-size: .86rem; color: var(--green); margin-bottom: 5px; }
.package-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 13px; gap: 12px; align-items: center; min-height: 65px; border-bottom: 1px solid var(--line); }
.package-row:hover { background: #ffffff7d; }
.package-icon { width: 44px; height: 44px; object-fit: cover; border-radius: 12px; }
.package-copy { display: grid; overflow-wrap: anywhere; }
.package-copy span { font-size: .78rem; color: var(--muted); }
.row-arrow { color: var(--green); font-size: 1.4rem; }
.site-footer { margin-top: 60px; padding-block: 20px 26px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.back { display: inline-block; margin-bottom: 14px; }
.detail-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; min-height: 160px; padding: clamp(18px, 4vw, 40px); color: #f9fbf4; background: var(--tile); }
.detail-heading::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #0a211eea, #0c2c26ba 58%, #122d2785); }
.detail-heading .hero-image { object-position: 60% 48%; }
.detail-heading .package-icon { width: 68px; height: 68px; border-radius: 16px; }
.detail-heading h1 { font-size: clamp(1.4rem, 4vw, 2.9rem); overflow-wrap: anywhere; }
.detail-heading p { color: #dbeee1; margin-bottom: 4px; overflow-wrap: anywhere; }
.detail-author { margin-top: 4px; font-size: .9rem; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.detail-facts span { border: 1px solid #d6ecdf69; background: #182c27a8; border-radius: 6px; padding: 2px 7px; font-size: .78rem; }
.detail-nav { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-block: 15px 9px; padding: 8px 1px; color: var(--green); font-size: .88rem; font-weight: 650; }
.detail-nav a { border-bottom: 1px solid transparent; }
.detail-nav a:hover { border-color: currentColor; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; }
.detail-section { padding: 19px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.detail-section h2 { font-size: 1.18rem; margin-bottom: 12px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.gallery a { flex: 0 0 clamp(126px, 40%, 184px); scroll-snap-align: start; }
.screenshot { width: 100%; aspect-ratio: 154/334; object-fit: contain; background: #e6ebe2; border: 1px solid var(--line); border-radius: 12px; }
.shot-viewer { width: min(460px, calc(100% - 26px)); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; color: var(--ink); background: #fdfdf7; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.shot-viewer::backdrop { background: #0c211dde; }
.viewer-head, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.viewer-head p { font-size: .85rem; }
.shot-viewer img { margin: 10px auto; max-height: calc(100vh - 152px); object-fit: contain; }
.viewer-controls { justify-content: center; }
.shot-viewer button:disabled { cursor: default; opacity: .48; }
dl { margin: 0; }
dl div, .download { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
dt, .log-entry time, .download small { color: var(--muted); }
dt { flex: 0 0 auto; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.log-entry { margin-block: 10px 14px; border-left: 2px solid #a8cbb8; padding-left: 10px; }
.log-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; margin-bottom: 4px; }
.log-head time { font: .76rem Menlo, monospace; }
.download { font-weight: 650; color: var(--green); }
.download:hover { text-decoration: underline; }
@media (max-width: 590px) {
  .shell { width: calc(100% - 32px); }
  .site-header { min-height: 62px; }
  .hero { min-height: 275px; }
  .hero-image { object-position: 57% 50%; }
  .hero::after { background: linear-gradient(90deg, #102a26f5, #102a26b8 51%, #102a262b); }
  .feature-card { flex-basis: 85%; }
  .catalog-block { margin-top: 32px; }
  .catalog-search { width: 100%; }
  .source-address { gap: 4px 7px; }
  .source-address > span:first-child { grid-column: 1/-1; }
  .source-address code { grid-column: 1/3; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .detail-heading { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .detail-heading .package-icon { width: 52px; height: 52px; align-self: start; border-radius: 13px; }
  .detail-heading .button { grid-column: 1/-1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
