/* ============ AI駆動開発ハンズオン — Premium Theme v2 ============ */
:root {
  color-scheme: light;
  --page: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafd;
  --ink: #0e1526; --ink-2: #47536b; --muted: #8a94a8;
  --grid: #e4e9f2; --border: rgba(14, 21, 38, 0.08);
  --accent: #2a78d6; --accent-hi: #4f9cf0; --cyan: #22b8cf;
  --good: #0e8a3e; --warn: #d03b3b;
  --hero-bg: #0d1b36; --hero-ink: #eaf1fc; --hero-sub: #a9bcdc;
  --code-bg: #0f1e3c; --code-ink: #d5e3f7;
  --shadow-s: 0 1px 2px rgba(14,21,38,.05), 0 4px 14px rgba(14,21,38,.06);
  --shadow-m: 0 2px 6px rgba(14,21,38,.07), 0 14px 34px rgba(14,21,38,.10);
  --grad: linear-gradient(120deg, #2a78d6, #22b8cf);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0b0e15; --surface: #141926; --surface-2: #10151f;
    --ink: #f2f5fa; --ink-2: #b7c1d3; --muted: #7c8699;
    --grid: #232b3d; --border: rgba(255,255,255,0.08);
    --accent: #4f9cf0; --accent-hi: #7db8f7; --cyan: #37c6dc;
    --good: #34c46b;
    --hero-bg: #0a1428; --hero-ink: #eef4fd; --hero-sub: #9fb4d4;
    --code-bg: #0c1830; --code-ink: #cfdff6;
    --shadow-s: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    --shadow-m: 0 2px 8px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.4);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(900px 480px at 85% -140px, color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%),
    radial-gradient(700px 420px at -10% 30%, color-mix(in srgb, var(--cyan) 6%, transparent), transparent 60%),
    var(--page);
  color: var(--ink);
  font-family: "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  line-height: 1.8; padding: 0 18px 80px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 920px; margin: 0 auto; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- ヘッダー ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 4px; margin: 0 -4px 26px;
  background: color-mix(in srgb, var(--page) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
header.site .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.01em;
  text-decoration: none; color: var(--ink);
}
header.site .logo svg { flex: none; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent)); }
header.site nav { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
header.site nav a {
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-2);
  padding: 7px 15px; border-radius: 99px; border: 1px solid transparent;
  transition: all .18s;
}
header.site nav a:hover { background: var(--surface); border-color: var(--border); color: var(--ink); box-shadow: var(--shadow-s); }
header.site nav a.on { background: var(--grad); color: #fff; box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- ヒーロー(常時ダーク・オーロラ) ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  background:
    radial-gradient(560px 300px at 88% -60px, rgba(79,156,240,0.32), transparent 62%),
    radial-gradient(480px 300px at -6% 110%, rgba(34,184,207,0.22), transparent 60%),
    radial-gradient(400px 240px at 55% 120%, rgba(124,92,255,0.14), transparent 65%),
    var(--hero-bg);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px; padding: 38px 40px;
  margin-bottom: 30px; box-shadow: var(--shadow-m);
}
.hero::before { /* ドットグリッド */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.13) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(600px 360px at 75% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(600px 360px at 75% 20%, #000 20%, transparent 75%);
}
.hero .txt { flex: 1 1 340px; position: relative; }
.hero .art { flex: 0 0 auto; position: relative; filter: drop-shadow(0 10px 28px rgba(34,120,214,0.45));
  --accent: #7db8f7; --accent-2: #57c8e8; --good: #4ade80; --surface: rgba(255,255,255,0.08); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 0.22em; font-weight: 800; text-transform: uppercase;
  color: #8fd0ff; background: rgba(79,156,240,0.14);
  border: 1px solid rgba(127,184,247,0.35);
  padding: 5px 13px; border-radius: 99px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #37c6dc; box-shadow: 0 0 10px #37c6dc; }
.hero h1 {
  font-size: clamp(24px, 4vw, 32px); line-height: 1.4; letter-spacing: 0.01em;
  color: var(--hero-ink); font-weight: 800; margin: 0 0 12px;
}
.hero h1 .gr {
  background: linear-gradient(95deg, #7db8f7, #4fd8e8 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 14.5px; color: var(--hero-sub); max-width: 560px; }
.hero .lead b { color: #dcecff; font-weight: 700; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.stat {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; padding: 8px 16px; backdrop-filter: blur(4px);
}
.stat b { display: block; font-size: 18px; color: #fff; line-height: 1.3; }
.stat span { font-size: 10.5px; letter-spacing: 0.1em; color: var(--hero-sub); }

/* ---------- 見出し ---------- */
h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 800; letter-spacing: 0.01em;
  margin: 44px 0 16px;
}
h2 .step {
  flex: none; display: inline-grid; place-items: center;
  min-width: 44px; height: 27px; padding: 0 10px;
  background: var(--grad); color: #fff;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em;
  border-radius: 8px; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 40%, transparent);
}
h2 small { font-weight: 600; color: var(--muted); font-size: 12px; }
h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
p { font-size: 14px; color: var(--ink-2); margin: 9px 0; }
p.note { font-size: 12.5px; color: var(--muted); }
b, strong { color: var(--ink); font-weight: 700; }

/* ---------- カード ---------- */
.card, .goalbox {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; margin: 14px 0; box-shadow: var(--shadow-s);
}
.goalbox { position: relative; overflow: hidden; }
.goalbox::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.goalbox .t { font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; margin-bottom: 6px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- セッションカード(INDEX) ---------- */
.sessions { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
a.session {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px 20px 18px; box-shadow: var(--shadow-s);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.session:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
a.session::after {
  content: "→"; position: absolute; right: 18px; top: 20px;
  font-weight: 800; color: var(--accent); opacity: 0; transform: translateX(-6px);
  transition: all .2s;
}
a.session:hover::after { opacity: 1; transform: none; }
a.session .n { font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; color: var(--accent); }
a.session h3 { margin: 4px 0 6px; font-size: 16px; letter-spacing: 0.01em; }
a.session p { font-size: 12.5px; margin: 0 0 14px; min-height: 3em; }
.ringrow { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.ring { position: relative; width: 46px; height: 46px; flex: none; }
.ring svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring .bg { stroke: var(--grid); }
.ring .fg { stroke: url(#gradRing); stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset .5s ease; }
.ring .pv {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: var(--ink-2);
}
.pnum { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- 漫画(ミドリとタツヤ) ---------- */
.comic {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 22px 10px; margin: 0 0 30px; box-shadow: var(--shadow-s);
}
.comic .comic-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted);
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px dashed var(--grid);
}
.comic .line { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 15px; }
.comic .line.right { flex-direction: row-reverse; }
.comic .line img {
  width: 58px; height: 58px; border-radius: 50%; flex: none; object-fit: cover;
  background: #fff; border: 2.5px solid var(--surface);
  outline: 2px solid var(--grid); box-shadow: var(--shadow-s);
}
.comic .line.left img { outline-color: color-mix(in srgb, #64748b 45%, var(--grid)); }
.comic .line.right img { outline-color: color-mix(in srgb, var(--cyan) 55%, var(--grid)); }
.comic .who { font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; margin-top: 4px; }
.comic .bub {
  position: relative; max-width: 76%; border-radius: 16px;
  padding: 11px 15px; font-size: 13.5px; line-height: 1.75; border: 1px solid;
  box-shadow: var(--shadow-s);
}
.comic .line.left .bub { background: #f6f8fb; border-color: #e2e8f0; color: #33415c; border-top-left-radius: 5px; }
.comic .line.right .bub { background: #eafcff; border-color: #b8ecf4; color: #0e5c6d; border-top-right-radius: 5px; }
.comic .bub b { color: inherit; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .comic .line.left .bub { background: #1b2334; border-color: #303c54; color: #c6d2e6; }
  :root:not([data-theme="light"]) .comic .line.right .bub { background: #0e2f38; border-color: #1b5966; color: #a9e6f2; }
}

/* ---------- チェックリスト ---------- */
.check { padding: 8px 12px; }
.check label {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 11px 8px; border-bottom: 1px solid var(--grid);
  font-size: 13.5px; color: var(--ink-2); border-radius: 8px;
  transition: background .15s;
}
.check label:last-child { border-bottom: none; }
.check label:hover { background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%); }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin-top: 2px; flex: none; cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--muted) 55%, var(--grid));
  border-radius: 7px; background: var(--surface);
  display: grid; place-items: center; transition: all .15s;
}
.check input::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .16s; margin-top: -2px;
}
.check input:checked { background: var(--grad); border-color: transparent; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check label.done { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.progress-note { font-size: 12px; font-weight: 700; color: var(--accent); margin: 8px 0 0; }

/* ---------- プロンプト(ターミナル風) ---------- */
.prompt { position: relative; margin: 14px 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-m); }
.prompt::before {
  content: "● ● ●   Claude Code への指示";
  display: block; font-size: 10.5px; letter-spacing: 0.12em; font-weight: 700;
  color: #7f96bd; background: color-mix(in srgb, var(--code-bg) 82%, #fff 6%);
  padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.prompt pre {
  background: var(--code-bg); color: var(--code-ink);
  padding: 16px 18px; font-size: 12.8px; line-height: 1.8;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}
.prompt button {
  position: absolute; top: 6px; right: 10px;
  font: inherit; font-size: 11px; font-weight: 700; padding: 4px 13px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08);
  color: #dfe9fa; cursor: pointer; transition: background .15s;
}
.prompt button:hover { background: rgba(255,255,255,0.2); }
code {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--grid));
  border-radius: 6px; padding: 1.5px 7px; font-size: 12.5px;
  font-family: "Cascadia Code", Consolas, monospace; color: var(--ink);
}
.prompt pre code { background: none; border: none; padding: 0; color: inherit; }

/* ---------- テーブル ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; font-size: 13px; margin: 12px 0; box-shadow: var(--shadow-s);
}
th { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); font-weight: 800;
  background: var(--surface-2); padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--grid); }
td { padding: 10px 12px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%); }
td input[type="number"] {
  width: 70px; font: inherit; font-size: 13px; padding: 5px 8px;
  border: 1.5px solid var(--grid); border-radius: 8px; background: var(--page); color: var(--ink);
  transition: border-color .15s;
}
td input[type="number"]:focus { outline: none; border-color: var(--accent); }
td .pct {
  display: inline-block; font-weight: 800; font-size: 12px; white-space: nowrap;
  color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent);
  border-radius: 99px; padding: 2px 10px;
}

/* ---------- Q&A / 警告 ---------- */
.qa { position: relative; overflow: hidden; }
.qa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--accent-hi), var(--cyan)); }
.qa .q { font-weight: 800; font-size: 13.5px; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.qa .q::before { content: "Q"; flex: none; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 7px; background: var(--grad); color: #fff; font-size: 12px; }
.qa .a { font-size: 13px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--grid); border-radius: 12px; padding: 12px 14px; line-height: 1.85; }
.warnbox { position: relative; overflow: hidden; }
.warnbox::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--warn); }
.warnbox .t { color: var(--warn); font-weight: 800; font-size: 12.5px; letter-spacing: 0.06em; margin-bottom: 6px; }

/* ---------- ページャ / フッター ---------- */
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; }
.pager a {
  text-decoration: none; font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
  padding: 12px 20px; box-shadow: var(--shadow-s); transition: all .18s;
}
.pager a:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); color: var(--ink); }
.pager a.primary {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 45%, transparent);
}
.dlbtn {
  flex: none; display: inline-block; text-decoration: none;
  font-size: 14px; font-weight: 800; color: #fff;
  background: var(--grad); border-radius: 12px; padding: 14px 22px;
  box-shadow: 0 5px 18px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: transform .18s, box-shadow .18s;
}
.dlbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 55%, transparent); }
footer.site { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--grid); font-size: 11.5px; color: var(--muted); }
.art svg { display: block; max-width: 100%; height: auto; }

/* ---------- スクロールアニメーション ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .hero { padding: 26px 22px; }
  .hero .art { display: none; }
  .comic .bub { max-width: 100%; }
}
