/* 部品の形と動き（段階2：デザイン部門）。値は tokens.css、考え方は 02_デザイン部門/デザインシステム.md。
   文法は3つだけ：①押せるものは下に厚みがあり押すと沈む ②色＝ステップ（data-c）③動きは「押した・できた・ここから」にだけ使う。 */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; background: var(--bg);
  /* キーボードで移動したとき、固定のヘッダーとタブバーの下に隠れないように（WCAG 2.4.11。再評価 #4） */
  scroll-padding-top: 72px;
  scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-5));
}
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 var(--text-md)/var(--leading) var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-6));
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: var(--leading-tight); font-feature-settings: "palt"; letter-spacing: .02em; text-wrap: balance; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--c-ink); text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.app-main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: var(--space-2); top: var(--space-2); z-index: 100; background: var(--bg); padding: var(--space-2); }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--xs { width: 14px; height: 14px; stroke-width: 3; }
.icon--lg { width: 40px; height: 40px; }

/* =========================================================
   外枠：ヘッダー・本文・タブバー・ミニプレーヤー・トースト
   ========================================================= */
.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-1) var(--space-3);
  padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-2);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.app-header__brand { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font: 900 1.0625rem/1 var(--font-display); letter-spacing: .06em; color: var(--text); text-decoration: none; }
.brand-picks { display: inline-flex; gap: 2px; }
.brand-picks i, .ticket__rainbow i {
  width: 10px; height: 12px; background: var(--c-fill);
  border-radius: 46% 46% 50% 50% / 32% 32% 68% 68%;
}
.brand-picks i:nth-child(even) { transform: translateY(2px); }
.app-header__stat { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 6px;
  border-radius: var(--r-pill); background: var(--c-soft); color: var(--c-ink);
  font: 900 var(--text-sm)/1 var(--font-display);
}
.chip .pick { width: 18px; height: 20px; }
.chip--streak .icon { color: var(--field); }
.chip--streak.is-lit .icon { color: var(--c-deep); fill: var(--c-fill); }

.app-main { max-width: var(--content-max); margin: 0 auto; padding: var(--space-5) var(--space-4); }
.view > * + *, .stage > * + *, [data-c] > .page-title ~ * { margin-top: var(--space-5); }
.view.is-enter { animation: view-in var(--dur-enter) var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.banner { margin: 0; padding: var(--space-3) var(--space-4); background: var(--danger-soft); color: var(--danger); font-size: var(--text-sm); font-weight: 700; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));   /* ホーム・コース・ツール・心がまえ・その他 */
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 6px var(--space-2) env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--line);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: var(--text-xs); font-weight: 700; text-decoration: none; color: var(--muted); border-radius: var(--r);
}
.tabbar__icon { display: grid; place-items: center; width: min(52px, 100%); height: 30px; border-radius: var(--r-pill); transition: background var(--dur-ui) var(--ease-out); }
.tabbar__icon .icon { stroke-width: 2.2; }
.tabbar__item[aria-current="page"] { color: var(--c-ink); }
.tabbar__item[aria-current="page"] .tabbar__icon { background: var(--c-soft); animation: tab-pop 360ms var(--ease-spring); }
@keyframes tab-pop { 40% { transform: scale(1.15) translateY(-2px); } }

.mini-player {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 9;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-2));
  display: flex; align-items: center; gap: var(--space-3); width: max-content; max-width: calc(100% - var(--space-5));
  padding: 6px 6px 6px var(--space-4); border-radius: var(--r-pill);
  background: var(--text); color: #fff; font: 900 var(--text-sm)/1 var(--font-display);
  box-shadow: 0 6px 20px rgba(29, 26, 46, .25);
}
.mini-player__item { display: inline-flex; align-items: center; gap: var(--space-2); }
.mini-player__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c-fill); }
.mini-player__dot.is-on { animation: beat 180ms var(--ease-out); }
.mini-player__btn { min-height: 36px; padding: 0 var(--space-3); border-radius: var(--r-pill); border: 0; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; cursor: pointer; }
.mini-player__link { color: #fff; font-family: var(--font); font-size: var(--text-xs); }

.toast {
  position: fixed; left: 50%; z-index: 30;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-4));
  transform: translate(-50%, 12px) scale(.96); max-width: calc(100% - var(--space-6));
  padding: var(--space-3) var(--space-5); border-radius: var(--r-pill);
  background: var(--text); color: #fff; font-size: var(--text-sm); font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-ui), transform var(--dur-ui) var(--ease-spring);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* =========================================================
   文字
   ========================================================= */
.eyebrow, .continue__eyebrow, .stage__eyebrow, .path__eyebrow, .lesson-card__eyebrow, .note__label, .ticket__eyebrow {
  font: 900 var(--text-xs)/1.3 var(--font-display); letter-spacing: .08em; color: var(--c-ink);
}
.page-title { font-size: var(--text-xl); }
.page-lead, .section__lead { color: var(--muted); }
.section > * + * { margin-top: var(--space-3); }
.section__title { font-size: var(--text-lg); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.section__title .icon { color: var(--c-ink); }
.prose { max-width: 36em; text-wrap: pretty; }
.inline-link { color: var(--c-ink); font-weight: 700; }
.empty { color: var(--muted); padding: var(--space-5); text-align: center; background: var(--surface); border-radius: var(--r); border: 2px dashed var(--line); }
.notice { padding: var(--space-3) var(--space-4); border-radius: var(--r); background: var(--danger-soft); color: var(--danger); font-size: var(--text-sm); font-weight: 700; }
.hint { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.hint .icon { color: var(--c-ink); }
.pct { font: 900 var(--text-md)/1 var(--font-display); color: var(--c-ink); }
.logged { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-4); border-radius: var(--r-pill); background: #e8f9e7; color: #267d30; font-weight: 700; font-size: var(--text-sm); }

/* =========================================================
   ボタン：塗り（その場の色）／枠線／危険。押すと沈む
   ========================================================= */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.btn-row--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 50px; padding: 0 var(--space-5); margin-bottom: var(--press);
  border: 0; border-radius: var(--r); background: var(--c-fill); color: var(--on-fill);
  box-shadow: 0 var(--press) 0 var(--c-deep);
  font-weight: 700; letter-spacing: .04em; text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out), filter var(--dur-press);
}
.btn:hover { filter: brightness(1.04) saturate(1.05); }
.btn:active { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--c-deep); }
.btn--ghost { background: var(--bg); color: var(--text); box-shadow: 0 var(--press) 0 var(--line), inset 0 0 0 2px var(--line); }
.btn--ghost:active { box-shadow: 0 0 0 var(--line), inset 0 0 0 2px var(--line); }
.btn--danger { background: var(--bg); color: var(--danger); box-shadow: 0 var(--press) 0 #f2b8bf, inset 0 0 0 2px var(--danger); }
.btn--lg { min-height: 58px; font-size: var(--text-lg); padding: 0 var(--space-6); }
.btn--sm { min-height: 44px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn--block { display: flex; width: 100%; }
.btn .icon { width: 20px; height: 20px; }
.link-list { display: grid; gap: var(--space-2); }
.link-list .btn { justify-content: flex-start; }

/* =========================================================
   ホーム：導入・続きから・レッスン待ち・メモ
   ========================================================= */
.hero > * + * { margin-top: var(--space-4); }
.hero__picks { display: flex; gap: 6px; }
.hero__picks span { display: block; width: 30px; animation: drop-in 520ms var(--ease-spring) both; }
.hero__picks span:nth-child(2) { animation-delay: 60ms; } .hero__picks span:nth-child(3) { animation-delay: 120ms; }
.hero__picks span:nth-child(4) { animation-delay: 180ms; } .hero__picks span:nth-child(5) { animation-delay: 240ms; }
.hero__picks span:nth-child(6) { animation-delay: 300ms; } .hero__picks span:nth-child(7) { animation-delay: 360ms; }
.hero__picks span:nth-child(8) { animation-delay: 420ms; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-24px) rotate(-20deg); } }
.hero__title { font-size: var(--text-2xl); line-height: 1.4; }
.hero__lede { color: var(--muted); }
.hero__sub { font-size: var(--text-sm); font-weight: 700; }

