@import url("./fonts/kana-font.css");

:root {
  color-scheme: light;
  --sky: #b7e3fb;
  --air: #abe0fd;
  --horizon: #b7cafa;
  --dusk: #e4c3ea;
  --sky-gradient: linear-gradient(180deg, var(--sky) 0%, var(--air) 33%, var(--horizon) 67%, var(--dusk) 100%);
  --ink: #15273f;
  --muted: #4c6078;
  --blue: #315d87;
  --blue-deep: #203e61;
  --line: #d2e0ec;
  --paper: #fff;
  --red: #ab4055;
  --curve: cubic-bezier(.22,.77,.24,1);
  --spring: cubic-bezier(.2,.88,.3,1.22);
  --kana: "Kana Notebook JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans CJK JP", sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink); background: #edf5fb;
}
* { box-sizing: border-box; }
[lang="ja"], .chart-paper th[lang="ja"] { font-family: var(--kana); font-weight: 400; font-synthesis: none; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(110deg,#ffffffaa,#ffffff72), var(--sky-gradient);
}
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button, a, label, input, select { -webkit-tap-highlight-color: transparent; }
button { transition: transform .28s var(--spring), background-color .18s, box-shadow .22s, color .18s, border-color .18s; }
button:not(:disabled):active { transform: scale(.955); transition-duration: .085s; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #6389fb; outline-offset: 3px;
}
button:disabled { cursor: default; }
h1, h2, p { margin: 0; }
h1:focus { outline: 0; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.5rem); line-height: 1.16; letter-spacing: -.045em; }
h2 { font-size: 1.16rem; line-height: 1.4; }
.masthead { border-bottom: 1px solid #d1e3f1; background: #f5fbfff0; }
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .masthead { background: #f5fbffb8; backdrop-filter: saturate(120%) blur(16px); -webkit-backdrop-filter: saturate(120%) blur(16px); }
}
.mast-inner, .wrap, footer { width: min(100% - 64px, 1000px); margin-inline: auto; }
.mast-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #202945; font-size: 1.23rem; font-weight: 740; letter-spacing: -.035em; white-space: nowrap; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; padding-bottom: 2px; border-radius: 12px;
  background: linear-gradient(150deg,var(--sky),var(--horizon) 69%,var(--dusk)); color: var(--ink);
  box-shadow: inset 0 1px 1px #fff9, 0 3px 9px #607ca237; font: 400 1.7rem/1 var(--kana);
}
.main-nav, .segmented { display: grid; position: relative; isolation: isolate; padding: 4px; background: #e5edf5; border-radius: 13px; }
.main-nav { grid-template-columns: repeat(2, 79px); --selected: 0; }
body[data-view="chart"] .main-nav { --selected: 1; }
body[data-view="quiz"] .main-nav { visibility: hidden; }
.main-nav::before, .segmented::before {
  content: ""; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--segments, 2)); border-radius: 10px;
  background: white; box-shadow: 0 2px 5px #24365b23, 0 0 0 1px #15223d04;
  transform: translateX(calc(var(--selected, 0) * 100%)); transition: transform .32s var(--spring);
}
.main-nav button, .segmented button, .segmented label > span {
  display: grid; place-items: center; min-height: 34px; min-width: 0; padding: 5px 8px; border: 0; background: transparent;
  border-radius: 10px; color: var(--muted); font-size: .93rem; font-weight: 550;
}
.main-nav [aria-current="page"], .segmented :checked + span, .segmented [aria-pressed="true"] { color: var(--blue-deep); font-weight: 730; }
.main-nav button { white-space: nowrap; }
.wrap { flex: 1 0 auto; }
main > section:not([hidden]) { animation: appear .24s var(--curve); }
.home-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin: 27px 0 20px; min-height: 186px; padding: 23px clamp(23px,4vw,45px); border-radius: 25px; color: var(--ink);
  background: linear-gradient(105deg,#ffffff36,transparent 54%), var(--sky-gradient);
  border: 1px solid #f1f7ffb0; box-shadow: inset 0 1px 0 #ffffff85, 0 9px 26px -17px #607d9d74;
}
.home-hero::before { content: ""; z-index: -1; pointer-events: none; position: absolute; inset: 0 0 0 28%; background: radial-gradient(ellipse 26% 29% at 51% 91%,#fff5eccc 0%,#ffffff68 47%,transparent 78%),radial-gradient(ellipse 22% 30% at 67% 77%,#fff7efc4 0%,#ffffff65 40%,transparent 78%),radial-gradient(ellipse 36% 42% at 86% 83%,#fff9f5c2 0%,#ffffff56 48%,transparent 83%); }
.home-hero::after { content: ""; z-index: -1; pointer-events: none; position: absolute; border-radius: 50%; border: 1px solid #fff9; outline: 1px solid #ffffff42; outline-offset: 13px; width: 53%; height: 190%; right: -28%; bottom: 55%; transform: rotate(-18deg); }
.hero-copy { min-width: 0; position: relative; }
#hero-context { color: #37546f; font-size: .9rem; font-weight: 620; letter-spacing: .045em; margin-bottom: 5px; line-height: 1.45; }
.hero-copy h1 { color: #12263f; font-size: clamp(2rem,4.9vw,3.13rem); font-weight: 740; line-height: 1.14; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 17px; }
#sample-setting { color: #314b68; font-size: .88rem; font-variant-numeric: tabular-nums; }
.sample-play, .listen { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 650; border-radius: 99px; }
.sample-play { min-height: 40px; padding: 6px 14px; border: 1px solid #ffffffef; color: #213e5d; background: #ffffffdf; box-shadow: 0 3px 10px #42618024; font-size: .91rem; }
.sample-play:hover { background: white; box-shadow: 0 4px 13px #141d5d38; }
.wave { display: inline-flex; align-items: center; gap: 2px; height: 15px; }
.wave i { display: block; width: 2.3px; height: 6px; background: currentColor; border-radius: 2px; }
.wave i:nth-child(2) { height: 14px; }.wave i:nth-child(3) { height: 10px; }.wave i:nth-child(4) { height: 7px; }
.speaking .sample-play .wave i, .speaking .listen .wave i { animation: waveform .53s ease-in-out infinite alternate; }
.speaking .wave i:nth-child(2) { animation-delay: -.31s; }.speaking .wave i:nth-child(3) { animation-delay: -.16s; }
.card-stack { flex: 0 0 clamp(160px,26%,235px); position: relative; height: 147px; margin-right: 4%; }
.flashcard {
  --rule: #486fbd2b; position: absolute; border: 1px solid #ffffffd6; border-radius: 15px;
  background: #f6f7ff; width: 110px; height: 132px; box-shadow: 0 11px 18px -5px #242b6660; display: grid; place-items: center;
}
.card-front {
  inset: 6px auto auto 10%; transform: rotate(-9deg); padding: 11px 8px 7px; grid-template-rows: 1fr 20px;
  background: linear-gradient(165deg,#fff 5%,#f4f9ff 75%,#e6effa); color: #304b71; transition: transform .42s var(--spring);
}
.card-back { width: 103px; height: 121px; left: 46%; top: 13px; transform: rotate(14deg); background: linear-gradient(145deg,#eff8ff,#c5d9f7); color: #465c80; }
.card-back b { font: 400 3.8rem/1 var(--kana); }.card-back b.compound { font-size: 2.5rem; }
.card-front b { display: grid; place-items: center; width: 86%; height: 93%; border: 1px solid var(--rule); font: 400 3.7rem/1 var(--kana); background: linear-gradient(90deg,transparent calc(50% - .5px),var(--rule) 50%,transparent calc(50% + .5px)), linear-gradient(transparent calc(50% - .5px),var(--rule) 50%,transparent calc(50% + .5px)); }
.card-front b.compound { font-size: 2.55rem; }.card-front i { font: italic 1rem/1 Georgia,serif; }
.speaking .card-front { transform: translateY(-3px) rotate(-5deg); }
.page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 19px; }
.text-button { border: 0; padding: 7px 0; background: transparent; font-weight: 650; color: var(--blue); font-size: .9rem; }
.text-button:disabled { color: var(--muted); }.text-button:hover:not(:disabled), footer a:hover { text-decoration: underline; text-underline-offset: .18em; }
.heading-note, .small-note, .pool-count, .custom-wrap small, .chart-note { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.setup-layout { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(265px, 1fr); gap: 19px; align-items: start; }
.paper {
  background: #fffffff2; border: 1px solid #f7fbff; border-radius: 22px;
  box-shadow: 0 1px 2px #24326906, 0 9px 25px -19px #293d744a;
}
.settings-card { padding: clamp(20px,3vw,30px); }
fieldset { padding: 0; margin: 0; border: 0; min-inline-size: 0; }
legend { padding: 0; margin-bottom: 13px; font-weight: 700; font-size: 1.04rem; }
.field-block { position: relative; margin-top: 24px; }
.field-action, .pool-count { position: absolute; top: -37px; right: 0; }.pool-count { top: -34px; font-variant-numeric: tabular-nums; }
.script-options, .quantity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.script-options { gap: 9px; }.quantity { --segments: 3; --selected: 1; }.quantity label > span { min-height: 36px; }
.script-options label, .scope-options label, .segmented label { position: relative; cursor: pointer; }
.script-options input, .scope-options input, .segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.script-options input:focus-visible + span, .scope-options input:focus-visible + span, .segmented input:focus-visible + span { outline: 3px solid #6389fb; outline-offset: 2px; }
.script-choice, .scope-choice { transition: transform .29s var(--spring), background-color .19s, border-color .19s, box-shadow .19s; }
.script-options label:active .script-choice, .scope-options label:active .scope-choice { transform: scale(.95); transition-duration: .085s; }
.script-choice { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 13px 4px 11px; border: 1px solid #dce6ef; border-radius: 14px; background: #f6f9fc; color: var(--muted); font-size: .92rem; }
.script-choice b { font: 400 2.45rem/1.14 var(--kana); color: #303c60; }
.script-choice b.pair { letter-spacing: -.13em; padding-right: 5px; }.pair span { font-size: .62em; vertical-align: -.04em; }
.script-options :checked + span { background: linear-gradient(155deg,#dbf1fe,#c7def7); border-color: #799dbd; box-shadow: inset 0 0 0 .5px #799dbd; color: var(--blue-deep); font-weight: 700; }
.script-options :checked + span b { color: #244b72; }
.scope-options { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-choice { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; min-width: 65px; padding: 7px 14px; border-radius: 12px; border: 1px solid var(--line); background: #f9fbfd; font-size: .91rem; }
.scope-options :checked + span { color: #204364; border-color: #85a9c6; background: #cee8f9; font-weight: 650; }
.custom-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; font-size: .92rem; }
.custom-wrap input { width: 78px; min-height: 42px; padding: 6px 9px; color: var(--ink); background: #f8f9fd; border: 1px solid #b9c5e3; border-radius: 9px; }
.custom-wrap input[aria-invalid="true"] { border-color: var(--red); }
.start-line { display: grid; gap: 9px; margin-top: 20px; }.start-info { display: flex; align-items: center; justify-content: space-between; gap: 2px 10px; flex-wrap: wrap; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 45px; padding: 10px 17px; border-radius: 14px; font-weight: 690; }
.primary { background: linear-gradient(113deg,#294d70,#364969); border: 1px solid #294663; color: #fff; box-shadow: inset 0 1px 0 #ffffff2a, 0 5px 12px -7px #304e72a6; }
.primary:hover { box-shadow: inset 0 1px 0 #ffffff2e, 0 7px 17px -6px #4057bb8c; }.primary:active { box-shadow: inset 0 2px 5px #26329138; }
.primary:disabled { background: #d7ddec; border-color: #d7ddec; color: #546280; box-shadow: none; }
.secondary { background: #eef6fc; color: var(--blue-deep); border: 1px solid #bfd5e7; }.secondary:hover, .listen:hover { background: #e0effb; }.start { min-height: 49px; }
.sound-card { overflow: hidden; }
.sound-heading { display: flex; align-items: center; gap: 10px; margin: 21px 23px 5px; }.sound-heading h2 { font-size: 1.09rem; }
.sound-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #38587c; background: linear-gradient(130deg,var(--sky),#dcd9f1); }
.tuning { padding: 3px 23px 8px; }.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 51px; font-size: .96rem; }
.setting-row + .setting-row { border-top: 1px solid #e8eaf3; }
.select-wrap { position: relative; }.select-wrap::after { content: ""; width: 6px; height: 6px; border: solid #5964a0; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); position: absolute; right: 5px; top: 40%; pointer-events: none; }
.setting-row select { appearance: none; cursor: pointer; padding: 8px 21px 8px 5px; color: var(--blue-deep); background: transparent; border: 0; font-weight: 640; text-align: right; }
.switch { appearance: none; cursor: pointer; flex: 0 0 auto; width: 43px; height: 26px; border: 1px solid #bcc4d5; border-radius: 22px; background: #d5dae6; position: relative; margin: 3px 0; transition: background-color .23s, border-color .23s; }
.switch::after { content: ""; width: 20px; height: 20px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 4px #25325748; transition: transform .28s var(--spring); }
.switch:checked { background: #80afd5; border-color: #6f94b6; }.switch:checked::after { transform: translateX(17px); }
.switch[data-motion="on"]::after { animation: jelly-on 350ms var(--curve); }
.switch[data-motion="off"]::after { animation: jelly-off 350ms var(--curve); }
footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 29px; margin-bottom: max(18px,env(safe-area-inset-bottom)); padding-top: 13px; border-top: 1px solid #dce1ee; color: var(--muted); font-size: .82rem; }
footer a { color: var(--muted); text-underline-offset: .18em; }
.focus-page { max-width: 590px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; margin: 21px 0 8px; }
.step-count { color: #505d7a; font-variant-numeric: tabular-nums; font-size: .93rem; }
progress { appearance: none; display: block; overflow: hidden; width: 100%; height: 5px; background: #dee4f5; color: var(--blue); border: 0; border-radius: 5px; }
progress::-webkit-progress-bar { background: #dee4f5; }progress::-webkit-progress-value { background: linear-gradient(90deg,#557bf2,#7163db); border-radius: 5px; transition: width .23s var(--curve); }progress::-moz-progress-bar { background: #5269df; border-radius: 5px; }
.quiz-card {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; align-content: center; gap: 3px; margin-top: 16px; padding: 14px 12px 12px;
  background: linear-gradient(105deg,#ffffff77,#ffffff44), var(--sky-gradient);
  border: 1px solid #cdd6f3; border-radius: 22px; box-shadow: inset 0 1px 0 #fffd, 0 8px 25px -20px #31438382;
}
.quiz-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none; height: 240px; width: 240px; top: -143px; left: -122px; border-radius: 50%; border: 1px solid #9bade139; box-shadow: 0 0 0 15px #ffffff16,0 0 0 16px #a8b8ec35,0 0 0 32px #ffffff0d,0 0 0 33px #a8b8ec29; }
.question-meta { color: #405976; font-size: .86rem; font-weight: 650; }
.question { display: grid; place-items: center; min-height: 118px; padding: 0 10px 4px; color: #1c324e; font: 400 clamp(4.9rem,9vw,6.1rem)/1.1 var(--kana); letter-spacing: 0; }
.listen { min-height: 38px; padding: 5px 13px; background: #ffffffdc; border: 1px solid #bed1e7; color: #315477; font-size: .9rem; }
.choice-title { font-size: 1.02rem; margin: 18px 0 10px; }.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; min-height: 58px; border: 1px solid #d1d8eb; background: white; color: #283452; border-radius: 15px; box-shadow: 0 2px 5px #35447509; font-size: 1.33rem; font-weight: 650; letter-spacing: .01em; }
.choice-key { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; height: 21px; width: 21px; border-radius: 7px; background: #f0f2f9; color: #67728b; font-size: .76rem; font-weight: 600; }
@media (hover:hover) { .choice:hover:not(:disabled) { color: var(--blue-deep); border-color: #90a7ee; background: #f6f8ff; box-shadow: 0 4px 12px #3d5d9a18; } }
.choice.right { background: #cceafa; border-color: #799fbd; box-shadow: inset 0 0 0 .6px #799fbd; color: #244764; animation: confirm-choice .26s var(--curve); }
.choice.wrong { background: #fff0f2; border-color: #de96a4; color: #9c354b; animation: retry-choice .28s var(--curve); }
.choice-burst { position: absolute; pointer-events: none; right: 19px; top: 50%; width: 0; height: 0; }
.choice-burst i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #5389aa; animation: scatter 580ms var(--curve) both; }
.choice-burst i:nth-child(3n) { background: #a681ae; }.choice-burst i:nth-child(3n + 1) { background: #8499cb; }
.answer-feedback { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #ffffffb8; border: 1px solid #dbe1f1; border-radius: 15px; padding: 12px; margin-top: 13px; animation: appear .2s var(--curve); }
.answer-feedback strong { color: var(--blue-deep); }.answer-feedback.incorrect strong { color: var(--red); }
.answer-feedback p { color: var(--muted); margin-top: 3px; font-size: .92rem; }.answer-feedback button { flex-shrink: 0; }
.score-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px; border-radius: 21px; background: linear-gradient(110deg,#fff5,transparent),var(--sky-gradient); border: 1px solid #ffffffab; color: var(--ink); }
.score-card p { font-size: .94rem; color: #364e6a; }.score { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.score strong { font: 650 3.45rem/1.1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing: -.045em; }.score span { font-size: 1.1rem; }
.score-stats { display: grid; gap: 11px; font-variant-numeric: tabular-nums; }.score-stats div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.score-stats span { color: #364e6a; font-size: .87rem; }
.result-actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0 22px; }.result-actions button { flex: 1 1 120px; }
.review { padding: 18px 21px; }.review-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }.review-heading span, #perfect { color: var(--muted); }
.result-links { display: flex; align-items: center; gap: 12px; }
.review ul, .history-card ul { list-style: none; padding: 0; margin: 0; }
.review li { display: grid; grid-template-columns: minmax(54px,1.05fr) 1fr 1fr auto; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid #dce7f0; }
.review li:first-child, #perfect, #unsaved-result { margin-top: 12px; }
.miss-term, .miss-answer { display: grid; justify-items: start; align-content: start; gap: 3px; }
.miss-term small, .miss-answer small { color: var(--muted); font-size: .81rem; line-height: 1.35; }
.miss-glyph { color: #30496c; font: 400 1.68rem/1.3 var(--kana); white-space: nowrap; }
.miss-answer b { color: var(--blue-deep); font-size: 1.13rem; }.picked-answer b { color: var(--red); }
.history-card { padding: 6px 18px; }.history-card li + li { border-top: 1px solid #dce7f0; }
.history-entry { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; color: var(--ink); border: 0; border-radius: 10px; background: transparent; padding: 13px 5px; }
.history-entry:hover { background: #eef6fc; }.history-entry > span { display: grid; gap: 4px; }.history-entry small { color: var(--muted); font-size: .83rem; }
.history-score { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }.history-score b { color: var(--blue-deep); }.history-card > p { padding: 15px 2px; }
.chart-page { max-width: 790px; margin: 0 auto; }.chart-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.chart-scripts { grid-template-columns: repeat(2,1fr); }.chart-scripts button { padding-inline: 16px; }
.chart-groups { display: flex; gap: 5px; }.chart-groups button { min-height: 39px; border: 1px solid transparent; color: var(--muted); background: transparent; padding: 5px 10px; border-radius: 99px; font-size: .9rem; }
.chart-groups [aria-pressed="true"] { color: var(--blue-deep); background: #cfebfb; border-color: #9dbbd7; font-weight: 660; }
.chart-paper { padding: 11px; }.chart-paper table { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.chart-paper th { font-size: .87rem; font-weight: 600; color: var(--muted); }.chart-paper thead th { height: 28px; }.chart-paper th:first-child { width: 54px; white-space: nowrap; }
.chart-paper td { padding: 0; }.chart-paper td button { display: grid; justify-items: center; align-content: center; gap: 2px; width: 100%; min-height: 57px; padding: 3px; border: 1px solid #e0e5f2; border-radius: 11px; background: #f6f8fe; color: var(--ink); }
.chart-paper td button:hover, .chart-paper td button.selected { background: #d6ebfa; color: var(--blue-deep); border-color: #93aecb; }
.cell-glyph { font: 400 1.5rem/1.15 var(--kana); }.cell-reading { color: var(--muted); font-size: .82rem; }.chart-note { margin-top: 10px; }
.audio-message { color: var(--red); font-size: .92rem; text-align: center; margin: 13px auto 0; }
dialog { width: min(360px,90vw); color: var(--ink); background: #fafbfff7; padding: 23px; border: 1px solid white; border-radius: 21px; box-shadow: 0 14px 50px #202a5142; }
dialog[open] { animation: modal-in .22s var(--spring); }dialog::backdrop { background: #19224166; }
dialog p { margin-top: 8px; color: var(--muted); line-height: 1.6; }.dialog-actions { justify-content: flex-end; margin: 19px 0 0; }
@keyframes appear { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: .35; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes jelly-on {
  0% { transform: translateX(0) scale(1); } 40% { transform: translateX(8px) scale(1.4,.82); }
  75% { transform: translateX(17px) scale(.89,1.06); } 100% { transform: translateX(17px) scale(1); }
}
@keyframes jelly-off {
  0% { transform: translateX(17px) scale(1); } 40% { transform: translateX(9px) scale(1.4,.82); }
  75% { transform: translateX(0) scale(.89,1.06); } 100% { transform: translateX(0) scale(1); }
}
@keyframes scatter {
  0% { opacity: 0; transform: translate(0,0) scale(.35); }
  18% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) scale(.3); }
}
@keyframes confirm-choice { 0% { transform: scale(.97); } 65% { transform: scale(1.016); } 100% { transform: none; } }
@keyframes retry-choice { 18% { transform: translateX(-3px); } 55% { transform: translateX(2px); } 100% { transform: none; } }
@keyframes waveform { to { transform: scaleY(.42); } }
@media (max-width: 740px) {
  .mast-inner, .wrap, footer { width: min(100% - 32px,570px); }.mast-inner { min-height: 58px; }
  .brand { font-size: 1.08rem; gap: 7px; }.brand-mark { width: 33px; height: 33px; font-size: 1.46rem; border-radius: 10px; }
  .main-nav { grid-template-columns: repeat(2,68px); }.main-nav button { min-height: 31px; font-size: .86rem; padding-inline: 3px; }
  .custom-wrap input, .setting-row select { font-size: 1rem; }
  .home-hero { min-height: 146px; padding: 16px 18px; gap: 7px; border-radius: 21px; margin: 17px 0 13px; }
  #hero-context { font-size: .8rem; letter-spacing: 0; }.hero-copy h1 { font-size: 2.05rem; }.hero-actions { gap: 8px; margin-top: 12px; }
  .sample-play { min-height: 37px; padding: 5px 10px; font-size: .85rem; }#sample-setting { font-size: .78rem; }
  .card-stack { flex-basis: 113px; height: 103px; margin-right: 1%; }.flashcard { border-radius: 10px; }
  .card-front { width: 70px; height: 89px; left: 0; top: 8px; padding: 6px 3px; grid-template-rows: 1fr 13px; }.card-front b { font-size: 2.55rem; }.card-front b.compound { font-size: 1.76rem; }.card-front i { font-size: .82rem; }
  .card-back { width: 65px; height: 79px; left: 40%; top: 15px; }.card-back b { font-size: 2.3rem; }.card-back b.compound { font-size: 1.52rem; }
  .page-heading { margin: 24px 0 15px; }.setup-layout { grid-template-columns: 1fr; gap: 13px; }.paper { border-radius: 19px; }
  .settings-card { padding: 19px; }.field-block { margin-top: 21px; }.start-line { margin-top: 16px; }
  .sound-heading { margin: 15px 19px 2px; }.tuning { padding-inline: 19px; }
  footer { margin-top: 23px; }.quiz-top { margin-top: 12px; }.quiz-card { margin-top: 11px; }.question { min-height: 95px; }
  .choice-key { display: none; }.choices { gap: 8px; }.choice { min-height: 52px; }
}
@media (max-width: 390px) {
  .mast-inner, .wrap, footer { width: calc(100% - 24px); }.settings-card { padding: 16px; }
  .scope-options { gap: 5px; }.scope-choice { padding: 6px 7px; font-size: .86rem; gap: 4px; }
  .script-options { gap: 6px; }.script-choice { padding: 9px 3px; }.field-block { margin-top: 18px; }
  .chart-paper { padding: 5px; }.chart-paper table { border-spacing: 2px; }.chart-paper th:first-child { width: 48px; }
  .score-card { padding: 18px; }.score-stats div { gap: 10px; }.review { padding-inline: 12px; }
  .result-links { gap: 8px; }.review li { gap: 5px; }.review .listen { font-size: .82rem; padding-inline: 8px; }
}
@media (max-width: 350px) {
  .card-stack { flex-basis: 86px; margin-right: 2%; }.card-back { left: 29%; }.home-hero { padding-inline: 13px; }
  .main-nav { grid-template-columns: repeat(2,62px); }.setting-row { font-size: .9rem; }
}
@media (max-height: 650px) and (max-width: 740px) {
  body[data-view="quiz"] .mast-inner { min-height: 45px; }.quiz-top { margin: 5px 0 3px; }
  .quiz-card { padding-block: 8px; }.question { min-height: 64px; font-size: 3.7rem; }.choice-title { margin: 10px 0 7px; }
  .choice { min-height: 45px; }.answer-feedback { margin-top: 9px; padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:not(:disabled):active, .script-options label:active .script-choice, .scope-options label:active .scope-choice { transform: none; }
}
