:root {
  color-scheme: light;
  --ink: #20352f;
  --green: #24533f;
  --forest: #204736;
  --sub: #52645b;
  --line: #d7ded4;
  --paper: #f7f8f3;
  --card: #fff;
  --pale: #eef2e8;
  --honey: #f3c37a;
  --warn: #844028;
  --serif: "STIX Two Text",Georgia,"Songti SC","Noto Serif CJK SC",serif;
  --sans: "DM Sans",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
}

button,input,select {
  font: inherit;
}

button,a,input {
  touch-action: manipulation;
}

a {
  color: var(--green);
  text-underline-offset: 4px;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: default;
}

a,button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 3px solid #bd7d23;
  outline-offset: 3px;
}

#main:focus {
  outline: none;
}

.skip {
  position: fixed;
  top: -6rem;
  left: .75rem;
  z-index: 5;
  background: white;
  padding: .5rem 1rem;
}

.skip:focus {
  top: .75rem;
}

.mast {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.mast-inner,.wrap,.sitefoot {
  width: min(calc(100% - 5rem),1140px);
  margin: auto;
}

.mast-inner {
  display: flex;
  min-height: 74px;
  align-items: stretch;
  gap: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--forest);
  text-decoration: none;
  font: 700 1.6rem var(--serif);
  letter-spacing: .055em;
}

.brand img {
  border-radius: 11px;
  display: block;
}

.mast nav {
  display: flex;
  gap: 1.8rem;
}

.mast nav :is(a,button) {
  display: flex;
  align-items: center;
  position: relative;
  border: 0;
  background: transparent;
  color: var(--sub);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
  padding: .25rem .1rem;
}

.mast nav a[aria-current="page"] {
  color: var(--green);
}

.mast nav a[aria-current="page"]:after {
  position: absolute;
  content: "";
  height: 3px;
  background: var(--green);
  bottom: 0;
  left: 0;
  right: 0;
}

.pair {
  background: transparent;
  border: 0;
  padding: .4rem 0;
  margin-left: auto;
  align-self: center;
  display: flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font-size: .9rem;
  color: var(--sub);
}

.pair:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pair::after {
  content: "▾";
  margin-left: .35rem;
}

#language-list {
  position: fixed;
  inset: 3.8rem max(1rem, calc((100vw - 1140px) / 2)) auto auto;
  margin: 0;
  max-height: calc(100dvh - 4.5rem);
  overflow: auto;
  width: 10rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--card);
  box-shadow: 0 .4rem 1.4rem #20352f24;
}

#language-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .8rem;
  border-radius: .35rem;
  color: var(--green);
  text-decoration: none;
}

#language-list a:is(:hover, [aria-current]) {
  background: var(--pale);
}

#language-list [aria-current]::after {
  content: "✓";
  margin-left: auto;
}

.wrap {
  padding: 2.2rem 0 1.4rem;
  min-height: calc(100svh - 165px);
}

.heading,.section-head,.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.heading {
  margin-bottom: 1.15rem;
}

.heading h1 {
  font-size: clamp(1.5rem,2.2vw,1.85rem);
  letter-spacing: .025em;
  margin: 0;
}

.date {
  font-size: .9rem;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.ico {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -.23em;
  flex: none;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--forest);
  border-radius: 18px;
  color: #fff;
  min-height: 274px;
  display: flex;
  align-items: center;
}

.hero-copy {
  padding: 2.1rem 3rem;
  width: 65%;
  position: relative;
  z-index: 1;
}

.hero-k {
  color: #e1ebd9;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .07em;
}

.hero-k:before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--honey);
}

.hero h2 {
  font: 700 clamp(2.5rem,4.5vw,3.75rem)/1.28 var(--serif);
  letter-spacing: .045em;
  margin: .45rem 0 .45rem;
}

.hero p {
  margin: 0 0 1.45rem;
  color: #e4ece0;
  max-width: 34rem;
}

.hero-art {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 44%;
  height: 108%;
  object-fit: contain;
  pointer-events: none;
}

.primary,.secondary,.goldbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 9px;
  min-height: 46px;
  padding: .6rem 1.2rem;
  font-weight: 650;
  border: 1px solid transparent;
  text-decoration: none;
}

.primary {
  background: var(--green);
  color: white;
}

.primary:hover {
  background: #183e2d;
}

.goldbtn {
  background: var(--honey);
  color: #352d1c;
}

.goldbtn:hover {
  background: #ffcf8a;
}

.secondary {
  color: var(--green);
  background: white;
  border-color: #bac8b9;
}

