:root {
  --canvas: #fff4f3;
  --raised: #ffffff;
  --accent: #fb2a29;
  --accent-deep: #d91c1b;
  --action: #e01f1e;
  --action-deep: #c8191a;
  --paper: #ffffff;
  --ink: #1c1c22;
  --ink-soft: #5e5e68;
  --tint: #f3f3f6;
  --rule: #ececf0;
  --on-canvas: #1c1c22;
  --on-canvas-soft: #5e5e68;
  --on-canvas-line: #f6d3d1;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Noto Sans', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Noto Sans', system-ui, sans-serif;
  --radius: 20px;
  --wrap: 1140px;
}
/*
 * Theme "paper" — white paper under a scanner. One strong red (buttons, accents), a cyan scan
 * beam that sweeps the hero screenshot, soft rounded cards, the system font.
 * Same markup as every theme (src/render/sections.ts); tokens from theme.json + project.json.
 * The hero `.ap-phone` shows a store screenshot as it is: no bezel, no island (the screenshot
 * already has its own phone).
 */

:root {
    --gutter: clamp(16px, 4vw, 40px);
    --beam: #19e3f0;
    --shadow: 0 1px 2px rgba(28, 28, 34, .05), 0 10px 30px rgba(28, 28, 34, .07);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.ap { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.ap img { max-width: 100%; height: auto; }
.ap a { color: var(--accent-deep); }
.ap a:hover { color: var(--action-deep); }
.ap :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ap-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ap-skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; background: var(--ink); color: #fff !important; padding: 10px 16px; border-radius: 8px; }
.ap-skip:focus { top: 8px; }

.ap-h2 { font: 800 clamp(28px, 3.6vw, 44px)/1.12 var(--display); letter-spacing: -0.02em; margin: 0 0 14px; max-width: 24ch; }
.ap-lead { font-size: 18px; color: var(--ink-soft); max-width: 60ch; margin: 0 0 28px; }

/* Buttons: white on --action (4.8:1), bold. */
.ap-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 700 15px/1.1 var(--body); text-align: center;
    color: #fff !important; text-decoration: none;
    background: var(--action); border-radius: 999px; padding: 12px 22px;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--action) 30%, transparent);
    transition: background .15s, transform .15s;
}
.ap-btn:hover { background: var(--action-deep); transform: translateY(-1px); }
.ap-btn--accent { background: var(--action); }
@media (prefers-reduced-motion: reduce) { .ap-btn { transition: none; } .ap-btn:hover { transform: none; } }

/* Header */
.ap-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.ap-top__in { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.ap-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink) !important; text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: -0.02em; }
.ap-brand img { border-radius: 9px; }
.ap-nav { display: flex; gap: 24px; }
.ap-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.ap-nav a:hover, .ap-nav a[aria-current="page"] { color: var(--ink); }
.ap-top__end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }

/* Hero: blush paper with a soft red glow; the screenshot with a scan beam. */
.ap-hero {
    position: relative; overflow: hidden; padding: clamp(40px, 6vw, 84px) 0 clamp(48px, 6vw, 88px);
    background:
        radial-gradient(60% 70% at 85% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
        radial-gradient(40% 50% at 10% 100%, color-mix(in srgb, #ff6e69 12%, transparent), transparent 70%),
        linear-gradient(180deg, var(--canvas), var(--paper));
}
.ap-hero__in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.ap-hero__in--solo { grid-template-columns: minmax(0, 1fr); text-align: center; }
.ap-hero__badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-weight: 700; font-size: 14px; color: var(--accent-deep); background: var(--paper); border: 1px solid var(--on-canvas-line); padding: 6px 14px; border-radius: 999px; }
.ap-hero__badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--beam); box-shadow: 0 0 0 3px color-mix(in srgb, var(--beam) 25%, transparent); }
.ap-hero__title { font: 800 clamp(38px, 5.4vw, 66px)/1.04 var(--display); letter-spacing: -0.028em; margin: 0 0 20px; overflow-wrap: break-word; hyphens: auto; color: var(--on-canvas); }
.ap-hero__title em { display: block; font-style: normal; color: var(--accent); }
.ap-hero__sub { font-size: 19px; color: var(--on-canvas-soft); margin: 0 0 28px; max-width: 50ch; }
.ap-hero__chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-hero__chips li { font-weight: 600; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; box-shadow: 0 1px 2px rgba(28, 28, 34, .04); }

.ap-stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ap-stores a { display: block; height: 54px; }
.ap-stores img { display: block; height: 100%; width: auto; }
.ap-stores--center { justify-content: center; }

