/**
 * Fluent Player download navigator — styles.
 *
 * Concept: a deep-navy brand stage (the player's dark UI) holding the square
 * app icon inside two faint concentric squares; next to it (desktop) or below
 * it as a sheet (mobile), a light, tactile picker: "01 选择系统" as a segmented
 * control whose navy pill slides to the selection, and "02 选择下载渠道" as
 * four tiles.
 * Sizes are in rem so user font scaling flows naturally (page scrolls, never clips).
 */

/* ---------- Tokens ---------- */
:root {
  --night: #0d1a3a;        /* brand stage: deepened logo navy */
  --night-hi: #1d3672;     /* soft highlight in the stage gradient */
  --ink: #122654;          /* wordmark navy (sampled from the logo) */
  --text: #25314e;
  --muted: #586379;        /* >= 5.5:1 on --paper */
  --faint: #7d879b;
  --paper: #f3f5f9;
  --surface: #ffffff;
  --track: #e6eaf2;
  --line: #dfe4ed;
  --line-strong: #c3cfe4;
  --blue: #447fe7;         /* arc blue (sampled from the logo) — lines/fills only */
  --blue-ink: #2a64d0;     /* darker blue for text/focus (>= 4.5:1 on white) */
  --blue-soft: #e6eefc;
  --github: #1f2328;       /* GitHub mark must stay black/grey per its guidelines */
  --warn-bg: #fdf1e2;
  --warn-ink: #8a4b0f;

  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-spring: cubic-bezier(0.3, 1.25, 0.4, 1);
  --t-fast: 160ms;
  --t-mid: 220ms;

  --pad-x: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

/* Large monitors: scale the rem-based composition up proportionally.
   Percentages keep respecting the user's own browser font size. */
@media (min-width: 80em) and (min-height: 50em) { html { font-size: 112.5%; } }
@media (min-width: 110em) and (min-height: 62em) { html { font-size: 118.75%; } }

body {
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* Body background matches the hero so iOS overscroll at the top stays navy. */
  background: linear-gradient(var(--night) 0 50%, var(--paper) 50% 100%);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fill { fill: currentColor; stroke: none; }
/* Hard-coded brand fills must not inherit the line-icon stroke. */
svg.icon [fill] { stroke: none; }

/* ---------- Shell (mobile first: stacked stage + sheet) ---------- */
.shell {
  min-height: 100vh;
  min-height: 100svh; /* excludes the mobile browser toolbar when shown */
  display: flex;
  flex-direction: column;
}

/* ---------- Brand stage ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(13rem, 40svh, 27rem);
  /* Extra bottom padding offsets the 1.5rem the sheet overlaps the stage, so
     the icon group looks optically centred in the visible navy area. */
  padding: max(2rem, env(safe-area-inset-top)) var(--pad-x) 3.5rem;
  color: #fff;
  background:
    radial-gradient(85% 75% at 12% 8%, var(--night-hi) 0%, rgba(29, 54, 114, 0) 62%),
    var(--night);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  position: relative;
  margin: 0;
  line-height: 0;
}

/* Two faint concentric squares around the icon — they repeat the icon's own
   square shape outward instead of adding a new motif. Percent insets are
   relative to the icon width on all sides, so the frames stay square. */
.hero__title::before,
.hero__title::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.hero__title::before { inset: -11%; border-radius: 25%; }
/* The outer frame fades out before its lower edge so it never crosses the tagline. */
.hero__title::after {
  inset: -24%;
  border-radius: 30%;
  border-color: rgba(255, 255, 255, 0.06);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 72%);
}

/* The square app icon: the original artwork, presented as an app tile. */
.brand__logo {
  display: block;
  width: clamp(6.5rem, min(40vw, 21svh), 9.25rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 18%;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 1.5rem 3rem -1.25rem rgba(2, 8, 26, 0.75);
  user-select: none;
  -webkit-user-drag: none;
}

.hero__lede {
  /* Clears the inner frame (11% of the icon width below the icon). */
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
}

/* Signature block: shrink-wraps the wordmark and the profile line so both share
   one width — the hairline and the spread-out names end exactly together. */
.hero__sign {
  display: grid;
  width: max-content;
  max-width: 100%;
}

/* Profile links. Text only: these services don't grant a logo licence. */
.social { margin: 0.75rem 0 0; }
.social[hidden] { display: none; }
/* Hairline under the wordmark, fading at both ends like the stage frames. */
.social::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.22) 18%,
    rgba(255, 255, 255, 0.22) 82%, rgba(255, 255, 255, 0));
}
/* Names spread edge to edge; the negative margin cancels the links' side
   padding so the first and last words line up with the hairline's ends. */
