/* Grid website. Layout: a 12-column page on a faint cell grid (the app's own grid), sections alternating text
   and the app's real screens; the story section pins a stage that assembles a collage as you scroll.
   Palette: the app's zinc neutrals and its selection blue (DesignSystem/Theme.swift, the app icon). */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #09090b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --tint: #f4f4f5;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #dbeafe;
  --bezel: #18181b;
  --bezel-edge: #3f3f46;
  --gridline: rgba(37, 99, 235, 0.075);
  /* A collage's own canvas stays white in both themes, as it does in the app. */
  --paper: #ffffff;
  --paper-ink: #09090b;
  --night: #121214;
  --shadow: 0 40px 80px -30px rgba(9, 9, 11, 0.35), 0 12px 24px -12px rgba(9, 9, 11, 0.18);

  --font-latin: "Schibsted Grotesk";
  --cjk-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans SC", "PingFang SC";
  --cjk-display: "Zen Kaku Gothic New", var(--cjk-body);
  --font-body: var(--font-latin), var(--cjk-body), system-ui, -apple-system, sans-serif;
  --font-display: var(--font-latin), var(--cjk-display), system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --radius: 12px;
  color-scheme: light;
}
:root:lang(zh-Hans) {
  --cjk-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei";
  --cjk-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB";
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #141417; --ink: #fafafa; --ink-2: #d4d4d8; --muted: #a1a1aa; --line: #27272a;
    --tint: #0f0f12; --accent: #3b82f6; --accent-ink: #ffffff; --accent-soft: rgba(59, 130, 246, 0.18);
    --bezel: #000000; --bezel-edge: #3f3f46; --gridline: rgba(96, 165, 250, 0.08);
    --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 12px 24px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #141417; --ink: #fafafa; --ink-2: #d4d4d8; --muted: #a1a1aa; --line: #27272a;
  --tint: #0f0f12; --accent: #3b82f6; --accent-ink: #ffffff; --accent-soft: rgba(59, 130, 246, 0.18);
  --bezel: #000000; --bezel-edge: #3f3f46; --gridline: rgba(96, 165, 250, 0.08);
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.8 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(en) body, body:lang(en) { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, dl, dd, figure, ol, ul { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

/* Type */
.eyebrow { font: 500 0.75rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.display {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 5.4vw, 4.75rem); line-height: 1.08;
}
:lang(en) .display { font-weight: 800; letter-spacing: -0.035em; }
/* CJK headlines: sized so the longest line ("グリッドで組む。", 8 characters) fits half the page. */
:lang(ja) .display, :lang(zh-Hans) .display { font-size: clamp(2.3rem, 4.5vw, 4.1rem); }
.title {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -0.01em;
  font-size: clamp(1.75rem, 3.6vw, 2.9rem); line-height: 1.15;
}
:lang(en) .title { font-weight: 800; letter-spacing: -0.025em; }
.display .l, .title .l { display: inline-block; }
/* Japanese wraps between phrases, not inside words, where the browser can (Chrome); others fall back. */
:lang(ja) :is(p, dd, dt, h1, h2, h3, figcaption, summary, td) { word-break: auto-phrase; }
.lede { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--ink-2); max-width: 34em; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.text-link:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.1rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-size: 0.9rem; }
.site-nav > a { color: var(--ink-2); text-decoration: none; }
.site-nav > a:hover { color: var(--ink); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 0.85rem;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu li a:hover { background: var(--tint); }
.lang-menu li a[aria-current="true"] { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .site-nav > a:not(:last-of-type) { display: none; }
  .lang-menu summary span { display: none; }
}

/* The cell grid behind the hero, fading out at the edges */
.grid-bg { position: relative; isolation: isolate; }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 65% 45%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 80% at 65% 45%, #000 40%, transparent 85%);
}

/* Devices (drawn frames, no product images) */
.device { position: relative; background: var(--bezel); box-shadow: var(--shadow), inset 0 0 0 1px var(--bezel-edge); }
.device img { width: 100%; }
.device.ipad { border-radius: 30px; padding: 12px; }
.device.ipad img { border-radius: 19px; }
.device.iphone { border-radius: 46px; padding: 9px; }
.device.iphone img { border-radius: 38px; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero-copy { grid-column: 1 / span 6; display: grid; gap: 22px; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.95rem;
}
.specs { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.01em; }
.hero-devices { grid-column: 7 / span 6; position: relative; padding-bottom: 8%; min-width: 0; }
.hero-devices .ipad { width: 88%; margin-left: auto; transform: rotate(1.2deg); }
.hero-devices .iphone { position: absolute; left: 0; bottom: 0; width: 30%; transform: rotate(-3deg); }
@media (max-width: 900px) {
  .hero-copy, .hero-devices { grid-column: 1 / -1; }
  .hero-devices { margin-top: 24px; max-width: 620px; justify-self: center; width: 100%; }
}

/* Section scaffolding */
section { padding-block: clamp(64px, 9vw, 128px); }
.section-head { display: grid; gap: 16px; align-content: start; min-width: 0; }
.tinted { background: var(--tint); }

/* Story: the stage is 1200 × 760 units (--u) and stays pinned while four steps scroll past. */
.story { padding-bottom: 0; }
.story .section-head { margin-bottom: clamp(24px, 4vw, 48px); max-width: 720px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.stage-holder { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; height: calc(100vh - var(--header-h) - 48px); display: grid; align-items: center; }
.stage { position: relative; width: 100%; aspect-ratio: 1200 / 760; container-type: inline-size; --u: calc(100cqw / 1200); }
.stage-canvas { position: absolute; inset: 0 0 auto 0; height: calc(500 / 760 * 100%); }
.stage-cells { position: absolute; inset: 0; background: var(--paper); border-radius: calc(var(--u) * 12); box-shadow: var(--shadow); transition: opacity 0.3s; }
.stage-cells i { position: absolute; border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); border-radius: calc(var(--u) * 5); background: color-mix(in srgb, var(--accent) 4%, transparent); }
.stage-seams span { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.stage-seams span:first-child { left: 33.333%; }
.stage-seams span:last-child { left: 66.666%; }
.stage-slides { position: absolute; inset: 0; pointer-events: none; }
/* While posting, the page runs past the stage's edges: it fades out there. */
.stage.is-posting .stage-slides { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.slide { position: absolute; overflow: hidden; background: var(--paper); border-radius: calc(var(--u) * 8); box-shadow: var(--shadow); }
.stage.is-posting .slide { border-radius: 0; box-shadow: none; }
.slide-inner { position: absolute; top: 0; height: 100%; --u: calc(100cqw / 1200 * var(--s, 1)); }
.piece { position: absolute; overflow: hidden; border-radius: calc(var(--u) * 6); }
.piece.is-text { overflow: visible; border-radius: 0; }
.piece img { width: 100%; height: 100%; object-fit: cover; }
.flight .piece { box-shadow: 0 calc(var(--u) * 10) calc(var(--u) * 24) -8px rgba(9, 9, 11, 0.35); }
.flight .piece.is-text { box-shadow: none; }
.flight { position: absolute; inset: 0; pointer-events: none; }
.stage-strip {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(150 / 760 * 100%);
  display: flex; align-items: center; gap: calc(var(--u) * 14); padding-inline: calc(var(--u) * 16);
  background: var(--surface); border-radius: calc(var(--u) * 14); border: 1px solid var(--line);
  transition: opacity 0.3s;
}
.strip-import {
  flex: none; width: calc(var(--u) * 104); height: calc(var(--u) * 104); border-radius: calc(var(--u) * 12);
  border: 1px dashed var(--muted); color: var(--muted); display: grid; place-items: center; align-content: center;
  font-size: calc(var(--u) * 34); line-height: 1;
}
.strip-import em { font-style: normal; font-size: calc(var(--u) * 15); margin-top: calc(var(--u) * 6); }
/* A slot stays empty until its photo arrives, one at a time, in the order picked. */
.slot {
  position: relative; flex: none; width: calc(var(--u) * 104); height: calc(var(--u) * 104); border-radius: calc(var(--u) * 12); overflow: hidden;
  opacity: 0; transform: translateY(calc(var(--u) * 18)) scale(0.88);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slot.is-in { opacity: 1; transform: none; }
.slot.is-in.is-placed { opacity: 0.45; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot b {
  position: absolute; right: calc(var(--u) * 6); bottom: calc(var(--u) * 6); width: calc(var(--u) * 26); height: calc(var(--u) * 26);
  border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font: 600 calc(var(--u) * 14)/1 var(--font-mono); box-shadow: 0 0 0 calc(var(--u) * 2) var(--paper);
  transform: scale(0); transition: transform 0.25s 0.2s;
}
.slot.is-in b { transform: scale(1); }
.stage-labels { position: absolute; left: 0; right: 0; top: calc(512 / 760 * 100%); height: calc(40 / 760 * 100%); }
.stage-labels span {
  position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; color: var(--muted);
  font: 400 calc(var(--u) * 16)/1.4 var(--font-mono); transition: opacity 0.25s;
}
.stage-labels b { color: var(--ink); font-weight: 600; margin-right: calc(var(--u) * 6); }
.stage-caption { display: grid; align-content: start; gap: calc(var(--u) * 3); padding: calc(var(--u) * 4) calc(var(--u) * 3); color: var(--paper-ink); }
.stage-caption b { font: 800 calc(var(--u) * 25)/1.2 var(--font-display); }
.stage-caption .date { font: 500 calc(var(--u) * 11)/1.4 var(--font-mono); letter-spacing: 0.08em; }
.stage-caption span:last-child { font-size: calc(var(--u) * 13); line-height: 1.5; }
/* Vertical text starts against the right edge of its frame, as in the app. */
.stage-vertical {
  writing-mode: vertical-rl; color: var(--paper-ink); font: 400 calc(var(--u) * 28)/1.25 "Zen Kaku Gothic New", var(--font-display);
  letter-spacing: 0.08em; padding: calc(var(--u) * 4) 0; height: 100%; width: fit-content; margin-left: auto;
}
:lang(en) .stage-vertical { font-family: var(--font-display); letter-spacing: 0.16em; font-size: calc(var(--u) * 19); }
.on-dark, .on-dark b { color: #fafafa; }

/* Phones: drawn frames, 440 units wide. The stage's sits over the page while posting; the social section has two. */
.stage-phone, .sns-phone { background: var(--bezel); border-radius: calc(var(--u) * 56); box-shadow: var(--shadow), inset 0 0 0 1px var(--bezel-edge); }
.stage-phone {
  position: absolute; left: calc(380 / 1200 * 100%); top: calc(14 / 760 * 100%); width: calc(440 / 1200 * 100%); height: calc(732 / 760 * 100%);
  visibility: hidden; opacity: 0; z-index: 3; pointer-events: none;
}
.phone-screen { position: absolute; inset: calc(var(--u) * 12); border-radius: calc(var(--u) * 44); background: var(--surface); overflow: hidden; }
.island { position: absolute; left: 50%; top: calc(var(--u) * 12); width: calc(var(--u) * 96); height: calc(var(--u) * 26); margin-left: calc(var(--u) * -48); border-radius: 999px; background: #000; z-index: 2; }
.post-avatar { position: absolute; left: calc(var(--u) * 16); top: calc(var(--u) * 44); width: calc(var(--u) * 26); height: calc(var(--u) * 26); border-radius: 50%; background: var(--accent); }
.phone-screen .bar { position: absolute; height: calc(var(--u) * 8); border-radius: 999px; background: var(--line); }
.post-name { left: calc(var(--u) * 52); top: calc(var(--u) * 47); width: calc(var(--u) * 110); }
.post-place { left: calc(var(--u) * 52); top: calc(var(--u) * 60); width: calc(var(--u) * 70); opacity: 0.7; }
.post-view { position: absolute; left: calc(var(--u) * 8); top: calc(var(--u) * 78); width: calc(var(--u) * 400); height: calc(var(--u) * 500); overflow: hidden; background: var(--paper); }
.post-page { position: absolute; top: 0; left: 0; width: 300%; height: 100%; }
.post-page .piece { border-radius: calc(var(--u) * 6); }
.post-actions { position: absolute; left: calc(var(--u) * 16); top: calc(var(--u) * 592); display: flex; gap: calc(var(--u) * 12); }
.post-actions i { width: calc(var(--u) * 20); height: calc(var(--u) * 20); border: calc(var(--u) * 2.5) solid var(--muted); border-radius: 50%; }
.post-dots { position: absolute; left: 0; right: 0; top: calc(var(--u) * 599); display: flex; justify-content: center; gap: calc(var(--u) * 6); }
.post-dots i { width: calc(var(--u) * 7); height: calc(var(--u) * 7); border-radius: 50%; background: var(--line); transition: background 0.2s; }
.post-dots i.is-on { background: var(--accent); }
.post-line1 { left: calc(var(--u) * 16); top: calc(var(--u) * 630); width: calc(var(--u) * 280); }
.post-line2 { left: calc(var(--u) * 16); top: calc(var(--u) * 648); width: calc(var(--u) * 190); }
/* The seam, marked while it passes through the window: the photo carries on into the next image. */
.seam-mark {
  position: absolute; width: calc(var(--u) * 3); transform: translateX(-50%); opacity: 0; z-index: 2;
  background: repeating-linear-gradient(to bottom, #fff 0 calc(var(--u) * 9), transparent 0 calc(var(--u) * 16));
  filter: drop-shadow(0 0 calc(var(--u) * 5) var(--accent)) drop-shadow(0 0 calc(var(--u) * 2) var(--accent));
}
.seam-label {
  position: absolute; left: 50%; top: calc(var(--u) * 300); transform: translateX(-50%); opacity: 0; z-index: 4; white-space: nowrap;
  padding: calc(var(--u) * 7) calc(var(--u) * 14); border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 600 calc(var(--u) * 16)/1.2 var(--font-body); box-shadow: 0 calc(var(--u) * 6) calc(var(--u) * 16) rgba(9, 9, 11, 0.3);
}
.seam-label::before { content: "⟷"; margin-right: calc(var(--u) * 6); }

.steps { list-style: none; padding: 0; display: grid; padding-top: calc(50vh - 56px); }
.step { min-height: 80vh; display: grid; align-content: center; padding-block: 24px; }
.step-body { display: grid; gap: 10px; }
/* Posting takes longer to scroll through (two swipes); its text stays in view meanwhile. */
.step:last-child { min-height: 170vh; align-content: start; }
.step:last-child .step-body { position: sticky; top: calc(var(--header-h) + 34vh); }
.step-no { font-size: 0.8rem; color: var(--muted); transition: color 0.2s; }
.step h3 { font: 900 clamp(1.6rem, 2.8vw, 2.3rem)/1.2 var(--font-display); color: var(--muted); transition: color 0.2s; }
:lang(en) .step h3 { font-weight: 800; }
.step p { color: var(--muted); max-width: 26em; transition: color 0.2s; }
.step.is-active .step-no { color: var(--accent); }
.step.is-active h3 { color: var(--ink); }
.step.is-active p { color: var(--ink-2); }
@media (max-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .stage-holder { height: auto; top: calc(var(--header-h) + 8px); z-index: 2; padding-block: 8px; background: var(--bg); }
  /* The pinned stage covers the top of the screen; each step's text passes through the part below it. */
  .steps { padding-top: 22vh; }
  .step { min-height: 70vh; }
  .step:last-child { min-height: 160vh; }
  .step:last-child .step-body { top: calc(var(--header-h) + 64vw + 40px); }
}

/* On social: a story and a carousel post, each in a phone. */
.social-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.social-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 3vw, 36px); align-items: center; }
.sns-phone { position: relative; width: 100%; max-width: 280px; justify-self: center; aspect-ratio: 440 / 800; container-type: inline-size; --u: calc(100cqw / 440); }
.story-view { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 9 / 16; overflow: hidden; background: var(--night); }
.story-page { position: absolute; inset: 0; background: var(--night); opacity: 0; transition: opacity 0.15s; }
.story-page.is-on { opacity: 1; }
.story-page .piece { border-radius: calc(var(--u) * 5); }
.story-bars { position: absolute; left: calc(var(--u) * 10); right: calc(var(--u) * 10); top: calc(var(--u) * 44); display: flex; gap: calc(var(--u) * 5); z-index: 2; }
.story-bars i { flex: 1; height: calc(var(--u) * 4); border-radius: 999px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.story-bars i::after { content: ""; display: block; height: 100%; width: 0; background: #fff; }
.story-bars i.is-now::after { width: calc(var(--fill, 0) * 100%); }
.story-bars i.is-done::after { width: 100%; }
.story-head { position: absolute; left: calc(var(--u) * 12); top: calc(var(--u) * 58); display: flex; align-items: center; gap: calc(var(--u) * 8); z-index: 2; }
.story-head .post-avatar { position: static; width: calc(var(--u) * 24); height: calc(var(--u) * 24); box-shadow: 0 0 0 calc(var(--u) * 2) #fff; }
.story-head .bar { position: static; width: calc(var(--u) * 80); background: rgba(255, 255, 255, 0.6); }
/* A tap on the right advances the story. */
.tap-hint { position: absolute; right: 12%; top: 46%; width: calc(var(--u) * 54); height: calc(var(--u) * 54); border-radius: 50%; background: rgba(255, 255, 255, 0.35); box-shadow: 0 0 0 calc(var(--u) * 2) rgba(255, 255, 255, 0.6); opacity: 0; z-index: 2; }
.story-reply { position: absolute; left: calc(var(--u) * 16); right: calc(var(--u) * 16); bottom: calc(var(--u) * 22); height: calc(var(--u) * 38); border-radius: 999px; border: calc(var(--u) * 2) solid rgba(255, 255, 255, 0.55); z-index: 2; }
.post-phone .seam-label { top: calc(var(--u) * 320); }
/* The next post in the feed, just starting. */
.post-next { position: absolute; left: calc(var(--u) * 16); top: calc(var(--u) * 690); display: flex; align-items: center; gap: calc(var(--u) * 10); }
.post-next .post-avatar { position: static; }
.post-next .bar { position: static; width: calc(var(--u) * 110); }
.social-copy { display: grid; gap: 8px; }
.social-copy h3 { font: 800 1.35rem/1.3 var(--font-display); }
.social-copy .spec { font-size: 0.8rem; color: var(--accent); }
.social-copy p:last-child { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 1100px) { .social-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; } }
@media (max-width: 560px) { .social-card { grid-template-columns: minmax(0, 1fr); } .sns-phone { max-width: 250px; } }

/* Features */
.feature-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.feature-grid.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.points { display: grid; gap: 18px; margin-top: 12px; }
.points.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.points > div { display: grid; gap: 2px; padding-left: 16px; border-left: 2px solid var(--line); }
.points dt { font-weight: 700; color: var(--ink); }
.points dd { color: var(--ink-2); font-size: 0.95rem; }
.shots { display: grid; gap: 24px; min-width: 0; }
.shots-import { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.picker-shot { grid-column: 1 / -1; }
.drag-shot { grid-column: 3 / -1; margin-top: -18%; position: relative; }
.closeup { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.closeup figcaption { padding: 12px 16px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line); }
.closeups { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-top: clamp(40px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) {
  .feature-grid, .feature-grid.flip { grid-template-columns: minmax(0, 1fr); }
  .closeups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .closeups .closeup:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .drag-shot { grid-column: 1 / -1; margin-top: 0; }
  .points.two { grid-template-columns: minmax(0, 1fr); }
  .closeups { grid-template-columns: minmax(0, 1fr); }
}

/* Demo */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 2.4vw, 24px); display: grid; gap: 16px; box-shadow: var(--shadow); min-width: 0; }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.demo-head h3 { font: 800 1.1rem/1.3 var(--font-display); }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 0.85rem; }
.stepper-label { padding: 0 10px; color: var(--ink-2); }
.stepper button, .reset {
  appearance: none; border: 0; background: var(--tint); color: var(--ink); width: 34px; height: 34px; font: 600 1rem/1 var(--font-body); cursor: pointer;
}
.stepper button:hover, .reset:hover { background: var(--accent-soft); }
.stepper button:disabled { color: var(--muted); cursor: default; background: var(--tint); }
.stepper output { min-width: 30px; text-align: center; font-weight: 500; }
.reset { width: auto; padding: 0 14px; border-radius: 10px; font-size: 0.85rem; border: 1px solid var(--line); background: transparent; }
.demo-canvas {
  position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; margin-inline: auto; touch-action: none;
  background: var(--paper); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none;
}
.demo-cells i { position: absolute; border-radius: 6px; background: color-mix(in srgb, var(--accent) 6%, transparent); outline: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: -1px; }
.tile { position: absolute; border-radius: 8px; overflow: visible; cursor: grab; transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease; }
.tile img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; pointer-events: none; }
.tile.is-dragging { transition: none; cursor: grabbing; z-index: 5; filter: drop-shadow(0 14px 22px rgba(9, 9, 11, 0.35)); }
.tile.is-selected::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--accent); border-radius: 10px; pointer-events: none; }
.tile:focus-visible { outline-offset: 4px; }
.handle {
  position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--accent); cursor: nwse-resize; display: none; z-index: 2;
}
.handle::before { content: ""; position: absolute; inset: -10px; }
.tile.is-selected .handle { display: block; }
.demo-ghost { position: absolute; border: 2px dashed var(--accent); border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); pointer-events: none; z-index: 4; transition: left 0.08s, top 0.08s, width 0.08s, height 0.08s; }
.demo-readout { min-height: 1.6em; text-align: center; font-size: 0.85rem; color: var(--accent); }
.demo-hint { font-size: 0.85rem; color: var(--muted); }

/* Export table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sizes { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 0.88rem; }
.sizes caption { text-align: left; padding: 14px 16px 6px; font-weight: 700; }
.sizes th, .sizes td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
.sizes td:last-child { white-space: normal; min-width: 7em; }
.sizes thead th { font-weight: 500; color: var(--muted); font-size: 0.78rem; border-top: 0; }
.sizes tbody th { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.ratio { display: inline-block; height: 18px; aspect-ratio: var(--w) / var(--h); max-width: 32px; border: 1.5px solid var(--ink-2); border-radius: 3px; }
.export-shot { max-width: 560px; }

/* Everywhere */
.ev-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 460px; justify-self: center; width: 100%; }
.phones .iphone:last-child { transform: translateY(12%); }
@media (max-width: 900px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } .phones { margin-bottom: 40px; } }

/* Privacy band */
.privacy-band { background: var(--ink); color: var(--bg); }
.privacy-band .lede { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.privacy-band .eyebrow, .privacy-band .text-link { color: color-mix(in srgb, var(--accent) 70%, var(--bg)); }
.privacy-inner { display: grid; gap: 18px; justify-items: start; max-width: 860px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-weight: 600; }
.footer-brand img { border-radius: 9px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { color: var(--ink-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.copy { color: var(--muted); font-size: 0.8rem; }

/* Support and privacy pages */
.doc { padding-block: clamp(40px, 7vw, 88px); }
.doc-wrap { max-width: 760px; display: grid; gap: 18px; }
.doc-wrap section { display: grid; gap: 8px; }
.doc-h2 { font: 800 1.25rem/1.4 var(--font-display); margin-top: 24px; }
.doc .meta { color: var(--muted); font-size: 0.85rem; }
.doc p { color: var(--ink-2); max-width: 40em; }
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 4px; top: 16px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 1.05rem; }
.contact.missing { padding: 12px 16px; border: 1px dashed var(--accent); border-radius: 10px; color: var(--accent); font-size: 0.95rem; }
.copy-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 12px; font: 500 0.85rem/1 var(--font-body); cursor: pointer; }

/* How-to page: annotated screens. A numbered dot on the screen matches a numbered line beside it. */
.guide { padding-block: clamp(40px, 7vw, 88px) 0; }
.guide-head { display: grid; gap: 16px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.guide-toc a {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem;
  color: var(--ink-2); text-decoration: none; background: var(--surface);
}
.guide-toc a:hover { border-color: var(--accent); color: var(--accent); }
.guide-basics { padding-block: clamp(32px, 5vw, 64px); }
.guide-basics-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.guide-basics .doc-h2 { margin: 0 0 12px; }
.gestures { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gestures th, .gestures td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.gestures thead th { border-top: 0; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.gestures tbody th { font-weight: 700; white-space: nowrap; }
.note { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.shortcuts { display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.shortcuts > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shortcuts dd { color: var(--ink-2); }
kbd { font: 500 0.82rem/1.6 var(--font-mono); color: var(--ink); white-space: nowrap; }
.guide-section { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.guide-grid.tall { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); }
.guide-grid.tall .annotated { max-width: 300px; justify-self: center; width: 100%; }
.guide-grid.wide .annotated { max-width: 560px; }
.annotated {
  /* As large as fits beside the list, but never taller than the window (it stays in view while the list scrolls). */
  margin: 0 auto; width: min(100%, calc((100vh - var(--header-h) - 48px) * var(--r, 0.75))); max-width: 100%;
  position: sticky; top: calc(var(--header-h) + 24px);
  border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.annotated img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.dot {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font: 600 0.75rem/1 var(--font-mono); text-decoration: none; box-shadow: 0 0 0 2px var(--paper), 0 4px 10px rgba(9, 9, 11, 0.3);
  transition: transform 0.15s;
}
.dot:hover, .dot.is-on { transform: scale(1.25); }
.guide-copy { display: grid; gap: 14px; min-width: 0; }
.callouts { list-style: none; padding: 0; display: grid; gap: 4px; counter-reset: c; margin-top: 8px; }
.callouts li {
  counter-increment: c; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; row-gap: 2px;
  padding: 10px 12px; border-radius: 12px; transition: background 0.15s; scroll-margin-top: calc(var(--header-h) + 24px);
}
.callouts li::before {
  content: counter(c); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 600 0.75rem/1 var(--font-mono);
}
.callouts b { font-weight: 700; }
.callouts span { color: var(--ink-2); font-size: 0.92rem; grid-column: 2; }
.callouts li.is-on, .callouts li:target { background: var(--accent-soft); }
@media (max-width: 860px) {
  .guide-basics-grid, .guide-grid, .guide-grid.tall { grid-template-columns: minmax(0, 1fr); }
  .annotated { position: relative; top: 0; width: 100%; }
  .guide-grid.tall .annotated { max-width: 260px; }
}
@media (max-width: 560px) {
  .dot { width: 20px; height: 20px; margin: -10px 0 0 -10px; font-size: 0.65rem; }
  .shortcuts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
