/* AI×副業 完全攻略パック — 見た目（特典ごとの手順書）
   地は紙、字は墨。色は「選んだ特典の色」1つだけが画面に出る（--c）。グラデーション・光・紙吹雪は使わない。 */
:root {
  --paper: #FAF8F4; --card: #FFFFFF; --soft: #F2EEE7; --rule: #E6E0D6;
  --ink: #1B1A17; --ink2: #57534C; --ink3: #8A857C;
  --warn-bg: #FFF4E5; --warn: #8A4B00;
  --c: #E0553A;
  --radius: 14px;
  --font: 'Zen Kaku Gothic New', system-ui, sans-serif;
  --round: 'Zen Maru Gothic', 'Zen Kaku Gothic New', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311; --card: #1D1C1A; --soft: #262421; --rule: #33302B;
    --ink: #F3F0EA; --ink2: #BDB7AC; --ink3: #8F897F;
    --warn-bg: #3A2A12; --warn: #F2C27A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141311; --card: #1D1C1A; --soft: #262421; --rule: #33302B;
  --ink: #F3F0EA; --ink2: #BDB7AC; --ink3: #8F897F;
  --warn-bg: #3A2A12; --warn: #F2C27A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
b { font-weight: 700; }
.sp { display: none; }
@media (max-width: 599px) { .sp { display: inline; } .pc { display: none; } }

/* 上の帯 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--rule); backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--round); font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); object-fit: cover; }
.brand small { font-family: var(--font); font-weight: 500; font-size: 12px; color: var(--ink3); margin-left: 6px; }
.top__r { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .off { display: none; }
.icon-btn[aria-pressed="false"] .on { display: none; }
.icon-btn[aria-pressed="false"] .off { display: inline; }
.line-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 700; font-size: 14px; }

/* 共通の見出し */
section { padding: 56px 16px; scroll-margin-top: 60px; }
.sec-h { max-width: 1080px; margin: 0 auto 24px; }
.sec-h__k { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--ink3); letter-spacing: .08em; }
.sec-h h2 { margin: 0; font-family: var(--round); font-weight: 900; font-size: clamp(24px, 4.2vw, 34px); line-height: 1.35; letter-spacing: .01em; }

/* 表紙 */
.hero { max-width: 1080px; margin: 0 auto; padding-top: 48px; text-align: center; }
.hero__badge { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 6px 16px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-family: var(--round); font-weight: 900; font-size: 15px; letter-spacing: .06em; }
.hero__badge span { opacity: .7; }
.hero__title { margin: 0; font-family: var(--round); font-weight: 900; font-size: clamp(40px, 9vw, 78px); line-height: 1.12; letter-spacing: .01em; }
.hero__ai { display: inline-block; padding: 0 .14em; margin-right: .06em; border-radius: .16em; background: var(--ink); color: var(--paper); }
.hero__lead { margin: 18px auto 0; max-width: 34em; color: var(--ink2); font-size: clamp(15px, 2.2vw, 18px); }
.hero__lead b { color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 28px auto 0; }
.stats.-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }
.stat { position: relative; padding: 14px 8px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--rule); }
.stat__n { display: block; font-family: var(--round); font-weight: 900; font-size: clamp(26px, 5vw, 36px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__n i { font-style: normal; font-size: .5em; color: var(--ink3); margin-left: 2px; }
.stat__l { display: block; margin-top: 4px; font-size: 12px; color: var(--ink2); line-height: 1.4; }
.stat.-pop .stat__n b { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); display: inline-block; }
.stat__plus { position: absolute; top: 6px; right: 12px; font-family: var(--round); font-weight: 900; color: var(--c); opacity: 0; pointer-events: none; }
.stat__plus.-go { animation: floatup .8s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes floatup { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }

.who { max-width: 640px; margin: 28px auto 0; padding: 18px 20px; border-radius: var(--radius); background: var(--soft); text-align: left; }
.who__h { margin: 0 0 8px; font-weight: 700; font-size: 14px; color: var(--ink2); }
.who__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: w; }
.who__list li { counter-increment: w; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); font-size: 15px; }
.who__list li::before { content: counter(w); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--round); font-weight: 900; font-size: 12px; }
.who__a { margin: 10px 0 0; font-size: 15px; }

