:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #172d33;
  background: #f5f8f8;
  font-synthesis: none;
  --ink: #172d33;
  --muted: #566b72;
  --button: #17675f;
  --button-hover: #125b54;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 84% 28%, #ceeee880, transparent 46%),
    radial-gradient(ellipse at 12% 66%, #dbeaff75, transparent 46%),
    linear-gradient(165deg, #f6f8fa, #f4f9f8 76%, #f9fbfb);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: #a9e9df; color: #143838; }
a:focus-visible, button:focus-visible {
  outline: 3px solid #0073ac;
  outline-offset: 5px;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.nav-shell { padding: 20px 24px 0; }
.nav {
  direction: ltr;
  max-width: 1160px;
  min-height: 66px;
  margin: auto;
  padding: 8px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 23px;
}
.glass {
  /* Opaque fallback remains legible without backdrop-filter. */
  background: #f7fcfc;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 32px #173e480c, inset 0 1px 0 #ffffffed, inset 0 -1px 0 #ffffff80;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  border-radius: 8px;
}
.brand img { width: 86px; height: auto; }
main { padding: 54px 24px 36px; }
.platforms {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1064px;
  margin: auto;
}
.platform-card {
  grid-column: span 2;
  min-width: 0;
  display: grid;
  grid-template-rows: 84px auto minmax(52px, auto) minmax(44px, auto);
  justify-items: center;
  align-content: start;
  padding: 28px 20px 16px;
  border-radius: 30px;
  text-align: center;
}
.platform-card:nth-child(4) { grid-column: 2 / span 2; }
.platform-card:nth-child(5) { grid-column: 4 / span 2; }
.icon-container {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
}
.platform-icon { width: 64px; height: 64px; object-fit: contain; }
.windows-icon { width: 55px; height: 55px; }
.platform-card[aria-labelledby="android-title"] .platform-icon { width: 56px; height: 56px; }
h2 { margin: 12px 0 24px; font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  max-width: 100%;
  min-height: 52px;
  padding: 6px 14px;
  border: 0;
  border-radius: 99px;
  box-shadow: none;
  background: var(--button);
  color: #fff;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.25;
  transition: background-color .18s ease;
}
.button > span { min-width: 0; max-width: 100%; text-wrap: balance; }
.button:disabled { background: #e1e9e8; color: #5e6e70; cursor: not-allowed; }
.card-note {
  min-height: 44px;
  margin: 0;
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.6;
}
.card-note a {
  display: inline-flex;
  align-items: center;
  column-gap: .25em;
  min-height: 44px;
  min-width: 44px;
  color: var(--button);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
}
.card-note:lang(en) a {
  /* Keep the 44px touch target without adding space after the inline word. */
  padding-inline: 8px;
  margin-inline: -8px;
}

.install-help-link {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--button);
  font: inherit;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.install-help-link:hover:not(:disabled) { color: var(--button-hover); }
.install-help-link.pointer-focus:focus { outline: none; }
.install-help-link:disabled { color: var(--muted); cursor: default; }
html.install-help-open { overflow: hidden; }
.install-dialog {
  width: min(520px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  border-radius: 28px;
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 80px #173e4826, inset 0 1px 0 #fff;
}
.install-dialog:not([open]) { display: none; }
.install-dialog::backdrop { background: #17303840; }
.install-dialog-header { display: flex; align-items: center; gap: 12px; }
.install-dialog-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 15px; background: #e4f2ef; }
.install-dialog-icon img { width: 32px; height: 32px; }
.install-dialog h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.25rem; line-height: 1.4; letter-spacing: -.02em; }
.install-dialog-header form { margin: 0; flex: none; }
.install-dialog-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #e7efee; color: var(--muted); cursor: pointer; }
.install-dialog-close:hover { background: #dbe9e6; color: var(--button); }
.install-steps { counter-reset: install-step; list-style: none; display: grid; gap: 18px; margin: 26px 0 0; padding: 0; }
.install-steps li { counter-increment: install-step; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; font-size: .9375rem; line-height: 1.8; }
.install-steps li::before { content: counter(install-step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e1efeb; color: var(--button); font-size: .8125rem; font-weight: 600; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .install-dialog.glass { background: #f7fcfcf2; }
  .install-dialog::backdrop { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
}
@media (max-width: 599px) {
  .install-dialog { padding: 20px; border-radius: 24px; }
  .install-dialog-header { gap: 10px; }
  .install-dialog-icon { width: 40px; height: 40px; border-radius: 12px; }
  .install-dialog-icon img { width: 28px; height: 28px; }
  .install-dialog h2 { font-size: 1.125rem; }
  .install-steps { margin-top: 22px; }
}

/* Footer controls are scoped separately from platform download buttons. */
.download-footer {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 45px 24px 32px;
  color: var(--muted);
  font-size: .875rem;
}
.download-footer .footer-brand { grid-column: 1; grid-row: 1; display: inline-flex; width: 86px; min-height: 44px; align-items: center; border-radius: 8px; }
.download-footer .footer-brand img { width: 86px; height: auto; }
.download-footer .footer-tagline { grid-column: 1; grid-row: 2; min-width: 0; margin: 8px 0 13px; font-size: 13px; line-height: normal; }
.download-footer .language-options {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  direction: ltr;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.download-footer .language-option {
  flex: 0 0 104px;
  width: 104px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dce7e8;
  border-radius: 12px;
  background: #f5f9f8;
  color: #435f64;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.download-footer .language-option img { width: 24px; height: 18px; object-fit: contain; border-radius: 2px; box-shadow: 0 0 0 1px #172d3318; flex: none; }
.download-footer .language-option bdi { font-family: inherit; }
.download-footer .language-option[aria-pressed="true"] { background: #17675f; border-color: #17675f; color: #fff; }
.download-footer .language-option:hover:not(:disabled):not([aria-pressed="true"]) { background: #e6f0ed; }
.download-footer .language-option:disabled { cursor: default; }
.download-footer .language-status { grid-column: 1 / -1; margin: 14px 0 0; text-align: right; font-size: .875rem; line-height: 1.7; }
.download-footer .language-status[hidden] { display: none; }
.download-footer small { grid-column: 1 / -1; border-top: 1px solid #dce7e8; padding-top: 24px; margin-top: 28px; font-size: 12px; }
@media (max-width: 700px) {
  .download-footer { display: block; padding: 40px 22px 28px; }
  .download-footer .language-options { margin: 18px 0 20px; }
  .download-footer small { display: block; margin-top: 12px; }
}

/* RTL applies to prose, never to physical platform or language-button order. */
html[dir="rtl"] .platform-card, html[dir="rtl"] .footer-tagline:not([dir="ltr"]) { direction: rtl; }
html[dir="rtl"] .footer-tagline { text-align: left; }
html[lang="zh-TW"] { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif; }
html[lang="ja"] { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; }
html[lang="ko"] { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html[lang="ar-SA"] { font-family: -apple-system, BlinkMacSystemFont, "Geeza Pro", "Tahoma", sans-serif; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: linear-gradient(135deg, #ffffff9e, #eff9f98a);
    border-color: #ffffffb8;
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
  }
}
@media (hover: hover) {
  a.button:hover { background: var(--button-hover); }
  .card-note a:hover { color: var(--button-hover); }
}
@media (max-width: 999px) {
  .platforms { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 704px; }
  .platform-card:nth-child(4) { grid-column: span 2; }
  .platform-card:nth-child(5) { grid-column: 2 / span 2; }
}
@media (max-width: 599px) {
  .nav-shell { padding: 12px 16px 0; }
  .nav { min-height: 62px; padding: 8px 18px; border-radius: 21px; }
  .brand img { width: 78px; }
  main { padding: 40px 16px 40px; }
  .platforms { grid-template-columns: minmax(0, 1fr); max-width: 390px; gap: 16px; }
  .platform-card, .platform-card:nth-child(4), .platform-card:nth-child(5) { grid-column: 1; }
  .platform-card { padding-top: 24px; border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
