/* MIRU LAB KIDS のサイトの見た目。色はロゴ（assets/brand/README.md）と領域のテーマ色（SPEC.md） */
:root {
  --ink: #222222;
  --muted: #5f6470;
  --faint: #8a8f99;
  --line: #e6e8ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --blue: #3e86dd;
  --blue-dark: #2a6cbd;
  --yellow: #edab14;
  --radius: 16px;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--blue-dark);
}
h1,
h2,
h3 {
  font-family: var(--round);
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.note {
  color: var(--muted);
  font-size: 14px;
}
code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85em;
  background: var(--bg-soft);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

/* ---- 上の帯 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.header-logo img {
  height: 32px;
  width: auto;
}
.header-nav {
  display: flex;
  gap: 4px;
  font-family: var(--round);
  font-weight: 500;
  font-size: 15px;
}
.header-nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
}
.header-nav a:hover {
  background: var(--bg-soft);
}

/* ---- トップ：ロゴと紹介 ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  text-align: center;
  background:
    radial-gradient(circle at 8% 22%, #fbe3dc 0 46px, transparent 47px),
    radial-gradient(circle at 92% 18%, #dcebf8 0 64px, transparent 65px),
    radial-gradient(circle at 86% 84%, #fdf0cc 0 38px, transparent 39px),
    radial-gradient(circle at 14% 88%, #e1f1dd 0 30px, transparent 31px),
    radial-gradient(circle at 70% 6%, #e9e1f6 0 18px, transparent 19px),
    radial-gradient(circle at 26% 6%, #fbe1ec 0 14px, transparent 15px),
    var(--bg);
}
.hero-logo img {
  width: min(300px, 70vw);
  margin: 0 auto;
}
.hero-subtitle {
  margin: 22px 0 0;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(18px, 4.4vw, 24px);
  line-height: 1.5;
}
.hero-intro {
  max-width: 40em;
  margin: 12px auto 0;
  color: var(--muted);
}

/* ---- 見出し・区切り ---- */
.section {
  padding: 48px 20px;
}
.section-title {
  font-size: clamp(22px, 5vw, 28px);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  flex: none;
}

/* ---- 課題のカード ---- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.task-card {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(30, 50, 90, 0.1);
}
.task-thumb {
  background: var(--band);
  padding: 20px 28px 0;
  height: 230px;
  overflow: hidden;
}
.task-thumb img {
  border-radius: 6px 6px 0 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.task-body {
  padding: 16px 20px 20px;
}
.task-body h3 {
  font-size: 20px;
  margin: 8px 0 4px;
}
.task-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.task-aims {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.task-aims span {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 11px;
}
.task-body .task-aims {
  color: var(--ink);
}
.sheet-side .task-aims {
  margin: -8px 0 20px;
  font-size: 14px;
}
.aims-box {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px 12px;
  margin: 4px 0 16px;
}
.aims-box h2 {
  font-size: 15px;
  color: color-mix(in srgb, var(--accent) 80%, #000);
  margin-bottom: 4px;
}
.aims {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.aims li {
  position: relative;
  padding-left: 1.3em;
  font-weight: 700;
}
.aims li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.62em;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
}
.aims .term {
  display: inline-block;
}
.aims-box .aims {
  margin: 0;
}
.task-body .task-meta {
  margin-top: 10px;
  font-family: var(--round);
  font-weight: 800;
  color: var(--accent);
  font-size: 14px;
}
.chip {
  display: inline-block;
  font-family: var(--round);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--band);
  color: color-mix(in srgb, var(--accent) 75%, #000);
}

/* ---- つかいかた ---- */
.steps-section {
  background: var(--bg-soft);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
}
.step h3 {
  font-size: 19px;
  margin: 10px 0 4px;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---- 課題ページ ---- */
.task-page {
  padding-top: 20px;
  padding-bottom: 56px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 18px;
}
.breadcrumb a {
  color: var(--faint);
}
.task-header {
  background: var(--band);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.task-header.with-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: center;
}
.example {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.example img {
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  transform: rotate(2deg);
  transition: transform 0.2s;
}
.example:hover img {
  transform: rotate(0deg) translateY(-3px);
}
.example-caption {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-family: var(--round);
  font-weight: 800;
  font-size: 14px;
  color: color-mix(in srgb, var(--accent) 80%, #000);
}
.task-header .chip {
  background: #fff;
}
.task-header h1 {
  font-size: clamp(26px, 6vw, 36px);
  margin: 10px 0 8px;
}
.lead {
  margin: 0;
}
/* 説明文は1文ずつ行を変える */
.sentence {
  display: block;
}
.sentence + .sentence {
  margin-top: 0.15em;
}
.task-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0 44px;
}
.card-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card-box h2 {
  font-size: 19px;
  margin-bottom: 10px;
}
.card-box h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.card-box ul {
  margin: 0;
  padding-left: 1.2em;
}
.card-box li + li {
  margin-top: 4px;
}
.adjust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 15px;
}
.level-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.level-table th,
.level-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 6px;
  border-top: 1px solid var(--line);
}
.level-table tr:first-child th,
.level-table tr:first-child td {
  border-top: none;
}
.level-table th {
  white-space: nowrap;
  font-family: var(--round);
  font-weight: 800;
}
.level-table .num {
  white-space: nowrap;
  color: var(--faint);
  text-align: right;
}
.prints-title {
  margin-bottom: 4px;
}
.level-section {
  margin-top: 32px;
  scroll-margin-top: 80px;
}
.level-title {
  font-size: 17px;
  font-family: var(--body);
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--band);
}
a.level-badge {
  text-decoration: none;
}
a.level-badge::after {
  content: " ›";
}
.level-badge {
  flex: none;
  font-family: var(--round);
  font-weight: 800;
  font-size: 15px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
}
.sheet-grid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px 18px;
}
.sheet-card a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.sheet-card img {
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.sheet-card a:hover img {
  box-shadow: 0 8px 20px rgba(30, 50, 90, 0.14);
  transform: translateY(-2px);
}
.sheet-label {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-family: var(--round);
  font-weight: 800;
  font-size: 15px;
}
.sheet-card.small .sheet-label {
  font-size: 13px;
  margin-top: 4px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-family: var(--round);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
}
.button:hover {
  background: var(--blue-dark);
}
.button-large {
  font-size: 18px;
  min-height: 56px;
}
.button-large small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}
.button-sub {
  background: #fff;
  color: var(--blue-dark);
  border: 2px solid var(--blue);
}
.button-sub:hover {
  background: #eef5fd;
}
.prose-page .button-large {
  width: auto;
  min-width: 240px;
}
.id-note {
  margin-top: 48px;
  font-size: 15px;
}
.id-note p {
  margin: 0;
}