.continue {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-4); align-items: center;
  padding: var(--space-5) var(--space-5) var(--space-4); border-radius: var(--r-lg);
  background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill);
}
.continue__pick .pick { width: 72px; height: 79px; }  /* 続く動きは「ここから」の吹き出し1つに絞る（V2） */
@keyframes float { 50% { transform: translateY(-6px) rotate(-4deg); } }
.continue__body > * + * { margin-top: var(--space-2); }
.continue__title { font-size: var(--text-xl); }
.continue__text { color: var(--muted); }
.continue__why { font-size: var(--text-sm); font-weight: 700; color: var(--c-ink); }
.continue__why::before { content: "♪ "; }
.continue .btn { grid-column: 1 / -1; }
.continue--clear { grid-template-columns: 1fr; }

.lesson-card, .note--link, .menu__item, .help-link {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4);
  border-radius: var(--r); color: var(--text); text-decoration: none;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 var(--press) 0 var(--line);
  margin-bottom: var(--press); transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
}
.lesson-card:active, .note--link:active, .menu__item:active, .help-link:active { transform: translateY(var(--press)); box-shadow: inset 0 0 0 2px var(--line), 0 0 0 var(--line); }
.lesson-card { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill), 0 var(--press) 0 var(--c-deep); }
.lesson-card:active { box-shadow: inset 0 0 0 2px var(--c-fill), 0 0 0 var(--c-deep); }
.lesson-card__icon, .menu__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); }
.menu__icon { border-radius: 14px; background: var(--c-soft); color: var(--c-ink); }
.lesson-card__body, .menu__body { flex: 1; min-width: 0; }
.lesson-card__body > span, .menu__body > span { display: block; }
.lesson-card__title, .menu__title { font-weight: 700; }
.lesson-card__text, .menu__text { font-size: var(--text-sm); color: var(--muted); }
.lesson-card__go, .menu__go { font: 900 var(--text-lg)/1 var(--font-display); color: var(--c-ink); }
.note { padding: var(--space-4); border-radius: var(--r); background: var(--c-soft); }
.note__text { display: block; margin-top: var(--space-1); font-weight: 700; }
.note--link { display: block; background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill), 0 var(--press) 0 var(--c-deep); }
.note--link:active { box-shadow: inset 0 0 0 2px var(--c-fill), 0 0 0 var(--c-deep); }
.note--link .note__label { display: block; }

/* =========================================================
   ピック（figures.js の pick()）と 0→1 への道
   ========================================================= */
.pick { display: block; width: 100%; height: auto; overflow: visible; }
.pick__shade { fill: var(--c-deep); }
.pick__body { fill: var(--c-fill); }
.pick__num { font: 900 26px var(--font-display); fill: var(--on-fill); }
.pick__mark { stroke: var(--on-fill); }
.pick--todo .pick__shade { fill: var(--line); }
.pick--todo .pick__body { fill: var(--c-soft); stroke: var(--c-fill); stroke-width: 3; }
.pick--todo .pick__num { fill: var(--c-ink); }

.path { position: relative; display: grid; gap: var(--space-2); }
.path__item { position: relative; }
.path__item:not(:last-child)::before {            /* 次の印へつながる線。終えたところはその色 */
  content: ""; position: absolute; left: 33px; top: 56px; bottom: -18px; width: 6px; border-radius: 3px;
  background: var(--surface-2);
}
.path__item--done:not(:last-child)::before, .path__item--lesson.is-done:not(:last-child)::before { background: var(--c-fill); }
.path__link { position: relative; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-2); border-radius: var(--r); color: var(--text); text-decoration: none; }
.path__node { position: relative; display: grid; place-items: center; width: 56px; flex: none; }
.path__node .pick { width: 56px; height: 61px; transition: transform var(--dur-press) var(--ease-out); }
.path__link:active .pick { transform: translateY(4px) scale(.97); }
.path__body { flex: 1; min-width: 0; }
.path__body > span { display: block; }
.path__body > * + * { margin-top: 2px; }
.path__title { font-weight: 700; line-height: var(--leading-tight); }
.path__item--current .path__link { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill); }
.path__item--current .path__node .pick { width: 64px; height: 70px; }

@keyframes ring { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.path__bubble {
  position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 1; transform: translateX(-50%);
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--text); color: #fff; font-size: var(--text-xs); font-weight: 700;
  animation: bob 1.6s ease-in-out infinite;
}
.path__bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--text); }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }
.path__item--current { margin-top: var(--space-5); }
.path__disc { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); box-shadow: inset 0 0 0 2px var(--c-fill), 0 4px 0 var(--line); }
.path__item--lesson.is-done .path__disc { background: var(--c-fill); color: var(--on-fill); box-shadow: 0 4px 0 var(--c-deep); }
.path__item--lesson .path__title { font-size: var(--text-sm); }
.path__item--done .path__title { color: var(--muted); }

