@charset "UTF-8";
/* =========================================================
   Learnly — 学ぶ、つながる、未来がひらく。
   デザインカンプ: design/learnly-ui-01-core.png / -02-gamification.png
   静謐・余白主導のミニマル。彩度を上げるのはガチャ演出のみ。
   ========================================================= */

/* ---------------------------------------------- tokens */
:root {
  /* 面 */
  --bg:          #F4F4F3;
  --bg-soft:     #FAFAF9;
  --surface:     #FFFFFF;
  --surface-2:   #F7F7F6;
  --line:        #E6E6E3;
  --line-soft:   #EFEFEC;

  /* 文字 */
  --ink:         #1A1A1A;
  --ink-2:       #6B6B6B;
  --ink-3:       #6E6E6E;
  --ink-4:       #BDBDBA;

  /* 主操作 */
  --btn:         #1F1F1F;
  --btn-hover:   #000000;
  --on-btn:      #FFFFFF;

  /* 状態 */
  --ok:          #5E9B76;   /* 装飾（チェック円）用 */
  --ok-ink:      #41704F;   /* 文字用 */
  --ok-soft:     #E7EFE9;
  --sage:        #E9EDE8;
  --warn:        #C9803C;

  /* ゲーミフィケーション（ここだけ彩度を上げる） */
  --coin:        #E8A33D;   /* 装飾（コイン円・ゲージ）用。文字には使わない */
  --coin-ink:    #9C5F0D;   /* コイン数値など文字用 */
  --coin-soft:   #FDF3E2;
  --gacha-a:     #6C7CE6;
  --gacha-b:     #9068D8;
  --navy-a:      #161C2E;
  --navy-b:      #2B3552;
  --rar-n:       #7FA69C;
  --rar-r:       #6C7CE6;
  --rar-sr:      #DFA64A;

  /* 形 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* 影（ほぼ無影。面は線で区切る） */
  --sh-1: 0 1px 2px rgba(20,20,20,.04);
  --sh-2: 0 1px 3px rgba(20,20,20,.05), 0 10px 30px rgba(20,20,20,.05);
  --sh-3: 0 20px 60px rgba(20,20,20,.14);

  /* 動き */
  --e: cubic-bezier(.22,.61,.36,1);

  --header-h: 64px;
  --maxw: 1160px;

  /* build.py 互換（レッスンページが --c-<cat> を参照する） */
  --c-tutorial: #1A1A1A;
  --c-image:    #1A1A1A;
  --c-video:    #1A1A1A;
  --c-music:    #1A1A1A;
  --c-env:      #1A1A1A;
  --c-sns:      #1A1A1A;
  --c-movie:    #1A1A1A;
  --c-money:    #1A1A1A;
}

/* ---------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium",
               "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.85;
  font-feature-settings: "palt" 1;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.5; letter-spacing: .01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.u-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------- header */
.lh {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 32px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.lh-logo {
  font-size: 19px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap;
}
.lh-logo b { font-weight: 700; }

.lh-nav { display: flex; align-items: center; gap: 26px; }
.lh-nav a {
  position: relative;
  font-size: 13px; color: var(--ink-2);
  padding: 6px 0;
  transition: color .2s var(--e);
  white-space: nowrap;
}
.lh-nav a:hover { color: var(--ink); }
.lh-nav a.is-current { color: var(--ink); font-weight: 700; }
.lh-nav a.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--ink); border-radius: 2px;
}

.lh-spacer { flex: 1; }

.lh-coin {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 8px;
  background: var(--coin-soft);
  border: 1px solid #F3E2C6;
  border-radius: var(--r-full);
  transition: transform .3s var(--e);
}
.lh-coin.is-bump { transform: scale(1.07); }
.lh-coin i {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #F7C46C, var(--coin));
  color: #fff; font-size: 11px; font-style: normal; font-weight: 700;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.16);
}
.lh-coin span { font-size: 10px; color: var(--ink-3); line-height: 1.2; }
.lh-coin b { font-size: 13px; font-weight: 700; line-height: 1.2; }
.lh-coin .lh-coin-txt { display: flex; flex-direction: column; }

.lh-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-2);
  transition: background .2s var(--e), color .2s var(--e);
}
.lh-icon:hover { background: var(--surface-2); color: var(--ink); }
.lh-icon svg { width: 17px; height: 17px; }

.lh-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #DFE3E6, #C6CCD1);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #5A6167;
  cursor: pointer; flex: none;
}

.lh-burger { display: none; }

/* ---------------------------------------------- shell */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 32px 96px;
}
.shell-wide { max-width: 1320px; }

.crumbs {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--ink-3); margin-bottom: 18px;
}
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; color: var(--ink-4); }

.eyebrow {
  display: block; font-size: 10.5px; letter-spacing: .18em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 10px;
}

.h-page { font-size: 26px; line-height: 1.55; letter-spacing: .005em; }
.h-sec   { font-size: 17px; }
.lead    { margin-top: 10px; color: var(--ink-2); font-size: 13px; max-width: 62ch; }

.sec { margin-top: 56px; }
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 18px;
}
.link-more {
  font-size: 12px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px; white-space: nowrap;
  transition: color .2s var(--e), border-color .2s var(--e);
}
.link-more:hover { color: var(--ink); border-color: var(--ink); }

/* ---------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 42px; padding: 0 22px;
  background: var(--btn); color: var(--on-btn);
  border: 1px solid var(--btn); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .2s var(--e), transform .15s var(--e), opacity .2s var(--e);
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .32; cursor: not-allowed; }
.btn .ar { transition: transform .25s var(--e); }
.btn:hover .ar { transform: translateX(3px); }

/* 矢印（テキスト記号ではなく線で描く） */
.ar {
  display: inline-block; position: relative;
  width: 15px; height: 9px; font-size: 0; vertical-align: middle;
}
.ar::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 15px; height: 1.3px; background: currentColor; transform: translateY(-50%);
}
.ar::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 5.5px; height: 5.5px;
  border-top: 1.3px solid currentColor; border-right: 1.3px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-4); }

.btn-sm { min-height: 34px; padding: 0 15px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-coin {
  background: linear-gradient(120deg, var(--gacha-a), var(--gacha-b));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 26px rgba(108,124,230,.32);
}
.btn-coin:hover { background: linear-gradient(120deg, #5E6FE0, #8358D2); }
.btn-coin[disabled] { background: #D8D8D6; box-shadow: none; color: #5F5F5D; }

/* ---------------------------------------------- card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 26px 28px; }

/* ================================================================
   1. ログイン
   ================================================================ */
body.p-login { background: var(--surface); }

.login {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}

.login-art {
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, #EDF1F4 0%, #DEE5EA 45%, #CBD5DC 100%);
  padding: 46px 52px;
  display: flex; flex-direction: column;
}
/* 霧の山（写真の代替。稜線を重ね、ぼかしで空気遠近を出す） */
.login-art::before {
  content: ""; position: absolute; left: -14%; bottom: -6%;
  width: 96%; height: 62%;
  background: linear-gradient(196deg, #FDFDFE 0%, #E9EEF2 48%, #CBD5DD 100%);
  transform: skewY(-14deg);
  border-radius: 46% 8% 0 0;
  filter: blur(1.5px);
  opacity: .96;
}
.login-art::after {
  content: ""; position: absolute; left: 18%; bottom: -12%;
  width: 86%; height: 48%;
  background: linear-gradient(190deg, #F7FAFB 0%, #DCE4EA 60%, #B9C5CE 100%);
  transform: skewY(9deg);
  border-radius: 10% 40% 0 0;
  filter: blur(2.5px);
  opacity: .8;
}
/* 遠景の稜線と薄靄 */
.login-art .art-haze {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 76% 18%, rgba(255,255,255,.92), rgba(255,255,255,0) 62%),
    radial-gradient(90% 46% at 14% 76%, rgba(255,255,255,.55), rgba(255,255,255,0) 66%);
}
.login-art .art-ridge {
  position: absolute; left: -8%; bottom: 26%; z-index: 0;
  width: 78%; height: 34%;
  background: linear-gradient(200deg, #EEF3F6, #D2DBE2);
  transform: skewY(-10deg);
  border-radius: 52% 12% 0 0;
  filter: blur(5px);
  opacity: .72;
}
/* 実写を敷く場合。幾何の稜線は消し、写真の上に白のベールだけ掛ける */
.login-photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.login-art:has(.login-photo)::before,
.login-art:has(.login-photo)::after { display: none; }
.login-art:has(.login-photo) .art-ridge { display: none; }
.login-art:has(.login-photo) .art-haze {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.05) 34%, rgba(255,255,255,.55) 72%, rgba(255,255,255,.93) 92%, rgba(255,255,255,.97) 100%);
}
/* 写真の上でも文字が読めるよう、地の色を濃いめに保つ */
.login-art:has(.login-photo) .login-copy h1 { color: #161C21; }
.login-art:has(.login-photo) .login-copy p { color: #3C454C; }
.login-art > *:not(.login-photo) { position: relative; z-index: 1; }

.login-art .lh-logo { color: #2A3238; }

.login-copy { margin-top: auto; margin-bottom: auto; }
.login-copy h1 {
  font-size: 25px; line-height: 1.85; color: #21282D; letter-spacing: .02em;
}
.login-copy p { margin-top: 22px; font-size: 12.5px; color: #55606A; line-height: 2.1; }

.login-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  font-size: 11px; color: #6B757E; letter-spacing: .06em;
}
.login-dots { display: flex; align-items: center; gap: 10px; font-size: 10.5px; }
.login-dots i { display: block; width: 44px; height: 1px; background: #97A2AA; font-style: normal; }

.login-form {
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px clamp(32px, 7vw, 96px);
}
.login-form h2 { font-size: 24px; letter-spacing: -.01em; }
.login-form .sub { margin: 8px 0 30px; font-size: 13px; color: var(--ink-2); }

.field { position: relative; margin-bottom: 12px; }
.field input {
  width: 100%; height: 44px;
  padding: 0 44px 0 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit; font-size: 13px; color: var(--ink);
  transition: border-color .2s var(--e), box-shadow .2s var(--e);
}
.field input::placeholder { color: var(--ink-4); }
.field input:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26,26,26,.06);
}
.field-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--ink-3);
}
.field-eye svg { width: 16px; height: 16px; }

.login-form .btn { margin-top: 10px; width: 100%; height: 46px; }

.forgot {
  display: block; text-align: center; margin: 18px 0 0;
  font-size: 11.5px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px;
}
.forgot:hover { color: var(--ink); }

.divider {
  display: flex; align-items: center; gap: 16px;
  margin: 26px 0 20px; font-size: 11px; color: var(--ink-3);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.sso { display: grid; gap: 10px; }
.sso button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12.5px; cursor: pointer;
  transition: background .2s var(--e), border-color .2s var(--e);
}
.sso button:hover { background: var(--surface-2); border-color: var(--ink-4); }
.sso svg { width: 16px; height: 16px; }

.signup {
  display: block; text-align: center; margin-top: 30px;
  font-size: 11.5px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px;
}
.signup:hover { color: var(--ink); }

/* ================================================================
   2. ダッシュボード
   ================================================================ */
.dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.dash-head h1 { font-size: 25px; line-height: 1.75; }
.dash-quote { margin-top: 12px; font-size: 12px; color: var(--ink-3); }

/* Lv / XP / コイン のステータス束 */
.stat-strip {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.stat-strip > div {
  padding: 12px 20px; min-width: 104px;
  border-left: 1px solid var(--line);
}
.stat-strip > div:first-child { border-left: 0; min-width: 190px; }
.stat-k { font-size: 10px; color: var(--ink-3); letter-spacing: .1em; }
.stat-v { font-size: 17px; font-weight: 700; line-height: 1.5; }
.stat-v.coin { color: var(--coin-ink); }

.lv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lv-row b { font-size: 16px; }
.lv-row span { font-size: 10.5px; color: var(--ink-3); }
.gauge {
  margin-top: 8px; height: 4px; border-radius: 2px;
  background: var(--line-soft); overflow: hidden;
}
.gauge i {
  display: block; height: 100%; width: 0;
  background: var(--ink); border-radius: 2px;
  transition: width .7s var(--e);
}

/* 進行中コース + 今日のミッション */
.dash-grid {
  margin-top: 30px;
  display: grid; grid-template-columns: minmax(0,1.62fr) minmax(280px,1fr);
  gap: 22px; align-items: stretch;
}

.now-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px 32px;
  color: #fff;
  background: linear-gradient(145deg, #7E8A93 0%, #5D6971 40%, #39424A 100%);
  border: 1px solid rgba(0,0,0,.06);
}
/* 建築＋水面のモチーフ */
.now-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(200deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(120% 70% at 78% 18%, rgba(255,255,255,.28), transparent 62%);
}
/* 写真がない場合のみ、幾何のハイライトで面を作る */
.now-card:has(.now-bg)::before { display: none; }
.now-card .now-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 覆い暗幕。写真の上・文字の下に必ず入れる（ここが薄いと白文字が読めない） */
.now-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(10,14,18,.88) 0%, rgba(10,14,18,.5) 42%, rgba(10,14,18,.12) 72%, rgba(10,14,18,.28) 100%);
}
.now-card > *:not(.now-bg) { position: relative; z-index: 2; }

.now-tag {
  font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.72);
  margin-bottom: 8px;
}
.now-card h2 { font-size: 23px; letter-spacing: .01em; }
.now-card p { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.8); }
.now-card .btn {
  margin-top: 22px; align-self: flex-start;
  background: rgba(20,20,20,.9); border-color: rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}
.now-card .btn:hover { background: #111; }

.now-prog { margin-top: 26px; }
.now-prog-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,.82); margin-bottom: 7px;
}
.now-prog .gauge { background: rgba(255,255,255,.26); height: 3px; }
.now-prog .gauge i { background: #fff; }

.mission { display: flex; flex-direction: column; }
.mission h3 { font-size: 13.5px; padding: 20px 22px 14px; }
.mission ul { border-top: 1px solid var(--line-soft); }
.mission li {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.mission li:last-child { border-bottom: 0; }
.mission-check {
  flex: none; width: 21px; height: 21px; margin-top: 1px;
  border-radius: 50%; border: 1.4px solid var(--line);
  display: grid; place-items: center;
  color: transparent; font-size: 10px;
}
.mission li.is-done .mission-check {
  background: var(--ok); border-color: var(--ok); color: #fff;
}
.mission-body b { display: block; font-size: 12.5px; font-weight: 500; }
.mission li.is-done .mission-body b { color: var(--ink-3); text-decoration: line-through; }
.mission-rw { font-size: 11px; color: var(--ok-ink); letter-spacing: .02em; }
.mission-rw .c { color: var(--coin-ink); }

/* 受講中コースのカード */
.course-row {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px;
}
.ccard {
  display: block; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  transition: transform .28s var(--e), box-shadow .28s var(--e), border-color .28s var(--e);
}
.ccard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--ink-4); }
.ccard.is-locked { opacity: .78; cursor: not-allowed; }
.ccard.is-locked:hover { transform: none; box-shadow: var(--sh-1); }
.ccard.is-locked .ccard-body h4,
.ccard.is-locked .ccard-body .sub { color: var(--ink-3); }

