:root {
  color-scheme: dark;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: #101017;
  --text: #f7f5ff;
  --muted: #b7b4c9;
  --line: #2c293b;
  --accent: #d1c2fb;
  --panel: #191823;
  --button-border: #494359;
  --button-hover: #252233;
  --button-hover-border: #82749d;
  --filled-text: #201733;
  --filled-hover: #e4d9ff;
  --image-border: #454158;
  --image-shadow: #030208b0;
  --image-glow: #51459832;
}

:root[data-appearance="light"] {
  color-scheme: light;
  background: #f7f5fb;
  --text: #221c34;
  --muted: #554b66;
  --line: #dcd5e9;
  --accent: #4935aa;
  --panel: #fff;
  --button-border: #887ca3;
  --button-hover: #eee9f8;
  --button-hover-border: #695b88;
  --filled-text: #fff;
  --filled-hover: #382682;
  --image-border: #cfc6e0;
  --image-shadow: #3c25501f;
  --image-glow: #7861b415;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, .theme-picker :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
.wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .7rem; background: var(--panel); z-index: 2; }
.skip:focus { top: 1rem; }

.topbar, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  min-height: 76px;
  padding-block: 16px;
}
.topbar { border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .65rem 1.6rem; color: var(--muted); font-size: .9rem; }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); text-decoration: underline; }
.site-nav { display: flex; flex-wrap: wrap; gap: .55rem 1.6rem; align-items: center; justify-content: flex-end; }
.locale-nav { border-inline-start: 1px solid var(--line); padding-inline-start: 1.25rem; gap: .15rem .85rem; }
.locale-nav a { display: inline-flex; min-height: 36px; align-items: center; }
.locale-nav [aria-current="page"] { color: var(--accent); text-decoration: underline; }
.theme-picker { position: relative; font-size: .9rem; }
.theme-picker summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover, .theme-picker[open] summary {
  background: var(--panel);
  border-color: var(--button-border);
  color: var(--text);
}
.theme-icon {
  --ray: linear-gradient(currentColor, currentColor);
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: var(--ray) center top / 1.5px 3px no-repeat,
              var(--ray) center bottom / 1.5px 3px no-repeat,
              var(--ray) left center / 3px 1.5px no-repeat,
              var(--ray) right center / 3px 1.5px no-repeat;
}
.theme-icon::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid;
  border-radius: 50%;
}
.theme-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transform: rotate(45deg);
}
:root[data-appearance="dark"] .theme-icon { background: none; }
:root[data-appearance="dark"] .theme-icon::before {
  width: 15px;
  height: 15px;
  border: 0;
  box-shadow: inset 4px -2px 0 currentColor;
  transform: rotate(-12deg);
}
:root[data-appearance="dark"] .theme-icon::after { display: none; }
.theme-menu {
  position: absolute;
  z-index: 3;
  inset-block-start: calc(100% + .4rem);
  inset-inline-end: 0;
  display: grid;
  gap: .15rem;
  min-width: max(100%, 9rem);
  padding: .35rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 .65rem 1.7rem var(--image-shadow);
}
.theme-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .95rem;
  min-height: 36px;
  padding: .35rem .6rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}
.theme-menu button:hover, .theme-menu [aria-pressed="true"] { background: var(--button-hover); }
.theme-picker:not([open]) .theme-menu { display: none; }
.theme-menu [aria-pressed="true"] { color: var(--accent); font-weight: 650; }
.theme-menu [aria-pressed="true"]::after {
  content: "";
  width: .34rem;
  height: .62rem;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: translateY(-.1rem) rotate(40deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3.2rem, 7vw, 6.6rem);
}
.platforms { color: var(--accent); font-size: .92rem; font-weight: 600; }
.platforms { margin-bottom: 1.3rem; }
h1 {
  font-size: clamp(2.35rem, 4.55vw, 4.125rem);
  font-weight: 680;
  letter-spacing: -.012em;
  line-height: 1.1;
  text-wrap: balance;
}
h1:lang(zh), h1:lang(ja) { letter-spacing: .028em; line-height: 1.15; }
.hero h1:lang(en) { font-size: clamp(2.25rem, 4.15vw, 3.5rem); }
.lede { margin-top: 1.4rem; max-width: 34ch; font-size: clamp(1.06rem, 1.6vw, 1.26rem); }
p, figcaption { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2rem; }
ms-store-badge { display: block; width: 100%; min-width: 0; }
ms-store-badge::part(img) { display: block; width: 100%; height: auto; }
ms-store-badge:not(:defined) { display: none; }
ms-store-badge:defined + .store-fallback { display: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .58rem .95rem;
  border: 1px solid var(--button-border);
  border-radius: 7px;
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { background: var(--button-hover); border-color: var(--button-hover-border); }
.button.filled { border-color: var(--accent); background: var(--accent); color: var(--filled-text); }
.button.filled:hover { background: var(--filled-hover); }
.hero-shot img, .photos img {
  width: 100%;
  border: 1px solid var(--image-border);
  border-radius: 12px;
}
.hero-shot img { box-shadow: 0 18px 68px var(--image-shadow), 0 0 86px var(--image-glow); }
figcaption { margin-top: .65rem; text-align: center; font-size: .8rem; }

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 2.5rem;
  padding-block: 1.8rem 2.2rem;
  border-block: 1px solid var(--line);
}
.workflow h2 { margin-bottom: .45rem; font-size: 1.11rem; }
.workflow p { font-size: .95rem; }
.photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.photos h2, .downloads h2 { font-size: clamp(1.9rem, 3.55vw, 3.3rem); line-height: 1.15; letter-spacing: -.01em; }
.photos h2:lang(zh), .photos h2:lang(ja), .downloads h2:lang(zh), .downloads h2:lang(ja) { letter-spacing: .02em; }
.photos p { margin-block: 1.1rem 1.4rem; }
.text-link { color: var(--accent); font-weight: 600; }
.downloads { scroll-margin-top: 1.5rem; padding-bottom: 4rem; }
.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 1.35rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.download-actions { display: grid; gap: .75rem; width: 220px; max-width: 100%; }
.download-actions .button { width: 100%; min-width: 0; text-align: center; }
.download-platforms { display: grid; gap: .9rem; margin: 0; }
.download-platforms dt { color: var(--accent); font-weight: 600; }
.download-platforms dd { margin: .15rem 0 0; color: var(--muted); }
.footer { border-top: 1px solid var(--line); }
.policy { max-width: 780px; padding-block: 3rem; }
.policy section + section { margin-top: 3.5rem; }
.policy h1 { font-size: clamp(2rem, 5vw, 3rem); }
.policy h2 { font-size: 1.25rem; margin-top: 1.8rem; }
.policy p { margin-top: .7rem; }

@media (max-width: 830px) {
  .wrap { width: calc(100% - 40px); }
  .hero, .photos { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero .lede { max-width: 50ch; }
  .photos > div { order: -1; }
}

@media (max-width: 560px) {
  .topbar, .footer { align-items: flex-start; flex-direction: column; gap: .9rem; }
  nav { gap: .55rem 1.05rem; }
  .site-nav { width: 100%; justify-content: flex-start; gap: .4rem .55rem; }
  .locale-nav { border-inline-start: 0; padding-inline-start: 0; gap: .15rem .55rem; }
  .theme-picker { margin-inline-start: auto; }
  .workflow, .download-panel { grid-template-columns: 1fr; }
  .download-actions { justify-self: start; }
}

@media (max-width: 360px) {
  .headline-break { display: none; }
}