.secondary:hover,.toggle:hover {
  background: var(--pale);
}

.textbtn {
  font: inherit;
  font-size: .9rem;
  border: none;
  background: none;
  color: var(--green);
  padding: .4rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0,1.48fr) minmax(0,1fr);
  gap: 1.35rem;
  margin: 1.4rem 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 1.5rem 1.7rem;
}

.section-head {
  margin: 0 0 1.1rem;
}

.section-head h2,.panel>h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.section-head h2 .ico {
  color: var(--green);
}

.section-head a {
  font-size: .85rem;
  font-weight: 550;
}

.field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field+.field {
  margin-top: 1.2rem;
}

.auto-play {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  min-height: 44px;
  margin-top: .85rem;
  cursor: pointer;
}

.auto-play input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--green);
}

.advance-setting {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: 1.2rem;
}

.advance-setting select,.typing-range select {
  min-height: 44px;
  border: 1px solid #cbd5c8;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: .35rem .6rem;
}

.field legend {
  font-size: .89rem;
  font-weight: 650;
  margin-bottom: .5rem;
  padding: 0;
  color: var(--sub);
}

.seg-row {
  display: flex;
  gap: .42rem;
  flex-wrap: wrap;
}

.toggle {
  border: 1px solid #cbd5c8;
  background: #fff;
  color: #364f3e;
  border-radius: 8px;
  min-height: 42px;
  font-size: .91rem;
  padding: .4rem .85rem;
  line-height: 1.35;
}

.toggle[aria-pressed="true"] {
  background: #e3edda;
  border-color: #628060;
  color: #203f2b;
  font-weight: 650;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.mode-row button {
  text-align: left;
  display: flex;
  gap: .55rem;
  align-items: center;
  min-height: 44px;
  padding: .55rem .8rem;
}

.choice-dot {
  margin-left: auto;
  border: 1px solid #9baa99;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
}

.toggle[aria-pressed=true] .choice-dot {
  border: 4px solid var(--green);
}

.subtle,.helper {
  color: var(--sub);
  font-size: .9rem;
  line-height: 1.6;
}

.helper {
  margin: .55rem 0 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin: 1.7rem 0 1.55rem;
}

.stat-grid>div {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.stat-grid>div:first-child {
  padding: 0;
  border: 0;
}

.stat-grid strong {
  font: 600 2.25rem/1.1 var(--serif);
  color: var(--forest);
  display: block;
}

.stat-grid span {
  color: var(--sub);
  font-size: .86rem;
}

.bar {
  background: #e8ece4;
  height: 8px;
  border-radius: 1rem;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #688a5c;
}

.meter-note {
  margin: .65rem 0 0;
  color: var(--sub);
  font-size: .86rem;
}

.local-note {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  color: var(--sub);
  font-size: .875rem;
  line-height: 1.65;
}

.local-note .ico {
  margin-top: .18rem;
}

.sitefoot {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 1.7rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--sub);
  font-size: .85rem;
}

.sitefoot span {
  font: 700 1rem var(--serif);
}

.sitefoot a {
  color: var(--sub);
}

#notice:not(:empty) {
  position: fixed;
  max-width: min(90vw,38rem);
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #263b31;
  color: white;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 3;
  font-size: .9rem;
}

.reading {
  max-width: 760px;
  margin: 0 auto;
}

.reading+.reading {
  margin-top: 1rem;
}

.reading p {
  margin: .65rem 0 0;
}

.reading h2 {
  margin-top: 1.4rem;
}

.reading h2:first-child {
  margin-top: 0;
}

.reading ol {
  padding-left: 1.35rem;
}

.reading code {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--green);
  background: var(--pale);
  padding: .1rem .3rem;
  border-radius: 4px;
}

.practice {
  max-width: 820px;
  margin: 0 auto;
}

.exercise-panel {
  padding: clamp(1.25rem,4vw,3rem);
  margin-top: .85rem;
}

.course-picker {
  max-width: 800px;
  padding-top: clamp(2rem, 7vh, 5rem);
}

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.course-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--forest);
  text-decoration: none;
}

.course-link:hover, .course-link:focus-visible {
  background: var(--pale);
  border-color: var(--green);
}

.course-link span {
  color: var(--sub);
  font: 1.1rem var(--serif);
}

.course-link strong {
  grid-column: 1;
  font-size: 1.35rem;
}

.course-link i {
  grid-column: 2;
  grid-row: 1 / 3;
  padding-left: .6rem;
  font: 1.55rem var(--sans);
}

