/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
   Put this @layer first; product CSS outside the layer wins ordinary layout rules.
   Native hidden and closed-dialog states take precedence over component display rules. */
@layer od-layout {
  [hidden]:not([hidden="until-found" i]) { display: none !important; }
  dialog:not([open]) { display: none !important; }

  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

  /* containers */
  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

  /* stacked information: each piece is its own line — never sibling inline spans */
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }

  /* media keeps its intrinsic ratio by default; never a distorted or cropped
     cover by accident. height:auto lets the ratio win over an <img height="…">
     attribute. Cropping to a uniform box is an explicit opt-in: set --od-ratio
     AND add .od-media-cover together (per the core rule, only where a crop is
     deliberate — tile thumbs, decorative fills — never on full-frame content). */
  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }

  /* functional inline SVG icons opt into bounded geometry; content SVGs keep their own */
  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

  /* data text only — authored copy is rewritten to its budget instead */
  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }   /* block-level reservation for a shared baseline */
  .od-nowrap  { white-space: nowrap; }           /* 数字+单位 · 价格+起 · 日期+星期 */
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; } /* CJK labels break at spaces / <wbr> first */

  /* screen skeleton (optional): bars take their own space, the middle scrolls — no padding guessed for chrome */
  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

  /* horizontal rail: the next item peeks at the edge; trailing room survives overflow */
  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
:root [hidden]:where(:not([hidden="until-found" i])) { display: none; }
/* /OD-LAYOUT-PRIMITIVES v1 */

/* A photographic editorial: serif headlines lend a personal voice, existing
   berry accents retain the app identity, and open layouts let real screens lead. */
