/* お題（ユースケース）ページ。一覧 odai.html と個別 odai/*.html で共有する。
   型も見た目も Claude Academy のユースケースに寄せる（2026-09-27 本人指示「どんどん近づけて」）。
   値は academy.claude.com の計算済みスタイルから取った: 地 #f9f9f7／カード #fcfcfb＋1px の縁取り影、
   文字 #0b0b0b と #52514e、見出しは明朝の細字、本文 16/26、ボタンは角丸10の長方形、帯はピーチ・カクタス・ヘザー。
   Academy の書体とロゴは使わない（書体は同じ代替の並び＝システムの明朝・ゴシック）。
   site.css の後に読む。body.uc の外には効かない。 */

body.uc {
  --uc-bg: #faf9f5;
  --uc-card: #fcfcfb;
  --uc-white: #ffffff;
  --uc-ink: #0b0b0b;
  --uc-body: #52514e;
  --uc-muted: #52514e;
  --uc-faint: #6b6964;
  --uc-line: rgba(11, 11, 11, 0.1);
  --uc-line-soft: rgba(11, 11, 11, 0.07);
  --uc-ring: 0 0 0 1px rgba(11, 11, 11, 0.1), 0 1px 2px rgba(11, 11, 11, 0.08);
  --uc-lift: 0 2px 4px rgba(11, 11, 11, 0.07), 0 6px 16px rgba(11, 11, 11, 0.08);
  --uc-hover: rgba(11, 11, 11, 0.05);
  --uc-accent: #0b0b0b;
  --uc-accent-dark: #0b0b0b;
  --uc-brand: #0b7da3;
  --uc-tint: #e7e5df;
  --uc-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  --uc-serif: ui-serif, "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, serif;
  --uc-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  background: var(--uc-bg);
  color: var(--uc-body);
  font-family: var(--uc-sans);
  font-size: 16px;
  line-height: 1.625;
}