.round-cheer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 24%);
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.5rem);
}

.round-saying {
  color: var(--forest);
  margin: 0;
  font: 700 clamp(1.7rem, 4.3vw, 2.75rem)/1.15 var(--serif);
  overflow-wrap: anywhere;
}

.round-translation {
  margin: .5rem 0 .15rem;
  font-size: 1.05rem;
}

.round-source {
  font-size: .85rem;
  color: var(--sub);
}

.round-illustration {
  display: block;
  width: 100%;
  height: auto;
}

.encouragement,.streak-cheer,.board-message {
  color: var(--green);
  font-weight: 650;
}
.stat-grid.round-stats {
  margin: .85rem 0 .35rem;
}
.stat-grid.round-stats strong {
  font-size: 1.55rem;
}
.round-summary {
  margin: .35rem 0 .85rem;
}
.daily-board {
  border-top: 1px solid var(--line);
  padding: .85rem 0;
}
#leaderboard-dialog {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  width: min(29rem,calc(100% - 2rem));
  max-height: 85vh;
  overscroll-behavior: contain;
}
#leaderboard-dialog::backdrop {
  background: rgb(32 53 47 / 40%);
}
#leaderboard-dialog form {
  float: right;
}
#leaderboard-dialog .daily-board {
  border: 0;
  padding: 0;
}
.daily-board h3 {
  color: var(--forest);
  font-size: 1.15rem;
  margin: 0;
}
.daily-board p {
  margin: .25rem 0;
}
.board-caption,.board-note {
  color: var(--sub);
  font-size: .84rem;
}
.board-table {
  width: 100%;
  border-collapse: collapse;
  margin: .55rem 0;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
}
.board-table th,.board-table td {
  padding: .2rem .55rem;
  text-align: left;
}
.board-table thead {
  color: var(--sub);
  border-bottom: 1px solid var(--line);
}
.board-table :is(th,td):last-child {
  text-align: right;
}
.board-me {
  background: var(--pale);
  color: var(--green);
  font-weight: 650;
}
.board-extra {
  border-top: 1px solid var(--line);
}
.result-dock {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: .65rem 0 calc(.4rem + env(safe-area-inset-bottom));
}
.result-dock .actions {
  display: grid;
  grid-template-columns: minmax(0, max-content) max-content;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, max-content);
  justify-content: start;
  margin: 0;
  gap: .5rem;
}
.round-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
}
.round-share {
  white-space: nowrap;
}
.result-dock .helper {
  margin: 0;
  font-size: .8rem;
}

.share-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .75rem;
  color: var(--sub);
  font-size: .9rem;
}

.share-feedback a {
  padding: .5rem 0;
  font-weight: 650;
}

.exercise-meta {
  display: flex;
  align-items: center;
  gap: 0 .65rem;
  flex-wrap: wrap;
}

.exercise-step {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin-left: auto;
  gap: .75rem;
  white-space: nowrap;
}

.practice-advance {
  margin: 0;
  gap: .3rem;
  color: var(--sub);
  font-size: .875rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--pale);
  color: var(--green);
  padding: .25rem .65rem;
  border-radius: 6px;
  font-size: .88rem;
}

.sentence,.sentence-with-speech {
  margin: 1.65rem 0 .7rem;
}

.sentence {
  font: 600 clamp(1.9rem,4.4vw,3rem)/1.48 var(--serif);
  overflow-wrap: anywhere;
}

