.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 980px;
  background: var(--contrast);
  color: var(--on-contrast);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.pill:hover {
  background: var(--contrast-hover);
}

.nav-download {
  position: relative;
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.nav-download::before {
  content: "";
  position: absolute;
  inset: -8px -4px;
}

.nav.is-dark .nav-download {
  background: var(--paper);
  color: var(--ink);
}

.nav.is-dark .nav-download:hover {
  background: #fff;
}

.nav.is-open .nav-download {
  visibility: hidden;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-icon {
  display: block;
  transition: transform 0.4s var(--ease);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(-18deg);
}

.theme-icon--sun,
:root[data-theme="dark"] .theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--moon { display: none; }
  :root:not([data-theme="light"]) .theme-icon--sun { display: block; }
}

.theme-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 22px;
}

.theme-switch-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-switch-track {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.theme-switch button {
  min-height: 30px;
  padding: 0 13px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-switch button:hover {
  color: var(--text);
}

.theme-switch button[aria-pressed="true"] {
  background: var(--contrast);
  color: var(--on-contrast);
}

html:not(.js) .theme-toggle,
html:not(.js) .theme-switch {
  display: none;
}

html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: ease;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store {
  display: inline-flex;
  border-radius: 9px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.store:hover {
  transform: translateY(-2px);
}

.store:active {
  transform: translateY(0);
  opacity: 0.85;
}

.store-badge {
  display: block;
  width: auto;
  height: 48px;
}

.stores--footer {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 20px;
}

.stores--footer .store-badge {
  height: 40px;
}

.faq {
  width: min(720px, calc(100% - 40px));
  margin: 2.75rem auto 0;
  text-align: left;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.faq-item p {
  margin: 0 0 1.15rem;
  max-width: 62ch;
  color: var(--muted);
}

.faq-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex: none;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.45s var(--ease);
}

.faq-icon::before {
  width: 18px;
  height: 1.5px;
  left: 0;
  top: 8px;
}

.faq-icon::after {
  width: 1.5px;
  height: 18px;
  left: 8px;
  top: 0;
}

.faq-item[open] .faq-icon::after {
  transform: rotate(90deg);
}

@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq-item::details-content {
      height: 0;
      overflow: clip;
      transition: height 0.5s var(--ease), content-visibility 0.5s allow-discrete;
    }

    .faq-item[open]::details-content {
      height: auto;
    }
  }
}

/* Language menu: a plain <details> list of links, so it works without script. */
.lang-menu {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 8px;
  border-radius: 99px;
  color: inherit;
  opacity: 0.8;
  cursor: pointer;
  list-style: none;
  transition: opacity 0.2s ease;
}

.lang-toggle::-webkit-details-marker {
  display: none;
}

.lang-toggle:hover,
.lang-menu[open] .lang-toggle {
  opacity: 1;
}

.lang-icon {
  display: block;
  flex: none;
}

.lang-code {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lang-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface, var(--paper));
  color: var(--text);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.08);
  list-style: none;
}

.lang-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-list a:hover {
  background: var(--line);
  color: var(--text);
}

.lang-list a[aria-current="true"] {
  background: var(--contrast);
  color: var(--on-contrast);
}

.footer-setting {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 14px;
}

.footer-setting .theme-switch-label,
.theme-switch .theme-switch-label {
  min-width: 7.5rem;
}

.lang-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lang-select::-webkit-details-marker {
  display: none;
}

.lang-select:hover,
.lang-menu[open] .lang-select {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
}

.lang-select .lang-icon {
  opacity: 0.7;
}

.lang-chevron {
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.lang-menu[open] .lang-chevron {
  transform: rotate(180deg);
}

.footer-setting {
  position: relative;
}

.lang-menu--footer {
  position: static;
}

.lang-menu--footer .lang-list {
  top: auto;
  bottom: calc(100% + 8px);
  inset-inline-start: 0;
  inset-inline-end: auto;
  width: min(340px, calc(100vw - 24px));
}

/* main.js picks the side with room and sets max-height; without it the defaults above apply. */
.lang-list.is-below {
  top: calc(100% + 6px);
  bottom: auto;
}

.lang-list.is-above {
  top: auto;
  bottom: calc(100% + 6px);
}

@media (max-width: 733px) {
  .nav-bar .lang-menu {
    position: static;
  }

  .nav-bar .lang-list {
    inset-inline-end: 0;
    width: min(340px, 100%);
  }
}

.notify {
  width: min(400px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.45);
}

.notify::backdrop {
  background: rgba(12, 13, 17, 0.55);
  backdrop-filter: blur(6px);
}

.notify[open] {
  animation: notify-in 0.35s var(--ease);
}

.notify-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 28px 28px;
  text-align: center;
}

.notify-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.notify-close:hover {
  color: var(--text);
}

.notify-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 22.5%;
}

.notify-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.notify-body {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.notify-cta {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

@keyframes notify-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .notify[open] {
    animation: none;
  }
}
