:root {
  color-scheme: light;
  --bg: #f8f5e9;
  --paper: #fffdf6;
  --ink: #204c3d;
  --text: #31463c;
  --muted: #52635a;
  --leaf: #e7edda;
  --line: #dcded0;
  --orange: #fac88b;
  --shadow: 0 5px 0 #e8e2d0;
  --font: "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
input, button { font: inherit; }
button { cursor: pointer; }
a { color: var(--ink); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); }
ul, ol { padding: 0; }
fieldset { padding: 0; margin: 0; min-width: 0; border: 0; }
ruby { ruby-align: center; ruby-position: over; }
rt { font-size: .42em; font-weight: 600; letter-spacing: 0; line-height: 1; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9a521e; outline-offset: 4px; }
input[type="text"] { width: 100%; border: 1px solid #aebaaa; background: #fffdf7; border-radius: 12px; min-height: 51px; padding: 10px 14px; color: var(--ink); }
input::placeholder { color: #58655c; opacity: 1; }
.shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: #fffdf4; border-bottom: 1px solid #e5e4d6; }
.site-header-inner, .top-nav { display: flex; align-items: center; }
.site-header-inner { justify-content: space-between; gap: 16px; min-height: 72px; }
.top-nav { gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; line-height: 1.27; font-weight: 800; }
.brand img { flex: none; background: #f8efd3; border-radius: 14px; padding: 3px; }
.brand small { display: block; font-size: .72rem; font-weight: 650; color: var(--muted); margin-top: 2px; }
.text-link { text-decoration: none; font-size: .91rem; font-weight: 750; }
.text-link:hover, .brand:hover { color: #855023; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 4; padding: 10px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  border: 1px solid var(--ink); border-radius: 13px; min-height: 49px; padding: 10px 20px;
  background: var(--ink); color: #fffdf3; text-decoration: none; font-weight: 800; line-height: 1.25;
  box-shadow: 0 3px 0 #12382b; transition: background .16s ease, translate .16s ease;
}
.button:hover { background: #2e6551; }
.button:active:not(:disabled) { translate: 0 2px; }
.button-small { min-height: 39px; font-size: .86rem; padding: 7px 13px; border-radius: 10px; }
.button-outline { color: var(--ink); background: #fffdf7; border-color: #b9c5b4; box-shadow: 0 3px 0 #dedfce; }
.button-outline:hover { background: #edf2e4; }
.button:disabled { color: #56645b; background: #ebebe1; border-color: #d8dbd0; box-shadow: none; cursor: default; }
.tri-line { display: block; overflow-wrap: anywhere; }
.tri-ja { font-size: 1em; font-weight: 750; }
.tri-id, .tri-th { font-size: .77em; color: var(--muted); font-weight: 500; line-height: 1.55; }
.tri-th { font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, var(--font); }
.button:not(.button-outline) .tri-id, .button:not(.button-outline) .tri-th { color: #e8f1e3; }
.lesson-tag { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink); font-size: .86rem; font-weight: 800; }
.lesson-tag span { padding: 4px 0; }
.lesson-tag b { border-radius: 999px; background: #e5ebd7; padding: 5px 11px; letter-spacing: .025em; }
.home-main { padding-top: 18px; }
.hero { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; min-height: 435px; padding: 12px 0 16px 16px; }
.hero-copy { padding-block: 28px; }
.hero-title { padding-top: 15px; font-size: clamp(2.4rem, 4.42vw, 4.35rem); line-height: 1.15; letter-spacing: -.062em; }
.hero-title .tri-ja { white-space: pre-line; font-weight: 900; }
.hero-title .tri-id, .hero-title .tri-th { letter-spacing: normal; line-height: 1.45; }
.hero-title .tri-id { font-size: clamp(.95rem, 1.55vw, 1.26rem); margin-top: 17px; }
.hero-title .tri-th { font-size: clamp(.93rem, 1.46vw, 1.18rem); margin-top: 3px; }
.hero-art { width: 100%; height: auto; }
.goal-band {
  display: grid; grid-template-columns: auto minmax(145px, 200px) 1fr; align-items: center;
  gap: 17px; background: #e6edda; padding: 19px 28px; border: 1px solid #d3dec7; border-radius: 19px;
}
.goal-icon { display: grid; place-items: center; width: 59px; height: 59px; border-radius: 50%; background: #f6f6e6; }
.compact-title { font-size: 1.29rem; line-height: 1.32; }
.goal-copy { font-size: 1.06rem; }
.goal-copy .tri-ja { color: var(--ink); }
.section { margin-top: 57px; scroll-margin-top: 20px; }
.section-title { font-size: clamp(1.65rem, 2.55vw, 2.13rem); line-height: 1.25; }
.section-title .tri-ja { font-weight: 850; }
.section-title .tri-id, .section-title .tri-th { font-size: .46em; }
.section-title .tri-id { margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; list-style: none; margin-top: 17px; }
.step-card { background: var(--paper); padding: 13px 14px 16px; border: 1px solid #e3decc; border-radius: 16px; box-shadow: var(--shadow); }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 68px; margin-bottom: 5px; }
.step-top span { display: grid; place-items: center; align-self: flex-start; width: 27px; height: 27px; border-radius: 8px; background: #e9eddc; color: var(--ink); font-size: .84rem; font-weight: 800; }
.step-top img { width: 62px; height: 62px; margin-right: 4px; }
.step-card .tri-ja { margin-block: 5px; font-size: .98rem; color: var(--ink); }
.study-grid { display: grid; grid-template-columns: 1.42fr 1fr; gap: 22px; }
.study-words, .study-phrases { padding: 24px; border: 1px solid #e2dfd0; border-radius: 20px; background: var(--paper); min-width: 0; }
.study-phrases { background: #f3edde; }
.words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; margin-top: 17px; }
.word { padding: 9px 8px 10px; border-radius: 11px; background: #eff2e5; min-width: 0; }
.word img { width: 38px; height: 38px; margin-bottom: 5px; }
.word .tri-ja { color: var(--ink); font-size: 1rem; }
.phrases { list-style: none; display: grid; gap: 9px; margin-top: 17px; }
.phrases li { background: #fffbef; border: 1px solid #e9dfca; padding: 10px 12px; border-radius: 0 12px 12px; }
.phrases .tri-ja { color: var(--ink); }
.setup { background: #e7edda; border: 1px solid #d2dfc7; border-radius: 22px; padding: 28px 32px; }
.setup-fields { display: grid; grid-template-columns: 1fr 1.3fr; gap: 27px; margin-block: 22px; }
.field-label { display: block; margin-bottom: 8px; color: var(--ink); }
.field-hint { margin-top: 6px; font-size: .82rem; }
.set-options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: flex; min-width: 0; }
.choice input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.choice-label { flex: 1; cursor: pointer; padding: 8px 10px; border: 1px solid #bdcbb6; border-radius: 11px; background: #fffdf4; line-height: 1.25; color: var(--ink); }
.choice input:checked + .choice-label { border-color: var(--ink); background: #d6e5cd; box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:focus-visible + .choice-label { outline: 3px solid #9a521e; outline-offset: 3px; }
.set-options .choice-label { text-align: center; min-width: 67px; }
.start-button { text-align: left; min-height: 66px; min-width: min(100%, 235px); justify-content: space-between; }
.start-button .arrow { font-size: 1.45rem; }
.teacher-entry { border-top: 1px solid #cbd7bf; margin-top: 23px; padding-top: 19px; }
.site-footer { border-top: 1px solid #e0e0d1; margin-top: 55px; padding: 22px 0 27px; font-size: .83rem; color: var(--muted); background: #f5f1e4; }
.site-footer .shell { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; }
.site-footer a { font-weight: 750; text-underline-offset: .18em; }
@media (max-width: 920px) {
  .shell { width: calc(100% - 40px); }
  .hero { min-height: 0; padding-left: 6px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .study-grid { grid-template-columns: 1fr; gap: 0; }
  .study-grid .section + .section { margin-top: 20px; }
}
@media (max-width: 625px) {
  .shell { width: calc(100% - 28px); }
  .site-header-inner { min-height: 60px; gap: 8px; }
  .brand { font-size: .83rem; gap: 6px; }
  .brand img { width: 36px; height: 36px; border-radius: 11px; }
  .brand small { font-size: .65rem; }
  .desktop-link { display: none; }
  .top-nav { gap: 7px; }
  .button-small { min-height: 41px; }
  .home-main { padding-top: 3px; }
  .hero { grid-template-columns: 1fr; padding: 0 4px 12px; }
  .hero-copy { padding: 20px 6px 0; }
  .hero-title { padding-top: 10px; font-size: clamp(2.12rem, 9vw, 3.1rem); }
  .hero-title .tri-id { margin-top: 10px; }
  .hero-art { width: min(100%, 430px); margin-inline: auto; }
  .goal-band { grid-template-columns: auto 1fr; padding: 13px 14px; gap: 10px; }
  .goal-icon { width: 45px; height: 45px; }
  .goal-icon img { width: 34px; height: 34px; }
  .goal-copy { grid-column: 1 / -1; font-size: .97rem; }
  .section { margin-top: 38px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .step-top { height: 50px; }
  .step-top img { width: 48px; height: 48px; }
  .study-words, .study-phrases { padding: 15px; }
  .words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup { padding: 17px; }
  .setup-fields { grid-template-columns: 1fr; gap: 15px; }
  .set-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .set-options .choice-label { min-width: 0; min-height: 47px; padding: 6px 2px; font-size: .81rem; }
  .site-footer { margin-top: 39px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
