/* =========================================================================
   じどう車ずかん — スタイル (Modern & Layered Hierarchy)
   ・1年生が タブレットで つかうので、文字は 大きく、ボタンは ゆびで おせる 大きさに
   ・「とい＝オレンジ」「しごと＝あお」「つくり＝みどり」で じゅんじょを 色でも しめす
   ========================================================================= */

:root {
  /* モダンなカラーパレット */
  --bg: #f4f7fb;
  --bg-soft: #e9eff8;
  --card: #ffffff;
  --card-sub: #f8fafc;
  --ink: #132238;
  --ink-sub: #52607b;
  --line: #e2e8f0;
  --line-bold: #cbd5e1;

  --navy: #254a85;
  --navy-d: #162f59;
  --navy-light: #eef4ff;
  --yellow: #ffc83b;
  --yellow-d: #d99300;
  --yellow-light: #fffbeb;

  /* Step カラー（教科書準拠） */
  --q: #f06428;        /* ① とい */
  --q-bg: #fff7f2;
  --q-border: #ffd8c2;

  --a: #2563eb;        /* ② しごと */
  --a-bg: #f0f6ff;
  --a-border: #bfdbfe;

  --t: #10b981;        /* ③ つくり */
  --t-bg: #ecfdf5;
  --t-border: #a7f3d0;

  --lit: #f59e0b;

  /* 構造的シャドウ＆レイヤー */
  --radius-lg: 24px;
  --radius: 18px;
  --radius-s: 12px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(19, 34, 56, 0.04);
  --shadow: 0 8px 24px rgba(19, 34, 56, 0.07);
  --shadow-lg: 0 16px 36px rgba(19, 34, 56, 0.12);
  --shadow-active: 0 4px 16px rgba(37, 74, 133, 0.25);

  /* タイポグラフィ */
  --font: 'BIZ UDPGothic', 'Hiragino Maru Gothic ProN', 'Hiragino Kaku Gothic ProN',
    'Yu Gothic Medium', 'Yu Gothic', Meiryo, sans-serif;
  --font-title: 'Kosugi Maru', 'BIZ UDPGothic', 'Hiragino Maru Gothic ProN', Meiryo, sans-serif;

  --fs-body: 19px;
  --fs-step: 22px;
  --fs-card: 24px;
  --fs-btn: 18px;
  --fs-sub: 16px;
  --fs-small: 15px;

  /* タッチ領域 */
  --tap: 48px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.95;
  color: var(--ink);
  background: var(--bg);
  background-image: 
    radial-gradient(at 10% 10%, rgba(37, 74, 133, 0.03) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 0 16px 48px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ふりがな（ルビ表示の調整） */
ruby {
  display: inline-ruby;
  ruby-position: over;
  ruby-align: center;
}

ruby rt {
  font-size: 0.48em;
  font-weight: 400;
  color: var(--ink-sub);
  letter-spacing: .04em;
  line-height: 1.2;
}

.btn ruby rt,
.tab ruby rt,
.badge ruby rt,
.cat-block__head ruby rt {
  color: inherit;
  opacity: 0.88;
}

b {
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

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

/* assets に 写真を おいた ときの 見せかた */
.card__art img,
.art-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

:focus-visible {
  outline: 4px solid var(--yellow-d);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ========================= ヘッダー ========================= */

.site-header {
  max-width: 920px;
  margin: 0 auto 28px;
  padding-top: 24px;
}

.site-header__inner {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 30px 32px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header__inner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--q) 0%, var(--a) 50%, var(--t) 100%);
}

.site-header__badge-wrap {
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-light);
  color: var(--navy);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.5;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 74, 133, 0.12);
}

.site-header__title {
  font-family: var(--font-title);
  font-size: 36px;
  line-height: 1.4;
  color: var(--navy-d);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.site-header__lead {
  font-size: 17px;
  color: var(--ink-sub);
  line-height: 1.8;
  margin-bottom: 18px;
}

/* ヘッダー内ステップピル表示 */
.site-header__steps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-soft);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.step-pill--1 {
  color: var(--a);
  border: 1px solid var(--a-border);
}