/* 進み具合・状態 */
.progress { display: flex; align-items: center; gap: var(--space-2); width: 100%; font: 900 var(--text-xs)/1 var(--font-display); color: var(--muted); }
.progress__bar { position: relative; flex: 1; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.continue .progress__bar, .stage__head .progress__bar { background: rgba(255,255,255,.85); }
.progress__bar i { position: absolute; inset: 0 auto 0 0; display: block; min-width: 0; border-radius: 6px; background: var(--c-fill); }
.progress__bar i::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.45); }
.progress__bar i.is-grow { animation: grow var(--dur-grow) var(--ease-out); }
@keyframes grow { from { width: var(--from); } }
.status { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px; border-radius: var(--r-pill); font: 700 var(--text-xs)/1.5 var(--font); letter-spacing: 0; vertical-align: 1px; }
.status--done { background: #e8f9e7; color: #267d30; }
.status--current { background: var(--text); color: #fff; }
.status--todo { background: var(--surface-2); color: var(--muted); }

/* =========================================================
   ステップ・レッスンの画面
   ========================================================= */
/* タイトルの枠：ヘッダーとくっつけず、四隅を丸めた独立したカードにする（2026-10-16） */
.stage__head {
  margin: 0; padding: var(--space-4) var(--space-4) var(--space-5);
  border-radius: var(--r-lg); background: var(--c-soft);
}
.stage__head > * + * { margin-top: var(--space-3); }
.stage__head--compact { padding-bottom: var(--space-4); }
.stage__row { display: flex; align-items: center; gap: var(--space-4); }
.stage__pick .pick { width: 60px; height: 66px; }
.stage__disc { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); box-shadow: 0 4px 0 var(--c-deep); }
.stage__title { font-size: var(--text-xl); }
.stage__summary { color: var(--muted); font-weight: 700; }

.explain { border-radius: var(--r); background: var(--surface); }  /* 枠は押せるもの（タスク）に限る（V3） */
.explain__head { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; padding: 0 var(--space-4); font-weight: 700; cursor: pointer; list-style: none; }
.explain__head::-webkit-details-marker { display: none; }
.explain__head::after { content: "+"; margin-left: auto; font: 900 1.4rem/1 var(--font-display); color: var(--c-ink); transition: transform var(--dur-ui) var(--ease-out); }
.explain[open] .explain__head::after { transform: rotate(45deg); }
.explain__hint { padding: 2px 10px; border-radius: var(--r-pill); background: var(--c-soft); color: var(--c-ink); font-size: var(--text-xs); }
.explain .prose { padding: 0 var(--space-4) var(--space-4); }

.point { position: relative; padding: var(--space-4); padding-top: var(--space-5); border-radius: var(--r); background: var(--c-soft); font-weight: 700; }
.point__label { position: absolute; top: -12px; left: var(--space-4); padding: 2px 12px; border-radius: var(--r-pill); background: var(--c-fill); color: var(--on-fill); font: 900 var(--text-xs)/1.6 var(--font-display); letter-spacing: .1em; }

.figure-card { padding: var(--space-4); border-radius: var(--r); background: var(--surface); }
.figure-card + .figure-card { margin-top: var(--space-3); }
.figure-card__title { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-2); }
.figure-card__note { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.figure-card__scroll { overflow-x: auto; }
.figure-card--map { background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.fig { display: block; width: 100%; height: auto; }
.chord-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.chord { width: 120px; padding: var(--space-2); border-radius: var(--r-sm); background: var(--bg); text-align: center; }
.chord__name { font: 900 var(--text-md)/1.4 var(--font-display); color: var(--c-ink); }
.chord__note { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-2); }
.legend--stack { flex-direction: column; margin-top: 0; }
.legend--stack b { display: inline-block; width: 1.2em; color: var(--c-ink); }
.legend--numbered { counter-reset: n; }
.legend--numbered li::before { counter-increment: n; content: counter(n); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 4px; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); font: 900 14px/1 var(--font-display); }

.help-links { display: grid; gap: var(--space-2); }
.help-link { align-items: center; }
.help-link > .icon { width: 44px; height: 44px; padding: 10px; flex: none; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); }
.help-link b, .help-link > span > span { display: block; }
.help-link > span > span { font-size: var(--text-sm); color: var(--muted); }
.help-link--video > .icon { background: var(--c-fill); color: var(--on-fill); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }

/* チェックリスト：カード全体が押せる。本物のチェックボックスは見えないが操作できる */
.task-list { display: grid; gap: var(--space-3); }
.task { border-radius: var(--r); background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 var(--press) 0 var(--line); margin-bottom: var(--press); transition: background var(--dur-ui), box-shadow var(--dur-ui); }
.task__label { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; min-height: 56px; padding: var(--space-3) var(--space-4); cursor: pointer; border-radius: var(--r); -webkit-tap-highlight-color: transparent; }
.task__label:active { transform: translateY(2px); }
.task__check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.task__box {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; margin-top: 1px;
  border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 2.5px var(--field);
  transition: background var(--dur-press), box-shadow var(--dur-press);
}
.task__box .icon { width: 20px; height: 20px; stroke-width: 3.2; stroke: var(--on-fill); stroke-dasharray: 24; stroke-dashoffset: 24; }
.task__check:focus-visible + .task__box { outline: 3px solid var(--focus); outline-offset: 3px; }
.task__text { font-weight: 700; line-height: 1.6; padding-top: 2px; }
.task.is-done { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill), 0 var(--press) 0 var(--c-deep); }
.task.is-done .task__box { background: var(--c-fill); box-shadow: 0 3px 0 var(--c-deep); }
.task.is-done .task__box .icon { stroke-dashoffset: 0; }
.task.is-done .task__text { color: var(--muted); }
.task.is-pop .task__box { animation: pop 420ms var(--ease-spring); }
.task.is-pop .task__box .icon { animation: draw 300ms var(--ease-out) 80ms both; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.task__link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -6px 0 var(--space-2) calc(30px + var(--space-3) + var(--space-4)); font-size: var(--text-sm); font-weight: 700; }

/* つまずき解消 */
.video-block { padding: var(--space-4); border-radius: var(--r); background: var(--c-soft); }
.video-block > * + * { margin-top: var(--space-3); }
.video-block .section__title { flex-wrap: nowrap; word-break: auto-phrase; }   /* 長いタイトルでも、アイコンの横で折り返す */
.video-block .section__title .icon { flex: none; }
.video-list { display: grid; gap: var(--space-4); }
.video-embed { margin: 0; }
.video-embed__frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--r) * .6); background: #0d0a08; box-shadow: inset 0 0 0 1px var(--line); }
.video-embed__frame iframe, .video-embed__frame video { display: block; width: 100%; height: 100%; border: 0; }
.video-list--vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
.video-embed__frame--vertical { aspect-ratio: 9 / 16; }
.video-embed__empty { display: grid; place-content: center; justify-items: center; gap: var(--space-2); height: 100%; padding: var(--space-3); font-size: var(--text-sm); color: #c4b6a6; }
.video-embed__empty .icon { width: 44px; height: 44px; color: #c4b6a6; }
.video-embed__label { margin-top: var(--space-2); font-size: var(--text-sm); font-weight: 700; line-height: 1.5; word-break: auto-phrase; overflow-wrap: anywhere; }
.accordion { border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--line); }
.accordion + .accordion { margin-top: var(--space-2); }
.accordion__head { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4); min-height: 52px; align-items: center; font-weight: 700; cursor: pointer; list-style: none; }
.accordion__head::-webkit-details-marker { display: none; }
.accordion__head::before { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); font: 900 1.1rem/1 var(--font-display); transition: transform var(--dur-ui) var(--ease-out); }
.accordion[open] .accordion__head::before { transform: rotate(45deg); background: var(--c-fill); color: var(--on-fill); }
.accordion__body { list-style: decimal; padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 1.4em); display: grid; gap: var(--space-2); font-size: var(--text-sm); line-height: 1.7; }
.accordion__body li::marker { color: var(--c-ink); font-weight: 900; }

