:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #2563eb;
  --brand-dark: #1e3a8a;
  --brand-soft: #eff6ff;
  --brand-mid: #dbeafe;
  --sky: #38bdf8;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --border: #e2e8f0;
  --shadow: 0 12px 32px rgba(15, 23, 42, .08);
  --max: 1080px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: .16em; }
a:hover { color: var(--brand-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%);
  padding: 10px 14px; border-radius: 10px; background: var(--text); color: #fff;
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(100% - 36px, var(--max)); margin-inline: auto; }

.site-header {
  position: sticky; z-index: 50; top: 0; background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
}
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; min-width: 230px; text-decoration: none; color: var(--text); }
.brand img { width: 230px; height: 58px; object-fit: contain; object-position: left center; }
.nav-toggle {
  display: none; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 8px 11px; color: var(--brand-dark); font: inherit; font-weight: 700; cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 10px; border-radius: 8px; color: var(--brand-dark); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #1d4ed8; background: rgba(59,130,246,.1); }

.hero {
  position: relative; overflow: hidden; min-height: 570px; display: grid; align-items: center;
  background: linear-gradient(90deg, rgba(239,246,255,.97) 0%, rgba(219,234,254,.84) 47%, rgba(219,234,254,.3) 100%),
    url("../images/rink-overview.png") center / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: auto -8% -130px 42%; height: 280px;
  background: rgba(255,255,255,.32); border-radius: 50%; transform: rotate(-8deg); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 38px; align-items: center; padding-block: 64px; }
.eyebrow, .pill {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  padding: 5px 11px; border: 1px solid #bfdbfe; border-radius: 999px;
  background: rgba(239,246,255,.86); color: #1d4ed8; font-size: .9rem; font-weight: 700;
}
.hero h1 { max-width: 740px; margin: 16px 0 12px; font-size: clamp(2.25rem, 5vw, 4.3rem); line-height: 1.16; letter-spacing: -.035em; }
.hero h1 span { display: block; color: var(--brand); }
.hero .lead { max-width: 670px; margin: 0 0 22px; color: #334155; font-size: clamp(1.04rem, 2vw, 1.18rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 15px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; color: var(--text); font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #60a5fa, var(--brand)); border-color: transparent; color: #fff; }
.btn.ghost { background: rgba(255,255,255,.64); border-color: #93c5fd; color: #1d4ed8; box-shadow: none; }

.hero-card, .card {
  background: rgba(255,255,255,.96); border: 1px solid rgba(226,232,240,.95);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-card { padding: 24px; }
.hero-card h2 { margin: 0 0 5px; font-size: 1.3rem; }
.hero-card p { margin: 0 0 16px; color: var(--muted); }
.audience-choice { display: grid; gap: 10px; }
.audience-choice a {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center;
  padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: #fff;
  color: var(--text); text-decoration: none;
}
.audience-choice a:hover { border-color: #93c5fd; background: var(--brand-soft); }
.choice-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-mid); font-size: 1.25rem; }
.choice-copy strong, .choice-copy small { display: block; }
.choice-copy small { color: var(--muted); }

.section { padding-block: 74px; }
.section.compact { padding-block: 48px; }
.section.white { background: #fff; }
.section.blue { background: linear-gradient(180deg, #eff6ff, #f8fbff); border-block: 1px solid #dbeafe; }
.section-header { max-width: 760px; margin-bottom: 27px; }
.section-kicker { margin: 0 0 6px; color: var(--brand); font-size: .88rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.3; }
.section-header p { margin: 0; color: var(--muted); }
.grid-2, .grid-3, .grade-grid, .article-grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.45; }
.card p { margin: 0; color: var(--muted); }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.card-link:hover { transform: translateY(-3px); border-color: #93c5fd; color: inherit; }
.grade-card { position: relative; min-height: 210px; overflow: hidden; }
.grade-card::after { content: attr(data-grade); position: absolute; right: 12px; bottom: -24px; color: rgba(37,99,235,.08); font-size: 7rem; font-weight: 900; line-height: 1; }
.grade-label { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--brand-mid); color: #1d4ed8; font-size: .88rem; font-weight: 800; }
.grade-card h3 { margin-top: 12px; font-size: 1.35rem; }
.grade-card .arrow { position: absolute; left: 22px; bottom: 19px; color: var(--brand); font-weight: 800; }

.feature-card { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; }
.feature-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; background: var(--brand-soft); font-size: 1.55rem; }
.notice { padding: 18px 20px; border-radius: 15px; border: 1px solid #fde68a; background: var(--amber-soft); color: #78350f; }
.notice strong { display: block; margin-bottom: 4px; }
.trust-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.trust-list li { display: flex; gap: 10px; align-items: flex-start; }
.trust-list li::before { content: "✓"; display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 900; }

.breadcrumb { padding: 16px 0; color: var(--muted); font-size: .9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #94a3b8; }
.breadcrumb a { text-decoration: none; }

.page-hero { padding: 48px 0 44px; background: linear-gradient(150deg, #eff6ff, #fff 70%); border-bottom: 1px solid var(--border); }
.page-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 30px; align-items: center; }
.page-hero h1 { margin: 12px 0 10px; font-size: clamp(2rem, 5vw, 3.55rem); line-height: 1.22; letter-spacing: -.03em; }
.page-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.page-hero img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

.grade-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.article-card { overflow: hidden; padding: 0; }
.article-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-card-body { padding: 20px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.meta-chip { padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: #1d4ed8; font-size: .82rem; font-weight: 750; }
.article-card h3 { margin: 0 0 7px; }
.article-card .question { color: var(--muted); }

.article-shell { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 30px; align-items: start; padding-block: 40px 76px; }
.article-main { min-width: 0; }
.article-cover { margin: 0 0 25px; }
.article-cover img { width: 100%; max-height: 490px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-cover figcaption { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.article-info { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.article-info span { padding: 5px 10px; border: 1px solid #bfdbfe; border-radius: 999px; background: var(--brand-soft); color: #1d4ed8; font-size: .88rem; font-weight: 700; }
.article-content { padding: clamp(22px, 4vw, 42px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.article-content h1 { margin: 0 0 28px; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.3; letter-spacing: -.025em; }
.article-content h2 { margin: 2.2em 0 .65em; padding-bottom: .4em; border-bottom: 2px solid var(--brand-mid); font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.4; }
.article-content h3 { margin: 1.8em 0 .55em; color: var(--brand-dark); font-size: 1.2rem; }
.article-content p { margin: 0 0 1.05em; }
.article-content ul, .article-content ol { margin: 0 0 1.2em; padding-left: 1.45em; }
.article-content li + li { margin-top: .38em; }
.article-content blockquote { margin: 1.3em 0; padding: 16px 18px; border-left: 5px solid var(--brand); border-radius: 0 12px 12px 0; background: var(--brand-soft); }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content table { width: 100%; margin: 1.25em 0 1.6em; border-collapse: collapse; font-size: .94rem; }
.article-content th, .article-content td { padding: 10px 11px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.article-content th { background: var(--brand-soft); color: var(--brand-dark); }
.article-content hr { height: 1px; margin: 2em 0; border: 0; background: var(--border); }
.article-content ruby rt { font-size: .55em; color: var(--brand-dark); }
.visual-note { margin: 1.25em 0; padding: 14px 16px; border: 1px dashed #93c5fd; border-radius: 13px; background: #f8fbff; color: var(--muted); font-size: .9rem; }
.visual-note::before { content: "画像メモ"; display: inline-block; margin-right: 8px; color: var(--brand); font-weight: 800; }
.sidebar { position: sticky; top: 92px; display: grid; gap: 14px; }
.sidebar .card { padding: 18px; }
.sidebar h2 { margin: 0 0 10px; font-size: 1rem; }
.sidebar ul { margin: 0; padding-left: 18px; }
.sidebar li + li { margin-top: 6px; }
.sidebar a { color: var(--brand-dark); text-decoration: none; }
.sidebar a:hover { color: var(--brand); text-decoration: underline; }
.source-credit { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: #f8fafc; color: var(--muted); font-size: .9rem; }

.teacher-theme .page-hero { background: linear-gradient(150deg, #eef2ff, #fff 70%); }
.teacher-theme .pill, .teacher-theme .article-info span { border-color: #c7d2fe; background: #eef2ff; color: #4338ca; }

.site-footer { padding: 46px 0 28px; background: linear-gradient(#0f2748, #0b1f3a); color: #dbeafe; }
.footer-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 38px; }
.footer-brand img { width: 235px; height: 62px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.footer-brand p { max-width: 510px; margin: 10px 0 0; color: #bfdbfe; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 20px; align-content: start; }
.footer-links a { color: #dbeafe; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(191,219,254,.2); color: #93c5fd; font-size: .85rem; }

.noscript { margin: 24px auto; padding: 18px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #991b1b; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 69px; right: 18px; left: 18px; display: none; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: 11px 12px; }
  .hero-grid, .page-hero-grid, .article-shell { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-card { max-width: 620px; }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .grade-grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, var(--max)); }
  .brand { min-width: 0; }
  .brand img { width: 190px; height: 54px; }
  .hero-grid { padding-block: 42px; gap: 25px; }
  .hero h1 { font-size: 2.25rem; }
  .section { padding-block: 54px; }
  .grid-2, .grid-3, .grade-grid, .article-grid, .grade-intro, .footer-grid, .sidebar { grid-template-columns: 1fr; }
  .button-row .btn { width: 100%; }
  .page-hero { padding-top: 30px; }
  .page-hero-grid { gap: 20px; }
  .article-content { padding: 20px; border-radius: 14px; }
  .article-content table { display: block; overflow-x: auto; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .sidebar, .breadcrumb, .button-row, .page-hero img { display: none !important; }
  .container { width: 100%; max-width: none; }
  .page-hero { padding: 0 0 14px; border-bottom: 1px solid #999; background: #fff; }
  .page-hero-grid, .article-shell { display: block; }
  .article-shell { padding: 0; }
  .article-cover { margin: 14px 0; }
  .article-cover img { max-height: 260px; box-shadow: none; }
  .article-content { padding: 0; border: 0; box-shadow: none; }
  .article-content a { color: #000; text-decoration: none; }
  .article-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; }
  .source-credit::after { content: "\A元URL: " attr(data-source-url); white-space: pre; }
  h1, h2, h3 { break-after: avoid; }
  img, table, blockquote { break-inside: avoid; }
}

/* v1.01: 子ども向けビジュアルアップデート */
:root {
  --play-coral: #f43f5e;
  --play-orange: #f97316;
  --play-green: #10b981;
  --play-cyan: #06b6d4;
  --play-indigo: #6366f1;
  --play-purple: #a855f7;
  --play-yellow: #facc15;
  --shadow-play: 0 16px 36px rgba(30, 64, 175, .12);
}

body {
  background:
    radial-gradient(circle at 8% 18%, rgba(56, 189, 248, .08), transparent 18rem),
    radial-gradient(circle at 92% 52%, rgba(168, 85, 247, .06), transparent 20rem),
    var(--bg);
}

.site-header { border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #38bdf8, #2563eb, #8b5cf6) 1; }
.site-nav a { font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-radius: 999px; }

.hero {
  min-height: 610px;
  background:
    linear-gradient(100deg, rgba(239,246,255,.98) 0%, rgba(224,242,254,.91) 44%, rgba(219,234,254,.36) 100%),
    url("../images/rink-overview.png") center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  top: -92px;
  left: 47%;
  border: 44px solid rgba(255,255,255,.42);
  border-radius: 50%;
  box-shadow: 220px 125px 0 -88px rgba(250,204,21,.38), -430px 420px 0 -96px rgba(6,182,212,.25);
  pointer-events: none;
}
.hero::after {
  inset: auto -6% -150px 34%;
  height: 310px;
  background: linear-gradient(110deg, rgba(255,255,255,.52), rgba(191,219,254,.32));
}
.eyebrow {
  padding: 7px 14px;
  border: 0;
  background: #fff;
  color: #1e40af;
  box-shadow: 0 8px 22px rgba(37,99,235,.13);
}
.eyebrow::before { content: "❄"; color: #0ea5e9; font-size: 1.05rem; }
.hero h1 { text-shadow: 0 2px 0 rgba(255,255,255,.65); }
.hero h1 span {
  display: inline;
  background: linear-gradient(90deg, #2563eb, #0ea5e9 48%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn {
  min-height: 50px;
  padding-inline: 18px;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn.primary { box-shadow: 0 12px 24px rgba(37,99,235,.25); }
.btn.primary::after { content: "→"; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(30,64,175,.18); }

.hero-card {
  position: relative;
  padding: 28px;
  border: 3px solid rgba(255,255,255,.88);
  border-radius: 26px;
  box-shadow: 0 22px 50px rgba(30,64,175,.2);
}
.hero-card::before {
  content: "どれにする？";
  position: absolute;
  top: -17px;
  right: 20px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #facc15;
  color: #713f12;
  font-size: .8rem;
  font-weight: 900;
  transform: rotate(3deg);
}
.audience-choice a { border-width: 2px; transition: transform .18s ease, border-color .18s ease, background-color .18s ease; }
.audience-choice a:hover { transform: translateX(5px); }
.audience-choice a:nth-child(1) .choice-icon { background: #ffe4e6; }
.audience-choice a:nth-child(2) .choice-icon { background: #dbeafe; }
.audience-choice a:nth-child(3) .choice-icon { background: #dcfce7; }

.adventure-strip {
  position: relative;
  z-index: 2;
  margin-top: -32px;
  padding-bottom: 18px;
}
.adventure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(30,64,175,.16);
}
.adventure-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 112px;
  padding: 18px;
  color: #fff;
}
.adventure-item:nth-child(1) { background: linear-gradient(135deg, #0284c7, #06b6d4); }
.adventure-item:nth-child(2) { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.adventure-item:nth-child(3) { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.adventure-number { font-size: 3rem; font-weight: 950; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.12); }
.adventure-item strong, .adventure-item small { display: block; }
.adventure-item strong { font-size: 1.05rem; }
.adventure-item small { color: rgba(255,255,255,.88); font-size: .8rem; }

.section { position: relative; }
.section.white { background: rgba(255,255,255,.96); }
.section.blue {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(56,189,248,.17), transparent 18rem),
    radial-gradient(circle at 88% 88%, rgba(99,102,241,.12), transparent 20rem),
    linear-gradient(180deg, #eff8ff, #f5f3ff);
}
.section-kicker {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: .78rem;
}
.section h2 { color: #102a56; }
.section-header h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #a855f7);
}

.card {
  border-width: 2px;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(30,64,175,.08);
}
.card-link { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card-link:hover { transform: translateY(-7px) rotate(-.3deg); box-shadow: var(--shadow-play); }

.grade-card {
  --grade-accent: #2563eb;
  --grade-deep: #1d4ed8;
  --grade-soft: #eff6ff;
  min-height: 230px;
  padding-top: 30px;
  border: 0;
  border-top: 9px solid var(--grade-accent);
  background: linear-gradient(145deg, #fff 38%, var(--grade-soft));
  box-shadow: 0 12px 30px rgba(30,64,175,.12);
}
.grade-card[data-grade="1"] { --grade-accent: #f43f5e; --grade-deep: #be123c; --grade-soft: #fff1f2; }
.grade-card[data-grade="2"] { --grade-accent: #f97316; --grade-deep: #c2410c; --grade-soft: #fff7ed; }
.grade-card[data-grade="3"] { --grade-accent: #10b981; --grade-deep: #047857; --grade-soft: #ecfdf5; }
.grade-card[data-grade="4"] { --grade-accent: #06b6d4; --grade-deep: #0369a1; --grade-soft: #ecfeff; }
.grade-card[data-grade="5"] { --grade-accent: #6366f1; --grade-deep: #4338ca; --grade-soft: #eef2ff; }
.grade-card[data-grade="6"] { --grade-accent: #a855f7; --grade-deep: #7e22ce; --grade-soft: #faf5ff; }
.grade-label { background: var(--grade-accent); color: #fff; box-shadow: 0 5px 12px color-mix(in srgb, var(--grade-accent) 30%, transparent); }
.grade-card h3 { color: var(--grade-deep); }
.grade-card::after { right: 9px; bottom: -20px; color: var(--grade-accent); opacity: .1; }
.grade-card .arrow { color: var(--grade-deep); }
.grade-card:hover { border-color: var(--grade-accent); }

.feature-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-left: 7px solid var(--feature-accent, #38bdf8);
}
.feature-card:nth-child(1) { --feature-accent: #38bdf8; --feature-soft: #e0f2fe; }
.feature-card:nth-child(2) { --feature-accent: #f97316; --feature-soft: #ffedd5; }
.feature-card:nth-child(3) { --feature-accent: #eab308; --feature-soft: #fef9c3; }
.feature-card:nth-child(4) { --feature-accent: #10b981; --feature-soft: #d1fae5; }
.feature-card:nth-child(5) { --feature-accent: #6366f1; --feature-soft: #e0e7ff; }
.feature-card:nth-child(6) { --feature-accent: #a855f7; --feature-soft: #f3e8ff; }
.feature-card .feature-icon { background: var(--feature-soft); box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.feature-card h3 { color: #172554; }

body[data-page="grade"][data-grade="1"], body[data-article-id^="K1"] { --grade-accent: #f43f5e; --grade-deep: #be123c; --grade-soft: #fff1f2; }
body[data-page="grade"][data-grade="2"], body[data-article-id^="K2"] { --grade-accent: #f97316; --grade-deep: #c2410c; --grade-soft: #fff7ed; }
body[data-page="grade"][data-grade="3"], body[data-article-id^="K3"] { --grade-accent: #10b981; --grade-deep: #047857; --grade-soft: #ecfdf5; }
body[data-page="grade"][data-grade="4"], body[data-article-id^="K4"] { --grade-accent: #06b6d4; --grade-deep: #0369a1; --grade-soft: #ecfeff; }
body[data-page="grade"][data-grade="5"], body[data-article-id^="K5"] { --grade-accent: #6366f1; --grade-deep: #4338ca; --grade-soft: #eef2ff; }
body[data-page="grade"][data-grade="6"], body[data-article-id^="K6"] { --grade-accent: #a855f7; --grade-deep: #7e22ce; --grade-soft: #faf5ff; }

body[data-page="grade"] .page-hero,
body[data-page="article"] .page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--grade-accent, #2563eb) 20%, transparent), transparent 18rem),
    linear-gradient(145deg, var(--grade-soft, #eff6ff), #fff 72%);
  border-bottom: 5px solid var(--grade-accent, #2563eb);
}
body[data-page="grade"] .page-hero::before,
body[data-page="article"] .page-hero::before {
  content: "?";
  position: absolute;
  right: 4%;
  top: -42px;
  color: var(--grade-accent, #2563eb);
  opacity: .08;
  font-size: 15rem;
  font-weight: 950;
  line-height: 1;
}
body[data-page="grade"] .pill,
body[data-page="article"] .pill,
body[data-page="article"] .article-info span {
  border-color: var(--grade-accent, #2563eb);
  background: var(--grade-soft, #eff6ff);
  color: var(--grade-deep, #1d4ed8);
}
.page-hero img { border: 5px solid #fff; transform: rotate(1deg); }
.article-card img { transition: transform .35s ease; }
.article-card:hover img { transform: scale(1.04); }
.article-card { border-top: 6px solid var(--grade-accent, #2563eb); }
.meta-chip { background: var(--grade-soft, var(--brand-soft)); color: var(--grade-deep, #1d4ed8); }

.article-content { border-top: 9px solid var(--grade-accent, #2563eb); }
.article-content h2 {
  position: relative;
  padding: .55em .7em .55em 1.05em;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--grade-soft, #eff6ff), #fff);
  color: var(--grade-deep, var(--brand-dark));
}
.article-content h2::before {
  content: "";
  position: absolute;
  left: .45em;
  top: .7em;
  bottom: .7em;
  width: 6px;
  border-radius: 999px;
  background: var(--grade-accent, #2563eb);
}
.article-content h3 { color: var(--grade-deep, var(--brand-dark)); }
.article-content blockquote {
  border-left-color: var(--grade-accent, var(--brand));
  background: var(--grade-soft, var(--brand-soft));
}
.article-content li::marker { color: var(--grade-accent, #2563eb); font-weight: 900; }
.sidebar .card:first-child { border-top: 6px solid var(--grade-accent, #2563eb); }
.version-badge { display: inline-block; margin-right: 7px; padding: 2px 8px; border: 1px solid rgba(191,219,254,.35); border-radius: 999px; }

@media (max-width: 680px) {
  .hero { min-height: auto; }
  .hero h1 span { display: block; }
  .adventure-strip { margin-top: 0; padding-block: 12px 0; background: #fff; }
  .adventure-grid { grid-template-columns: 1fr; border-radius: 18px; }
  .adventure-item { justify-content: flex-start; min-height: 88px; padding-inline: 26px; }
  .adventure-number { min-width: 58px; font-size: 2.5rem; text-align: center; }
  .grade-card { min-height: 210px; }
  .page-hero img { transform: none; }
}

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

@media print {
  .adventure-strip { display: none; }
  .article-content { border-top: 0; }
  .article-content h2 { padding: 0 0 .4em; background: none; border-bottom: 1px solid #999; }
  .article-content h2::before { display: none; }
  .version-badge { border: 0; padding: 0; }
}

/* v1.02: 先生向けPDFプリント一覧 */
.print-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(250,204,21,.23), transparent 15rem),
    radial-gradient(circle at 74% 92%, rgba(56,189,248,.22), transparent 18rem),
    linear-gradient(145deg, #eff6ff, #f5f3ff 72%);
  border-bottom: 5px solid #2563eb;
}
.print-hero-actions { margin-top: 22px; }
.print-preview { position: relative; min-height: 310px; }
.paper-stack {
  position: absolute;
  top: 12px;
  left: 8%;
  display: grid;
  place-content: center;
  width: 220px;
  aspect-ratio: 1 / 1.3;
  padding: 28px;
  border: 4px solid #fff;
  border-top: 14px solid #0ea5e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(30,64,175,.2);
  text-align: center;
  transform: rotate(-6deg);
}
.paper-stack.teacher { top: 30px; left: 38%; border-top-color: #7c3aed; transform: rotate(7deg); }
.paper-stack span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 13px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 1.6rem; font-weight: 900; }
.paper-stack.teacher span { background: #ede9fe; color: #6d28d9; }
.paper-stack strong, .paper-stack small { display: block; }
.paper-stack strong { color: #102a56; font-size: 1.15rem; }
.paper-stack small { margin-top: 7px; color: var(--muted); }

.print-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.print-guide > div { display: grid; grid-template-columns: 54px 1fr; align-items: center; padding: 18px; border: 2px solid var(--border); border-radius: 18px; background: #fff; }
.guide-number { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-size: 1.2rem; font-weight: 900; }
.print-guide strong, .print-guide small { display: block; }
.print-guide strong { color: #102a56; }
.print-guide small { color: var(--muted); font-size: .82rem; }

.print-grade-section + .print-grade-section { margin-top: 50px; }
.print-grade-section > h3 { display: flex; align-items: center; gap: 13px; margin: 0 0 17px; color: #102a56; font-size: clamp(1.25rem, 2.4vw, 1.65rem); }
.print-grade-section > h3 span { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: #2563eb; color: #fff; font-size: .88rem; }
.print-grade-section:nth-of-type(1) > h3 span { background: #f43f5e; }
.print-grade-section:nth-of-type(2) > h3 span { background: #f97316; }
.print-grade-section:nth-of-type(3) > h3 span { background: #10b981; }
.print-grade-section:nth-of-type(4) > h3 span { background: #06b6d4; }
.print-grade-section:nth-of-type(5) > h3 span { background: #6366f1; }
.print-grade-section:nth-of-type(6) > h3 span { background: #a855f7; }
.print-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.print-card {
  --print-accent: #2563eb;
  --print-deep: #1d4ed8;
  --print-soft: #eff6ff;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 2px solid color-mix(in srgb, var(--print-accent) 24%, #e2e8f0);
  border-top: 8px solid var(--print-accent);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff 58%, var(--print-soft));
  box-shadow: 0 12px 28px rgba(30,64,175,.09);
}
.print-card[data-grade="1"] { --print-accent: #f43f5e; --print-deep: #be123c; --print-soft: #fff1f2; }
.print-card[data-grade="2"] { --print-accent: #f97316; --print-deep: #c2410c; --print-soft: #fff7ed; }
.print-card[data-grade="3"] { --print-accent: #10b981; --print-deep: #047857; --print-soft: #ecfdf5; }
.print-card[data-grade="4"] { --print-accent: #06b6d4; --print-deep: #0369a1; --print-soft: #ecfeff; }
.print-card[data-grade="5"] { --print-accent: #6366f1; --print-deep: #4338ca; --print-soft: #eef2ff; }
.print-card[data-grade="6"] { --print-accent: #a855f7; --print-deep: #7e22ce; --print-soft: #faf5ff; }
.pdf-label { color: var(--print-deep); font-size: .8rem; font-weight: 850; letter-spacing: .03em; }
.print-card h4 { margin: 8px 0; color: #102a56; font-size: 1.25rem; line-height: 1.45; }
.print-card p { margin: 0; color: var(--muted); }
.print-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.print-meta span { padding: 3px 9px; border-radius: 999px; background: var(--print-soft); color: var(--print-deep); font-size: .75rem; font-weight: 750; }
.print-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.print-card .btn.primary { min-height: 43px; padding: 8px 15px; background: linear-gradient(135deg, color-mix(in srgb, var(--print-accent) 72%, white), var(--print-accent)); }
.print-actions > a:not(.btn) { color: var(--print-deep); font-weight: 750; }

@media (max-width: 920px) {
  .print-preview { min-height: 280px; max-width: 500px; }
  .print-guide { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .print-preview { min-height: 240px; }
  .paper-stack { width: 170px; padding: 18px; }
  .paper-stack.teacher { left: 36%; }
  .print-grid { grid-template-columns: 1fr; }
  .print-grade-section > h3 { align-items: flex-start; flex-direction: column; gap: 7px; }
}