.h1-sub {
  display: block;
  font-size: 0.55em;
  color: var(--muted);
  margin-top: 2px;
}
.box-text {
  margin: 0 0 8px;
  font-size: 15px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  font-family: var(--round);
  font-weight: 800;
  font-size: 15px;
}
.pager a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
}
.pager a:hover {
  background: var(--band, var(--bg-soft));
}

/* ---- プリント1枚のページ ---- */
.sheet-page {
  padding-top: 20px;
  padding-bottom: 56px;
}
.sheet-main {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.sheet-preview {
  background: var(--band);
  border-radius: var(--radius);
  padding: 24px;
}
.sheet-preview img {
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}
.sheet-side h1 {
  font-size: clamp(26px, 5vw, 34px);
  margin: 10px 0 8px;
}
.sheet-desc {
  margin: 0 0 20px;
  color: var(--muted);
}
.print-box {
  border: 2px solid var(--band);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 12px;
}
.print-title {
  margin: 0;
  font-family: var(--round);
  font-weight: 800;
  font-size: 17px;
}
.print-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.print-box .note {
  margin: 0;
}
.sheet-page .pager {
  margin: 20px 0 0;
}
.sheet-page .task-columns {
  margin-top: 40px;
}
.others .sheet-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px 14px;
}

/* ---- 文章のページ ---- */
.prose-page {
  max-width: 760px;
  padding-top: 20px;
  padding-bottom: 64px;
}
.prose-page h1 {
  font-size: clamp(26px, 6vw, 34px);
  margin-bottom: 20px;
}
.prose-section h2 {
  font-size: 20px;
  margin: 32px 0 8px;
  padding-left: 12px;
  border-left: 5px solid var(--blue);
}
.prose-section p {
  margin: 0 0 12px;
}
.prose-section ul {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

/* ---- コラム ---- */
.column-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.column-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
.column-card:hover {
  box-shadow: 0 6px 18px rgba(30, 50, 90, 0.1);
  transform: translateY(-2px);
}
.column-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.column-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.column-more {
  margin-top: auto;
  font-family: var(--round);
  font-size: 14px;
  color: var(--blue-dark);
}
.more-link {
  margin: 16px 0 0;
  text-align: right;
  font-family: var(--round);
}
.prose-page .lead {
  margin-bottom: 8px;
}
.column-page h1 {
  margin-bottom: 8px;
}
.byline {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--muted);
}
.byline span {
  margin-left: 1em;
}
.column-body {
  font-size: 17px;
  line-height: 1.9;
}
.column-body h2 {
  font-size: 21px;
  margin: 44px 0 12px;
  padding-left: 12px;
  border-left: 5px solid var(--blue);
}
.column-body h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}
.column-body p {
  margin: 0 0 18px;
}
.column-body ul {
  margin: 0 0 18px;
  padding-left: 1.3em;
}
.column-body li + li {
  margin-top: 6px;
}
.column-body strong {
  font-weight: 700;
}
.column-after {
  margin-top: 56px;
}
.column-box {
  margin-top: 48px;
}
.column-box ul {
  margin: 0;
  padding-left: 1.3em;
}