/* 場面ごとの地の色。サムネイルと見出し帯にだけ使う */
/* Academy の帯の色（peach / cactus / heather）をそのまま使う */
body.uc [data-cat="family"],
body.uc[data-cat="family"] { --uc-tint: #ebc9b7; }
body.uc [data-cat="team"],
body.uc[data-cat="team"] { --uc-tint: #bcd1ca; }
body.uc [data-cat="learn"],
body.uc[data-cat="learn"] { --uc-tint: #cbcadb; }
body.uc [data-cat="research"],
body.uc[data-cat="research"] { --uc-tint: #bcd1ca; }
body.uc [data-cat="free"],
body.uc[data-cat="free"] { --uc-tint: #cbcadb; }

/* ヘッダーと足元は site.css（全ページ共通）が持つ */

.uc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 44px);
}

body.uc h1,
body.uc h2 {
  color: var(--uc-ink);
  font-family: var(--uc-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
}

body.uc h2 {
  font-weight: 500;
}

body.uc p {
  max-width: none;
}

body.uc a {
  color: var(--uc-ink);
  text-decoration-color: rgba(11, 11, 11, 0.35);
}

body.uc a:hover {
  color: var(--uc-ink);
  text-decoration-color: var(--uc-ink);
}

.uc-lead {
  max-width: 42em;
  margin: 0;
  color: var(--uc-muted);
  font-size: 1.125rem;
  line-height: 1.56;
}

.uc-aside {
  margin: 14px 0 0;
  color: var(--uc-faint);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---------- ボタン ---------- */

.uc-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--uc-ink) !important;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms var(--uc-ease);
}

.uc-btn:hover {
  background: var(--uc-hover);
}

.uc-btn:active {
  transform: scale(0.97);
}

.uc-btn:focus-visible,
.uc-row a:focus-visible,
.uc-toc a:focus-visible,
.uc-pager a:focus-visible,
.uc-examples a:focus-visible {
  outline: 2px solid var(--uc-ink);
  outline-offset: 2px;
}

.uc-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.uc-btn--primary {
  background: var(--uc-ink);
  box-shadow: none;
  color: #fff !important;
  font-weight: 500;
}

.uc-btn--primary:hover {
  background: #2c2c2b;
}

.uc-btn--small {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.875rem;
}

.uc-btn--small svg {
  width: 14px;
  height: 14px;
}

.uc-btn.is-copied {
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.45);
}

.uc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 下書きの但し書き ---------- */

.uc-draft {
  margin-top: 24px;
  margin-bottom: 0;
}

.uc-draft p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbf3e2;
  box-shadow: inset 0 0 0 1px rgba(138, 90, 0, 0.35);
  color: var(--uc-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.uc-draft b {
  color: #7a5200;
}

/* ---------- 一覧 ---------- */

.uc-intro {
  padding-top: clamp(40px, 7vw, 84px);
  padding-bottom: 8px;
}

.uc-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.4vw, 2.25rem);
  line-height: 1.5;
}

.uc-group {
  padding-top: clamp(40px, 5vw, 60px);
}

.uc-group-head h2 {
  margin: 0 0 4px;
  font-size: 1.375rem;
  line-height: 1.5;
}

.uc-group-head p {
  margin: 0;
  color: var(--uc-muted);
  font-size: 0.875rem;
}

.uc-list {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.uc-row a {
  display: grid;
  grid-template-columns: 176px 1fr;
  min-height: 132px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
  color: inherit !important;
  text-decoration: none;
  transition: box-shadow 200ms ease;
}

.uc-row a:hover {
  box-shadow: var(--uc-ring), var(--uc-lift);
}

.uc-thumb {
  display: grid;
  place-items: center;
  padding: 16px 20px;
  overflow: hidden;
  background: var(--uc-tint);
}

.uc-thumb img,
.uc-thumb .uc-paper {
  width: 100%;
  max-width: 128px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(11, 11, 11, 0.07), 0 6px 16px rgba(11, 11, 11, 0.12);
  transform: rotate(-3deg);
  transition: transform 320ms var(--uc-ease);
}

.uc-row a:hover .uc-thumb img,
.uc-row a:hover .uc-thumb .uc-paper {
  transform: rotate(-2deg) translateY(-2px);
}

.uc-row-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 20px clamp(20px, 3vw, 28px);
}

.uc-row-title {
  color: var(--uc-ink);
  font-family: var(--uc-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.uc-row-summary {
  color: var(--uc-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.uc-row-meta {
  margin-top: 2px;
  color: var(--uc-faint);
  font-size: 0.875rem;
}

/* 自由題の「型」を置いた紙 */
.uc-paper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  color: var(--uc-ink);
  font-family: var(--uc-serif);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: left;
}

.uc-paper span {
  color: var(--uc-faint);
}

.uc-rules {
  padding-bottom: 12px;
}

.uc-rule {
  display: grid;
  gap: 0;
  margin: 18px 0 14px;
  border-top: 1px solid var(--uc-line-soft);
}

.uc-rule > div {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--uc-line-soft);
}

.uc-rule dt {
  color: var(--uc-ink);
  font-weight: 500;
}

.uc-rule dd {
  margin: 0;
  color: var(--uc-muted);
}

/* ---------- 個別ページ：見出し帯 ---------- */

.uc-hero {
  background: var(--uc-tint);
}

.uc-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-top: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(40px, 5vw, 56px);
}

.uc-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--uc-muted);
  font-size: 0.875rem;
}

.uc-crumb svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.uc-crumb a {
  color: var(--uc-muted) !important;
  text-decoration: none;
}

.uc-crumb a:hover {
  color: var(--uc-ink) !important;
  text-decoration: underline;
}

.uc-hero h1 {
  max-width: 24em;
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1.5;
}

.uc-hero .uc-lead {
  color: var(--uc-muted);
}

.uc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.uc-chips li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.12);
  color: var(--uc-ink);
  font-size: 0.875rem;
  line-height: 1.4;
}

.uc-hero-card img {
  display: block;
}

.uc-hero-card img,
.uc-hero-card .uc-paper {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(11, 11, 11, 0.07), 0 12px 32px rgba(11, 11, 11, 0.14);
  transform: rotate(3deg);
}

.uc-hero-card .uc-paper {
  aspect-ratio: 4 / 3;
  padding: 24px 26px;
  font-size: 1.05rem;
}

/* ---------- 個別ページ：本文と目次 ---------- */

.uc-body {
  display: grid;
  grid-template-columns: minmax(0, 768px) 288px;
  gap: 48px;
  justify-content: space-between;
  padding-top: 24px;
}

.uc-step {
  padding: 32px 0;
  scroll-margin-top: 88px;
}

