:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #172331;
  background: #edf7ff;
  font-synthesis: none;
  --blue: #008bff;
  --muted: #536477;
  --border: #cce3fc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; font-size: 16px; line-height: 1.55; background: linear-gradient(150deg, #eef8ff, #e7f3ff); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #1459a1; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 23px; line-height: 1.35; }
.page-shell { width: calc(100% - 32px); max-width: 980px; margin: 0 auto; padding: 24px 0 28px; }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: rgb(255 255 255 / 94%); box-shadow: 0 6px 24px rgb(54 124 190 / 3%); }
.panel + .panel, .notice + .panel, .panel + .notice { margin-top: 18px; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 10px 16px; border-radius: 8px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.brand-header { display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand-icon { display: block; flex: 0 0 auto; border-radius: 19px; }
h1 { font-size: 42px; font-weight: 800; letter-spacing: 1px; line-height: 1.15; }
.brand-subtitle { margin-top: 6px; color: #455970; font-size: 19px; font-weight: 500; }
.header-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nav-link { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 48px; padding: 9px 12px; border: 1px solid #9ac5ff; border-radius: 12px; color: #007eea; font-size: 18px; font-weight: 700; background: #fff; }
.nav-link:hover { background: #edf7ff; }
.icon { display: block; flex: 0 0 auto; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice { margin-top: 18px; padding: 18px 22px; border: 1px solid #ffdda0; border-radius: 18px; background: #fff9ed; }
.notice h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.notice-symbol { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 8px; color: #fff; background: #ed9400; font-size: 21px; font-weight: 800; }
.notice ul { margin: 9px 0 0; padding-left: 28px; }
.notice li { padding-left: 2px; margin: 3px 0; }
.notice li::marker { color: #ed9400; }
.step-title { display: flex; align-items: center; gap: 14px; }
.step-number { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 auto; min-width: 52px; padding: 2px 9px; border-radius: 11px; color: #fff; background: var(--blue); font-size: 22px; font-weight: 800; line-height: 1.45; }
.step-copy { margin-top: 10px; margin-bottom: 16px; color: var(--muted); }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 18px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(120deg, #0098ff, #0084f7); font-size: 20px; font-weight: 700; line-height: 1.4; }
.primary-button:hover, .install-button:hover { background: #0076db; }
.settings-path { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #edf5fc; font-size: 15px; }
.settings-path > span:first-child { font-size: 22px; line-height: 1; }
.settings-path > span:not(:first-child) { color: #65798d; }
.helper-text { margin-top: 10px; color: var(--muted); font-size: 13px; }
.version-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 12px; }
.version-summary > p { color: #34475d; font-weight: 600; }
.status-badge { display: inline-block; padding: 3px 9px; border: 1px solid #d6e5f4; border-radius: 99px; color: #5c7187; background: #f1f6fb; font-size: 12px; font-weight: 500; white-space: nowrap; }
.version-intro { margin-top: 6px; margin-bottom: 0; font-size: 14px; }
.version-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.version-item { display: grid; grid-template-columns: 38px 42px minmax(0, 1fr) 112px; align-items: center; gap: 12px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.version-number { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: #0766c6; background: #edf4fa; font-size: 18px; font-weight: 750; }
.version-icon { display: block; border-radius: 9px; }
.version-copy { min-width: 0; }
.version-copy h3 { font-size: 17px; line-height: 1.35; }
.version-copy p { margin-top: 2px; color: #4a5b6e; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.install-button { min-width: 0; min-height: 44px; padding: 8px 9px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: 15px; font-weight: 700; white-space: nowrap; }
.trust-copy { margin-bottom: 0; }
.faq-section h2 { margin-bottom: 9px; }
.faq-section details { border-top: 1px solid #e2edf7; }
.faq-section summary { position: relative; padding: 15px 28px 15px 0; cursor: pointer; font-size: 16px; font-weight: 600; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { position: absolute; right: 2px; top: 11px; color: #1677d5; content: "+"; font-size: 24px; font-weight: 400; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p { padding-bottom: 16px; color: var(--muted); font-size: 14px; line-height: 1.75; }
footer { margin-top: 22px; color: #566c82; text-align: center; font-size: 16px; letter-spacing: 1px; }
.install-dialog { position: fixed; width: calc(100% - 32px); max-width: 440px; max-height: calc(100% - 40px); margin: auto; padding: 26px; overflow: auto; border: 1px solid #c4e2ff; border-radius: 21px; color: #172331; background: #fff; box-shadow: 0 20px 80px rgb(13 48 82 / 18%); }
.install-dialog::backdrop { background: rgb(17 43 70 / 38%); }
.install-dialog h2 { padding-right: 24px; font-size: 23px; }
.install-dialog > p { margin-top: 12px; color: var(--muted); }
.dialog-close { position: absolute; top: 9px; right: 10px; display: flex; justify-content: center; align-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; color: #57718b; background: transparent; font-size: 30px; line-height: 1; }
.dialog-close:hover { background: #edf6ff; }
.selected-version { margin: 18px 0; padding: 15px; border-radius: 12px; background: #f0f7fe; }
.selected-version dt { margin-bottom: 4px; color: #5b7289; font-size: 12px; }
.selected-version dd { margin: 0; color: #24445e; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.selected-version dd + dt { margin-top: 12px; }
.dialog-confirm { min-height: 48px; font-size: 17px; }

@media (min-width: 820px) {
  .brand-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .header-links { width: 380px; }
  .version-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .version-item { grid-template-columns: 34px 38px minmax(0, 1fr) 98px; gap: 9px; }
  .version-number { width: 34px; height: 34px; }
  .version-icon { width: 38px; height: 38px; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .page-shell { width: calc(100% - 24px); padding-top: 12px; }
  .panel { padding: 15px; border-radius: 17px; }
  .panel + .panel, .notice + .panel, .panel + .notice { margin-top: 13px; }
  .brand-header { gap: 16px; }
  .brand { gap: 14px; }
  .brand-icon { width: 70px; height: 70px; border-radius: 16px; }
  h1 { font-size: 34px; }
  .brand-subtitle { font-size: 16px; }
  .header-links { gap: 10px; }
  .nav-link { min-height: 44px; padding: 8px; font-size: 16px; }
  .nav-link .icon { width: 21px; height: 21px; }
  .notice { margin-top: 13px; padding: 15px; border-radius: 16px; }
  .notice h2 { gap: 8px; font-size: 20px; }
  .notice ul { padding-left: 24px; }
  .step-title { gap: 10px; font-size: 21px; }
  .step-number { min-width: 44px; padding: 2px 7px; border-radius: 10px; font-size: 20px; }
  .primary-button { min-height: 48px; font-size: 18px; }
  .settings-path { gap: 9px; padding: 9px 11px; font-size: 13px; }
  .version-item { grid-template-columns: 32px 36px minmax(0, 1fr) 88px; gap: 8px; padding: 9px 8px; }
  .version-number { width: 32px; height: 34px; font-size: 17px; }
  .version-icon { width: 36px; height: 36px; border-radius: 8px; }
  .version-copy h3 { font-size: 15px; }
  .version-copy p { font-size: 11px; }
  .install-button { padding: 8px 6px; font-size: 14px; }
  .version-intro { font-size: 13px; }
  .install-dialog { padding: 22px; }
}

@media (max-width: 359px) {
  .page-shell { width: calc(100% - 16px); }
  .panel { padding: 12px; }
  .version-item { grid-template-columns: 29px 31px minmax(0, 1fr) 80px; gap: 6px; padding: 8px 6px; }
  .version-number { width: 29px; }
  .version-icon { width: 31px; height: 31px; }
  .install-button { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