/* 卒業 */
.celebration { text-align: center; padding: var(--space-6) var(--space-4); border-radius: var(--r-lg); background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill); }
.celebration > * + * { margin-top: var(--space-2); }
.celebration__picks, .closing__rainbow { display: flex; justify-content: center; gap: 4px; }
.celebration__picks span, .closing__rainbow span { width: 30px; animation: wave 1.2s ease-in-out 3; }
.celebration__picks span:nth-child(2n), .closing__rainbow span:nth-child(2n) { animation-delay: .15s; }
.celebration__picks span:nth-child(3n), .closing__rainbow span:nth-child(3n) { animation-delay: .3s; }
@keyframes wave { 50% { transform: translateY(-10px) rotate(8deg); } }
.celebration__eyebrow { font: 900 var(--text-xs)/1 var(--font-display); letter-spacing: .2em; color: var(--c-ink); margin-top: var(--space-4) !important; }
.celebration__title { font-size: var(--text-2xl); }

/* ステップ完了の帯（画面下からせり上がる） */
.band {
  position: fixed; left: var(--space-3); right: var(--space-3); z-index: 20;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-2));
  max-width: calc(var(--content-max) - var(--space-5)); margin: 0 auto;
  border-radius: var(--r-lg); background: var(--c-fill); color: var(--on-fill); box-shadow: 0 6px 0 var(--c-deep), 0 16px 40px rgba(29,26,46,.2);
}
.band.is-in { animation: rise 320ms var(--ease-spring); }
@keyframes rise { from { transform: translateY(60px) scale(.96); opacity: 0; } }
.band__in { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-4); }
.band__icon { width: 48px; }
.band__icon .pick__body { fill: #fff; } .band__icon .pick__shade { fill: var(--c-deep); } .band__icon .pick__mark { stroke: var(--c-ink); }
.band__title { font: 900 var(--text-xl)/1.2 var(--font-display); }
.band__sub { font-size: var(--text-sm); font-weight: 700; }
.band__actions { display: contents; }
.band__actions .btn { grid-column: 1 / 3; margin: 0; background: #fff; color: var(--text); box-shadow: 0 var(--press) 0 var(--c-deep); }
.band__close { grid-row: 1; grid-column: 3; align-self: start; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); color: var(--on-fill); font: 900 1.4rem/1 var(--font-display); cursor: pointer; }

/* 粒と紙吹雪 */
.spark { position: fixed; z-index: 40; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c-fill); pointer-events: none; animation: spark 600ms var(--ease-out) forwards; }
.spark:nth-child(3n) { width: 6px; height: 6px; background: var(--c-deep); }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 14px; background: var(--c-fill); border-radius: 46% 46% 50% 50% / 32% 32% 68% 68%; animation: fall 1.5s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); } }

/* =========================================================
   フォーム・スイッチ
   ========================================================= */
.form > * + * { margin-top: var(--space-4); }
.field > * + * { margin-top: var(--space-1); }
.field__label { display: block; font-weight: 700; font-size: var(--text-sm); }
.field__input { display: block; width: 100%; min-height: var(--tap); padding: var(--space-2) var(--space-3); border: 2px solid var(--field); border-radius: 12px; background: var(--bg); font-size: 16px; transition: border-color var(--dur-press), box-shadow var(--dur-press); }
.field__input:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 4px var(--c-soft); }
.field__input--area { min-height: 104px; resize: vertical; }
.field__hint { font-size: var(--text-sm); color: var(--muted); line-height: 1.6; }
.field__error { color: var(--danger); font-size: var(--text-sm); font-weight: 700; }
.field__error:empty { display: none; }
.switches { border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--line); }
.switches li + li { border-top: 2px solid var(--line); }
.switch { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--space-4); cursor: pointer; }
.switch__body { flex: 1; }
.switch__label { display: block; font-weight: 700; }
.switch__hint { display: block; font-size: var(--text-sm); color: var(--muted); }
.switch__input { appearance: none; -webkit-appearance: none; position: relative; width: 56px; height: 32px; flex: none; margin: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--field); cursor: pointer; transition: background var(--dur-ui); }
.switch__input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 var(--field); transition: transform var(--dur-ui) var(--ease-spring); }
.switch__input:checked { background: var(--c-deep); box-shadow: none; }
.switch__input:checked::after { transform: translateX(24px); box-shadow: none; }

/* =========================================================
   目標曲・記録
   ========================================================= */
.ticket { position: relative; padding: var(--space-5); border-radius: var(--r-lg); background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 var(--press) 0 var(--line); }
.ticket > * + * { margin-top: var(--space-2); }
.ticket__title { font-size: var(--text-xl); font-weight: 700; line-height: 1.3; }
.ticket__artist { color: var(--muted); font-weight: 700; }
.ticket__stub { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-3); border-top: 2px dashed var(--line); font: 900 var(--text-xs)/1 var(--font-display); color: var(--muted); }
.ticket__rainbow { display: inline-flex; gap: 3px; }

.streak { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); align-items: center; padding: var(--space-5); border-radius: var(--r-lg); background: var(--c-soft); }
.streak__flame .icon { width: 64px; height: 64px; color: var(--field); }
.streak__flame.is-lit .icon { color: var(--c-deep); fill: var(--c-fill); animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 30% { transform: scale(1.05, .96) rotate(-2deg); } 60% { transform: scale(.97, 1.04) rotate(2deg); } }
.streak__value { font: 900 var(--text-md)/1 var(--font-display); color: var(--c-ink); }
.streak__value b { font-size: 3.25rem; margin-right: 4px; }
.streak__note { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--muted); font-weight: 700; }
.streak__action { grid-column: 1 / -1; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heat__cell { aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); }
.heat__cell.is-hit { background: var(--c-fill); box-shadow: inset 0 -3px 0 var(--c-deep); }
.heat__cell.is-today { box-shadow: 0 0 0 3px var(--text); }
.heat__cell.is-hit.is-today { box-shadow: inset 0 -3px 0 var(--c-deep), 0 0 0 3px var(--text); }
.heat__legend { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--muted); font-weight: 700; }