.uc-step h2,
.uc-end h2 {
  display: flex;
  gap: 0.3em;
  align-items: baseline;
  margin: 0 0 14px;
  font-size: 1.375rem;
  line-height: 1.5;
}

.uc-num {
  font-variant-numeric: tabular-nums;
}

.uc-step > p {
  margin: 0 0 14px;
}

.uc-step h3 {
  margin: 0 0 2px;
  color: var(--uc-ink);
  font-family: var(--uc-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

/* 目次: いまの節に 2px の墨の印（Academy と同じ）。カードの左線ではなく現在地の印 */
.uc-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-top: 40px;
  font-size: 0.875rem;
}

.uc-toc p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.uc-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.uc-toc a {
  position: relative;
  display: block;
  padding: 4px 0 4px 12px;
  color: var(--uc-muted) !important;
  line-height: 1.43;
  text-decoration: none;
  transition: color 160ms ease;
}

.uc-toc a::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 160ms ease;
}

.uc-toc a:hover {
  color: var(--uc-ink) !important;
}

.uc-toc a[aria-current="true"] {
  color: var(--uc-ink) !important;
  font-weight: 500;
}

.uc-toc a[aria-current="true"]::before {
  background: var(--uc-ink);
}

/* ---------- プロンプトの札 ---------- */

.uc-prompt {
  margin: 22px 0 0;
  padding: 8px;
  border-radius: 16px;
  background: var(--uc-white);
  box-shadow: var(--uc-lift);
}

.uc-prompt-chrome {
  display: flex;
  gap: 6px;
  padding: 4px 6px 10px;
}

.uc-prompt-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d03b3b;
}

.uc-prompt-chrome span:nth-child(2) { background: #fab219; }
.uc-prompt-chrome span:nth-child(3) { background: #009300; }

.uc-prompt-body {
  overflow: hidden;
  border-radius: 12px;
  background: var(--uc-card);
  box-shadow: inset 0 0 0 1px var(--uc-line);
}

.uc-preview {
  margin: 22px 0 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
}

.uc-prompt-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-top: 1px solid var(--uc-line);
}

.uc-prompt-label {
  color: var(--uc-faint);
  font-size: 0.875rem;
}

.uc-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

body.uc .uc-prompt pre {
  margin: 0;
  padding: 16px 20px 18px 16px;
  overflow-x: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--uc-body);
  font-family: var(--uc-sans);
  font-size: 1rem;
  line-height: 1.625;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- 準備するもの ---------- */

.uc-needs {
  margin-top: 6px;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
}

.uc-need {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  padding: 14px 16px 14px 20px;
}

.uc-needs + .uc-aside {
  margin-top: 16px;
}

.uc-need + .uc-need {
  border-top: 1px solid var(--uc-line);
}

.uc-need p {
  margin: 0;
  color: var(--uc-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

body.uc .uc-need .uc-need-name {
  color: var(--uc-ink);
  font-weight: 500;
}

/* ---------- 見本 ---------- */

.uc-preview-shot {
  display: block;
  padding: clamp(16px, 3vw, 28px);
  background: var(--uc-tint);
}

.uc-preview-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(11, 11, 11, 0.07), 0 12px 28px rgba(11, 11, 11, 0.12);
  transition: transform 320ms var(--uc-ease);
}

.uc-preview-shot:hover img {
  transform: translateY(-2px);
}

.uc-preview figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-top: 1px solid var(--uc-line);
  color: var(--uc-faint);
  font-size: 0.875rem;
  line-height: 1.6;
}

.uc-examples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.uc-examples a {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
  color: var(--uc-ink) !important;
  font-family: var(--uc-serif);
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  transition: box-shadow 200ms ease;
}

.uc-examples a:hover {
  box-shadow: var(--uc-ring), var(--uc-lift);
}

.uc-examples a > span:last-child {
  padding: 0 14px;
}

.uc-examples-thumb {
  display: grid;
  place-items: center;
  padding: 14px 18px;
  background: var(--uc-tint);
}

.uc-examples-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(11, 11, 11, 0.07), 0 6px 16px rgba(11, 11, 11, 0.12);
}

/* ---------- 続けて頼む・コツ ---------- */

.uc-follow + .uc-follow {
  margin-top: 30px;
}