/* 特典を選ぶ */
.gift-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 899px) { .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .gift-grid { grid-template-columns: minmax(0, 1fr); } }
.gift { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 168px; padding: 16px 16px 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--rule); text-align: left; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .18s ease, border-color .18s ease; }
.gift:hover { transform: translateY(-2px); border-color: var(--gc); }
.gift:focus-visible, .btn:focus-visible, .copy:focus-visible, .toc a:focus-visible, .icon-btn:focus-visible, .todo button:focus-visible { outline: 3px solid var(--gc, var(--c)); outline-offset: 2px; }
.gift.-on { border: 2px solid var(--gc); padding: 15px 15px 13px; }
.gift__no { display: flex; align-items: center; gap: 8px; font-family: var(--round); font-weight: 900; font-size: 13px; color: var(--gc); letter-spacing: .04em; }
.gift__no::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--gc); }
.gift__name { font-family: var(--round); font-weight: 900; font-size: 19px; line-height: 1.4; }
.gift__name .x { color: var(--ink3); font-weight: 500; margin: 0 .2em; }
.gift__name .ai { display: inline-block; padding: 0 .2em; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: .9em; }
.gift__hook { font-size: 13px; color: var(--ink2); line-height: 1.6; }
.gift__prog { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.gift__dots { display: flex; gap: 4px; }
.gift__dots i { width: 18px; height: 6px; border-radius: 3px; background: var(--rule); }
.gift__dots i.-on { background: var(--gc); }
.gift__cnt { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.gift__clear { position: absolute; top: 12px; right: 12px; padding: 2px 10px; border-radius: 999px; background: var(--gc); color: #fff; font-family: var(--round); font-weight: 900; font-size: 12px; }
.gift.-muse { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gift.-muse .gift__hook { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.gift.-muse .gift__no { color: var(--paper); }
.gift.-muse .gift__no::before { background: #E8553B; }
.gift.-muse .gift__go { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 14px; }

/* 選んだ特典の手順書 */
.guide { max-width: 1112px; margin: 0 auto; padding-top: 24px; }
.guide__head { max-width: 1080px; margin: 0 auto 16px; padding: 22px 20px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--rule); }
.guide__no { display: inline-block; margin: 0 0 4px; padding: 2px 12px; border-radius: 999px; background: var(--c); color: #fff; font-family: var(--round); font-weight: 900; font-size: 13px; }
.guide__name { margin: 0; font-family: var(--round); font-weight: 900; font-size: clamp(24px, 4.4vw, 36px); line-height: 1.3; }
.guide__name .x { color: var(--ink3); font-weight: 500; margin: 0 .2em; }
.guide__name .ai { display: inline-block; padding: 0 .18em; border-radius: 6px; background: var(--ink); color: var(--paper); }
.guide__hook { margin: 6px 0 0; color: var(--ink2); }
.guide__need { margin: 8px 0 0; font-size: 14px; }
.guide__need span { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: var(--soft); color: var(--ink2); font-size: 12px; }

.toc { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
@media (max-width: 699px) { .toc { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479px) { .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toc a { white-space: nowrap; } }
.toc a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.3; transition: border-color .2s ease; }
.toc a:hover { border-color: var(--c); }
.toc a span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); color: var(--ink2); font-family: var(--round); font-weight: 900; font-size: 12px; }
.toc a span svg, .step__n svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.toc a.-done span { background: var(--c); color: #fff; }

.steps { max-width: 1080px; margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px 28px; padding: 22px 20px; scroll-margin-top: 70px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px; transition: border-color .3s ease; }
.step.-done { border-color: color-mix(in srgb, var(--c) 45%, var(--rule)); }
@media (max-width: 799px) { .step { grid-template-columns: minmax(0, 1fr); } }
.step__k { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; color: var(--c); letter-spacing: .04em; }
.step__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--c); color: var(--c); font-family: var(--round); font-weight: 900; font-size: 14px; letter-spacing: 0; }
.step.-done .step__n { background: var(--c); color: #fff; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.step__title { margin: 6px 0 6px; font-family: var(--round); font-weight: 900; font-size: clamp(21px, 3.2vw, 26px); line-height: 1.35; }
.step__goal { margin: 0 0 14px; font-size: 15px; }
.step__goal span { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; }
.step__h { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.step__h small { font-weight: 400; color: var(--ink3); margin-left: 4px; }
.todo { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.todo button { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper);
  text-align: left; cursor: pointer; line-height: 1.6; transition: background .2s ease; }
.todo .box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; border: 2px solid var(--ink3); }
.todo .box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; }
.todo button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 9%, var(--card)); border-color: color-mix(in srgb, var(--c) 40%, var(--rule)); }
.todo button[aria-pressed="true"] .box { background: var(--c); border-color: var(--c); }
.todo button[aria-pressed="true"] .box svg { stroke-dashoffset: 0; transition: stroke-dashoffset .3s ease .05s; }
.todo button[aria-pressed="true"] .t { color: var(--ink2); }

.tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.tip img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--card); }
.tip p { margin: 0; font-size: 14px; line-height: 1.7; }
.tip__who { display: block; font-size: 12px; font-weight: 700; color: var(--ink3); }

