body:not([data-lang="zh-Hant"]) .zh-Hant,
body:not([data-lang="ja"]) .ja,
body:not([data-lang="ko"]) .ko,
body:is([data-lang="zh-Hant"], [data-lang="ja"], [data-lang="ko"]) :is(.zh, .en) {
  display: none;
}

select.language {
  width: auto;
  min-height: 44px;
  padding: 0 8px;
  font: 700 13px/1.35 "LivePocket Sans", sans-serif;
  cursor: pointer;
}

select.language option { color: #22201f; }
select.language:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

header:has(.mobile-navigation) .links { gap: clamp(8px, 1vw, 18px); }
header:has(.mobile-navigation) .links > a { white-space: nowrap; }
.mobile-navigation {
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
}

.device-feature { padding-block: clamp(52px, 7vw, 102px); }
.device-feature#iphone-duo {
  background: #efe8f6;
  border-block-start: 0;
  border-block-end-color: #ded1e6;
}

.device-feature .device-layout {
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.65fr);
  gap: clamp(24px, 4vw, 64px);
}

.device-feature .device-copy h2 { margin: 0 0 12px; }
.device-feature .device-headline {
  margin: 0 0 16px;
  font-size: clamp(20px, 2vw, 31px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.device-headline em { color: var(--red-dark); font-style: normal; }

.device-views {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2.5vw, 30px);
}

.device-views .device-shot { max-width: none; }
.device-views .device-shot .screen-button {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: clamp(11px, 1.5vw, 22px);
  background: var(--ink);
  box-shadow: 5px 7px 0 #22201f25;
}

.device-views .screen-button::after {
  content: "";
  position: absolute;
  inset: auto 6px 6px auto;
  width: 30px;
  height: 30px;
  border: 1px solid #fffaf599;
  border-radius: 50%;
  background:
    linear-gradient(#fffaf5, #fffaf5) center / 12px 2px no-repeat,
    linear-gradient(#fffaf5, #fffaf5) center / 2px 12px no-repeat,
    #22201fe8;
  pointer-events: none;
}

.device-views .device-shot img { filter: none; }
.device-views .device-shot figcaption { margin-top: 12px; font-size: 12px; line-height: 1.5; }

.device-views .screen-button:focus-visible {
  outline: 2px solid var(--red-dark);
  outline-offset: 4px;
}

dialog.gallery-wide { width: min(1000px, calc(100vw - 24px)); }

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .device-views.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .motion-ready .device-views.reveal .device-shot {
    opacity: .5;
    transform: translate(-10px, 17px) rotate(-1.5deg) scale(.97);
    transform-origin: center bottom;
  }

  .motion-ready .device-views.reveal .device-shot + .device-shot {
    transform: translate(10px, 22px) rotate(2deg) scale(.96);
  }

  .motion-ready .device-views.is-visible .device-shot,
  .motion-ready .device-views.is-visible .device-shot + .device-shot {
    opacity: 1;
    transform: none;
    transition: opacity 420ms ease-out, transform 550ms var(--ui-ease);
  }

  .motion-ready .device-views.is-visible .device-shot + .device-shot {
    transition-delay: 65ms;
  }

  .motion-ready .device-views.reveal:focus-within .device-shot {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .device-views .screen-button,
  .device-views .screen-button::after {
    transition: transform var(--ui-fast) var(--ui-ease);
  }

  .device-views .screen-button:active { transform: scale(.98); }

  dialog:has(.gallery-controls) {
    opacity: 0;
    transform: translateY(7px) scale(.975);
    transition: opacity 140ms ease-in, transform 140ms var(--ui-ease),
      display 140ms allow-discrete, overlay 140ms allow-discrete;
  }

  dialog:has(.gallery-controls)[open] {
    opacity: 1;
    transform: none;
    transition-duration: 230ms;
    transition-timing-function: var(--ui-ease);
  }

  dialog:has(.gallery-controls)::backdrop {
    opacity: 0;
    transition: opacity 140ms ease-in, display 140ms allow-discrete, overlay 140ms allow-discrete;
  }

  dialog:has(.gallery-controls)[open]::backdrop {
    opacity: 1;
    transition-duration: 210ms;
    transition-timing-function: ease-out;
  }

  @starting-style {
    dialog:has(.gallery-controls)[open] {
      opacity: 0;
      transform: translateY(7px) scale(.975);
    }
    dialog:has(.gallery-controls)[open]::backdrop { opacity: 0; }
  }
}

@media (hover: hover) and (pointer: fine) {
  .device-views .screen-button:hover::after,
  .device-views .screen-button:focus-visible::after { background-color: var(--red-dark); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .device-views .screen-button:hover:not(:active) { transform: translateY(-4px); }
  .device-views .screen-button:hover::after { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

#download h2 {
  font-size: clamp(44px, 7vw, 94px);
  margin: 0 0 20px;
  letter-spacing: -.015em;
}

#download p {
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: normal;
}

.store-regions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 840px;
  list-style: none;
  padding: 0;
  margin: 24px 0 20px;
}

.store-regions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 12px 16px;
  background: #fff8f0;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}

.store-regions a:hover { background: #fbe1e1; }
#download .store-availability { font-size: 13px; }

@media (max-width: 700px) {
  .device-feature .device-layout { grid-template-columns: 1fr; }
  .store-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