.uc-follow > p {
  margin: 0;
  color: var(--uc-muted);
}

.uc-follow .uc-prompt {
  margin-top: 12px;
}

.uc-tips {
  display: grid;
  gap: 26px;
}

.uc-tip p {
  margin: 0;
  color: var(--uc-muted);
}

.uc-tip .uc-rule {
  margin: 12px 0;
}

/* ---------- やってみる ---------- */

.uc-end {
  margin-top: 16px;
  padding: clamp(40px, 6vw, 64px) 0;
  background: var(--uc-tint);
  scroll-margin-top: 72px;
}

.uc-end p {
  max-width: 42em;
  margin: 0 0 22px;
  color: var(--uc-muted);
}

.uc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
}

.uc-pager a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.12);
  color: var(--uc-ink) !important;
  font-family: var(--uc-serif);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.uc-pager a:hover {
  background: rgba(255, 255, 255, 0.7);
}

.uc-pager small {
  color: var(--uc-muted);
  font-family: var(--uc-sans);
  font-size: 0.875rem;
}

.uc-pager-next {
  text-align: right;
}

/* ---------- ミニクイズ ---------- */

.uc-hero-inner--single {
  grid-template-columns: minmax(0, 1fr);
}

.uc-quiz-wrap,
.uc-badge-wrap {
  max-width: 820px;
  padding-top: 40px;
  padding-bottom: 24px;
}

.uc-quiz {
  padding: clamp(22px, 4vw, 40px);
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
}

.uc-quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--uc-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.uc-quiz-bar {
  height: 4px;
  margin: 10px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--uc-line-soft);
}

.uc-quiz-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--uc-accent);
  transition: width 320ms var(--uc-ease);
}

body.uc h2.uc-quiz-q {
  margin: 0 0 20px;
  font-family: var(--uc-sans);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
}

.uc-quiz-q:focus {
  outline: none;
}

.uc-quiz-choices {
  display: grid;
  gap: 10px;
}

.uc-choice {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--uc-white);
  box-shadow: inset 0 0 0 1px var(--uc-line);
  color: var(--uc-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 160ms ease, background-color 160ms ease, transform 120ms var(--uc-ease);
}

.uc-choice:hover:not(:disabled) {
  background: var(--uc-white);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.35);
}

.uc-choice:active:not(:disabled) {
  transform: scale(0.99);
}

.uc-choice:focus-visible {
  outline: 2px solid var(--uc-accent);
  outline-offset: 2px;
}

.uc-choice:disabled {
  cursor: default;
  color: var(--uc-muted);
}

.uc-choice-key {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--uc-line);
  color: var(--uc-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.uc-choice.is-right {
  background: #eef6e6;
  box-shadow: inset 0 0 0 1.5px #5f8f33;
  color: var(--uc-ink);
}

.uc-choice.is-right .uc-choice-key {
  background: #5f8f33;
  box-shadow: none;
  color: #fff;
}

.uc-choice.is-wrong {
  background: #fbf1e3;
  box-shadow: inset 0 0 0 1.5px #a86f16;
  color: var(--uc-ink);
}

.uc-choice.is-wrong .uc-choice-key {
  background: #a86f16;
  box-shadow: none;
  color: #fff;
}

.uc-quiz-feedback {
  margin-top: 18px;
}

.uc-quiz-feedback:empty {
  display: none;
}

.uc-quiz-feedback:focus {
  outline: none;
}

.uc-quiz-feedback p {
  margin: 0;
  color: var(--uc-muted);
  line-height: 1.625;
}

body.uc .uc-quiz-feedback .uc-quiz-verdict {
  margin-bottom: 2px;
  color: var(--uc-ink);
  font-size: 1rem;
  font-weight: 500;
}

.uc-quiz-feedback.is-right .uc-quiz-verdict {
  color: #4d7a22;
}

.uc-quiz-feedback.is-wrong .uc-quiz-verdict {
  color: #8a5a00;
}

.uc-quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--uc-line-soft);
}

.uc-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.uc-quiz-lead {
  margin: 0 0 18px;
  color: var(--uc-muted);
}

.uc-quiz-review {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--uc-line-soft);
  list-style: none;
}