.ccard-thumb {
  display: block;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(150deg, #9BA6AE, #5F6A73);
}
.ccard-thumb::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(210deg, rgba(255,255,255,.42), rgba(255,255,255,0) 52%),
    radial-gradient(90% 62% at 74% 22%, rgba(255,255,255,.3), transparent 60%);
}
.ccard-thumb:has(img)::before,
.ccard-thumb:has(img)::after { display: none; }
.ccard-thumb::after {
  content: ""; position: absolute; left: -8%; bottom: -34%;
  width: 84%; height: 74%;
  background: linear-gradient(190deg, rgba(255,255,255,.72), rgba(255,255,255,.08));
  transform: skewY(-11deg); border-radius: 36% 6% 0 0;
}
.ccard-thumb[data-tone="a"] { background: linear-gradient(150deg, #B4B8BC, #6A6E72); }
.ccard-thumb[data-tone="b"] { background: linear-gradient(150deg, #A9AFA4, #62695F); }
.ccard-thumb[data-tone="c"] { background: linear-gradient(150deg, #A6A2AC, #5F5C68); }
.ccard-thumb[data-tone="d"] { background: linear-gradient(150deg, #9FAAB4, #565E66); }
.ccard-thumb[data-tone="e"] { background: linear-gradient(150deg, #B0A79E, #6B6259); }
.ccard-thumb[data-tone="f"] { background: linear-gradient(150deg, #97A5A8, #525D60); }
.ccard-thumb[data-tone="g"] { background: linear-gradient(150deg, #A3A9B5, #5B6069); }
.ccard-thumb[data-tone="h"] { background: linear-gradient(150deg, #ADA6A0, #66605B); }
.ccard-thumb[data-tone="i"] { background: linear-gradient(150deg, #A8ADA9, #5E6461); }
/* 実写を敷く場合は幾何プレースホルダの上に載せる */
.ccard-thumb img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.ccard-lock {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: rgba(250,250,249,.58);
  backdrop-filter: blur(2px);
  font-size: 11px; font-weight: 700; color: var(--ink);
}
/* 文字は白のピルの上に置いて読ませる */
.ccard-lock > span {
  display: inline-block;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 8px rgba(26,26,26,.12);
}

.ccard-body { display: block; padding: 15px 17px 17px; }
.ccard-body h4 { font-size: 13.5px; }
.ccard-body .sub { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.ccard-prog {
  margin-top: 13px; display: flex; align-items: center; gap: 12px;
}
.ccard-prog .gauge { flex: 1; }
.ccard-prog b { font-size: 11.5px; font-weight: 700; color: var(--ink-2); flex: none; }

/* ================================================================
   3. コース一覧 / 講座詳細
   ================================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.chip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-full); padding: 8px 17px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
  transition: all .2s var(--e);
}
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip.is-active { background: var(--btn); border-color: var(--btn); color: #fff; }

.cat-grid {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px,1fr));
  gap: 22px;
}

/* 講座詳細 */
.course-hero {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.85fr);
  gap: 42px; align-items: center;
}
.course-hero h1 { font-size: 27px; }
.course-hero .tagline { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.course-hero .desc { margin-top: 18px; font-size: 12.5px; color: var(--ink-2); max-width: 46ch; }
.course-hero .btn { margin-top: 24px; }
.course-hero-art {
  aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden;
  position: relative; background: linear-gradient(150deg, #A7B0B6, #4E575E);
}
.course-hero-art::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(205deg, rgba(255,255,255,.5), rgba(255,255,255,0) 54%),
    radial-gradient(86% 60% at 72% 20%, rgba(255,255,255,.34), transparent 62%);
}
.course-hero-art::after {
  content: ""; position: absolute; left: -10%; bottom: -30%;
  width: 88%; height: 70%;
  background: linear-gradient(190deg, rgba(255,255,255,.78), rgba(255,255,255,.1));
  transform: skewY(-12deg); border-radius: 34% 6% 0 0;
}
.course-hero-art img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.course-hero-art[data-tone] img { border-radius: inherit; }

.tabs {
  margin-top: 44px;
  display: flex; align-items: center; gap: 26px;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative; background: none; border: 0; cursor: pointer;
  padding: 0 0 13px; font-size: 13px; color: var(--ink-3);
  transition: color .2s var(--e);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 700; }
.tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1.5px; background: var(--ink);
}
.tabs .sp { flex: 1; }
.tabs .pct { font-size: 12px; color: var(--ink-2); padding-bottom: 13px; }
.tabs .pct b { font-weight: 700; color: var(--ink); }

/* タブ群と右端の補助表示を分けた行。タブだけ横スクロールさせる */
.tabs-row {
  margin-top: 38px;
  display: flex; align-items: flex-end; gap: 18px;
  border-bottom: 1px solid var(--line);
}
.tabs-row .tabs { border-bottom: 0; flex: 1; min-width: 0; }
.tabs-row .pct {
  font-size: 12px; color: var(--ink-2); padding-bottom: 13px;
  flex: none; white-space: nowrap;
}
.tabs-row .pct b { font-weight: 700; color: var(--ink); }

.tabpane[hidden] { display: none; }

/* カリキュラム（アコーディオン） */
.curri { margin-top: 6px; }
.curri-group { border-bottom: 1px solid var(--line); }
.curri-head {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 18px;
  padding: 19px 4px; text-align: left;
}
.curri-no { font-size: 12px; color: var(--ink-3); font-weight: 700; letter-spacing: .04em; flex: none; }
.curri-head h3 { flex: 1; font-size: 13.5px; }
.curri-count { font-size: 11.5px; color: var(--ink-3); }
.curri-caret {
  width: 9px; height: 9px; border-right: 1.4px solid var(--ink-3);
  border-bottom: 1.4px solid var(--ink-3); transform: rotate(-135deg);
  transition: transform .3s var(--e); flex: none; margin-left: 6px;
}
.curri-group.is-closed .curri-caret { transform: rotate(45deg) translate(-2px,-2px); }
.curri-group.is-closed .curri-list { display: none; }

.curri-list { padding-bottom: 8px; }
.curri-item {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 4px 11px 40px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-2);
  transition: background .2s var(--e);
}
.curri-item:hover { background: var(--bg-soft); color: var(--ink); }
.curri-item .no { font-size: 11.5px; color: var(--ink-3); flex: none; width: 34px; }
.curri-item .ttl { flex: 1; }
.curri-item .min { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.curri-item .mk {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.3px solid var(--line); display: grid; place-items: center;
  color: transparent; font-size: 9px;
}
.curri-item.is-done .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.curri-item.is-locked { opacity: .45; pointer-events: none; }

/* 概要 / 講師 / レビュー */
.prose { padding: 26px 0 6px; font-size: 13px; color: var(--ink-2); max-width: 70ch; }
.prose h3 { font-size: 14px; color: var(--ink); margin: 26px 0 10px; }
.prose h3:first-child { margin-top: 0; }
.prose p + p { margin-top: 12px; }
.prose ul { margin-top: 10px; }
.prose li { position: relative; padding-left: 18px; margin-top: 7px; }
.prose li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4);
}

.tutor { display: flex; gap: 20px; align-items: flex-start; padding: 26px 0; }
.tutor-face {
  width: 68px; height: 68px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, #DDE2E6, #B9C1C7);
}
.tutor b { font-size: 14px; }
.tutor .role { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tutor p { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); max-width: 60ch; }

.reviews { padding: 22px 0; display: grid; gap: 14px; }
.review { padding: 20px 22px; }
.review-top { display: flex; align-items: center; gap: 12px; }
.review-face {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(160deg, #DFE3E6, #C2C9CE); flex: none;
}
.review-top b { font-size: 12.5px; }
.review-top .stars { margin-left: auto; font-size: 11px; color: var(--coin-ink); letter-spacing: .1em; }
.review p { margin-top: 11px; font-size: 12.5px; color: var(--ink-2); }

/* ================================================================
   4. 学習（レッスン）ページ — build.py が出力する
   ================================================================ */
.lesson-shell {
  max-width: 1320px; margin: 0 auto; padding: 26px 32px 80px;
}
.lesson-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 26px;
  align-items: start;
}

.stage {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.stage-video {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #6E7780, #2E343A);
}
.stage-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-video.is-empty { display: grid; place-items: center; color: #FFFFFF; }
.stage-video.is-empty p { font-size: 12px; letter-spacing: .06em; }
.stage-video.is-empty::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(210deg, rgba(255,255,255,.3), rgba(255,255,255,0) 55%),
    radial-gradient(90% 62% at 70% 20%, rgba(255,255,255,.22), transparent 60%);
}
.stage-video.is-empty p { position: relative; z-index: 1; }

.stage-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--ink-3);
}
.stage-bar .track {
  flex: 1; height: 3px; background: var(--line); border-radius: 2px; position: relative;
}
.stage-bar .track i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 22%;
  background: var(--ink); border-radius: 2px;
}
.stage-bar .track i::after {
  content: ""; position: absolute; right: -4px; top: 50%;
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
  transform: translateY(-50%);
}

.doc { margin-top: 26px; }
.doc-head h1 { font-size: 22px; line-height: 1.65; }
.doc-sum { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.doc-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--ink-3);
}
.doc-reward {
  padding: 3px 10px; border-radius: var(--r-full);
  background: var(--ok-soft); color: #3E6E52; font-weight: 700;
}
.doc-reward.coin { background: var(--coin-soft); color: var(--coin-ink); }
.doc-badge {
  display: inline-block; font-size: 10.5px; letter-spacing: .12em;
  color: var(--ink-3); margin-bottom: 12px;
}

.doc-body { padding-top: 26px; font-size: 13.5px; color: #2E2E2E; }
.doc-body h2 {
  font-size: 16px; margin: 36px 0 12px; padding-top: 4px;
  letter-spacing: .01em;
}
.doc-body h3 { font-size: 14px; margin: 26px 0 10px; }
.doc-body h4 { font-size: 13px; margin: 20px 0 8px; color: var(--ink-2); }
.doc-body p { margin: 12px 0; line-height: 2.05; }
.doc-body ul, .doc-body ol { margin: 14px 0; }
.doc-body li { position: relative; padding-left: 20px; margin: 8px 0; line-height: 1.95; }
.doc-body ul > li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4);
}
.doc-body ol { counter-reset: n; }
.doc-body ol > li { counter-increment: n; }
.doc-body ol > li::before {
  content: counter(n) "."; position: absolute; left: 0; top: 0;
  font-size: 12px; color: var(--ink-3); font-weight: 700;
}
.doc-body blockquote {
  margin: 20px 0; padding: 16px 20px;
  background: var(--surface-2); border-left: 2px solid var(--line);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12.5px; color: var(--ink-2);
}
.doc-body pre {
  margin: 18px 0; padding: 16px 18px; overflow-x: auto;
  background: #1F2227; color: #E6E8EA;
  border-radius: var(--r-sm); font-size: 12px; line-height: 1.8;
}
.doc-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .92em; background: var(--surface-2);
  padding: 2px 6px; border-radius: 4px;
}
.doc-body pre code { background: none; padding: 0; }
.doc-body a { border-bottom: 1px solid var(--ink-4); }
.doc-body a:hover { border-color: var(--ink); }

/* サイドバー（レッスン内容 + 資料） */
.side-card { position: sticky; top: calc(var(--header-h) + 20px); }
.side-card + .side-card { margin-top: 18px; position: static; }
.side-card h2 { font-size: 13px; padding: 18px 20px 12px; }
.side-list { border-top: 1px solid var(--line-soft); }
.side-list li { border-bottom: 1px solid var(--line-soft); }
.side-list li:last-child { border-bottom: 0; }
.side-list a, .side-list span.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; font-size: 12.5px; color: var(--ink-2);
  transition: background .2s var(--e), color .2s var(--e);
}
.side-list a:hover { background: var(--bg-soft); color: var(--ink); }
.side-list .ic { flex: none; width: 15px; color: var(--ink-4); }
.side-list .tx { flex: 1; }
.side-list .mn { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-list li.is-current a, .side-list li.is-current .row {
  background: var(--surface-2); color: var(--ink); font-weight: 700;
}
.side-list li.is-done .ic { color: var(--ok); }

.dl-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.dl-ic {
  flex: none; width: 26px; height: 30px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 8px; color: var(--ink-3); font-weight: 700;
}
.dl-item b { flex: 1; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.dl-item .sz { font-size: 10.5px; color: var(--ink-3); }

/* クイズ */
.quiz {
  margin-top: 40px; padding: 28px 30px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.quiz h2 { font-size: 15px; }
.quiz-lead { margin-top: 8px; font-size: 12px; color: var(--ink-2); }

.quiz-q { border: 0; margin: 26px 0 0; padding: 0; }
.quiz-q legend { font-size: 13px; font-weight: 700; padding: 0; margin-bottom: 12px; }
.quiz-choice {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 15px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  transition: border-color .2s var(--e), background .2s var(--e);
}
.quiz-choice:hover { border-color: var(--ink-4); background: var(--bg-soft); }
.quiz-choice input { margin: 4px 0 0; accent-color: var(--ink); flex: none; }
.quiz-choice:has(input:checked) { border-color: var(--ink); background: var(--surface-2); color: var(--ink); }

.quiz-q.is-ng .quiz-choice:has(input:checked) { border-color: #C6705E; background: #FCF1EE; }
.quiz-q.is-ok .quiz-choice:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }

.quiz-explain {
  margin-top: 10px; padding: 12px 15px;
  background: var(--surface-2); border-radius: var(--r-sm);
  font-size: 12px; color: var(--ink-2);
}
.quiz-submit { margin-top: 24px; }
.quiz-result {
  margin-top: 18px; padding: 16px 18px;
  border-radius: var(--r-sm); font-size: 12.5px;
}
.quiz-result.ok { background: var(--ok-soft); color: #38624A; }
.quiz-result.ng { background: #FCF1EE; color: #8E4C3B; }

/* レッスン下部のナビ */
.lesson-nav {
  margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lesson-state { font-size: 12px; color: var(--ink-3); }
.lesson-state.is-done { color: var(--ok-ink); font-weight: 700; }

/* ================================================================
   5. マイページ
   ================================================================ */
.profile { display: flex; align-items: center; gap: 22px; padding: 28px 30px; }
.profile-face {
  width: 74px; height: 74px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, #DEE3E7, #BAC2C8);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #5B6268;
}
.profile-name { font-size: 19px; font-weight: 700; }
.profile-motto { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.profile .btn { margin-left: auto; }

.metrics {
  margin-top: 20px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.metrics > div {
  padding: 20px 10px; text-align: center; border-left: 1px solid var(--line);
}
.metrics > div:first-child { border-left: 0; }
.metrics dt { font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; }
.metrics dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.metrics dd small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

.mp-list { margin-top: 6px; }
.mp-item {
  display: flex; align-items: center; gap: 18px;
  padding: 15px 8px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .2s var(--e);
}
.mp-item:hover { background: var(--bg-soft); }
.mp-thumb {
  flex: none; width: 82px; aspect-ratio: 16/10; border-radius: var(--r-sm);
  background: linear-gradient(150deg, #A3ADB4, #5D666D); position: relative; overflow: hidden;
}
.mp-thumb::after {
  content: ""; position: absolute; left: -10%; bottom: -34%;
  width: 90%; height: 76%;
  background: linear-gradient(190deg, rgba(255,255,255,.7), rgba(255,255,255,.08));
  transform: skewY(-12deg); border-radius: 34% 6% 0 0;
}
.mp-thumb[data-tone="a"] { background: linear-gradient(150deg, #B4B8BC, #6A6E72); }
.mp-thumb[data-tone="b"] { background: linear-gradient(150deg, #A9AFA4, #62695F); }
.mp-thumb[data-tone="c"] { background: linear-gradient(150deg, #A6A2AC, #5F5C68); }
.mp-thumb[data-tone="d"] { background: linear-gradient(150deg, #9FAAB4, #565E66); }
.mp-thumb[data-tone="e"] { background: linear-gradient(150deg, #B0A79E, #6B6259); }
.mp-thumb[data-tone="f"] { background: linear-gradient(150deg, #97A5A8, #525D60); }
.mp-thumb[data-tone="g"] { background: linear-gradient(150deg, #A3A9B5, #5B6069); }
.mp-thumb[data-tone="h"] { background: linear-gradient(150deg, #ADA6A0, #66605B); }
.mp-thumb[data-tone="i"] { background: linear-gradient(150deg, #A8ADA9, #5E6461); }
.mp-thumb img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mp-body { flex: 1; min-width: 0; }
.mp-body b { display: block; font-size: 13px; }
.mp-body .sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.mp-prog { width: 190px; display: flex; align-items: center; gap: 12px; flex: none; }
.mp-prog .gauge { flex: 1; }
.mp-prog b { font-size: 11.5px; color: var(--ink-2); }
.mp-more { color: var(--ink-3); font-size: 16px; letter-spacing: .1em; flex: none; }

.inv-grid {
  margin-top: 6px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 14px;
}
.inv-card { display: flex; align-items: center; gap: 13px; padding: 15px 17px; }
.inv-ic {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 17px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.inv-card.rar-r  .inv-ic { background: #EEF0FD; border-color: #D8DDFA; }
.inv-card.rar-sr .inv-ic { background: #FBF2E1; border-color: #F0E0BE; }
.inv-card b { display: block; font-size: 12.5px; }
.inv-card span { font-size: 10.5px; color: var(--ink-3); }
.inv-card em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink-3); }

.empty {
  padding: 40px 20px; text-align: center;
  font-size: 12.5px; color: var(--ink-3);
}

/* ================================================================
   6. 完了画面
   ================================================================ */
body.p-complete { background: var(--sage); }
body.p-complete .lh { background: rgba(233,237,232,.86); border-bottom-color: #DCE2DB; }

.done-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid; place-items: center; padding: 60px 32px 90px;
  position: relative; overflow: hidden;
}
.done-wrap::before, .done-wrap::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.9), rgba(255,255,255,0) 68%);
}
.done-wrap::before { width: 420px; height: 420px; top: -120px; right: -90px; }
.done-wrap::after  { width: 340px; height: 340px; bottom: -110px; left: -70px; }

.done { position: relative; z-index: 1; text-align: center; max-width: 480px; }
.done-mark {
  width: 84px; height: 84px; margin: 0 auto 32px;
  border-radius: 50%; background: #D8E1D6;
  display: grid; place-items: center;
  animation: pop .6s var(--e) both;
}
.done-mark svg { width: 34px; height: 34px; color: #4E7D5F; }
@keyframes pop {
  0% { transform: scale(.55); opacity: 0; }
  60% { transform: scale(1.07); }
  100% { transform: scale(1); opacity: 1; }
}
.done h1 { font-size: 27px; letter-spacing: .01em; }
.done .what { margin-top: 14px; font-size: 14px; }
.done .msg { margin-top: 22px; font-size: 12.5px; color: var(--ink-2); line-height: 2.1; }
.done-acts { margin-top: 34px; display: grid; gap: 11px; justify-items: center; }
.done-acts .btn { min-width: 250px; }
.done-reward {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 12px;
  padding: 9px 18px; border-radius: var(--r-full);
  background: rgba(255,255,255,.72); border: 1px solid #DCE2DB;
  font-size: 12px; color: var(--ink-2);
}
.done-reward b { color: var(--ok-ink); }
.done-reward .c { color: var(--coin-ink); }

/* ================================================================
   7. ショップ & ガチャ
   ================================================================ */
.shop-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 40px 42px 44px; color: #fff;
  background: linear-gradient(115deg, var(--navy-a) 0%, var(--navy-b) 58%, #3B3358 100%);
}
.shop-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(42% 78% at 82% 42%, rgba(246,202,120,.36), transparent 66%),
    radial-gradient(34% 62% at 16% 16%, rgba(128,146,255,.3), transparent 70%);
}
.shop-hero > * { position: relative; z-index: 1; }
.shop-hero h1 { font-size: 25px; letter-spacing: .03em; }
.shop-hero p { margin-top: 12px; font-size: 12.5px; color: rgba(255,255,255,.76); line-height: 2; }
/* きらめき */
.spark {
  position: absolute; z-index: 1; color: #F7D08A; pointer-events: none;
  animation: twinkle 3.2s ease-in-out infinite;
}
.spark svg { width: 100%; height: 100%; }
@keyframes twinkle {
  0%,100% { opacity: .35; transform: scale(.82) rotate(0deg); }
  50%     { opacity: 1;   transform: scale(1.12) rotate(14deg); }
}

.shop-body {
  background: var(--surface); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 26px 30px 34px;
}

.seg {
  display: inline-flex; padding: 4px; gap: 4px; margin: 0 auto 26px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-full);
}
.seg-wrap { display: flex; justify-content: center; }
.seg button {
  background: none; border: 0; cursor: pointer;
  padding: 7px 26px; border-radius: var(--r-full);
  font-size: 12.5px; color: var(--ink-2);
  transition: all .22s var(--e);
}
.seg button.is-active { background: var(--btn); color: #fff; font-weight: 700; }

.gacha {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.8fr);
  gap: 36px; align-items: center;
}
.gacha-tag {
  display: inline-block; padding: 4px 13px; border-radius: var(--r-full);
  background: #EFF1FE; color: #5A62B8; font-size: 11px; font-weight: 700;
}
.gacha h2 { margin-top: 14px; font-size: 21px; }
.gacha p { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 2; }
.gacha .btn-coin { margin-top: 22px; min-width: 260px; height: 50px; }
.gacha-note { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }

/* カプセル */
.capsules { position: relative; aspect-ratio: 1/.82; }
.cap {
  position: absolute; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.95), rgba(255,255,255,.25) 42%, transparent 60%),
    var(--cap, #8FA8E8);
  box-shadow: inset 0 -8px 16px rgba(0,0,0,.14), 0 12px 26px rgba(30,30,60,.14);
  animation: float 4.4s ease-in-out infinite;
}
.cap::after {
  content: ""; position: absolute; left: 6%; right: 6%; top: 47%; height: 6%;
  background: rgba(255,255,255,.55); border-radius: 3px;
}
.cap:nth-child(1) { --cap:#7E93E8; width: 42%; height: 42%; left: 4%;  top: 24%; animation-delay: -.2s; }
.cap:nth-child(2) { --cap:#E8A2C4; width: 34%; height: 34%; right: 8%; top: 6%;  animation-delay: -1.1s; }
.cap:nth-child(3) { --cap:#F1C878; width: 30%; height: 30%; left: 32%; top: 2%;  animation-delay: -2.0s; }
.cap:nth-child(4) { --cap:#84CFC8; width: 36%; height: 36%; right: 2%; bottom: 6%; animation-delay: -2.9s; }
.cap:nth-child(5) { --cap:#B79BE6; width: 28%; height: 28%; left: 26%; bottom: 0; animation-delay: -3.6s; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%     { transform: translateY(-11px) rotate(4deg); }
}
.capsules.is-shaking { animation: shake .82s var(--e); }
@keyframes shake {
  0%,100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-10px) rotate(-4deg); }
  32% { transform: translateX(9px) rotate(4deg); }
  50% { transform: translateX(-7px) rotate(-3deg); }
  68% { transform: translateX(6px) rotate(3deg); }
  85% { transform: translateX(-3px) rotate(-1deg); }
}

/* 排出率 */
.rates { margin-top: 36px; }
.rates h3 { font-size: 13px; margin-bottom: 14px; }
.rate-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.rate {
  padding: 16px 18px 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-2);
}
.rate.r  { background: #F5F6FE; border-color: #E0E4FB; }
.rate.sr { background: #FDF6E9; border-color: #F2E5C8; }
.rate-k { font-size: 10.5px; color: var(--ink-3); letter-spacing: .08em; }
.rate.r  .rate-k { color: #5A62B8; }
.rate.sr .rate-k { color: #8A5E12; }
/* 絵文字をやめて線アイコンにしたので、文字サイズではなく svg の寸法で揃える */
.rate-ic { margin: 10px 0 6px; color: var(--ink); }
.rate-ic svg { width: 34px; height: 34px; display: block; stroke-width: 1.3; }
.rate b { font-size: 12.5px; display: block; }
.rate span { font-size: 11px; color: var(--ink-3); display: block; margin-top: 4px; line-height: 1.8; }

/* 景品交換所 */
.rw-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.rw-head h2 { font-size: 20px; }
.rw-head p { margin-top: 9px; font-size: 12.5px; color: var(--ink-2); line-height: 2; }

.rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px,1fr)); gap: 18px; }
.rw {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.rw-thumb {
  aspect-ratio: 16/10; position: relative;
  background: linear-gradient(150deg, #EDE9E3, #CFC8C0);
  display: grid; place-items: center;
}
.rw-thumb svg { width: 44px; height: 44px; color: var(--ink); display: block; }
.rw-thumb > span { display: grid; place-items: center; }
.ic svg, .inv-ic svg { width: 22px; height: 22px; display: block; }
.inv-ic { display: grid; place-items: center; color: var(--ink); }
.rw-thumb::before {
  content: ""; position: absolute; left: -8%; bottom: -30%;
  width: 86%; height: 72%;
  background: linear-gradient(190deg, rgba(255,255,255,.8), rgba(255,255,255,.12));
  transform: skewY(-11deg); border-radius: 34% 6% 0 0;
}
.rw-thumb span {
  position: relative; z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(60,54,48,.22));
}
.rw-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.rw-body b { font-size: 12.5px; }
.rw-cost {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 9px; font-size: 13px; font-weight: 700; color: var(--ink);
}
.rw-cost i {
  width: 16px; height: 16px; border-radius: 50%; font-style: normal;
  background: linear-gradient(145deg, #F7C46C, var(--coin));
  display: grid; place-items: center; font-size: 9px; color: #fff;
}
.rw-desc { margin-top: 8px; font-size: 11px; color: var(--ink-3); line-height: 1.85; flex: 1; }
.rw-owned { margin-top: 6px; font-size: 11px; color: var(--ok-ink); font-style: normal; }
.rw .btn { margin-top: 14px; }
.rw.is-off { opacity: .68; }

/* ================================================================
   モーダル
   ================================================================ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 26px;
  background: rgba(16,16,18,.62);
  backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .26s var(--e);
}
.modal.is-open { opacity: 1; }
.modal[hidden] { display: none; }

.modal-panel {
  position: relative; width: min(440px, 100%);
  background: var(--surface); border-radius: var(--r-xl);
  padding: 40px 36px 34px; text-align: center;
  box-shadow: var(--sh-3);
  transform: translateY(14px) scale(.97);
  transition: transform .3s var(--e);
}
.modal.is-open .modal-panel { transform: none; }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: background .2s var(--e);
}
.modal-close:hover { background: var(--line-soft); }

/* ガチャ結果 */
.modal-gacha .modal-panel {
  background: linear-gradient(170deg, #1B2236 0%, #2A2244 100%);
  color: #fff; overflow: hidden;
}
.modal-gacha .modal-close {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); color: #fff;
}
.modal-gacha .modal-panel::before {
  content: ""; position: absolute; left: 50%; top: 34%;
  width: 150%; aspect-ratio: 1; transform: translate(-50%,-50%);
  background: conic-gradient(from 0deg,
    rgba(255,255,255,.14) 0deg, transparent 12deg, rgba(255,255,255,.14) 24deg,
    transparent 36deg, rgba(255,255,255,.14) 48deg, transparent 60deg,
    rgba(255,255,255,.14) 72deg, transparent 84deg, rgba(255,255,255,.14) 96deg,
    transparent 108deg, rgba(255,255,255,.14) 120deg, transparent 132deg,
    rgba(255,255,255,.14) 144deg, transparent 156deg, rgba(255,255,255,.14) 168deg,
    transparent 180deg, rgba(255,255,255,.14) 192deg, transparent 204deg,
    rgba(255,255,255,.14) 216deg, transparent 228deg, rgba(255,255,255,.14) 240deg,
    transparent 252deg, rgba(255,255,255,.14) 264deg, transparent 276deg,
    rgba(255,255,255,.14) 288deg, transparent 300deg, rgba(255,255,255,.14) 312deg,
    transparent 324deg, rgba(255,255,255,.14) 336deg, transparent 348deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 58%);
  mask-image: radial-gradient(circle, #000 12%, transparent 58%);
  animation: rays 26s linear infinite;
}
@keyframes rays {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}
.modal-gacha .modal-panel > * { position: relative; z-index: 1; }

.gr-title {
  font-size: 22px; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(100deg, #FFF3CE, #F6C97A 52%, #FFF3CE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 18px rgba(246,201,122,.28);
}
.gr-rarity {
  display: inline-block; margin: 16px 0 4px;
  padding: 4px 18px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  background: rgba(255,255,255,.14); color: #fff;
}
.gr-rarity.rar-r  { background: linear-gradient(100deg,#6C7CE6,#9068D8); }
.gr-rarity.rar-sr { background: linear-gradient(100deg,#E2A64B,#F0CF84); color: #4A3410; }

.gr-items { margin: 20px 0 6px; display: grid; gap: 12px; }
.gr-item {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  animation: rise .44s var(--e) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.gr-item .ic {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 25px;
  background: rgba(255,255,255,.12);
}
.gr-item.rar-r  .ic { background: linear-gradient(150deg,#7B8BEC,#5C4FC0); box-shadow: 0 0 22px rgba(108,124,230,.5); }
.gr-item.rar-sr .ic { background: linear-gradient(150deg,#F3CE84,#D79A3C); box-shadow: 0 0 26px rgba(224,166,74,.55); }
.gr-item em { display: block; font-style: normal; font-size: 10px; letter-spacing: .14em; color: rgba(255,255,255,.56); }
.gr-item b { display: block; font-size: 13.5px; margin-top: 2px; }
.gr-item span { display: block; font-size: 11px; color: rgba(255,255,255,.62); margin-top: 3px; line-height: 1.8; }

.gr-msg { margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.66); line-height: 2; }
.modal-gacha .btn {
  margin-top: 24px; min-width: 200px;
  background: #fff; color: #1A1A1A; border-color: #fff;
}
.modal-gacha .btn:hover { background: #F0F0EE; }

/* レベルアップ */
.modal-lv .modal-panel {
  background: linear-gradient(175deg, #0E1730 0%, #1C2A4E 52%, #35406B 100%);
  color: #fff; padding-top: 46px;
}
.modal-lv .modal-close { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); color: #fff; }
.lv-badge {
  width: 168px; height: 150px; margin: 0 auto 24px; position: relative;
  display: grid; place-items: center;
}
.lv-badge::before {
  content: ""; position: absolute; inset: -26px;
  background: radial-gradient(circle, rgba(247,208,138,.44), transparent 64%);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow { 0%,100% { opacity:.55; transform: scale(.94);} 50% { opacity:1; transform: scale(1.06);} }

/* 翼（左右に羽根を重ねた形を clip-path で描く） */
.lv-wing {
  position: absolute; top: 50%; width: 62px; height: 58px;
  transform: translateY(-52%);
  background: linear-gradient(170deg, #FBE7B4 0%, #EFC470 42%, #D9A143 100%);
  filter: drop-shadow(0 5px 12px rgba(190,140,50,.34));
}
.lv-wing.l {
  left: 2px;
  clip-path: polygon(100% 20%, 62% 8%, 30% 22%, 0 44%, 26% 42%, 6% 66%,
                     34% 58%, 22% 84%, 54% 62%, 58% 86%, 82% 56%, 100% 62%);
}
.lv-wing.r {
  right: 2px; transform: translateY(-52%) scaleX(-1);
  clip-path: polygon(100% 20%, 62% 8%, 30% 22%, 0 44%, 26% 42%, 6% 66%,
                     34% 58%, 22% 84%, 54% 62%, 58% 86%, 82% 56%, 100% 62%);
}

.lv-badge i {
  position: relative; z-index: 1;
  width: 96px; height: 104px;
  background: linear-gradient(160deg, #FBE6AE, #E0A84A 52%, #B87F2A);
  /* 盾形 */
  clip-path: polygon(50% 0%, 100% 18%, 100% 62%, 50% 100%, 0% 62%, 0% 18%);
  box-shadow: 0 14px 34px rgba(224,168,74,.44);
  display: grid; place-items: center; align-content: center;
  font-style: normal; color: #4A3410; font-weight: 700;
  font-size: 30px; line-height: 1;
}
.lv-badge i::before {
  /* 内側の縁取り */
  content: ""; position: absolute; inset: 6px;
  border: 1.5px solid rgba(255,255,255,.5);
  clip-path: polygon(50% 0%, 100% 18%, 100% 62%, 50% 100%, 0% 62%, 0% 18%);
}
.lv-badge i small {
  display: block; font-size: 11px; letter-spacing: .12em;
  font-weight: 700; margin-bottom: 2px; opacity: .78;
}
/* 王冠 */
.lv-crown {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 26px; z-index: 2;
  background: linear-gradient(160deg, #FFF0C8, #E8B95E);
  clip-path: polygon(0% 100%, 12% 34%, 30% 62%, 50% 10%, 70% 62%, 88% 34%, 100% 100%);
  filter: drop-shadow(0 3px 7px rgba(170,120,40,.4));
}
.lv-ttl {
  font-size: 27px; font-weight: 700; letter-spacing: .06em;
  background: linear-gradient(100deg, #FFF6DA, #F2C271 52%, #FFF6DA);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-lv h3 { margin-top: 18px; font-size: 16px; }
.modal-lv p { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,.7); line-height: 2.1; }
.modal-lv .btn { margin-top: 26px; background:#fff; color:#1A1A1A; border-color:#fff; }
.modal-lv .btn:hover { background:#F0F0EE; }

/* ================================================================
   トースト
   ================================================================ */
.toast-area {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
  width: min(340px, calc(100vw - 44px));
}
.toast {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-2);
  opacity: 0; transform: translateX(18px);
  transition: opacity .32s var(--e), transform .32s var(--e);
}
.toast.is-in { opacity: 1; transform: none; }
.toast-ic {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
  background: var(--ok-soft); color: var(--ok);
}
.toast-gain  .toast-ic { background: var(--ok-soft);   color: #3E6E52; }
.toast-unlock .toast-ic { background: var(--coin-soft); color: #8A5E12; }
.toast-item  .toast-ic { background: #EEF0FD;          color: #5A62B8; }
.toast-mute  .toast-ic { background: var(--surface-2);  color: var(--ink-3); }
.toast-body { flex: 1; min-width: 0; }
.toast-body b { display: block; font-size: 12.5px; }
.toast-body span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.toast-body .c { color: var(--coin-ink); }
.toast-body .x { color: var(--ok-ink); }
.toast-x {
  flex: none; background: none; border: 0; cursor: pointer;
  color: var(--ink-4); font-size: 14px; line-height: 1; padding: 2px;
}
.toast-x:hover { color: var(--ink); }

/* ================================================================
   フッター
   ================================================================ */
.lf {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 32px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-3);
}
.lf b { font-size: 14px; color: var(--ink); font-weight: 700; }
.lf .sep { color: var(--ink-3); }
.lf .sp { flex: 1; }
.lf button {
  background: none; border: 0; cursor: pointer; color: var(--ink-3);
  font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px;
}
.lf button:hover { color: var(--ink); }

/* ================================================================
   レスポンシブ
   ================================================================ */
@media (max-width: 1080px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; }
  .dash-grid { grid-template-columns: 1fr; }
  .course-hero { grid-template-columns: 1fr; gap: 26px; }
  .course-hero-art { order: -1; aspect-ratio: 16/9; }
}

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 280px; padding: 30px 28px; }
  .login-copy h1 { font-size: 21px; }
  .course-row { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,1fr); }
  .metrics > div:nth-child(3) { border-left: 0; }
  .metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gacha { grid-template-columns: 1fr; }
  .capsules { max-width: 300px; margin: 0 auto; }
  .rate-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .lh { padding: 0 16px; gap: 12px; }
  .lh-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 6px 16px 14px; display: none;
    box-shadow: var(--sh-2);
  }
  .lh-nav.is-open { display: flex; }
  .lh-nav a { padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
  .lh-nav a.is-current::after { display: none; }
  .lh-burger { display: grid; }
  /* ラベルだけ隠す。b の中の data-coin は残す（子孫セレクタだと金額まで消える） */
  .lh-coin .lh-coin-txt > span { display: none; }
  .lh-coin .lh-coin-txt > b { font-size: 12.5px; }

  .shell { padding: 28px 16px 70px; }
  .lesson-shell { padding: 20px 16px 60px; }
  .h-page { font-size: 21px; }
  .dash-head h1 { font-size: 21px; }
  .stat-strip { width: 100%; flex-wrap: wrap; }
  .stat-strip > div:first-child { min-width: 100%; border-bottom: 1px solid var(--line); }
  .stat-strip > div { flex: 1; }
  .now-card { min-height: 250px; padding: 24px 22px; }
  .now-card h2 { font-size: 19px; }
  .mp-prog { width: 92px; }
  .mp-item { gap: 12px; }
  /* タブは折り返さず横スクロールさせる（語中で改行されるのを防ぐ） */
  .tabs {
    margin-top: 30px; gap: 18px;
    overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: none; }
  .tabs .pct { white-space: nowrap; flex: none; }
  .tabs-row { margin-top: 30px; gap: 12px; }
  .tabs-row .pct { font-size: 11px; }
  .mp-thumb { width: 64px; }
  .mp-body b { font-size: 12.5px; }
  .metrics { grid-template-columns: repeat(2,1fr); }
  .shop-hero { padding: 28px 22px 32px; }
  .shop-body { padding: 22px 18px 28px; }
  .profile { flex-wrap: wrap; }
  .profile .btn { margin-left: 0; width: 100%; }
  .modal-panel { padding: 34px 22px 28px; }
  .toast-area { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ============================ 検索・通知 ============================ */
/* ヘッダーの未読ドット */
.lh-bell { position: relative; }
.lh-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #C2603F; border: 1.5px solid var(--surface);
}

/* 検索は画面上部に寄せる（中央だと入力中に視線が泳ぐ） */
.modal-search { align-items: flex-start; padding-top: 12vh; }
.search-panel {
  width: min(620px, 92vw); padding: 0; overflow: hidden;
  text-align: left;  /* modal-panel の中央寄せを打ち消す */
}
.search-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.search-ic { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.search-ic svg { width: 100%; height: 100%; }
.search-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: 14px; color: var(--ink); padding: 4px 0;
}
.search-input::placeholder { color: var(--ink-3); }
.search-head .modal-close { position: static; flex: none; }

.search-body { max-height: 56vh; overflow-y: auto; padding: 8px; }
.search-hint, .search-count {
  margin: 0; padding: 12px 10px; font-size: 12px; color: var(--ink-3);
}
.search-count { padding-bottom: 4px; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list a {
  display: grid; gap: 2px; padding: 11px 12px; border-radius: var(--r-sm);
  text-decoration: none; color: inherit;
  justify-items: start; text-align: left;
}
.search-list a:hover, .search-list a:focus-visible { background: var(--bg-soft); }
.sr-cat { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }
.search-list b { font-size: 13px; font-weight: 700; }
.sr-meta { display: flex; gap: 8px; margin-top: 2px; align-items: center; }
.sr-meta:empty { display: none; }
.sr-done, .sr-lock {
  font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
}
.sr-done { background: var(--ok-soft); color: #38624A; }
.sr-lock { background: var(--surface-2); color: var(--ink-2); }

/* 通知はヘッダー直下に落とす */
.modal-notif { align-items: flex-start; padding-top: 9vh; }
.notif-panel {
  width: min(460px, 92vw); padding: 0; overflow: hidden;
  text-align: left;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.notif-head h3 { margin: 0; font-size: 14px; }
.notif-head .modal-close { position: static; }
.notif-list { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow-y: auto; }
.notif-item a {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--r-sm);
  text-decoration: none; color: inherit; align-items: flex-start;
}
.notif-item a:hover, .notif-item a:focus-visible { background: var(--bg-soft); }
.notif-ic {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
}
.notif-ic svg { width: 15px; height: 15px; }
.notif-ic.gain   { background: var(--ok-soft);   color: #3E6E52; }
.notif-ic.unlock { background: var(--coin-soft); color: #8A5E12; }
.notif-ic.item   { background: #EEF0FC;          color: #5A62B8; }
.notif-body { display: grid; gap: 3px; min-width: 0; }
.notif-body b { font-size: 12.5px; }
.notif-body span { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
/* 未読は左に印を出す */
.notif-item.is-new a { position: relative; }
.notif-item.is-new a::before {
  content: ""; position: absolute; left: 2px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: #C2603F; transform: translateY(-50%);
}
.notif-empty { margin: 0; padding: 26px 18px; font-size: 12px; color: var(--ink-3); text-align: center; }

@media (max-width: 720px) {
  .modal-search { padding-top: 6vh; }
  .modal-notif { padding-top: 6vh; }
}

/* ============================ 修了証 ============================ */
.btn.is-muted { opacity: .55; }

.cert-sheet {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg); overflow-y: auto;
  padding: 40px 20px 110px;
  display: grid; justify-items: center; align-content: start;
}
.cert-sheet[hidden] { display: none; }

.cert {
  width: min(720px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 56px 56px 44px; text-align: center; position: relative;
  box-shadow: var(--sh-1);
}
/* 罫線の額装。装飾は線だけに留める */
.cert::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid var(--line-soft); border-radius: calc(var(--r-lg) - 6px);
  pointer-events: none;
}
.cert > * { position: relative; }
.cert-brand {
  font-size: 15px; font-weight: 700; letter-spacing: .02em; color: var(--ink);
}
.cert-kicker {
  margin: 26px 0 0; font-size: 10px; letter-spacing: .28em; color: var(--ink-3);
}
.cert-title { margin: 6px 0 0; font-size: 27px; letter-spacing: .12em; }
.cert-lead { margin: 18px 0 0; font-size: 12px; color: var(--ink-2); }
.cert-name {
  margin: 30px 0 0; font-size: 26px; font-weight: 700;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
  display: inline-block; min-width: 260px;
}
.cert-for { margin: 26px 0 0; font-size: 11.5px; color: var(--ink-3); }
.cert-course { margin: 6px 0 0; font-size: 17px; font-weight: 700; }
.cert-meta {
  margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.cert-meta > div { padding: 14px 10px; }
.cert-meta > div + div { border-left: 1px solid var(--line); }
.cert-meta dt { font-size: 10.5px; color: var(--ink-3); }
.cert-meta dd { margin: 5px 0 0; font-size: 14px; font-weight: 700; }
.cert-sign { margin: 32px 0 0; font-size: 11.5px; color: var(--ink-2); }
.cert-id { margin: 8px 0 0; font-size: 10px; color: var(--ink-3); letter-spacing: .08em; }

/* 操作バーは画面用。印刷には出さない */
.cert-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px; justify-content: center;
  padding: 14px 16px; background: var(--surface);
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .cert { padding: 34px 22px 30px; }
  .cert-title { font-size: 22px; }
  .cert-name { font-size: 21px; min-width: 0; }
  .cert-meta { grid-template-columns: 1fr; }
  .cert-meta > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* 印刷。修了証だけを1枚に収める */
@media print {
  @page { size: A4 landscape; margin: 14mm; }
  body.show-cert > *:not(.cert-sheet) { display: none !important; }
  body.show-cert { background: #fff; }
  .cert-sheet {
    position: static; padding: 0; background: #fff; overflow: visible;
  }
  .cert {
    width: 100%; border: 1px solid #C9C9C6; box-shadow: none;
    padding: 30px 40px; break-inside: avoid;
  }
  .cert-bar { display: none !important; }
}

/* ============================ ワークシート ============================ */
.p-worksheet { background: var(--bg); }
.ws-bar {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.ws {
  width: min(760px, calc(100% - 40px)); margin: 30px auto 70px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 48px 52px 40px;
}
.ws-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.ws-brand { font-size: 14px; font-weight: 700; }
.ws-cat { margin: 18px 0 0; font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.ws-head h1 { margin: 5px 0 0; font-size: 20px; line-height: 1.5; }
.ws-sub { margin: 10px 0 0; font-size: 11px; color: var(--ink-3); letter-spacing: .2em; }

.ws-sec { margin-top: 30px; }
.ws-sec h2 {
  font-size: 12px; letter-spacing: .06em; color: var(--ink-2);
  padding-bottom: 7px; border-bottom: 1px solid var(--line-soft);
}
.ws-goal { margin: 12px 0 0; font-size: 13px; line-height: 1.9; }

.ws-steps { margin: 14px 0 0; padding-left: 0; list-style: none; counter-reset: ws; }
.ws-steps li {
  counter-increment: ws; position: relative;
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px 0 13px 34px; border-bottom: 1px dashed var(--line);
}
.ws-steps li::before {
  content: counter(ws); position: absolute; left: 0; top: 13px;
  width: 21px; height: 21px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.ws-step { flex: 1; font-size: 12.5px; line-height: 1.85; }
.ws-check {
  flex: none; font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 5px 10px; margin-top: 2px;
}

/* 手書き用の罫線 */
.ws-lines { margin-top: 16px; display: grid; gap: 26px; }
.ws-lines span { display: block; height: 1px; background: var(--line); }

.ws-foot {
  margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 10.5px; color: var(--ink-3);
}

@media (max-width: 720px) {
  .ws { padding: 30px 22px 28px; width: calc(100% - 24px); margin: 16px auto 50px; }
  .ws-foot { flex-direction: column; gap: 6px; }
}

@media print {
  @page { size: A4 portrait; margin: 16mm; }
  .ws-bar { display: none !important; }
  .p-worksheet { background: #fff; }
  .ws {
    width: 100%; margin: 0; padding: 0;
    border: 0; border-radius: 0;
  }
  .ws-sec { break-inside: avoid; }
}

/* コース詳細の追加ペイン */
.pane-note {
  margin: 26px 0 0; font-size: 12px; color: var(--ink-2);
  padding: 13px 15px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.course-figures {
  margin: 18px 0 0; display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.course-figures > div { background: var(--surface); padding: 16px 14px; }
.course-figures dt { font-size: 10.5px; color: var(--ink-3); }
.course-figures dd { margin: 5px 0 0; font-size: 17px; font-weight: 700; }
.tutor-policy { margin-top: 10px; }
@media (max-width: 720px) {
  .course-figures { grid-template-columns: repeat(2, 1fr); }
}

/* SP ではコードブロックを折り返す。
   white-space:pre のままだと長い行の幅が grid の 1fr を押し広げ、
   ページ全体に横スクロールが出る（レッスンページで実測）。 */
@media (max-width: 720px) {
  .doc pre,
  .doc pre code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* 動画が無いレッスンの枠 */
.sv-inner {
  display: grid; justify-items: center; gap: 9px;
  padding: 24px; text-align: center;
  width: 100%; max-width: 100%; box-sizing: border-box;
}
.sv-ic { width: 30px; height: 30px; color: rgba(255,255,255,.85); }
.sv-ic svg { width: 100%; height: 100%; }
.sv-ttl { margin: 0; font-size: 13px; font-weight: 700; color: #fff; }
.sv-sub {
  margin: 0; font-size: 11.5px; line-height: 1.8;
  color: rgba(255,255,255,.82);
  /* em 指定だと SP 幅を超えて横スクロールが出るので、親基準で抑える */
  max-width: min(34em, 100%);
}
.stage-video.is-empty { overflow: hidden; }
.stage-video.is-empty .btn { margin-top: 5px; background: #fff; color: var(--ink); }
.stage-video.is-empty .btn:hover { background: #F2F2F0; }

/* ============ コース色（--accent をカードごとに差す） ============ */
.ccard { --accent: #6B6B6B; }
.ccard-cat {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 5px;
}
.ccard-cat i { width: 14px; height: 2px; background: var(--accent); border-radius: 2px; }
/* サムネの下端に色帯 */
.ccard-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); z-index: 3;
}
.ccard:hover { border-color: color-mix(in srgb, var(--accent) 45%, #E5E5E3); }
.ccard .gauge i { background: var(--accent); }
.ccard-prog b { color: var(--accent-ink, var(--accent)); }

/* ダッシュボードとコース詳細にもコース色を効かせる */
.now-card { --accent: #6B6B6B; }
.now-card .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.now-card .gauge i { background: var(--accent); }
.now-tag {
  display: inline-block; width: auto; align-self: flex-start;
  color: #fff; background: var(--accent);
  padding: 4px 11px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
}
.course-hero { --accent: #6B6B6B; }
.course-hero .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.course-hero h1::after {
  content: ""; display: block; width: 42px; height: 3px; margin-top: 12px;
  background: var(--accent); border-radius: 2px;
}
.tabs .tab.is-active { border-bottom-color: var(--accent, var(--ink)); color: var(--ink); }

/* 報酬の数字に色を入れて、獲得の実感を出す */
.mission-body .xp, .doc-reward:not(.coin) { color: #2C77BC; font-weight: 700; }
.mission-body .c,  .doc-reward.coin { color: #A76515; font-weight: 700; }
.stat-v.coin, [data-coin] { color: #A76515; }
/* レベルのゲージにも色を差す */
.lv-card .gauge i { background: linear-gradient(90deg, #E8B44A, #D9A143); }

/* ==========================================================
   オンボーディング（設計書 3.1〜3.5）
   ========================================================== */
.p-onb { background: #FAFAF9; }
.onb-shell { max-width: 720px; margin: 0 auto; padding: 0 20px 64px; }
.onb-head {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 0 6px;
}
.onb-logo { font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.onb-note { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }

/* 進行ステップ */
.onb-steps { display: flex; gap: 14px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.onb-steps li {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--ink-3);
}
.onb-steps li span {
  width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center;
  background: #E8E8E5; color: var(--ink-2); font-size: 10.5px; font-weight: 700;
}
.onb-steps li.is-current { color: var(--ink); font-weight: 700; }
.onb-steps li.is-current span { background: var(--ink); color: #fff; }
.onb-steps li.is-done span { background: #2E9B84; color: #fff; }

.onb-main { padding-top: 34px; }
.onb-kicker { font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); margin: 0 0 10px; }
.onb-q h1 { font-size: 27px; line-height: 1.45; margin: 0 0 8px; letter-spacing: -.01em; }
.onb-lead { font-size: 13px; color: var(--ink-2); margin: 0 0 24px; }

/* 選択肢 */
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 17px 16px; cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.pick:hover { border-color: #C9C9C6; transform: translateY(-1px); box-shadow: var(--sh-1); }
.pick b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.pick span { font-size: 11.5px; color: var(--ink-2); }

.pick-list { display: grid; gap: 10px; margin-bottom: 26px; }
.pick-row { display: flex; align-items: center; gap: 15px; }
.pick-min {
  width: 52px; height: 52px; flex: none; border-radius: 12px;
  background: #F2F2F0; display: grid; place-items: center;
  font-size: 19px; font-weight: 700; line-height: 1;
}
.pick-min i { display: block; font-size: 9.5px; font-weight: 500; font-style: normal; color: var(--ink-2); margin-top: 2px; }
.pick-txt { flex: 1; }
.pick-check { width: 20px; height: 20px; color: #2E9B84; flex: none; opacity: 0; transition: opacity .15s; }
.pick-check svg { width: 100%; height: 100%; }
.pick.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.pick.is-on .pick-min { background: var(--ink); color: #fff; }
.pick.is-on .pick-min i { color: rgba(255,255,255,.75); }
.pick.is-on .pick-check { opacity: 1; }

.onb-go { width: 100%; justify-content: center; }
.onb-go[disabled] { background: #D8D8D6; color: #6F6F6D; cursor: not-allowed; box-shadow: none; }
.onb-back {
  display: block; margin: 14px auto 0; background: none; border: 0;
  font-size: 12px; color: var(--ink-2); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}

/* ---- 画面2 ファーストレッスン ---- */
.fl-bar { height: 5px; background: #E8E8E5; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.fl-bar i { display: block; height: 100%; width: 0; background: #2E9B84; border-radius: 99px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.fl-main { padding-top: 30px; }
.fl-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px; }
.fl-kicker { font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); margin: 0 0 12px; }
.fl-card h1 { font-size: 22px; line-height: 1.55; margin: 0 0 14px; letter-spacing: -.01em; }
.fl-q { font-size: 18px !important; }
.fl-body { font-size: 14px; line-height: 2; color: var(--ink-2); margin: 0 0 24px; }
.fl-choices { display: grid; gap: 10px; }
.fl-choice {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 17px; font-size: 13.5px; line-height: 1.7;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.fl-choice:hover:not([disabled]) { border-color: #C9C9C6; background: #FCFCFB; }
.fl-choice[disabled] { cursor: default; }
.fl-choice.is-ok { border-color: #2E9B84; background: #F0F8F5; box-shadow: 0 0 0 1px #2E9B84 inset; }
.fl-choice.is-ng { border-color: #C6705E; background: #FBF4F2; }
.fl-fb { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fl-fb b { font-size: 14px; }
.fl-fb.is-ok b { color: #26826E; }
.fl-fb.is-ng b { color: #A8503F; }
.fl-fb span { font-size: 12.5px; line-height: 1.9; color: var(--ink-2); }
.fl-fb .btn { justify-self: start; margin-top: 4px; }

/* ---- 画面3 成果演出 ---- */
.rw-shell { max-width: 520px; }
.rw-wrap { padding: 52px 0 0; text-align: center; }
.rw-kicker { font-size: 10.5px; letter-spacing: .12em; color: #26826E; font-weight: 700; margin: 0 0 12px; }
.rw-title { font-size: 25px; line-height: 1.5; margin: 0 0 30px; letter-spacing: -.01em; }
.rw-ring { position: relative; width: 168px; height: 168px; margin: 0 auto 18px; }
.rw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rw-track { fill: none; stroke: #E8E8E5; stroke-width: 9; }
.rw-fill  { fill: none; stroke: #D9A143; stroke-width: 9; stroke-linecap: round; }
.rw-xp {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px;
}
.rw-xp b { font-size: 34px; font-weight: 700; line-height: 1; }
.rw-xp i { font-size: 11px; font-style: normal; color: var(--ink-2); letter-spacing: .08em; }
.rw-gain { font-size: 14px; font-weight: 700; color: #A76515; margin: 0 0 26px; }

.rw-streak {
  display: flex; align-items: center; gap: 13px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 17px; margin-bottom: 26px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s, transform .5s;
}
.rw-streak.is-in { opacity: 1; transform: none; }
.rw-flame {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: #FCF1E6;
  box-shadow: 0 0 0 4px rgba(232,116,59,.10);
}
.rw-flame svg { width: 21px; height: 21px; }
.rw-streak-txt b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.rw-streak-txt span { font-size: 11.5px; color: var(--ink-2); }
.rw-go { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .rw-streak { opacity: 1; transform: none; transition: none; }
}

/* ---- 画面4 遅延登録 ---- */
.sv-shell { max-width: 460px; }
.sv-wrap { padding: 44px 0 0; }
.sv-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px; }
.sv-hold { display: flex; gap: 10px; margin-bottom: 20px; }
.hold-item {
  flex: 1; text-align: center; padding: 13px 8px;
  border-radius: 12px; background: #FBF7EE; border: 1px solid #EADFC6;
}
.hold-item b { display: block; font-size: 22px; font-weight: 700; line-height: 1; color: #A76515; }
.hold-item span { font-size: 10.5px; color: var(--ink-2); }
.sv-card h1 { font-size: 19px; line-height: 1.6; margin: 0 0 8px; letter-spacing: -.01em; }
.sv-lead { font-size: 12.5px; line-height: 1.85; color: var(--ink-2); margin: 0 0 22px; }

.sv-oauth { display: grid; gap: 9px; }
.oauth {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 14px; border-radius: 10px;
  border: 1px solid #D5D5D2; background: #fff;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.oauth:hover { background: #FAFAF9; border-color: #BDBDBA; }
.oauth-ic { width: 17px; height: 17px; display: inline-grid; place-items: center; }
.oauth-ic svg { width: 100%; height: 100%; }

.sv-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: 11px; }
.sv-or::before, .sv-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.sv-mail { display: grid; gap: 13px; }
.sv-err { margin: 0; font-size: 11.5px; color: #A8503F; }
.sv-submit { width: 100%; justify-content: center; }
.sv-skip {
  display: block; margin: 16px auto 0; background: none; border: 0;
  font-size: 12px; color: var(--ink-3); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}

/* ---- 画面5 スキルツリーと通知 ---- */
.tree { display: grid; gap: 0; margin-top: 8px; }
.tree-node { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.tree-dot {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: #EDEDEA; color: var(--ink-3);
  font-size: 11.5px; font-weight: 700;
  border: 2px solid transparent;
}
.tree-dot svg { width: 17px; height: 17px; }
.tree-node.is-done .tree-dot { background: linear-gradient(160deg,#EFC470,#D9A143); color: #fff; }
.tree-node.is-next .tree-dot { background: #fff; border-color: var(--accent, var(--ink)); color: var(--accent-ink, var(--ink)); }
.tree-link { width: 2px; height: 16px; margin-left: 16px; background: #E3E3E0; }
.tree-link.is-done { background: #D9A143; }
.tree-txt b { display: block; font-size: 13.5px; }
.tree-txt span { font-size: 11px; color: var(--ink-2); }
.tree-node.is-lock .tree-txt b { color: var(--ink-3); }

.notif-ask { display: grid; gap: 14px; }
.notif-ask p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.notif-acts { display: flex; gap: 10px; }
.notif-acts .btn { flex: 1; justify-content: center; }

@media (max-width: 560px) {
  .pick-grid { grid-template-columns: 1fr; }
  .onb-steps { gap: 9px; }
  .onb-steps li span { width: 17px; height: 17px; font-size: 9.5px; }
  .onb-q h1 { font-size: 22px; }
  .rw-title { font-size: 21px; }
  .fl-card { padding: 24px 18px; }
  .sv-card { padding: 22px 18px; }
}

/* ダッシュボードの連続学習カードと学習マップ */
.streak-card .sk-row { display: flex; align-items: center; gap: 12px; }
.sk-flame {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: #FCF1E6; display: grid; place-items: center;
}
.sk-flame svg { width: 19px; height: 19px; }
.sk-txt b { display: block; font-size: 17px; line-height: 1.2; }
.sk-txt span { font-size: 11px; color: var(--ink-2); }
.tree-card { padding: 20px 22px; }
.sec-note { font-size: 11.5px; color: var(--ink-2); }
.modal-notify .modal-panel { max-width: 380px; padding: 26px 24px; }
.modal-notify h3 { font-size: 17px; margin: 0 0 4px; }

/* ==========================================================
   会話モード（教授・秘書・フクロウの3人で進める）
   ========================================================== */
.talk { margin: 0 0 26px; }
.talk-log { display: grid; gap: 14px; }

/* レッスン開始時の歓迎エリア。会話ログの下に埋めず、最初にキャラを見せる */
.talk-welcome {
  display: flex; align-items: center; gap: 20px; margin: 0 0 24px;
  padding: 20px 22px; background: linear-gradient(135deg, #F3F7F0, #FFFDF8);
  border: 1px solid #DCE6D8; border-radius: 20px; overflow: hidden;
}
.talk-welcome-figure { flex: none; width: 122px; height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.talk-welcome-figure img { display: block; width: 122px; height: 150px; object-fit: contain; object-position: center bottom; }
.talk-welcome-copy { min-width: 0; }
.talk-welcome-kicker { margin: 0 0 6px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.talk-welcome-text { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.65; font-weight: 700; }
.talk-welcome-context { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.75; }

.tb { display: flex; gap: 11px; align-items: flex-start;
  opacity: 0; transform: translateY(6px);
  transition: opacity .32s ease, transform .32s ease; }
.tb.is-in { opacity: 1; transform: none; }

.tb-face { flex: none; width: 46px; display: grid; justify-items: center; gap: 3px; }
.tb-face img { width: 46px; height: 46px; border-radius: 50%; object-fit: contain;
  background: #EEF3EC; display: block; }
.tb-face em { font-style: normal; font-size: 9.5px; line-height: 1;
  color: var(--ink-3); letter-spacing: .02em; white-space: nowrap; }

/* 話者ごとに立ち絵の下地を分け、誰が話しているかを色でも示す
   教授=知識 / 秘書=進行 / フクロウ=感情 */
.tb-face.is-prof img,  .buddy-face.is-prof img,  .say-face.is-prof img  { background: #ECF0F7; }
.tb-face.is-sec img,   .buddy-face.is-sec img,   .say-face.is-sec img   { background: #EAF3F2; }
.tb-face.is-owl img,   .buddy-face.is-owl img,   .say-face.is-owl img   { background: #F6F1E6; }

/* 同じ話者が続くときは立ち絵を隠して、発言のまとまりを見せる */
.tb.is-cont .tb-face img,
.tb.is-cont .tb-face em { visibility: hidden; }
.tb.is-cont .tb-body { border-radius: 14px; }

.tb-body { position: relative; flex: 1; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px;
  padding: 16px 18px; box-shadow: var(--sh-1); font-size: 16px; line-height: 1.85; }
.tb-body > :first-child { margin-top: 0; }
.tb-body > :last-child { margin-bottom: 0; }
.tb-body p { margin: 0 0 10px; line-height: 1.85; }
.tb-body ul, .tb-body ol { margin: 8px 0 0; padding-left: 1.35em; }
.tb-body li { margin: 0 0 8px; line-height: 1.8; }
.tb-split-item { line-height: 1.85; }
.tb-step { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); }
.tb-step b { flex: none; color: var(--ink); }
.tb-h { font-weight: 700; color: var(--ink); }
.tb-note { font-size: 13px; color: var(--ink-3); }

/* 自分の発話は右に寄せて、会話の往復を見せる */
.tb-me { flex-direction: row-reverse; }
.tb-me .tb-body { background: #2E4A3F; border-color: #2E4A3F; color: #fff;
  border-radius: 14px 4px 14px 14px; flex: 0 1 auto; font-size: 16px; }

.talk-foot { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.talk-choices { display: flex; flex-wrap: wrap; gap: 9px; width: 100%; }
.tchoice { font: inherit; font-size: 16px; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid #C9D3C6;
  border-radius: 999px; padding: 9px 17px; transition: background .16s, border-color .16s; }
.tchoice:hover { background: #F1F5EF; border-color: #6B8F61; }
.t-hint { font: inherit; font-size: 15px; cursor: pointer; color: #536A8B;
  background: #F5F7FB; border: 1px solid #C8D2E4; border-radius: 999px; padding: 9px 17px; }
.t-hint:hover, .t-hint[aria-expanded="true"] { background: #EAF0FA; border-color: #8097BC; }
.t-hint-box { width: 100%; padding: 12px 15px; background: #F5F7FB; border: 1px solid #D7E0EF;
  border-radius: 12px; color: #40516B; font-size: 15px; line-height: 1.75; }

.talk-next { min-width: 150px; }
.talk-read { margin-left: auto; }

/* 会話中は読む版を隠すが、いつでも戻れる */
.doc[hidden] { display: none; }

@media (max-width: 560px) {
  .talk-welcome { align-items: flex-end; gap: 12px; margin: 0 -2px 20px; padding: 14px 14px 12px; border-radius: 18px; }
  .talk-welcome-figure { width: 92px; height: 128px; }
  .talk-welcome-figure img { width: 92px; height: 128px; }
  .talk-welcome-text { font-size: 18px; line-height: 1.6; }
  .talk-welcome-kicker { font-size: 11px; }
  .talk-welcome-context { font-size: 13px; line-height: 1.65; }
  .tb-face { width: 46px; }
  .tb-face img { width: 46px; height: 46px; }
  .tb-body { padding: 16px 17px; font-size: 16px; }
  .talk-read { margin-left: 0; }
  .talk-next { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tb { transition: none; opacity: 1; transform: none; }
}


/* 会話の上に残す見出し。学んでいる対象を見失わせない */
.talk-head { margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.talk-head h1 { font-size: 23px; line-height: 1.5; margin: 6px 0 8px; }
.talk-head .doc-sum { color: var(--ink-2); font-size: 13.5px; line-height: 1.9; margin: 0 0 10px; }


/* ダッシュボードの相棒カード */
.buddy-card { display: flex; gap: 14px; align-items: flex-end; padding: 16px 18px; overflow: hidden; }
.buddy-face { flex: none; width: 86px; height: 104px; display: flex; align-items: flex-end; justify-content: center; }
.buddy-face img { width: 86px; height: 104px; object-fit: contain; object-position: center bottom; display: block; }
.buddy-face em { font-style: normal; font-size: 10px; line-height: 1;
  color: var(--ink-3); white-space: nowrap; }

/* クイズ結果など、キャラが一言添える箇所 */
.say-face { flex: none; width: 40px; display: inline-grid; justify-items: center; gap: 2px;
  vertical-align: middle; margin-right: 10px; }
.say-face img { width: 40px; height: 40px; border-radius: 50%; object-fit: contain;
  background: #EEF3EC; display: block; }
.say-face em { font-style: normal; font-size: 9px; line-height: 1;
  color: var(--ink-3); white-space: nowrap; }
.say-tx { display: inline-block; vertical-align: middle; max-width: calc(100% - 56px); }
.buddy-body { min-width: 0; }
.buddy-body b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.buddy-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink); }


/* ==========================================================
   スキル（章）。冒険の「できるようになったこと」
   ========================================================== */
.skill-gain { margin: 22px 0 4px; display: grid; gap: 12px; }
.skill-card {
  --accent: #6B6B6B;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 12px;
  animation: skIn .5s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes skIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.skill-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; background: #FBE7B4; color: #8A6A1F; }
.skill-ic svg { width: 22px; height: 22px; }
.skill-tx { display: grid; gap: 2px; text-align: left; }
.skill-lead { font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.skill-tx b { font-size: 16px; }
.skill-sub { font-size: 12px; color: var(--ink-3); }
.skill-total { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }

/* マイページのスキル一覧 */
.sk-lead { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); }
.sk-lead b { color: var(--ink); margin-left: 6px; }
.sk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sk-item {
  --accent: #9A9A96;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.sk-item.is-got { border-left: 3px solid var(--accent); }
.sk-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: #F2F2F0; color: var(--ink-3); }
.sk-item.is-got .sk-ic { background: #FBE7B4; color: #8A6A1F; }
.sk-ic svg { width: 16px; height: 16px; }
.sk-tx { flex: 1; display: grid; gap: 1px; min-width: 0; }
.sk-tx b { font-size: 14px; }
.sk-tx span { font-size: 11px; color: var(--ink-3); }
.sk-st { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sk-item.is-got .sk-st { color: #8A6A1F; font-weight: 600; }
@media (max-width: 560px) {
  .skill-card { padding: 14px; gap: 11px; }
  .sk-item { padding: 11px 13px; gap: 10px; }
}

/* ==========================================================
   サイドバー付きレイアウト（カンプ準拠）
   ========================================================== */
body.has-side { display: block; background: #F4F5F3; padding-left: 228px; }
.side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: 228px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  padding: 22px 16px; background: #fff; border-right: 1px solid var(--line);
}
.sd-logo { display: flex; align-items: center; gap: 9px; padding: 4px 8px 20px; text-decoration: none; }
.sd-close, .side-scrim { display: none; }
.sd-leaf { color: #6B8F61; display: grid; place-items: center; }
.sd-leaf svg { width: 26px; height: 26px; }
.sd-logo-tx { display: grid; }
.sd-logo-tx b { font-size: 21px; letter-spacing: .01em; color: var(--ink); }
.sd-logo-tx span { font-size: 10px; color: var(--ink-3); }
.sd-nav { display: grid; gap: 2px; }
.sd-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 9px; text-decoration: none;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.sd-item:hover { background: #F4F5F3; color: var(--ink); }
.sd-item.is-on { background: #EAF2E7; color: #2E4A3F; font-weight: 700; }
.sd-ic { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.sd-ic svg { width: 19px; height: 19px; }
.sd-sep { height: 1px; background: var(--line); margin: 14px 12px; }
.sd-badge { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 10px;
  background: #E57373; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
/* 足元の飾り。ナビが入りきらない高さの画面では、
   中途半端に切れて見えるより出さないほうがよい */
.sd-foot { margin-top: auto; text-align: center; padding: 8px 8px 2px;
  min-height: 0; display: grid; justify-items: center; gap: 2px; }
.sd-foot img { width: auto; height: 64px; max-width: 100%;
  object-fit: contain; display: block; }
@media (max-height: 780px) { .sd-foot { display: none; } }
.sd-foot p { margin: 4px 0 2px; font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.sd-foot span { font-size: 9px; color: var(--ink-4); letter-spacing: .04em; }
.main-col { flex: 1; min-width: 0; }

/* ヘッダー（検索バー付き） */
body.has-side .lh { background: #F4F5F3; border-bottom: 0; padding: 16px 28px; gap: 14px; }
body.has-side .lh-logo-sp, body.has-side .lh-burger { display: none; }
.lh-search { flex: 1; max-width: 480px; margin: 0 auto; position: relative; }
.lh-search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); display: grid; place-items: center; pointer-events: none; }
.lh-search-ic svg { width: 17px; height: 17px; }
.lh-search input {
  width: 100%; height: 42px; padding: 0 16px 0 40px;
  border: 1px solid var(--line); border-radius: 21px; background: #fff;
  font-size: 13px; font-family: inherit; color: var(--ink);
}
.lh-search input::placeholder { color: var(--ink-4); }
.lh-search input:focus { outline: 2px solid #6B8F61; outline-offset: 1px; border-color: transparent; }
.lh-user { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px;
  background: none; border: 0; border-radius: 22px; cursor: pointer; font-family: inherit; }
.lh-user:hover { background: #EDEEEB; }
.lh-ava { width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: #D8DCD5; color: #3A463C;
  font-size: 14px; font-weight: 700; }
.lh-user-tx { display: grid; text-align: left; }
.lh-user-tx b { font-size: 13px; color: var(--ink); }
.lh-user-tx span { font-size: 11px; color: var(--ink-3); }

/* ホームの2カラム */
body.has-side .shell { max-width: none; padding: 0 22px 40px; }
.home-grid { display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: 18px; align-items: start; }
.home-main { display: grid; gap: 18px; min-width: 0; }
.home-side { display: grid; gap: 16px; }
.home-row2 { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }

/* ヒーロー */
.hero-card {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 18px; align-items: center; overflow: hidden;
  padding: 40px 36px; border-radius: 16px;
  background: linear-gradient(105deg, #EFF4EC 0%, #F6F3EA 55%, #F2EFE4 100%);
}
.hero-tx h1 { margin: 0 0 14px; font-size: 34px; line-height: 1.45; letter-spacing: .01em; }
.hero-tx p { margin: 0 0 22px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 26px; background: #3D7A5A; }
.btn-lg:hover { background: #33684C; }
.hero-art { position: relative; flex: none; }
.hero-art img { width: auto; height: 250px; max-width: 100%; object-fit: contain; display: block; }
.hero-bubble {
  position: absolute; left: -36px; top: 6px; z-index: 1;
  font-size: 12px; line-height: 1.6; color: var(--ink-2);
}

/* カード共通 */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 17px; }
.card-sub { margin: -8px 0 12px; font-size: 12px; color: var(--ink-3); }
.more { font-size: 12px; color: #3D7A5A; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.more .ar { font-size: 11px; }

/* つづきから学ぶ / おすすめ */
.resume { --accent: #6B8F61; display: grid; grid-template-columns: 112px minmax(0,1fr);
  gap: 14px; align-items: center; }
.resume-thumb { width: 112px; height: 78px; border-radius: 10px; overflow: hidden; background: #E9E9E6; }
.resume-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resume-tx { display: grid; gap: 5px; min-width: 0; }
.resume-cat { justify-self: start; font-size: 11px; padding: 3px 9px; border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accentInk, var(--accent)); }
.resume-tx b { font-size: 15px; }
.resume-pos { font-size: 11px; color: var(--ink-3); }
.bar { display: block; height: 6px; border-radius: 3px; background: #E8E8E5; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent, #6B8F61); }
.reco { --accent: #6B8F61; display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; color: inherit; }
.reco:hover { background: #FAFAF8; }
.reco-thumb { width: 78px; height: 60px; border-radius: 8px; overflow: hidden; background: #E9E9E6; }
.reco-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reco-tx { display: grid; gap: 3px; min-width: 0; }
.reco-cat { justify-self: start; font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accentInk, var(--accent)); }
.reco-tx b { font-size: 13px; }
.reco-tx > span:last-child { font-size: 11px; color: var(--ink-3); }
.reco-go { color: var(--ink-3); display: grid; place-items: center; }
.reco-go svg { width: 18px; height: 18px; }
.pop-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.quote-card { display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(120deg, #EEF3F8, #F5F2E9); }
.quote-tx { margin: 0; font-size: 14px; color: var(--ink-2); }
.quote-by { font-size: 11px; color: var(--ink-3); }

/* 右カラム: 進捗リング・クエスト・スキル要約 */
.prog-wrap { display: grid; grid-template-columns: 124px minmax(0,1fr); gap: 14px; align-items: center; }
.ring { position: relative; width: 124px; height: 124px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #E8E8E5; stroke-width: 11; }
.ring-fg { fill: none; stroke: #4E9E78; stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.3,1); }
.ring-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-mid b { font-size: 25px; font-variant-numeric: tabular-nums; }
.ring-mid b i { font-size: 13px; font-style: normal; margin-left: 1px; }
.ring-mid span { font-size: 10px; color: var(--ink-3); }
.prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.prog-list li { display: flex; align-items: center; gap: 10px; }
.pl-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: #F2F3F0; color: var(--ink-2); }
.pl-ic svg { width: 16px; height: 16px; }
.pl-tx { display: grid; }
.pl-tx span { font-size: 10px; color: var(--ink-3); }
.pl-tx b { font-size: 14px; font-variant-numeric: tabular-nums; }
.quest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.quest { display: grid; grid-template-columns: 24px minmax(0,1fr) auto auto;
  gap: 10px; align-items: center; }
.q-check { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: #fff; }
.quest.is-on .q-check { background: #4E9E78; border-color: #4E9E78; }
.q-check svg { width: 14px; height: 14px; }
.q-tx { display: grid; gap: 5px; min-width: 0; }
.q-tx b { font-size: 12.5px; font-weight: 500; }
.quest.is-on .q-tx b { color: var(--ink-3); }
.q-n, .q-rw { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.q-rw { display: inline-flex; align-items: center; gap: 4px; color: #C77A2B; }
.q-rw .c { width: 15px; height: 15px; border-radius: 50%; background: #F4C35E; color: #7A5312;
  display: grid; place-items: center; font-size: 9px; font-style: normal; font-weight: 700; }
.sb-count { margin: 0 0 11px; font-size: 12px; color: var(--ink-3); }
.sb-count b { font-size: 19px; color: var(--ink); margin-right: 2px; }
.sb-next { --accent: #6B8F61; display: grid; gap: 5px; padding: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; }
.sb-lead { font-size: 10px; color: var(--ink-3); }
.sb-next b { font-size: 13px; }
.sb-pos { font-size: 11px; color: var(--ink-3); }

.resume .btn { grid-column: 1 / -1; justify-self: start; }


/* ==========================================================
   マイページ（カンプ準拠）
   ========================================================== */
.mp-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr);
  gap: 18px; align-items: center; background: linear-gradient(120deg, #F2F6F0, #EAF1F6);
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; margin-bottom: 18px; }
.mp-hero h1 { margin: 0; font-size: 30px; letter-spacing: .02em; }
.mp-hero-sub { margin: 6px 0 18px; font-size: 13px; color: var(--ink-3); }
.mp-profile { display: flex; align-items: center; gap: 16px; }
.mp-avatar { width: 84px; height: 84px; flex: none; border-radius: 50%;
  background: #D8DED6; display: grid; place-items: center; font-size: 28px; font-weight: 700;
  color: #4B5548; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.mp-profile-tx { display: grid; gap: 6px; min-width: 0; }
.mp-profile-tx b { font-size: 21px; }
.mp-profile-tx > span { font-size: 12.5px; color: var(--ink-3); }
.btn-ghost { justify-self: start; background: #fff; color: var(--ink-1);
  border: 1px solid var(--line); padding: 8px 16px; font-size: 12.5px; }
.btn-ghost:hover { background: #FAFAF8; }

.mp-hero-art { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 210px;
  gap: 12px; align-items: center; }
.mp-owl { display: block; }
.mp-owl img { width: auto; height: 190px; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; }
.mp-bubble { position: absolute; left: 0; top: 46px; max-width: 170px; background: #fff;
  border-radius: 14px; padding: 11px 14px; font-size: 12.5px; line-height: 1.7;
  white-space: pre-line; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.mp-quote { background: #FDFBF2; border: 1px solid #EFE6C9; border-radius: 12px; padding: 14px 16px; }
.mp-quote-head { display: block; font-size: 11px; color: #9A8747; margin-bottom: 7px; }
.mp-quote p { margin: 0; font-size: 13.5px; line-height: 1.8; }
.mp-quote-by { display: block; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* 5つの指標 */
.mp-stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 15px 16px; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: start; }
.stat-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.stat-ic svg { width: 21px; height: 21px; }
.tone-lv    .stat-ic { background: #FBF0D8; color: #B98B2E; }
.tone-xp    .stat-ic { background: #FDF3D6; color: #C79A22; }
.tone-coin  .stat-ic { background: #FCEBD5; color: #C07A2C; }
.tone-fire  .stat-ic { background: #FBE3DA; color: #C4623C; }
.tone-badge .stat-ic { background: #F7E0E4; color: #B34E63; }
.stat-tx { display: grid; gap: 4px; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--ink-3); }
.stat-v { font-size: 22px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11px; color: var(--ink-3); }
.stat-link { justify-self: start; margin-top: 4px; font-size: 11.5px; color: #3E7D5C;
  text-decoration: none; border: 1px solid #CFE0D5; border-radius: 16px; padding: 5px 12px; }
.stat-link:hover { background: #F2F8F4; }

/* 3カラム行 */
.mp-row { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,.85fr) minmax(0,1fr);
  gap: 16px; margin-bottom: 16px; align-items: start; }
.mp-row2 { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr) minmax(0,1fr); gap: 16px; margin-bottom: 18px; align-items: start; }

/* 学習の記録グラフ */
.seg { display: inline-flex; background: #F0F0ED; border-radius: 9px; padding: 3px; }
.seg-b { border: 0; background: transparent; padding: 6px 16px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-3); cursor: pointer; font-family: inherit; }
.seg-b.is-on { background: #6B8F61; color: #fff; }
.chart { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 8px; margin-top: 16px; }
.chart-y { display: grid; align-content: space-between; height: 180px;
  font-size: 10.5px; color: var(--ink-4); text-align: right; font-variant-numeric: tabular-nums; }
.chart-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr);
  gap: 10px; height: 180px; align-items: end; border-bottom: 1px solid var(--line); }
.chart-bars.is-dense { gap: 3px; }
.cbar { display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; }
.cbar i { display: block; width: 62%; min-height: 2px; border-radius: 5px 5px 0 0;
  background: #A9CDB4; transition: height .3s; flex: none; }
.cbar.is-today i { background: #4E9E78; }
.cbar em { font-style: normal; font-size: 10.5px; color: var(--ink-4); padding-top: 7px; }
.chart-bars.is-dense em { display: none; }
.chart-empty { grid-column: 1 / -1; margin: 12px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* 今週の学習リング */
.ring { position: relative; display: block; width: 148px; margin: 14px auto 0; }
.ring svg { width: 100%; display: block; }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; gap: 2px; }
.ring-in b { font-size: 19px; }
.ring-in span { font-size: 10.5px; color: var(--ink-3); }
.week-note { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* 修了したコース */
.done-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.done-list a { display: grid; grid-template-columns: 54px minmax(0,1fr) 22px; gap: 11px;
  align-items: center; text-decoration: none; color: inherit; }
.dl-thumb { width: 54px; height: 40px; border-radius: 7px; overflow: hidden; background: #E9E9E6; }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-tx { display: grid; gap: 2px; min-width: 0; }
.dl-tx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-tx span { font-size: 11px; color: var(--ink-3); }
.dl-ok { width: 22px; height: 22px; border-radius: 50%; background: #4E9E78; color: #fff;
  display: grid; place-items: center; }
.dl-ok svg { width: 13px; height: 13px; }

/* 最近の学習履歴 */
.hist-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.hist-list li { display: grid; grid-template-columns: 58px minmax(0,1fr) auto;
  gap: 11px; align-items: center; }
.hl-thumb { width: 58px; height: 42px; border-radius: 7px; overflow: hidden; background: #E9E9E6; }
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-tx { display: grid; gap: 2px; min-width: 0; }
.hl-tx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-tx span { font-size: 11px; color: var(--ink-3); }
.hl-when { font-size: 11px; color: var(--ink-4); }
.hist-list .btn-sm { grid-column: 1 / -1; justify-self: start; padding: 7px 14px; font-size: 12px; }

/* スキルのバッジ表示 */
.badge-lead { margin: 14px 0 12px; font-size: 12px; color: var(--ink-3); }
.badge-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.badge-hex { display: grid; justify-items: center; gap: 7px; text-align: center; }
.bh-ic { width: 52px; height: 52px; display: grid; place-items: center; color: #fff;
  background: var(--accent); border-radius: 16px; transform: rotate(45deg); }
.bh-ic svg { width: 22px; height: 22px; transform: rotate(-45deg); }
.bh-tx { font-size: 10.5px; line-height: 1.5; color: var(--ink-2); }

/* これからの目標 */
.goal-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.goal-list li { display: grid; grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 11px; align-items: center; }
.gl-ic { width: 34px; height: 34px; border-radius: 10px; background: #F0F4EE; color: #5C7A55;
  display: grid; place-items: center; }
.gl-ic svg { width: 17px; height: 17px; }
.gl-tx { display: grid; gap: 6px; min-width: 0; }
.gl-tx b { font-size: 12.5px; font-weight: 500; }
.gl-n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.mp-tabs-card { margin-top: 4px; }
.mp-coin { margin-left: auto; }
.mp-chart-actions { display: flex; align-items: center; gap: 12px; }


/* ---- サイドバー構成の SP 対応 ---- */
@media (max-width: 1100px) {
  .mp-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mp-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .mp-row .mp-done-card { grid-column: 1 / -1; }
  .home-grid { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 60;
    transform: translateX(-100%); transition: transform .25s; }
  body.side-open .side { transform: none; }
  body.has-side { padding-left: 0; }
  body.has-side .lh { padding-left: 14px; }
  .lh-burger { display: grid !important; }
  .sd-close { position: absolute; right: 10px; top: 12px; z-index: 1;
    width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent;
    place-items: center; cursor: pointer; }
  .sd-close:hover { background: #F1F2EF; }
  .sd-close svg { width: 20px; height: 20px; }
  body.side-open .sd-close { display: grid; }
  .side-scrim { position: fixed; inset: 0; width: 100%; height: 100%; padding: 0;
    border: 0; background: rgba(0,0,0,.35); z-index: 55; cursor: pointer; }
  body.side-open .side-scrim { display: block; }

  .mp-hero { grid-template-columns: minmax(0,1fr); padding: 20px; }
  .mp-hero-art { grid-template-columns: minmax(0,1fr); }
  .mp-bubble { position: static; max-width: none; margin-bottom: 10px; }
  .mp-owl img { height: 150px; }
  .mp-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mp-row, .mp-row2 { grid-template-columns: minmax(0,1fr); }
  .home-row2 { grid-template-columns: minmax(0,1fr); }
  .hero-card { grid-template-columns: minmax(0,1fr); padding: 22px 20px 26px; }
  .hero-art { display: flex; order: -1; min-height: 174px; align-items: flex-end; justify-content: center; }
  .hero-art img { height: 190px; }
  .hero-bubble { left: 50%; top: 4px; transform: translateX(-12%); font-size: 13px; white-space: nowrap; }
  .hero h1 { font-size: 26px; }
  .pop-grid, .pop-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lh-search { max-width: none; }
}

@media (max-width: 560px) {
  .mp-stats { grid-template-columns: minmax(0,1fr); }
  .mp-chart-card .card-head { align-items: flex-start; }
  .mp-chart-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
  .pop-grid, .pop-row { grid-template-columns: minmax(0,1fr); }
  .badge-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lh-user-tx { display: none; }
  body.has-side .shell { padding: 0 14px 30px; }
  .chart { grid-template-columns: 26px minmax(0,1fr); }
}

.buddy-card { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 12px; align-items: center; }
.buddy-face { width: 82px; height: 106px; align-self: end; }
.buddy-face img { width: 82px; height: 106px; display: block; }
.buddy-tx { display: grid; gap: 4px; min-width: 0; }
.buddy-tx b { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.buddy-tx > span { font-size: 12.5px; line-height: 1.7; }

/* 続きボタンは会話中いつでも押せる位置に残す */
@media (max-width: 560px) {
  .talk-foot { position: sticky; bottom: 0; z-index: 8; margin: 14px -14px -30px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .talk-next { margin: 0; }
  .buddy-card { grid-template-columns: 82px minmax(0,1fr); align-items: end; padding: 12px 14px; }
  .buddy-face { width: 82px; height: 108px; }
  .buddy-face img { width: 82px; height: 108px; }
  .buddy-tx > span { font-size: 14px; line-height: 1.7; }
}

.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.sk-card { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sk-card.is-on { border-color: var(--accent); background: #FCFCFA; }
.sk-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #F0F0ED; color: var(--ink-4); }
.sk-card.is-on .sk-ic { background: var(--accent); color: #fff; }
.sk-ic svg { width: 19px; height: 19px; }
.sk-tx { display: grid; gap: 5px; min-width: 0; }
.sk-tx b { font-size: 13.5px; }
.sk-cat { font-size: 11px; color: var(--ink-3); }
.sk-got { justify-self: start; font-size: 11px; color: #fff; background: var(--accent); padding: 3px 10px; border-radius: 11px; }
.sk-rest { font-size: 11px; color: var(--ink-4); }

/* サイドバー構成のカードは内側に余白を持たせる（文字が枠に触れないように） */
body.has-side .home-side > .card,
body.has-side .home-main > .card,
body.has-side .home-row2 > .card,
body.has-side .tree-sec,
body.has-side .mp-row > .card,
body.has-side .mp-row3 > .card,
body.has-side .mp-chart,
body.has-side .mp-week { padding: 18px 20px; }
body.has-side .home-side > .card.buddy-card { padding: 16px 18px; }

/* 日本語の折り返し。文節で切れるようにし、句読点や助詞の孤立を避ける */
body.has-side h1, body.has-side h2, body.has-side h3, body.has-side h4,
body.has-side p, body.has-side b, body.has-side .ccard-sum,
body.has-side .reco-tx, body.has-side .resume-tx { word-break: normal; overflow-wrap: anywhere; line-break: strict; }
.hero-tx h1 { line-height: 1.5; letter-spacing: .01em; }

.reco .ar { display: none; }
.reco-tx { display: grid; gap: 6px; min-width: 0; }

@media (min-width: 1500px) {
  .home-row2 { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
}

.nb { display: inline-block; }

/* 指標カードは5枚並ぶと狭いので、文字を詰めて1行に収める */
.stat-card { padding: 14px 15px; }
.stat-tx small, .stat-tx .stat-sub { font-size: 10.5px; white-space: nowrap; }
.stat-tx .btn, .stat-card .btn { font-size: 11px; padding: 5px 11px; white-space: nowrap; }

/* 最近の学習履歴。4要素を1行に収める */
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hist-list li { display: grid; grid-template-columns: 58px minmax(0,1fr) auto;
  gap: 10px; align-items: center; }
.hist-list li .btn { grid-column: 2 / -1; justify-self: start; margin-top: 2px; }
.hist-list .btn { white-space: nowrap; font-size: 11.5px; padding: 7px 12px; }
.hl-when { white-space: nowrap; }


/* ==========================================================
   コース一覧（カンプ準拠）
   ========================================================== */
.cl-hero { display: grid; grid-template-columns: minmax(0,1fr) auto 260px;
  gap: 18px; align-items: center; padding: 22px 24px; margin-bottom: 18px;
  background: linear-gradient(100deg, #FFFFFF 0%, #F3F7F1 55%, #EAF2E6 100%);
  border: 1px solid var(--line); border-radius: 16px; }
.cl-hero-tx h1 { margin: 6px 0 8px; font-size: 30px; letter-spacing: .02em; }
.cl-hero-tx p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.cl-hero-art { position: relative; display: flex; align-items: center; gap: 10px; }
.cl-hero-art img { width: auto; height: 140px; max-width: 100%; object-fit: contain; display: block; }
.cl-bubble { position: relative; font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; }
.cl-bubble em { display: block; margin-top: 4px; font-style: normal; font-size: 11px; color: var(--ink-4); }
.cl-hero-note { display: grid; gap: 4px; padding: 14px 16px; background: #FBFDF9;
  border: 1px solid #DCE8D6; border-radius: 12px; }
.cl-note-ic { width: 18px; height: 18px; color: #6B8F61; }
.cl-hero-note p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }
.cl-hero-note em { justify-self: end; font-style: normal; font-size: 11px; color: var(--ink-4); }

/* フィルタ行 */
.cl-filter { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.cl-filter .chips { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 2px; scrollbar-width: none; }
.cl-filter .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 12.5px; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.chip:hover { background: #FAFAF8; }
.chip.is-on { color: #fff; background: #2F6B4F; border-color: #2F6B4F; }
.chip-ic { width: 15px; height: 15px; display: inline-flex; }
.chip-ic svg { width: 15px; height: 15px; }
.lv-select { position: relative; flex: none; }
.lv-select select { appearance: none; font: inherit; font-size: 12.5px; color: var(--ink-2);
  padding: 9px 34px 9px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; }
.lv-select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink-4); border-bottom: 1.5px solid var(--ink-4);
  transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* セクション見出し */
.cl-sec { margin-bottom: 26px; }
.cl-sec-head { display: flex; justify-content: space-between; align-items: flex-end;
  gap: 14px; margin-bottom: 14px; }
.cl-sec-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.sec-star { width: 20px; height: 20px; color: #E0A53C; display: inline-flex; }
.sec-star svg { width: 20px; height: 20px; }
.cl-sec-head p { margin: 4px 0 0 28px; font-size: 12.5px; color: var(--ink-3); }
.cl-tools { display: flex; gap: 10px; align-items: center; }
.view-toggle { display: flex; gap: 2px; padding: 3px; background: #EFEFEC; border-radius: 9px; }
.vt { width: 32px; height: 28px; display: grid; place-items: center; color: var(--ink-3);
  background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.vt svg { width: 16px; height: 16px; }
.vt.is-on { color: #2F6B4F; background: #fff; box-shadow: var(--sh-1); }

/* おすすめ: 大きめカード4枚 */
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.bcard { --accent: #6B8F61; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: inherit; box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s; }
.bcard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,26,26,.08); }
.bcard-thumb { position: relative; aspect-ratio: 16/9; background: #E9E9E6; overflow: hidden; }
.bcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcard-badge { position: absolute; left: 10px; top: 10px; font-size: 10.5px; font-weight: 700;
  color: #fff; padding: 4px 10px; border-radius: 999px; }
.bcard-badge.is-now  { background: #E0A53C; }
.bcard-badge.is-new  { background: #4E9E78; }
.bcard-badge.is-done { background: #2F6B4F; }
.bcard-body { display: grid; gap: 7px; padding: 14px 15px 15px; }
.bcard-body b { font-size: 14.5px; line-height: 1.5; }
.bcard-sub { font-size: 12px; color: var(--ink-3); }
.bcard-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--ink-3); }
.bcard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.bcard-meta svg { width: 13px; height: 13px; }
.bcard-foot { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 9px;
  align-items: center; margin-top: 3px; }
.bcard-pct { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bcard-go { width: 26px; height: 26px; display: grid; place-items: center; color: #fff;
  background: var(--accent); border-radius: 50%; }
.bcard-go svg { width: 13px; height: 13px; }
.bcard.is-locked { opacity: .78; }

/* すべてのコース: 小さめカード */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 15px; }
.scard { --accent: #6B8F61; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s; }
.scard:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26,26,26,.07); }
.scard-thumb { position: relative; aspect-ratio: 16/9; background: #E9E9E6; overflow: hidden; }
.scard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard-lock { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: #fff; background: rgba(26,26,26,.72); padding: 3px 9px; border-radius: 999px; }
.scard-lock svg { width: 11px; height: 11px; }
.scard-body { display: grid; gap: 6px; padding: 12px 13px 13px; }
.scard-body b { font-size: 13.5px; line-height: 1.5; }
.scard-cat { font-size: 11.5px; color: var(--accent-ink, var(--accent)); font-weight: 500; }
.scard-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-3); }
.scard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.scard-meta svg { width: 12px; height: 12px; }
.scard-foot { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; }
.scard-pct { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scard-go { width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--accent-ink, var(--accent)); border: 1px solid var(--line); border-radius: 50%; }
.scard-go svg { width: 11px; height: 11px; }
.scard.is-locked { opacity: .78; }

/* リスト表示 */
.course-grid.is-list { grid-template-columns: 1fr; gap: 10px; }
.course-grid.is-list .scard { flex-direction: row; align-items: center; }
.course-grid.is-list .scard-thumb { width: 132px; aspect-ratio: 16/10; flex: none; }
.course-grid.is-list .scard-body { flex: 1; min-width: 0;
  grid-template-columns: minmax(0,1fr) 190px; align-items: center; gap: 6px 18px; padding: 12px 16px; }
.course-grid.is-list .scard-body b { grid-column: 1; }
.course-grid.is-list .scard-cat { grid-column: 1; }
.course-grid.is-list .scard-meta { grid-column: 1; }
.course-grid.is-list .scard-foot { grid-column: 2; grid-row: 1 / span 3; }

@media (max-width: 1100px) {
  .cl-hero { grid-template-columns: minmax(0,1fr); }
  .cl-hero-art { justify-content: flex-start; }
  .cl-hero-note { max-width: none; }
}
@media (max-width: 860px) {
  .cl-hero-tx h1 { font-size: 24px; }
  .cl-hero-art img { height: 110px; width: auto; }
  .cl-sec-head { flex-direction: column; align-items: stretch; }
  .cl-tools { justify-content: space-between; }
  .reco-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .course-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .course-grid.is-list .scard { flex-direction: column; align-items: stretch; }
  .course-grid.is-list .scard-thumb { width: 100%; }
  .course-grid.is-list .scard-body { grid-template-columns: minmax(0,1fr); }
  .course-grid.is-list .scard-foot { grid-column: 1; grid-row: auto; }
}


/* ==========================================================
   コース詳細（カンプ準拠）
   ========================================================== */
.cd-grid { --accent: #6B8F61; display: grid; grid-template-columns: minmax(0,1fr) 312px;
  gap: 18px; align-items: start; }
.cd-main { display: grid; gap: 18px; min-width: 0; }

/* ヒーロー */
.cd-hero { position: relative; display: grid; grid-template-columns: 300px minmax(0,1fr);
  gap: 20px; padding: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--sh-1); }
.cd-hero-art { position: relative; border-radius: 12px; overflow: hidden; background: #E9E9E6;
  aspect-ratio: 16/10; }
.cd-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-hero-veil { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,22,20,.52) 0%, rgba(20,22,20,.12) 62%, transparent 100%); }
.cd-hero-copy { position: absolute; left: 16px; top: 15px; right: 30%;
  font-size: 15px; font-weight: 700; line-height: 1.6; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.34); }
.cd-hero-tx { display: grid; gap: 9px; align-content: start; padding-right: 108px; }
.cd-tag { justify-self: start; font-size: 11px; font-weight: 700; color: #fff;
  padding: 4px 11px; border-radius: 999px; background: #4E9E78; }
.cd-tag.is-now  { background: #E0A53C; }
.cd-tag.is-done { background: #2F6B4F; }
.cd-hero-tx h1 { margin: 0; font-size: 25px; line-height: 1.45; }
.cd-lead { margin: 0; font-size: 13.5px; color: var(--accent-ink, var(--accent)); font-weight: 500; }
.cd-desc { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.cd-meta { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cd-meta li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.cd-meta svg { width: 15px; height: 15px; color: var(--accent-ink, var(--accent)); }
.cd-hero-char { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: flex-end; gap: 6px; }
.cd-hero-char img { width: auto; height: 118px; max-width: 100%; object-fit: contain; display: block; }
.cd-bubble { align-self: flex-start; font-size: 11px; line-height: 1.6; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 7px 10px; }

/* タブ */
.cd-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line);
  scrollbar-width: none; }
.cd-tabs::-webkit-scrollbar { display: none; }
.cd-tab { flex: none; font: inherit; font-size: 13px; color: var(--ink-3); background: none;
  border: 0; border-bottom: 2px solid transparent; padding: 11px 15px; cursor: pointer; white-space: nowrap; }
.cd-tab:hover { color: var(--ink-1); }
.cd-tab.is-on { color: var(--accent-ink, var(--accent)); border-bottom-color: var(--accent); font-weight: 700; }

/* レッスン一覧 */
.ll-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ll { position: relative; display: grid;
  grid-template-columns: 30px 82px minmax(0,1fr) auto 34px;
  gap: 13px; align-items: center; padding: 11px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ll:hover { background: #FAFAF8; }
.ll-link { position: absolute; inset: 0; border-radius: 12px; }
.ll-no { width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px;
  font-weight: 700; color: #fff; background: var(--accent); border-radius: 50%; }
.ll.is-locked .ll-no { background: #C9C9C4; }
.ll-thumb { width: 82px; height: 54px; border-radius: 8px; overflow: hidden; background: #E9E9E6; }
.ll-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-tx { display: grid; gap: 3px; min-width: 0; }
.ll-tx b { font-size: 13.5px; line-height: 1.5; }
.ll-tx span { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.ll-min { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ll-st { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.ll-st svg { width: 15px; height: 15px; }
.ll-st.check { color: #fff; background: #4E9E78; }
.ll-st.play  { color: var(--accent-ink, var(--accent)); border: 1px solid var(--line); }
.ll-st.lock  { color: var(--ink-4); background: #F0F0ED; }
.ll.is-next { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107,143,97,.1); }
.ll.is-locked { opacity: .72; }

/* 各タブの文章 */
.cd-prose { font-size: 13px; line-height: 1.95; color: var(--ink-2); }
.cd-prose p { margin: 0 0 14px; }
.cd-prose h3 { margin: 20px 0 10px; font-size: 14.5px; color: var(--ink-1); }
.cd-prose ul { margin: 0; padding-left: 1.25em; }
.cd-prose li { margin-bottom: 7px; }
.cd-goal-list, .cd-who { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.cd-goal-list li, .cd-who li { display: grid; grid-template-columns: 22px minmax(0,1fr);
  gap: 11px; align-items: start; }
.cd-goal-list svg, .cd-who svg { width: 18px; height: 18px; color: #C9C9C4; margin-top: 2px; }
.cd-goal-list li.is-got svg, .cd-who svg { color: #4E9E78; }
.cd-goal-list b { display: block; font-size: 13.5px; }
.cg-sub { font-size: 11.5px; color: var(--ink-4); }
.cd-faq { margin: 0; font-size: 13px; }
.cd-faq dt { font-weight: 700; color: var(--ink-1); margin-bottom: 6px; }
.cd-faq dd { margin: 0 0 18px; line-height: 1.95; color: var(--ink-2); }

/* 右カラム */
.cd-side { display: grid; gap: 16px; }
.cd-side > .card { padding: 17px 18px; }
.cd-side-h { margin: 0 0 13px; font-size: 14.5px; }
.cd-prog { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 14px; align-items: center; }
.cd-cta { width: 100%; margin-top: 15px; justify-content: center;
  background: var(--accent); border-color: var(--accent); }
.cd-cta.is-mute { background: #EFEFEC; border-color: var(--line); color: var(--ink-3); pointer-events: none; }
.cd-points, .cd-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.cd-points li, .cd-goals li { display: grid; grid-template-columns: 19px minmax(0,1fr);
  gap: 10px; align-items: start; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.cd-points svg { width: 17px; height: 17px; color: var(--accent-ink, var(--accent)); margin-top: 1px; }
.cd-goals .cg-ic { width: 19px; height: 19px; display: inline-flex; color: #C9C9C4; }
.cd-goals .cg-ic svg { width: 17px; height: 17px; }
.cd-goals li.is-got .cg-ic { color: #4E9E78; }
.cd-char-card { display: grid; justify-items: center; gap: 7px; text-align: center;
  background: linear-gradient(170deg, #FBFDF9, #F0F6EC); border-color: #DCE8D6; }
.cd-char-card img { width: auto; height: 102px; max-width: 100%; object-fit: contain; }
.cd-char-card p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.cd-char-card em { font-style: normal; font-size: 11px; color: var(--ink-4); }

@media (max-width: 1100px) {
  .cd-grid { grid-template-columns: minmax(0,1fr); }
  .cd-hero { grid-template-columns: minmax(0,1fr); }
  .cd-hero-tx { padding-right: 0; }
  .cd-hero-char { position: static; justify-content: flex-end; }
}
@media (max-width: 860px) {
  .cd-hero-tx h1 { font-size: 20px; }
  .ll { grid-template-columns: 26px minmax(0,1fr) auto; gap: 10px; padding: 10px 12px; }
  .ll-thumb { display: none; }
  .ll-min { display: none; }
  .cd-prog { grid-template-columns: 116px minmax(0,1fr); }
}

.ring-wrap { position: relative; width: 116px; height: 116px; }
.ring-wrap .ring-svg { width: 100%; height: 100%; display: block; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.pl-row { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; align-items: center; }
.pl-ic { width: 26px; height: 26px; display: grid; place-items: center; color: var(--ink-3);
  background: #F4F4F1; border-radius: 8px; }
.pl-ic svg { width: 14px; height: 14px; }
.pl-tx { display: grid; gap: 1px; min-width: 0; }
.pl-tx > span { font-size: 11px; color: var(--ink-4); }

@media (max-width: 860px) {
  .cl-filter { flex-wrap: wrap; }
  .cl-filter .chips { flex-wrap: nowrap; width: 100%; order: 2; }
  .cl-filter .lv-select { order: 1; width: 100%; }
  .cl-filter .lv-select select { width: 100%; }
}

/* ========== バッジ・実績 ========== */
.bd-hero { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bd-hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: .02em; }
.bd-count { display: flex; align-items: baseline; gap: 7px; padding: 12px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.bd-count b { font-size: 28px; color: #2E6B4F; font-variant-numeric: tabular-nums; }
.bd-count span { font-size: 13px; color: var(--ink-3); }
.bd-filter { display: flex; gap: 8px; margin-bottom: 16px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px; }
.bdg { display: grid; justify-items: center; gap: 7px; padding: 20px 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.bdg b { font-size: 13.5px; }
.bdg-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.bdg-hex { width: 62px; height: 62px; display: grid; place-items: center;
  background: #EDEDEA; color: #9A9A95;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.bdg-hex svg { width: 27px; height: 27px; }
.bdg.is-on[data-tone=g] .bdg-hex { background: #2E6B4F; color: #fff; }
.bdg.is-on[data-tone=o] .bdg-hex { background: #E8743B; color: #fff; }
.bdg.is-on[data-tone=b] .bdg-hex { background: #3F7EA8; color: #fff; }
.bdg.is-on[data-tone=y] .bdg-hex { background: #D9A143; color: #fff; }
.bdg.is-on[data-tone=r] .bdg-hex { background: #B4474A; color: #fff; }
.bdg.is-on[data-tone=p] .bdg-hex { background: #7A6096; color: #fff; }
.bdg:not(.is-on) { opacity: .82; }
.bdg:not(.is-on) b { color: var(--ink-3); }
.bdg-got { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  color: #2E6B4F; font-weight: 500; }
.bdg-got svg { width: 13px; height: 13px; }
.bdg-bar { display: block; width: 100%; height: 5px; border-radius: 3px;
  background: #E8E8E5; overflow: hidden; }
.bdg-bar i { display: block; height: 100%; background: #9FB89A; border-radius: 3px; }
.bdg-pos { font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

/* ===== 設定 ===== */
.set-wrap { max-width: 680px; display: grid; gap: 16px; }
.set-card { padding: 20px 22px; }
.set-card h2 { margin: 0 0 4px; font-size: 15px; }
.set-note { margin: 0 0 14px; font-size: 12px; color: var(--ink-3); }
.set-row { display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row b { display: block; font-size: 13.5px; font-weight: 500; }
.set-row span { font-size: 11.5px; color: var(--ink-3); }
.sw { width: 46px; height: 26px; border-radius: 13px; border: 1px solid var(--line);
  background: #E8E8E5; position: relative; cursor: pointer; transition: background .18s; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.sw[aria-checked="true"] { background: #2E6B4F; border-color: #2E6B4F; }
.sw[aria-checked="true"]::after { transform: translateX(20px); }
.set-picks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.set-pick { padding: 12px 10px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; text-align: center; display: grid; gap: 3px; }
.set-pick b { font-size: 14px; }
.set-pick span { font-size: 11px; color: var(--ink-3); }
.set-pick.is-on { border-color: #2E6B4F; background: #F2F7F3; }
.btn-danger { color: #B3372F; border: 1px solid #E4C3C0; background: #fff; }
.btn-danger:hover { background: #FCF3F2; }

.set-row input[type=text], .set-row select {
  min-width: 190px; padding: 9px 11px; font: inherit; font-size: 13px;
  color: var(--ink-1); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; }
.set-row input[type=text]:focus, .set-row select:focus {
  outline: 2px solid #2E6B4F; outline-offset: 1px; }

/* ===== 学習の推移 ===== */
.page-h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: .02em; }
.page-sub { margin: 0 0 20px; font-size: 13px; color: var(--ink-3); }
.rk-top { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 16px; margin-bottom: 16px; }
.rk-main, .rk-side { padding: 20px 22px; }
.rk-line { height: 170px; display: grid; }
.rk-svg { width: 100%; height: 140px; }
.rk-total { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); text-align: right; }
.rk-total b { font-size: 15px; color: var(--ink-1); }
.rk-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.rk-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 12px; align-items: center; padding: 16px 18px; }
.rk-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.rk-ic svg { width: 19px; height: 19px; }
.rk-card[data-dir=up] .rk-ic { background: #E7F1E9; color: #2E6B4F; }
.rk-card[data-dir=down] .rk-ic { background: #FBEBE4; color: #C05621; }
.rk-card[data-dir=flat] .rk-ic { background: #EFEFEC; color: var(--ink-3); }
.rk-tx b { display: block; font-size: 13px; }
.rk-tx span { font-size: 11.5px; color: var(--ink-3); }
.rk-now { font-size: 17px; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .rk-top { grid-template-columns: minmax(0,1fr); }
  .rk-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .rk-cards { grid-template-columns: minmax(0,1fr); }
}

/* ===== お知らせ ===== */
.nt-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; }
.nt-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.nt-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 13px; align-items: center; padding: 15px 17px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.nt-item.is-new { border-left: 3px solid #2E6B4F; background: #FAFCFA; }
.nt-ic { width: 40px; height: 40px; border-radius: 10px; background: #F2F5F2;
  display: grid; place-items: center; color: #2E6B4F; }
.nt-ic svg { width: 19px; height: 19px; }
.nt-tx b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.nt-tx span { font-size: 12px; color: var(--ink-3); }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; background: #E8743B; }

/* ===== クエスト ===== */
.qs-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr);
  gap: 16px; margin-bottom: 16px; }
.qs-grid > .card, .qs-streak { padding: 20px 22px; }
.qs-count { font-size: 12px; color: var(--ink-3); }
.qs-bar { margin-top: 16px; display: grid; gap: 7px; }
.qs-note { font-size: 11.5px; color: var(--ink-3); }
.qs-days { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.qd { display: grid; gap: 5px; justify-items: center; }
.qd i { width: 38px; height: 38px; border-radius: 11px; background: #F1F1EE;
  display: grid; place-items: center; color: #E8743B; }
.qd i svg { width: 18px; height: 18px; }
.qd.is-on i { background: #FBEEE6; }
.qd em { font-style: normal; font-size: 11px; color: var(--ink-4); }