.sentence-with-speech {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sentence-with-speech .sentence {
  min-width: 0;
  margin: 0;
}

.sentence-speech {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  background: var(--paper);
}

.sentence-speech:hover {
  background: var(--pale);
}

.blank {
  display: inline-block;
  vertical-align: baseline;
  min-width: 3em;
  border-bottom: 3px solid #a97c32;
  line-height: .95;
  color: transparent;
  background: #f7edd4;
  border-radius: .12em;
}

.partial-word {
  white-space: nowrap;
}

.answer {
  background: #e2efd9;
  color: #234d32;
  border-radius: .12em;
  padding: 0 .08em;
}

.answer.miss {
  background: #feead5;
  color: #7e4129;
}

.translation {
  font-size: 1.12rem;
  color: var(--sub);
  margin: .45rem 0 1.4rem;
}

.control-area {
  border-top: 1px solid var(--line);
  padding-top: 1.05rem;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.mode-switch .toggle {
  min-height: 40px;
}

.answer-modes,.typing-range {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.answer-modes {
  gap: .6rem;
  flex-wrap: wrap;
}

.typing-range {
  font-size: .875rem;
}

.field .typing-range {
  margin-top: .5rem;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin: 1rem 0;
}

.option {
  display: flex;
  align-items: center;
  border: 1px solid #c3cfc0;
  background: white;
  border-radius: 9px;
  padding: .7rem .9rem;
  gap: .7rem;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-align: left;
  min-height: 49px;
  font-weight: 550;
}

.option:hover:enabled {
  border-color: var(--green);
  background: var(--pale);
}

.option:disabled {
  opacity: 1;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: .1rem .7rem;
  align-content: center;
}

.option small {
  grid-column: 2;
  font-size: .76rem;
}

.option.is-correct {
  color: var(--green);
  border-color: #628060;
  background: #edf3e8;
}

.option.is-wrong {
  color: var(--warn);
  border-color: #b57d5d;
  background: #fff0de;
}

.option b {
  font: 600 .81rem/1.55 var(--sans);
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 1.55rem;
  text-align: center;
  color: var(--sub);
  background: white;
  flex: none;
}

.entry {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid #9eaf9e;
  border-radius: 8px;
  margin: .35rem 0 .3rem;
  min-height: 48px;
}

.entry-label {
  display: block;
  margin-top: 1rem;
  font-size: .9rem;
  font-weight: 650;
}

.typing-assist {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: .5rem 0;
}

.typing-assist button {
  min-width: 44px;
  min-height: 44px;
  padding: .25rem .6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  font-size: 1.125rem;
}

.typing-assist button:hover,.typing-assist button[aria-pressed="true"] {
  background: var(--pale);
  border-color: var(--green);
}

.submit-row {
  margin-top: 1rem;
}

.history-trigger {
  min-height: 44px;
  margin-top: .5rem;
}

.sentence-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.sentence-share button {
  min-height: 44px;
}

#sentence-history {
  width: min(38rem, calc(100% - 2rem));
  max-height: 85dvh;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  background: var(--card);
  color: var(--ink);
}

#sentence-history::backdrop {
  background: rgb(24 44 35 / .42);
}

#sentence-history h2 {
  margin: 0;
}

.review-sentence {
  margin: .6rem 0;
  font: 600 1.65rem/1.5 var(--serif);
}

.review-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.review-controls button {
  min-height: 44px;
}

.feedback {
  border-radius: 10px;
  padding: 1rem 1.15rem;
  background: #edf3e8;
}

.feedback.miss {
  background: #fff0de;
}

.feedback h2 {
  font-size: 1.1rem;
  margin: 0 0 .2rem;
}

.feedback p {
  margin: .2rem 0;
}

.next-dock {
  position: fixed;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .6rem max(1rem,env(safe-area-inset-right)) calc(.8rem + env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));
  background: var(--card);
  border-top: 1px solid var(--line);
}

.next-dock .helper {
  margin: 0;
}

.next-dock button {
  flex: 0 1 12rem;
}

body:has(.next-dock) {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

body:has(.next-dock) #notice {
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.source {
  margin: 1rem 0;
  color: var(--sub);
  font-size: .875rem;
}

.source a {
  overflow-wrap: anywhere;
}

.source span {
  display: inline-block;
  margin-right: .8rem;
}

.history-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: .6rem 0;
  font-size: .95rem;
}

.range-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.progress-note {
  margin: 1rem 0 1.4rem;
}

.actions {
  display: flex;
  gap: .65rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

#main h1:focus,.sentence:focus,.feedback:focus {
  outline: none;
}

@media(max-width:850px) {
  .mast-inner,.wrap,.sitefoot {
    width: min(calc(100% - 3rem),1140px);
  }
  .mast-inner {
    gap: 1.7rem;
  }
  .hero-copy {
    padding: 1.8rem 2rem;
  }
  .panel {
    padding: 1.35rem;
  }
  .home-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 1rem;
  }
  .stat-grid>div {
    padding-left: .6rem;
  }
}