.uc-quiz-review li {
  display: grid;
  gap: 2px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.uc-quiz-review-q {
  color: var(--uc-ink);
}

.uc-finish .uc-actions {
  margin-top: 18px;
}

/* ---------- 修了証 ---------- */

.uc-badge-gate {
  padding: 28px;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
}

.uc-badge-gate p {
  margin: 0 0 16px;
}

.uc-cert {
  display: grid;
  justify-items: center;
  margin: 0;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 6vw, 72px) clamp(24px, 4vw, 40px);
  border-radius: 8px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring), 0 24px 60px rgba(11, 11, 11, 0.1);
  text-align: center;
}

.uc-cert p {
  margin: 0;
}

.uc-cert-org {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--uc-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.uc-cert-mark {
  width: 34px;
  height: 7px;
  background: radial-gradient(circle, var(--uc-brand) 3.5px, transparent 4px) 0 0 / 12px 7px repeat-x;
}

body.uc .uc-cert-title {
  margin-top: clamp(28px, 5vw, 52px);
  color: var(--uc-ink);
  font-family: var(--uc-serif);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.uc-cert-sub {
  margin-top: 10px !important;
  color: var(--uc-muted);
  font-size: clamp(0.875rem, 1.6vw, 1rem);
}

.uc-cert-label {
  margin-top: clamp(32px, 6vw, 60px) !important;
  color: var(--uc-faint);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

body.uc .uc-cert-name {
  margin-top: 6px;
  color: var(--uc-ink);
  font-family: var(--uc-serif);
  font-size: clamp(1.9rem, 5.4vw, 3rem);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.uc-cert-name.is-empty {
  color: #b7b2a8;
}

.uc-cert-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  width: 100%;
  margin-top: clamp(32px, 6vw, 64px);
  color: var(--uc-muted);
  font-size: 0.875rem;
}

.uc-name-form {
  margin-top: 24px;
}

.uc-name-form[hidden] {
  display: none;
}

.uc-name-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--uc-ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.uc-name-row {
  display: flex;
  gap: 10px;
}

.uc-name-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--uc-white);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.15);
  color: var(--uc-ink);
  font: inherit;
  font-size: 1rem;
}

.uc-name-row input:focus-visible {
  outline: 2px solid var(--uc-accent);
  outline-offset: 1px;
}

.uc-badge-actions {
  margin-top: 20px;
}

/* ---------- つなぐもの（コネクタ） ---------- */

.uc-step h3.uc-sub {
  margin: 30px 0 6px;
}

.uc-connectors {
  margin-top: 14px;
  border-radius: 16px;
  background: var(--uc-card);
  box-shadow: var(--uc-ring);
}

.uc-connector + .uc-connector {
  border-top: 1px solid var(--uc-line);
}

.uc-connector {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px 14px 16px;
}

.uc-connector-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--uc-white);
  box-shadow: inset 0 0 0 1px var(--uc-line);
  color: var(--uc-ink);
}

