/* BYOME site — Paper (light) and Night Lamp (dark), matching the app's two themes.

   Each palette is defined exactly once below; the theme switch only remaps which
   palette the live tokens point at.

   Deliberately var() indirection rather than light-dark(). light-dark() works when
   written straight into a property, but wrapping it in a custom property did not
   resolve reliably here — tokens defined that way failed to flip when the toggle
   changed color-scheme at runtime. Remapping custom properties invalidates
   correctly and keeps one definition per palette. */

:root {
  color-scheme: light dark;

  --paper-bg: #f5f1ea;
  --paper-bg-deep: #ece5da;
  --paper-ink: #3e372f;
  --paper-ink-strong: #3e372f;
  --paper-muted: #6e655a;
  --paper-faint: #776d61;
  --paper-line: rgba(43, 39, 35, 0.14);
  --paper-warm: #a85a2f;
  --paper-warm-fill: #a85a2f;
  --paper-warm-soft: rgba(194, 112, 62, 0.10);
  --paper-on-warm: #fffaf0;
  --paper-card: rgba(255, 253, 248, 0.72);
  --paper-card-line: rgba(43, 39, 35, 0.1);
  --paper-shadow: 0 6px 18px rgba(65, 54, 43, 0.07);
  --paper-header-bg: rgba(245, 241, 234, 0.86);
  --paper-logo-image: url("/assets/logo-paper.png?v=20260809a");

  --night-bg: #0f141c;
  --night-bg-deep: #080b12;
  --night-ink: #f2f4f7;
  --night-ink-strong: #f2f4f7;
  --night-muted: #a3adba;
  --night-faint: #98a2af;
  --night-line: rgba(255, 249, 232, 0.14);
  --night-warm: #e5c078;
  --night-warm-fill: #e5c078;
  --night-warm-soft: rgba(229, 192, 120, 0.14);
  --night-on-warm: #14110c;
  --night-card: rgba(255, 249, 232, 0.045);
  --night-card-line: rgba(255, 249, 232, 0.1);
  --night-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  --night-header-bg: rgba(15, 20, 28, 0.84);
  --night-logo-image: url("/assets/logo-night.png?v=20260809a");

  /* Live tokens — Paper by default. */
  --bg: var(--paper-bg);
  --bg-deep: var(--paper-bg-deep);
  --ink: var(--paper-ink);
  --ink-strong: var(--paper-ink-strong);
  --muted: var(--paper-muted);
  --faint: var(--paper-faint);
  --line: var(--paper-line);
  --warm: var(--paper-warm);
  --warm-text: color-mix(in srgb, var(--warm) 75%, var(--ink));
  --warm-fill: var(--paper-warm-fill);
  --warm-soft: var(--paper-warm-soft);
  --on-warm: var(--paper-on-warm);
  --card: var(--paper-card);
  --card-line: var(--paper-card-line);
  --shadow: var(--paper-shadow);
  --header-bg: var(--paper-header-bg);
  --logo-image: var(--paper-logo-image);

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html:lang(zh-Hant) {
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans CJK TC", sans-serif;
}

/* System preference, unless the reader pinned Paper. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--night-bg);
    --bg-deep: var(--night-bg-deep);
    --ink: var(--night-ink);
    --ink-strong: var(--night-ink-strong);
    --muted: var(--night-muted);
    --faint: var(--night-faint);
    --line: var(--night-line);
    --warm: var(--night-warm);
    --warm-fill: var(--night-warm-fill);
    --warm-soft: var(--night-warm-soft);
    --on-warm: var(--night-on-warm);
    --card: var(--night-card);
    --card-line: var(--night-card-line);
    --shadow: var(--night-shadow);
    --header-bg: var(--night-header-bg);
    --logo-image: var(--night-logo-image);
  }
}

/* An explicit choice always wins. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--paper-bg);
  --bg-deep: var(--paper-bg-deep);
  --ink: var(--paper-ink);
  --ink-strong: var(--paper-ink-strong);
  --muted: var(--paper-muted);
  --faint: var(--paper-faint);
  --line: var(--paper-line);
  --warm: var(--paper-warm);
  --warm-fill: var(--paper-warm-fill);
  --warm-soft: var(--paper-warm-soft);
  --on-warm: var(--paper-on-warm);
  --card: var(--paper-card);
  --card-line: var(--paper-card-line);
  --shadow: var(--paper-shadow);
  --header-bg: var(--paper-header-bg);
  --logo-image: var(--paper-logo-image);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--night-bg);
  --bg-deep: var(--night-bg-deep);
  --ink: var(--night-ink);
  --ink-strong: var(--night-ink-strong);
  --muted: var(--night-muted);
  --faint: var(--night-faint);
  --line: var(--night-line);
  --warm: var(--night-warm);
  --warm-fill: var(--night-warm-fill);
  --warm-soft: var(--night-warm-soft);
  --on-warm: var(--night-on-warm);
  --card: var(--night-card);
  --card-line: var(--night-card-line);
  --shadow: var(--night-shadow);
  --header-bg: var(--night-header-bg);
  --logo-image: var(--night-logo-image);
}

* {
  box-sizing: border-box;
}

/* Shared web surfaces follow AppColorToken and WorldTypographyToken. */
html { min-width: 320px; background: var(--bg); scroll-padding-top: 104px; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
button, input { font: inherit; }
:is(a, button, input, summary):focus-visible { outline: 2px solid var(--warm); outline-offset: 5px; }
main:focus { outline: none; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 60; padding: 14px 20px; border-radius: 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--warm); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 20; height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: var(--header-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; background: var(--logo-image) center / contain no-repeat; }
.brand-names { line-height: 1; white-space: nowrap; }
.brand-product { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.desktop-nav { display: flex; align-items: center; gap: 28px; margin-right: 24px; font-size: 14px; color: var(--muted); }
.desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; }
a[aria-current="page"] { color: var(--ink-strong); }
.desktop-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--warm-text); text-underline-offset: 8px; }
.language-switch, .theme-toggle, .mobile-menu > summary { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 50%; cursor: pointer; }
.language-switch:hover, .theme-toggle:hover, .mobile-menu > summary:hover { color: var(--ink); background: var(--card); border-color: var(--line); }
.language-switch-icon svg, .theme-toggle-icon svg { display: block; width: 19px; height: 19px; }
:root[data-theme="light"] .theme-glyph-fill, :root[data-theme="dark"] .theme-glyph-rays { opacity: 0; }
:root[data-theme="dark"] .theme-glyph-fill { d: path("M12 5.6a6.4 6.4 0 1 0 0 12.8a5 5 0 0 1 0-12.8z"); }
.language-menu, .mobile-menu { position: relative; }
.language-menu > summary, .mobile-menu > summary { list-style: none; }
.language-menu > summary::-webkit-details-marker, .mobile-menu > summary::-webkit-details-marker { display: none; }
.language-options, .mobile-options { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; display: grid; min-width: 160px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); }
.language-options a, .mobile-options a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.language-options a[aria-current="page"], .mobile-options a[aria-current="page"] { background: var(--warm-soft); }
.language-options a:hover, .mobile-options a:hover { background: var(--card); }
.mobile-menu { display: none; }
.mobile-menu img { opacity: .8; }
:root[data-theme="dark"] .mobile-menu img { filter: invert(1); }
.header-cta, .hero-cta, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 18px; background: color-mix(in srgb, var(--warm) 7%, transparent); color: var(--warm-text); font-size: 16px; font-weight: 500; line-height: 1.5; text-align: center; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.header-cta { min-height: 44px; padding: 10px 18px; margin-left: 14px; font-size: 14px; background: transparent; }
.header-cta[aria-current="page"] { color: var(--warm-text); }
.secondary-button { background: var(--card); color: var(--ink); }
@media (hover: hover) {
  .header-cta:hover, .hero-cta:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--warm) 12%, transparent); box-shadow: 0 8px 28px color-mix(in srgb, var(--warm) 7%, transparent); }
  .secondary-button:hover { background: var(--warm-soft); transform: translateY(-2px); }
}
:is(.header-cta, .hero-cta, .secondary-button):active { transform: translateY(0) scale(.98); }
.back-link, .back-to-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--line); }
.back-link:hover, .back-to-top:hover { color: var(--ink); }
.inline-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; overflow-wrap: anywhere; }
.inline-link:hover { text-decoration-color: var(--warm-text); }
.section-eyebrow, .info-kicker { margin: 0 0 22px; font-size: 14px; line-height: 1.6; font-weight: 400; color: var(--muted); }
/* One viewport per chapter; text enlargement can grow content naturally. */
.page { min-height: 60svh; }
.home-document { --home-header-height: 80px; --panel-height: calc(100svh - var(--home-header-height)); scroll-padding-top: var(--home-header-height); scroll-snap-type: y mandatory; scroll-behavior: smooth; }
@supports (height: 100dvh) { .home-document { --panel-height: calc(100dvh - var(--home-header-height)); } }
.home-panel { min-block-size: var(--panel-height); scroll-snap-align: start; scroll-snap-stop: always; }
.panel-inner { width: min(1160px, calc(100% - 96px)); min-block-size: var(--panel-height); margin: 0 auto; padding-block: 40px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(32px,5vw,80px); }
.home-page h1 { font-size: clamp(48px,5.4vw,78px); font-weight: 500; line-height: 1.25; letter-spacing: -.035em; white-space: pre-line; margin: 0 0 26px; }
.home-page h1:lang(en) { font-size: clamp(40px,4.4vw,64px); line-height: 1.16; }
.hero-lede, .story-description { font-size: 18px; line-height: 1.9; color: var(--muted); white-space: pre-line; margin: 0; text-wrap: pretty; }
.hero-lede { margin-bottom: 30px; }
.action-icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: url("/assets/arrow-up-right.svg?v=20260927h") center / contain no-repeat; }
.icon-down { mask-image: url("/assets/arrow-down.svg?v=20260927h"); }
.icon-play { width: 20px; height: 20px; mask-image: url("/assets/play.svg?v=20260927h"); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.explore-link, .listen-link { display: inline-flex; gap: 16px; align-items: center; min-height: 48px; color: var(--muted); font-size: 15px; }
.explore-link:hover { color: var(--ink); }
.listen-link { color: var(--warm-text); margin-top: 16px; }
.listen-link span, .explore-link span, .hero-cta span { transition: transform 180ms ease; }
:is(.listen-link, .explore-link, .hero-cta):hover span { transform: translate(2px,-2px); }
.home-page figure { margin: 0; min-width: 0; }
.home-page figcaption { font-size: 12px; line-height: 1.7; color: var(--muted); }
.landing-hero { position: relative; isolation: isolate; }
.home-panel:not(.world-section) .panel-inner { width: min(960px, calc(100% - 96px)); gap: clamp(32px, 4vw, 64px); }
.hero-copy { position: relative; z-index: 1; }
.hero-scene { position: absolute; z-index: -1; inset: 0 0 0 25%; overflow: hidden; pointer-events: none; }
.hero-scene img { display: block; width: auto; max-width: none; height: 122%; margin-left: auto; margin-right: max(32px, calc((100vw - 1120px) / 2)); transform: translateY(-3%); mask-image: linear-gradient(to right, transparent, #000 20%, #000 94%, transparent); }
.landing-hero::after { content: ""; position: absolute; z-index: -2; inset: 15% 0 0 15%; background: radial-gradient(ellipse at 70% 50%, color-mix(in srgb, var(--warm-text) 6%, transparent), transparent 65%); pointer-events: none; }
.story-copy h2 { font-size: clamp(30px,3.3vw,46px); text-wrap: balance; line-height: 1.4; font-weight: 500; letter-spacing: -.025em; white-space: pre-line; margin: 0 0 24px; }
/* The three formats are visible together, with distinct compositions. */
.world-section .panel-inner { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 32px; }
.experience-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 24px; }
.experience-intro .section-eyebrow { grid-column: 1 / -1; }
.experience-intro h2 { margin: 0; }
.experience-intro .story-description { font-size: 15px; padding-bottom: 6px; }
.experience-gallery { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
.experience-piece { position: relative; isolation: isolate; overflow: hidden; --piece-height: clamp(270px, calc(var(--panel-height) - 240px), 490px); min-height: var(--piece-height); border-radius: 20px; background: color-mix(in srgb, var(--ink) 3%, var(--bg)); box-shadow: 0 16px 50px color-mix(in srgb, var(--ink) 4%, transparent); }
.home-page .experience-label { position: absolute; z-index: 2; top: 22px; left: 24px; color: var(--warm-text); font-size: 14px; letter-spacing: .12em; }
.quote-background, .gallery-picture { position: absolute; inset: 0; z-index: -1; }
.quote-background img, .gallery-picture img { width: 100%; height: 100%; object-fit: cover; }
.quote-background img { object-position: center bottom; }
.gallery-picture img { object-position: center 68%; }
.image-piece .experience-label { background: var(--bg); padding: 3px 8px; margin: -3px 0 0 -8px; border-radius: 6px; }
.quote-piece blockquote { margin: 0; padding: 100px 28px 28px; font-size: clamp(20px,1.8vw,26px); line-height: 1.85; white-space: pre-line; text-wrap: balance; }
.piece-title { margin: 0; font-size: 16px; line-height: 1.7; }
.image-piece .piece-title { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 24px; white-space: pre-line; font-size: 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); }
.music-piece { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 24px 20px; }
.music-cover-link { flex-shrink: 0; display: block; position: relative; width: min(90%, 280px, calc(var(--piece-height) - 200px)); margin: 0 auto 20px; border-radius: 50%; }
.music-cover { display: block; overflow: hidden; border-radius: 50%; }
.music-cover img { width: 100%; height: auto; }
.music-piece .listen-link { margin-top: 4px; font-size: 13px; gap: 10px; }
/* The frame is presentation chrome; the app screenshot itself stays untouched. */
.phone-frame { padding: 7px; border: 1px solid color-mix(in srgb, var(--ink) 28%, var(--bg)); border-radius: 36px; background: color-mix(in srgb, var(--ink) 9%, var(--bg)); box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 10%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent); overflow: hidden; }
.phone-frame picture { display: block; overflow: hidden; border-radius: 28px; }
.phone-frame img { width: 100%; height: auto; object-fit: contain; }
.capture-stage { display: flex; justify-content: center; padding: 10px 0; }
.capture-stage .phone-frame { height: min(610px, calc(var(--panel-height) - 120px)); aspect-ratio: 616 / 1240; transform: rotate(-4deg); }
.capture-picture { height: 100%; }
.capture-picture img { height: 100%; }
.capture-modes { display: flex; gap: 0; list-style: none; padding: 0; margin: 36px 0 0; }
.capture-modes li { padding: 0 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.capture-modes li:first-child { padding-left: 0; border: 0; }
.creation-steps { list-style: none; padding: 0; margin: 30px 0 0; counter-reset: creation; display: flex; flex-wrap: wrap; gap: 12px 22px; }
.creation-steps li { counter-increment: creation; font-size: 14px; line-height: 1.8; color: var(--muted); }
.creation-steps li::before { content: counter(creation, decimal-leading-zero); color: var(--warm-text); margin-right: 10px; font-size: 12px; }
.creation-composition { --detail-height: min(580px, calc(var(--panel-height) - 160px)); display: flex; align-items: flex-start; justify-content: center; gap: 20px; width: 100%; margin: 0 auto; }
.creation-composition .work-detail { width: calc((100% - 20px) / 2); max-width: calc(var(--detail-height) * .5); background: #e6e2db; border-color: #c7c1b7; }
.creation-composition .work-detail:nth-child(2) { margin-top: 36px; }
.creation-composition .work-detail img { border-radius: 28px; }
.invitation-section { position: relative; isolation: isolate; display: flex; flex-direction: column; }
.invitation-section .panel-inner { flex: 1; min-block-size: calc(var(--panel-height) - 164px); padding-top: 32px; align-items: center; }
.invitation-section .story-copy { text-align: left; }
.invitation-section h2 { margin-bottom: 24px; }
.privacy-note { margin: 0 0 20px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.closing-scene { display: flex; justify-content: flex-end; align-items: flex-end; position: absolute; z-index: -1; inset: 0 0 140px 20%; pointer-events: none; }
.closing-scene img { width: auto; max-width: 100%; height: 82%; object-fit: contain; object-position: right bottom; mask-image: linear-gradient(to right, transparent, #000 15%); }
.invitation-section .site-footer { border: 0; padding-block: 16px 24px; }
@media (max-width: 1000px) {
  .panel-inner { width: calc(100% - 64px); gap: 32px; }
  .hero-lede, .story-description { font-size: 16px; }
  .experience-intro { display: block; }
  .experience-intro .story-description { margin-top: 8px; }
  .experience-gallery { gap: 14px; }
  .quote-piece blockquote { padding: 85px 20px 28px; font-size: 20px; }
}
@media (max-width: 680px) {
  .home-document { --home-header-height: 68px; }
  .panel-inner { width: calc(100% - 48px); grid-template-columns: 1fr; align-content: center; gap: 24px; padding-block: 26px; }
  .home-page .section-eyebrow { margin-bottom: 10px; font-size: 12px; }
  .home-page h1 { font-size: clamp(36px,10.2vw,60px); margin-bottom: 16px; }
  .home-page h1:lang(en) { font-size: clamp(28px,8.8vw,52px); }
  .hero-lede { font-size: 15px; line-height: 1.85; margin-bottom: 16px; }
  .hero-actions { gap: 12px 16px; }
  .hero-actions .hero-cta { padding-inline: 18px; gap: 12px; }
  .hero-actions .explore-link { gap: 10px; }
  .home-panel:not(.world-section) .panel-inner { width: calc(100% - 48px); gap: 24px; }
  .landing-hero .panel-inner { align-content: start; padding-top: 30px; }
  .hero-scene { inset: 36% 0 0 0; }
  .hero-scene::after { content: ""; position: absolute; inset: 0 0 85%; background: linear-gradient(var(--bg), transparent); }
  .hero-scene img { margin-right: 0; height: 113%; mask-image: linear-gradient(to right, transparent, #000 20%); }
  .story-copy h2 { font-size: clamp(26px,7.2vw,36px); line-height: 1.35; margin-bottom: 14px; }
  .world-section .panel-inner { gap: 24px; }
  .experience-intro h2 { font-size: clamp(23px,6vw,32px); margin-bottom: 8px; }
  .experience-intro .story-description { font-size: 13px; margin: 0; padding: 0; }
  .experience-gallery { grid-template-columns: 1fr 1fr; gap: 14px; }
  .experience-piece { --piece-height: clamp(150px, calc(var(--panel-height) - 350px), 310px); border-radius: 16px; }
  .quote-piece { grid-column: 1 / -1; --piece-height: clamp(100px, calc(var(--panel-height) * .21), 160px); }
  .home-page .experience-label { top: 14px; left: 16px; font-size: 12px; }
  .quote-piece blockquote { padding: 44px 16px 16px; font-size: 17px; line-height: 1.7; }
  .quote-background img { object-position: center 66%; opacity: .45; }
  .music-piece { padding: 44px 10px 10px; }
  .music-cover-link { width: min(100%, 180px); margin-bottom: 10px; }
  .piece-title { font-size: 13px; }
  .image-piece .piece-title { left: 0; bottom: 0; padding: 10px 12px; font-size: 12px; line-height: 1.65; }
  .music-piece .listen-link { font-size: 11px; gap: 5px; min-height: 36px; }
  .capture-modes { margin-top: 20px; }
  .capture-modes li { font-size: 13px; padding-inline: 20px; }
  .capture-stage { padding: 0; }
  .capture-stage .phone-frame { height: clamp(210px, calc(var(--panel-height) - 270px), 520px); transform: rotate(-3deg); }
  .phone-frame { border-radius: 28px; padding: 5px; }
  .phone-frame picture { border-radius: 22px; }
  .creation-steps { gap: 8px 14px; margin-top: 18px; }
  .creation-steps li { font-size: 12px; }
  .creation-steps li::before { margin-right: 6px; }
  .creation-composition { --detail-height: clamp(230px, calc(var(--panel-height) - 300px), 470px); width: min(100%, calc(var(--detail-height) + 20px)); gap: 12px; }
  .creation-composition .work-detail { width: calc((100% - 12px) / 2); }
  .creation-composition .work-detail:nth-child(2) { margin-top: 22px; }
  .creation-composition .work-detail img { border-radius: 22px; }
  .invitation-section .panel-inner { min-block-size: 0; padding-top: 32px; padding-bottom: 0; align-content: start; gap: 24px; }
  .invitation-section .story-copy { text-align: center; }
  .closing-scene img { height: 100%; mask-image: linear-gradient(to right, transparent, #000 20%); }
  .invitation-section h2 { margin-bottom: 18px; }
  .closing-scene { inset: 35% 0 132px; }
  .privacy-note { margin: 0 0 20px; font-size: 13px; }
  .invitation-section .site-footer { gap: 6px; padding-block: 8px 20px; }
  .invitation-section .site-footer nav { gap: 0 12px; margin: 0; font-size: 12px; }
}
@media (max-width: 680px) and (max-height: 700px) {
  .panel-inner { padding-block: 18px; gap: 16px; }
  .home-panel:not(.world-section) .panel-inner { gap: 16px; }
  .world-section .panel-inner { gap: 16px; }
  .quote-piece { --piece-height: 110px; }
  .quote-piece blockquote { padding-top: 38px; font-size: 15px; }
  .experience-piece:not(.quote-piece) { --piece-height: 200px; }
  .music-piece { padding-top: 38px; }
  .music-cover-link { width: 90px; margin-bottom: 2px; }
  .music-piece .listen-link { min-height: 32px; margin: 0; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .panel-inner { padding-block: 18px; gap: 28px; }
  .home-page h1, .home-page h1:lang(en) { font-size: 32px; margin-bottom: 12px; }
  .home-page .story-copy h2 { font-size: 28px; margin-bottom: 10px; }
  .home-page .section-eyebrow { margin-bottom: 6px; }
  .home-page .hero-lede { line-height: 1.6; margin-bottom: 12px; }
  .home-panel:not(.world-section) .panel-inner { width: calc(100% - 96px); gap: 28px; }
  .hero-scene { inset: 0 0 0 45%; }
  .hero-scene img { margin-right: 32px; }
  .world-section .panel-inner { gap: 14px; }
  .experience-intro { display: flex; align-items: center; gap: 20px; }
  .experience-intro .section-eyebrow { display: none; }
  .experience-intro .story-description { margin: 0; font-size: 12px; }
  .experience-intro h2 { font-size: 24px !important; margin: 0 !important; }
  .experience-piece { --piece-height: max(180px, calc(var(--panel-height) - 110px)); }
  .home-page .experience-label { top: 12px; left: 16px; font-size: 12px; }
  .quote-piece blockquote { font-size: 16px; padding: 50px 16px 16px; }
  .music-piece { padding: 30px 12px 8px; }
  .music-cover-link { width: 100px; margin-bottom: 0; }
  .music-piece .piece-title { font-size: 13px; }
  .music-piece .listen-link { font-size: 11px; min-height: 32px; margin: 0; }
  .capture-stage .phone-frame { height: calc(var(--panel-height) - 60px); }
  .capture-modes, .creation-steps { margin-top: 16px; }
  .phone-frame { padding: 4px; border-radius: 20px; }
  .phone-frame picture { border-radius: 16px; }
  .creation-composition { --detail-height: calc(var(--panel-height) - 65px); width: calc(var(--detail-height) + 14px); gap: 14px; }
  .creation-composition .work-detail:nth-child(2) { margin-top: 16px; }
  .creation-composition .work-detail img { border-radius: 16px; }
  .invitation-section .panel-inner { justify-content: flex-start; align-items: center; min-block-size: 0; padding-block: 10px; }
  .invitation-section .story-copy { text-align: left; }
  .invitation-section h2 { margin-bottom: 16px !important; }
  .closing-scene { inset: 0 0 80px 45%; }
  .invitation-section .site-footer { padding-block: 4px 12px; gap: 4px; }
}
/* Common reading pages: measured line length and stable chapter anchors. */
.info-main { width: min(1000px, calc(100% - 96px)); margin: 0 auto; padding: 32px 0 88px; }
.info-main > .back-link { margin-bottom: 30px; }
.info-lead { max-width: 740px; margin-bottom: 48px; }
.info-main h1 { margin: 0 0 24px; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.35; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; scroll-margin-top: 0; }
.info-meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.info-intro { white-space: pre-line; text-wrap: pretty; margin: 0; font-size: 18px; color: var(--muted); line-height: 1.9; }
.info-main-with-toc { width: min(1120px, calc(100% - 96px)); }
.info-main-with-toc .info-lead { max-width: 800px; margin: 0 0 60px; }
.info-main-with-toc .info-reading-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 60px; align-items: start; }
.info-toc { position: sticky; top: 112px; padding: 4px 0; }
.info-toc p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.info-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: contents; }
.info-toc li { counter-increment: contents; }
.info-toc a { display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 0; font-size: 14px; color: var(--muted); line-height: 1.65; }
.info-toc a::before { content: counter(contents, decimal-leading-zero); color: var(--warm-text); font-size: 12px; font-variant-numeric: tabular-nums; }
.info-toc a:hover { color: var(--ink); }
.info-section-list { display: grid; gap: 42px; min-width: 0; }
.info-section { padding-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 0; }
.info-section:first-child { padding-top: 0; border-top: 0; }
.info-section h2 { font-size: 23px; font-weight: 500; line-height: 1.5; margin: 0 0 20px; }
.info-subsection { margin-top: 30px; }
.info-subsection h3 { margin: 0 0 12px; font-size: 17px; font-weight: 500; line-height: 1.7; }
.info-section p { margin: 0; font-size: 16px; line-height: 1.95; color: var(--muted); overflow-wrap: anywhere; }
.info-section p + p { margin-top: 14px; }
.info-related, .info-links { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.info-related { border-top: 1px solid var(--line); padding-top: 20px; font-size: 15px; }
.info-related a, .info-links a { display: inline-flex; align-items: center; min-height: 44px; }
.info-quick-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }
.info-quick-links a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--warm-text); }
.info-page-contact .info-main { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0 72px; min-height: 65svh; }
.info-page-contact .back-link { grid-column: 1 / -1; justify-self: start; }
.info-page-contact .info-lead { align-self: start; }
.info-page-contact .info-kicker { color: var(--warm-text); }
.info-page-contact .info-section:first-child .inline-link { font-size: clamp(20px, 2.1vw, 28px); color: var(--warm-text); }
.contact-action { margin-top: 28px; }
/* TestFlight: a shortcut for returning users, then two visible actions. */
.download-page { width: min(1080px, calc(100% - 96px)); margin: 0 auto; padding: 32px 0 80px; }
.download-page > .back-link { margin-bottom: 32px; }
.download-layout { display: grid; grid-template-columns: minmax(0,720px) minmax(0,1fr); gap: 40px; align-items: start; }
.download-identity { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.download-icon { width: 72px; height: 72px; border-radius: 18px; }
.download-identity h1 { margin: 0 0 8px; font-size: 40px; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; }
.download-identity p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--muted); }
.download-status { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.download-browser-help { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--warm) 7%, var(--bg)); scroll-margin-block: 110px; }
.download-browser-help:focus { outline: 2px solid var(--warm-text); outline-offset: 4px; }
.download-browser-help h2 { margin: 0 0 12px; font-size: 21px; font-weight: 500; line-height: 1.5; }
.download-browser-help p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.download-browser-help [role="status"] { margin: 14px 0 0; }
.download-browser-help [role="status"]:empty { display: none; }
.download-browser-help input { margin-top: 12px; width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--bg); font: inherit; font-size: 16px; }
.download-shortcut { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin-top: 20px; padding: 14px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.download-shortcut .listen-link { margin: 0; font-size: 14px; }
.install-guide { margin-top: 28px; }
.install-guide h2 { font-size: 25px; font-weight: 500; line-height: 1.4; margin: 0 0 20px; }
.install-steps { padding: 0; margin: 0; list-style: none; counter-reset: steps; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.install-steps li { --warm-text: color-mix(in srgb, var(--warm) 60%, var(--ink)); counter-increment: steps; display: flex; flex-direction: column; align-items: start; padding: 24px; border-radius: 20px; background: color-mix(in srgb, var(--ink) 3%, var(--bg)); border: 1px solid var(--line); }
.install-steps li:last-child { background: color-mix(in srgb, var(--warm) 7%, var(--bg)); border-color: color-mix(in srgb, var(--warm) 20%, transparent); }
.install-steps li::before { content: counter(steps, decimal-leading-zero); color: var(--warm-text); font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; margin-bottom: 16px; }
.install-steps li > div { display: flex; flex-direction: column; align-items: start; flex: 1; }
.install-steps h3 { margin: 0 0 10px; font-size: 21px; font-weight: 500; line-height: 1.5; }
.install-steps p { font-size: 15px; line-height: 1.8; color: var(--muted); margin: 0 0 22px; flex: 1; }
.install-steps .secondary-button { color: var(--warm-text); background: color-mix(in srgb, var(--warm) 5%, transparent); }
.download-primary { min-height: 48px; }
.download-content > .download-primary { margin-top: 24px; }
.download-requirements { font-size: 12px; line-height: 1.9; color: var(--muted); margin: 34px 0 0; }
.download-transfer { position: sticky; top: 120px; margin-top: 0; padding: 28px 0 28px 28px; border-left: 1px solid var(--line); }
.download-qr { width: 176px; height: 176px; padding: 8px; background: white; border-radius: 16px; }
.download-transfer h2 { font-size: 18px; font-weight: 500; line-height: 1.6; margin: 22px 0 8px; }
.download-transfer p { font-size: 14px; line-height: 1.8; color: var(--muted); margin-bottom: 8px; }
.download-transfer a { font-size: 12px; line-height: 1.8; }
.download-unavailable { line-height: 1.9; color: var(--muted); margin-top: 24px; }
.download-help { max-width: 720px; margin-top: 52px; }
.download-help h2 { font-size: 22px; font-weight: 500; margin-bottom: 24px; }
.help-item { border-top: 1px solid var(--line); }
.help-item:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.help-item summary { cursor: pointer; padding: 20px 4px; font-size: 16px; line-height: 1.7; }
.help-item p { margin: 0; padding: 0 4px 24px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.not-found-page { width: min(740px, calc(100% - 48px)); margin: 0 auto; padding: 100px 0 120px; min-height: 65svh; }
.not-found-page h1 { font-size: clamp(30px,4vw,48px); font-weight: 500; }
.not-found-page > p { color: var(--muted); line-height: 1.9; }
.not-found-page .hero-actions { margin-top: 32px; }
/* About uses the same native chapter rhythm as home, with no nested scroller. */
.about-panel { min-block-size: var(--panel-height); scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.about-inner { width: min(960px, calc(100% - 96px)); min-block-size: var(--panel-height); margin-inline: auto; padding-block: 40px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 4vw, 64px); }
.about-copy { position: relative; z-index: 1; min-width: 0; }
.about-copy h1, .about-copy h2 { margin: 0 0 26px; font-weight: 500; font-size: clamp(30px, 3vw, 44px); line-height: 1.4; letter-spacing: -.025em; text-wrap: balance; }
.about-copy > p:not(.section-eyebrow) { white-space: pre-line; margin: 0 0 18px; color: var(--muted); font-size: 18px; line-height: 1.95; text-wrap: pretty; }
.about-copy .explore-link, .about-copy .hero-cta { margin-top: 16px; }
.about-number { font-variant-numeric: tabular-nums; letter-spacing: .14em; color: var(--warm-text); }
.about-inner > picture { display: block; min-width: 0; }
.about-inner > picture img { width: 100%; height: min(64svh, 590px); object-fit: contain; }
.about-reading { transform: scale(1.13); }
.about-reading img, .about-landscape img { mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent); }
.about-inner > .about-phone { width: min(260px, 100%); padding: 6px; justify-self: center; border-radius: 36px; background: color-mix(in srgb, var(--ink) 7%, var(--bg)); box-shadow: 0 16px 55px color-mix(in srgb, var(--ink) 9%, transparent); }
.about-inner > .about-phone img { height: auto; max-height: 62svh; border-radius: 30px; object-fit: contain; }
.about-inner > .about-work img { height: auto; max-height: 60svh; border-radius: 24px; }
.about-final { display: flex; flex-direction: column; }
.about-final .about-inner { min-block-size: 0; flex: 1; }
.about-final .site-footer { width: min(960px, calc(100% - 96px)); }
@media (max-width: 700px) {
  .about-inner { width: calc(100% - 48px); grid-template-columns: 1fr; gap: 24px; padding-block: 28px; align-content: center; }
  .about-copy h1, .about-copy h2 { font-size: clamp(27px, 7vw, 34px); margin-bottom: 18px; }
  .about-copy > p:not(.section-eyebrow) { font-size: 16px; line-height: 1.85; margin-bottom: 14px; }
  .about-copy .section-eyebrow { margin-bottom: 16px; }
  .about-copy .explore-link, .about-copy .hero-cta { margin-top: 8px; }
  .about-inner > picture img { height: clamp(180px, 30svh, 300px); }
  .about-reading { transform: none; }
  .about-inner > .about-phone { width: auto; border-radius: 22px; padding: 4px; }
  .about-inner > .about-phone img { width: auto; height: clamp(190px, 31svh, 300px); border-radius: 18px; }
  .about-inner > .about-work { justify-self: center; width: min(230px, 62vw); }
  .about-inner > .about-work img { height: auto; max-height: 29svh; }
  .about-final .about-inner { gap: 12px; padding-block: 24px 12px; }
  .about-final .about-landscape img { height: clamp(100px, 17svh, 170px); object-fit: cover; object-position: center 75%; }
  .about-final .site-footer { width: calc(100% - 48px); padding-block: 14px 20px; gap: 8px; }
}
@media (max-height: 600px) and (min-width: 701px) {
  .about-inner { padding-block: 24px; }
  .about-copy h1, .about-copy h2 { font-size: 30px; margin-bottom: 16px; }
  .about-copy > p:not(.section-eyebrow) { font-size: 16px; line-height: 1.75; }
}
@media print {
  .about-document { scroll-snap-type: none; }
  .about-panel, .about-inner { min-block-size: 0; }
  .about-inner { display: block; width: 100%; padding-block: 20px; }
  .about-inner > picture, .about-copy .explore-link, .about-copy .hero-cta { display: none; }
}

/* Footer across every public information page. */
.site-footer { display: grid; grid-template-columns: 1fr auto; width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 28px 0 32px; border-top: 1px solid var(--line); gap: 20px 40px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.site-footer nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }
.footer-entity { font-weight: 400; }
@media (max-width: 900px) {
  .desktop-nav { gap: 18px; margin-right: 10px; }
  .site-header { padding-inline: 24px; }
  .info-main, .info-main-with-toc, .download-page { width: calc(100% - 64px); }
  .info-main-with-toc .info-lead { margin-left: 0; }
  .info-main-with-toc .info-reading-layout { grid-template-columns: 1fr; gap: 32px; }
  .info-toc { position: static; padding: 20px 0; }
  .info-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .info-page-contact .info-main { gap: 0 40px; }
  .download-layout { gap: 32px; grid-template-columns: minmax(0,1fr) 190px; }
  .install-steps { gap: 14px; }
  .download-identity { gap: 18px; }
  .download-identity h1 { font-size: 32px; }
}
@media (max-width: 680px) {
  .site-header { height: 68px; padding-inline: 16px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 30px; }
  .brand-product { font-size: 14px; }
  .header-actions { gap: 0; }
  .desktop-nav, .header-cta { display: none; }
  .mobile-menu { display: block; }
  .section-eyebrow { margin-bottom: 18px; font-size: 13px; }
  .info-main, .info-main-with-toc, .download-page { width: calc(100% - 48px); padding: 20px 0 56px; }
  .info-main > .back-link, .download-page > .back-link { margin-bottom: 24px; }
  .info-lead { margin-bottom: 32px; }
  .info-main h1 { font-size: 32px; }
  .info-intro { font-size: 17px; line-height: 1.9; }
  .info-section h2 { font-size: 22px; }
  .info-section-list { gap: 32px; }
  .info-toc a { gap: 8px; font-size: 13px; }
  .info-page-contact .info-main { display: block; }
  .info-main-with-toc .info-lead { margin-bottom: 32px; }
  .info-quick-links { gap: 4px 20px; margin-top: 20px; }
  .info-quick-links a { font-size: 13px; }
  .info-toc ol { grid-template-columns: 1fr; }

  .download-layout { display: block; }
  .download-transfer { display: none; }
  .download-identity { gap: 18px; margin-bottom: 18px; }
  .download-icon { width: 60px; height: 60px; border-radius: 16px; }
  .download-identity h1 { font-size: 30px; }
  .download-identity p { font-size: 14px; }
  .download-status { font-size: 14px; }
  .download-primary { min-height: 48px; }
  .install-guide { margin-top: 28px; }
  .install-guide h2 { font-size: 23px; margin-bottom: 24px; }
  .install-steps { grid-template-columns: 1fr; gap: 12px; }
  .install-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 18px; }
  .install-steps li::before { font-size: 20px; line-height: 1.5; margin: 0; }
  .install-steps h3 { font-size: 19px; }
  .install-steps p { font-size: 14px; margin-bottom: 14px; }
  .download-help { margin-top: 36px; }
  .site-footer { width: calc(100% - 48px); grid-template-columns: 1fr; gap: 12px; padding: 22px 0 28px; }
  .site-footer nav { gap: 4px 22px; margin-bottom: 8px; }
  .footer-legal { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html, .home-document { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { --bg: #fff; --ink: #222; --ink-strong: #111; --muted: #333; --faint: #555; --line: #bbb; background: white; color: #222; }
  .site-header, .site-footer, .skip-link, .back-link, .back-to-top, .info-toc, .info-quick-links { display: none; }
  .info-main, .info-main-with-toc { width: 100%; padding: 0; }
  .info-main-with-toc .info-reading-layout, .info-page-contact .info-main { display: block; }
  .info-section h2, .info-subsection h3 { break-after: avoid; }
}

/* Public music links are intentionally isolated from the marketing page. */
.music-share-page {
  --music-share-page-bg: #f5f1ea;
  --music-share-brand-bg: rgba(245, 241, 234, 0.88);
  --music-share-brand-line: rgba(62, 55, 47, 0.08);
  --music-share-brand-ink: rgba(62, 55, 47, 0.92);
  --music-share-backdrop-opacity: 0.34;
  --music-share-backdrop-filter: blur(72px) saturate(0.64);
  --music-share-backdrop-veil: rgba(245, 241, 234, 0.70);
  --music-share-disc-shadow: 0 20px 56px rgba(76, 59, 39, 0.15);
  --music-share-progress-track: rgba(62, 55, 47, 0.20);
  --music-share-progress-value: #a85a2f;
  --music-share-focus: #a85a2f;
  --music-share-kicker: #9e542b;
  --music-share-title: #3e372f;
  --music-share-secondary: rgba(110, 101, 90, 0.90);
  --music-share-lyrics: rgba(62, 55, 47, 0.86);
  --music-share-error: rgba(110, 101, 90, 0.70);
  --music-share-unavailable: rgba(110, 101, 90, 0.78);
  min-height: 100svh;
  margin: 0;
  color: var(--music-share-title);
  background: var(--music-share-page-bg);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .music-share-page {
    --music-share-page-bg: #0d141e;
    --music-share-brand-bg: rgba(8, 13, 20, 0.86);
    --music-share-brand-line: rgba(231, 236, 243, 0.08);
    --music-share-brand-ink: rgba(241, 243, 247, 0.90);
    --music-share-backdrop-opacity: 0.46;
    --music-share-backdrop-filter: blur(72px) saturate(0.72);
    --music-share-backdrop-veil: rgba(8, 13, 20, 0.52);
    --music-share-disc-shadow: 0 22px 70px rgba(0, 0, 0, 0.30);
    --music-share-progress-track: rgba(225, 231, 240, 0.28);
    --music-share-progress-value: #e2bd6d;
    --music-share-focus: #e2bd6d;
    --music-share-kicker: #e1bb68;
    --music-share-title: #f2f3f6;
    --music-share-secondary: rgba(225, 231, 240, 0.72);
    --music-share-lyrics: rgba(241, 243, 247, 0.82);
    --music-share-error: rgba(215, 220, 229, 0.62);
    --music-share-unavailable: rgba(205, 213, 226, 0.58);
  }
}

:root[data-theme="dark"] .music-share-page {
  --music-share-page-bg: #0d141e;
  --music-share-brand-bg: rgba(8, 13, 20, 0.86);
  --music-share-brand-line: rgba(231, 236, 243, 0.08);
  --music-share-brand-ink: rgba(241, 243, 247, 0.90);
  --music-share-backdrop-opacity: 0.46;
  --music-share-backdrop-filter: blur(72px) saturate(0.72);
  --music-share-backdrop-veil: rgba(8, 13, 20, 0.52);
  --music-share-disc-shadow: 0 22px 70px rgba(0, 0, 0, 0.30);
  --music-share-progress-track: rgba(225, 231, 240, 0.28);
  --music-share-progress-value: #e2bd6d;
  --music-share-focus: #e2bd6d;
  --music-share-kicker: #e1bb68;
  --music-share-title: #f2f3f6;
  --music-share-secondary: rgba(225, 231, 240, 0.72);
  --music-share-lyrics: rgba(241, 243, 247, 0.82);
  --music-share-error: rgba(215, 220, 229, 0.62);
  --music-share-unavailable: rgba(205, 213, 226, 0.58);
}

.music-share-brand-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  min-height: 64px;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--music-share-brand-bg);
  border-bottom: 1px solid var(--music-share-brand-line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.music-share-brand {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--music-share-brand-ink);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: 0.10em;
}

.music-share-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.music-share-brand-logo-source {
  width: 30px;
  height: 30px;
  display: block;
}

.music-share-brand:focus-visible {
  outline: 2px solid var(--music-share-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.music-share-backdrop {
  position: fixed;
  inset: -20%;
  z-index: -1;
  overflow: hidden;
  background: var(--music-share-page-bg);
}

.music-share-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: var(--music-share-backdrop-opacity);
  filter: var(--music-share-backdrop-filter);
  transform: scale(1.2);
}

.music-share-backdrop-image-source {
  width: 100%;
  height: 100%;
  display: block;
}

.music-share-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--music-share-backdrop-veil);
}

.music-share-shell {
  width: min(100% - 40px, 560px);
  --music-disc-size: min(72vw, 390px, max(160px, calc(100svh - 400px)));
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(64px + max(20px, env(safe-area-inset-top))) 0 max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
}

.music-share-player,
.music-share-unavailable {
  width: 100%;
  text-align: center;
}

.music-share-player {
  margin: auto 0;
  padding: 0;
}

.music-share-artwork {
  position: relative;
  width: var(--music-disc-size);
  aspect-ratio: 1;
  margin: 16px auto 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}

.music-share-disc-source,
.music-share-disc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.music-share-disc-source {
  display: block;
  overflow: hidden;
}

.music-share-disc {
  box-shadow: var(--music-share-disc-shadow);
  transform-origin: center;
  transform: rotate(var(--music-vinyl-angle, 0deg));
  will-change: transform;
}

.music-share-progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  touch-action: none;
}

.music-share-progress-ring:focus-visible {
  outline: 2px solid var(--music-share-focus);
  outline-offset: 5px;
}

.music-share-kicker {
  margin: 0;
  color: var(--music-share-kicker);
  font-size: 0.84rem;
  letter-spacing: 0.16em;
}

.music-share-player h1,
.music-share-unavailable h1 {
  max-width: 520px;
  margin: 20px auto 0;
  color: var(--music-share-title);
  font: 620 clamp(1.62rem, 6.2vw, 2.25rem)/1.3 var(--font-sans);
  text-wrap: balance;
  line-break: strict;
  word-break: normal;
}

.music-share-creator {
  margin: 10px 0 0;
  color: var(--music-share-secondary);
  font-size: 0.98rem;
}

.music-share-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--music-share-progress-value);
  background: color-mix(in srgb, var(--music-share-page-bg) 70%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.music-share-play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.music-share-pause {
  display: none;
  width: 11px;
  height: 15px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.music-share-toggle[data-playing="true"] .music-share-play { display: none; }
.music-share-toggle[data-playing="true"] .music-share-pause { display: block; }

.music-share-player[data-buffering="true"] .music-share-toggle {
  cursor: progress;
}

.music-share-time {
  width: var(--music-disc-size);
  margin: -2px auto 0;
  display: flex;
  justify-content: space-between;
  color: var(--music-share-secondary);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.music-share-lyrics {
  max-width: 520px;
  margin: 21px auto 0;
  display: grid;
  gap: 10px;
}

.music-share-lyrics p {
  margin: 0;
  color: var(--music-share-lyrics);
  font: 500 clamp(1rem, 4.3vw, 1.18rem)/1.65 var(--font-sans);
  text-wrap: balance;
  line-break: strict;
  word-break: normal;
}

.music-share-lyrics.is-synced {
  position: relative;
  height: clamp(108px, 17svh, 144px);
  display: block;
  overflow: hidden;
}

.music-share-lyrics-track {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  gap: 10px;
  transform: translate3d(0, var(--music-lyrics-offset, 0px), 0);
  will-change: transform;
}

.music-share-lyrics-track[data-positioned="true"] {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.music-share-lyrics.is-synced p {
  color: var(--music-share-secondary);
  opacity: 0;
  transition: color 220ms ease, opacity 220ms ease;
}

.music-share-lyrics.is-synced p[data-state="previous"],
.music-share-lyrics.is-synced p[data-state="next"] {
  color: var(--music-share-secondary);
  opacity: 0.28;
}

.music-share-lyrics.is-synced p[data-state="active"] {
  color: var(--music-share-lyrics);
  opacity: 1;
  font-weight: 620;
}

.music-share-error {
  display: none;
  margin: 14px 0 0;
  color: var(--music-share-error);
  font-size: 0.82rem;
}
.music-share-player[data-failed="true"] .music-share-error { display: block; }

.music-share-unavailable p:not(.music-share-kicker) {
  color: var(--music-share-unavailable);
  line-height: 1.7;
}

.music-share-still {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border-radius: 50%;
  object-fit: cover;
}

@supports (height: 100dvh) {
  .music-share-shell { --music-disc-size: min(72vw, 390px, max(160px, calc(100dvh - 400px))); }
}
@media (max-width: 560px) {
  .music-share-shell { width: calc(100% - 40px); }
  .music-share-lyrics { margin-top: 16px; }
}
/* Wide, short windows place the record beside the lyrics instead of shrinking text. */
@media (min-width: 600px) and (max-height: 600px) {
  .music-share-shell { width: min(900px, calc(100% - 64px)); --music-disc-size: min(36vw, max(160px, calc(100svh - 150px))); }
  @supports (height: 100dvh) {
    .music-share-shell { --music-disc-size: min(36vw, max(160px, calc(100dvh - 150px))); }
  }
  .music-share-player { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: repeat(3, auto) 1fr auto; gap: 10px 36px; align-items: center; }
  .music-share-artwork { grid-column: 1; grid-row: 1 / 5; margin-top: 0; }
  .music-share-time { grid-column: 1; grid-row: 5; }
  .music-share-kicker { grid-column: 2; grid-row: 1; }
  .music-share-player h1 { grid-column: 2; grid-row: 2; font-size: clamp(24px, 3vw, 32px); margin: 0; }
  .music-share-creator { grid-column: 2; grid-row: 3; margin: 0; }
  .music-share-lyrics { grid-column: 2; grid-row: 4; margin: 0; width: 100%; align-self: center; }
  .music-share-error { grid-column: 2; grid-row: 5; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .music-share-page * { scroll-behavior: auto !important; }
  .music-share-disc { transform: none; }
  .music-share-lyrics-track,
  .music-share-lyrics.is-synced p { transition: none; }
}
