/* マナビバ — 知的・明るい教室（白×ティール×黄 / iOS） */
:root {
  --bg: #f2f6f5;
  --card: #ffffff;
  --ink: #102a27;
  --ink-2: #4b625f;
  --sep: rgba(16, 42, 39, .12);
  --teal: #12a39a;
  --teal-ink: #0a6e67;
  --teal-50: #e3f5f3;
  --teal-100: #c9ece8;
  --yellow: #ffd23f;
  --yellow-50: #fff6d6;
  --yellow-ink: #6b5000;
  --red: #c0392b;
  --red-50: #fdecea;
  --ja: 'Murecho', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', system-ui, sans-serif;
  --en: 'Lexend', 'Murecho', sans-serif;
  --r-card: 22px;
  --r-btn: 16px;
  --ios: cubic-bezier(.32, .72, 0, 1);
  --sh: 0 1px 2px rgba(16, 42, 39, .05), 0 8px 24px rgba(16, 42, 39, .06);
  --top: env(safe-area-inset-top);
  --bot: env(safe-area-inset-bottom);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ja); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg);
  line-break: strict; word-break: keep-all; overflow-wrap: break-word; font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-feature-settings: "palt"; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.ic { width: 24px; height: 24px; flex: none; }
.ic.xs { width: 18px; height: 18px; }
.num { font-family: var(--en); font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 8px; }

/* ---------- 枠 ---------- */
.app { position: fixed; inset: 0; height: 100dvh; overflow: hidden; background: var(--bg); }
.stack { position: absolute; inset: 0; overflow: hidden; }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); z-index: 2; will-change: transform; }
.page.under { z-index: 1; }
.page.front { z-index: 3; box-shadow: -12px 0 32px rgba(16, 42, 39, .14); }
.page.buried { visibility: hidden; }
.page.fade-in { animation: fadeIn .22s ease-out; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-top: calc(52px + var(--top)); }
.tail { height: calc(120px + var(--bot)); }
@media (min-width: 600px) {
  body { background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(18, 163, 154, .12) 31px 32px), var(--teal-50); }
  .app { left: 50%; right: auto; width: 430px; transform: translateX(-50%); box-shadow: 0 30px 80px rgba(16, 42, 39, .2); }
}

