:root {
  color-scheme: light;
  --background: #f5f5f7;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --line: #e4e4e9;
  --blue: #0071e3;
  --card: #fff;
  --radius: 26px;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--text); background: var(--background); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.26; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }
.shell { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -90px; left: 14px; z-index: 20; padding: 10px 16px; color: #fff; background: var(--text); border-radius: 12px; }
.skip-link:focus { top: 14px; }
.site-header { background: #fff9; border-bottom: 1px solid #e7e7eb; }
.header-inner { display: flex; min-height: 80px; align-items: center; gap: 20px; padding-block: 15px; }
.brand { display: block; flex: 0 0 152px; }
.brand img { width: 100%; height: auto; }
.site-nav { display: flex; flex: 1; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.site-nav a { color: #55555b; font-weight: 500; font-size: .84rem; }
.site-nav a:hover, .site-footer a:hover { color: var(--blue); }
.site-nav a span { margin-left: 2px; }
.language-control select { min-height: 44px; min-width: 114px; padding: 6px 8px 6px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--text); font-size: 1rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: clamp(35px, 6vw, 78px); align-items: center; padding-block: 54px 47px; }
.hero-copy { padding-left: 2px; }
.eyebrow { color: var(--secondary); font-size: .82rem; font-weight: 550; }
.hero h1 { margin-top: 12px; font-size: clamp(3rem, 5.6vw, 4.65rem); line-height: 1.1; letter-spacing: -.065em; }
html[lang="en"] .hero h1 { font-size: clamp(2.7rem, 5vw, 4.25rem); letter-spacing: -.05em; }
.hero-description { margin-block: 19px 15px; color: var(--secondary); max-width: 30em; line-height: 1.8; }
.text-link { color: var(--blue); font-size: .88rem; font-weight: 550; display: inline-flex; align-items: center; gap: 7px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.source-card { padding: 27px; color: #fff; background: linear-gradient(145deg, #303136, #1c1c1f 74%); border: 1px solid #ffffff0e; border-radius: var(--radius); box-shadow: 0 18px 38px -25px #10101677; }
.source-top { display: flex; align-items: center; gap: 9px; color: #c2c2cb; font-size: .78rem; }
.source-icon { width: 33px; height: 33px; border-radius: 10px; color: #ededf5; background: #ffffff15; border: 1px solid #ffffff20; }
.tile-mark { display: grid; place-items: center; }
.tile-mark::before { content: ""; width: 48%; height: 48%; border: 1px solid currentColor; border-radius: 3px; background: linear-gradient(90deg, transparent 46%, currentColor 47% 53%, transparent 54%), linear-gradient(0deg, transparent 46%, currentColor 47% 53%, transparent 54%); }
.source-card h2 { margin-top: 14px; font-size: clamp(1.3rem, 2.3vw, 1.65rem); letter-spacing: -.026em; }
.source-card > p { margin-top: 6px; color: #c7c7ce; font-size: .83rem; }
.source-address { display: flex; align-items: center; justify-content: space-between; gap: 7px 10px; padding-top: 13px; margin-top: 15px; border-top: 1px solid #ffffff23; }
.source-address code { font: .82rem/1.45 "SFMono-Regular", Menlo, monospace; color: #e9e9ef; overflow-wrap: anywhere; user-select: all; }
.copy-source { flex-shrink: 0; min-height: 34px; padding: 4px 9px; border: 1px solid #ffffff30; border-radius: 8px; color: #f2f2f7; background: #ffffff11; font-size: .76rem; cursor: pointer; }
.copy-source:hover { background: #ffffff26; }
.source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.source-button { display: flex; gap: 6px; align-items: center; justify-content: center; min-height: 44px; padding: 8px 9px; background: #f5f5f7; color: #202023; border-radius: 12px; font-size: .84rem; font-weight: 650; line-height: 1.25; text-align: center; }
.source-button:hover { background: #fff; }
.source-button.secondary { color: #f5f5f7; background: #ffffff12; border: 1px solid #ffffff29; }
.source-button.secondary:hover { background: #ffffff23; }

.catalog-block { padding-block: 13px 29px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px 22px; margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.035em; }
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.feature-card { min-width: 0; min-height: 207px; display: flex; flex-direction: column; padding: 23px; background: var(--card); border: 1px solid #e9e9ed; border-radius: var(--radius); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.package-icon { width: 42px; height: 42px; flex: none; border-radius: 10px; background: #f4f5fa; color: #526278; object-fit: contain; }
.feature-card .package-icon { width: 59px; height: 59px; border-radius: 15px; }
.pill { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: 3px 8px; color: #55555f; font-size: .75rem; white-space: nowrap; }
.feature-card h3 { font-size: clamp(1.2rem, 2vw, 1.48rem); letter-spacing: -.026em; }
.card-description { color: var(--secondary); font-size: .9rem; margin: 8px 0 14px; overflow-wrap: anywhere; white-space: pre-line; }
.feature-points { display: grid; gap: 11px; margin: 0 0 17px; padding: 0; list-style: none; }
.feature-points li { position: relative; padding-left: 13px; }
.feature-points li::before { content: ""; position: absolute; top: .65em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #8b8b95; }
.feature-points strong, .feature-points span { display: block; }
.feature-points strong { font-size: .9rem; }
.feature-points span { color: var(--secondary); font-size: .85rem; overflow-wrap: anywhere; }
.feature-card .text-link { margin-top: auto; width: fit-content; }

.catalog-search { width: min(100%, 300px); }
.catalog-search input { width: 100%; padding: 8px 12px; min-height: 41px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--text); font-size: 1rem; }
.catalog-search input::placeholder { color: var(--secondary); }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; min-height: 37px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); font-size: .8rem; }
.filters a:hover, .filters a[aria-current="true"] { color: #005bad; background: #eaf3ff; border-color: #b8d9fc; }
.filters span, .row-version { color: var(--secondary); font: .78rem "SFMono-Regular", Menlo, monospace; }
.category { margin-bottom: 19px; }
.category h3 { color: var(--secondary); font-size: .86rem; font-weight: 600; margin: 0 0 7px 5px; }
.package-list { background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding-inline: 12px; }
.package-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 10px; align-items: center; gap: 11px; padding: 8px 2px; min-height: 62px; border-bottom: 1px solid #ededf0; }
.package-row:last-child { border-bottom: 0; }
.package-row:hover strong { color: var(--blue); }
.package-copy { display: grid; overflow-wrap: anywhere; }
.package-copy span { font-size: .78rem; color: var(--secondary); }
.row-arrow { color: var(--blue); font-size: 1.2rem; }
.empty-state, .muted { color: var(--secondary); }
.empty-state { padding-block: 12px 24px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding-block: 20px 25px; border-top: 1px solid #dfdfe5; color: var(--secondary); font-size: .79rem; }
.site-footer span:first-child { margin-right: auto; }

.back { margin-block: 24px 12px; }
.detail-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: clamp(17px, 3.7vw, 32px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-heading .package-icon { width: 69px; height: 69px; border-radius: 16px; }
.detail-heading h1 { font-size: clamp(1.48rem, 4vw, 2.7rem); letter-spacing: -.035em; }
.detail-author { font-size: .86rem; }
.detail-author:empty { display: none; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 7px 12px; border-radius: 22px; background: var(--blue); color: #fff; font-size: .86rem; font-weight: 600; text-align: center; }
.button:hover { background: #0064c9; }
.detail-nav { display: flex; flex-wrap: wrap; gap: 10px 19px; margin-block: 12px 6px; padding: 6px 2px; font-size: .88rem; color: #005ebd; }
.detail-nav a:hover { text-decoration: underline; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 25px; padding-bottom: 24px; }
.detail-section { padding: 16px 1px; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 1.12rem; margin-bottom: 9px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.gallery { display: flex; gap: 9px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 3px 8px; margin-inline: -3px; }
.gallery a { flex: 0 0 clamp(118px, 40%, 174px); scroll-snap-align: start; }
.screenshot { width: 100%; aspect-ratio: 154/334; object-fit: contain; background: #ececf0; border: 1px solid var(--line); border-radius: 12px; }
.shot-viewer { width: min(470px, calc(100% - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 13px; }
.shot-viewer::backdrop { background: #17171fb8; }
.viewer-head, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viewer-head p { font-size: .84rem; }
.viewer-controls { justify-content: center; }
.shot-viewer img { margin: 8px auto; max-height: calc(100vh - 145px); object-fit: contain; }
.shot-viewer button { min-height: 34px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 9px; color: #005ebd; background: var(--background); font-size: .8rem; cursor: pointer; }
.shot-viewer button:disabled { cursor: default; opacity: .48; }
dl { margin: 0; }
dl div, .download { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .88rem; }
dt, .log-entry time, .download small { color: var(--secondary); }
dt { flex: 0 0 auto; }
dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; }
.log-entry { border-left: 2px solid #b9d9fb; padding-left: 10px; margin: 9px 0 13px; }
.log-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; margin-bottom: 3px; }
.log-head time { font: .77rem Menlo, monospace; }
.download { font-weight: 600; color: #005ebd; }
.download:hover { text-decoration: underline; }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 64px); }
}
@media (max-width: 860px) {
  .featured { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 40px); }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 12px; padding-block: 12px; }
  .brand { width: 126px; }
  .site-nav { grid-area: 2 / 1 / 3 / -1; justify-content: flex-start; gap: 8px 14px; }
  .language-control { grid-area: 1 / 2; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 29px 24px; gap: 18px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 3.25rem); }
  html[lang="en"] .hero h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
  .hero-description { margin-block: 10px 7px; font-size: .88rem; }
  .source-card { padding: 17px; border-radius: 20px; }
  .feature-card { min-height: 0; padding: 14px 16px; border-radius: 16px; }
  .feature-card .package-icon { width: 44px; height: 44px; border-radius: 11px; }
  .card-top { margin-bottom: 6px; }
  .feature-points { gap: 9px; margin-bottom: 13px; }
  .section-heading { flex-wrap: wrap; margin-bottom: 12px; }
  .catalog-search { width: 100%; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .detail-heading { grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; border-radius: 18px; }
  .detail-heading .package-icon { width: 51px; height: 51px; }
  .detail-heading .button { grid-column: 1/-1; justify-self: start; }
}
@media (max-width: 365px) {
  .shell { width: calc(100% - 30px); }
  .source-address { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