.ap-phone { position: relative; justify-self: center; width: min(320px, 78vw); padding: 0; background: none; transform: rotate(2deg); }
.ap-phone::before { content: ''; position: absolute; inset: 6% -8% -4%; z-index: 0; border-radius: 40px; background: linear-gradient(135deg, var(--accent), #ff6e69); transform: rotate(-6deg); opacity: .9; }
.ap-phone__screen { position: relative; z-index: 1; border-radius: 28px; overflow: hidden; background: var(--paper); box-shadow: 0 30px 60px rgba(120, 10, 10, .25); }
.ap-phone__screen img { display: block; width: 100%; height: auto; }
.ap-phone__island { display: none; }
/* The scan beam: a thin cyan line with a glow, sweeping down the page. */
.ap-phone__screen::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
    background: var(--beam);
    box-shadow: 0 0 12px 3px color-mix(in srgb, var(--beam) 70%, transparent), 0 0 40px 10px color-mix(in srgb, var(--beam) 25%, transparent);
    animation: ap-scan 3.6s ease-in-out infinite alternate;
}
@keyframes ap-scan { from { top: 4%; } to { top: 96%; } }
@media (prefers-reduced-motion: reduce) { .ap-phone__screen::after { animation: none; top: 38%; } }

.ap-section { padding: clamp(56px, 7vw, 104px) 0; }

/* Screenshots: the store screenshots in a strip. */
.ap-shots { background: var(--tint); }
.ap-shots__strip { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 24px; scrollbar-width: thin; }
.ap-shots__item { flex: 0 0 auto; margin: 0; scroll-snap-align: start; width: clamp(200px, 22vw, 250px); }
.ap-shots__item img { display: block; width: 100%; border-radius: 22px; box-shadow: var(--shadow); }

/* Points: numbered steps. */
.ap-points__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.ap-points__list { display: grid; gap: 14px; counter-reset: ap-step; }
.ap-points__item { position: relative; padding: 20px 22px 20px 74px; background: var(--raised); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); counter-increment: ap-step; }
.ap-points__item::before { content: counter(ap-step); position: absolute; inset-inline-start: 22px; top: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--canvas); color: var(--accent-deep); font: 800 17px/1 var(--display); }
[dir="rtl"] .ap-points__item { padding: 20px 74px 20px 22px; }
.ap-points__item h3 { font: 700 20px/1.3 var(--display); margin: 0 0 6px; }
.ap-points__item p { margin: 0; color: var(--ink-soft); }

/* Features: white cards with a tinted icon tile. */
.ap-features { background: var(--paper); }
.ap-features__list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.ap-feature { background: var(--raised); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.ap-feature:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(28, 28, 34, .05), 0 16px 40px rgba(28, 28, 34, .1); }
@media (prefers-reduced-motion: reduce) { .ap-feature { transition: none; } .ap-feature:hover { transform: none; } }
.ap-feature__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: var(--tint); font-size: 23px; line-height: 1; }
.ap-feature--accent .ap-feature__icon { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--on-canvas-line); }
.ap-feature h3 { font: 700 19px/1.3 var(--display); margin: 0 0 6px; }
.ap-feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* Band: a blush card with a hairline. */
.ap-band__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--radius) + 8px); background: var(--canvas); border: 1px solid var(--on-canvas-line); }
.ap-band .ap-lead { margin: 0; }

/* FAQ */
.ap-faq { background: var(--tint); }
.ap-faq__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.ap-faq__list { display: grid; gap: 10px; }
.ap-faq__item { background: var(--raised); border: 1px solid var(--rule); border-radius: 16px; padding: 0 20px; }
.ap-faq__item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font: 600 18px/1.4 var(--body); }
.ap-faq__item summary::-webkit-details-marker { display: none; }
.ap-faq__item summary::after { content: '+'; flex: none; font: 500 24px/0.9 var(--display); color: var(--accent-deep); }
.ap-faq__item[open] summary::after { content: '–'; }
.ap-faq__item p { margin: 0 0 20px; color: var(--ink-soft); max-width: 68ch; }