.social__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 0.625rem;
  margin: 0 -0.375rem;
}
.social__link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* >= 44px hit target; the text itself stays small */
  margin: 0;
  padding: 0 0.375rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.375rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--t-fast) ease, text-decoration-color var(--t-mid) var(--ease);
}
.social__link:hover { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.45); }
.social__link:active { color: #fff; }
.social__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
  color: #fff;
}

/* ---------- Sheet ---------- */
.sheet {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  margin-top: -1.5rem;
  padding: 1.5rem var(--pad-x) 1rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centre the picker in whatever height remains on tall phones/tablets. */
  justify-content: center;
}

.picker { width: 100%; max-width: 36rem; }

.step {
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.step__no {
  flex: none;
  min-width: 1.75rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.375rem;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- 01 · Platforms: segmented control with a sliding pill ---------- */
.platforms {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.25rem;
  min-height: 3.5rem;
  padding: 0.3125rem;
  border-radius: 1.125rem;
  background: var(--track);
  box-shadow: inset 0 1px 2px rgba(18, 38, 84, 0.06);
}

.platform {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 1 1 0;
  min-width: max-content; /* never squeeze a label: wrap instead */
  min-height: 2.75rem;    /* >= 44px touch target */
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.875rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--t-mid) ease, background-color var(--t-fast) ease;
}

.platform__name {
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
}

.platform[aria-selected="true"] { color: #fff; }
.platform[aria-selected="true"] .platform__name { font-weight: 600; }

@media (hover: hover) {
  .platform:not([aria-selected="true"]):hover { color: var(--ink); background: rgba(255, 255, 255, 0.65); }
}
.platform:not([aria-selected="true"]):active { background: rgba(255, 255, 255, 0.9); }

.platform:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 2px;
}

/* Navy pill measured onto the selected tab by app.js (--ind-*). */
.platforms__pill {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: var(--ind-w, 20%);
  height: var(--ind-h, 2.75rem);
  transform: translate(var(--ind-x, 0px), var(--ind-y, 0px));
  border-radius: 0.875rem;
  background: var(--ink);
  box-shadow: 0 0.5rem 1.125rem -0.625rem rgba(18, 38, 84, 0.75);
  pointer-events: none;
}

.platforms:not(.is-ready) .platforms__pill { opacity: 0; }
/* Slide only after the first placement, so page load never shows a glide. */
.platforms.is-ready .platforms__pill {
  transition:
    transform 360ms var(--ease-spring),
    width 360ms var(--ease),
    height 360ms var(--ease);
}

/* ---------- 02 · Channels ---------- */
.panel { margin-top: 1.375rem; outline: none; }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.panel__platform { color: var(--ink); font-weight: 600; letter-spacing: 0.01em; }
.panel__sep { width: 0.25rem; height: 0.25rem; border-radius: 50%; background: var(--line-strong); }
.panel__text { color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  height: 1.375rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* At most 2 columns (each track > 1/3 of the row); 1 column when an 8.5rem
   track no longer fits twice (very narrow screens or large text). */
.channels {
  --gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(8.5rem, calc((100% - var(--gap)) / 3 + 1px)), 1fr));
  gap: var(--gap);
}

.channel { position: relative; min-width: 0; }

.channel__btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 100%;
  min-height: 4.25rem;
  margin: 0;
  padding: 0.875rem 3rem 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color var(--t-fast) ease,
    box-shadow var(--t-mid) ease,
    background-color var(--t-fast) ease,
    transform var(--t-mid) var(--ease);
}

.channel__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.channel__name {
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.channel__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel__meta code {
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
}

/* Round "go" affordance on the right. */
.channel__go {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 1.875rem;
  height: 1.875rem;
  margin-top: -0.9375rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  transition: background-color var(--t-mid) ease, color var(--t-mid) ease;
  pointer-events: none;
}
.channel__go .icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
  transition: transform var(--t-mid) var(--ease);
}

@media (hover: hover) {
  .channel__btn:hover {
    border-color: var(--line-strong);
    box-shadow: 0 0.75rem 1.75rem -1.125rem rgba(18, 38, 84, 0.45);
    transform: translateY(-2px);
  }
  .channel__btn:hover .channel__go { background: var(--blue); color: #fff; }
  .channel__btn:hover .channel__go .icon { transform: translate(1px, -1px); }
}

.channel__btn:active {
  transform: translateY(0) scale(0.985);
  background: #fafbfd;
  box-shadow: none;
}

.channel__btn:focus-visible,
.channel__copy:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 2px;
}

