html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* まだ押せないボタン（体験版の準備中） */
.btn.soon, .btn.soon:hover, .btn.soon:active { background: #5f6f7c; cursor: default; transform: none; box-shadow: 0 6px 0 #05080a; }

/* 配置：墨色の大きな最初の画面（特大の見出し＋傾けた実物の画面＋ステッカー）→ 流れる黄色の帯 → 実物の画面つきの機能を左右交互 → 墨色の「決めるのはあなた」→ 空色のダウンロード。
   形はアプリと同じ：太い縁取りと、下にずらした影。 */
:root {
  --bg: #eef7fd;
  --paper: #ffffff;
  --edge: #161c21;      /* 縁取りと影 */
  --text: #18212a;
  --mut: #5f6f7c;
  --sky: #a9d4f0;
  --sky2: #d9eefb;
  --line: #d3e4f0;
  --blue: #2a7db8;
  --crimson: #d42a45;
  --yellow: #ffcf5c;
  --night: #161c21;     /* 墨色の面（両方のテーマで暗い） */
  --night2: #1f2830;
  --night-text: #e6eef4;
  --night-mut: #9fb3c2;
  --display: "M PLUS 1p", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --round: "Zen Maru Gothic", "M PLUS 1p", "Hiragino Maru Gothic ProN", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --num: "Outfit", "Zen Kaku Gothic New", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161b; --paper: #1b232a; --edge: #05080a; --text: #e3ecf2; --mut: #9fb0bd;
    --sky: #4f8fb9; --sky2: #1d3140; --line: #2c3b47; --blue: #7cc0ec; --crimson: #e8405a;
    --yellow: #ffcf5c;
    --night: #0a0e11; --night2: #151c22; --night-text: #e6eef4; --night-mut: #9fb3c2; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10161b; --paper: #1b232a; --edge: #05080a; --text: #e3ecf2; --mut: #9fb0bd;
  --sky: #4f8fb9; --sky2: #1d3140; --line: #2c3b47; --blue: #7cc0ec; --crimson: #e8405a;
  --yellow: #ffcf5c;
  --night: #0a0e11; --night2: #151c22; --night-text: #e6eef4; --night-mut: #9fb3c2; color-scheme: dark;
}
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.8; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--night); }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; word-break: auto-phrase; }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1120px; margin: 0 auto; }