.uc-connector-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.uc-connector-body p {
  margin: 0;
  color: var(--uc-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

body.uc .uc-connector-body .uc-connector-name {
  color: var(--uc-ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.uc-connectors-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-top: 1px solid var(--uc-line);
  color: var(--uc-muted);
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .uc-connector {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .uc-connector .uc-btn {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---------- 図（箱と矢印） ----------
   淡い地に灰の細線、角丸の箱。灰=入れるもの、青=往復、緑=できあがり、橙=人が書き添えるところ。
   広い画面は横に流し、狭い画面では縦に並べ替える。 */

.dg {
  --dg-bg: var(--uc-card, #fcfcfb);
  --dg-stroke: #77736d;
  --dg-text: #2f2d29;
  --dg-grey: #efeee8;
  --dg-blue: #c6def6;
  --dg-green: #d5eabb;
  --dg-sand: #f8e3c3;
  --dg-loop: #9fc5ec;
  --dg-loop-text: #3f6f9f;
  --dg-line: 1.5px;

  display: grid;
  align-items: center;
  margin: 4px 0 26px;
  padding: clamp(26px, 4vw, 40px) clamp(16px, 3vw, 36px);
  border: 1px solid var(--uc-line-soft);
  border-radius: 16px;
  background: var(--dg-bg);
  color: var(--dg-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}

.dg-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 54px;
  padding: 10px 14px;
  border: var(--dg-line) solid var(--dg-stroke);
  border-radius: 10px;
  text-align: center;
}

.dg-node small {
  color: #57544d;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dg-node--grey { background: var(--dg-grey); }
.dg-node--blue { background: var(--dg-blue); }
.dg-node--green { background: var(--dg-green); }
.dg-node--sand { background: var(--dg-sand); }

/* 矢印: 細い線＋開いた山形。既定は右向き */
.dg-arrow {
  position: relative;
  align-self: center;
  justify-self: stretch;
  width: auto;
  height: 14px;
}

.dg-arrow::before,
.dg-arrow::after {
  content: "";
  position: absolute;
}

.dg-arrow::before {
  top: 50%;
  right: 3px;
  left: 6px;
  height: var(--dg-line);
  background: var(--dg-stroke);
  transform: translateY(-50%);
}

.dg-arrow::after {
  top: 50%;
  right: 3px;
  width: 8px;
  height: 8px;
  border-top: var(--dg-line) solid var(--dg-stroke);
  border-right: var(--dg-line) solid var(--dg-stroke);
  transform: translateY(-50%) rotate(45deg);
}

/* 上向き（下の箱から上へ） */
.dg-arrow--up {
  justify-self: center;
  width: 14px;
  height: 40px;
}

.dg-arrow--up::before {
  top: 4px;
  right: auto;
  bottom: 0;
  left: 50%;
  width: var(--dg-line);
  height: auto;
  transform: translateX(-50%);
}

.dg-arrow--up::after {
  top: 4px;
  right: auto;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
}

/* 入れるもの → Claude → できるもの（下から「頼むときに書くこと」） */
.dg--simple {
  grid-template-columns: minmax(0, 1.2fr) 52px minmax(0, 0.75fr) 52px minmax(0, 1.2fr);
  grid-template-areas:
    "in  a1   ai   a2   out"
    ".   .    up   .    .  "
    ".   rule rule rule .  ";
}

.dg-in { grid-area: in; }
.dg-a1 { grid-area: a1; }
.dg-ai { grid-area: ai; }
.dg-a2 { grid-area: a2; }
.dg-out { grid-area: out; }
.dg-up { grid-area: up; }
.dg-rule { grid-area: rule; }

.dg-ai {
  font-size: 1rem;
}

.dg-plus {
  display: none;
}

/* お題の進め方（往復） */
.dg--loop {
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 3.4fr) 52px minmax(0, 1fr);
  grid-template-areas:
    "in  a1 frame a2 out"
    ".   .  up    .  .  "
    ".   .  you   .  .  ";
  margin-top: 20px;
}

.dg-frame {
  grid-area: frame;
  border: var(--dg-line) solid var(--dg-stroke);
  border-radius: 12px;
  background: #fff;
}

.dg-frame-title {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10.5px 10.5px 0 0;
  border-bottom: var(--dg-line) solid var(--dg-stroke);
  background: var(--dg-grey);
  font-weight: 600;
  text-align: center;
}

.dg-frame-body {
  padding: 26px clamp(14px, 2vw, 24px) 18px;
}

.dg-cycle {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 48px;
}

.dg-cycle .dg-node {
  flex: 1 1 0;
}

.dg-cycle .dg-arrow {
  flex: 0 0 34px;
}

/* 最後の箱の下から、最初の箱の下へ戻る線 */
.dg-return {
  position: absolute;
  right: calc((100% - 68px) / 6);
  bottom: 10px;
  left: calc((100% - 68px) / 6);
  height: 30px;
  border: var(--dg-line) solid var(--dg-loop);
  border-top: 0;
}

.dg-return::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -5.5px;
  width: 8px;
  height: 8px;
  border-top: var(--dg-line) solid var(--dg-loop);
  border-left: var(--dg-line) solid var(--dg-loop);
  transform: rotate(45deg);
}

.dg-return span {
  position: absolute;
  bottom: -0.78em;
  left: 50%;
  padding: 0 10px;
  background: #fff;
  color: var(--dg-loop-text);
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: nowrap;
  transform: translateX(-50%);
}

.dg-you {
  grid-area: you;
  justify-self: center;
  min-width: 46%;
}

.dg-inner-you {
  display: none;
}

@media (max-width: 720px) {
  .dg {
    justify-items: stretch;
    padding: 24px 18px;
  }

  .dg .dg-arrow:not(.dg-arrow--up) {
    justify-self: center;
    width: 14px;
    height: 30px;
  }

  .dg .dg-arrow:not(.dg-arrow--up)::before {
    top: 2px;
    right: auto;
    bottom: 3px;
    left: 50%;
    width: var(--dg-line);
    height: auto;
    transform: translateX(-50%);
  }

  .dg .dg-arrow:not(.dg-arrow--up)::after {
    top: auto;
    right: auto;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

  .dg--simple {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "in" "plus" "rule" "a1" "ai" "a2" "out";
  }

  .dg--simple .dg-up {
    display: none;
  }

  .dg-plus {
    display: block;
    grid-area: plus;
    position: relative;
    justify-self: center;
    width: 14px;
    height: 30px;
  }

  .dg-plus::before,
  .dg-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--dg-stroke);
    transform: translate(-50%, -50%);
  }

  .dg-plus::before {
    width: 12px;
    height: var(--dg-line);
  }

  .dg-plus::after {
    width: var(--dg-line);
    height: 12px;
  }

  .dg--loop {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "in" "a1" "frame" "a2" "out";
  }

  .dg--loop .dg-up,
  .dg-you {
    display: none;
  }

  .dg-cycle {
    flex-direction: column;
    align-items: stretch;
    padding: 0 46px 0 0;
  }

  .dg-cycle .dg-node {
    flex: 0 0 auto;
  }

  .dg-cycle .dg-arrow {
    flex: 0 0 30px;
    align-self: center;
  }

  /* 狭い画面では、右側を回って最初の箱へ戻る */
  .dg-return {
    top: 27px;
    right: 10px;
    bottom: 27px;
    left: auto;
    width: 26px;
    height: auto;
    border: var(--dg-line) solid var(--dg-loop);
    border-left: 0;
  }

  .dg-return::before {
    top: -5.5px;
    left: 0;
    border-top: 0;
    border-bottom: var(--dg-line) solid var(--dg-loop);
    transform: rotate(45deg);
  }

  .dg-return span {
    top: 50%;
    right: -0.8em;
    bottom: auto;
    left: auto;
    padding: 8px 0;
    writing-mode: vertical-rl;
    transform: translateY(-50%);
  }

  .dg-inner-you {
    display: grid;
    justify-items: center;
    margin-top: 6px;
  }

  .dg-inner-you .dg-node {
    justify-self: stretch;
  }
}

/* ---------- 狭い画面 ---------- */

@media (max-width: 960px) {
  .uc-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .uc-toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .uc-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .uc-hero-card {
    display: none;
  }
}

@media (max-width: 720px) {
  body.uc {
    font-size: 16px;
  }

  .uc-row a {
    grid-template-columns: minmax(0, 1fr);
  }

  .uc-thumb {
    height: 168px;
    padding: 16px;
  }

  .uc-thumb img,
  .uc-thumb .uc-paper {
    max-width: 180px;
  }

  .uc-need {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px;
  }

  .uc-need .uc-btn {
    justify-self: start;
  }

  .uc-actions .uc-btn {
    flex: 1 1 auto;
  }

  .uc-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .uc-pager-next {
    text-align: left;
  }

  body.uc .uc-prompt pre {
    padding: 16px 16px 18px;
    font-size: 0.9375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uc-btn,
  .uc-thumb img,
  .uc-thumb .uc-paper,
  .uc-row a,
  .uc-toc a,
  .uc-preview-shot img,
  .uc-choice,
  .uc-quiz-bar span {
    transition: none;
  }

  .uc-row a:hover .uc-thumb img,
  .uc-row a:hover .uc-thumb .uc-paper {
    transform: rotate(-2deg);
  }
}

@media print {
  body.uc-badge-page .uc-hero,
  body.uc-badge-page .uc-name-form,
  body.uc-badge-page .uc-badge-actions,
  body.uc-badge-page .uc-aside,
  body.uc-badge-page .site-footer {
    display: none;
  }

  body.uc-badge-page .uc-cert {
    box-shadow: none;
  }

  .site-header,
  .uc-toc,
  .uc-actions,
  .uc-prompt-actions,
  .uc-preview,
  .uc-pager,
  .uc-draft {
    display: none;
  }

  body.uc,
  .uc-hero,
  .uc-end {
    background: #fff;
  }
}