.step-pill--2 {
  color: var(--t);
  border: 1px solid var(--t-border);
}

.step-pill__num {
  font-size: 16px;
}

.step-arrow {
  color: var(--ink-sub);
  font-size: 14px;
}

/* ほそい バー（詳細ページ） */
.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* ========================= ボタン ========================= */

.btn {
  font-family: var(--font-title);
  font-size: var(--fs-btn);
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 22px;
  min-height: 54px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s var(--ease);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-active);
  text-decoration: none;
  box-sizing: border-box;
}

.btn:hover {
  background: var(--navy-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 47, 89, 0.3);
}

.btn:active {
  transform: translateY(0) scale(.98);
}

.btn--ghost {
  background: var(--card);
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: var(--navy-light);
  border-color: rgba(37, 74, 133, 0.2);
}

.btn--audio {
  background: var(--bg-soft);
  color: var(--navy);
  box-shadow: none;
  font-size: var(--fs-sub);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  min-height: 48px;
}

.btn--audio:hover {
  background: var(--navy-light);
}

.btn--audio.is-playing {
  background: #fff3e0;
  color: #c2410c;
  border-color: #ffedd5;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 100, 40, .4); }
  70% { box-shadow: 0 0 0 12px rgba(240, 100, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 100, 40, 0); }
}

.btn--next {
  width: 100%;
  font-size: 19px;
  min-height: 62px;
  background: var(--yellow);
  color: #452b00;
  box-shadow: 0 6px 18px rgba(217, 147, 0, .3);
  border-radius: var(--radius);
  line-height: 1.6;
}

.btn--next:hover {
  background: #ffbe24;
}

.btn--zoom {
  width: 100%;
  margin-top: 12px;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.6;
  padding: 14px 20px;
  min-height: 60px;
  background: linear-gradient(135deg, #1e3a66, #10203b);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(16, 32, 59, .3);
}

.btn--zoom:hover {
  background: linear-gradient(135deg, #26487e, #172c4f);
}

.btn--zoom rt {
  color: #cbd5e1;
}

.btn--star {
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--star .star {
  font-size: 22px;
  line-height: 1;
}

.btn--star[aria-pressed="true"] {
  background: var(--yellow-light);
  color: var(--yellow-d);
  border-color: var(--yellow);
}

/* ========================= ツールバー & タブ ========================= */

.toolbar-area {
  max-width: 1100px;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--bg-soft);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.tab {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  background: transparent;
  color: var(--ink-sub);
  border: none;
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 54px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: all .2s var(--ease);
}

.tab__icon {
  font-size: 24px;
  line-height: 1;
  flex: none;
}

.tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.tab.is-active {
  background: var(--card);
  color: var(--navy-d);
  box-shadow: var(--shadow);
}

.list-tools {
  display: flex;
  justify-content: center;
}

.btn--tool {
  text-decoration: none;
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-pill);
  min-height: 50px;
  padding: 10px 24px;
}

.btn--tool:hover {
  background: var(--navy-light);
  border-color: rgba(37, 74, 133, 0.2);
}

.list-count {
  max-width: 1100px;
  margin: 0 auto 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-sub);
}

/* ========================= カード一覧 ========================= */

.grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.grid--blocks {
  display: block;
}

.cat-block {
  margin-bottom: 32px;
}

.cat-block__head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.5;
  color: var(--navy-d);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line-bold);
  padding: 12px 6px 10px;
  margin-bottom: 18px;
}

.cat-block__icon {
  font-size: 28px;
  line-height: 1;
}

.cat-block__n {
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink-sub);
}

.cat-block__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px 18px;
  text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: fadeUp .4s var(--ease) both;
  display: flex;
  flex-direction: column;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 74, 133, 0.25);
}

.card.is-last {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow), var(--shadow-lg);
}

