:root {
  color-scheme: light;
  --paper: #f8f5eb;
  --white: #fffdf7;
  --ink: #182d27;
  --green: #234a3d;
  --deep: #18382f;
  --line: #d4d6c6;
  --muted: #465b51;
  --gold: #e5bb67;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.8 "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #aa6c22; outline-offset: 4px; }
[lang=en] { font-family: Georgia, "Times New Roman", serif; }
h1, h2, h3, p, section { margin-block-start: 0; }
h1, h2 { line-height: 1.35; }
h2 { font-size: clamp(1.32rem, 2.7vw, 1.8rem); }
h3 { margin-top: 2rem; }
section { margin-block-end: 2.3rem; }
.wrap { max-width: 1220px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.bar, .foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 15px; }
nav { display: flex; flex-wrap: wrap; gap: 7px 18px; }
nav a { font-size: .94rem; }
.bar nav a { text-decoration: none; }
.bar nav a:hover, .bar nav [aria-current] { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand span { display: grid; place-items: center; width: 32px; height: 35px; background: var(--green); color: var(--white); font: bold 1.45rem Georgia,serif; border-radius: 4px; }
.skip { position: absolute; left: -100vw; }
.skip:focus { left: 1rem; background: white; z-index: 9; }
.hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--deep); color: var(--white); border-radius: 9px; overflow: hidden; margin-block: 28px 36px; }
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.hero-text { padding: clamp(25px, 5vw, 64px); }
.hero h1, .heading h1 { font-family: "Hiragino Mincho ProN","Yu Mincho",serif; font-size: clamp(2.45rem, 5.4vw, 4.6rem); margin-bottom: 17px; }
.hero h1 span { color: var(--gold); }
.hero p { color: #f2e8d5; margin-bottom: 22px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
button, .button, .secondary { font: inherit; font-weight: 700; border: 1px solid var(--green); border-radius: 4px; background: var(--green); color: white; padding: 7px 15px; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(1.11); }
.hero .button { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.secondary { color: var(--white); background: none; border-color: #8c9e8d; }
.quiet { background: var(--white); color: var(--green); }
.quiet[aria-pressed=true] { background: #e2ebdc; }
.tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.tile, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: clamp(14px, 2.3vw, 25px); }
.tile { display: grid; gap: 4px; border-top: 3px solid var(--green); text-decoration: none; }
.tile:hover { background: #eaf0e1; }
.tile strong { font-size: 1.18rem; }
.tile span, .counter { color: var(--muted); }
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.grade-links { display: flex; gap: 12px; }
.grade-links a { padding: 6px 14px; background: #eaf0e1; border-radius: 4px; }
.inner { max-width: 925px; }
.heading { margin-block: 32px 28px; border-bottom: 2px solid var(--green); }
.heading h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.jump { padding: 12px 0; }
.inner h2 { margin-top: 1.7rem; }
.stages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.stages div, .passage { background: #eaf0e1; padding: 14px 18px; border-radius: 5px; }
.stages span { display: block; }
.passage { border-left: 4px solid var(--green); }
.passage p:last-child { margin-bottom: 0; }
.question { margin-block: 12px 18px; scroll-margin-top: 1rem; }
fieldset { border: 0; margin: 0 0 10px; min-width: 0; padding: 0; }
legend { font-weight: 700; padding: 0; }
label { cursor: pointer; }
fieldset label { display: block; padding: 6px 4px; }
fieldset label:hover { background: #eef1e5; }
input { accent-color: var(--green); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin-block: 10px 0; }
.feedback:empty { display: none; }
.feedback { margin-block: 10px 0; font-weight: 700; }
audio { margin-block: 12px 0; width: min(100%, 460px); }
.draft { display: block; font-weight: 700; margin-top: 1rem; }
textarea { display: block; width: 100%; font: inherit; min-height: 7rem; padding: .8rem; border: 1px solid #879b8d; border-radius: 5px; background: var(--white); color: var(--ink); }
.counter { margin-top: .5rem; }
.save-status { padding-left: .75rem; }
.topics { margin: 0; padding-inline-start: 1.5rem; }
.timer output { display: block; font-variant-numeric: tabular-nums; font-size: 2.5rem; }
.timer p { margin-block: 10px 0; }
footer { border-top: 1px solid var(--line); margin-top: 46px; background: var(--white); }
#review-list { padding-inline-start: 2.6rem; }
@media (max-width: 860px) { .bar { align-items: flex-start; flex-direction: column; gap: 8px; } }
@media (max-width: 640px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero img { max-height: 220px; }
  .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stages { grid-template-columns: 1fr; }
  .foot { flex-wrap: wrap; }
}
