:root {
  color-scheme: light;
  --canvas: #f6f7f1;
  --text: #172923;
  --muted: #52635a;
  --line: #d8e1d7;
  --accent: #235d4a;
  --surface: #fffef9;
  --gallery: #e5eee5;
  --gallery-side: #edf3ea;
  --header: rgba(246,247,241,.94);
  --mint: #c4f0d5;
  --pine: #112a23;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0f1c19;
  --text: #e7f1e9;
  --muted: #b1c3b9;
  --line: #34473e;
  --accent: #ace4c8;
  --surface: #172622;
  --gallery: #253c34;
  --gallery-side: #192e26;
  --header: rgba(15,28,25,.94);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #0f1c19;
    --text: #e7f1e9;
    --muted: #b1c3b9;
    --line: #34473e;
    --accent: #ace4c8;
    --surface: #172622;
    --gallery: #253c34;
    --gallery-side: #192e26;
    --header: rgba(15,28,25,.94);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 94px; }
body { margin: 0; background: var(--canvas); color: var(--text); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 30; top: 12px; left: 12px; padding: 12px; background: var(--surface); transform: translateY(calc(-100% - 14px)); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; z-index: 5; top: 0; background: var(--header); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { border-color: var(--line); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.header-row { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; width: fit-content; font: 720 22px/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: -.8px; }
.brand img { border-radius: 11px; }
.site-nav, .header-actions, .footer-row nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 34px); }
.site-nav a, .footer-row nav a { font-size: 14px; color: var(--muted); }
.site-nav a:hover, .footer-row nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.header-actions { gap: 9px; justify-self: end; }
.icon-button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; font-weight: 650; }
.icon-button { width: 42px; height: 42px; border-color: var(--line); border-radius: 50%; background: none; color: var(--text); }
.icon-button:hover { background: var(--surface); }
.theme-toggle[aria-pressed="false"] .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.button { min-height: 52px; border-radius: 9px; padding: 0 19px; font-size: 14px; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease, translate .18s ease; }
.button:hover { translate: 0 -2px; }
.header-download { min-height: 42px; padding-inline: 14px; background: var(--text); color: var(--canvas); }
.button-mint { background: var(--mint); color: #112a23; }
.button-mint:hover { background: #ddf9e9; }
.button-outline { border-color: #76978a; color: #e5f4ed; }
.button-outline:hover { border-color: #c4f0d5; background: #234338; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 635px;
  overflow: hidden;
  border-radius: 25px;
  background: radial-gradient(ellipse at 84% 38%, #2e6350 0%, #193d32 31%, transparent 66%), #112a23;
  color: #f4fcf7;
}
.hero-copy { z-index: 1; padding: 66px 0 68px clamp(32px, 6vw, 84px); }
.hero-platform { display: flex; width: fit-content; align-items: center; gap: 9px; color: #cce9d8; margin-bottom: 27px; font-size: 13px; letter-spacing: .025em; }
.hero-platform > span { width: 7px; height: 7px; background: #8ce4b8; border-radius: 50%; box-shadow: 0 0 13px #84e5ab80; }
.hero h1 { font-size: clamp(68px, 8vw, 114px); font-weight: 800; line-height: 1.06; letter-spacing: -.075em; }
.hero h1 span { display: block; margin-top: 24px; font-size: clamp(21px, 3.3vw, 40px); line-height: 1.25; font-weight: 680; letter-spacing: -.045em; }
.hero-lead { max-width: 27em; margin-top: 25px; padding-right: 14px; color: #c6dcd1; font-size: clamp(15px, 1.38vw, 17px); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-details { margin-top: 18px; color: #b8d2c5; font: 500 12px/1.7 "Segoe UI", "Microsoft YaHei", sans-serif; }
.hero-details span { margin-inline: 6px; }

.hero-art {
  position: absolute; inset: 0 0 0 47%;
  overflow: hidden; pointer-events: none;
}
.hero-art::before {
  position: absolute; inset: 0; content: "";
  background: linear-gradient(#a4e0bf1a 1px, transparent 1px), linear-gradient(90deg, #a4e0bf1a 1px, transparent 1px);
  background-size: 43px 43px;
  mask-image: radial-gradient(ellipse at 70% 52%, #000 14%, transparent 78%);
}
.hero-orbit {
  position: absolute; width: 73%; aspect-ratio: 1; top: 13%; left: 11%; border: 1px solid #b7f4cc32; border-radius: 50%;
  box-shadow: 0 0 0 46px #b7f4cc14, 0 0 0 47px #b7f4cc10, 0 0 90px #78d9a927, inset 0 0 90px #78d9a91a;
}
.device { display: block; overflow: hidden; padding: 6px; border: 1px solid #e7fff58e; border-radius: 25px; background: #20372e; box-shadow: 0 24px 60px #081e1790, inset 0 0 0 1px #ffffff20; }
.device img { width: 100%; height: auto; border-radius: 19px; background: #f7f8f5; }
.hero .device { position: absolute; }
.device-front { z-index: 1; top: 11%; left: 15%; width: clamp(183px, 21.5vw, 275px); rotate: -9deg; }
.device-back { top: 13%; left: 45%; width: clamp(163px, 19vw, 243px); rotate: 10deg; }

.section { margin-top: clamp(70px, 9vw, 118px); scroll-margin-top: 10px; }
.section-heading { display: grid; gap: 13px; margin-bottom: 27px; }
.section-heading h2, .download h2 { font-size: clamp(30px, 4vw, 51px); line-height: 1.15; font-weight: 760; letter-spacing: -.055em; }
.section-heading p, .feature p, .install-steps p { color: var(--muted); line-height: 1.8; }
.section-heading p { font-size: 15px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: 15px; overflow: hidden; }
.feature { min-height: 193px; padding: clamp(21px, 3vw, 35px); background: var(--surface); }
.feature > svg { color: var(--accent); width: 23px; height: 23px; }
.feature h3, .install-steps h3 { margin: 17px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.feature p, .install-steps p { font-size: 14px; }

.gallery { display: grid; grid-template-columns: minmax(265px, .88fr) minmax(0, 1.55fr); min-height: 610px; border: 1px solid var(--line); border-radius: 21px; overflow: hidden; background: var(--gallery); }
.gallery-controls { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: start; padding: clamp(28px, 5vw, 66px); background: var(--gallery-side); }
.screen-options { display: grid; width: 100%; gap: 3px; }
.screen-options a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px;
  border-radius: 7px; padding: 10px 13px; font-size: 14px; color: var(--muted); font-weight: 650;
}
.screen-options a span { opacity: .76; }
.screen-options a:hover { background: var(--surface); }
.screen-options a[aria-current="true"] { background: var(--pine); color: #ebfaf0; }
.screen-options a[aria-current="true"] span { color: #bbe8ce; }
.gallery-caption { margin: 29px 0 15px; min-height: 71px; }
.gallery-caption h3 { font-size: 21px; letter-spacing: -.04em; }
.gallery-caption p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.enlarge { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 5px 0; color: var(--accent); font-size: 13px; font-weight: 700; }
.enlarge:hover { text-decoration: underline; text-underline-offset: 4px; }
.gallery-stage { position: relative; min-height: 100%; display: grid; place-items: center; isolation: isolate; overflow: hidden; padding: 36px 24px; }
.gallery-ring {
  position: absolute; z-index: -1; width: min(75%, 480px); aspect-ratio: 1; border: 1px solid #457a562b; border-radius: 50%;
  box-shadow: 0 0 0 36px #7eab8b23, 0 0 0 37px #4f885725, 0 0 0 73px #7eab8b12;
}
.gallery-device { width: min(245px, 100%); box-shadow: 0 28px 65px #183b2c43; }
.gallery-device img { aspect-ratio: 9/20; object-fit: contain; }

.appearance { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; gap: 32px; padding: 25px 0; border-block: 1px solid var(--line); }
.appearance .section-heading { margin-bottom: 0; }
.appearance h2 { font-size: clamp(26px, 3vw, 37px); }
.palettes { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(8px, 2.1vw, 22px); padding: 0; list-style-type: none; }
.palettes li { display: grid; gap: 8px; text-align: center; color: var(--muted); font-size: 12px; padding-block: 5px; }
.palette-swatch { display: block; width: 100%; aspect-ratio: 11/7; border: 1px solid #65766830; border-radius: 7px; background: linear-gradient(130deg,var(--a) 31%,var(--b) 31% 59%,var(--c) 59%); }
.palette-original { --a:#f2f1ed; --b:#303135; --c:#d8e8e9; }
.palette-green { --a:#ebf0e4; --b:#365d48; --c:#beceba; }
.palette-blue { --a:#edf6fc; --b:#355e83; --c:#b2c4dc; }
.palette-purple { --a:#f7f4fa; --b:#74518c; --c:#d8c6e5; }
.palette-apricot { --a:#fbf6ef; --b:#8a5b36; --c:#ecd0ac; }

.download { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 23px 35px; padding: clamp(30px,6.5vw,73px); border-radius: 22px; color: #f4fcf7; background: radial-gradient(ellipse at 100% 0%, #315e4e, transparent 75%), #112a23; }
.download p { margin-top: 13px; color: #c6dcd1; font-size: 14px; }
.download-options { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.release-link { display: inline-flex; gap: 6px; color: #d0ebdc; font-size: 13px; }
.release-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.checksum { grid-column: 1 / -1; color: #c9e5d6; border-top: 1px solid #718b7d; padding-top: 17px; font-size: 13px; }
.checksum code { overflow-wrap: anywhere; display: block; margin-top: 11px; color: #eaf7ef; line-height: 1.65; }

.install-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; list-style: none; counter-reset: install; }
.install-steps li { border-top: 1px solid var(--line); counter-increment: install; padding-top: 17px; }
.install-steps li::before { content: counter(install, decimal-leading-zero); color: var(--accent); font: 650 13px/1.1 "Segoe UI", sans-serif; }
.install-steps h3 { margin-top: 10px; }

.contribute {
  display: grid; grid-template-columns: 1.13fr 1fr; align-items: center;
  gap: clamp(26px, 5vw, 64px); padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line); border-radius: 21px; background: var(--gallery-side);
}
.contribute .section-heading { margin: 0; }
.contribute h2 { font-size: clamp(27px, 4vw, 43px); }
.contribute-links { display: grid; gap: 9px; }
.contribute-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 66px; padding: 13px 16px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface);
}
.contribute-links a:hover { border-color: var(--accent); }
.contribute-links strong, .contribute-links small { display: block; }
.contribute-links strong { font-size: 15px; }
.contribute-links small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.contribute-links a > span { flex: none; color: var(--accent); }

.site-footer { margin-top: 76px; padding-block: 30px; border-top: 1px solid var(--line); }
.footer-row nav { flex-wrap: wrap; gap: 12px 24px; }
.site-footer p { margin-top: 21px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.site-footer p a { text-decoration: underline; text-underline-offset: 3px; }

.lightbox { max-width: min(580px, calc(100vw - 36px)); max-height: calc(100dvh - 24px); border: 1px solid #4b6358; border-radius: 16px; padding: 12px; background: #142a23; color: #f4fcf7; overflow: auto; }
.lightbox::backdrop { background: #081711e8; }
.lightbox-close { position: absolute; top: 14px; right: 13px; background: #13291f; color: #f4fcf7; border-color: #679585; font-size: 24px; }
.lightbox-close:hover { background: #224d3f; }
.lightbox img { height: min(78dvh, 930px); width: auto; max-width: 100%; object-fit: contain; margin-inline: auto; border-radius: 8px; }
.lightbox figcaption { text-align: center; padding: 11px 36px 1px; font-size: 14px; }

@media (max-width: 960px) {
  .hero { min-height: 572px; }
  .hero-copy { padding-left: clamp(28px,5.4vw,53px); }
  .device-front { top: 16%; left: 15%; }
  .device-back { top: 18%; left: 49%; }
  .download-options { justify-content: start; }
  .appearance { gap: 22px; }
}

@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
  html { scroll-padding-top: 78px; }
  .header-row { min-height: 61px; gap: 10px; grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .hero { display: flex; flex-direction: column; min-height: auto; align-items: stretch; border-radius: 19px; background: radial-gradient(ellipse at 65% 79%,#2f6551,transparent 65%),#112a23; }
  .hero-copy { padding: 37px 23px 18px; }
  .hero-platform { margin-bottom: 20px; }
  .hero h1 { font-size: clamp(61px, 12vw, 78px); }
  .hero h1 span { margin-top: 13px; font-size: clamp(23px, 6vw, 34px); }
  .hero-lead { margin-top: 17px; padding: 0; }
  .hero-actions { margin-top: 24px; gap: 8px; }
  .hero-actions .button { padding-inline: 11px; }
  .hero-details { margin-top: 13px; }
  .hero-art { position: relative; inset: auto; min-height: clamp(367px, 90vw, 510px); }
  .hero-orbit { top: 10%; left: 13.5%; }
  .device-front { top: 9%; left: 14%; width: clamp(133px, 42vw, 213px); rotate: -8deg; }
  .device-back { top: 13%; left: 45%; width: clamp(121px, 38vw, 193px); rotate: 9deg; }
  .device { border-radius: 19px; padding: 5px; }
  .device img { border-radius: 14px; }
  .feature-grid { grid-template-columns: repeat(2,minmax(0, 1fr)); }
  .feature { padding: 17px; min-height: 0; }
  .feature p, .install-steps p { font-size: 13px; }
  .feature h3 { font-size: 15px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-controls { padding: 18px; }
  .screen-options { grid-template-columns: 1fr 1fr; }
  .screen-options a { min-height: 41px; }
  .gallery-caption { margin: 16px 0 8px; min-height: 0; }
  .gallery-stage { padding: 28px 16px; }
  .gallery-device { width: min(224px, 72vw); }
  .appearance { grid-template-columns: 1fr; gap: 6px; }
  .download { grid-template-columns: 1fr; }
  .install-steps { grid-template-columns: 1fr; gap: 18px; }
  .contribute { grid-template-columns: 1fr; }
  .footer-row { align-items: flex-start; flex-direction: column; gap: 16px; }
}

@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .hero-copy { padding-inline: 17px; }
  .hero-actions .button { font-size: 13px; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