.card__art {
  height: 140px;
  margin-bottom: 10px;
  background: var(--card-sub);
  border-radius: var(--radius-s);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card__cat {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy);
  background: var(--navy-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin: 0 auto 6px;
}

.card__name {
  font-family: var(--font-title);
  font-size: var(--fs-card);
  line-height: 1.5;
  color: var(--navy-d);
  margin-top: auto;
}

.card__link {
  color: inherit;
  text-decoration: none;
}

.card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

/* 60だい 中 52だいが しゃしんなので、すきとおった ままだと
   しゃしんの 上で ★が 見えなく なる。白い まるを しいて おく */
.card__star {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: var(--tap);
  height: var(--tap);
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 2px 6px rgba(30, 43, 69, .18);
  color: #b0bccf;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s var(--ease), color .2s var(--ease);
}

.card__star:hover {
  transform: scale(1.15);
  color: var(--yellow-d);
}

.card__star[aria-pressed="true"] {
  color: var(--yellow-d);
}

.empty {
  max-width: 640px;
  margin: 30px auto;
  text-align: center;
  color: var(--ink-sub);
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ========================= 詳細ページ ========================= */

.detail {
  max-width: 1100px;
  margin: 0 auto;
}

.detail__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 20px;
  background: var(--card);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.cat-chip {
  background: var(--navy-light);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-size: var(--fs-sub);
  font-weight: 700;
  color: var(--navy);
  border: 1px solid rgba(37, 74, 133, 0.15);
}

.detail__name {
  font-family: var(--font-title);
  font-size: 34px;
  line-height: 1.3;
  color: var(--navy-d);
  letter-spacing: -0.01em;
}

.detail__len {
  font-size: var(--fs-sub);
  font-weight: 700;
  color: var(--ink-sub);
  margin-left: auto;
  background: var(--bg-soft);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

.detail__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* --- 絵の パネル --- */
.art-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
  position: sticky;
  top: 16px;
}

.art-stage {
  position: relative;
  height: 310px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}

.art-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}

.art-tools {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn--3d {
  width: 100%;
  background: var(--navy-light);
  color: var(--navy);
  border: 1px solid rgba(37, 74, 133, 0.2);
  min-height: 52px;
}

.art-hint {
  font-size: 14px;
  color: var(--ink-sub);
  text-align: center;
  margin-top: 14px;
  line-height: 1.7;
  background: var(--bg-soft);
  padding: 12px 14px;
  border-radius: var(--radius-s);
}

.art-stage.has-photo>svg {
  display: none;
}

.art-stage.has-photo.is-art>.art-photo {
  display: none;
}

.art-stage.has-photo.is-art>svg {
  display: block;
}

/* ひかる ぶぶん */
.car-art .art-part {
  transition: opacity .3s var(--ease), filter .3s var(--ease);
}

.car-art.has-lit>*:not(.is-lit) {
  opacity: .33;
}

.car-art .art-part.is-lit {
  filter: drop-shadow(0 0 6px var(--lit)) drop-shadow(0 0 16px rgba(245, 158, 11, .9));
}

/* ふきだし（ぶぶんの 名まえ） */
.callout {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  background: var(--lit);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(245, 158, 11, .5);
  pointer-events: none;
  animation: popIn .3s var(--ease) both;
}

.callout::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: var(--lit);
  border-bottom: 0;
}

.callout rt {
  color: #fef3c7;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -80%) scale(.85);
  }
}

/* --- ステップ タイムライン --- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
  background: var(--bg-soft);
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.progress li {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-sub);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 8px 4px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: all .25s var(--ease);
}

.progress li.is-on:nth-child(1) {
  background: var(--q-bg);
  border-color: var(--q-border);
  color: var(--q);
}

.progress li.is-on:nth-child(2) {
  background: var(--a-bg);
  border-color: var(--a-border);
  color: var(--a);
}

.progress li.is-on:nth-child(3) {
  background: var(--t-bg);
  border-color: var(--t-border);
  color: var(--t);
}

.progress li.is-now:nth-child(1) {
  background: var(--q);
  color: #fff;
  box-shadow: 0 4px 12px rgba(240, 100, 40, .3);
}

.progress li.is-now:nth-child(2) {
  background: var(--a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

.progress li.is-now:nth-child(3) {
  background: var(--t);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .3);
}

.step {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--line-bold);
  animation: stepIn .45s var(--ease) both;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.step[hidden] {
  display: none;
}

.step__tag {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  padding: 3px 14px;
  border-radius: 30px;
  margin-bottom: 8px;
}

/* 「おせる」ことの めじるし。ちいさな 字の ヒントだけでは 気づけない */
.step__tapme {
  display: inline-block;
  margin-left: 8px;
  margin-bottom: 8px;
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.6;
  color: #1d6b47;
  background: var(--t-bg);
  border: 2px solid rgba(43, 156, 104, .5);
  border-radius: 30px;
  padding: 1px 12px;
  white-space: nowrap;
}