/* =========================================================
   練習ツール
   ========================================================= */
.tool { position: relative; padding: var(--space-5) var(--space-4) var(--space-4); border-radius: var(--r-lg); background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); scroll-margin-top: 72px; overflow: hidden; transition: box-shadow var(--dur-ui); }
.tool::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--c-fill); }
.tool.is-playing { box-shadow: inset 0 0 0 3px var(--c-fill); }
.tool > * + * { margin-top: var(--space-4); }
.tool__title { font-size: var(--text-lg); color: var(--text); }
.tool__subtitle { font-size: var(--text-sm); }
.tool__status { font-size: var(--text-sm); color: var(--muted); font-weight: 700; }
.tool__status:empty { display: none; }
.stepper { display: flex; align-items: center; justify-content: center; gap: var(--space-3); }
.stepper__btn { width: 56px; height: 56px; margin-bottom: var(--press); border: 0; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); box-shadow: inset 0 0 0 2px var(--c-fill), 0 var(--press) 0 var(--c-deep); font: 900 1.6rem/1 var(--font-display); cursor: pointer; transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press); }
.stepper__btn:active { transform: translateY(var(--press)); box-shadow: inset 0 0 0 2px var(--c-fill), 0 0 0 var(--c-deep); }
.stepper__value { font: 900 3.25rem/1 var(--font-display); color: var(--c-ink); min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.stepper__unit { font: 900 var(--text-sm)/1 var(--font-display); color: var(--muted); }
.beats { display: flex; justify-content: center; gap: var(--space-4); }
.beat { width: 22px; height: 22px; border-radius: 50%; background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill); transition: transform 80ms, background 80ms; }
.beat.is-on { background: var(--c-fill); transform: scale(1.4); box-shadow: 0 0 0 6px var(--c-soft); }
@keyframes beat { 0% { transform: scale(1.6); } }
.toggle { display: inline-flex; gap: var(--space-2); align-items: center; min-height: 44px; font-size: var(--text-sm); font-weight: 700; }
.toggle input { width: 22px; height: 22px; accent-color: var(--c-deep); }
.segmented { display: flex; gap: var(--space-2); justify-content: center; }
.segmented__item { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 0 var(--space-3); border-radius: var(--r-pill); box-shadow: inset 0 0 0 2px var(--line); font: 900 var(--text-md)/1 var(--font-display); cursor: pointer; transition: background var(--dur-press); }
.segmented__item input { position: absolute; opacity: 0; }
.segmented__item:has(input:checked) { background: var(--c-fill); color: var(--on-fill); box-shadow: 0 3px 0 var(--c-deep); }
.segmented__item:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.timer { font: 900 3.75rem/1 var(--font-display); text-align: center; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer.is-running { color: var(--c-ink); }
#metronome .btn-row, #timer .btn-row, #tuner > .btn-row { justify-content: center; }
.tuner { text-align: center; }
.tuner__note { display: grid; place-items: center; width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; background: var(--c-soft); box-shadow: inset 0 0 0 4px var(--c-fill); font: 900 3rem/1 var(--font-display); color: var(--c-ink); transition: background var(--dur-ui), box-shadow var(--dur-ui); }
.tuner[data-state="ok"] .tuner__note { background: #68d36f; color: var(--on-fill); box-shadow: 0 0 0 8px #e8f9e7; animation: pop 400ms var(--ease-spring); }
.tuner[data-state="near"] .tuner__note { box-shadow: inset 0 0 0 4px #ffbe3f; }
.tuner[data-state="off"] .tuner__note { box-shadow: inset 0 0 0 4px #ff958e; }
.tuner__string, .tuner__cents { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--muted); font-weight: 700; }
.tuner__meter { position: relative; height: 12px; max-width: 280px; margin: var(--space-4) auto var(--space-2); border-radius: 6px; background: var(--surface-2); }
.tuner__zone { position: absolute; left: 45%; right: 45%; top: 0; bottom: 0; border-radius: 6px; background: #b8ebbb; }
.tuner__needle { position: absolute; left: 50%; top: -6px; width: 6px; height: 24px; border-radius: 3px; background: var(--field); transform: translateX(-50%); transition: left 80ms linear; }
.tuner__needle[data-state="ok"] { background: #267d30; }
.tuner__needle[data-state="near"] { background: #906606; }
.tuner__needle[data-state="off"] { background: #b54a46; }
.ref-tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.ref-tone { min-height: 48px; margin-bottom: 3px; border: 0; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); font: 900 var(--text-sm)/1 var(--font-display); cursor: pointer; transition: transform var(--dur-press); }
.ref-tone:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line); }
.ref-tone[aria-pressed="true"] { background: var(--c-fill); color: var(--on-fill); box-shadow: 0 3px 0 var(--c-deep); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.08); transform: scale(1.03); } }

/* =========================================================
   その他
   ========================================================= */
.menu { display: grid; gap: var(--space-3); }
.mindset { display: grid; gap: var(--space-3); }
.mindset__item { border-radius: var(--r); background: var(--c-soft); }
.mindset__no, .track__no { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 8px; border-radius: var(--r-pill); background: var(--c-fill); color: var(--on-fill); font: 900 var(--text-xs)/1 var(--font-display); }
.mindset__title, .track__title { font-size: var(--text-lg); }
.mindset__item p:last-child, .track p:last-child { font-size: var(--text-sm); }
.tracks { display: grid; gap: var(--space-3); }
.track { padding: var(--space-4); border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--c-fill); }
.track > * + * { margin-top: var(--space-2); }
.closing { text-align: center; padding: var(--space-6) 0; }
.closing > * + * { margin-top: var(--space-3); }
.closing__big { font: 900 var(--text-2xl)/1.3 var(--font-display); }

/* =========================================================
   図（figures.js の SVG）。色はその場の data-c
   ========================================================= */
.fig-string, .fig-fret { stroke: #cfccdc; stroke-width: 1; }
.fig-nut, .fig-nut-thin { stroke: var(--muted); stroke-width: 2.6; }
.fig-nut-thin { stroke-width: 1.8; }
.fig-nut-rect { fill: var(--muted); }
.fig-open { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.fig-mute { font: 900 11px var(--font-display); fill: var(--muted); }
.fig-dot { fill: var(--c-ink); }
.fig-body { fill: var(--bg); stroke: #cfccdc; stroke-width: 1.6; }
.fig-peg { fill: var(--surface-2); stroke: var(--muted); stroke-width: 1.2; }
.fig-hole { fill: var(--surface); stroke: #cfccdc; stroke-width: 1.6; }
.fig-leader { stroke: var(--muted); stroke-dasharray: 2 2; }
.fig-badge { fill: var(--c-fill); }
.fig-badge-text { font: 900 16px var(--font-display); fill: var(--on-fill); }
.fig-label { font: 800 12.5px var(--font-display); fill: var(--muted); }
.fig-note { fill: var(--bg); stroke: #cfccdc; stroke-width: 1.2; }
.fig-note--open { fill: var(--c-soft); stroke: var(--c-ink); }
.fig-note-text { font: 800 13px var(--font-display); fill: var(--muted); }
.fig-note-text--open { fill: var(--c-ink); }
.fig-fretmap .fig-label { font-size: 12px; }
.fig-node-hit { fill: transparent; }
.fig-fretmap .fig-string { stroke: #cfccdc; }
.fig-inlay { fill: var(--surface-2); }
.fig-node { stroke-width: 2.5; transition: transform var(--dur-press); }
.fig-node--done { fill: var(--c-fill); stroke: var(--c-deep); }
.fig-node--current { fill: var(--c-fill); stroke: var(--text); stroke-width: 3; }
.fig-node--todo { fill: var(--bg); stroke: #cfccdc; }
.fig-node-ring { fill: none; stroke: var(--text); stroke-width: 1.4; opacity: .4; }
.fig-node-check { fill: none; stroke: var(--on-fill); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig-node-text { font: 900 12px var(--font-display); fill: var(--muted); }
.fig-node-text--current { fill: var(--on-fill); }
.fig-node-link { cursor: pointer; }
.fig-node-link:focus-visible { outline: none; }
.fig-node-link:focus-visible .fig-node { stroke: var(--focus); stroke-width: 4; }

/* =========================================================
   動きを止める：OS の「視差効果を減らす」と、設定の「アニメーション」オフ
   状態の変化（色・✓）は残し、動きだけ止める
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.no-anim .task.is-done .task__box .icon { stroke-dashoffset: 0; }

/* ペース（サポート期間を設定したときだけ。記録の「あなたの現在地」） */
.pace { padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 700; }
.pace--ok { background: #e8f9e7; color: #267d30; }
.pace--mid { background: #fef2dd; color: #906606; }
.pace--low { background: #fef0ee; color: #b54a46; }

/* クリアの帯が出ている間は、ミニプレーヤーを帯の上へずらす（帯の高さは fx.js が --band-h に入れる。再評価 #6） */
body:has(#band:not([hidden])) .mini-player { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-4) + var(--band-h, 150px)); }

/* =========================================================
   強制カラーモード（Windows のハイコントラストなど。再評価 #1）
   影（box-shadow）と背景色が消えるので、枠を線で描き、チェック済み・選択中はシステムの強調色で示す
   ========================================================= */
@media (forced-colors: active) {
  .btn, .stepper__btn, .ref-tone, .segmented__item, .lesson-card, .note, .menu__item, .help-link, .task, .continue,
  .path__item--current .path__link, .explain, .accordion, .tool, .point, .ticket, .switches, .streak, .celebration,
  .band, .mini-player, .toast, .chip, .figure-card, .mindset__item, .track, .video-block, .video-embed__frame, .empty {
    border: 2px solid CanvasText;
  }
  .btn, .stepper__btn, .ref-tone { border-color: ButtonText; }
  .task__box { forced-color-adjust: none; background: Canvas; box-shadow: none; border: 2px solid CanvasText; }
  .task__box .icon { stroke: HighlightText; }
  .task.is-done .task__box { background: Highlight; border-color: Highlight; }
  .switch__input { forced-color-adjust: none; background: Canvas; box-shadow: none; border: 2px solid CanvasText; }
  .switch__input::after { background: CanvasText; box-shadow: none; }
  .switch__input:checked { background: Highlight; border-color: Highlight; }
  .switch__input:checked::after { background: HighlightText; }
  .segmented__item:has(input:checked), .ref-tone[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .progress__bar { border: 1px solid CanvasText; }
  .progress__bar i { forced-color-adjust: none; background: Highlight; }
  .tabbar__item[aria-current="page"] .tabbar__icon { outline: 2px solid Highlight; }
  .status--current { border: 1px solid CanvasText; }
}

/* =========================================================
   役割別レビューの対応で足した部品
   ========================================================= */
.stage__estimate, .continue__estimate { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 700; color: var(--c-ink); }
.continue__estimate { display: block; }
.explain-first__label { font: 900 var(--text-sm)/1.4 var(--font-display); letter-spacing: .08em; color: var(--c-ink); }
/* 解説の中身（2026-10-11）：開いたときの本文と「続きを読む」。続きを読むは枠を持たず、上の線で区切る（枠からはみ出さない） */
.explain__body { padding: 0 var(--space-4) var(--space-4); }
.explain .explain__body .prose { padding: 0; }
.explain-more { margin-top: var(--space-3); border-top: 1px solid var(--line); }
.explain-more__head { display: flex; align-items: center; gap: var(--space-2); min-height: 48px; font-weight: 700; cursor: pointer; list-style: none; }
.explain-more__head::-webkit-details-marker { display: none; }
.explain-more__head::after { content: "+"; margin-left: auto; font: 900 1.4rem/1 var(--font-display); color: var(--c-ink); transition: transform var(--dur-ui) var(--ease-out); }
.explain-more[open] .explain-more__head::after { transform: rotate(45deg); }
.explain-more .prose { padding-bottom: var(--space-1); }
/* 文節で改行（UI.phrase が <wbr> を入れる）。1行は入る幅の2/3まで（2026-10-11 オーナー依頼） */
.phrase { word-break: keep-all; overflow-wrap: anywhere; max-inline-size: 66.67%; text-wrap: wrap; }
.phrase .ph { white-space: nowrap; }
/* 1文ずつの塊。文と文の間を少し空けて、文の途中の改行と区別する（2026-10-16） */
.phrase__s { display: block; }
.phrase__s + .phrase__s { margin-top: .55em; }
/* まずはここだけ（閉じた状態でも押せると分かる形。2026-10-16）：
   左にアイコン、右に丸い「＋」（開くと×）。枠は色つき＋押せる厚み */
.explain-first { box-shadow: inset 0 0 0 1.5px var(--c-fill), 0 var(--press) 0 var(--c-deep); }
/* POINT の枠の中の解説（2026-10-16）：POINT の文の下に、押せる帯として置く。中の文は POINT より細く */
.point__text { font-weight: 700; }
.point .explain { margin-top: var(--space-4); font-weight: 500; }
.point .explain .explain-first__label, .point .explain__head { font-weight: 800; }
/* 初めて開く人へ：丸い＋のまわりに波紋を3回だけ出して、押せることを知らせる（動きを減らす設定では出さない） */
@keyframes explain-ping { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--c-fill) 70%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.point .explain-first:not([open]) .explain-first__head::after { animation: explain-ping 1.4s var(--ease-out) .8s 3; }
html.no-anim .point .explain-first__head::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .point .explain-first__head::after { animation: none; } }
/* 狭い画面（360px 未満）：POINT の枠と中の帯の余白を詰め、文の幅を確保する */
@media (max-width: 359px) {
  .point { padding-inline: var(--space-3); }
  .point .explain__head, .point .explain__body { padding-inline: var(--space-3); }
}
.explain-first__head { gap: var(--space-3); min-height: 64px; }
.explain-first__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); }
.explain-first__icon .icon { width: 20px; height: 20px; }
.explain-first__text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); min-width: 0; }
.explain-first .explain-first__label { font-size: var(--text-base); white-space: nowrap; }
.explain__hint { white-space: nowrap; }
.explain-first__head::after, .explain-more__head::after {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.6rem; line-height: 1;
}
.explain-first__head::after { background: var(--c-fill); color: var(--on-fill); }
.explain-more__head::after { box-shadow: inset 0 0 0 1.5px var(--c-fill); }
.phrase--full { max-inline-size: none; }   /* 見出し・短い説明：文節で切るだけ */
/* 入れ物の中身を包む塊（UI.phraseView）。入れ物の幅いっぱいを基準に、2/3までで改行する。2026-10-16 */
.phrase--in { display: block; flex: 1 1 auto; min-width: 0; }
.task__text, .help-link > span { flex: 1 1 auto; min-width: 0; }
/* コースにもどる（ステップの一番下）：前後のボタンの列から離して中央に */
.step-back { display: flex; justify-content: center; margin-top: var(--space-7) !important; padding-top: var(--space-5); border-top: 1px solid var(--line); }
.tool__note { font-size: var(--text-sm); color: var(--muted); }

/* テンポ・弦の選択（押せるチップ） */
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.preset { min-width: 52px; min-height: 44px; padding: 0 var(--space-3); margin-bottom: 3px; border: 0; border-radius: var(--r-pill); background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); font: 900 var(--text-sm)/1 var(--font-display); color: var(--text); cursor: pointer; transition: transform var(--dur-press); }
.preset:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line); }
.preset[aria-pressed="true"], .preset[aria-checked="true"] { background: var(--c-fill); color: var(--on-fill); box-shadow: 0 3px 0 var(--c-deep); }

/* ステップ内の小さなメトロノーム */
.mm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--r); background: var(--c-soft); }
.mm.is-playing { box-shadow: inset 0 0 0 3px var(--c-fill); }
.mm__label { font-weight: 700; margin-right: auto; }
.mm__step { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--c-fill); color: var(--c-ink); font: 900 1.3rem/1 var(--font-display); cursor: pointer; }
.mm__bpm { font: 900 1.75rem/1 var(--font-display); color: var(--c-ink); min-width: 2.6ch; text-align: center; font-variant-numeric: tabular-nums; }
.mm__unit { font: 900 var(--text-sm)/1 var(--font-display); color: var(--muted); }
.mm__play { margin-bottom: var(--press); min-width: 76px; }

/* アプリ内ブラウザの案内（画面の一番上） */
.inapp { padding: var(--space-4); background: var(--danger-soft); color: var(--text); font-size: var(--text-sm); }
.inapp > * + * { margin-top: var(--space-2); }
.inapp__title { font-weight: 700; color: var(--danger); font-size: var(--text-md); }
.inapp .btn { margin-top: var(--space-3); }

/* ホーム画面に追加の案内 */
.install { position: relative; padding: var(--space-4) var(--space-6) var(--space-4) var(--space-4); border-radius: var(--r); background: var(--c-soft); font-size: var(--text-sm); }
.install > * + * { margin-top: var(--space-2); }
.install__title { font-weight: 700; font-size: var(--text-md); color: var(--c-ink); }
.install__close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); font: 900 1.3rem/1 var(--font-display); cursor: pointer; }

/* レッスンについて */
.facts { display: grid; gap: var(--space-3); }
.fact { padding: var(--space-4); border-radius: var(--r); background: var(--surface); }
.fact__title { font-weight: 700; color: var(--c-ink); }
.howto { list-style: decimal; padding-left: 1.4em; display: grid; gap: var(--space-2); }
.howto li::marker { font-weight: 900; color: var(--c-ink); }

@media (forced-colors: active) {
  .preset, .mm, .mm__step, .install, .fact, .inapp { border: 2px solid CanvasText; }
  .preset[aria-pressed="true"], .preset[aria-checked="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* =========================================================
   もどる・ホームの欄・コース（2026-10-09 オーナーの依頼：構成の見直し）
   ========================================================= */
/* もどる：行き先の名前つきの白いピル。左上の決まった位置に、押せる厚みつきで出す */
.back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 var(--space-4) 0 var(--space-2); margin-bottom: 3px;
  border-radius: var(--r-pill); background: var(--bg); color: var(--text); font-weight: 700; text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); transition: transform var(--dur-press) var(--ease-out);
}
.back .icon { width: 22px; height: 22px; color: var(--c-ink); stroke-width: 2.4; }
.back:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line); }
.view > .back + .page-title, .back + .page-title { margin-top: var(--space-4); }

