:root {
  --ink: #102033;
  --navy: #0b1f36;
  --paper: #fbfdff;
  --yellow: #e6f6f3;
  --coral: #0d7f79;
  --mint: #17a8a0;
  --white: #ffffff;
  --muted: #607084;
  --line: rgba(220, 229, 238, .96);
  --brand-shadow: 0 22px 60px rgba(16, 32, 51, .12);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(229, 239, 246, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 239, 246, .45) 1px, transparent 1px),
    radial-gradient(circle at 72% 15%, rgba(224, 207, 151, .22), transparent 27rem),
    radial-gradient(circle at 24% 28%, rgba(23, 168, 160, .08), transparent 28rem),
    var(--paper);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.loading { min-height: 100vh; display: grid; place-items: center; font-weight: 800; }
.setup-shell, .study-shell, .listening-shell, .curve-shell, .focus-shell { min-height: 100vh; overflow: hidden; position: relative; }
.setup-shell::before, .study-shell::before, .listening-shell::before, .curve-shell::before, .focus-shell::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(22,35,58,.14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 66%, rgba(22,35,58,.1) 0 1px, transparent 1.5px);
  background-size: 31px 29px, 47px 43px;
}
.topbar, .study-nav {
  height: 82px; max-width: 1240px; margin: auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2;
}
.brand { color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 900; letter-spacing: -.6px; display: flex; align-items: center; gap: 10px; }
.brand span { display: grid; place-items: center; width: 36px; height: 36px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 9px 12px 8px 11px; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink); }
.brand-button { border: 0; background: none; padding: 0; }
.top-actions, .study-actions { display: flex; align-items: center; gap: 9px; }
.focus-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px;
  color: #0b706b; border: 1px solid rgba(23,168,160,.3); border-radius: 999px;
  background: #e8f7f4; font-size: 12px; font-weight: 900;
}
.focus-button b { min-width: 20px; padding: 2px 6px; color: #fff; background: #0d7f79; border-radius: 999px; }
.text-button { border: 0; background: none; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; font-weight: 700; }
.file-button { color: inherit; border: 1.5px solid var(--ink); background: var(--white); border-radius: 7px; padding: 8px 12px; font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 2px 2px 0 var(--ink); }
.hidden-input { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hero {
  max-width: 1160px; min-height: calc(100vh - 148px); margin: auto; padding: 50px 48px 80px;
  display: grid; grid-template-columns: 1.05fr .8fr; gap: 80px; align-items: center; position: relative; z-index: 1;
}
.hero::after { content: "ABC"; position: absolute; z-index: -1; left: -50px; bottom: -30px; font-size: 180px; font-weight: 950; color: rgba(22,35,58,.035); transform: rotate(-8deg); }
.eyebrow { font-size: 12px; letter-spacing: .15em; font-weight: 900; color: #e2513f; text-transform: uppercase; }
.hero-copy h1 { font-size: clamp(54px, 6.5vw, 92px); line-height: .98; letter-spacing: -.07em; margin: 20px 0 28px; font-weight: 950; }
.hero-copy h1 em { font-style: normal; position: relative; z-index: 1; }
.hero-copy h1 em::after { content: ""; position: absolute; height: 20px; left: -4px; right: -8px; bottom: 4px; background: var(--yellow); z-index: -1; transform: rotate(-1deg); border-radius: 50%; }
.lead { font-size: 18px; line-height: 1.8; font-weight: 600; }
.word-search { position: relative; width: min(100%, 540px); margin-top: 24px; }
.word-search > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 900; }
.word-search-box { display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid #d5e1e9; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 10px 26px rgba(16,32,51,.08); }
.word-search-box > span { color: #0b706b; font-size: 22px; font-weight: 900; }
.word-search-box input { width: 100%; min-width: 0; padding: 13px 0; color: var(--ink); border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; }
.word-search-box input::placeholder { color: #8997a5; font-weight: 600; }
.word-search-results { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; right: 0; max-height: 348px; overflow-y: auto; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 18px 46px rgba(16,32,51,.16); }
.word-search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 9px; border-bottom: 1px solid var(--line); }
.word-search-result:last-child { border-bottom: 0; }
.word-search-result b, .word-search-result span, .word-search-result small { display: block; }
.word-search-result b { font-size: 17px; }
.word-search-result span { margin-top: 2px; font-size: 13px; font-weight: 700; }
.word-search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.word-search-audio { display: flex; flex: none; gap: 5px; }
.word-search-audio button { padding: 6px 8px; color: #0b706b; border: 1px solid rgba(13,127,121,.25); border-radius: 999px; background: #e8f7f4; font-size: 10px; font-weight: 900; }
.word-search-empty { margin: 0; padding: 17px 12px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 700; }
.progress-note { margin-top: 42px; display: inline-flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border: 2px solid var(--ink); border-radius: 50px; background: rgba(255,255,255,.5); box-shadow: 4px 4px 0 var(--ink); }
.mini-sprout { font-size: 26px; width: 44px; height: 44px; background: #dff4eb; border-radius: 50%; display: grid; place-items: center; }
.progress-note b, .progress-note small { display: block; }
.progress-note b { font-size: 18px; }.progress-note small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.setup-card {
  position: relative; background: var(--white); padding: 42px; border: 2px solid var(--ink); border-radius: 8px 13px 9px 12px;
  box-shadow: 11px 13px 0 var(--ink); transform: rotate(1deg);
}
.tape { position: absolute; width: 92px; height: 28px; left: 50%; top: -16px; transform: translateX(-50%) rotate(-3deg); background: rgba(114,208,180,.72); }
.step-label { font-size: 10px; font-weight: 900; letter-spacing: .2em; color: #dd513f; margin: 0 0 8px; }
.setup-card h2 { margin: 0 0 28px; font-size: 28px; letter-spacing: -.04em; }
.setup-card label, .setup-card legend { display: block; font-size: 12px; font-weight: 900; margin: 18px 0 7px; }
select { width: 100%; appearance: none; background: #f7f4ed; border: 1.5px solid #bac0c5; border-radius: 7px; padding: 13px 40px 13px 14px; font-weight: 700; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
fieldset { border: 0; padding: 0; margin: 22px 0; }
.count-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.count-options button { background: #fff; border: 1.5px solid #aeb5bc; border-radius: 7px; padding: 10px; }
.count-options b { font-size: 21px; }.count-options span { font-size: 11px; margin-left: 3px; }
.count-options button.selected { background: var(--yellow); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px); }
.start-button { width: 100%; border: 2px solid var(--ink); border-radius: 8px; background: var(--coral); color: #fff; padding: 16px 20px; font-weight: 900; box-shadow: 4px 4px 0 var(--ink); display: flex; justify-content: center; gap: 16px; }
.start-button:disabled { filter: grayscale(.5); cursor: default; }
.listening-start-button {
  width: 100%; margin-top: 12px; padding: 14px 18px; color: var(--ink); background: var(--mint);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--ink); font-weight: 900;
}
.listening-start-button span { margin-right: 8px; font-size: 18px; }
.listening-start-button:disabled { cursor: default; filter: grayscale(.55); }
.curve-start-button {
  width: 100%; margin-top: 12px; padding: 12px 17px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px;
  color: var(--ink); text-align: left; border: 1px solid rgba(13,127,121,.28); border-radius: 12px;
  background: linear-gradient(135deg,#f0faf8,#e4f5f1); box-shadow: 0 9px 20px rgba(13,127,121,.1);
}
.curve-start-button > span { grid-row: 1 / 3; align-self: center; font-size: 25px; color: #0b706b; }
.curve-start-button b { font-size: 13px; }
.curve-start-button small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; }
.learning-entry-buttons { display: grid; gap: 9px; margin-top: 24px; }
.curve-entry-group { display: grid; gap: 7px; }
.curve-scope-options { padding: 8px 10px; display: grid; grid-template-columns: auto 1fr 1.35fr; align-items: center; gap: 7px; border: 1px solid rgba(13,127,121,.2); border-radius: 12px; background: rgba(255,255,255,.72); }
.curve-scope-options > span { color: var(--muted); font-size: 9px; font-weight: 900; }
.curve-scope-options button { padding: 7px 8px; color: #31565a; border: 1px solid #b8cecf; border-radius: 8px; background: #f5faf9; font-size: 9px; font-weight: 900; }
.curve-scope-options button:hover,.curve-scope-options button.selected { color: #fff; border-color: #0b706b; background: #0b706b; }
.learning-entry {
  width: 100%; min-height: 62px; padding: 11px 17px; display: grid; grid-template-columns: 38px 1fr;
  column-gap: 11px; color: var(--ink); text-align: left; border: 1px solid rgba(13,127,121,.25);
  border-radius: 14px; box-shadow: 0 9px 20px rgba(13,127,121,.1); transition: transform .16s,box-shadow .16s,filter .16s;
}
.learning-entry:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 13px 24px rgba(13,127,121,.16); }
.learning-entry > span { grid-row: 1 / 3; align-self: center; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: rgba(255,255,255,.72); font-size: 21px; line-height: 1; }
.learning-entry b { align-self: end; font-size: 13px; }.learning-entry small { align-self: start; margin-top: 2px; font-size: 9px; font-weight: 700; }
.learning-entry.entry-cards { color: var(--ink); background: #e8f7f4; }
.learning-entry.entry-cards small { color: #4f6e70; }
.learning-entry.entry-listening { color: #fff; border-color: #45aaa3; background: linear-gradient(135deg,#52b9b1,#379f98); }
.learning-entry.entry-listening small { color: rgba(255,255,255,.78); }
.learning-entry.entry-curve { color: #fff; border-color: #0b706b; background: linear-gradient(135deg,#0d7f79,#0b605d); }
.learning-entry.entry-curve small { color: rgba(255,255,255,.75); }
.learning-entry.entry-cards:hover:not(:disabled) { border-color: #176e69; background: linear-gradient(135deg,#218b84,#126b66); box-shadow: 0 14px 26px rgba(11,96,93,.28); }
.learning-entry.entry-listening:hover:not(:disabled) { border-color: #063f3d; background: linear-gradient(135deg,#095d59,#043f3d); box-shadow: 0 14px 26px rgba(5,67,64,.32); }
.learning-entry.entry-curve:hover:not(:disabled) { border-color: #032f2d; background: linear-gradient(135deg,#074c48,#032f2d); box-shadow: 0 14px 26px rgba(3,47,45,.34); }
.learning-entry:disabled { cursor: default; filter: grayscale(.4); opacity: .62; }
.local-note { text-align: center; font-size: 10px; font-weight: 700; color: #6d7481; margin: 15px 0 0; }
footer { height: 66px; border-top: 1px solid rgba(22,35,58,.15); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
footer span { font-weight: 900; letter-spacing: .18em; }
.study-shell { padding-bottom: 40px; }
.study-nav { max-width: none; border-bottom: 1px solid rgba(22,35,58,.16); background: rgba(245,240,231,.82); backdrop-filter: blur(10px); }
.study-progress { display: grid; grid-template-columns: minmax(140px, 220px) auto auto; align-items: center; gap: 10px; font-size: 12px; }
.study-progress > div { height: 8px; background: #d9d6cf; border-radius: 20px; overflow: hidden; }
.study-progress > div span { display: block; height: 100%; background: var(--mint); border-radius: inherit; transition: width .35s; }
.study-progress small { color: var(--muted); }
.save-button, .shuffle-button { border: 1.5px solid var(--ink); background: var(--white); border-radius: 7px; padding: 10px 15px; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.study-heading { max-width: 1240px; margin: 0 auto; padding: 42px 28px 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.study-heading h1 { margin: 8px 0; font-size: clamp(30px,4vw,50px); letter-spacing: -.055em; }
.study-heading > div > p:last-child { color: var(--muted); font-size: 14px; }
.shuffle-button { flex: none; background: var(--yellow); }
.word-grid { max-width: 1240px; min-height: 410px; margin: 0 auto; padding: 14px 28px 30px; display: grid; grid-template-columns: repeat(5,1fr); gap: 17px; align-items: stretch; }
.word-grid.count-3 { grid-template-columns: repeat(3,1fr); max-width: 880px; }
.word-grid.count-10 { grid-template-columns: repeat(5,1fr); }
.word-card {
  --delay: 0ms; position: relative; min-height: 330px; background: var(--white); border: 2px solid var(--ink); border-radius: 8px 12px 9px 11px;
  padding: 17px; box-shadow: 6px 7px 0 var(--ink); display: flex; flex-direction: column; cursor: pointer;
  animation: card-in .45s both; animation-delay: var(--delay); transition: transform .18s, box-shadow .18s;
}
.word-card:nth-child(even) { transform: rotate(.6deg); }.word-card:nth-child(odd) { transform: rotate(-.4deg); }
.word-card:hover { transform: translateY(-5px) rotate(0); box-shadow: 8px 11px 0 var(--ink); }
.word-card.revealed { background: #fffbed; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) rotate(-2deg); } }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-number { font-size: 10px; letter-spacing: .12em; font-weight: 900; color: #8a8f98; }
.audio-button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--coral); color: #fff; font-size: 12px; box-shadow: 2px 2px 0 var(--ink); }
.word-area { margin: auto 0; }
.part { color: #d9513f; font-size: 10px; font-weight: 900; }
.word-card h2 { font-size: clamp(25px,2.2vw,38px); letter-spacing: -.045em; margin: 4px 0 12px; overflow-wrap: normal; word-break: normal; }
.word-sound { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; font-weight: inherit; text-align: left; border-bottom: 3px solid transparent; }
.word-sound.word-single { white-space: nowrap; }
.word-sound.word-phrase { white-space: normal; word-break: keep-all; overflow-wrap: normal; }
.word-sound.word-long { font-size: .84em; letter-spacing: -.055em; }
.word-sound.word-extra-long { font-size: .68em; letter-spacing: -.06em; }
.word-sound.word-ultra-long { font-size: .56em; letter-spacing: -.065em; }
.word-sound:hover, .word-sound:focus-visible { border-bottom-color: var(--yellow); outline: none; }
.tap-hint { color: #92969d; font-size: 10px; border-top: 1px dashed #c9c5bd; padding-top: 10px; }
.meaning { border-top: 2px dashed rgba(22,35,58,.22); padding: 15px 0 8px; display: flex; gap: 10px; align-items: center; min-height: 92px; animation: reveal .25s both; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.word-picture { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: #dff5ed; font-size: 29px; box-shadow: 2px 2px 0 var(--ink); }
.japanese { font-weight: 900; font-size: 16px; margin: 0 0 5px; line-height: 1.35; }
.example { border: 0; background: none; padding: 0; text-align: left; font-family: Georgia, serif; font-style: italic; color: var(--muted); font-size: 10px; line-height: 1.35; margin: 0; }
.example:hover, .example:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.example span { color: var(--coral); margin-left: 5px; font-style: normal; font-weight: 900; }
.example .example-en,
.example .example-ja { display: block; margin-left: 0; }
.example .example-en { color: var(--muted); font-family: Georgia, serif; font-style: italic; font-weight: 500; }
.example .example-ja { margin-top: 4px; color: #5d6875; font-family: inherit; font-size: 9px; font-style: normal; font-weight: 600; }
.unit-progress { margin: -4px 0 14px; color: var(--teal); font-size: 12px; font-weight: 800; }
.answer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.known-button, .not-yet-button { width: 100%; border: 1.5px solid var(--ink); border-radius: 7px; padding: 10px 6px; font-size: 11px; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); }
.known-button { background: var(--mint); }
.not-yet-button { background: var(--white); }
.known-button span { display: inline-grid; place-items: center; width: 18px; height: 18px; background: var(--ink); color: #fff; border-radius: 50%; margin-right: 4px; font-size: 11px; }
.blank-hint { text-align: center; font-size: 11px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 30px; font-weight: 800; font-size: 13px; box-shadow: 4px 4px 0 var(--coral); }
.complete-card { max-width: 520px; margin: 70px auto; padding: 48px; text-align: center; background: var(--white); border: 2px solid var(--ink); box-shadow: 8px 9px 0 var(--ink); border-radius: 10px; }
.complete-card > span { font-size: 60px; }.complete-card h2 { font-size: 30px; }.complete-card p { color: var(--muted); line-height: 1.7; }

.listening-stage { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 80px; }
.listening-heading { text-align: center; }
.listening-heading h1 { margin: 8px 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.055em; }
.listening-heading > p:last-child { color: var(--muted); }
.listening-player {
  width: min(620px, 100%); margin: 30px auto 28px; padding: 28px; text-align: center; background: var(--white);
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 8px 9px 0 var(--ink);
}
.listening-number { display: block; margin-bottom: 17px; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.listening-play-actions { display: grid; grid-template-columns: 1fr 1fr .72fr; gap: 12px; }
.listening-play-actions button {
  padding: 17px 14px; color: #fff; background: var(--coral); border: 2px solid var(--ink);
  border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); font-weight: 900;
}
.listening-play-actions button:last-child { color: var(--ink); background: var(--yellow); }
.listening-play-actions .hint-button { color: var(--ink); background: #dff5ed; }
.listening-play-actions span { display: inline-grid; width: 24px; height: 24px; margin-right: 7px; place-items: center; color: #fff; background: var(--ink); border-radius: 50%; font-size: 9px; }
.listening-player small { display: block; margin-top: 14px; color: var(--muted); }
.listening-hint { margin: 18px 0 0; padding: 12px 14px; color: #185f5b; background: #edf9f5; border: 1px dashed #56a394; border-radius: 9px; font-size: 14px; font-weight: 800; line-height: 1.6; animation: reveal .2s both; }
.listening-choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.listening-choices.count-3 { grid-template-columns: repeat(3, 1fr); max-width: 780px; margin-inline: auto; }
.listening-choice {
  min-height: 126px; padding: 22px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 5px 6px 0 var(--ink); font-size: 17px; font-weight: 900; line-height: 1.5; transition: transform .15s, background .15s;
}
.listening-choice:hover:not(:disabled) { transform: translateY(-4px); background: #fffbed; }
.listening-choice.correct { background: #c9efdf; border-color: #176b55; box-shadow: 5px 6px 0 #176b55; }
.listening-choice.wrong { color: #862f25; background: #ffd8d2; border-color: #a83e32; box-shadow: 5px 6px 0 #a83e32; }
.listening-choice.dimmed { opacity: .42; }
.listening-choice b { display: block; margin-top: 8px; font-size: 12px; }
.listening-feedback {
  display: grid; width: min(620px, 100%); margin: 24px auto 0; padding: 16px 22px; text-align: center;
  border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
}
.listening-feedback.success { background: #dff5ed; }
.listening-feedback.error { background: #fff0cf; }
.listening-feedback span { margin-top: 4px; font-size: 18px; font-weight: 900; }
.listening-feedback small { margin-top: 4px; color: var(--muted); }
.listening-feedback.memory-focus {
  position: relative; overflow: hidden; color: #4f2509; background: #ffd277; border-color: #bd5a16;
  box-shadow: 6px 7px 0 #bd5a16; animation: memory-pulse .55s ease-out both;
}
.listening-feedback.memory-focus > span { font-size: clamp(25px, 4vw, 38px); letter-spacing: -.035em; }
.memory-example { margin: 10px 0 4px; padding: 10px 12px; background: rgba(255,255,255,.68); border-radius: 8px; font-family: Georgia, serif; font-size: 15px; font-weight: 700; }
.memory-example small { display: block; font-family: inherit; font-size: 11px; }
.memory-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 6px; background: #d85a19; transform-origin: left; animation: memory-countdown 3s linear forwards; }
@keyframes memory-pulse { from { transform: scale(.96); filter: saturate(1.8); } to { transform: scale(1); filter: saturate(1); } }
@keyframes memory-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.score-label { margin: 8px 0 0; color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.listening-score { display: block; margin: 2px 0 10px; color: var(--teal); font-size: 78px; line-height: 1; }
.listening-score small { margin-left: 4px; font-size: 20px; }

.focus-page { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 90px; position: relative; z-index: 1; }
.focus-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.focus-heading h1 { margin: 4px 0 10px; font-size: clamp(42px, 6vw, 68px); letter-spacing: -.055em; }
.focus-heading p:last-child { margin: 0; color: var(--muted); line-height: 1.8; }
.focus-count { min-width: 120px; color: #0d7f79; font-size: 58px; font-weight: 900; line-height: 1; text-align: right; }
.focus-count small { margin-left: 4px; font-size: 16px; }
.focus-toolbar { display: flex; align-items: center; gap: 10px; padding: 18px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 34px rgba(16,32,51,.08); }
.focus-toolbar .start-button { width: auto; margin: 0; padding: 11px 22px; font-size: 13px; }
.focus-toolbar button:disabled { cursor: not-allowed; opacity: .45; }
.print-note { margin: 12px 4px 28px; color: var(--muted); font-size: 12px; }
.focus-groups { display: grid; gap: 22px; }
.focus-group { overflow: hidden; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--brand-shadow); }
.focus-group h2 { display: flex; justify-content: space-between; margin: 0; padding: 17px 22px; color: #fff; background: linear-gradient(135deg, #0b706b, #0d7f79); font-size: 17px; }
.focus-group h2 span { font-size: 13px; }
.focus-row { display: grid; grid-template-columns: 1fr 44px 1fr 34px; align-items: stretch; border-bottom: 1px solid var(--line); }
.focus-row:last-child { border-bottom: 0; }
.focus-row > div { min-width: 0; padding: 16px 20px; }
.focus-row > div:first-child { border-right: 1px dashed #a9bbc4; }
.difficulty-badge {
  align-self: center;
  justify-self: center;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #87400e;
  border: 1px solid #db7a22;
  border-radius: 50%;
  background: #fff4d5;
  font-size: 14px;
  font-weight: 900;
}
.difficulty-badge.difficulty-1 { background: #fff9df; }
.difficulty-badge.difficulty-2 { background: #fff0a8; }
.difficulty-badge.difficulty-3 { background: #ffdc6d; }
.difficulty-badge.difficulty-4 { background: #f7b94f; }
.difficulty-badge.difficulty-5 { color: #fff; background: #e9892d; border-color: #b85716; }
.focus-row strong { display: block; font-size: 20px; line-height: 1.2; overflow-wrap: break-word; }
.focus-row p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.focus-row button { align-self: center; width: 28px; height: 28px; padding: 0; color: var(--muted); border: 0; border-radius: 50%; background: #eef3f5; }
.focus-empty { padding: 70px 24px; text-align: center; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 18px; }
.focus-empty > span { color: #0d7f79; font-size: 62px; }
.focus-empty h2 { margin: 8px 0; font-size: 27px; }
.focus-empty p { color: var(--muted); }
.focus-empty .start-button { width: auto; margin-top: 18px; padding-inline: 28px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 420px; gap: 30px; padding-inline: 28px; }
  .hero-copy h1 { font-size: 58px; }
  .word-grid, .word-grid.count-10 { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 720px) {
  .topbar, .study-nav { height: 68px; padding: 0 18px; }
  .text-button { display: none; }
  .top-actions { gap: 6px; }.file-button { padding: 7px 9px; font-size: 10px; }
  .hero { display: block; padding: 35px 20px 70px; }
  .hero-copy h1 { font-size: 50px; }.lead { font-size: 15px; }
  .word-search-result { align-items: flex-start; }
  .word-search-audio { flex-direction: column; }
  .progress-note { margin: 15px 0 38px; }
  .setup-card { padding: 32px 24px; transform: none; box-shadow: 7px 8px 0 var(--ink); }
  footer { padding: 0 20px; }
  .study-progress { grid-template-columns: 100px auto; }.study-progress small { display: none; }
  .study-actions { gap: 5px; }.save-button { padding: 8px; font-size: 10px; }
  .top-actions .focus-button { padding: 7px 9px; font-size: 10px; }
  .study-actions .focus-button { padding: 7px 8px; font-size: 10px; }
  .focus-page { width: min(100% - 28px, 1040px); padding-top: 34px; }
  .focus-heading { align-items: flex-start; }
  .focus-heading h1 { font-size: 43px; }
  .focus-count { min-width: auto; font-size: 40px; }
  .focus-toolbar { flex-wrap: wrap; }
  .focus-row { grid-template-columns: 1fr 38px 30px; }
  .focus-row > div:first-child { grid-column: 1; }
  .focus-row > div:nth-of-type(2) { grid-column: 1; border-top: 1px dashed #a9bbc4; }
  .difficulty-badge { grid-column: 2; grid-row: 1 / span 2; }
  .focus-row button { grid-column: 3; grid-row: 1 / span 2; }
  .study-heading { align-items: start; padding: 30px 18px 18px; }
  .study-heading > div > p:last-child { display: none; }
  .shuffle-button { font-size: 0; padding: 10px 13px; }.shuffle-button::first-letter { font-size: 18px; }
  .word-grid, .word-grid.count-3, .word-grid.count-10 { grid-template-columns: 1fr; padding: 8px 18px 24px; max-width: 520px; }
  .listening-stage { width: min(100% - 28px, 1080px); padding-top: 30px; }
  .listening-play-actions { grid-template-columns: 1fr; }
  .listening-choices, .listening-choices.count-3, .listening-choices.count-10 { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .listening-choice { min-height: 88px; }
  .word-card { min-height: 285px; }
}

/* Rakuyaku Learn brand alignment */
.setup-shell::before, .study-shell::before, .listening-shell::before, .curve-shell::before, .focus-shell::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(251,253,255,.08), rgba(251,253,255,.72));
}
.topbar, .study-nav {
  height: 74px;
  max-width: 1180px;
  padding-inline: 24px;
}
.brand {
  color: var(--navy);
  font-weight: 900;
  letter-spacing: -.4px;
}
.brand span {
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(145deg, #0b706b, #17a8a0);
  border: 0;
  border-radius: 50%;
  transform: none;
  box-shadow: 0 8px 20px rgba(23,168,160,.22);
}
.file-button, .save-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(16,32,51,.07);
}
.hero {
  max-width: 1180px;
  min-height: calc(100vh - 140px);
  padding: 64px 24px 84px;
  gap: 72px;
}
.hero::after {
  left: -30px;
  bottom: -20px;
  font-size: 170px;
  font-weight: 900;
  color: rgba(16,32,51,.025);
  transform: none;
}
.eyebrow, .step-label, .part { color: #0b706b; }
.hero-copy h1 {
  font-size: clamp(54px, 6.2vw, 78px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 800;
}
.hero-copy h1 em::after {
  height: 14px;
  bottom: 5px;
  background: rgba(23,168,160,.16);
  transform: none;
  border-radius: 8px;
}
.progress-note {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 30px rgba(16,32,51,.08);
}
.setup-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--brand-shadow);
  transform: none;
}
.tape { display: none; }
select {
  background-color: #f4f8fb;
  border: 1px solid #d5e1e9;
  border-radius: 12px;
}
.count-options button {
  border: 1px solid #d5e1e9;
  border-radius: 12px;
}
.count-options button.selected {
  color: #fff;
  background: linear-gradient(135deg, #0b706b, #0d7f79);
  border: 1px solid #0b706b;
  box-shadow: 0 10px 22px rgba(23,168,160,.2);
  transform: none;
}
.start-button, .shuffle-button {
  color: #fff;
  border-color: transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b706b, #0d7f79);
  box-shadow: 0 14px 28px rgba(23,168,160,.24);
}
.study-nav {
  max-width: none;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}
.word-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--brand-shadow);
}
.word-card:nth-child(even), .word-card:nth-child(odd) { transform: none; }
.word-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 64px rgba(16,32,51,.16);
}
.word-card.revealed {
  background: linear-gradient(155deg, #fff, #effaf8);
  border-color: rgba(23,168,160,.34);
}
.word-card.difficulty-1, .word-card.revealed.difficulty-1 { background: #fff9df; border-color: #efd992; }
.word-card.difficulty-2, .word-card.revealed.difficulty-2 { background: #fff0a8; border-color: #e8c15c; }
.word-card.difficulty-3, .word-card.revealed.difficulty-3 { background: #ffdc6d; border-color: #dba13b; }
.word-card.difficulty-4, .word-card.revealed.difficulty-4 { background: #f7b94f; border-color: #ce7b21; }
.word-card.difficulty-5, .word-card.revealed.difficulty-5 { background: #e9892d; border-color: #b85716; }
.word-card.difficulty-4 .tap-hint,
.word-card.difficulty-5 .tap-hint,
.word-card.difficulty-4 .part,
.word-card.difficulty-5 .part { color: #68310d; }

/* HSK planning page */
.hsk-shell {
  min-height: 100vh;
  color: #17283b;
  background:
    radial-gradient(circle at 13% 18%, rgba(223, 73, 57, .1), transparent 25rem),
    radial-gradient(circle at 82% 22%, rgba(23, 168, 160, .1), transparent 28rem),
    #fbfdff;
}
.hsk-nav {
  min-height: 82px;
  max-width: 1240px;
  margin: auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hsk-nav .brand span { color: #fff; background: #d94838; border-color: #17283b; }
.hsk-nav-actions { display: flex; align-items: center; gap: 12px; }
.hsk-status-dot {
  padding: 7px 11px;
  color: #9b3329;
  border: 1px solid rgba(217, 72, 56, .25);
  border-radius: 999px;
  background: #fff0ec;
  font-size: 11px;
  font-weight: 900;
}
.hsk-hero {
  max-width: 1160px;
  min-height: calc(100vh - 82px);
  margin: auto;
  padding: 62px 48px 92px;
  display: grid;
  grid-template-columns: 1.08fr .82fr;
  gap: 72px;
  align-items: center;
}
.hsk-eyebrow {
  margin: 0;
  color: #d94838;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .18em;
}
.hsk-hero-copy h1 {
  margin: 20px 0 30px;
  font-size: clamp(52px, 6.2vw, 84px);
  line-height: 1.03;
  letter-spacing: -.07em;
}
.hsk-hero-copy h1 em {
  position: relative;
  z-index: 0;
  font-style: normal;
}
.hsk-hero-copy h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: 3px;
  left: -4px;
  height: 17px;
  border-radius: 50%;
  background: #ffe2a8;
  transform: rotate(-1deg);
}
.hsk-lead { max-width: 650px; margin: 0; color: #53677b; font-size: 17px; font-weight: 650; line-height: 1.9; }
.hsk-standard-notice {
  max-width: 660px;
  margin-top: 30px;
  padding: 17px 20px;
  border-left: 5px solid #d94838;
  border-radius: 0 14px 14px 0;
  background: rgba(255, 245, 232, .82);
}
.hsk-standard-notice b { display: block; font-size: 14px; }
.hsk-standard-notice p { margin: 5px 0 0; color: #6c5c51; font-size: 12px; line-height: 1.65; }
.hsk-feature-chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.hsk-feature-chips span {
  padding: 8px 12px;
  border: 1px solid #cedbe3;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 850;
}
.hsk-setup-card {
  position: relative;
  padding: 40px;
  border: 2px solid #17283b;
  border-radius: 18px;
  background: #fff;
  box-shadow: 12px 14px 0 #17283b;
}
.hsk-card-mark {
  position: absolute;
  top: -23px;
  right: 30px;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: #fff;
  border: 2px solid #17283b;
  border-radius: 50%;
  background: #d94838;
  font-size: 18px;
  font-weight: 950;
  transform: rotate(7deg);
}
.hsk-setup-card h2 { margin: 8px 0 28px; font-size: 27px; }
.hsk-setup-card label, .hsk-mode-field legend { display: block; margin: 17px 0 7px; font-size: 12px; font-weight: 900; }
.hsk-field-note { margin: 7px 2px 0; color: #718193; font-size: 10px; line-height: 1.5; }
.hsk-setup-card select { background-color: #f8f6f0; }
.hsk-setup-card select:disabled { color: #7a8791; cursor: not-allowed; }
.hsk-mode-field { margin: 20px 0; }
.hsk-mode-options { display: grid; gap: 7px; }
.hsk-mode-options button {
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ced8df;
  border-radius: 9px;
  background: #f7fafb;
  text-align: left;
}
.hsk-mode-options button.selected { color: #fff; border-color: #0b706b; background: linear-gradient(135deg, #0b706b, #0d7f79); }
.hsk-mode-options button:disabled:not(.selected) { opacity: .55; cursor: not-allowed; }
.hsk-mode-options b { font-size: 12px; }.hsk-mode-options small { font-size: 9px; }
.hsk-start-button {
  width: 100%;
  padding: 15px;
  color: #7a8791;
  border: 1px solid #cbd5dc;
  border-radius: 999px;
  background: #eef2f4;
  font-size: 12px;
  font-weight: 900;
  cursor: not-allowed;
}
.hsk-local-note { margin: 12px 8px 0; color: #778797; font-size: 9px; line-height: 1.55; text-align: center; }
.hsk-pinyin-toggle {
  margin: 0 0 18px !important;
  display: flex !important;
  align-items: center;
  gap: 9px;
  color: #53677b;
}
.hsk-pinyin-toggle input { width: 17px; height: 17px; accent-color: #0d7f79; }
.hsk-live-start {
  width: 100%;
  padding: 16px 20px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b706b, #0d7f79);
  box-shadow: 0 14px 28px rgba(23,168,160,.24);
  font-weight: 900;
}
.hsk-live-start:disabled { color: #7a8791; background: #eef2f4; box-shadow: none; cursor: not-allowed; }
.hsk-card-anatomy, .hsk-roadmap { max-width: 1160px; margin: auto; padding: 90px 48px; }
.hsk-card-anatomy {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 80px;
  align-items: center;
  border-top: 1px solid #dce5ea;
}
.hsk-section-heading h2 { margin: 10px 0 15px; font-size: clamp(30px, 4vw, 50px); line-height: 1.12; letter-spacing: -.055em; }
.hsk-section-heading > p:last-child { color: #657789; line-height: 1.7; }
.hsk-demo-card {
  overflow: hidden;
  border: 1px solid #cddae2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(16,32,51,.13);
}
.hsk-demo-top { padding: 18px 20px; display: flex; align-items: center; gap: 13px; color: #6b7c8d; font-size: 10px; font-weight: 900; }
.hsk-stars { margin-right: auto; color: #0d7f79; letter-spacing: 1px; }
.hsk-demo-top button { width: 36px; height: 36px; color: #fff; border: 0; border-radius: 50%; background: #0d7f79; }
.hsk-demo-word { padding: 25px 24px 30px; display: grid; place-items: center; background: #fff8e5; }
.hsk-demo-word small { color: #9a6a2b; font-size: 10px; font-weight: 900; }
.hsk-demo-word strong { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 70px; line-height: 1.15; }
.hsk-demo-word span { color: #c74638; font-size: 19px; font-weight: 850; }
.hsk-demo-answer { padding: 20px; display: grid; gap: 10px; }
.hsk-demo-answer div { padding: 11px 13px; border-radius: 10px; background: #f5f8fa; }
.hsk-demo-answer small, .hsk-demo-answer b { display: block; }.hsk-demo-answer small { margin-bottom: 3px; color: #728395; font-size: 9px; }.hsk-demo-answer b { font-size: 12px; }
.hsk-demo-actions { padding: 0 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.hsk-demo-actions button { padding: 12px; border: 1px solid #ccd7de; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 900; }
.hsk-demo-actions button:last-child { color: #fff; border-color: #0d7f79; background: #0d7f79; }
.hsk-roadmap { border-top: 1px solid #dce5ea; }
.hsk-roadmap ol { margin: 42px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; list-style: none; }
.hsk-roadmap li { min-height: 180px; padding: 21px; border: 1px solid #d5e0e6; border-radius: 16px; background: #fff; }
.hsk-roadmap li > span { display: block; margin-bottom: 26px; color: #d94838; font-size: 13px; font-weight: 950; }
.hsk-roadmap b { font-size: 15px; }.hsk-roadmap li p { margin: 8px 0 0; color: #657789; font-size: 11px; line-height: 1.65; }
.hsk-footer { max-width: 1160px; margin: auto; }
.hsk-study-shell .brand span, .hsk-listening-shell .brand span, .focus-shell .brand span { color: #fff; background: #d94838; }
.hsk-word-card { min-height: 470px; }
.hsk-word-area { padding: 15px 4px 18px; text-align: center; }
.hsk-word-area h2 { margin: 7px 0 3px; }
.hsk-hanzi-sound {
  padding: 0;
  color: #17283b;
  border: 0;
  background: none;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(45px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.15;
}
.hsk-pinyin { margin: 6px 0 9px; color: #c74638; font-size: 18px; font-weight: 850; }
.hsk-meaning { padding: 17px 2px; border-top: 1px solid rgba(23,168,160,.22); }
.hsk-meaning-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hsk-meaning-head .japanese { margin: 0; font-size: 24px; font-weight: 900; }
.hsk-meaning-head small { color: #718292; font-size: 10px; }
.hsk-note { margin: 7px 0 13px; color: #53677b; font-size: 11px; line-height: 1.55; }
.hsk-example {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d6e1e7;
  border-radius: 12px;
  background: rgba(255,255,255,.68);
  text-align: left;
}
.hsk-example b, .hsk-example span, .hsk-example small { display: block; }
.hsk-example b { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 16px; }
.hsk-example span { margin-top: 4px; color: #c74638; font-size: 12px; font-weight: 750; }
.hsk-example small { margin-top: 5px; color: #53677b; font-size: 11px; line-height: 1.45; }
.hsk-grammar { margin: 9px 2px 0; color: #718292; font-size: 9px; }
.hsk-focus-row strong i { margin-left: 7px; color: #c74638; font-size: 13px; font-style: normal; font-weight: 750; }
.hsk-listening-answer { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.hsk-listening-answer i { margin-left: 7px; color: #c74638; font-size: .58em; font-style: normal; }
.hsk-memory-example { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-style: normal; }
.hsk-memory-example i { display: block; margin-top: 4px; color: #b34b20; font-size: 12px; font-style: normal; }
.hsk-memory-example small { margin-top: 4px; font-family: "Noto Sans JP", system-ui, sans-serif; }

@media (max-width: 900px) {
  .hsk-hero { grid-template-columns: 1fr; gap: 55px; padding-top: 45px; }
  .hsk-card-anatomy { grid-template-columns: 1fr; gap: 42px; }
  .hsk-roadmap ol { grid-template-columns: 1fr 1fr; }
  .hsk-word-card { min-height: 430px; }
}
@media (max-width: 620px) {
  .hsk-nav { align-items: flex-start; }
  .hsk-nav-actions { flex-direction: column; align-items: flex-end; }
  .hsk-status-dot { display: none; }
  .hsk-hero, .hsk-card-anatomy, .hsk-roadmap { padding-right: 20px; padding-left: 20px; }
  .hsk-hero-copy h1 { font-size: 49px; }
  .hsk-setup-card { padding: 32px 23px; box-shadow: 7px 9px 0 #17283b; }
  .hsk-roadmap ol { grid-template-columns: 1fr; }
  .hsk-demo-actions { grid-template-columns: 1fr; }
  .hsk-footer { height: auto; padding: 22px 20px; gap: 8px; flex-direction: column; align-items: flex-start; }
}
.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.priority-badge {
  display: inline-flex;
  align-items: center;
  color: #0d7f79;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}
.empty-stars { color: #d7e2e8; }
.audio-button {
  width: 38px;
  height: 38px;
  border: 0;
  background: linear-gradient(135deg, #0b706b, #17a8a0);
  box-shadow: 0 8px 18px rgba(23,168,160,.24);
}
.meaning { border-top: 1px solid rgba(23,168,160,.22); }
.word-picture {
  border: 1px solid rgba(23,168,160,.25);
  border-radius: 16px;
  background: #e8f7f4;
  box-shadow: none;
}
.known-button, .not-yet-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
}
.known-button {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0b706b, #0d7f79);
}
.toast {
  background: var(--navy);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(16,32,51,.22);
}
.complete-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--brand-shadow);
}

@media (max-width: 960px) {
  .hero { gap: 30px; }
}
@media (max-width: 720px) {
  .topbar, .study-nav { height: 68px; padding-inline: 18px; }
  .hero { padding: 35px 20px 70px; }
  .setup-card { box-shadow: var(--brand-shadow); }
  .priority-badge { font-size: 13px; }
}

/* Short-term memory curve mode */
.curve-shell { padding-bottom: 44px; background: radial-gradient(circle at 50% 14%,rgba(23,168,160,.1),transparent 34rem); }
.curve-file-tools { width: min(960px,calc(100% - 40px)); margin: 16px auto -8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.curve-file-tools button { padding: 8px 12px; color: #0b706b; border: 1px solid rgba(13,127,121,.28); border-radius: 10px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 900; transition: color .15s,background .15s,border-color .15s,transform .15s; }
.curve-file-tools button:hover { color: #fff; border-color: #0b605d; background: #0b706b; transform: translateY(-1px); }
.curve-file-tools small { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 700; }
.curve-nav-progress { min-width: min(42vw,430px); display: grid; grid-template-columns: minmax(120px,1fr) auto; align-items: center; gap: 4px 12px; }
.curve-nav-progress > div { height: 8px; overflow: hidden; border-radius: 999px; background: #dce7eb; }
.curve-nav-progress > div span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#17a8a0,#0b706b); transition: width .35s; }
.curve-nav-progress b { font-size: 12px; }.curve-nav-progress small { grid-column: 2; color: var(--muted); font-size: 10px; }
.curve-stage { width: min(960px,calc(100% - 40px)); margin: 0 auto; padding: 34px 0 20px; }
.curve-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.curve-heading h1 { margin: 7px 0 5px; font-size: clamp(30px,4.5vw,52px); letter-spacing: -.055em; }
.curve-heading > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.curve-stats { display: flex; gap: 7px; }
.curve-stats span { min-width: 50px; padding: 8px 9px; display: grid; grid-template-columns: auto auto; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.88); font-size: 11px; }
.curve-stats b { font-size: 14px; }.curve-stats .grade-a b { color: #0b706b; }.curve-stats .grade-b b { color: #3979a8; }.curve-stats .grade-c b { color: #b87818; }.curve-stats .grade-d b { color: #c45145; }
.curve-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.97); box-shadow: 0 25px 70px rgba(16,32,51,.13); }
.curve-card-top { padding: 14px 21px; display: flex; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); background: #f7fafb; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.curve-sound { width: 100%; padding: 20px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #fff; border: 0; background: linear-gradient(135deg,#0b706b,#17a8a0); }
.curve-sound > span { display: grid; width: 34px; height: 34px; place-items: center; color: #0b706b; border-radius: 50%; background: #fff; }.curve-sound b { font-size: 16px; }.curve-sound small { opacity: .75; font-size: 9px; }
.curve-example-hint { width: fit-content; margin: 14px auto 0; padding: 9px 15px; display: grid; grid-template-columns: auto auto; gap: 1px 8px; color: #0b706b; border: 1px solid rgba(13,127,121,.28); border-radius: 999px; background: #e8f7f4; }
.curve-example-hint > span { grid-row: 1 / 3; align-self: center; font-size: 18px; }.curve-example-hint b { font-size: 11px; }.curve-example-hint small { color: var(--muted); font-size: 8px; font-weight: 700; }
.curve-content { min-height: 270px; padding: 28px 36px; display: grid; align-content: center; }
.curve-listen-only { color: #708190; text-align: center; }.curve-listen-only span { display: block; margin-bottom: 13px; color: #17a8a0; font-size: 70px; line-height: 1; }.curve-listen-only p { margin: 0; font-size: 15px; font-weight: 700; }
.curve-word { position: relative; text-align: center; }.curve-word > p,.curve-example > p { margin: 0 0 8px; color: #0b706b; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.curve-word h2 { margin: 0; font-size: clamp(44px,7vw,76px); line-height: 1.08; letter-spacing: -.05em; }.curve-word > button { position: absolute; top: 22px; right: 0; width: 38px; height: 38px; color: #0b706b; border: 1px solid rgba(13,127,121,.25); border-radius: 50%; background: #e8f7f4; }
.curve-example { margin-top: 24px; padding: 18px 20px; border: 1px solid #dce7eb; border-radius: 15px; background: #f7fafb; text-align: center; }.curve-example strong { display: block; font-family: Georgia,"Times New Roman",serif; font-size: clamp(18px,2.4vw,25px); line-height: 1.55; }.curve-example button { margin-top: 12px; padding: 7px 11px; color: #0b706b; border: 1px solid rgba(13,127,121,.25); border-radius: 999px; background: #e8f7f4; font-size: 10px; font-weight: 900; }
.curve-answer { margin-top: 22px; padding-top: 22px; display: grid; grid-template-columns: 105px 1fr; align-items: center; gap: 22px; border-top: 1px solid var(--line); }.curve-visual { display: grid; width: 105px; height: 105px; place-items: center; color: #0b706b; border-radius: 24px; background: linear-gradient(145deg,#e4f6f2,#d7ebe7); font-size: 48px; font-weight: 900; }
.curve-part { margin: 0 0 5px; color: #0b706b; font-size: 10px; font-weight: 900; }.curve-answer h3 { margin: 0; font-size: 25px; }.curve-answer p:not(.curve-part) { margin: 7px 0; font-size: 14px; }.curve-answer small { color: var(--muted); }
.curve-actions { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; padding: 18px 22px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }.curve-actions button { min-height: 68px; padding: 13px 18px; border-radius: 15px; }.curve-actions button b,.curve-actions button small,.curve-actions button span { display: block; }
.curve-known { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; color: #fff; text-align: left; border: 0; background: linear-gradient(135deg,#0b706b,#17a8a0); box-shadow: 0 12px 24px rgba(13,127,121,.18); }.curve-known > span { grid-row: 1 / 3; align-self: center; font-size: 25px; }.curve-known b { font-size: 14px; }.curve-known small { opacity: .72; font-size: 9px; }.curve-known.grade-d { background: linear-gradient(135deg,#a95449,#cf7468); }
.curve-reveal { display: grid; grid-template-columns: 1fr auto; color: var(--ink); text-align: left; border: 1px solid #d5e1e9; background: #fff; }.curve-reveal b { font-size: 12px; }.curve-reveal span { grid-column: 1; margin-top: 3px; color: #0b706b; font-size: 11px; font-weight: 900; }.curve-reveal small { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 9px; }
.curve-rule { margin-top: 14px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); font-size: 10px; }.curve-rule b { color: var(--ink); }.curve-rule span::before { content: "• "; color: #17a8a0; }
.curve-complete { margin-top: 80px; }.curve-complete-stats { margin: 18px 0 24px; display: flex; justify-content: center; gap: 8px; }.curve-complete-stats span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 11px; }.curve-complete-stats b { margin-right: 6px; color: #0b706b; }
@media (max-width: 760px) {
  .curve-nav-progress { min-width: 0; grid-template-columns: 90px auto; }.curve-nav-progress small { display: none; }
  .curve-stage { width: min(100% - 24px,960px); padding-top: 22px; }.curve-heading { display: block; }.curve-stats { margin-top: 15px; }
  .curve-file-tools { width: min(100% - 24px,960px); margin-bottom: 0; }.curve-file-tools small { width: 100%; margin-left: 0; }
  .curve-content { min-height: 250px; padding: 24px 20px; }.curve-actions { grid-template-columns: 1fr; padding: 14px; }
  .curve-answer { grid-template-columns: 72px 1fr; gap: 14px; }.curve-visual { width: 72px; height: 72px; border-radius: 18px; font-size: 34px; }
  .curve-rule { display: grid; }.curve-sound small { display: none; }
}