.prompt { border-radius: 14px; background: var(--ink); color: var(--paper); overflow: hidden; }
.prompt__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid color-mix(in srgb, var(--paper) 16%, transparent); font-size: 13px; font-weight: 700; }
.copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .15s ease; }
.copy:active { transform: scale(.96); }
.copy.-ok { background: var(--paper); color: var(--ink); }
.prompt__body { margin: 0; padding: 14px 16px 6px; font-size: 15px; line-height: 1.9; white-space: pre-wrap; }
.prompt__body mark { background: transparent; color: inherit; text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prompt__note { margin: 0; padding: 0 16px 14px; font-size: 12px; color: color-mix(in srgb, var(--paper) 62%, transparent); }
.guard { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 1.7; }
.guard::before { content: '自分でやる所　'; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s ease, background .2s ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.-text { border: 0; background: none; color: var(--ink3); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.guide__acts { max-width: 1080px; margin: 18px auto 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.guide__nav { max-width: 1080px; margin: 14px auto 0; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
@media (max-width: 479px) { .guide__nav .btn { flex: 1 1 auto; padding: 0 12px; font-size: 13px; } }

.stamp { position: fixed; left: 50%; top: 42%; z-index: 25; display: flex; flex-direction: column; align-items: center; padding: 18px 30px; border-radius: 18px;
  background: var(--c); color: #fff; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-6deg); }
.stamp span { font-family: var(--round); font-weight: 900; font-size: clamp(26px, 6vw, 40px); line-height: 1.2; }
.stamp small { font-weight: 700; font-size: 14px; }
.stamp.-go { animation: stamp 1.9s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-6deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(-3deg); }
  30% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.96) rotate(-3deg); }
}

/* 守る4つ */
.rule-grid { max-width: 1080px; margin: 0 auto; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: r; }
@media (max-width: 899px) { .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .rule-grid { grid-template-columns: minmax(0, 1fr); } }
.rule-grid li { counter-increment: r; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--rule); }
.rule-grid li::before { content: counter(r); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--round); font-weight: 900; font-size: 14px; }
.rule-grid h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.5; }
.rule-grid p { margin: 0; font-size: 14px; color: var(--ink2); line-height: 1.75; }

.foot { padding: 32px 16px 48px; border-top: 1px solid var(--rule); color: var(--ink3); font-size: 12px; }
.foot__brand { max-width: 1080px; margin: 0 auto 8px; font-weight: 700; color: var(--ink2); }
.foot ul { max-width: 1080px; margin: 0 auto; padding-left: 1.2em; line-height: 1.8; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 30; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 14px; opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.-show { opacity: 1; transform: translate(-50%, 0); }

/* 印刷：選んだ特典の手順書だけ */
@media print {
  .top, .hero, .gifts, .rules, .foot, .toast, .stamp, .toc, .guide__acts, .guide__nav, .copy, .tip img { display: none !important; }
  body { background: #fff; color: #000; }
  .guide { padding: 0; }
  .guide__head, .step { border-color: #ccc; }
  .step { break-inside: avoid; grid-template-columns: minmax(0, 1fr); }
  .prompt { background: #fff; color: #000; border: 1px solid #999; }
  .prompt__note { color: #555; }
}