:root {
  color-scheme: light;
  --paper: #fcfcfd; --ink: #242126; --muted: #656069;
  --accent: #a72a68; --line: #dedbe0; --wash: #f1eef2;
  --inverse: #262329; --inverse-text: #faf7fa; --inverse-muted: #d1c9d2;
  --pink: #edb5d0; --button: #29252b; --button-text: #fff;
  --shadow: 0 16px 40px #24152914; --radius: 8px; --screen-radius: 24px;
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px;
  --display: Georgia, 'Times New Roman', serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body-size: 17px; --small: 14px; --heading: clamp(40px, 4.5vw, 64px);
  --duration: 180ms;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark; --paper: #19171b; --ink: #f6f2f6; --muted: #bdb5bf;
    --accent: #f09ac5; --line: #403942; --wash: #242027;
    --button: #f1e8ee; --button-text: #27212a; --shadow: 0 16px 40px #0003;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --paper: #19171b; --ink: #f6f2f6; --muted: #bdb5bf;
  --accent: #f09ac5; --line: #403942; --wash: #242027;
  --button: #f1e8ee; --button-text: #27212a; --shadow: 0 16px 40px #0003;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body-size)/1.65 var(--body); -webkit-text-size-adjust: 100%; }
body:has(dialog[open]) { overflow: hidden; }
h1,h2,h3,p,figure { margin: 0; }
h1,h2 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
h2 { font-size: var(--heading); }
h3 { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.025em; }
em { color: var(--accent); font-weight: 400; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a[href],button,summary { cursor: pointer; }
button { font: inherit; }
a,button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.container { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; top: 16px; left: 16px; z-index: 10; padding: 8px 16px; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header nav { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 26px; font-weight: 600; letter-spacing: -.06em; }
.wordmark img { display: block; width: 36px; height: auto; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: var(--space-4); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; text-decoration: none; }
.nav-links a[aria-current="page"] { text-decoration: underline; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; }
.theme-toggle .od-icon { --od-icon-size: 18px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); padding-block: var(--space-6) var(--space-7); align-items: center; }
.hero-copy { padding-block: var(--space-4); }
.kicker { color: var(--muted); font-size: var(--small); margin-bottom: var(--space-3); }
.hero h1 { font-size: clamp(64px, 7.5vw, 104px); max-width: 600px; }
.hero h1 span { display: block; }
.hero-description { color: var(--muted); max-width: 390px; margin-top: var(--space-4); font-size: 18px; line-height: 1.65; }
.hero-actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border-radius: var(--radius); background: var(--button); color: var(--button-text); font-size: 16px; text-decoration: none; transition: transform var(--duration) ease-out; }
.launch-note { color: var(--muted); font-size: var(--small); line-height: 1.5; }
.compatibility { margin-top: var(--space-2); color: var(--muted); font-size: var(--small); }
.hero-visual { min-width: 0; }
.screen-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.screen-pair figure:nth-child(2) { padding-top: var(--space-6); }
.screen-button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--screen-radius); background: transparent; color: inherit; box-shadow: var(--shadow); transition: transform var(--duration) ease-out; }
.screen-button img { border-radius: var(--screen-radius); border: 1px solid #79707935; }
.screen-pair figcaption { margin-top: var(--space-2); color: var(--muted); font-size: 13px; text-align: center; }
.visual-note { display: flex; gap: var(--space-2); align-items: center; color: var(--muted); font-size: 13px; margin-top: var(--space-4); }
.visual-note::before { content: ''; height: 1px; background: var(--line); flex: 1; }
.section-label { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--small); margin-bottom: var(--space-4); }
.section-label span { color: var(--accent); font-variant-numeric: tabular-nums; }
.story { border-top: 1px solid var(--line); padding-block: var(--space-7); }
.story-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-7); }
.story-grid h2 { max-width: 480px; }
.story-details { display: grid; gap: var(--space-4); }
.story-details p { color: var(--muted); margin-top: 12px; max-width: 480px; }
.cleanup { background: var(--wash); padding-block: var(--space-7); }
.cleanup-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-7); }
.cleanup-screens { max-width: 440px; width: 100%; justify-self: center; }
.cleanup-copy h2 { max-width: 480px; }
.cleanup-copy > p { margin-top: var(--space-3); max-width: 440px; color: var(--muted); }
.cleanup-copy .quiet-note { padding-top: var(--space-3); margin-top: var(--space-4); border-top: 1px solid var(--line); font-size: 15px; }
.privacy { padding-block: var(--space-7); }
.privacy-panel { background: var(--inverse); color: var(--inverse-text); padding: var(--space-6); border-radius: var(--radius); }
.privacy-panel .section-label { color: var(--inverse-muted); }
.privacy-panel .section-label span { color: var(--pink); }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); }
.privacy-grid h2 { max-width: 440px; }
.privacy-grid h2 em { color: var(--pink); }
.privacy-lede { color: var(--inverse-muted); margin-top: var(--space-3); max-width: 400px; }
.privacy-list { list-style: none; padding: 0; margin: 0; }
.privacy-list li { padding-block: var(--space-3); border-bottom: 1px solid #ffffff26; }
.privacy-list li:first-child { padding-top: 0; }
.privacy-list h3 { font-size: 18px; }
.privacy-list p { margin-top: var(--space-1); color: var(--inverse-muted); font-size: 16px; }
.privacy-detail { color: var(--inverse-muted); font-size: var(--small); margin-top: var(--space-5); max-width: 840px; }
.privacy-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--space-2); font-size: 15px; color: var(--inverse-text); }
.support { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-7); padding-bottom: var(--space-7); }
.support-intro > p { color: var(--muted); margin-top: var(--space-3); max-width: 360px; }
.contact-email { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent); margin-top: var(--space-2); overflow-wrap: anywhere; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 80px; padding-block: var(--space-3); font-size: 17px; font-weight: 500; line-height: 1.5; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 400; flex: none; color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); font-size: 16px; padding-bottom: var(--space-3); }
.faq a { color: var(--accent); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); border-top: 1px solid var(--line); padding-block: var(--space-4); font-size: var(--small); }
.site-footer p span { display: block; color: var(--muted); margin-top: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-privacy { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.footer-privacy svg { flex: none; }
.policy { max-width: 760px; padding-block: var(--space-6) var(--space-7); }
.policy-header { padding-bottom: var(--space-4); margin-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.policy h1 { font-size: clamp(48px, 6vw, 72px); }
.policy h2 { font-family: var(--body); font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.policy p { margin-top: var(--space-2); overflow-wrap: anywhere; }
.policy section + section { margin-top: var(--space-5); }
.policy .eyebrow { color: var(--accent); margin-bottom: var(--space-2); }
.policy .effective-date { color: var(--muted); font-size: 15px; }
.policy a { color: var(--accent); }
.screenshot-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); background: var(--paper); color: var(--ink); }
.screenshot-dialog::backdrop { background: #100c16bd; }
.dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.dialog-bar p { font-size: 16px; }
.dialog-close { padding: 8px 16px; min-height: 44px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--radius); }
.screenshot-dialog img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 136px); margin-inline: auto; object-fit: contain; border-radius: 16px; }
@media (hover: hover) {
  .nav-links a:hover, .site-footer a:hover, .contact-email:hover, .privacy-link:hover { text-decoration: underline; }
  .primary-link:hover { transform: translateY(-2px); text-decoration: underline; }
  .screen-button:hover { transform: translateY(-4px); }
  .theme-toggle:hover, .dialog-close:hover { border-color: var(--accent); background: var(--wash); }
  .faq summary:hover { color: var(--accent); }
}
button:active, .primary-link:active { transform: translateY(1px); }
@media (min-width: 1440px) { .hero { gap: var(--space-7); } }
@media (max-width: 1024px) {
  .container { width: calc(100% - 64px); }
  .hero { gap: var(--space-4); }
  .hero h1 { font-size: clamp(64px, 8vw, 88px); }
  .story-grid,.cleanup-grid,.privacy-grid,.support { gap: var(--space-5); }
  .privacy-panel { padding: var(--space-5); }
  .screen-pair { gap: var(--space-2); }
}
@media (max-width: 767px) {
  .container { width: calc(100% - 40px); }
  .site-header nav { min-height: 88px; gap: var(--space-2); }
  .wordmark { font-size: 23px; gap: 8px; }
  .wordmark img { width: 32px; }
  .nav-links { gap: var(--space-2); }
  .nav-links a { font-size: var(--small); }
  .hero { grid-template-columns: 1fr; gap: var(--space-5); padding-block: var(--space-4) var(--space-6); }
  .hero-copy { padding-block: var(--space-2) 0; }
  .hero h1 { font-size: clamp(64px, 12vw, 88px); }
  .hero-description { max-width: 480px; }
  .hero-visual { max-width: 480px; width: 100%; justify-self: center; }
  .screen-pair figure:nth-child(2) { padding-top: var(--space-5); }
  .screen-button, .screen-button img { border-radius: 16px; }
  .story,.cleanup,.privacy { padding-block: var(--space-6); }
  .story-grid,.cleanup-grid,.privacy-grid,.support { grid-template-columns: 1fr; gap: var(--space-4); }
  .story-details { gap: var(--space-4); }
  .cleanup-copy { grid-row: 1; }
  .cleanup-screens { max-width: 400px; margin-top: var(--space-2); }
  .privacy-panel { padding: var(--space-4) var(--space-3); }
  .privacy-detail { margin-top: var(--space-4); }
  .support { padding-bottom: var(--space-6); gap: var(--space-4); }
  .site-footer { align-items: flex-start; gap: var(--space-2); }
  .site-footer > p { flex-basis: 100%; }
  .policy { padding-block: var(--space-5) var(--space-6); }
}
@media (max-width: 420px) {
  .site-header nav { flex-wrap: wrap; padding-block: 16px; gap: 8px; }
  .nav-links { gap: 12px; }
  .theme-toggle { width: 44px; height: 44px; }
  .hero-actions { gap: var(--space-2); }
  .launch-note { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