/* 上の帯 */
header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--night); color: var(--night-text); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 10px; }
.brand { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: 0.03em; display: flex; align-items: center; gap: 10px; color: var(--night-text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
nav.top { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; align-items: center; }
nav.top a { color: #b6c7d3; text-decoration: none; font-size: 14px; font-weight: 500; padding: 4px 12px; border-radius: 999px; }
nav.top a[aria-current="page"] { background: #e6eef4; color: #161c21; font-weight: 700; }
nav.top a.get { background: var(--crimson); color: #fff; font-family: var(--round); font-weight: 900; box-shadow: 0 3px 0 #05080a; }

/* 最初の画面 */
.hero { background: var(--night); color: var(--night-text); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; padding-block: 64px 96px; position: relative; z-index: 1; }
.swirl { position: absolute; width: 900px; height: 900px; right: -260px; top: -220px; opacity: .5; animation: spin 60s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { font-family: var(--round); font-weight: 700; font-size: clamp(16px, 2vw, 20px); color: var(--sky); letter-spacing: 0.06em; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(38px, 5.4vw, 70px); line-height: 1.18; letter-spacing: -0.01em; color: #fff; margin-top: 10px; }
.hero h1 .hl { color: #161c21; background: var(--yellow); padding: 0 .14em; border-radius: .12em; display: inline-block; white-space: nowrap; transform: rotate(-2deg); box-shadow: 5px 5px 0 var(--crimson); margin-top: .08em; }
.hero .lead { margin-top: 26px; font-size: 17px; color: var(--night-mut); max-width: 30em; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.btn { font-family: var(--round); font-weight: 900; font-size: 19px; background: var(--crimson); color: #fff; border: 3px solid #05080a; border-radius: 14px; padding: 13px 26px; box-shadow: 0 6px 0 #05080a; cursor: pointer; text-decoration: none; display: inline-block; transition: transform .12s ease, box-shadow .12s ease; line-height: 1.4; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #05080a; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #05080a; }
.btn small { display: block; font-family: var(--body); font-weight: 500; font-size: 12px; opacity: .92; }
.ghost { color: var(--night-text); font-family: var(--round); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--sky); padding-bottom: 2px; }
.stage { position: relative; }
.win { background: #161c21; border: 3px solid #05080a; border-radius: 16px; overflow: hidden; box-shadow: 12px 12px 0 var(--sky); transform: rotate(2.2deg); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.stage:hover .win { transform: rotate(0deg) scale(1.02); }
.win-bar { display: flex; gap: 6px; padding: 9px 12px; background: #0b1014; }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4852; }
.win-bar i:first-child { background: var(--crimson); }
.win-bar i:nth-child(2) { background: var(--yellow); }
.win img { display: block; width: 100%; height: auto; }
.sticker { position: absolute; font-family: var(--round); font-weight: 900; font-size: clamp(13px, 1.5vw, 17px); padding: 8px 16px; border-radius: 999px; border: 3px solid #05080a; box-shadow: 0 4px 0 #05080a; white-space: nowrap; animation: pop .5s cubic-bezier(.34,1.56,.64,1) backwards; }
.sticker.s1 { background: var(--yellow); color: #161c21; left: -4%; top: 14%; transform: rotate(-8deg); animation-delay: .2s; }
.sticker.s2 { background: #a9d4f0; color: #161c21; right: -2%; bottom: 20%; transform: rotate(6deg); animation-delay: .35s; }
.sticker.s3 { background: var(--crimson); color: #fff; left: 12%; bottom: -5%; transform: rotate(-3deg); animation-delay: .5s; }
@keyframes pop { from { scale: 0.4; } }

/* 流れる帯 */
.band { background: #a9d4f0; color: #161c21; border-block: 3px solid #05080a; overflow: hidden; transform: rotate(-1.2deg) scale(1.03); margin-block: -22px 0; position: relative; z-index: 2; }
.track { display: flex; width: max-content; animation: slide 26s linear infinite; }
.track span { font-family: var(--display); font-weight: 900; font-size: clamp(20px, 3vw, 30px); padding: 8px 0; white-space: nowrap; }
.track span b { color: #1f5f8e; padding: 0 .6em; font-weight: 900; }
@keyframes slide { to { transform: translateX(-50%); } }

/* できること */
.feats { padding-block: 96px 40px; }
.sec-h { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.25; }
.sec-h em { font-style: normal; color: var(--blue); }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: center; margin-top: 72px; }
.feat.flip .shot { order: -1; }
.feat .kicker { font-family: var(--num); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #161c21; background: var(--chip, var(--yellow)); display: inline-block; padding: 2px 12px; border-radius: 999px; border: 2px solid #05080a; }
.feat h3 { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 3vw, 36px); line-height: 1.3; margin-top: 14px; }
.feat p { margin-top: 14px; font-size: 17px; max-width: 26em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { font-family: var(--round); font-weight: 700; font-size: 14px; background: var(--paper); border: 2px solid var(--edge); border-radius: 999px; padding: 2px 14px; }
.shot { margin: 0; min-width: 0; }
.crop { border: 3px solid var(--edge); border-radius: 18px; overflow: hidden; box-shadow: 10px 10px 0 var(--shadow, var(--sky)); background: var(--paper); aspect-ratio: var(--ar); transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease; }
.crop:hover { transform: translate(-4px, -4px); box-shadow: 14px 14px 0 var(--shadow, var(--sky)); }
.crop img { display: block; max-width: none; width: var(--w); margin-left: var(--x); margin-top: var(--y); }
.shot figcaption { font-size: 12px; color: var(--mut); margin-top: 16px; text-align: right; }
.rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation-play-state: paused; }
.rise.in { animation-play-state: running; }
@keyframes rise { from { transform: translateY(36px); } }

/* 決めるのはあなた */
.trust { background: var(--night); color: var(--night-text); margin-top: 96px; position: relative; overflow: hidden; }
.trust .wrap { padding-block: 88px; position: relative; z-index: 1; }
.trust .sec-h { color: #fff; }
.trust .sec-h em { color: var(--yellow); }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 44px; }
.pillar { background: var(--night2); border: 3px solid #05080a; border-radius: 18px; padding: 26px 24px; box-shadow: 0 6px 0 #05080a; display: grid; gap: 10px; align-content: start; min-width: 0; }
.pillar svg { width: 56px; height: 56px; }
.pillar h3 { font-family: var(--display); font-weight: 900; font-size: 22px; color: #fff; }
.pillar p { color: var(--night-mut); font-size: 15px; }
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 40px; font-family: var(--round); font-weight: 900; font-size: clamp(15px, 2vw, 19px); }
.flow span { padding: 6px 18px; border-radius: 999px; border: 3px solid #05080a; background: #a9d4f0; color: #161c21; box-shadow: 0 4px 0 #05080a; }
.flow span.you { background: var(--yellow); transform: rotate(-3deg) scale(1.08); }
.flow i { font-style: normal; color: var(--night-mut); }

/* ダウンロード */
.dl { padding-block: 96px; }
.dl-box { background: var(--sky); border: 3px solid var(--edge); border-radius: 28px; box-shadow: 12px 12px 0 var(--edge); padding: clamp(24px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; color: #161c21; }
.dl-box .sec-h { color: #161c21; }
.dl-main { display: grid; gap: 18px; justify-items: start; }
.dl-main img { width: 88px; height: 88px; border-radius: 22px; border: 3px solid #05080a; box-shadow: 0 5px 0 #05080a; }
.note { font-size: 13px; color: #24313b; }
.req { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.req li { background: #fff; color: #161c21; border: 3px solid #05080a; border-radius: 14px; padding: 12px 16px; display: grid; gap: 2px; font-size: 15px; line-height: 1.6; }
.req b { font-family: var(--round); font-weight: 900; }

/* 入れるときの青い画面の案内 */
.guard { margin-top: 56px; display: grid; gap: 14px; }
.guard h3 { font-family: var(--display); font-weight: 900; font-size: clamp(22px, 3vw, 30px); }
.guard > p { max-width: 44em; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 10px; }
.step { display: grid; gap: 12px; align-content: start; position: relative; min-width: 0; }
.step .no { position: absolute; left: -10px; top: -14px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: #161c21; border: 3px solid #05080a; display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: 20px; }
.ss { background: #0f5fa8; color: #fff; border: 3px solid var(--edge); border-radius: 12px; box-shadow: 8px 8px 0 var(--edge); padding: 26px 22px 18px; display: grid; gap: 10px; font-size: 13px; line-height: 1.6; min-height: 190px; align-content: start; }
.ss b { font-size: 17px; font-weight: 500; }
.ss u { justify-self: start; text-underline-offset: 3px; }
.ss-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 14px; }
.ss-btns i { font-style: normal; border: 2px solid #fff; padding: 2px 18px; }
.ss .hit { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 2px; animation: hit 1.6s ease-in-out infinite; }
@keyframes hit { 50% { outline-offset: 8px; } }
.step > p { font-size: 15px; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (prefers-reduced-motion: reduce) { .ss .hit { animation: none; } }

/* 文書のページ */
.docpage { padding-block: 56px 88px; }
.doc { display: grid; gap: 36px; max-width: 46em; }
.doc h1 { font-family: var(--display); font-weight: 900; font-size: clamp(32px, 5vw, 48px); line-height: 1.25; }
.doc h2 { font-family: var(--round); font-weight: 900; font-size: 22px; padding-left: 14px; border-left: 8px solid var(--sky); line-height: 1.4; }
.doc section { display: grid; gap: 12px; }
.doc ul { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.updated, .policy-en { font-size: 14px; color: var(--mut); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; background: var(--sky2); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.lic { display: grid; gap: 14px; }
.lic > div { background: var(--paper); border: 3px solid var(--edge); border-radius: 16px; box-shadow: 0 5px 0 var(--edge); padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.lic .name { font-family: var(--round); font-weight: 900; font-size: 17px; }
.lic .kind { font-family: var(--num); font-weight: 800; background: var(--yellow); color: #161c21; border: 2px solid #05080a; border-radius: 999px; padding: 0 12px; font-size: 14px; }
.lic .how { grid-column: 1 / -1; font-size: 14px; color: var(--mut); }

/* アプリ本体が使う部品の一覧（.doc の外に置き、幅を広く使う） */
#third-party { display: grid; margin-top: 36px; }
#third-party h2 { font-family: var(--round); font-weight: 900; font-size: 22px; padding-left: 14px; border-left: 8px solid var(--sky); line-height: 1.4; }
#third-party { gap: 14px; }
#third-party > p { max-width: 44em; }
details.tp { background: var(--paper); border: 3px solid var(--edge); border-radius: 14px; box-shadow: 0 4px 0 var(--edge); }
details.tp + details.tp { margin-top: 0; }
details.tp summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 18px; cursor: pointer; font-family: var(--round); font-weight: 900; font-size: 16px; list-style: none; }
details.tp summary::-webkit-details-marker { display: none; }
details.tp summary::before { content: "＋"; font-family: var(--num); color: var(--blue); margin-right: 4px; }
details.tp[open] summary::before { content: "－"; }
details.tp summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 10px; }
.tp-lic { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tp-count { font-family: var(--num); font-weight: 800; font-size: 14px; color: var(--mut); white-space: nowrap; }
.tp-list { margin: 0; padding: 4px 18px 16px; list-style: none; columns: 3 220px; column-gap: 28px; font-size: 14px; line-height: 1.7; }
.tp-list li { break-inside: avoid; overflow-wrap: anywhere; }
.tp-ver { font-family: var(--num); font-size: 12px; color: var(--mut); }

footer { background: var(--night); color: var(--night-mut); padding-block: 28px 44px; font-size: 14px; }
footer .wrap { display: grid; gap: 10px; }
footer a { color: #a9d4f0; margin-right: 16px; }

@media (max-width: 820px) {
  .hero .wrap, .feat, .dl-box { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-block: 44px 80px; gap: 48px; }
  .feat { gap: 24px; margin-top: 56px; }
  .feat.flip .shot { order: 0; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .sticker.s1 { left: 0; } .sticker.s2 { right: 0; }
  nav.top { margin-left: 0; }
  .crop { box-shadow: 6px 6px 0 var(--shadow, var(--sky)); }
  .win { box-shadow: 7px 7px 0 var(--sky); }
  .dl-box { box-shadow: 7px 7px 0 var(--edge); }
}
@media (prefers-reduced-motion: reduce) {
  .swirl, .track, .sticker, .rise { animation: none; }
  .btn, .win, .crop { transition: none; }
}