.channel[data-state="placeholder"] .channel__meta { color: var(--faint); }

/* Platform not open: visibly inactive, still announced. */
.channel[data-state="locked"] .channel__btn {
  cursor: not-allowed;
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
}
.channel[data-state="locked"] .channel__name { color: var(--muted); }
.channel[data-state="locked"] .channel__meta { color: var(--faint); }
.channel[data-state="locked"] .channel__go { opacity: 0; }

/* Optional share-code copy control, a sibling of the link (no nested interactive elements). */
.channel.has-code .channel__go { display: none; }

.channel__copy {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.channel__copy .icon { width: 1.125rem; height: 1.125rem; }
@media (hover: hover) {
  .channel__copy:hover { color: var(--blue-ink); background: var(--blue-soft); }
}
.channel__copy:active { background: var(--track); }
.channel__copy.is-done { color: var(--blue-ink); }

/* One-line feedback area — height reserved, content replaced (never stacked). */
.panel__status {
  margin: 0.75rem 0 0;
  min-height: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text);
}
.panel__status .dot {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  margin-right: 0.5rem;
  vertical-align: 0.15em;
  border-radius: 50%;
  background: var(--blue);
}
.panel__status[data-tone="warn"] .dot { background: #d9822b; }

.noscript { margin: 1.5rem 0 0; text-align: center; color: var(--text); }

/* ---------- Footer (filing info, only when configured) ---------- */
.footer {
  padding: 0.25rem var(--pad-x) max(1rem, env(safe-area-inset-bottom));
  background: var(--paper);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer[hidden] { display: none; }
.footer a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
}
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer a:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- Breakpoints ---------- */

/* Short phones (incl. browser toolbars): tighten the vertical rhythm. */
@media (max-width: 63.99em) and (max-height: 41.5em) {
  /* Top padding must exceed the outer frame's overhang (24% of the icon). */
  .hero { min-height: 38svh; padding-top: max(2rem, env(safe-area-inset-top)); padding-bottom: 3rem; }
  .brand__logo { width: clamp(5.5rem, 18svh, 7.5rem); }
  .hero__lede { margin-top: 1.375rem; font-size: 0.875rem; }
  .social { margin-top: 0.5rem; }
  .sheet { padding-top: 1.125rem; }
  .step { margin-bottom: 0.5rem; }
  .platforms { min-height: 3.25rem; }
  .platform { min-height: 2.75rem; padding-top: 0.375rem; padding-bottom: 0.375rem; }
  .panel { margin-top: 1rem; }
  .channel__btn { min-height: 3.75rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .panel__status { margin-top: 0.5rem; }
}

/* Phones: two narrow tiles per row — a smaller arrow leaves room for the text. */
@media (max-width: 39.99em) {
  .channel__btn { padding-left: 0.875rem; padding-right: 2.25rem; gap: 0.625rem; }
  .channel__go { right: 0.5rem; width: 1.5rem; height: 1.5rem; margin-top: -0.75rem; }
  .channel__go .icon { width: 0.875rem; height: 0.875rem; }
  .channel__meta { font-size: 0.75rem; }
}

/* Five text labels stay on one row down to ~353px. Below 22em the next query tightens further. */
@media (max-width: 24.5em) {
  .platform { padding-left: 0.5rem; padding-right: 0.5rem; }
}

/* <= 352px: tighter tiles; the round arrow yields its space to the text. */
@media (max-width: 22em) {
  .channel__btn { padding-right: 0.625rem; gap: 0.5rem; }
  .channel.has-code .channel__btn { padding-right: 2.75rem; }
  .channel__go { display: none; }
  .platform { padding-left: 0.25rem; padding-right: 0.25rem; }
  .platform__name { font-size: 0.75rem; }
}

/* Tablets (stacked): larger icon and type. */
@media (min-width: 40em) and (max-width: 63.99em) {
  .brand__logo { width: clamp(8rem, 22svh, 11rem); }
  .hero__lede { font-size: 1rem; }
  .sheet { padding-top: 2rem; }
  .platform__name { font-size: 0.875rem; }
  .channel__btn { min-height: 4.75rem; }
}

/* Desktop: split stage | picker. */
@media (min-width: 64em) {
  body { background: var(--paper); }

  .shell {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: 1fr auto;
  }

  .hero {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 0;
    padding: 3rem 2.5rem;
  }
  .brand__logo { width: clamp(12rem, min(22vw, 42svh), 19rem); border-radius: 17%; }
  .hero__lede { margin-top: 2.75rem; font-size: 1rem; }
  .social { margin-top: 0.875rem; }
  .social__link { font-size: 0.875rem; }

  .sheet {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    border-radius: 0;
    padding: 2.5rem clamp(2rem, 5vw, 5rem);
    justify-content: center;
  }
  .picker { max-width: 40rem; }

  .step { font-size: 1rem; margin-bottom: 1rem; }
  .platforms { min-height: 4rem; padding: 0.375rem; border-radius: 1.375rem; }
  .platform { min-height: 3.25rem; border-radius: 1rem; }
  .platforms__pill { border-radius: 1rem; }
  .platform__name { font-size: 1.0625rem; }
  .panel { margin-top: 2.25rem; }
  .channels { --gap: 0.875rem; }
  .channel__btn { min-height: 4.75rem; padding-left: 1.125rem; border-radius: 1.25rem; }
  .channel__name { font-size: 1.0625rem; }
  .channel__go { right: 0.875rem; width: 2rem; height: 2rem; margin-top: -1rem; }

  /* Filing info sits quietly at the bottom of the brand stage. */
  .footer {
    grid-column: 1;
    grid-row: 2;
    z-index: 2;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 2.5rem 1.25rem;
  }
  .footer a:focus-visible { outline-color: #fff; }
}

/* ---------- QR window ----------
   A small copy of the stage: navy ground, a white square tile for the code,
   one faint frame around it. Inset with margin on every side, never a lightbox.
   Open/close motion lives on the card and the dim layer. */
.qr {
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  overflow: visible; /* let the card's shadow spill past the dialog box */
  background: transparent;
  color: #fff;
}
.qr::backdrop {
  background: rgba(5, 10, 26, 0.64);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 240ms var(--ease);
}
/* Width follows the shorter side: the card is ~5.6rem taller than wide, so the
   height cap keeps it inside short landscape screens too. */
.qr__card {
  width: min(21rem, calc(100vw - 2rem), calc(100svh - 7rem));
  max-height: calc(100svh - 1rem);
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 1.75rem;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--night-hi) 0%, rgba(29, 54, 114, 0) 62%),
    var(--night);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 2rem 4rem -1.25rem rgba(0, 0, 0, 0.6);
  opacity: 1;
  transform: none;
  transition: opacity 220ms var(--ease), transform 240ms var(--ease);
}
/* First frame of showModal(), so the window arrives instead of popping. */
@starting-style {
  .qr::backdrop { opacity: 0; }
  .qr__card { opacity: 0; transform: translateY(10px) scale(0.97); }
}
.qr.is-closing::backdrop { opacity: 0; }
.qr.is-closing .qr__card { opacity: 0; transform: translateY(6px) scale(0.98); }

.qr__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.qr__heading { min-width: 0; }
.qr__kicker {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}
.qr__title {
  margin: 0.125rem 0 0;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
/* Pulled into the corner so the round control sits on the card's own curve. */
.qr__close {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.375rem -0.5rem 0 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.qr__close .icon { width: 1.25rem; height: 1.25rem; stroke-width: 1.8; }
.qr__close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.qr__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* White tile = quiet zone. Its padding plus the picture's own white margin
   keeps every finder pattern clear of the rounded corners. */
.qr__plate {
  position: relative;
  padding: 0.875rem;
  border-radius: 1.125rem;
  background: #fff;
}
.qr__plate::before {
  content: "";
  position: absolute;
  inset: -0.4375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  pointer-events: none;
}
/* Square crop of the 686×1048 screenshot: the code spans y 248–920, so a
   686px window starting at y 241 (241 / 362 ≈ 66.6%) keeps all three finder
   patterns, the centre mark and the corner badge, and drops the avatar
   header and the gray caption. */
.qr__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 66.6%;
}
.qr__hint {
  margin: 0.875rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
}
@media (forced-colors: active) {
  .qr__card { border: 1px solid CanvasText; }
  .qr__plate { border: 1px solid CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
  .channel__btn:hover,
  .channel__btn:active { transform: none !important; }
}

@media (forced-colors: active) {
  .platforms__pill { background: Highlight; }
  .platform[aria-selected="true"] { color: HighlightText; }
}
