/**
 * Storefront styles. One file, no build step.
 *
 *   1. Tokens                  6. Lists and cards
 *   2. Base elements           7. Product page
 *   3. Layout helpers          8. Documents, forms, errors
 *   4. Header and footer       9. Picture viewer
 *   5. Shared components      10. Small screens, motion, print
 *
 * Conventions
 *   - Logical properties only (margin-inline, inset-inline-start...), so right-to-left
 *     languages need no overrides.
 *   - Colours only through the tokens below, so dark mode is one block.
 *   - Flat class names that say what a thing is (".card", ".download"), not how it looks.
 *   - A product page sets --accent (and --on-accent) on <body>; nothing else is per product.
 */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
    color-scheme: light dark;

    --bg: #ffffff;
    --surface: #f5f6f8;
    --surface-strong: #e9ecf0;
    --text: #14161a;
    --muted: #5d6470;
    --line: #e2e5ea;
    --link: #1f55d6;
    --accent: #1f55d6;
    --on-accent: #ffffff;
    --good: #14804a;
    --warn: #9a5b00;
    --bad: #c2362b;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);

    --radius: 16px;
    --radius-small: 10px;
    --header-height: 56px;
    --wrap: 1120px;
    --gutter: clamp(16px, 4vw, 32px);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1114;
        --surface: #171a1f;
        --surface-strong: #22262d;
        --text: #eceef1;
        --muted: #a0a7b2;
        --line: #2a2f37;
        --link: #8fb0ff;
        --good: #4cc38a;
        --warn: #f2b84b;
        --bad: #ff8a80;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

/* Each script gets the system typeface made for it; a page can mix languages. */
:lang(zh-Hant) { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(ja)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif; }
:lang(ko)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(ar),
:lang(ur)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Geeza Pro", "Noto Naskh Arabic", Tahoma, sans-serif; }
:lang(he)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", Arial, sans-serif; }
:lang(th)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Thonburi, "Leelawadee UI", "Noto Sans Thai", sans-serif; }
:lang(hi),
:lang(bn)      { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Kohinoor Devanagari", "Kohinoor Bangla", "Nirmala UI", "Noto Sans", sans-serif; }

/* --------------------------------------------------------- 2. Base elements */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 60px);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

[lang] {
    font-family: var(--font);
}

main {
    flex: 1;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, pre {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -.01em;
    text-wrap: balance;
}

/* A heading or a paragraph that stands in a grid or a flex box gives way to its column.
   Left to itself such a box is at least as wide as its longest word, and a long word in a
   large type ("конфиденциальности", "Datenschutzerklärung") made the column wider than a
   narrow screen: now the word is broken where the column ends (overflow-wrap, above). */
:where(h1, h2, h3, p) {
    min-width: 0;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem); font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 600; }