/* ホーム：欄の間を広めに（続きから・記録・目標曲・心のチューニング・なぜ1曲） */
.view--home > .section { margin-top: var(--space-6); }
.view--home > .continue + .hint { margin-top: var(--space-3); }
.sub-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-md); font-weight: 700; }
.section > .sub-title { margin-top: var(--space-5); }

/* 心のチューニング：6つの折りたたみ（初めての人には開いて出す） */
.mindset__head { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-3) var(--space-4); cursor: pointer; list-style: none; }
.mindset__head::-webkit-details-marker { display: none; }
.mindset__head::after { content: "+"; margin-left: auto; font: 900 1.4rem/1 var(--font-display); color: var(--c-ink); transition: transform var(--dur-ui) var(--ease-out); }
.mindset__item[open] .mindset__head::after { transform: rotate(45deg); }
.mindset__head .mindset__title { font-size: var(--text-md); }
.mindset__text { padding: 0 var(--space-4) var(--space-4); }

/* コース：全体の進み具合 */
.course-progress { padding: var(--space-4); border-radius: var(--r); background: var(--surface); }
.course-progress > * + * { margin-top: var(--space-2); }

@media (forced-colors: active) {
  .back, .course-progress { border: 2px solid CanvasText; }
}

/* =========================================================
   使い方（チュートリアル。js/tutorial.js）：カード5枚の <dialog> と、ステップのひとこと案内
   色は変数だけで書く（暗い地の画面でも変数の差し替えで合う）。塗りの上は墨文字、色の文字は ink
   ========================================================= */