.step__text {
  font-size: var(--fs-step);
  line-height: 2.05;
}

.step__foot {
  margin-top: 10px;
}

.step--q {
  border-left-color: var(--q);
  background: var(--q-bg);
}

.step--q .step__tag {
  background: var(--q);
}

.step--job {
  border-left-color: var(--a);
}

.step--job .step__tag {
  background: var(--a);
}

.step--make {
  position: relative;
  border-left-color: var(--t);
  cursor: pointer;
}

/* おせる 面だと 形でも 分かる ように、うちがわに 点せんの わくを 出す */
.step--make::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(43, 156, 104, .4);
  border-radius: var(--radius-s);
  pointer-events: none;
}

.step--make .step__tag {
  background: var(--t);
}

.step--make .step__hint {
  font-size: var(--fs-small);
  color: var(--ink-sub);
  margin-top: 6px;
}

.step--make.is-active {
  background: var(--t-bg);
  box-shadow: 0 0 0 3px var(--t), var(--shadow);
}

/* ========================= よみおわった ========================= */

.done {
  background: linear-gradient(135deg, #fff6d8, #fffdf5);
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  text-align: center;
  animation: stepIn .45s var(--ease) both;
}

.done__msg {
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.6;
  color: #7a5200;
  margin-bottom: 12px;
}

.done__acts {
  display: grid;
  gap: 10px;
}

.done__acts .btn {
  width: 100%;
  margin-top: 0;
}

/* --- もっと しりたい --- */
.more {
  background: #fffaec;
  border: 2px dashed #eac86b;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-top: 18px;
}

.more>summary {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: #8a5d00;
  cursor: pointer;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: 8px;
}

.more p {
  font-size: 18px;
  line-height: 2;
  color: #6b4a08;
  padding-top: 8px;
}

/* ========================= かきうつしシート ========================= */

.sheet {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px 28px 28px;
  margin-top: 24px;
}

.sheet h2 {
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.6;
  color: var(--navy-d);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet__lead {
  font-size: 16px;
  color: var(--ink-sub);
  margin-bottom: 18px;
  line-height: 1.8;
}

.slot {
  border-top: 1px dashed var(--line);
  padding: 18px 0 8px;
}

.slot__tmpl {
  font-size: 18px;
  line-height: 2.1;
  margin-bottom: 10px;
}

.slot__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-right: 8px;
  vertical-align: middle;
}

.slot__blank {
  display: inline-block;
  background: var(--yellow-light);
  border-bottom: 3px solid var(--yellow-d);
  padding: 0 16px;
  font-style: normal;
  line-height: 1.4;
  vertical-align: middle;
  border-radius: 4px 4px 0 0;
}

.slot textarea {
  width: 100%;
  min-height: 96px;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--card-sub);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  resize: vertical;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.slot textarea:focus {
  border-color: var(--navy);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 74, 133, 0.12);
}

.sheet__foot {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}

.sheet__saved {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--t);
  align-self: center;
}

.sheet__print {
  display: none;
}

/* ========================= 大きさくらべ ========================= */

.compare {
  max-width: 1100px;
  margin: 0 auto;
}

.compare__lead {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 24px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.95;
}

.crow {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto 10px;
  padding: 6px 14px 6px 6px;
}

.crow__art {
  height: 148px;
  order: 2;
}

.crow__art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.crow__label {
  order: 1;
  padding-left: 12px;
}

