:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1d2421; --muted: #66706b; --line: #e3dfd6;
  --brand: #1f6f5c; --brand-ink: #ffffff; --accent: #f2b632; --ok: #1f7a4d; --ng: #b3412f; --soft: #e8f2ee;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --card: #1b211e; --ink: #e9eeeb; --muted: #9aa5a0; --line: #2c3430;
    --brand: #4fb398; --brand-ink: #0d1411; --soft: #1f2e28; --ok: #5cc18c; --ng: #e47a66; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.45rem; line-height: 1.4; margin: .4em 0; }
h2 { font-size: 1.1rem; margin: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.logo { background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 6px; font-size: .9rem; }
nav { display: flex; gap: 14px; align-items: center; font-size: .95rem; }
nav a { text-decoration: none; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; }
.narrow { max-width: 420px; margin: 24px auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.hidden { display: none; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
input[type=email], input[type=text] { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
#code { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
button, .button { font: inherit; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; min-height: 44px; }
button.primary, .button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { border: none; background: none; color: var(--brand); padding: 4px; min-height: auto; }
.error { color: var(--ng); background: color-mix(in srgb, var(--ng) 10%, transparent); padding: 10px 12px; border-radius: 10px; }
.ok { color: var(--ok); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar span { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.hero .stats { display: flex; gap: 24px; }
.hero .stats b { font-size: 2rem; }
.hero .button { width: 100%; margin-top: 6px; }
.course { margin: 28px 0; }
.course-head { display: flex; align-items: center; gap: 12px; }
.course-head .icon { font-size: 1.8rem; }
.course-head > div { flex: 1; }
.course-head .count { color: var(--muted); font-weight: 700; }
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons a { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; text-decoration: none; color: var(--ink); }
.lessons .check { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--brand-ink); }
.lessons a.done .check { background: var(--ok); border-color: var(--ok); }
.lt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lt small { color: var(--muted); line-height: 1.5; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--brand); margin-left: 8px; white-space: nowrap; vertical-align: middle; }
.tag.ok { color: var(--ok); }
.goal { background: var(--soft); padding: 10px 12px; border-radius: 10px; }
.steps { display: flex; list-style: none; padding: 0; gap: 6px; margin: 16px 0 4px; }
.steps li { flex: 1; text-align: center; font-size: .85rem; padding: 6px; border-radius: 8px; background: var(--line); color: var(--muted); }
.steps li.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.video { position: relative; aspect-ratio: 9 / 16; max-height: 70vh; margin: 12px auto; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.placeholder { aspect-ratio: auto; background: var(--card); border: 1px dashed var(--line); padding: 32px 16px; text-align: center; color: var(--muted); }
.hook { font-weight: 700; font-size: 1.1rem; }
.slide { text-align: center; min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.slide .big { font-size: 3.2rem; line-height: 1.2; }
.slide .label { color: var(--brand); font-weight: 700; margin: 6px 0 0; }
.slide .say { font-size: 1.2rem; font-weight: 600; margin: 8px 0; }
fieldset.q { border: 1px solid var(--line); }
fieldset.q legend { font-weight: 700; padding: 0 4px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.choice input { margin-top: 6px; accent-color: var(--brand); }
.q.right { border-left: 5px solid var(--ok); } .q.wrong { border-left: 5px solid var(--ng); }
.result { text-align: center; } .result .big { font-size: 3rem; margin: 0; }
.result.pass { border-color: var(--ok); }
dt { font-weight: 700; } dd { margin: 0 0 8px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--card); }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
tr.off { opacity: .5; }

/* ---- 講座（STEP・手順書・質問箱） ---- */
.section-title { margin: 28px 0 8px; font-size: 1.05rem; }
.crumbs a { color: var(--muted); }
.steps-list, .lessons { list-style: none; margin: 0; padding: 0; }
.steps-list a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; text-decoration: none; color: var(--ink); }
.steps-list .no { flex: none; font-size: .75rem; font-weight: 700; color: var(--brand); background: var(--soft); border-radius: 8px; padding: 4px 8px; }
.steps-list .count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.steps-list a.done .no { background: var(--ok); color: var(--brand-ink); }
.soon { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; margin: 8px 0; color: var(--muted); }
.guide { margin-top: 8px; }
.guide .g-h2 { margin: 28px 0 8px; padding-left: 10px; border-left: 4px solid var(--brand); }
.guide ol, .guide ul { padding-left: 1.4em; }
.guide li { margin: 4px 0; }
.note { background: color-mix(in srgb, var(--accent) 16%, transparent); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin: 12px 0; }
.note p { margin: 4px 0; }
.code { position: relative; margin: 12px 0; }
.code pre { background: #1d2421; color: #e9eeeb; padding: 14px; border-radius: 10px; overflow-x: auto; margin: 0; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.code .copy { position: absolute; top: 6px; right: 6px; min-height: 32px; padding: 4px 12px; font-size: .8rem; background: var(--card); }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; }
.checklist input { margin-top: 7px; accent-color: var(--brand); width: 18px; height: 18px; }
.os-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.os-switch button { border: none; border-radius: 0; min-height: 40px; }
.os-switch button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.os { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; background: var(--card); margin: 12px 0; }
.os-label { font-weight: 700; color: var(--brand); }
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.video.wide { aspect-ratio: 16 / 9; max-height: none; }
button.wide { width: 100%; margin-top: 16px; }
textarea { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; resize: vertical; }
.qa .q-body { white-space: pre-wrap; font-weight: 600; }
.qa.open { border-left: 5px solid var(--accent); }
.answer { background: var(--soft); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; }
.tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
.tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.brand, nav a, nav button { white-space: nowrap; }
@media (max-width: 420px) { nav { gap: 10px; font-size: .85rem; } .brand { font-size: .95rem; } }
.code pre { padding-top: 44px; }