/* ---- 下の帯 ---- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-logo {
  height: 27px;
  width: auto;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
}
.copyright {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

/* ---- スマホ ---- */
@media (max-width: 640px) {
  .header-inner {
    min-height: 56px;
  }
  .header-logo img {
    height: 26px;
  }
  .header-nav {
    font-size: 13px;
  }
  .header-nav a {
    padding: 4px 6px;
  }
  .header-nav a[href="/about/"] {
    display: none;
  }
  .header-inner {
    gap: 8px;
  }
  .hero {
    padding: 36px 0 32px;
    background:
      radial-gradient(circle at 4% 10%, #fbe3dc 0 26px, transparent 27px),
      radial-gradient(circle at 98% 6%, #dcebf8 0 40px, transparent 41px),
      radial-gradient(circle at 96% 46%, #fdf0cc 0 16px, transparent 17px),
      var(--bg);
  }
  .task-thumb {
    height: 210px;
  }
  .task-thumb img {
    max-width: 210px;
    margin: 0 auto;
  }
  .section {
    padding: 36px 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .task-header {
    padding: 22px 18px 18px;
  }
  .task-header.with-example {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .example {
    width: 180px;
    margin: 0 auto;
  }
  .adjust {
    grid-template-columns: 1fr;
  }
  .sheet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
  }
  .task-columns {
    grid-template-columns: 1fr;
  }
  .sheet-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sheet-preview {
    padding: 16px;
  }
  .sheet-preview img {
    max-width: 230px;
    margin: 0 auto;
  }
  .others .sheet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .column-grid {
    grid-template-columns: 1fr;
  }
  .column-body {
    font-size: 16px;
  }
}

/* とても狭い画面では、お問い合わせは下の帯からだけにする（メニューが折り返さないように） */
@media (max-width: 420px) {
  .header-nav a[href="/contact/"] {
    display: none;
  }
}