/* Tight tracking suits Latin headings only. */
:lang(zh) :is(h1, h2, h3),
:lang(ja) :is(h1, h2, h3),
:lang(ko) :is(h1, h2, h3),
:is(h1, h2, h3):lang(zh),
:is(h1, h2, h3):lang(ja),
:is(h1, h2, h3):lang(ko) {
    letter-spacing: 0;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

img, video {
    height: auto;
}

code {
    font-family: var(--mono);
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    border-radius: 4px;
}

/* A browser paints the hint inside a field in a grey of its own, which is too faint to read
   on the dark page. It gets the colour of secondary text, which is chosen for both. Some
   browsers thin the hint as well, hence the opacity. */
::placeholder {
    color: var(--muted);
    opacity: 1;
}

[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* -------------------------------------------------------- 3. Layout helpers */

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin-inline: auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.wrap-narrow {
    max-width: calc(760px + 2 * var(--gutter));
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: -64px;
    z-index: 30;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
}

.skip-link:focus {
    top: 12px;
}

/* ----------------------------------------------------- 4. Header and footer */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

@supports (backdrop-filter: blur(1px)) and (background: color-mix(in srgb, red 50%, blue)) {
    .site-header,
    .section-nav {
        background: color-mix(in srgb, var(--bg) 82%, transparent);
        backdrop-filter: saturate(180%) blur(14px);
    }
}

.site-header-row {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    height: var(--header-height);
}

/* The name of the store stands beside the mark while the row has room for it and for the
   whole menu. Where it has not (a narrow phone in a language of long words, or a store whose
   owner gave it a long name), the name is what gives way, and gives way whole: it moves to a
   second line of the link, which is as tall as one line and shows nothing of the second. The
   mark alone then stands for the store; half a name or half an entry of the menu would look
   broken. The shrink factor makes the link give up its room long before the menu does. The
   height is that of the mark or of a line of the name, whichever is taller, so a reader who
   set larger letters gets a taller link and not a clipped one. */
.brand {
    display: inline-flex;
    flex: 0 1000 auto;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: 10px;
    min-width: 28px;
    height: 28px;
    height: max(28px, 1.6em);
    overflow: hidden;
    color: var(--text);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: -.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    flex: none;
    width: 28px;
    height: 28px;
}

.brand-name {
    white-space: nowrap;
}

/* The menu is as wide as its entries and takes what the row has left. When even the mark
   alone leaves it too little, its links scroll sideways rather than widen the page. The
   padding, taken back by the margin, leaves room for focus rings, which a scrolling box
   would cut off. */
.site-nav {
    display: flex;
    flex: 1 1 auto;
    gap: 2px;
    min-width: 0;
    margin: -5px;
    margin-inline-start: 3px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a,
.section-nav a {
    display: block;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .9375rem;
    font-weight: 500;
    white-space: nowrap;
}

.site-nav a:hover,
.section-nav a:hover,
.site-nav a[aria-current],
.section-nav a[aria-current] {
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.language-menu {
    position: relative;
}

.language-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding-inline: 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .875rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-menu summary:hover,
.language-menu[open] summary {
    background: var(--surface);
    color: var(--text);
}

.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.language-list {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 2px;
    width: min(430px, calc(100vw - 2 * var(--gutter)));
    max-height: min(70vh, 480px);
    padding: 8px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
}

.language-list a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: .875rem;
}

.language-list a:hover {
    background: var(--surface);
    text-decoration: none;
}

.language-list a[aria-current] {
    background: var(--surface);
    font-weight: 600;
}

.site-footer {
    margin-top: clamp(40px, 8vw, 96px);
    padding-block: 40px 28px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: .875rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(0, 2.4fr);
    gap: 32px;
}

.footer-column h2 {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.footer-column ul {
    display: grid;
    gap: 6px;
}

.footer-products ul {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    column-gap: 16px;
}

.footer-column a {
    color: var(--text);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 24px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.footer-legal a {
    color: inherit;
}

.dev-bar {
    position: fixed;
    inset-inline-start: 12px;
    bottom: 12px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #14161a;
    color: #ffffff;
    font: 12px/1.4 var(--mono);
    opacity: .85;
}

.dev-bar a {
    color: #9ec1ff;
}

.dev-bar a[aria-current] {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

/* Keeps the bar off the last lines of the footer. */
body:has(.dev-bar) .site-footer {
    padding-bottom: 64px;
}

/* ----------------------------------------------------- 5. Shared components */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, filter .15s, transform .15s;
}

.button:hover {
    border-color: var(--muted);
    text-decoration: none;
}

.button:active {
    transform: scale(.98);
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.button-primary:hover {
    border-color: var(--accent);
    filter: brightness(1.08);
}

.button-disabled,
.button-disabled:hover,
.button-disabled:active {
    border-color: var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: default;
    transform: none;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.5;
    white-space: nowrap;
}

.chip {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: .875rem;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--muted);
    text-decoration: none;
}

.chip[aria-current] {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}

.eyebrow {
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.lead {
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1rem, .95rem + .4vw, 1.1875rem);
}

.notice {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--surface);
    font-size: .9375rem;
}

.notice-good {
    border-color: var(--good);
    color: var(--good);
}

.notice-warning {
    border-color: var(--warn);
    color: var(--warn);
}

.notice-bad {
    border-color: var(--bad);
    color: var(--bad);
}

/* Text written by people: paragraphs and lists made by Core\Text. */
.prose > * + * {
    margin-top: .75em;
}

.prose ul {
    display: grid;
    gap: .35em;
    padding-inline-start: 1.25em;
    list-style: disc;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.prose-small {
    color: var(--muted);
    font-size: .875rem;
}

/* ------------------------------------------------------- 6. Lists and cards */

.page-intro {
    padding-block: clamp(32px, 7vw, 80px) clamp(16px, 3vw, 28px);
}

.page-intro h1 {
    max-width: 22ch;
}

.page-intro .lead {
    margin-top: 12px;
}

.search {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin-top: 24px;
}

/* The hint is a sentence, and on a narrow phone longer than the field in most languages:
   it ends in an ellipsis there, not in the middle of a letter. */
.search input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    text-overflow: ellipsis;
}

.listing {
    padding-top: 16px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.listing-note,
.listing-empty {
    margin-bottom: 16px;
    color: var(--muted);
}

.group-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin-block: 36px 16px;
}

.group-heading h2 a {
    color: inherit;
}

.group-heading p {
    color: var(--muted);
    font-size: .9375rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

.card {
    display: flex;
    gap: 16px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.card:hover {
    border-color: var(--muted);
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(-2px);
}

/* App icons share one shape everywhere: a rounded square with a hairline edge. */
.card-icon,
.featured-icon,
.product-icon,
.back-link img {
    flex: none;
    border-radius: 22.5%;
    background: var(--surface);
    outline: 1px solid rgba(128, 128, 128, .2);
    outline-offset: -1px;
}

.card-icon {
    width: 72px;
    height: 72px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.card-name {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-tagline {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.card-meta {
    color: var(--muted);
    font-size: .8125rem;
}

.card .badges {
    margin-top: auto;
    padding-top: 6px;
}

.featured {
    padding-block: 8px 16px;
}

.featured-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 24px;
    padding: clamp(20px, 4vw, 40px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 70%);
    color: var(--text);
}

.featured-card:hover {
    text-decoration: none;
}

.featured-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.featured-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.featured-icon {
    width: 64px;
    height: 64px;
}

.featured-name {
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.015em;
}

.featured-tagline {
    font-size: 1.0625rem;
    font-weight: 500;
}

.featured-summary {
    display: -webkit-box;
    max-width: 52ch;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.featured-text .button {
    margin-top: 6px;
}

.featured-pictures {
    display: flex;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.featured-pictures img {
    width: auto;
    height: clamp(220px, 30vw, 380px);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.featured-pictures-wide img {
    width: 100%;
    height: auto;
}

/* ---------------------------------------------------------- 7. Product page */

.product-header {
    padding-block: clamp(24px, 5vw, 48px) clamp(20px, 4vw, 32px);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg));
}

.product-header .notice {
    margin-bottom: 20px;
}

.product-header-row {
    display: flex;
    align-items: flex-start;
    gap: clamp(16px, 3vw, 28px);
}

.product-icon {
    width: clamp(88px, 14vw, 128px);
    height: auto;
    aspect-ratio: 1;
    box-shadow: var(--shadow);
}

.product-heading {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.product-tagline {
    max-width: 48ch;
    color: var(--muted);
    font-size: clamp(1.0625rem, 1rem + .5vw, 1.3125rem);
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 8px;
}

.product-price {
    color: var(--muted);
    font-size: .875rem;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.facts li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    font-size: .875rem;
}

.section-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 10;
    border-block: 1px solid var(--line);
    background: var(--bg);
}

.section-nav ul {
    display: flex;
    gap: 2px;
    margin-inline: -12px;
    padding-block: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.section-nav ul::-webkit-scrollbar {
    display: none;
}

.section-nav a {
    font-size: .875rem;
}

.section {
    padding-block: clamp(28px, 5vw, 56px);
    border-bottom: 1px solid var(--line);
}

.section:last-of-type {
    border-bottom: 0;
}

.section-preview {
    padding-block: clamp(20px, 3vw, 32px);
}

.section-heading {
    display: grid;
    gap: 6px;
    max-width: 68ch;
    margin-bottom: clamp(16px, 3vw, 28px);
}

.section-heading p {
    color: var(--muted);
}

.section-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.section-columns > .prose {
    max-width: 72ch;
}

@media (min-width: 880px) {
    .section-columns {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 40px;
    }
}

.section-note {
    max-width: 68ch;
    margin-top: 16px;
    color: var(--muted);
    font-size: .875rem;
}

/* Preview: one strip of videos and screenshots per device, switched without scripts by
   the radio buttons that precede the strips. */
.gallery {
    --shot-height: clamp(340px, 62vh, 560px);
}

.gallery-switch {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* The names of the devices are as long as their language makes them ("Компьютер",
   "スマートフォン"). A name is never broken, and the row never grows wider than the page: on
   a narrow screen the tabs stand closer (see the small screens below), and a tab that still
   has no room moves to a second row as a whole. The corners are half the height of one row,
   so one row is a capsule and two rows are a rounded box. */
.gallery-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 3px;
    border-radius: 20px;
    background: var(--surface);
}

.gallery-tabs label {
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

#gallery-switch-phone:checked ~ .gallery-tabs label[for="gallery-switch-phone"],
#gallery-switch-tablet:checked ~ .gallery-tabs label[for="gallery-switch-tablet"],
#gallery-switch-desktop:checked ~ .gallery-tabs label[for="gallery-switch-desktop"] {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}

#gallery-switch-phone:focus-visible ~ .gallery-tabs label[for="gallery-switch-phone"],
#gallery-switch-tablet:focus-visible ~ .gallery-tabs label[for="gallery-switch-tablet"],
#gallery-switch-desktop:focus-visible ~ .gallery-tabs label[for="gallery-switch-desktop"] {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.gallery-strip {
    display: none;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x proximity;
}

.gallery-single .gallery-strip,
#gallery-switch-phone:checked ~ .gallery-group-phone,
#gallery-switch-tablet:checked ~ .gallery-group-tablet,
#gallery-switch-desktop:checked ~ .gallery-group-desktop {
    display: flex;
}

.gallery-item {
    display: grid;
    flex: none;
    align-content: start;
    gap: 8px;
    scroll-snap-align: start;
}

.gallery-item img,
.gallery-item video {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.gallery-item-portrait img,
.gallery-item-portrait video {
    width: auto;
    max-width: none;
    height: var(--shot-height);
}

.gallery-item-landscape img,
.gallery-item-landscape video {
    width: min(84vw, 680px);
    height: auto;
}

/* A caption never makes its picture's column wider. */
.gallery-caption {
    width: 0;
    min-width: 100%;
    color: var(--muted);
    font-size: .8125rem;
}

/* Cards of highlights and steps. The page sets --columns to the number of columns that spreads
   the cards over rows of even length (Web\ProductPresenter::balancedColumns). A narrower screen
   gets fewer columns, never narrower than --card. The half pixel keeps rounding from dropping
   a column. */
.feature-grid,
.steps {
    --card: 260px;
    --columns: 3;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--card), (100% - (var(--columns) - 1) * 16px) / var(--columns) - .5px)), 1fr));
    gap: 16px;
}

.feature {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
}

.feature-text {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.feature .prose,
.showcase-item .prose,
.step .prose {
    color: var(--muted);
    font-size: .9375rem;
}

/* The picture of a highlight opens in the viewer. */
.feature-picture {
    display: block;
    border-radius: var(--radius-small);
    cursor: zoom-in;
}

.feature-picture img {
    width: 100%;
    border-radius: var(--radius-small);
}

/* Upright pictures (phone screenshots) stand beside their text instead of pushing it a
   screen further down. */
.feature-grid-side {
    --card: 400px;
}

.feature-grid-side .feature-pictured {
    grid-template-columns: clamp(96px, 30%, 148px) minmax(0, 1fr);
    align-items: start;
    column-gap: 18px;
}

.steps {
    --card: 220px;
    counter-reset: step;
}

.step {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    counter-increment: step;
}

.step::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: .875rem;
    font-weight: 700;
}

.showcase + .showcase {
    margin-top: clamp(28px, 5vw, 48px);
}

/* Card groups come in three layouts, chosen by their pictures (Web\ProductPresenter::showcases):
   text only ("plain"), small pictures beside the text ("icons"), larger pictures above it
   ("cards"). On narrow screens "cards" turn into a shelf, see the end of this file. */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px 24px;
}

.showcase-item {
    display: grid;
    align-content: start;
    gap: 10px;
}

.showcase-text {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.showcase-image {
    border-radius: 12px;
    background: var(--surface);
}

.showcase-cards {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 20px 16px;
}

.showcase-cards .showcase-image {
    width: 100%;
}

.showcase-icons .showcase-item {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
}

.showcase-icons .showcase-image {
    width: 72px;
}

.showcase-icons .showcase-text {
    grid-column: 2;
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
    margin-top: 20px;
}

.plan {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.plan-note {
    color: var(--muted);
    font-size: .875rem;
}

.plan-features {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    font-size: .9375rem;
}

.plan-features li {
    position: relative;
    padding-inline-start: 24px;
}

.plan-features li::before {
    content: "";
    position: absolute;
    inset-inline-start: 3px;
    top: .45em;
    width: 11px;
    height: 6px;
    border-bottom: 2px solid var(--good);
    border-left: 2px solid var(--good);
    transform: rotate(-45deg);
}

.plans + .prose,
.prose + .plans {
    margin-top: 20px;
}

.download-list {
    display: grid;
    gap: 12px;
}

.download {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    scroll-margin-top: calc(var(--header-height) + 64px);
}

.download:target {
    border-color: var(--accent);
}

.download-main {
    display: grid;
    gap: 2px;
}

.download-platforms,
.download-details {
    color: var(--muted);
    font-size: .875rem;
}

.download-extra {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.download-code img {
    width: 160px;
    height: auto;
    border-radius: 8px;
    background: #ffffff;
}

.download-code figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: .875rem;
}

.checksum summary {
    color: var(--muted);
    font-size: .8125rem;
    cursor: pointer;
}

.checksum code {
    display: block;
    margin-top: 6px;
    font-size: .8125rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    user-select: all;
}

.release-notes,
.releases {
    display: grid;
    gap: 20px;
}

.releases-older summary {
    width: fit-content;
    padding-block: 4px;
    color: var(--link);
    font-size: .9375rem;
    font-weight: 500;
    cursor: pointer;
}

.releases-older[open] summary {
    margin-bottom: 20px;
}

.release-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 4px;
}

.release-heading time {
    color: var(--muted);
    font-size: .875rem;
}

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

.question {
    border-bottom: 1px solid var(--line);
}

.question summary {
    position: relative;
    padding-block: 14px;
    padding-inline-end: 36px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.question summary::-webkit-details-marker,
.fold summary::-webkit-details-marker {
    display: none;
}

.question summary::after,
.fold summary::after {
    content: "";
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .2s;
}

.question[open] summary::after,
.fold[open] summary::after {
    margin-top: -2px;
    transform: rotate(-135deg);
}

.question .prose {
    max-width: 72ch;
    padding-bottom: 16px;
    color: var(--muted);
}

.information {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 16px 24px;
}

.information dt {
    color: var(--muted);
    font-size: .8125rem;
}

.information dd {
    font-size: .9375rem;
    overflow-wrap: anywhere;
}

/* One name of a list (a platform, a language): the list wraps between names, never inside one. */
.information bdi {
    white-space: nowrap;
}

.information-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 24px;
    font-size: .9375rem;
}

/* ------------------------------------------- 8. Documents, forms and errors */

.document {
    padding-block: clamp(24px, 5vw, 56px) 0;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .9375rem;
}

.back-link img {
    width: 28px;
    height: 28px;
}

.document .notice {
    margin-block: 16px 20px;
}

.document .notice:first-child {
    margin-top: 0;
}

.document-heading {
    display: grid;
    gap: 8px;
    margin-block: 16px 24px;
}

/* The title of a policy is where the longest words of the store stand in its largest type
   ("Nutzungsbedingungen", "конфиденциальности"). On a phone it is set a little smaller than
   other titles, so that such a word stays whole on the narrowest screen; from a tablet on it
   is the size of every other title. */
.document-heading h1 {
    font-size: clamp(1.5rem, .9rem + 3vw, 2.75rem);
}

.document-updated {
    color: var(--muted);
    font-size: .875rem;
}

.document-section {
    margin-top: 28px;
}

.document-section h2 {
    margin-bottom: 8px;
    font-size: 1.1875rem;
}

.document-section .button {
    margin-top: 16px;
}

/* A part of a page that runs long is folded under its title, which opens it and carries
   the mark of a question for it (the credits of a product made from many photographs). */
.fold summary {
    position: relative;
    padding-inline-end: 36px;
    list-style: none;
    cursor: pointer;
}

.fold summary h2 {
    margin-bottom: 0;
}

.fold[open] summary {
    margin-bottom: 8px;
}

.document .information-links {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.document .information-links:empty {
    display: none;
}

.form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-size: .875rem;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.field [aria-invalid="true"] {
    border-color: var(--bad);
}

/* The trap field of the contact form: present for scripts, absent for people. */
.form-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.form-note {
    color: var(--muted);
    font-size: .875rem;
}

.error-page {
    padding-block: clamp(48px, 10vw, 120px) 0;
    text-align: center;
}

.error-page .wrap {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.error-status {
    color: var(--surface-strong);
    font-size: clamp(3.5rem, 12vw, 6.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}

.error-detail {
    justify-self: stretch;
    padding: 16px;
    overflow: auto;
    border-radius: var(--radius-small);
    background: var(--surface);
    font: .8125rem/1.5 var(--mono);
    text-align: start;
    white-space: pre-wrap;
}

/* -------------------------------------------------------- 9. Picture viewer */

.viewer {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 9, 11, .96);
    color: #ffffff;
}

.viewer::backdrop {
    background: rgba(8, 9, 11, .6);
}

.viewer-stage {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 60px 12px 48px;
}

.viewer-stage img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.viewer-button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
    cursor: pointer;
}

.viewer-button:hover {
    background: rgba(255, 255, 255, .26);
}

.viewer-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.viewer-close {
    inset-inline-end: 8px;
    top: 8px;
}

.viewer-previous {
    inset-inline-start: 8px;
    top: calc(50% - 22px);
}

.viewer-next {
    inset-inline-end: 8px;
    top: calc(50% - 22px);
}

[dir="rtl"] .viewer-previous svg,
[dir="rtl"] .viewer-next svg {
    transform: scaleX(-1);
}

.viewer-counter {
    position: absolute;
    inset-inline: 0;
    bottom: 14px;
    color: rgba(255, 255, 255, .8);
    font-size: .875rem;
    text-align: center;
}

/* ------------------------------------- 10. Small screens, motion and print */

@media (max-width: 640px) {
    .site-nav {
        margin-inline-start: -5px;
    }

    .site-nav a {
        padding-inline: 10px;
    }

    .site-nav .site-nav-extra,
    .language-current {
        display: none;
    }

    .featured-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .featured-pictures img {
        height: clamp(200px, 56vw, 320px);
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-actions .button {
        flex: 1 1 auto;
    }

    .download {
        grid-template-columns: minmax(0, 1fr);
    }

    .download-action .button {
        width: 100%;
    }

    /* A group of pictured cards becomes one row that scrolls sideways, like the screenshots
       at the top of the page: twenty cards stacked would make the page endless. The next
       card always shows a little, which says there is more. */
    .showcase-cards {
        display: flex;
        gap: 12px;
        margin-inline: calc(-1 * var(--gutter));
        padding: 4px var(--gutter) 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-padding-inline: var(--gutter);
        scroll-snap-type: x proximity;
    }

    .showcase-cards .showcase-item {
        flex: 0 0 min(64vw, 240px);
        scroll-snap-align: start;
    }

    .dev-bar {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    /* On a phone the text of a highlight flows around its upright picture and on below it;
       a column beside the picture would be only a few words wide. */
    .feature-grid-side .feature-pictured,
    .feature-grid-side .feature-pictured .feature-text {
        display: block;
    }

    /* A block with align-content keeps to itself and would stay beside the picture. */
    .feature-grid-side .feature-pictured .feature-text {
        align-content: normal;
    }

    .feature-grid-side .feature-pictured::after {
        content: "";
        display: block;
        clear: both;
    }

    .feature-grid-side .feature-picture {
        float: left;
        float: inline-start;
        width: 30%;
        max-width: 108px;
        margin-block: 4px 8px;
        margin-inline-end: 16px;
    }

    .feature-grid-side .feature-text > * + * {
        margin-top: 8px;
    }

    /* Three devices side by side on the narrowest phone, in the languages with the longest names for them. */
    .gallery-tabs label {
        padding-inline: 10px;
        font-size: .8125rem;
    }

    /* The header of a phone stands closer. On the narrowest one the name of the store and
       the language button leave about 150 pixels to the menu, and "Apps" and "Games" need
       more than that in most languages: every pixel between them is one of the menu's. Where
       the two words are longer still, the name of the store makes room for them (see .brand). */
    .site-header-row {
        column-gap: 10px;
    }

    .brand {
        gap: 8px;
    }

    .site-nav a {
        padding-inline: 8px;
        font-size: .875rem;
    }
}

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

@media print {
    .site-header,
    .section-nav,
    .site-footer,
    .dev-bar,
    .skip-link,
    .product-actions {
        display: none !important;
    }

    .gallery-strip {
        flex-wrap: wrap;
        overflow: visible;
    }
}