@media(max-width:660px) {
  .mast-inner,.wrap,.sitefoot {
    width: calc(100% - 2rem);
  }
  .mast-inner {
    min-height: 62px;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1rem;
  }
  .brand {
    font-size: 1.33rem;
    gap: .45rem;
    white-space: nowrap;
  }
  .brand img {
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }
  .mast nav {
    order: 1;
    width: 100%;
    justify-content: space-between;
  }
  .mast nav :is(a,button) {
    font-size: .9rem;
    min-height: 46px;
  }
  .wrap {
    padding-top: 1.3rem;
  }
  .heading {
    margin-bottom: .8rem;
  }
  .heading h1 {
    font-size: 1.48rem;
  }
  .date {
    font-size: .8rem;
  }
  .hero {
    min-height: 235px;
    border-radius: 14px;
  }
  .hero-copy {
    padding: 1.45rem;
    width: 72%;
  }
  .hero h2 {
    font-size: clamp(1.8rem,7.9vw,2.8rem);
    white-space: nowrap;
  }
  .hero p {
    font-size: .91rem;
    margin-bottom: 1.05rem;
  }
  .hero-art {
    width: 40%;
    height: 80%;
    right: -4%;
    top: 54%;
  }
  .hero-k {
    font-size: .8rem;
  }
  .home-grid,.history-list {
    grid-template-columns: 1fr;
  }
  .home-grid {
    margin: 1rem 0;
  }
  .panel {
    padding: 1.15rem;
  }
  .stat-grid {
    margin: 1.1rem 0;
  }
  .toggle {
    min-height: 44px;
  }
  .stat-grid strong {
    font-size: 1.9rem;
  }
  .sitefoot {
    padding-bottom: max(1rem,env(safe-area-inset-bottom));
  }
  .exercise-panel {
    margin-top: .6rem;
  }
  .options {
    gap: .5rem;
  }
  .mode-row {
    gap: .45rem;
  }
  .heading .textbtn {
    font-size: .85rem;
  }
}

@media (min-width:375px) and (max-width:660px) {
  .mast-inner:has(.pair) {
    gap: .65rem;
    flex-wrap: nowrap;
  }
  .mast-inner:has(.pair) .brand span {
    display: none;
  }
  .mast nav {
    order: 0;
    width: auto;
    flex: 1;
    gap: .35rem;
  }
}

@media(max-width:390px) {
  .result-dock .actions button {
    padding-inline: .45rem;
    gap: .25rem;
  }
  .result-dock .actions:has([data-action="next-group"]) button {
    font-size: .9rem;
  }
  .result-dock [data-action="replay"] .ico {
    display: none;
  }
  .mast nav {
    gap: .65rem;
  }
  .hero-copy {
    padding: 1.12rem;
    width: 77%;
  }
  .hero-art {
    width: 35%;
    right: -5%;
  }
  .hero {
    min-height: 216px;
  }
  .seg-row {
    gap: .3rem;
  }
  .toggle {
    padding: .4rem .6rem;
  }
  .mode-row .ico {
    display: none;
  }
  .section-head {
    gap: .3rem;
  }
}

@media(max-width:319px) {
  .result-dock .actions {
    grid-auto-flow: row;
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition: background-color .12s,border-color .12s;
  }
}

.hero-alt {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: .25rem;
  padding: .25rem 0;
  text-align: start;
  border: none;
  color: #edf4e9;
  background: none;
  text-underline-offset: 4px;
  text-decoration: underline;
  min-height: 44px;
}

.hero-alt .review-count {
  white-space: nowrap;
}

@media(max-width:660px) {
  .hero-copy:has(.hero-alt) {
    width: 100%;
  }
  .hero-copy:has(.hero-alt) > p {
    max-width: 68%;
  }
  .hero:has(.hero-alt) .hero-art {
    top: 0;
    height: 72%;
    transform: none;
  }
}

.word-speech {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
}
.word-speech:hover,.word-speech:focus-visible { text-decoration: underline dotted; }
.word-speech[aria-describedby="word-gloss"] {
  text-decoration: underline;
  text-underline-offset: .14em;
}
.exercise-panel,.review-content { position: relative; }
#word-gloss {
  position: absolute;
  z-index: 1;
  width: max-content;
  max-width: min(17rem, 100%);
  padding: .4rem .7rem;
  border-radius: .5rem;
  color: white;
  background: var(--forest);
  box-shadow: 0 2px 8px #152f2326;
  font: 500 .94rem/1.45 var(--sans);
  overflow-wrap: anywhere;
  pointer-events: none;
}
.word-speech-status:empty { display: none; }
.sentence-analysis { margin: 1rem 0; overflow-wrap: anywhere; }
.sentence-analysis h3,.sentence-analysis p { margin: .45rem 0; }
.sentence-analysis summary { cursor: pointer; color: var(--green); }
.sentence-analysis dl { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.sentence-analysis dt { font-weight: 650; }
.sentence-analysis dd { margin: 0; }
.progress-account { margin-top: 1rem; }
.progress-account input:not([type="checkbox"]) { max-width: 100%; padding: .4rem; }
.progress-account form { margin: .6rem 0; }