/* Download: a red gradient card. White text only for the large title (white on red is 3.9:1); the lead sits on a white pill. */
.ap-download { padding: clamp(56px, 7vw, 96px) 0; }
.ap-download__in {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: clamp(36px, 6vw, 64px) var(--gutter); border-radius: calc(var(--radius) + 12px);
    background: radial-gradient(80% 120% at 50% 0%, #ff6e69, var(--action) 70%);
    color: #fff; position: relative; overflow: hidden;
}
.ap-download__icon { position: relative; z-index: 1; border-radius: 22px; margin-bottom: 20px; box-shadow: 0 14px 34px rgba(80, 0, 0, .35); }
.ap-download .ap-h2 { position: relative; z-index: 1; margin-inline: auto; color: #fff; font-size: clamp(30px, 4vw, 48px); }
.ap-download .ap-lead { position: relative; z-index: 1; margin: 0 auto 26px; color: var(--ink); background: var(--paper); border-radius: 14px; padding: 10px 18px; font-size: 17px; }
.ap-download .ap-stores { position: relative; z-index: 1; }

/* Inner pages */
.ap-page { background: linear-gradient(180deg, var(--canvas), var(--paper)); padding: clamp(44px, 6vw, 84px) 0 clamp(28px, 4vw, 48px); }
.ap-page__title { font: 800 clamp(34px, 4.6vw, 56px)/1.08 var(--display); letter-spacing: -0.035em; margin: 0 0 14px; overflow-wrap: break-word; }
.ap-page__lead { font-size: 19px; color: var(--ink-soft); max-width: 58ch; margin: 0; }
.ap-page__action { margin: 26px 0 0; }
.ap-prose { max-width: calc(72ch + 2 * var(--gutter)); }
.ap-prose h2 { font: 700 26px/1.3 var(--display); letter-spacing: -0.015em; margin: 40px 0 10px; }
.ap-prose h3 { font: 700 20px/1.3 var(--display); margin: 28px 0 8px; }
.ap-prose p { margin: 0 0 16px; }
.ap-prose ul, .ap-prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.ap-prose li { margin: 0 0 10px; }
.ap-prose li::marker { color: var(--accent-deep); }
.ap-note { font-size: 15px; color: var(--ink); background: var(--canvas); border-inline-start: 3px solid var(--accent); border-radius: 12px; padding: 12px 16px; }
.ap-note--legal { margin-bottom: 28px; }

/* Footer + language switcher */
.ap-foot { border-top: 1px solid var(--rule); color: var(--ink-soft); padding: 28px 0 36px; font-size: 14px; }
.ap-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.ap-foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.ap-foot a { color: var(--ink); text-decoration: none; }
.ap-foot a:hover { text-decoration: underline; }
.ap-langs { position: relative; }
.ap-langs summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; background: var(--paper); }
.ap-langs summary::-webkit-details-marker { display: none; }
.ap-langs ul { position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0; z-index: 30; list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px; background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 18px 40px rgba(28, 28, 34, .14); max-height: 70vh; overflow: auto; }
.ap-langs li a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink) !important; text-decoration: none; }
.ap-langs li a:hover, .ap-langs li a[aria-current] { background: var(--canvas); }
.ap-langs--top summary { padding: 7px 14px; font-size: 14px; white-space: nowrap; }
.ap-langs--top ul { bottom: auto; top: calc(100% + 10px); }
.ap-langs__code { display: none; }
@media (min-width: 561px) { .ap-langs--top ul { grid-template-columns: repeat(3, minmax(130px, 1fr)); max-height: none; } }

@media (max-width: 980px) {
    .ap-nav { display: none; }
    .ap-hero__in, .ap-points__in, .ap-faq__in { grid-template-columns: 1fr; }
    .ap-phone { width: min(280px, 74vw); }
}
@media (max-width: 560px) {
    body.ap { font-size: 16px; }
    .ap-top__in { gap: 12px; }
    .ap-top__end { gap: 8px; }
    .ap-btn { padding: 10px 16px; font-size: 14px; }
    .ap-stores a { height: 48px; }
    .ap-langs__name { display: none; }
    .ap-langs__code { display: inline; }
    .ap-langs ul { grid-template-columns: minmax(140px, 1fr); inset-inline-end: auto; inset-inline-start: 0; }
    .ap-langs--top ul { inset-inline-start: auto; inset-inline-end: 0; grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .ap-points__item { padding: 18px 18px 18px 64px; }
    .ap-points__item::before { inset-inline-start: 16px; top: 18px; }
    [dir="rtl"] .ap-points__item { padding: 18px 64px 18px 18px; }
}

/* Headings wrap in balanced lines (CJK titles would otherwise leave one character alone). */
.ap-hero__title, .ap-h2, .ap-page__title { text-wrap: balance; }
:lang(ko) .ap-hero__title, :lang(ko) .ap-h2 { word-break: keep-all; }