/* 入口：文の中のリンク風ボタン（導入・ひとこと案内） */
.tut-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
/* その他のメニュー：リンクと同じ見た目のボタン */
button.menu__item { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }

/* ステップのひとこと案内（「できたらチェック」の上。下のチェックを指す） */
.tut-tip {
  position: relative; margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4) var(--space-2);
  border-radius: var(--r); background: var(--c-soft); color: var(--text); font-size: var(--text-sm); line-height: 1.7;
  box-shadow: inset 0 0 0 2px var(--c-fill);
}
.tut-tip strong { display: block; font-size: var(--text-md); }
.tut-tip::after { content: ""; position: absolute; left: 30px; top: 100%; border: 8px solid transparent; border-top-color: var(--c-fill); }
.tut-tip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-2); }

/* カード：高さは枚ごとに変えない（「次へ」の位置が動かないように）。入りきらない枚は中だけスクロール */
.tut-lock, .tut-lock body { overflow: hidden; }
.tut {
  width: min(440px, calc(100% - 24px)); height: min(780px, calc(100svh - 24px)); max-height: none; padding: 0;
  display: none; flex-direction: column;
  border: 0; border-radius: var(--r-lg); background: var(--bg); color: var(--text);
  box-shadow: 0 30px 60px -20px rgba(29, 26, 46, .45);
}
.tut[open] { display: flex; }
.tut::backdrop { background: rgba(29, 26, 46, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tut__top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3) 0 var(--space-5); }
.tut__count { display: inline-flex; align-items: center; gap: 10px; font: 900 var(--text-sm)/1 var(--font-display); letter-spacing: .12em; color: var(--muted); }
.tut__count::before {   /* その枚の色の印（ピックの形） */
  content: ""; width: 16px; height: 19px; border-radius: 46% 46% 50% 50% / 32% 32% 68% 68%; background: var(--c-fill);
}
.tut__close {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-3);
  border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: 700 var(--text-sm)/1 var(--font); cursor: pointer;
}
.tut__close span { font-size: 1.25rem; line-height: 1; }
.tut__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-2) var(--space-5) var(--space-4); touch-action: pan-y; }
.tut__title { font-size: 1.375rem; line-height: 1.45; word-break: auto-phrase; }
.tut__text { margin-top: var(--space-2); line-height: 1.8; }
.tut__fig { margin-top: var(--space-4); }
.tut-note { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--muted); line-height: 1.7; }
.tut-caption { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--muted); text-align: center; }
.tut-label { margin-top: var(--space-4); font-size: var(--text-sm); font-weight: 700; color: var(--c-ink); }
.tut__dots { display: flex; justify-content: center; gap: 8px; padding: var(--space-1) 0 var(--space-3); }
.tut__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width var(--dur-ui) var(--ease-out); }
.tut__dots i.is-on { width: 22px; border-radius: 4px; background: var(--text); }
.tut__nav { display: flex; gap: var(--space-3); padding: 0 var(--space-5) calc(var(--space-5) + var(--press)); }
.tut__nav .btn { flex: 1 1 0; }
.tut__nav .btn[hidden] { display: none; }

