:root { --ink: #203c3e; --teal: #17675d; --sun: #f4c55d; --paper: #fffdf7; --mint: #e8f1e9; --muted: #526966; font-family: "Yu Gothic", "Meiryo", sans-serif; color: var(--ink); background: var(--paper); line-height: 1.85; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: 4px; }
button, input { font: inherit; }
button, .button { background: var(--teal); color: white; border: 2px solid var(--teal); padding: 10px 19px; border-radius: 999px; font-weight: bold; line-height: 1.6; display: inline-block; text-decoration: none; cursor: pointer; min-height: 46px; }
button:hover, .button:hover { background: #0f5249; color: white; }
.secondary { background: transparent; color: var(--teal); }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #a84412; outline-offset: 4px; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 3; background: white; padding: 10px; }
.skip-link:focus { top: 10px; }
.site-header { max-width: 1180px; margin: auto; padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header > a { font-weight: 800; font-size: 1.12rem; text-decoration: none; }
.site-header span { display: block; font-size: .7rem; letter-spacing: .08em; font-weight: normal; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: .88rem; }
.site-header nav a { text-decoration: none; }
main { max-width: 1120px; margin: auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.5; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.7rem); letter-spacing: .035em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.08rem; }
p { margin: .7em 0; }
.eyebrow { font-size: .72rem; letter-spacing: .13em; font-weight: 800; color: var(--teal); }
.hero { background: #eaf0e3; border-radius: 30px; padding: 46px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.6; margin: 15px 0; }
.hero p { font-size: .95rem; }
.hero .eyebrow { font-size: .7rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; font-size: .85rem; }
.hero-art { position: relative; min-height: 280px; align-self: stretch; overflow: hidden; border-radius: 45% 45% 20% 20%; background: #d8e9e2; }
.sun { position: absolute; width: 87px; height: 87px; background: var(--sun); border-radius: 50%; top: 25px; right: 35px; }
.hill { position: absolute; border-radius: 50% 50% 0 0; width: 340px; height: 175px; }
.hill-back { background: #a8c6a7; bottom: -40px; right: -85px; transform: rotate(-20deg); }
.hill-front { background: #7d9e79; bottom: -80px; left: -55px; transform: rotate(18deg); }
.book-shape { position: absolute; top: 90px; left: 38px; width: 160px; height: 195px; border-radius: 7px 17px 17px 7px; border-left: 12px solid #d79e38; background: #ffda80; transform: rotate(-12deg); padding: 34px 15px; font-size: 2.5rem; font-weight: 900; letter-spacing: .03em; color: #4d603c; box-shadow: 8px 9px 0 #b4c8a780; }
.book-shape small { display: block; font-size: .62rem; letter-spacing: 0; }
.flower { position: absolute; color: #fff7e3; right: 34px; bottom: 20px; font-size: 5rem; line-height: 1; transform: rotate(10deg); }
.intro-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 27px 5px; border-bottom: 1px solid #d9e1d8; }
.intro-strip p { font-size: .8rem; color: var(--muted); }
.intro-strip strong { font-size: .95rem; color: var(--ink); }
.quick-guide { margin: 30px 0; }
.quick-guide h2 { margin-bottom: 5px; font-size: 1.2rem; }
.quick-guide p { font-size: .9rem; }
.month-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 36px; }
.month-nav a { padding: 5px 16px; border: 1px solid #b5cabb; border-radius: 999px; text-decoration: none; font-size: .9rem; }
.month-nav a:hover { background: var(--mint); }
.month-section { margin: 36px 0 46px; }
.month-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 17px; }
.month-heading h2 { font-size: 1.24rem; margin: 0; }
.month-badge { background: var(--sun); border-radius: 18px 18px 18px 4px; padding: 4px 14px; font-size: 1.7rem; font-weight: bold; min-width: 64px; text-align: center; }
.month-badge small { font-size: .7rem; padding-left: 3px; }
.lesson-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lesson-card { border: 1px solid #d7dfd3; border-radius: 16px; background: white; padding: 21px 17px; text-decoration: none; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.lesson-card.has-thumb { padding: 0 0 17px; overflow: hidden; }
.lesson-card.has-thumb > :not(.lesson-card-thumb) { padding-left: 17px; padding-right: 17px; }
.lesson-card.has-thumb > .eyebrow { margin-top: 15px; }
.lesson-card-thumb { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #eaf1e7; }
.lesson-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; display: block; }
.lesson-card:hover { border-color: var(--teal); background: #f6faf4; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(23, 103, 93, 0.08); }
.lesson-card:hover .lesson-card-thumb img { transform: scale(1.05); }
.lesson-illustration { margin: 0 0 24px; border-radius: 16px; overflow: hidden; background: #f8faf7; box-shadow: 0 4px 18px rgba(23, 103, 93, 0.08); border: 1px solid #e1ebe2; }
.lesson-illustration img { width: 100%; height: auto; max-height: 440px; object-fit: cover; display: block; }
.lesson-illustration figcaption { padding: 9px 16px; font-size: .83rem; color: var(--muted); background: #fdfefd; text-align: center; border-top: 1px solid #edf4eb; font-family: "Yu Gothic", "Meiryo", sans-serif; }
.home-note { border-top: 1px solid #d7dfd3; padding: 25px 0; font-size: .85rem; }
.home-note h2 { font-size: 1.2rem; }
.site-footer { max-width: 1120px; margin: 35px auto 0; padding: 25px; text-align: center; color: var(--muted); font-size: .75rem; border-top: 1px solid #d7dfd3; }
.lesson-view, .book-view, .guide-view { max-width: 900px; }
.breadcrumb, .lesson-nav { display: flex; flex-wrap: wrap; gap: 24px; padding: 10px 0 22px; font-size: .85rem; }
.lesson-nav { justify-content: space-between; margin-top: 30px; }
.lesson-page { background: white; border: 1px solid #d8e1d5; padding: 36px; border-radius: 20px; margin-bottom: 22px; }
.lesson-title { border-bottom: 3px solid var(--sun); padding-bottom: 15px; margin-bottom: 20px; }
.lesson-title h1 { margin: 5px 0; font-size: 1.9rem; }
.topic { color: var(--muted); font-size: .85rem; }
.lesson-tools { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
.lesson-body h2, .practice-page h2 { margin-top: 27px; color: var(--teal); }
.lesson-body h3 { font-size: .9rem; color: var(--muted); margin-top: 18px; }
.reading { font-family: "Segoe UI", Arial, sans-serif; font-size: 1.15rem; line-height: 1.85; letter-spacing: .01em; }
.sentence-status { flex-basis: 100%; margin: 0; color: var(--muted); }
.sentence[role="button"] { cursor: pointer; border-radius: 6px; padding: 1px 2px; margin: 0 -2px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (hover: hover) { .sentence[role="button"]:hover { background: var(--mint); } }
.sentence.is-playing, .sentence.is-playing:hover { background: #fff0c2; box-shadow: inset 0 -2px 0 var(--sun); }
table { width: 100%; border-collapse: collapse; margin: 15px 0 22px; font-size: .93rem; }
th, td { padding: 8px 13px; border-bottom: 1px solid #d7dfd3; text-align: left; }
th { background: #eaf1e7; }
td:first-child { font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; width: 34%; }
.lesson-body ul { padding-left: 23px; }
.lesson-body li { margin: 9px 0; }
.audio-controls { background: #edf4eb; padding: 17px; border-radius: 12px; margin: 18px 0; }
.audio-controls button { margin: 3px 5px 3px 0; font-size: .88rem; }
.audio-status { font-size: .83rem; color: var(--muted); }
fieldset { border: 1px solid #c5d6c7; border-radius: 12px; margin: 20px 0; padding: 16px; min-width: 0; }
legend { font-weight: bold; padding: 0 7px; }
.choice { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #c5d6c7; background: white; border-radius: 10px; padding: 10px 18px; margin: 3px 10px 3px 0; cursor: pointer; }
input[type="radio"] { width: 20px; height: 20px; accent-color: var(--teal); }
.word-bank { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 15px; background: #fff4d8; border-radius: 10px; }
.word-bank span { padding: 0 10px; font-weight: bold; }
.gap-question { margin: 18px 0; padding: 12px 15px; border: 1px solid #d8e1d5; border-radius: 10px; }
.gap-question label { display: block; }
.gap-question small { display: block; font-size: .8rem; color: var(--muted); }
.gap-question input { display: block; margin-top: 9px; width: 100%; max-width: 300px; border: 2px solid #8ba78f; border-radius: 8px; padding: 7px 12px; background: white; }
.feedback { margin: 5px 0 0; font-size: .85rem; }
.feedback:empty { display: none; }
[data-result="correct"] { border-color: #267253; background: #f1f8ee; }
[data-result="retry"], [data-result="empty"] { border-color: #b1751a; background: #fff9e8; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .88rem; }
.score { flex-basis: 100%; font-weight: bold; }
.try-it, .teacher-note { background: #f1f5ed; border-radius: 12px; padding: 18px; margin-top: 24px; }
.try-it h2, .teacher-note h3 { margin: 0 0 8px; font-size: 1.1rem; }
.answers summary { padding: 13px; background: #fff3d4; border-radius: 10px; cursor: pointer; font-weight: bold; }
.answer-content h3 { margin-top: 25px; color: var(--teal); }
.answer-content ol { padding-left: 25px; }
.answer-content li { padding-left: 5px; margin-bottom: 12px; }
.answer-content li p { margin: 2px 0; font-size: .95rem; }
.source { font-size: .8rem; }
.book-cover { padding-top: 50px; }
.book-cover h1 { margin: 20px 0; }
.cover-subtitle { color: var(--teal); font-size: 1.25rem; }
.guide-view { background: white; padding: 35px; border: 1px solid #d8e1d5; border-radius: 20px; }
.guide-view h2 { margin-top: 32px; color: var(--teal); }
.guide-view li { margin-bottom: 10px; }
.print-only { display: none; }
@media (max-width: 760px) {
  .site-header { padding: 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-header nav { gap: 18px; }
  main { padding: 0 16px; }
  .hero { padding: 27px; grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .intro-strip { grid-template-columns: 1fr; gap: 4px; padding: 20px 5px; }
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-page { padding: 22px; }
  .lesson-title h1 { font-size: 1.55rem; }
  .guide-view { padding: 24px; margin: 0 16px; }
  .lesson-card { padding: 17px 13px; }
}
@media (max-width: 390px) { .lesson-grid { grid-template-columns: 1fr; } .choice { display: flex; } .month-heading h2 { font-size: 1.08rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@page { size: A4; margin: 15mm; }
@media print {
  :root { background: white; font-size: 9.5pt; line-height: 1.65; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body { margin: 0; }
  main, .lesson-view, .book-view, .guide-view { max-width: none; padding: 0; border: 0; margin: 0; }
  .screen-only, .site-header, .site-footer, .skip-link, .hero-actions { display: none !important; }
  .print-only { display: block; }
  h1 { font-size: 23pt; } h2 { font-size: 13pt; } h3 { font-size: 11pt; }
  h1, h2, h3, legend { break-after: avoid; }
  p, li { orphans: 2; widows: 2; }
  a { color: inherit; }
  .lesson-page { border: 0; padding: 0; border-radius: 0; margin: 0; break-before: page; min-height: 0; }
  .lesson:first-of-type .learn-page { break-before: auto; }
  .book-view .lesson .learn-page { break-before: page; }
  .lesson-title { padding-bottom: 10px; margin-bottom: 10px; }
  .lesson-title h1 { font-size: 21pt; }
  .eyebrow { font-size: 8pt; }
  .topic { font-size: 9pt; }
  .lesson-body h2, .practice-page h2 { margin: 17px 0 8px; font-size: 13pt; }
  .lesson-body h3 { margin: 13px 0 5px; font-size: 10pt; }
  .reading { font-size: 11pt; line-height: 1.7; }
  .sentence, .sentence.is-playing { background: none !important; box-shadow: none !important; padding: 0; margin: 0; }
  .lesson-illustration { float: right; width: 36%; max-width: 165px; margin: 0 0 10px 14px; border: 1px solid #d8e1d5; border-radius: 8px; box-shadow: none; break-inside: avoid; }
  .lesson-illustration img { width: 100%; height: auto; max-height: 125px; object-fit: cover; }
  .lesson-illustration figcaption { font-size: 7pt; padding: 2px 4px; line-height: 1.3; }
  .lesson-body::after { content: ""; display: table; clear: both; }
  table { font-size: 9.5pt; margin: 8px 0 12px; clear: both; }
  th, td { padding: 5px 10px; }
  .lesson-body li { margin: 4px 0; }
  fieldset { break-inside: avoid; margin: 13px 0; padding: 8px 12px; }
  .choice { border: 0; padding: 3px 15px 3px 0; margin: 0 12px 0 0; }
  input[type="radio"] { appearance: none; border: 1px solid #445d52; width: 12px; height: 12px; border-radius: 50%; background: white; }
  .word-bank { padding: 8px; margin: 8px 0; }
  .gap-question { break-inside: avoid; margin: 10px 0; padding: 7px 12px; }
  .gap-question small { font-size: 8.5pt; }
  .try-it, .teacher-note { margin-top: 18px; padding: 12px 15px; break-inside: avoid; }
  .try-it h2, .teacher-note h3 { margin: 0 0 6px; font-size: 11pt; }
  .answers summary { display: none; }
  .answer-content h3 { margin: 18px 0 8px; font-size: 11pt; }
  .answer-content li { margin-bottom: 9px; }
  .answer-content li p { font-size: 9.5pt; }
  .source { font-size: 8pt; }
  .sheet-number { margin-top: 18px; padding-top: 7px; border-top: 1px solid #d8e1d5; color: #526966; font-size: 8pt; text-align: right; }
  .book-cover { padding: 25px 0; }
  .book-cover h2 { margin-top: 25px; }
  .hero { display: block; padding: 20px; border-radius: 15px; }
  .hero h1 { font-size: 24pt; }
  .hero-art { display: none; }
  .intro-strip { padding: 10px 0; gap: 10px; }
  .intro-strip strong { font-size: 9pt; }
  .intro-strip p { font-size: 8pt; }
  .month-section { margin: 20px 0; break-inside: avoid; }
  .month-heading { margin-bottom: 8px; }
  .month-heading h2 { font-size: 12pt; }
  .month-badge { font-size: 14pt; padding: 2px 8px; min-width: 45px; }
  .lesson-grid { gap: 8px; }
  .lesson-card { padding: 10px; border-radius: 8px; }
  .lesson-card h3 { font-size: 9pt; }
  .lesson-card p { font-size: 7.5pt; margin: 0; }
  .card-go { display: none; }
}
