/* ========================================================
   💖 HJ AI 攻略ミッション 2026 — Gal Skin Palette ✨
   hot pink / electric yellow / sky blue / magenta / lime
   ======================================================== */
:root {
  --primary: #ff2e93;          /* hot pink */
  --primary-deep: #d4128a;
  --accent: #00c2ff;           /* sky blue */
  --accent-2: #ffde3a;          /* electric yellow */
  --magenta: #b00fba;
  --lime: #c8ff00;
  --pass: #16a34a;
  --fail: #dc2626;
  --bg: #fff7fb;
  --surface: #ffffff;
  --border: #ffd1f5;
  --text: #1a0b2e;             /* deep ink */
  --text-soft: #3f2a5e;
  --muted: #7a5b96;
  --shadow: 4px 4px 0 #1a0b2e;
  --shadow-sm: 2px 2px 0 #1a0b2e;
  --shadow-pink: 4px 4px 0 #ff2e93;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* header */
.site-header {
  background: var(--primary);
  color: white;
  padding: 14px 0;
  border-bottom: 4px solid var(--accent);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}
.site-header nav a {
  color: white;
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.95rem;
}
.site-header nav a:hover { opacity: 1; }

/* hero */
.hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(ellipse at top left, #ffd1f5 0%, transparent 50%),
    radial-gradient(ellipse at top right, #d1f5ff 0%, transparent 50%),
    linear-gradient(135deg, #ff2e93 0%, #b00fba 50%, #00c2ff 100%);
  color: white;
  text-shadow: 1px 1px 0 #1a0b2e;
}
.hero h1 { font-size: 1.8rem; margin: 0 0 14px; line-height: 1.4; }
.hero .lead { opacity: 0.92; font-size: 1.02rem; margin: 0 0 18px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.82rem;
  margin-right: 6px;
}

/* courses */
.courses, .about { padding: 48px 0; }
.courses h2, .about h2 { font-size: 1.4rem; margin: 0 0 20px; }
.course-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.course-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.course-block__head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
}
.course-block__head h3 { margin: 0 0 6px; font-size: 1.15rem; }
.course-block__head p { margin: 0 0 6px; color: #334155; font-size: 0.95rem; }
.course-block__meta { color: var(--muted); font-size: 0.85rem; }
.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: lesson;
}
.lesson-list li {
  border-top: 1px solid var(--border);
}
.lesson-list li:first-child { border-top: none; }
.lesson-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 26px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.lesson-link:hover { background: #f1f5f9; }
.lesson-link__title { flex: 1; font-size: 0.98rem; font-weight: 500; }
.lesson-link__arrow { color: var(--accent); font-weight: 700; }

/* lesson */
.lesson { padding: 36px 0 12px; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin: 0 0 8px; }
.lesson-body { background: var(--surface); padding: 28px 32px; border-radius: 10px; border: 1px solid var(--border); }
.lesson-body h1 { font-size: 1.6rem; margin: 0 0 14px; }
.lesson-body h2 { font-size: 1.2rem; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.lesson-body h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.lesson-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.55;
}
.lesson-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.lesson-body pre code { background: transparent; padding: 0; }
.lesson-body ul, .lesson-body ol { padding-left: 24px; }
.lesson-body strong { color: var(--accent); }

/* missions */
.missions { padding: 12px 0 56px; }
.missions h2 { font-size: 1.4rem; margin: 0 0 16px; }
.mission-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 18px;
}
.mission-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.mission-card .instruction { color: #334155; margin-bottom: 14px; font-size: 0.95rem; }
.mission-card .rubric-summary { background: #f1f5f9; padding: 12px 14px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 14px; }
.mission-card .rubric-summary summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.mission-card .rubric-summary ul { margin: 8px 0 0; padding-left: 20px; }

.mission-card textarea {
  width: 100%;
  min-height: 240px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  resize: vertical;
  background: #fff;
}
.mission-card .actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn {
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: white; color: var(--primary); border-color: var(--border); }
.btn-secondary:hover { background: #f1f5f9; }

.judge-result {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 0.95rem;
}
.judge-result.pass { background: #ecfdf5; border-color: var(--pass); color: #065f46; }
.judge-result.fail { background: #fef2f2; border-color: var(--fail); color: #7f1d1d; }
.judge-result h4 { margin: 0 0 8px; font-size: 1rem; }
.judge-result ul { margin: 4px 0 0; padding-left: 20px; }
.judge-result .score { font-weight: 700; }
.judge-result details { margin-top: 8px; }

/* lesson nav */
.lesson-nav {
  margin: 28px 0 0;
}
.lesson-nav--bottom { margin: 32px 0 0; }
.lesson-nav__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.lesson-nav__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s;
}
.lesson-nav__btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.lesson-nav__btn--placeholder { background: transparent; border-color: transparent; pointer-events: none; }
.lesson-nav__btn--next { text-align: right; }
.lesson-nav__btn--done { background: linear-gradient(135deg, #16a34a, #2563eb); color: white; border-color: transparent; }
.lesson-nav__btn--done:hover { transform: translateY(-2px); }
.lesson-nav__label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.lesson-nav__btn--done .lesson-nav__label { color: rgba(255, 255, 255, 0.85); }
.lesson-nav__title { font-size: 0.95rem; font-weight: 600; }
.lesson-nav__progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.lesson-nav__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.12s;
}
.lesson-nav__dot:hover { background: #cbd5e1; }
.lesson-nav__dot.is-current { background: var(--accent); color: white; }
.lesson-nav__dot.is-done { background: #16a34a; color: white; }

/* footer */
.site-footer { padding: 28px 0; text-align: center; color: var(--muted); }

@media (max-width: 600px) {
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 1.4rem; }
  .lesson-body { padding: 20px; }
  .mission-card { padding: 18px; }
  .lesson-nav__inner { grid-template-columns: 1fr; }
  .lesson-link { padding: 12px 18px; }
  .course-block__head { padding: 18px; }
}

/* 2026-05-06: お手本 panel (textarea 自動貼付やめて読むだけ) */
.example-panel {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.example-panel__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.example-panel__head strong { color: #78350f; font-size: 0.95rem; }
.example-panel__hint { color: #78350f; font-size: 0.82rem; line-height: 1.45; }
.example-panel__body {
  background: rgba(255, 255, 255, 0.6);
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  user-select: text;
  color: #451a03;
  max-height: 320px;
  overflow-y: auto;
}

/* 2026-05-06: lesson body — 「身につくこと」「お仕事での使い方」「なぜプロンプト〜」のセクションをカード調に */
.lesson-body h2 {
  margin-top: 28px;
}
.lesson-body h2:first-child, .lesson-body h1 + h2 { margin-top: 16px; }

/* progress dot 進化 */
.lesson-nav__dot.is-passed { background: #16a34a !important; color: white !important; }
.lesson-nav__dot.is-passed::after { content: ''; }

/* home page lesson list — completed checkmark */
.lesson-link.is-passed::before {
  content: '✓';
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #16a34a;
  color: white;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 8px;
}
.lesson-link.is-passed { background: #f0fdf4; }
.lesson-link.is-passed .lesson-link__title { color: #166534; }

/* progress strip on top of home */
.progress-strip {
  background: linear-gradient(135deg, #1e293b, #2563eb);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.progress-strip__count strong {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.progress-strip__count span { font-size: 0.82rem; opacity: 0.85; }
.progress-strip__bar {
  flex: 1;
  min-width: 140px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-strip__bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #fbbf24);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-strip__streak {
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

/* confetti */
.confetti-piece {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 14px;
  pointer-events: none;
  z-index: 100;
  border-radius: 2px;
  animation: confetti-fall 2.8s linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* 2026-05-06: markdown table */
.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 0.9rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.md-table thead th {
  background: #f1f5f9;
  text-align: left;
  font-weight: 700;
  color: var(--primary);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.md-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.md-table tbody tr:last-child td { border-bottom: none; }
.md-table tbody tr:hover { background: #f8fafc; }
.md-table strong { color: var(--accent); }
.md-table code { font-size: 0.86em; }

/* 2026-05-06: splash + persona pages */

/* shared body backgrounds */
body.splash-page {
  font-family: "Inter", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(167, 139, 250, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(45, 212, 191, 0.12), transparent 60%),
    #f8fafc;
}
body.persona-page {
  font-family: "Inter", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}
body.persona-cowork {
  background:
    radial-gradient(800px 500px at 90% -5%, rgba(13, 148, 136, 0.14), transparent 60%),
    radial-gradient(700px 500px at -5% 110%, rgba(56, 189, 248, 0.1), transparent 60%),
    #f8fafc;
}
body.persona-code {
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(700px 500px at -5% 110%, rgba(99, 102, 241, 0.12), transparent 60%),
    #0f172a;
  color: #e6eaf2;
}

/* splash */
.splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
}
.splash__inner { max-width: 880px; width: 100%; }
.splash__brand { text-align: center; margin-bottom: 36px; }
.brand-mark {
  font-size: 3rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(122, 162, 255, 0.3));
}
.splash__brand h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: #0f172a;
}
.splash__brand p {
  margin: 0;
  color: #475569;
  font-size: 1rem;
}
.splash__meta { margin-top: 16px; }
.splash__meta .badge {
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}
.splash__pick {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 18px;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.splash__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) { .splash__cards { grid-template-columns: 1fr; } }
.path-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 22px;
  background: white;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}
.path-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(0,0,0,0.02));
  pointer-events: none;
}
.path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.12);
}
.path-card--cowork {
  background: linear-gradient(160deg, #f0fdfa, #ffffff 60%);
  border-color: rgba(13, 148, 136, 0.2);
}
.path-card--cowork:hover { border-color: rgba(13, 148, 136, 0.5); }
.path-card--code {
  background: linear-gradient(160deg, #ede9fe, #ffffff 60%);
  border-color: rgba(124, 58, 237, 0.2);
}
.path-card--code:hover { border-color: rgba(124, 58, 237, 0.5); }
.path-card__emoji {
  font-size: 2.6rem;
  margin-bottom: 10px;
}
.path-card h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: -0.02em;
}
.path-card h2 span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-family: "JetBrains Mono", monospace;
}
.path-card p {
  margin: 0 0 14px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}
.path-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.86rem;
  color: #64748b;
}
.path-card__list li {
  padding: 4px 0 4px 20px;
  position: relative;
}
.path-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}
.path-card__cta {
  margin-top: auto;
  align-self: flex-end;
  font-weight: 700;
  font-size: 1.05rem;
}
.path-card--cowork .path-card__cta { color: #0d9488; }
.path-card--code .path-card__cta { color: #7c3aed; }

.splash__about {
  margin-top: 40px;
  padding: 24px 28px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.splash__about h3 { margin: 0 0 10px; font-size: 1.05rem; }
.splash__about p { margin: 0 0 10px; color: #475569; font-size: 0.92rem; }
.splash__about p:last-child { margin-bottom: 0; }

.splash-footer {
  text-align: center;
  padding: 20px 0 30px;
  color: #94a3b8;
  font-size: 0.78rem;
}

/* persona pages */
.persona-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
}
body.persona-code .persona-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.persona-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.persona-back {
  font-size: 1.4rem;
  text-decoration: none;
  color: #1e293b;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.12s;
}
.persona-back:hover { background: #f1f5f9; }
body.persona-code .persona-back { color: #e6eaf2; }
body.persona-code .persona-back:hover { background: rgba(255, 255, 255, 0.06); }
.persona-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}
body.persona-code .persona-header__brand { color: #e6eaf2; }
.persona-header__emoji { font-size: 1.3rem; }
.glossary-btn {
  margin-left: auto;
  padding: 8px 14px;
  background: #ede9fe;
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 8px;
  color: #6d28d9;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.12s;
}
.glossary-btn:hover { background: #ddd6fe; }
body.persona-code .glossary-btn {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}
body.persona-code .glossary-btn:hover { background: rgba(167, 139, 250, 0.25); }

.persona-roadmap-link {
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.12s;
}
.persona-roadmap-link:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(167, 139, 250, 0.26));
  transform: translateY(-1px);
}
body.persona-code .persona-roadmap-link {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(168, 85, 247, 0.18));
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
body.persona-code .glossary-btn { margin-left: 8px; }
@media (max-width: 480px) {
  .persona-roadmap-link { padding: 6px 10px; font-size: 0.74rem; }
}

.persona-hero {
  padding: 48px 0 36px;
  color: white;
}
.persona-hero--cowork {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 60%, #0284c7 100%);
}
.persona-hero--code {
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #6d28d9 100%);
}
.persona-hero h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.persona-hero .lead { margin: 0; opacity: 0.92; font-size: 1rem; }

.persona-content { padding: 32px 20px 60px; max-width: 880px; }
body.persona-code .persona-content { color: #e6eaf2; }

/* lesson-path (game-like vertical path) */
.lesson-path {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  position: relative;
}
.lesson-path::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  background: repeating-linear-gradient(180deg, #cbd5e1 0 6px, transparent 6px 12px);
  z-index: 0;
}
body.persona-code .lesson-path::before {
  background: repeating-linear-gradient(180deg, rgba(167, 139, 250, 0.4) 0 6px, transparent 6px 12px);
}
.lesson-node {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}
.lesson-node__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, transform 0.12s;
}
.lesson-node__link:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: translateX(4px);
}
body.persona-code .lesson-node__link:hover { background: rgba(255, 255, 255, 0.04); }
.lesson-node__circle {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #64748b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.18s;
}
body.persona-code .lesson-node__circle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}
.lesson-node.is-passed .lesson-node__circle {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-color: #16a34a;
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.persona-cowork .lesson-node:hover .lesson-node__circle:not(.is-passed),
.persona-cowork .lesson-node__link:hover .lesson-node__circle {
  border-color: #0d9488;
  color: #0d9488;
}
.persona-code .lesson-node:hover .lesson-node__circle:not(.is-passed),
.persona-code .lesson-node__link:hover .lesson-node__circle {
  border-color: #a78bfa;
  color: #a78bfa;
}
.lesson-node__body { flex: 1; min-width: 0; }
.lesson-node__title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lesson-node__arrow {
  color: #94a3b8;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
body.persona-code .lesson-node__arrow { color: #6b7280; }
.lesson-node.is-passed .lesson-node__title { color: #16a34a; }

/* progress strip (per persona variant) */
.progress-strip--code {
  background: linear-gradient(135deg, #1e1b4b, #6d28d9);
}

/* course block in persona pages */
body.persona-code .course-block {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.persona-code .course-block__head {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.persona-code .course-block__head h3 { color: #e6eaf2; }
body.persona-code .course-block__head p { color: #cbd5e1; }
body.persona-code .course-block__meta { color: #94a3b8; }

.empty-msg { text-align: center; color: #64748b; padding: 40px 20px; }

/* glossary modal */
.glossary-modal { position: fixed; inset: 0; z-index: 200; }
.glossary-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  animation: gFadeIn 0.15s ease-out;
}
@keyframes gFadeIn { from { opacity: 0; } to { opacity: 1; } }
.glossary-modal__panel {
  position: relative;
  max-width: 720px;
  margin: 5vh auto;
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: gSlideUp 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}
@keyframes gSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.glossary-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}
.glossary-modal__head h2 { margin: 0; font-size: 1.05rem; color: #5b21b6; }
.glossary-modal__close {
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #6d28d9;
}
.glossary-modal__close:hover { background: #faf5ff; }
.glossary-modal__body {
  padding: 18px 22px;
  overflow-y: auto;
}
.glossary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.glossary-table th,
.glossary-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
}
.glossary-table th {
  background: #faf5ff;
  font-weight: 700;
  color: #5b21b6;
  font-size: 0.82rem;
}
.glossary-table tr:last-child td { border-bottom: none; }
.glossary-table tr:hover { background: #faf5ff; }
.glossary-table strong { color: #6d28d9; }
.glossary-tip {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: #fffbeb;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #78350f;
}

/* 2026-05-06: live inline checker (Phase 2A) */
.live-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.live-status[data-state="checking"] {
  background: #eff6ff;
  border-color: #93c5fd;
}
.live-status[data-state="pass"] {
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.4);
}
.live-status[data-state="fail"] {
  background: #fffbeb;
  border-color: #fcd34d;
}
.live-status__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.live-status__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.live-score {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 12px;
  min-width: 70px;
  text-align: center;
  transition: all 0.2s;
}
.live-score.is-pass {
  color: var(--pass);
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.live-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.live-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.live-row__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.2s;
}
.live-row.is-idle .live-row__icon { background: #e2e8f0; color: #94a3b8; }
.live-row.is-fail .live-row__icon {
  background: #fee2e2;
  color: #dc2626;
}
.live-row.is-pass .live-row__icon {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}
.live-row__desc { color: #334155; line-height: 1.45; }
.live-row.is-pass .live-row__desc { color: #065f46; }
.live-row.is-fail .live-row__desc { color: #92400e; }

/* dark variant for code lessons */
body.persona-code .live-status,
body.persona-code .live-status[data-state="checking"],
body.persona-code .live-status[data-state="pass"],
body.persona-code .live-status[data-state="fail"] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* 2026-05-06 C1: lesson path 星 + 修了証 CTA */
.lesson-node__stars {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-top: 2px;
  color: #fbbf24;
  font-weight: 700;
}
.lesson-node__stars.stars-3 { color: #f59e0b; text-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
body.persona-code .lesson-node__stars { color: #fbbf24; }
body.persona-code .lesson-node__stars.stars-3 { color: #fde047; text-shadow: 0 0 8px rgba(253, 224, 71, 0.5); }

.cert-cta {
  display: block;
  text-align: center;
  margin: 18px 26px 22px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 8px 22px -8px rgba(245, 158, 11, 0.55);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cert-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(245, 158, 11, 0.7);
}
body.persona-code .cert-cta {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 8px 22px -8px rgba(251, 191, 36, 0.55);
}

/* 2026-05-06: 「自分の Claude で試す」ボタン + toast */
.btn-claude {
  background: linear-gradient(135deg, #d97706, #c2410c);
  color: white;
  border: none;
  font-weight: 700;
}
.btn-claude:hover {
  background: linear-gradient(135deg, #c2410c, #9a3412);
  box-shadow: 0 6px 14px -6px rgba(217, 119, 6, 0.5);
}
.claude-toast {
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #78350f;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.claude-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}
.claude-toast strong { color: #92400e; }

/* 2026-05-06: Glossary highlight (難しい単語に hover で説明) */
abbr.term {
  text-decoration: none;
  border-bottom: 1.5px dotted #f59e0b;
  cursor: help;
  font-weight: 600;
  color: inherit;
  padding: 0 1px;
  transition: background 0.15s;
}
abbr.term:hover, abbr.term:focus {
  background: linear-gradient(180deg, transparent 60%, rgba(245, 158, 11, 0.25) 60%);
  outline: none;
}
body.persona-code abbr.term {
  border-bottom-color: #fbbf24;
}
body.persona-code abbr.term:hover, body.persona-code abbr.term:focus {
  background: linear-gradient(180deg, transparent 60%, rgba(251, 191, 36, 0.3) 60%);
}

.term-tooltip {
  position: absolute;
  z-index: 1000;
  width: max-content;
  max-width: 320px;
  background: white;
  color: #0f172a;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.18);
  font-size: 0.88rem;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}
.term-tooltip.is-show { opacity: 1; transform: translateY(0); }
.term-tooltip__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 6px;
}
.term-tooltip__body {
  color: #1e293b;
  margin-bottom: 10px;
}
.term-tooltip__why-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #fef3c7;
}
.term-tooltip__why {
  color: #475569;
  font-size: 0.85rem;
}

/* dark theme for code lessons */
body.persona-code .term-tooltip {
  background: #0d1424;
  color: #e6eaf2;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(167, 139, 250, 0.25);
}
body.persona-code .term-tooltip__title { color: #fbbf24; }
body.persona-code .term-tooltip__body { color: #e6eaf2; }
body.persona-code .term-tooltip__why-label { color: #c4b5fd; border-top-color: rgba(255,255,255,0.08); }
body.persona-code .term-tooltip__why { color: #cbd5e1; }

@media (max-width: 540px) {
  .term-tooltip { max-width: calc(100vw - 24px); }
}

/* 2026-05-06: AI sample preview UI 整理 */
.preview-result {
  margin-top: 14px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.06);
}
.preview-result__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-bottom: 1px solid #e2e8f0;
}
.preview-result__head--warn { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.preview-result__head--err { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.preview-result__icon { font-size: 1.4rem; flex-shrink: 0; }
.preview-result__head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.preview-result__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}
.preview-result__head--warn .preview-result__title { color: #92400e; }
.preview-result__head--err .preview-result__title { color: #991b1b; }
.preview-result__sub {
  font-size: 0.75rem;
  color: #64748b;
  letter-spacing: 0.02em;
}
.preview-result__head--err .preview-result__sub { color: #991b1b; }
.preview-result__body {
  padding: 16px 18px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #1e293b;
  /* 改行を保持 + 自動折返し (email や箇条書きの newline がそのまま見える) */
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  background: #fafbfc;
}
.preview-result__note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px 12px;
  font-size: 0.78rem;
  color: #64748b;
  background: white;
  border-top: 1px solid #e2e8f0;
}
.preview-result__note strong { color: #475569; font-weight: 600; }

.preview-result__loading {
  padding: 24px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafbfc;
  color: #64748b;
  font-size: 0.92rem;
}
.preview-result__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: prevSpin 0.8s linear infinite;
}
@keyframes prevSpin {
  to { transform: rotate(360deg); }
}

/* code lesson dark theme */
body.persona-code .preview-result {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.persona-code .preview-result__head {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(167, 139, 250, 0.12));
  border-bottom-color: rgba(255,255,255,0.08);
}
body.persona-code .preview-result__title { color: #e6eaf2; }
body.persona-code .preview-result__sub { color: #94a3b8; }
body.persona-code .preview-result__body {
  background: rgba(0,0,0,0.2);
  color: #e6eaf2;
}
body.persona-code .preview-result__note {
  background: rgba(255,255,255,0.02);
  color: #94a3b8;
  border-top-color: rgba(255,255,255,0.06);
}
body.persona-code .preview-result__note strong { color: #cbd5e1; }

@media (max-width: 540px) {
  .preview-result__body { padding: 12px 14px; font-size: 0.88rem; }
  .preview-result__head { padding: 10px 14px; }
}

/* ============================================================
 * Quiz (理解度チェック) - Lv1 全レッスンで mission の下に表示
 * ============================================================ */
.quiz-section {
  background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
  border-top: 1px solid rgba(14, 165, 233, 0.15);
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
  padding: 28px 0;
  margin-top: 12px;
}
body.persona-code .quiz-section {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.06));
  border-color: rgba(99, 102, 241, 0.25);
}
.quiz-section__head { margin-bottom: 14px; }
.quiz-section__head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: #0c4a6e;
}
body.persona-code .quiz-section__head h2 { color: #93c5fd; }
.quiz-section__hint { font-size: 0.85rem; color: #475569; margin: 0; }
body.persona-code .quiz-section__hint { color: #94a3b8; }

.quiz-q {
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  border: 1px solid rgba(14, 165, 233, 0.15);
}
body.persona-code .quiz-q {
  background: rgba(255,255,255,0.04);
  border-color: rgba(99, 102, 241, 0.2);
}
.quiz-q__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
}
.quiz-q__text { font-size: 0.95rem; line-height: 1.55; margin: 0 0 10px; color: #1e293b; font-weight: 600; }
body.persona-code .quiz-q__text { color: #e6eaf2; }
.quiz-q__choices { display: grid; gap: 6px; }
.quiz-q__choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  font-size: 0.88rem;
  cursor: pointer;
  background: rgba(255,255,255,0.6);
  transition: all 0.12s;
}
.quiz-q__choice:hover { background: rgba(14, 165, 233, 0.08); border-color: rgba(14, 165, 233, 0.4); }
.quiz-q__choice input[type="radio"] { margin: 0; }
body.persona-code .quiz-q__choice {
  background: rgba(255,255,255,0.05);
  border-color: rgba(99, 102, 241, 0.25);
  color: #cbd5e1;
}
body.persona-code .quiz-q__choice:hover { background: rgba(99, 102, 241, 0.1); }

.quiz-q__feedback {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.5;
}
.quiz-q__feedback.is-correct { background: rgba(34, 197, 94, 0.12); color: #15803d; border-left: 3px solid #22c55e; }
.quiz-q__feedback.is-wrong { background: rgba(239, 68, 68, 0.10); color: #b91c1c; border-left: 3px solid #ef4444; }
.quiz-q__feedback.is-empty { background: rgba(245, 158, 11, 0.10); color: #b45309; border-left: 3px solid #f59e0b; }
body.persona-code .quiz-q__feedback.is-correct { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
body.persona-code .quiz-q__feedback.is-wrong { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.quiz-result {
  margin: 14px 0 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.quiz-result.is-pass {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(16, 185, 129, 0.14));
  color: #14532d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.quiz-result.is-fail {
  background: rgba(245, 158, 11, 0.10);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
body.persona-code .quiz-result.is-pass { color: #86efac; background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(16, 185, 129, 0.12)); }
body.persona-code .quiz-result.is-fail { color: #fbbf24; }
.quiz-actions { display: flex; gap: 8px; margin-top: 6px; }

@media (max-width: 540px) {
  .quiz-q { grid-template-columns: 28px 1fr; padding: 12px; gap: 8px; }
  .quiz-q__text { font-size: 0.88rem; }
}

.lesson-node__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.lesson-node__quiz {
  font-size: 1.05rem;
  filter: saturate(1.4);
  display: inline-block;
}
.lesson-node.is-quiz-pass .lesson-node__circle {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 0 0 5px rgba(245, 158, 11, 0.18);
}

/* review_quiz section: 章末テスト用に強調 */
.quiz-section--review {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(168, 85, 247, 0.06));
  border-color: rgba(245, 158, 11, 0.25);
}
.quiz-section--review .quiz-section__head h2 {
  color: #b45309;
  font-size: 1.4rem;
}
body.persona-code .quiz-section--review .quiz-section__head h2 { color: #fcd34d; }

/* 採点後の next-lesson CTA */
.quiz-next-cta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(34, 197, 94, 0.3);
  display: flex;
  justify-content: flex-end;
}
.quiz-next-cta .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white !important;
  border: none;
}
.quiz-next-cta .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(34, 197, 94, 0.5);
}
@media (max-width: 540px) {
  .quiz-next-cta { justify-content: stretch; }
  .quiz-next-cta .btn { width: 100%; justify-content: center; }
}

/* ============================================================
 * Sandbox (練習ファイル箱) modal
 * ============================================================ */
.missions__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.sandbox-btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.sandbox-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(245, 158, 11, 0.5);
}

.sandbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sandbox-modal[hidden] { display: none; }
.sandbox-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}
.sandbox-modal__panel {
  position: relative;
  width: min(900px, 100%);
  max-height: 90vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 64px -16px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sandbox-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  flex-wrap: wrap;
}
.sandbox-modal__head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #92400e;
  flex-shrink: 0;
  white-space: nowrap;
}
.sandbox-modal__close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #78350f;
  flex-shrink: 0;
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sandbox-modal__close:hover {
  background: rgba(120, 53, 15, 0.08);
}
.sandbox-modal__hint {
  margin: 0;
  padding: 12px 22px;
  background: rgba(245, 158, 11, 0.06);
  color: #78350f;
  font-size: 0.85rem;
  line-height: 1.6;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}
.sandbox-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px 22px;
  display: grid;
  gap: 12px;
}

.sandbox-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}
.sandbox-item.is-recommended {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(245, 158, 11, 0.08));
  border-color: rgba(34, 197, 94, 0.3);
}
.sandbox-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.sandbox-item__name {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: #1e293b;
}
.sandbox-item__lang {
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.sandbox-item__purpose {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 8px;
  line-height: 1.5;
}
.sandbox-item__code {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0 0 10px;
  max-height: 220px;
  overflow-y: auto;
}
.sandbox-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sandbox-item__actions .btn { padding: 7px 12px; font-size: 0.82rem; }

@media (max-width: 600px) {
  .sandbox-modal__panel { max-height: 96vh; border-radius: 12px; }
  .sandbox-item__actions .btn { flex: 1; }
}

/* Sandbox image / guide variants */
.sandbox-item.is-image .sandbox-item__image {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 10px;
}
.sandbox-item__image img {
  max-width: 100%;
  height: auto;
  max-height: 280px;
  display: block;
}
.sandbox-item.is-guide {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(99, 102, 241, 0.06));
  border-color: rgba(14, 165, 233, 0.25);
}
.sandbox-item__guide {
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.86rem;
  line-height: 1.65;
  margin: 0 0 10px;
}
.sandbox-item__guide h2, .sandbox-item__guide h3 {
  font-size: 0.95rem;
  margin: 8px 0 4px;
  color: #0c4a6e;
}
.sandbox-item__hint {
  font-size: 0.78rem;
  color: #475569;
  font-style: italic;
  align-self: center;
}

/* Feedback strip on lesson page */
.feedback-strip { padding: 24px 0 56px; }
.feedback-card {
  background: linear-gradient(135deg, #f0f9ff, #fef3c7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
}
.feedback-card summary {
  cursor: pointer;
  font-weight: 700;
  color: #92400e;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
}
.feedback-card summary::-webkit-details-marker { display: none; }
.feedback-card[open] summary { margin-bottom: 12px; }
.feedback-card__body { display: grid; gap: 10px; }
.feedback-card__rating {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.feedback-rating {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.feedback-rating:hover { background: #f1f5f9; }
.feedback-rating.is-selected {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border-color: transparent;
  font-weight: 700;
}
.feedback-card textarea, .feedback-card input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  background: white;
}
.feedback-card textarea { resize: vertical; min-height: 60px; }
.feedback-card__actions { display: flex; align-items: center; gap: 10px; }
.feedback-card__status { font-size: 0.85rem; color: #475569; }
.feedback-card__status.is-ok { color: #15803d; font-weight: 600; }
.feedback-card__status.is-warn { color: #b45309; font-weight: 600; }

body.persona-code .feedback-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
  border-color: rgba(245, 158, 11, 0.3);
}
body.persona-code .feedback-card summary { color: #fcd34d; }

/* Sandbox modal tabs + local picker */
.sandbox-modal__tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.sandbox-tab {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: #92400e;
  font-family: inherit;
}
.sandbox-tab:hover { background: white; }
.sandbox-tab.is-active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border-color: transparent;
}

.sandbox-local__intro {
  background: rgba(14, 165, 233, 0.06);
  border-left: 3px solid #0ea5e9;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.sandbox-local__intro p { margin: 0 0 6px; font-size: 0.88rem; line-height: 1.6; color: #0c4a6e; }
.sandbox-local__intro p:last-child { margin-bottom: 0; }
.sandbox-local__pick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sandbox-local__files { display: grid; gap: 12px; }
.sandbox-item.is-local {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.06));
  border-color: rgba(14, 165, 233, 0.3);
}

@media (max-width: 600px) {
  .sandbox-modal { padding: 0; }
  .sandbox-modal__panel { max-height: 100vh; height: 100vh; border-radius: 0; width: 100%; }
  .sandbox-modal__head {
    padding: 10px 14px;
    gap: 8px;
  }
  .sandbox-modal__head h2 { font-size: 0.95rem; }
  .sandbox-modal__tabs { width: 100%; order: 3; margin-top: 4px; }
  .sandbox-modal__close { order: 2; }
  .sandbox-tab { padding: 5px 8px; font-size: 0.75rem; flex: 1; text-align: center; }
  .sandbox-modal__hint { padding: 8px 14px; font-size: 0.78rem; }
  .sandbox-modal__body { padding: 12px 14px 16px; }
  .sandbox-item { padding: 10px 12px; }
  .sandbox-item__code { font-size: 0.72rem; padding: 8px 10px; max-height: 180px; }
}

/* =============================================================
 * Design polish 2026-05-07
 * ============================================================= */

/* Splash hero polish — light theme 用 */
.splash__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1e293b;
  margin: 6px 0 14px;
  font-weight: 500;
}
.splash__lead strong {
  color: #c2410c;
  background: linear-gradient(180deg, transparent 60%, rgba(251, 191, 36, 0.35) 60%);
  padding: 0 2px;
}

.splash__faq-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 740px;
  margin: 12px auto 32px;
}
.faq-chip {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: #1e293b;
  transition: all 0.12s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.faq-chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}
.faq-chip[open] {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb, white);
}
.faq-chip summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  user-select: none;
  color: #0f172a;
}
.faq-chip summary::-webkit-details-marker { display: none; }
.faq-chip[open] summary { margin-bottom: 8px; }
.faq-chip p {
  margin: 0;
  line-height: 1.7;
  color: #334155;
  font-size: 0.86rem;
}
.faq-chip strong { color: #b45309; }
@media (max-width: 600px) {
  .splash__faq-chips { grid-template-columns: 1fr; }
}

.splash__roadmap-cta {
  text-align: center;
  margin: 18px 0 24px;
}
.splash__roadmap-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: white;
  border: 1.5px solid #f59e0b;
  color: #b45309;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.12s;
  box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.15);
}
.splash__roadmap-cta a:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  box-shadow: 0 8px 20px -6px rgba(245, 158, 11, 0.35);
  color: #92400e;
}

/* Mission textarea / submit polish */
.mission-card textarea {
  font-size: 0.95rem;
  line-height: 1.6;
  border-radius: 10px;
  border-width: 2px;
  transition: border-color 0.12s;
}
.mission-card textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.mission-card .actions .btn-primary {
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.4);
}
.mission-card .actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.5);
}

/* Quiz pass celebration animation */
.quiz-result.is-pass {
  animation: quiz-pass-pulse 0.6s ease-out;
  position: relative;
  overflow: hidden;
}
@keyframes quiz-pass-pulse {
  0% { transform: scale(0.96); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
.quiz-result.is-pass::before {
  content: "🎉";
  position: absolute;
  font-size: 3rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: confetti-burst 1.2s ease-out;
  pointer-events: none;
  z-index: 1;
}
@keyframes confetti-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 0.4; transform: translate(-50%, -50%) scale(2); }
  100% { opacity: 0; transform: translate(-50%, -200%) scale(1); }
}

/* Lesson nav dot enhancement: 過去 lesson と現在 lesson の差を強く */
.lesson-nav__dot.is-passed {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.95rem;
}
.lesson-nav__dot.is-current {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  transform: scale(1.18);
  box-shadow: 0 4px 10px -4px rgba(245, 158, 11, 0.5);
}

/* Lesson body responsive padding for small screens */
@media (max-width: 540px) {
  .lesson-body { padding: 18px 16px; }
  .lesson-body h1 { font-size: 1.35rem; }
  .lesson-body pre { font-size: 0.78rem; padding: 12px 14px; }
}

/* Persona hero tags */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
body.persona-cowork .hero-tag {
  background: rgba(255,255,255,0.85);
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.3);
}
body.persona-code .hero-tag {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

/* Lesson body persona badges (cowork only) */
.lesson-personas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: 10px;
  margin-bottom: 18px;
}
.lesson-personas__label {
  font-size: 0.82rem;
  color: #92400e;
  font-weight: 700;
  margin-right: 4px;
}
.lesson-persona-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: white;
  border: 1px solid #f59e0b;
  color: #b45309;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.12s;
}
.lesson-persona-badge:hover {
  background: #f59e0b;
  color: white;
  transform: translateY(-1px);
}
body.persona-code .lesson-personas { display: none; }

/* 難易度バッジ — lesson page header */
.lesson-difficulty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  border-radius: 999px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}
.lesson-difficulty__stars {
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: #f59e0b;
}
.lesson-difficulty__label {
  color: #166534;
  font-weight: 700;
}

/* lesson path node 難易度 */
.lesson-node__diff {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  color: #d97706;
  filter: saturate(1.2);
}

/* 「もっとやさしく」alt prompt collapse */
.easy-alt {
  margin: 22px 0 12px;
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border: 1.5px dashed #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
}
.easy-alt summary {
  cursor: pointer;
  font-weight: 700;
  color: #b45309;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
}
.easy-alt summary::-webkit-details-marker { display: none; }
.easy-alt[open] summary { margin-bottom: 10px; }
.easy-alt__intro { margin: 0 0 10px; color: #78350f; font-size: 0.88rem; line-height: 1.65; }
.easy-alt__prompt {
  background: #fffbeb;
  color: #1f2937;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  margin: 0 0 8px;
}
.easy-alt__hint { margin: 0; color: #92400e; font-size: 0.78rem; font-style: italic; }

/* 🎯 実践編 panel — Lv1-3 prototype */
.practice-panel {
  margin-top: 16px;
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
  border: 1.5px solid #06b6d4;
  border-radius: 12px;
  padding: 14px 18px;
}
.practice-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: #0e7490;
  font-size: 0.98rem;
  list-style: none;
  user-select: none;
}
.practice-panel summary::-webkit-details-marker { display: none; }
.practice-panel[open] summary { margin-bottom: 12px; }
.practice-panel__body { display: grid; gap: 10px; }
.practice-intro { margin: 0; font-size: 0.9rem; color: #155e75; line-height: 1.7; }
.practice-hint {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #92400e;
  margin: 0;
  line-height: 1.65;
}
.practice-steps {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px 12px 32px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #334155;
  margin: 0;
}
.practice-steps strong { color: #0e7490; }
.practice-output {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 2px solid #06b6d4;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  background: white;
}
.practice-output:focus { outline: none; border-color: #0891b2; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18); }
.practice-actions { display: flex; align-items: center; gap: 12px; }
.practice-actions .btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border: none;
  color: white;
  padding: 10px 20px;
  font-weight: 700;
}
.practice-actions .btn-primary:hover { box-shadow: 0 6px 16px -4px rgba(6, 182, 212, 0.4); }
.practice-status { font-size: 0.85rem; color: #475569; }

.practice-result {
  background: white;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 4px;
  border: 1px solid #e2e8f0;
}
.practice-result.is-pass { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.practice-result.is-fail { background: #fef9c3; border-color: #fbbf24; }
.practice-result__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.practice-result__title { font-weight: 800; color: #0f172a; font-size: 1rem; }
.practice-result__score {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0e7490;
}
.practice-result__list { margin: 0 0 8px; padding-left: 0; list-style: none; }
.practice-result__list li {
  font-size: 0.85rem;
  padding: 4px 0;
  line-height: 1.55;
}
.practice-result__list li.is-pass { color: #166534; }
.practice-result__list li.is-fail { color: #b45309; }
.practice-result__msg {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  font-style: italic;
}

/* =========================================================
 * 🐰 usapoyo dock + toast (Phase G1)
 * ========================================================= */
.usapoyo-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  font-family: "Inter", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
.usapoyo-dock__main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 24px -10px rgba(245, 158, 11, 0.5);
  transition: all 0.18s;
}
.usapoyo-dock__main:hover { transform: translateY(-1px) scale(1.02); }
.usapoyo-emoji { font-size: 1.7rem; line-height: 1; }
.usapoyo-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.usapoyo-name { font-size: 0.78rem; font-weight: 700; color: #92400e; }
.usapoyo-coins { font-size: 0.82rem; font-weight: 700; color: #b45309; }

.usapoyo-dock.is-jump .usapoyo-emoji {
  animation: usapoyo-jump 0.55s cubic-bezier(.5, -0.5, .5, 1.5);
}
@keyframes usapoyo-jump {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-18px) scale(1.15); }
  70% { transform: translateY(0) scale(0.92); }
  100% { transform: translateY(0) scale(1); }
}

.usapoyo-detail {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: white;
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 48px -16px rgba(15, 23, 42, 0.3);
  font-size: 0.86rem;
  color: #1e293b;
}
.usapoyo-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.usapoyo-detail__head strong { color: #92400e; }
.usapoyo-detail__head button {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
}
.usapoyo-stage-bar {
  height: 8px;
  background: #fef3c7;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.usapoyo-stage-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  width: 0%;
  transition: width 0.4s ease;
}
.usapoyo-stage-bar__label {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 10px;
}
.usapoyo-detail__list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}
.usapoyo-detail__list strong { color: #b45309; font-weight: 700; font-family: "JetBrains Mono", monospace; }
.usapoyo-detail__hint { font-size: 0.78rem; color: #64748b; margin: 0 0 6px; line-height: 1.6; }
.usapoyo-detail__shop-stub { font-size: 0.75rem; color: #94a3b8; margin: 0; font-style: italic; }

.usapoyo-toast {
  position: fixed;
  right: 18px;
  bottom: 80px;
  background: white;
  border: 1.5px solid #fbbf24;
  border-left-width: 6px;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Inter", "Hiragino Sans", sans-serif;
  z-index: 1000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.32s cubic-bezier(.2, 1, .3, 1);
  max-width: 320px;
  box-shadow: 0 16px 40px -12px rgba(245, 158, 11, 0.4);
}
.usapoyo-toast.is-visible { opacity: 1; transform: translateX(0); }
.usapoyo-toast.is-evolve {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, white, #fef9c3);
  animation: toast-shake 0.5s ease-out;
}
@keyframes toast-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}
.usapoyo-toast__icon { font-size: 2rem; line-height: 1; }
.usapoyo-toast__msg { font-size: 0.86rem; line-height: 1.45; color: #1e293b; }
.usapoyo-toast__msg strong { color: #b45309; font-size: 0.95rem; }
.usapoyo-toast__msg small { color: #64748b; font-size: 0.75rem; }

@media (max-width: 540px) {
  .usapoyo-dock { right: 12px; bottom: 12px; }
  .usapoyo-dock__main { padding: 8px 12px; }
  .usapoyo-emoji { font-size: 1.4rem; }
  .usapoyo-name { font-size: 0.72rem; }
  .usapoyo-coins { font-size: 0.78rem; }
  .usapoyo-detail { width: calc(100vw - 24px); right: -8px; }
  .usapoyo-toast { right: 12px; bottom: 76px; max-width: calc(100vw - 24px); }
}

/* 🧠 practice-judge-deep (AI 判定) */
.practice-actions .btn-secondary {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
  border: 1px solid #c4b5fd;
  padding: 10px 18px;
}
.practice-actions .btn-secondary:hover { background: linear-gradient(135deg, #ddd6fe, #c4b5fd); }
.practice-actions .btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.practice-deep-result {
  margin-top: 10px;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #c4b5fd;
}
.practice-deep-result.is-ok { background: linear-gradient(135deg, #faf5ff, #ede9fe); }
.practice-deep-result.is-err { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.practice-deep-result__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #6d28d9;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.practice-deep-result__meta { font-size: 0.74rem; font-weight: 500; color: #94a3b8; }
.practice-deep-result__body {
  background: white;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: "Inter", "Hiragino Sans", sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  margin: 0;
  color: #1e293b;
}

/* usapoyo G2 — 装飾品 overlay + shop link */
.usapoyo-visual-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.usapoyo-deco-overlay {
  position: absolute;
  bottom: -4px;
  right: -8px;
  font-size: 1.05rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  pointer-events: none;
}
.usapoyo-detail__shop-link {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  transition: transform 0.12s;
}
.usapoyo-detail__shop-link:hover { transform: translateY(-1px); }

/* 📚 マイプロンプト集に保存 button (mission pass 時) */
.save-library-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #c7d2fe;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-save-library {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-save-library:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -6px rgba(99, 102, 241, 0.5);
}
.btn-view-library {
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  color: #4f46e5;
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-view-library:hover { background: #ede9fe; }
.save-library-status { font-size: 0.85rem; color: #475569; }
.save-library-status.is-ok { color: #15803d; font-weight: 700; }

/* ============================================================
   Gamification Phase 1 (2026-05-07)
   ============================================================ */
.gamif-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(99,102,241,0.12) 100%);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
}
.gamif-badge__lv { color: #4f46e5; }
.gamif-badge__bar {
  display: inline-block;
  width: 50px;
  height: 6px;
  background: rgba(99,102,241,0.18);
  border-radius: 3px;
  overflow: hidden;
}
.gamif-badge__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #fb923c 100%);
  transition: width 0.4s ease;
}
.gamif-badge__exp { font-size: 11px; color: #6366f1; }
.gamif-badge__streak {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: white;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.gamif-badge__placeholder { color: #94a3b8; font-weight: 500; }

@media (max-width: 600px) {
  .gamif-badge { padding: 3px 8px; font-size: 11px; gap: 4px; }
  .gamif-badge__bar { width: 36px; }
  .gamif-badge__exp { display: none; }
}

/* Toast */
.gamif-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 9999;
  min-width: 220px;
  max-width: 360px;
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid #f59e0b;
}
.gamif-toast.is-show { transform: translateX(0); }
.gamif-toast__exp {
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
}
.gamif-toast__exp small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}
.gamif-toast__lvup {
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  background: linear-gradient(90deg, #fbbf24 0%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gamif-toast__badge {
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  color: #fcd34d;
}

@media (max-width: 600px) {
  .gamif-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ============================================================
   Mission actions UX redesign (2026-05-07 #19)
   ============================================================ */
.actions--mission {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.actions__primary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions__secondary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

/* 主アクション (compact / 1 行 / 横並び) */
.btn-compact {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1.3;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 200px;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-compact__num {
  font-size: 13px;
  font-weight: 900;
  opacity: 0.9;
}
.btn-compact__label {
  font-size: 14px;
  font-weight: 700;
}

/* AI で投稿例 — secondary だが目立たせる中ボタン */
.btn-medium {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 9px 16px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: white !important;
  border: none !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-medium:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, #9333ea, #6d28d9) !important;
}
.btn-medium__hint {
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.92;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
}

/* お手本 — text link */
.btn-link {
  background: transparent !important;
  color: #64748b !important;
  border: none !important;
  font-size: 0.82rem !important;
  padding: 4px 8px !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
  font-weight: 600 !important;
}
.btn-link:hover {
  color: #2563eb !important;
  text-decoration-style: solid;
}

@media (max-width: 600px) {
  .actions__primary { flex-direction: column; }
  .btn-compact { width: 100%; min-width: 0; padding: 12px 14px !important; }
  .btn-medium { width: 100%; justify-content: center; }
  .btn-medium__hint { font-size: 10px; }
  .actions__secondary { flex-direction: column; gap: 6px; align-items: stretch; }
}

/* Feedback details: open by default visual polish */
.feedback-card[open] summary {
  color: #f59e0b;
}
.feedback-card[open] {
  border-color: rgba(245,158,11,0.35);
}

/* ============================================================
   Pet floating UI (Phase 2 — 2026-05-07)
   ============================================================ */
/* legacy single-block style — 後段 fix-2 で position は上書きされる。
   見た目（width/border/shadow）だけ保持し、座標と z-index は fix-2 が決める。 */
.pet-float {
  width: 90px;
  background: white;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pet-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(245,158,11,0.3);
}
.pet-float__loading { font-size: 16px; color: #94a3b8; }
.pet-float__emoji { font-size: 38px; line-height: 1; }
.pet-float__name { font-size: 11px; font-weight: 800; color: #92400e; margin-top: 2px; }
.pet-float__stage { font-size: 9px; color: #78350f; margin-top: 1px; }
.pet-float__stats {
  display: flex;
  gap: 4px;
  justify-content: center;
  font-size: 9px;
  color: #475569;
  margin-top: 4px;
  flex-wrap: wrap;
}
.pet-float__msg {
  position: fixed;
  bottom: 130px;
  right: 30px;
  background: #1e293b;
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  z-index: 110;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.pet-float__msg.is-show { opacity: 1; transform: translateY(0); }

/* Pet modal */
.pet-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pet-modal.is-open { display: flex; }
.pet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,13,24,0.7);
  backdrop-filter: blur(3px);
}
.pet-modal__panel {
  position: relative;
  background: white;
  border-radius: 18px;
  width: min(440px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 24px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.pet-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #475569;
}
.pet-modal__close:hover { background: rgba(0,0,0,0.12); }
.pet-modal__hero { text-align: center; margin-bottom: 18px; }
.pet-modal__big-emoji { font-size: 76px; line-height: 1; }
.pet-modal__name { margin: 8px 0 4px; font-size: 22px; color: #92400e; font-weight: 900; }
.pet-modal__name small { font-size: 13px; color: #64748b; font-weight: 700; }
.pet-modal__stage { color: #78350f; font-weight: 700; font-size: 13px; }
.pet-modal__route {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  color: #78350f;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}
.pet-modal__route--unknown {
  background: #f1f5f9;
  color: #64748b;
}
.pet-modal__stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.pet-stat {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.pet-stat__label { font-weight: 700; color: #475569; }
.pet-stat__bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.pet-stat__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.pet-stat__num { font-size: 11px; color: #94a3b8; text-align: right; }
.pet-modal__routes { margin-bottom: 18px; }
.pet-modal__routes h3 { font-size: 13px; color: #475569; margin: 0 0 8px; font-weight: 700; }
.pet-route {
  display: grid;
  grid-template-columns: 130px 1fr 30px;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  margin-bottom: 4px;
}
.pet-route__bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.pet-route__bar > div {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.pet-modal__actions { text-align: center; margin-bottom: 14px; }
.pet-btn-feed {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.pet-btn-feed:hover { transform: translateY(-2px); }
.pet-modal__note {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

@media (max-width: 600px) {
  .pet-float { width: 76px; padding: 6px 4px; }
  .pet-float__emoji { font-size: 32px; }
  .pet-float__name { font-size: 10px; }
}

/* ============================================================
   Pet float minimize toggle (2026-05-07 fix-2)
   usapoyo-dock (z=999, 右下) と被らないよう pet は左下に。
   両方独立して常時表示できる横並びレイアウト。
   ============================================================ */
.pet-float {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: auto;
  z-index: 1001;
  user-select: none;
}
.pet-float__minimize {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.pet-float__minimize:hover {
  background: #f1f5f9;
  transform: scale(1.1);
}
.pet-float__body {
  cursor: pointer;
  background: white;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 8px 6px;
  text-align: center;
  width: 90px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pet-float__body:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(245,158,11,0.3);
}

/* Minimized state — tiny button only (左下、usapoyo と並列) */
.pet-float.is-minimized {
  bottom: 16px;
  left: 16px;
  right: auto;
}
.pet-float.is-minimized .pet-float__expand {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 2px solid #f59e0b;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pet-float.is-minimized .pet-float__expand:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(245,158,11,0.5);
}
.pet-float__emoji-mini {
  font-size: 22px;
  line-height: 1;
}
.pet-float__lv-mini {
  font-size: 9px;
  font-weight: 800;
  color: #92400e;
  margin-top: -2px;
}

/* body 下に十分な余白で content が pet 後ろに隠れないように */
body {
  padding-bottom: 130px !important;
}

@media (max-width: 600px) {
  .pet-float { bottom: 12px; left: 12px; }
  .pet-float.is-minimized { bottom: 12px; left: 12px; }
  .pet-float__body { width: 76px; padding: 6px 4px; }
  .pet-float__body .pet-float__emoji { font-size: 32px; }
  .pet-float__body .pet-float__name { font-size: 10px; }
  .pet-float.is-minimized .pet-float__expand { width: 44px; height: 44px; }
  .pet-float__emoji-mini { font-size: 19px; }
  body { padding-bottom: 130px !important; }
}

/* ──────────────────────────────────────────────
 * Wave 3 G1 (2026-05-11): HJ AI 攻略ミッション 2026 デザイン統一
 * - 親しみやすい card / gradient / 大きい絵文字
 * - Lv 段階感のための accent 色
 * - 達成率の視覚的強調
 * ────────────────────────────────────────────── */

/* missions hint card (Wave 3 C4) */
.missions__hint {
  background: linear-gradient(135deg, #fff8e7 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 10px 0 18px;
  font-size: 0.94rem;
  color: #78350f;
  line-height: 1.55;
  box-shadow: 0 1px 3px rgba(217,119,6,0.08);
}

/* HJ-style 親しみやすい lesson card 装飾 */
.lesson-body {
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}

.lesson-body h2 {
  position: relative;
  padding-left: 4px;
  border-bottom: 2px solid #e0e7ff;
  padding-bottom: 6px;
}

.lesson-body h2::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 12px;
  width: 4px;
  background: linear-gradient(180deg, #2563eb 0%, #f59e0b 100%);
  border-radius: 2px;
}

/* 親しみやすい blockquote (lesson 内) */
.lesson-body blockquote {
  background: linear-gradient(90deg, #f0f9ff 0%, #fefce8 100%);
  border-left: 4px solid #2563eb;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 16px 0;
  color: #1e3a8a;
}

/* progress badge (HJ 風 Lv 段階表示) */
.lv-progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #fef3c7 100%);
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #93c5fd;
}

.lv-progress-badge--lv3 { background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%); color: #991b1b; border-color: #fca5a5; }
.lv-progress-badge--lv4 { background: linear-gradient(135deg, #fef3c7 0%, #ddd6fe 100%); color: #6b21a8; border-color: #fde68a; }
.lv-progress-badge--lv5 { background: linear-gradient(135deg, #d1fae5 0%, #dbeafe 100%); color: #065f46; border-color: #6ee7b7; }

/* 親しみやすい strong (重要箇所のハイライト) */
.lesson-body strong {
  background: linear-gradient(180deg, transparent 60%, #fef3c7 60%);
  padding: 0 2px;
}

/* feedback-card softer */
.feedback-card[open] summary {
  color: #2563eb;
}

.feedback-card__body {
  background: linear-gradient(135deg, #f0f9ff 0%, #fefce8 100%);
  border-radius: 0 0 12px 12px;
  padding: 14px;
  margin-top: 0;
}

/* button 親しみアップ (hover時 lift) */
.btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* quiz-section 強調 (HJ 風達成感) */
.quiz-section--review {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e1 100%);
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #fbbf24;
}

.quiz-q__choice {
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.quiz-q__choice:hover {
  background: #f0f9ff;
  border-color: #93c5fd;
}

/* ===== 新3部構成「まなぶ」教材レイアウト ===== */
.lesson-steps {
  margin: 32px 0 0;
  padding: 24px;
  background: linear-gradient(135deg, #fff0f7 0%, #ffe9f4 100%);
  border: 4px solid var(--text);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--text);
}
.lesson-steps__title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.lesson-steps__count {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--accent-2);
  color: var(--text);
  border: 2px solid var(--text);
  border-radius: 4px;
}
.lesson-steps__ach {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--lime);
  color: var(--text);
  border: 2px solid var(--text);
  border-radius: 4px;
}
.lesson-steps__lead {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-item {
  position: relative;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: 2px 2px 0 var(--text);
}
.step-item__num {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  margin-bottom: 8px;
}
.step-item__title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: var(--text);
}
.step-item__learn {
  background: #fff7c0;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 9px 12px;
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.step-item__explain {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
}
.step-item__explain p { margin: 0 0 8px; }
.step-item__explain ul { margin: 6px 0; padding-left: 22px; }
.step-item__example {
  margin: 12px 0 0;
  border: 2px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
}
.step-item__example-label {
  background: var(--accent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
}
.step-item__example-body {
  margin: 0;
  padding: 12px 14px;
  background: #f0fbff;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: var(--text);
}
.step-item__answer {
  margin: 12px 0 0;
  border: 2px dashed var(--muted);
  border-radius: 8px;
  background: #faf5ff;
}
.step-item__answer summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--magenta);
  padding: 9px 12px;
  list-style: none;
}
.step-item__answer summary::-webkit-details-marker { display: none; }
.step-item__answer[open] summary { border-bottom: 1px dashed var(--muted); }
.step-item__answer-body {
  padding: 10px 14px 12px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-soft);
}
.step-item__answer-body p { margin: 0 0 8px; }
.step-item__answer-body blockquote {
  margin: 6px 0;
  padding: 8px 12px;
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
}
.lesson-steps__next {
  margin-top: 18px;
  padding: 11px 14px;
  background: var(--lime);
  border: 3px solid var(--text);
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

/* ===== 💡 ヒント機能（目立たせる） ===== */
.hint-box {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff6cf 0%, #ffe9b0 100%);
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--text);
}
.hint-box__head {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.hint-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hint;
}
.hint-item {
  counter-increment: hint;
  background: #fff;
  border: 2px solid var(--accent-2);
  border-radius: 8px;
  padding: 10px 12px 10px 40px;
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  position: relative;
  white-space: pre-wrap;
}
.hint-item::before {
  content: "💡" counter(hint);
  position: absolute;
  left: 9px;
  top: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--magenta);
}
.hint-btn {
  margin-top: 10px;
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  background: var(--accent-2);
  border: 3px solid var(--text);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--text);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.hint-btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--text);
}
.hint-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--text);
}
.hint-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== やってみよう: 複数お題の明示 ===== */
.missions-overview {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--accent-2);
  border: 3px solid var(--text);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.mission-no {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 14px;
  background: var(--magenta);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 999px;
}

/* ===== やってみよう: STEP 構成 ===== */
.mission-context {
  background: #fff;
  border: 3px solid var(--text);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px;
  box-shadow: 2px 2px 0 var(--text);
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text);
}
.mission-context h1,
.mission-context h2,
.mission-context h3 {
  font-size: 1.05rem;
  margin: 14px 0 6px;
}
.mission-context p { margin: 0 0 8px; }
.mission-context pre {
  background: #f0fbff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-x: auto;
}
.mstep {
  border: 3px solid var(--text);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 16px;
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--text);
}
.mstep__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.mstep__badge {
  display: inline-block;
  padding: 4px 11px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
  flex: none;
}
.mstep__desc {
  margin: 4px 0 12px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-soft);
}
.mstep__btn {
  font-size: 1rem;
  font-weight: 700;
}
.example-toggle {
  margin-top: 12px;
  border: 2px dashed var(--muted);
  border-radius: 8px;
  background: #faf5ff;
}
.example-toggle summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--magenta);
  padding: 9px 12px;
  list-style: none;
}
.example-toggle summary::-webkit-details-marker { display: none; }
.example-toggle[open] summary { border-bottom: 1px dashed var(--muted); }

/* ===== やってみよう 進め方ガイド（トグル） ===== */
.missions__hint {
  margin: 0 0 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.missions__hint > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  padding: 10px 14px;
  list-style: none;
}
.missions__hint > summary::-webkit-details-marker { display: none; }
.missions__hint[open] > summary { border-bottom: 1px solid var(--border); }
.missions__hint-body {
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-soft);
}


/* ===== 職種別ガイド 発見導線カード (cowork) ===== */
.persona-guide-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff0f7 0%, #fff6cf 100%);
  border: 3px solid var(--text);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--text);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.08s, box-shadow 0.08s;
}
.persona-guide-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--text);
}
.persona-guide-cta__emoji { font-size: 2rem; flex: none; }
.persona-guide-cta__text { display: flex; flex-direction: column; gap: 3px; }
.persona-guide-cta__text strong { font-size: 1.02rem; }
.persona-guide-cta__text span { font-size: 0.85rem; color: var(--text-soft); line-height: 1.6; }
.persona-guide-cta__arrow {
  flex: none;
  margin-left: auto;
  align-self: center;
  padding: 9px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .persona-guide-cta { flex-wrap: wrap; }
  .persona-guide-cta__arrow { margin-left: 0; width: 100%; text-align: center; }
}