/* 1枚目：8つのピックと、コースの並びの抜粋 */
.tut-picks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 6px; padding-top: 30px; }
.tut-picks li { position: relative; display: grid; justify-items: center; }
.tut-picks .pick { width: 100%; max-width: 38px; }
.tut-picks .is-current .pick { transform: translateY(-4px); }
.tut-picks__bubble { position: absolute; bottom: calc(100% + 4px); padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; background: var(--text); color: var(--bg); font: 700 var(--text-sm)/1.2 var(--font); }
.tut-path { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.tut-path li { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--r); background: var(--surface); font-weight: 700; line-height: 1.5; }
.tut-path li:first-child { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-fill); }
.tut-path small { display: block; font-size: var(--text-sm); color: var(--c-ink); }
.tut-path__no { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); font: 900 var(--text-md)/1 var(--font-display); }

/* 2枚目：読む・弾く・チェック と、ためしに押せるチェック */
.tut-flow { display: grid; gap: var(--space-2); }
.tut-flow li, .tut-rows > li { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--r); background: var(--surface); font-size: var(--text-sm); line-height: 1.6; }
.tut-flow b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); font: 900 var(--text-md)/1 var(--font-display); }
:is(.tut-flow, .tut-rows) strong { display: block; font-size: var(--text-md); }
.tut-try { margin-top: var(--space-2); }
.tut-try__done { min-height: 1.7em; margin-top: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--text); }

/* 3枚目：直近7日の見本 */
.tut-week { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--r); background: var(--surface); }
.tut-week__days { display: flex; align-items: flex-end; gap: 6px; }
.tut-week li { display: grid; justify-items: center; gap: 4px; font: 700 var(--text-sm)/1 var(--font); color: var(--muted); }
.tut-week i { display: block; width: 20px; height: 23px; border-radius: 46% 46% 50% 50% / 32% 32% 68% 68%; box-shadow: inset 0 0 0 1.5px var(--field); }
.tut-week .is-hit i { background: var(--c-fill); box-shadow: none; }
.tut-week .is-today span { padding: 2px 6px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); }
.tut-week__sum { margin-left: auto; font: 700 var(--text-sm)/1.4 var(--font); color: var(--muted); text-align: right; }
.tut-week__sum b { font: 900 1.5rem/1 var(--font-display); color: var(--text); margin-right: 2px; }

/* 4・5枚目：タブと助けの一覧 */
.tut-rows { display: grid; gap: var(--space-2); }
.tut-rows__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-fill); color: var(--on-fill); }
.tut-rows__icon .icon { width: 22px; height: 22px; }
.tut-finish { margin-top: var(--space-5); }

/* めくる動き：その向きから少しだけ（「視差効果を減らす」とアニメーション OFF では上の規則で止まる） */
.tut__slide.is-next { animation: tut-in-next var(--dur-enter) var(--ease-out); }
.tut__slide.is-prev { animation: tut-in-prev var(--dur-enter) var(--ease-out); }
@keyframes tut-in-next { from { opacity: 0; transform: translateX(24px); } }
@keyframes tut-in-prev { from { opacity: 0; transform: translateX(-24px); } }

@media (forced-colors: active) {
  .tut { border: 2px solid CanvasText; }
  .tut-tip, .tut-flow li, .tut-rows > li, .tut-path li, .tut-week, .tut__close { border: 1px solid CanvasText; }
  .tut__dots i.is-on { background: Highlight; }
}