.crow__name {
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1.6;
  color: var(--navy-d);
  text-decoration: none;
}

.crow__name:hover {
  text-decoration: underline;
}

.crow__len {
  font-size: var(--fs-small);
  color: var(--ink-sub);
  line-height: 1.6;
}

/* ========================= その他 ========================= */

/* ========================= 学習ポイント Note ========================= */

.note {
  max-width: 920px;
  margin: 48px auto 0;
  background: var(--card);
  border: 1px solid var(--yellow);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}

.note__header {
  background: var(--yellow-light);
  border-bottom: 1px solid rgba(217, 147, 0, 0.2);
  padding: 16px 28px;
}

.note__header h2 {
  font-family: var(--font-title);
  font-size: 21px;
  line-height: 1.5;
  color: var(--yellow-d);
  display: flex;
  align-items: center;
  gap: 8px;
}

.note__content {
  padding: 24px 28px;
}

.note__lead {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-d);
  margin-bottom: 14px;
}

.note__flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.flow-item {
  font-size: 15px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.flow-item--q {
  background: var(--q-bg);
  color: var(--q);
  border-color: var(--q-border);
}

.flow-item--a {
  background: var(--a-bg);
  color: var(--a);
  border-color: var(--a-border);
}

.flow-item--t {
  background: var(--t-bg);
  color: var(--t);
  border-color: var(--t-border);
}

.flow-arrow {
  color: var(--ink-sub);
  font-size: 14px;
}

.note__sub {
  font-size: 16px;
  color: var(--ink-sub);
  line-height: 1.8;
}

.note__divider {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 20px 0;
}

.note__extra {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-soft);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.note__extra .icon {
  font-size: 26px;
  line-height: 1;
  flex: none;
}

.site-footer {
  max-width: 920px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-sub);
}

.view[hidden] {
  display: none;
}

/* ========================= タブレット・スマホ ========================= */

/* --- よこむきの がっこうタブレット（だいたい 1180×820 / 1280×800）--- */
@media (min-width: 1000px) {
  .art-stage {
    height: 340px;
  }

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

  .card__art {
    height: 170px;
  }
}

@media (max-width: 900px) {
  .tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .detail__body {
    grid-template-columns: 1fr;
  }

  .art-panel {
    position: static;
  }

  .art-stage {
    height: 240px;
  }
}

/* よこむきは たての ばしょが たりない。よはくを つめて、
   絵と ①②③が いちどに 見える ように する */
@media (orientation: landscape) and (max-height: 900px) {
  body {
    padding-bottom: 32px;
  }

  .site-header {
    margin-bottom: 16px;
    padding-top: 16px;
  }

  .site-header__inner {
    padding: 18px 26px 20px;
  }

  h1 {
    font-size: 30px;
  }

  .topbar {
    padding: 12px 0 8px;
  }

  .step {
    padding: 14px 18px 12px;
  }

  .steps {
    gap: 12px;
  }

  .note {
    margin-top: 32px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
    padding: 0 12px 40px;
  }

  .site-header {
    padding-top: 18px;
  }

  .site-header__inner {
    padding: 20px 18px 22px;
  }

  h1 {
    font-size: 27px;
  }

  .site-header__lead {
    font-size: 15px;
  }

  .tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .tab {
    font-size: var(--fs-sub);
    padding: 8px 10px;
    min-height: 54px;
    gap: 6px;
  }

  .tab__icon {
    font-size: 22px;
  }

  .grid,
  .cat-block__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .cat-block__head {
    font-size: 18px;
  }

  .card__art {
    height: 110px;
  }

  .card__name {
    font-size: 19px;
  }

  .detail__name {
    font-size: 26px;
  }

  .step__text {
    font-size: 19px;
  }

  .btn--next {
    font-size: 18px;
  }

  .progress li {
    font-size: var(--fs-small);
    padding: 8px 2px;
  }

  .crow {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .crow__label {
    order: 1;
    padding-left: 4px;
  }

  .crow__art {
    height: 96px;
  }

  .note {
    padding: 18px 16px;
  }
}

/* うごきを へらす せってい の 人 */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
