:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #86868b;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --chip-bg: #e8e8ed;
  --phone-frame: #1d1d1f;
  --shadow: 0 12px 32px rgba(0, 0, 0, .10);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --ink: #f5f5f7;
    --ink-soft: #a1a1a6;
    --ink-faint: #86868b;
    --line: #424245;
    --blue: #0071e3;
    --link: #2997ff;
    --chip-bg: #333336;
    --shadow: 0 12px 32px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
button { font: inherit; cursor: pointer; letter-spacing: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--link); }
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h1, .section-head h2 { font-size: clamp(32px, 4.6vw, 48px); }
.section-head p { margin: 14px auto 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 21px); line-height: 1.42; max-width: 56ch; }
.link-arrow { color: var(--link); text-decoration: none; font-size: 17px; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow::after { content: " \203A"; }

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--ink-soft); font-weight: 600; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 0; text-align: center; overflow: hidden; }
.hero .hero-name { font-size: 21px; font-weight: 600; margin: 0; }
.hero .hero-new { display: block; color: #b64400; font-size: 17px; font-weight: 400; margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { .hero .hero-new { color: #f56300; } }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); font-weight: 700; letter-spacing: -0.02em; max-width: 18ch; margin: 10px auto 0; }
.hero p.lede { font-size: clamp(19px, 2.6vw, 26px); line-height: 1.32; color: var(--ink-soft); max-width: 42ch; margin: 20px auto 0; letter-spacing: -0.01em; }
.hero p.lede strong { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; justify-content: center; margin-top: 26px; }
.btn-pill {
  background: var(--blue); color: #fff; border: 0; border-radius: 980px;
  padding: 12px 22px; font-size: 17px; font-weight: 400; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-pill:hover { background: var(--blue-hover); }
.hero-photo { margin: 44px auto 0; max-width: 1100px; padding: 0 12px; }
.hero-photo img { width: 100%; height: auto; margin: 0 auto; }
.hero-cap { color: var(--ink-faint); font-size: 14px; margin: 6px 0 0; padding-bottom: 48px; }
.hero-cap strong { color: var(--ink-soft); font-weight: 600; }
figure.hero-photo { margin-bottom: 0; }

/* ---------- Filter bar ---------- */
.filterbar { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.filterbar .wrap { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.filterbar .flabel { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; }
.filterbar .fcount { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.size-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 980px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------- Phone stage (live preview) ---------- */
.stage { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.phone-col { text-align: center; }
.phone-col .cap { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.phone {
  position: relative;
  width: 236px; aspect-ratio: 1398 / 2034;
  border-radius: 38px;
  background: var(--phone-frame);
  padding: 7px;
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255,255,255,.16);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: #000; }
.phone .screen img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-cam {
  position: absolute; top: 11px; right: 13px; width: 11px; height: 11px; border-radius: 50%;
  background: rgba(0,0,0,.8); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); z-index: 5;
}
.duo-open {
  position: relative;
  width: min(440px, calc(100vw - 64px)); aspect-ratio: 2670 / 1878;
  border-radius: 34px;
  background: var(--phone-frame);
  padding: 7px;
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255,255,255,.16);
}
.duo-open .screen { position: relative; width: 100%; height: 100%; border-radius: 27px; overflow: hidden; background: #000; }
.duo-open .screen img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duo-open .crease {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 14px; transform: translateX(-50%); z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.20) 42%, rgba(255,255,255,.20) 55%, transparent);
  pointer-events: none;
}
.duo-open .cam {
  position: absolute; top: 10px; right: 12%; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(0,0,0,.75); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); z-index: 5;
}

section.band { padding: 84px 0; }
section.band.alt { background: var(--bg-alt); }

/* ---------- Detail layout ---------- */
.breadcrumb { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 26px; text-align: center; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 7px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.rail {
  background: var(--bg); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 4px 18px rgba(0,0,0,.06); text-align: left;
}
@media (prefers-color-scheme: dark) { .rail { background: #1d1d1f; box-shadow: none; } }
.rail .daylabel { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b64400; margin: 0 0 6px; }
@media (prefers-color-scheme: dark) { .rail .daylabel { color: #f56300; } }
.rail h1.duo-name, .rail h3.duo-name { font-size: 26px; letter-spacing: -0.01em; }
.rail .duo-sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 5px; }
.badge-free { display: inline-block; margin-top: 12px; background: #e6f4ea; color: #137333; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 980px; }
@media (prefers-color-scheme: dark) { .badge-free { background: #17351f; color: #7bc98a; } }
.rail h4 { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin: 22px 0 9px; }
.tagpills { display: flex; flex-wrap: wrap; gap: 7px; }
.tagpill { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 980px; padding: 5px 12px; font-size: 13.5px; text-decoration: none; display: inline-block; }
.tagpill:hover { border-color: var(--blue); color: var(--link); }
.palette { display: flex; gap: 9px; flex-wrap: wrap; }
.palette .dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); padding: 0; display: inline-block; }
.download-box { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 10px; }
.download-box .btn { justify-content: center; width: 100%; }
.size-note { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; margin: 4px 0 0; }
.about-file { font-size: 13px; color: var(--ink-soft); line-height: 1.55; background: var(--bg-alt); border-radius: 12px; padding: 13px 15px; margin: 14px 0 0; }
.reframe-note { max-width: 760px; margin: 20px auto 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; text-align: center; }
.related-list { display: grid; gap: 8px; }
.related-item { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 5px; border-radius: 12px; text-align: left; color: var(--ink); width: 100%; text-decoration: none; }
.related-item:hover { background: var(--bg-alt); }
.related-item img { width: 40px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.related-item .rname { font-weight: 600; font-size: 14.5px; display: block; }
.related-item .rcat { font-size: 12px; color: var(--ink-faint); }
.btn {
  border: 0; border-radius: 980px; padding: 10px 18px;
  font-size: 15px; font-weight: 400;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: var(--chip-bg); color: var(--ink); }
.btn-ghost:hover { filter: brightness(.97); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-small { padding: 7px 14px; font-size: 13.5px; }
a.btn { text-decoration: none; }

/* ---------- Gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 30px; }
.chip {
  border: 0; background: var(--chip-bg); color: var(--ink);
  border-radius: 980px; padding: 8px 16px; font-size: 14px; text-decoration: none; display: inline-block;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--bg); border: 0; border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0; width: 100%;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
  transition: box-shadow .15s ease, transform .15s ease;
  display: block; text-decoration: none; color: var(--ink);
}
@media (prefers-color-scheme: dark) { .card { background: #1d1d1f; box-shadow: none; } }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.10); }
.card .thumb { position: relative; aspect-ratio: 2670 / 1878; overflow: hidden; background: var(--bg-alt); display: block; }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.card .thumb .tag {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.45); padding: 3px 7px; border-radius: 980px;
}
.card .meta { padding: 16px 18px 18px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card .meta .name { font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.card .meta .cat { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); flex: none; }
.card .meta .blurb { display: block; width: 100%; color: var(--ink-soft); font-size: 14px; line-height: 1.45; margin-top: 3px; }
.card .meta .spec { display: block; width: 100%; color: var(--ink-faint); font-size: 12.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card .meta .ctags { display: block; width: 100%; color: var(--ink-faint); font-size: 12.5px; margin-top: 2px; }

/* ---------- Premium single line ---------- */
.premium-line { padding: 34px 0; border-top: 1px solid var(--line); }
.premium-line p { margin: 0; text-align: center; color: var(--ink-soft); font-size: 16px; }
.premium-line strong { color: var(--ink); font-weight: 600; }

/* ---------- How to (black band) + FAQ ---------- */
.band-black { background: #000; color: #f5f5f7; padding: 84px 0; }
.band-black .section-head p { color: #a1a1a6; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 36px; max-width: 1024px; margin: 0 auto; }
.step .n { font-weight: 700; color: #2997ff; font-size: 15px; }
.step h3 { font-size: 21px; margin: 8px 0 8px; letter-spacing: -0.01em; }
.step p { margin: 0; color: #a1a1a6; font-size: 15px; line-height: 1.5; }
.faq { max-width: 820px; margin: 56px auto 0; border-top: 1px solid #333336; }
.faq-item { padding: 22px 0; border-bottom: 1px solid #333336; }
.faq-item h3 { font-size: 19px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: #a1a1a6; font-size: 15.5px; line-height: 1.55; max-width: 68ch; }
.faq-item a { color: #2997ff; }

/* ---------- Reading pages (privacy / disclosure) ---------- */
.reading { max-width: 820px; margin: 0 auto; }
.reading h1 { font-size: clamp(32px, 4.6vw, 48px); margin-bottom: 18px; }
.reading p { color: var(--ink-soft); line-height: 1.55; }
.draft { border: 1.5px dashed var(--line); background: var(--bg-alt); border-radius: 12px; padding: 13px 15px; font-size: 14.5px; color: var(--ink); }

footer { background: var(--bg-alt); color: var(--ink-faint); font-size: 12.5px; padding: 22px 0 30px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 26px; border-top: 1px solid var(--line); padding-top: 18px; }
footer strong { color: var(--ink-soft); font-weight: 600; }
footer a { color: var(--ink-faint); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { text-decoration: none; }
footer nav a:hover { text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 80px);
  background: #1d1d1f; color: #f5f5f7; font-size: 15px;
  padding: 12px 22px; border-radius: 980px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease; z-index: 50;
  max-width: calc(100vw - 32px); text-align: center;
}
@media (prefers-color-scheme: dark) { .toast { background: #f5f5f7; color: #1d1d1f; } }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Save sheet ---------- */
.save-sheet {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.45); padding: 16px;
}
.save-sheet.on { display: flex; }
.save-card {
  background: var(--bg); color: var(--ink); border-radius: 20px;
  width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 22px; box-shadow: var(--shadow); text-align: center;
}
.save-card h3 { font-size: 21px; margin-bottom: 6px; }
.save-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.save-card img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 16px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; touch-action: auto; }
.save-actions { display: grid; gap: 9px; }
.save-actions .btn { justify-content: center; width: 100%; }
@media (min-width: 700px) { .save-sheet { align-items: center; } }

@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; }
  .rail { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 860px) {
  section.band, .band-black { padding: 60px 0; }
  .phone { width: min(56vw, 208px); }
  .hero { padding-top: 40px; }
  .site-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .toast { transition: none; }
}