/* ---------- ナビゲーションバー ---------- */
.nb {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  height: calc(52px + var(--top)); padding: var(--top) 12px 0;
  transition: background-color .2s, box-shadow .2s;
}
.compact .nb { background: rgba(242, 246, 245, .86); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 1px 0 var(--sep); }
.nb-t { font-size: 17px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; opacity: 0; transition: opacity .2s; }
.compact .nb-t, .nb-t.show { opacity: 1; }
.nb-r { display: flex; justify-content: flex-end; }
.nb-sp { display: block; }
.nb-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 14px 0 8px; border-radius: 22px;
  color: var(--teal-ink); font-size: 16px; font-weight: 700; max-width: 40vw;
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 1px 6px rgba(16, 42, 39, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.nb-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-back:active { transform: scale(.95); }
.nb-ib { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--ink-2); background: rgba(255, 255, 255, .78); box-shadow: 0 1px 6px rgba(16, 42, 39, .1); }
.nb-ib.on { color: var(--teal-ink); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-ink); color: #fff; font-size: 17px; font-weight: 700; }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; flex: none; }
.lt-wrap { padding: 0 20px 10px; }
.lt-sub { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.lt { font-size: 34px; font-weight: 900; line-height: 1.25; letter-spacing: .01em; }

/* ---------- タブバー（Liquid Glass） ---------- */
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: calc(10px + var(--bot)); z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; height: 66px; padding: 6px;
  border-radius: 33px; background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 34px rgba(16, 42, 39, .16), inset 0 1px 0 rgba(255, 255, 255, .95);
  transition: transform .42s var(--ios), opacity .2s;
}
.tabbar.hide { transform: translateY(150%); opacity: 0; pointer-events: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 27px; color: var(--ink-2); font-size: 13px; font-weight: 700; transition: background-color .25s, transform .2s var(--ios); }
.tab .f { display: none; }
.tab.on { background: rgba(18, 163, 154, .14); color: var(--teal-ink); }
.tab.on .o { display: none; }
.tab.on .f { display: block; }
.tab:active { transform: scale(.92); }
.tab span { line-height: 1.2; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: var(--r-btn); font-size: 17px; font-weight: 700; line-height: 1.3; text-align: center;
  transition: transform .2s var(--ios), opacity .15s;
}
.btn:active { transform: scale(.97); opacity: .88; }
.btn.fill { background: var(--teal-ink); color: #fff; box-shadow: 0 6px 16px rgba(10, 110, 103, .25); }
.btn.tint { background: var(--teal-50); color: var(--teal-ink); }
.btn.plain { color: var(--teal-ink); }
.btn.wide { width: 100%; }
.btn:disabled { background: #d9e2e0; color: var(--ink-2); box-shadow: none; }
.link { color: var(--teal-ink); font-weight: 700; min-height: 44px; padding: 0 6px; }
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; gap: 10px; padding: 14px 16px calc(14px + var(--bot)); background: linear-gradient(to top, var(--bg) 72%, rgba(242, 246, 245, 0)); }
.app:not(.no-tabs) .dock { bottom: calc(82px + var(--bot)); padding-bottom: 8px; }
.dock .btn { flex: 1; }
.dock.two .btn.tint { flex: .7; }

/* ---------- 学ぶ ---------- */
.cont { display: flex; align-items: center; gap: 14px; margin: 6px 16px 0; padding: 12px; background: var(--card); border-radius: 26px; box-shadow: var(--sh); transition: transform .2s var(--ios); }
.cont:active { transform: scale(.98); }
.cont-img { width: 92px; height: 92px; flex: none; border-radius: 18px; overflow: hidden; background: var(--teal-50); }
.cont-img img { width: 100%; height: 100%; object-fit: cover; }
.cont-ill { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; }
.cont-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cont-k { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--teal-ink); }
.cont-t { font-size: 18px; font-weight: 700; line-height: 1.4; }
.cont-s { font-size: 13px; color: var(--ink-2); }
.cont-play { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); box-shadow: 0 6px 14px rgba(255, 210, 63, .5); }
.cont-play .ic { margin-left: 3px; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--teal-50); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--teal); }
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 20px 6px; flex-wrap: wrap; }
.sec-t { font-size: 21px; font-weight: 700; line-height: 1.35; }
.sec-t.pad { padding: 26px 20px 10px; }
.due { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; background: var(--teal-50); color: var(--teal-ink); font-size: 13px; font-weight: 700; }
.due.hot { background: var(--red-50); color: var(--red); }
.sec-note { font-size: 14px; color: var(--ink-2); padding: 0 20px 10px; }
.group { margin: 0 16px; background: var(--card); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh); }
.group > li { position: relative; }
.group > li + li::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--sep); }
.req { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px 12px 16px; transition: background-color .15s; }
.req:active { background: var(--teal-50); }
.req-ring { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.req-ring .ring { position: absolute; inset: 0; }
.ring-t { fill: none; stroke: var(--teal-50); }
.ring-f { fill: none; stroke: var(--teal); stroke-linecap: round; transition: stroke-dasharray .6s var(--ios); }
.ring.is-done .ring-f { stroke: var(--teal-ink); }
.ring.is-ng .ring-f { stroke: #d98a1f; }
.ring-n { font-size: 14px; font-weight: 600; color: var(--ink); }
.ring-ic { color: var(--teal-ink); }
.req-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req-t { font-size: 16px; font-weight: 700; line-height: 1.45; }
.req-s { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.req-b .chip { align-self: flex-start; margin-top: 5px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px 9px; border-radius: 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.done { background: var(--teal-50); color: var(--teal-ink); }
.chip.doing { background: var(--yellow-50); color: var(--yellow-ink); }
.chip.new { background: #eef2f1; color: var(--ink-2); }
.chev { color: #8fa29f; }
.shelf { display: flex; gap: 14px; overflow-x: auto; padding: 4px 20px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.book { flex: none; width: 156px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; transition: transform .2s var(--ios); }
.book:active { transform: scale(.96); }
.book-cv { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--sh); }
.book-cv img { width: 100%; height: 100%; object-fit: cover; }
.book-cv::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(90deg, rgba(16, 42, 39, .12), transparent); z-index: 1; }
.book-p { position: absolute; left: 0; bottom: 0; height: 5px; width: calc(var(--p) * 100%); background: var(--teal); }
.book-t { font-size: 15px; font-weight: 700; line-height: 1.45; margin-top: 4px; }
.book-s { font-size: 13px; color: var(--ink-2); }
.remind { display: flex; align-items: center; gap: 12px; margin: 26px 16px 0; padding: 14px 14px 14px 16px; border-radius: 20px; background: var(--yellow-50); font-size: 14px; color: var(--ink-2); }
.remind > .ic:first-child { color: var(--yellow-ink); }
.remind span { flex: 1; }
.remind b { display: block; font-size: 16px; color: var(--ink); }

/* ---------- コース ---------- */
.course-top { margin-top: calc(-52px - var(--top)); }
.cv-hero { margin-top: calc(-52px - var(--top)); height: 300px; background: #fff; overflow: hidden; }
.cv-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.cv-body { position: relative; margin-top: -26px; padding: 22px 20px 0; background: var(--bg); border-radius: 28px 28px 0 0; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 10px; background: var(--teal-50); color: var(--teal-ink); font-size: 13px; font-weight: 700; }
.tag.must { background: var(--yellow); color: var(--ink); }
.cv-t { font-size: 27px; font-weight: 900; line-height: 1.35; margin-top: 10px; }
.cv-lead { font-size: 15px; line-height: 1.85; color: var(--ink-2); margin-top: 6px; }
.cv-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0 0; padding: 12px 0; background: var(--card); border-radius: 18px; box-shadow: var(--sh); }
.cv-meta div { text-align: center; border-left: 1px solid var(--sep); }
.cv-meta div:first-child { border-left: 0; }
.cv-meta dt { font-size: 13px; color: var(--ink-2); }
.cv-meta dd { margin: 0; font-size: 15px; font-weight: 700; }
.cv-meta dd .num, .cv-meta dd.num { font-size: 20px; font-weight: 600; }
.cv-prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; font-weight: 600; }
.cv-prog .bar { flex: 1; margin: 0; height: 8px; border-radius: 4px; }
.syl { margin: 0 16px; padding: 4px 0; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh); }
.syl > li { position: relative; }
.syl > li:not(:last-child)::after { content: ""; position: absolute; left: 33px; top: 54px; bottom: -18px; width: 2px; background: var(--teal-100); z-index: 0; }
.syl > li.done:not(:last-child)::after { background: var(--teal); }
.node { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px 12px 16px; transition: background-color .15s; }
.node:active { background: var(--teal-50); }
.node-dot { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--teal-100); background: #fff; color: var(--teal-ink); font-size: 15px; font-weight: 600; }
.done .node-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.cur .node-dot { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 0 0 0 5px rgba(255, 210, 63, .3); }
.node-dot.gold { background: var(--yellow-50); border-color: var(--yellow); color: var(--yellow-ink); }
.done .node-dot.gold { background: var(--yellow); color: var(--ink); }
.node-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.node-k { font-size: 13px; font-weight: 700; color: var(--teal-ink); }
.node-t { font-size: 16px; font-weight: 700; line-height: 1.45; }
.node-s { font-size: 13px; color: var(--ink-2); }

/* ---------- レッスン ---------- */
.lesson { padding-top: calc(56px + var(--top)); }
.pl { position: relative; margin: 0 16px; }
.slide-box {
  aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--sep);
  box-shadow: 0 12px 30px rgba(16, 42, 39, .1); touch-action: pan-y; user-select: none;
}
.slide-box.sl-in .sl { animation: slIn .45s var(--ios); }
.sl { height: 100%; padding: 14px 16px; background: repeating-linear-gradient(180deg, #fff 0 25px, rgba(18, 163, 154, .07) 25px 26px); }
.sl-title { display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; align-items: center; padding-right: 10px; }
.sl-k { font-size: 13px; font-weight: 600; color: var(--teal-ink); letter-spacing: .08em; }
.sl-h { font-size: 23px; font-weight: 900; line-height: 1.4; margin-top: 2px; }
.sl-h mark, .sl-h2 mark { background: linear-gradient(transparent 58%, var(--yellow) 58%); color: inherit; padding: 0 1px; }
.sl-c { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.sl-img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.sl-h2 { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.sl-points ol { display: flex; flex-direction: column; gap: 3px; }
.sl-points li { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 10px; font-size: 14px; line-height: 1.45; transition: background-color .3s; }
.sl-points li b { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--teal-50); color: var(--teal-ink); font-size: 14px; font-weight: 600; }
.sl-points li strong { color: var(--teal-ink); margin-right: 6px; }
.sl-points li.act { background: var(--yellow-50); }
.sl-points li.act b { background: var(--yellow); color: var(--ink); }
.cmp2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cmp-ng, .cmp-ok { border-radius: 14px; padding: 8px 10px; background: #f5f8f7; border: 2px solid transparent; transition: border-color .3s, background-color .3s; }
.cmp-tag { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; }
.cmp-ng .cmp-tag { color: var(--red); }
.cmp-ok .cmp-tag { color: var(--teal-ink); }
.cmp-x { font-size: 14px; line-height: 1.5; margin-top: 2px; }
.cmp-ng.act { border-color: var(--red); background: var(--red-50); }
.cmp-ok.act { border-color: var(--teal); background: var(--teal-50); }
.pl-over { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; aspect-ratio: 16 / 9; }
.pl-big { pointer-events: auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--teal-ink); box-shadow: 0 10px 30px rgba(16, 42, 39, .25); transition: transform .25s var(--ios), opacity .25s; }
.pl-big .ic { width: 32px; height: 32px; margin-left: 4px; }
.pl-big:active { transform: scale(.92); }
.playing .pl-big { opacity: 0; transform: scale(.7); pointer-events: none; }
.pl-count { position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 10px; background: rgba(16, 42, 39, .78); color: #fff; font-size: 13px; font-weight: 600; }
.cap { margin: 12px 16px 0; min-height: 84px; padding: 12px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--sh); font-size: 17px; font-weight: 500; line-height: 1.75; transition: opacity .2s; }
.cap.off { opacity: 0; }
.cap-hl { background: linear-gradient(rgba(255, 210, 63, .85), rgba(255, 210, 63, .85)) no-repeat 0 88% / calc(var(--p, 0) * 100%) 36%; }
.scrub { margin: 10px 20px 0; padding: 12px 0 0; touch-action: none; cursor: pointer; }
.scrub-tr { position: relative; height: 6px; border-radius: 3px; background: var(--teal-100); }
.scrub-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--teal); }
.tick { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: rgba(16, 42, 39, .3); }
.tick:first-of-type { display: none; }
.scrub-th { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); box-shadow: 0 2px 6px rgba(16, 42, 39, .2); }
.scrub-t { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.ctl { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.ctl-b { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transition: transform .2s var(--ios), background-color .15s; }
.ctl-b:active { background: var(--teal-50); transform: scale(.9); }
.ctl-play { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-ink); color: #fff; box-shadow: 0 10px 24px rgba(10, 110, 103, .32); transition: transform .2s var(--ios); }
.ctl-play .ic { width: 32px; height: 32px; }
.ctl-play:active { transform: scale(.92); }
.ctl-sp { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--teal-ink); font-size: 15px; font-weight: 600; box-shadow: var(--sh); }
.pl-mode { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.ls-h { padding: 20px 20px 0; }
.ls-k { font-size: 13px; font-weight: 700; color: var(--teal-ink); }
.ls-t { font-size: 23px; font-weight: 700; line-height: 1.4; }
.trs { margin: 0 16px; padding: 6px 0; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh); }
.trs-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; font-size: 14px; font-weight: 700; color: var(--teal-ink); }
.trs-h .num { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-50); font-size: 13px; }
.trs-l { display: grid; grid-template-columns: 40px 1fr; gap: 8px; width: 100%; min-height: 44px; padding: 8px 16px; text-align: left; transition: background-color .2s; }
.trs-l:active { background: var(--teal-50); }
.trs-l.cur { background: var(--teal-50); }
.trs-l.cur .trs-x { font-weight: 700; }
.trs-tm { font-size: 13px; color: var(--ink-2); padding-top: 3px; }
.trs-x { font-size: 15px; line-height: 1.75; }

/* ---------- テスト ---------- */
.test { padding-top: calc(56px + var(--top)); padding-bottom: calc(110px + var(--bot)); }
.test.qin > * { animation: slIn .4s var(--ios) both; }
.qprog { display: flex; gap: 6px; padding: 6px 20px 0; }
.qprog i { flex: 1; height: 6px; border-radius: 3px; background: #d6e0de; }
.qprog i.ok { background: var(--teal); }
.qprog i.ng { background: var(--red); }
.qprog i.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--teal-ink); }
.q-k { display: flex; align-items: baseline; gap: 8px; padding: 18px 20px 0; flex-wrap: wrap; }
.q-k > .num:first-child { font-size: 26px; font-weight: 700; color: var(--teal-ink); }
.q-of { font-size: 15px; color: var(--ink-2); }
.q-type { margin-left: auto; padding: 2px 10px; border-radius: 8px; background: var(--yellow-50); color: var(--yellow-ink); font-size: 13px; font-weight: 700; }
.q-t { font-size: 21px; font-weight: 700; line-height: 1.6; padding: 8px 20px 18px; }
.opts { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 12px 16px; text-align: left;
  background: var(--card); border: 2px solid transparent; border-radius: 18px; box-shadow: var(--sh);
  font-size: 16px; font-weight: 500; line-height: 1.55; transition: transform .2s var(--ios), border-color .15s, background-color .15s;
}
.opt:active { transform: scale(.98); }
.opt-m { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid #9fb4b0; color: #fff; }
.multi .opt-m { border-radius: 8px; }
.opt.sel { border-color: var(--teal-ink); background: var(--teal-50); }
.opt.sel .opt-m { background: var(--teal-ink); border-color: var(--teal-ink); }
.opt.right { border-color: var(--teal); background: var(--teal-50); }
.opt.right .opt-m { background: var(--teal); border-color: var(--teal); }
.opt.wrong { border-color: var(--red); background: var(--red-50); }
.opt.wrong .opt-m { background: var(--red); border-color: var(--red); }
.opt.faded { color: var(--ink-2); box-shadow: none; background: #eef2f1; }
.opts.tf { flex-direction: row; }
.tf .opt { flex: 1; flex-direction: column; justify-content: center; min-height: 150px; gap: 8px; text-align: center; font-size: 17px; font-weight: 700; }
.tf .opt-m { width: 64px; height: 64px; border: 0; color: var(--teal-ink); font-size: 46px; font-weight: 700; line-height: 1; background: var(--teal-50); }
.tf .opt:nth-child(2) .opt-m { color: var(--red); background: var(--red-50); }
.tf .opt.sel .opt-m, .tf .opt.right .opt-m { background: var(--teal-ink); color: #fff; }
.tf .opt.wrong .opt-m { background: var(--red); color: #fff; }
.fb { margin: 16px 16px 0; padding: 14px 16px; border-radius: 18px; border-left: 6px solid; animation: slIn .4s var(--ios); }
.fb.ok { background: var(--teal-50); border-color: var(--teal); }
.fb.ng { background: var(--red-50); border-color: var(--red); }
.fb-h { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; }
.fb.ok .fb-h { color: var(--teal-ink); }
.fb.ng .fb-h { color: var(--red); }
.fb-x { font-size: 15px; line-height: 1.8; margin-top: 4px; }

/* ---------- 結果 ---------- */
.res { position: relative; text-align: center; padding: 6px 20px 0; }
.res-ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.res-ring .ring { position: absolute; inset: 0; }
.res-n { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 52px; }
.res-n .num { font-size: 58px; font-weight: 700; line-height: 1; }
.res-n small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.stamp {
  position: absolute; top: 0; left: calc(50% + 52px); display: grid; place-items: center; width: 84px; height: 84px;
  border-radius: 50%; border: 4px double var(--red); color: var(--red); background: #fff; font-size: 22px; font-weight: 900; letter-spacing: .05em;
  transform: rotate(-14deg); animation: stampIn .5s var(--ios) .2s both;
}
.fail .stamp { border-color: var(--ink-2); color: var(--ink-2); font-size: 17px; }
.res-t { font-size: 23px; font-weight: 700; margin-top: 14px; }
.res-s { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.review summary { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px 10px 16px; cursor: pointer; list-style: none; }
.review summary::-webkit-details-marker { display: none; }
.review details[open] .chev { transform: rotate(90deg); }
.chev { transition: transform .25s var(--ios); }
.rv-m { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.rv-m.ok { background: var(--teal); }
.rv-m.ng { background: var(--red); }
.rv-t { flex: 1; min-width: 0; font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details[open] .rv-t { display: block; }
.rv-b { padding: 0 16px 14px 52px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.rv-a { color: var(--teal-ink); font-weight: 700; }

/* ---------- 修了証 ---------- */
.cert-stage { padding: 6px 16px 0; perspective: 900px; }
.cert-cv { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 18px 40px rgba(16, 42, 39, .18); background: #fffdf6; }
.cert-cv.in { animation: certIn .7s var(--ios); }
.cert-info { margin-top: 18px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 16px; text-align: left; font-size: 16px; }
button.row:active, a.row:active { background: var(--teal-50); }
.row-k { flex: 1; min-width: 0; }
.cert-info .row-k { flex: none; width: 92px; font-size: 15px; color: var(--ink-2); }
.row-v { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot { font-size: 13px; color: var(--ink-2); padding: 8px 32px 0; line-height: 1.7; }
.lock-card { width: 230px; height: 162px; margin: 0 auto 18px; border-radius: 10px; border: 2px dashed #9fb4b0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); font-size: 15px; font-weight: 700; background: #fffdf6; }
.cert-grid { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
.cert-card { background: var(--card); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh); transition: transform .2s var(--ios); }
.cert-card:active { transform: scale(.98); }
.cert-mini { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--sep); }
.cert-card-b { display: flex; flex-direction: column; padding: 12px 16px; }
.cert-card-t { font-size: 16px; font-weight: 700; }
.cert-card-s { font-size: 13px; color: var(--ink-2); }
.mini-cv { position: relative; width: 48px; height: 48px; flex: none; border-radius: 12px; overflow: hidden; background: var(--teal-50); }
.mini-cv img { width: 100%; height: 100%; object-fit: cover; }
.mini-cv .ic { position: absolute; right: 3px; bottom: 3px; padding: 2px; border-radius: 50%; background: #fff; color: var(--ink-2); }

/* ---------- 進捗 ---------- */
.card { margin: 0 16px 14px; padding: 16px; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh); }
.wk-h { display: flex; align-items: center; justify-content: space-between; }
.wk-k { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.wk-n .num { font-size: 50px; font-weight: 700; line-height: 1.1; }
.wk-n small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.wk-goal { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.wk-goal .ring { position: absolute; inset: 0; }
.wk-gp { font-size: 13px; font-weight: 700; }
.wk-gp .num { font-size: 15px; }
.wk-s { font-size: 14px; color: var(--ink-2); }
.wk-bars { display: flex; gap: 8px; height: 150px; padding-top: 18px; margin-top: 6px; }
.wb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.wb i { width: 100%; max-width: 30px; min-height: 4px; border-radius: 8px; background: var(--teal-100); }
.wb.today i { background: var(--teal); }
.wb-v { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.wb-k { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.wb.today .wb-k { color: var(--teal-ink); font-weight: 700; }
.sc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sc-streak { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 14px; background: var(--yellow); font-size: 14px; font-weight: 700; }
.stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.st { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px dashed #b4c6c2; display: grid; place-items: center; }
.st-d { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.st.on { border: 2px solid var(--teal-100); background: #fff; }
.st-m { position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 50%; background: rgba(18, 163, 154, .9); color: #fff; transform: rotate(-12deg); animation: stampIn .4s var(--ios) both; }
.st.on .st-d { visibility: hidden; }
.st.today { border-color: var(--yellow); border-style: solid; border-width: 3px; }
.sc-note { font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.due-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.due-card > .ic { color: var(--teal-ink); }
.due-card.hot { background: var(--red-50); }
.due-card.hot > .ic { color: var(--red); }
.due-t { font-size: 16px; font-weight: 700; }
.due-s { font-size: 14px; color: var(--ink-2); }

/* ---------- 設定 ---------- */
.grp-h { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 24px 32px 8px; }
.prof { min-height: 84px; gap: 14px; }
.prof-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prof-n { font-size: 19px; font-weight: 700; }
.prof-s { font-size: 13px; color: var(--ink-2); }
.row-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--c); color: #fff; }
.row.danger .row-k { color: var(--red); font-weight: 700; }
.group > li:has(.row-ic) + li::before { left: 58px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0 16px 14px 58px; padding: 3px; border-radius: 12px; background: #e9efee; }
.seg button { min-height: 40px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: background-color .2s; }
.seg button.on { background: #fff; color: var(--teal-ink); box-shadow: 0 2px 6px rgba(16, 42, 39, .12); }
.tgl { appearance: none; -webkit-appearance: none; position: relative; width: 51px; height: 31px; flex: none; margin: 0; border-radius: 16px; background: #d3dcda; cursor: pointer; transition: background-color .25s; }
.tgl::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: transform .3s var(--ios); }
.tgl:checked { background: var(--teal); }
.tgl:checked::after { transform: translateX(20px); }
.sel { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink-2); text-align: right; max-width: 52%; min-height: 44px; font-size: 15px; }
.time { border: 0; border-radius: 8px; background: #e9efee; padding: 6px 10px; font-family: var(--en); font-size: 16px; color: var(--ink); }

/* ---------- アプリについて ---------- */
.ab-h { text-align: center; padding: 8px 20px 4px; }
.ab-h img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 10px; box-shadow: var(--sh); }
.ab-n { font-size: 25px; font-weight: 900; }
.ab-v { font-size: 14px; color: var(--ink-2); }
.ab-hero { width: calc(100% - 32px); margin: 16px auto; border-radius: 22px; }
.para { padding: 0 20px; font-size: 15px; line-height: 1.85; }
.note-box { margin: 16px; padding: 14px 16px; border-radius: 16px; background: var(--yellow-50); font-size: 14px; line-height: 1.8; }
.tech li { display: flex; flex-direction: column; padding: 12px 16px; }
.tech b { font-family: var(--en); font-size: 15px; font-weight: 600; }
.tech span { font-size: 14px; color: var(--ink-2); }
.wide-m { display: flex; margin: 22px 16px 0; }

/* ---------- 空の状態 ---------- */
.empty { text-align: center; padding: 24px 28px; }
.empty > img { width: 210px; height: 210px; object-fit: cover; border-radius: 40px; margin: 0 auto 16px; }
.empty-t { font-size: 19px; font-weight: 700; }
.empty-s { font-size: 15px; color: var(--ink-2); margin: 6px 0 18px; line-height: 1.75; }

/* ---------- シート・アラート・トースト ---------- */
.dim { position: absolute; inset: 0; z-index: 40; background: rgba(16, 42, 39, .3); opacity: 0; transition: opacity .3s; }
.dim.on { opacity: 1; }
.sheet {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--bot)); z-index: 41; max-height: 86dvh; overflow-y: auto;
  border-radius: 34px; background: rgba(252, 254, 254, .97); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(16, 42, 39, .3); padding-bottom: 14px;
  transform: translateY(115%); transition: transform .42s var(--ios);
}
.sheet.on { transform: translateY(0); }
.grab { display: grid; place-items: center; height: 26px; touch-action: none; cursor: grab; }
.grab i { width: 38px; height: 5px; border-radius: 3px; background: #c4d0ce; }
.sh-pad { padding: 2px 20px 6px; }
.sh-t { font-size: 21px; font-weight: 700; }
.sh-s { font-size: 14px; color: var(--ink-2); margin: 4px 0 14px; }
.sh-pad .btn + .btn { margin-top: 6px; }
.pick { margin: 0; box-shadow: none; background: #f2f6f5; }
.chk { color: var(--teal-ink); }
.done-sh { text-align: center; }
.done-badge { width: 72px; height: 72px; margin: 4px auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; animation: stampIn .5s var(--ios); }
.done-badge .ic { width: 38px; height: 38px; }
.field { display: block; padding: 8px 14px; border-radius: 14px; background: #e9efee; }
.field span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input { display: block; width: 100%; border: 0; background: transparent; font-size: 19px; padding: 2px 0 4px; outline: none; }
.field-err { color: var(--red); font-size: 14px; margin: 6px 4px 0; }
.sh-pad .field + .btn, .sh-pad .field-err + .btn { margin-top: 16px; }
.alert-wrap { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(16, 42, 39, .32); opacity: 0; transition: opacity .18s; }
.alert-wrap.on { opacity: 1; }
.alert { width: 290px; border-radius: 24px; overflow: hidden; text-align: center; background: rgba(250, 252, 252, .97); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); transform: scale(1.08); transition: transform .3s var(--ios); }
.alert-wrap.on .alert { transform: scale(1); }
.alert-b { padding: 20px 18px 16px; }
.alert-t { font-size: 17px; font-weight: 700; line-height: 1.5; }
.alert-x { font-size: 14px; color: var(--ink-2); line-height: 1.65; margin-top: 4px; }
.alert-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--sep); }
.alert-btns.v { grid-template-columns: 1fr; }
.alert-btns button { min-height: 50px; font-size: 17px; color: var(--teal-ink); }
.alert-btns button + button { border-left: 1px solid var(--sep); }
.alert-btns.v button + button { border-left: 0; border-top: 1px solid var(--sep); }
.alert-btns button:active { background: rgba(16, 42, 39, .06); }
.alert-btns .strong { font-weight: 700; }
.alert-btns .danger { color: var(--red); font-weight: 700; }
.toast {
  position: absolute; left: 16px; right: 16px; top: calc(8px + var(--top)); z-index: 60; transform: translateY(-160%);
  display: flex; align-items: center; gap: 8px; width: fit-content; margin: 0 auto; padding: 10px 18px; border-radius: 26px;
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(16, 42, 39, .18); font-size: 15px; font-weight: 700; transition: transform .45s var(--ios), visibility 0s .45s; visibility: hidden;
}
.toast .ic { color: var(--teal-ink); }
.toast.on { transform: translateY(0); visibility: visible; transition: transform .45s var(--ios); }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #0f978e; color: #fff; transition: opacity .3s; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); animation: stampIn .6s var(--ios); }
.splash p { font-size: 30px; font-weight: 900; letter-spacing: .08em; }
.splash.bye { opacity: 0; }
.onb { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; background: #fff; animation: fadeIn .3s; touch-action: pan-y; }
.onb.bye { opacity: 0; transition: opacity .25s; }
.onb-art { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--teal-50); border-radius: 0 0 44px 44px; overflow: hidden; }
.onb-art img { width: min(88%, 380px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 40px; mix-blend-mode: multiply; animation: slIn .5s var(--ios); }
.onb-b { padding: 22px 24px calc(14px + var(--bot)); text-align: center; }
.onb-t { font-size: 26px; font-weight: 900; line-height: 1.4; }
.onb-s { font-size: 15px; color: var(--ink-2); line-height: 1.8; margin-top: 8px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 18px 0 14px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: #c4d4d1; transition: width .3s var(--ios); }
.dots i.on { width: 22px; background: var(--teal-ink); }
.onb .btn + .btn { margin-top: 4px; }

.nojs, .fatal { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; padding: 16px; border-radius: 18px; background: #fff; box-shadow: var(--sh); font-size: 15px; }
.fatal-t { font-weight: 700; font-size: 17px; }
.fatal a { display: inline-block; min-height: 44px; line-height: 44px; color: var(--teal-ink); text-decoration: underline; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slIn { from { opacity: 0; transform: translateX(14px); } }
@keyframes stampIn { from { opacity: 0; transform: scale(1.5) rotate(-14deg); } }
@keyframes certIn { from { opacity: 0; transform: translateY(24px) rotateX(18deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }
}
