/* Learning workspace. The original request console stays hidden. */
:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --panel: #ffffff;
  --panel-deep: #f1f4ee;
  --line: #e1e7de;
  --line-strong: #cad7cb;
  --text: #263c30;
  --muted: #708074;
  --cyan: #2c694f;
  --cyan-dark: #e7f0e8;
  --amber: #9a691d;
  --red: #b3413a;
  --green: #2d714d;
  --blue: #456f99;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { scroll-padding-top: 100px; }
body { font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #92b59d; outline-offset: 4px; }
button { touch-action: manipulation; }
input, select, textarea { border-radius: 10px; background: #fff; color: var(--text); }
input, select { height: 44px; }
input::placeholder { color: #8a978d; }
input:focus, select:focus, textarea:focus { border-color: #729c7f; box-shadow: 0 0 0 3px #dcebdd; }
.field > span, legend { color: var(--muted); font-size: 12px; font-weight: 550; text-transform: none; }
.button { min-height: 42px; border-radius: 10px; padding: 0 18px; font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s; }
.button.primary { background: #2c694f; border-color: #2c694f; color: #fff; }
.button.primary:hover:not(:disabled) { background: #21563f; }
.button.secondary { border-color: var(--line-strong); background: #fff; color: #365b43; }
.button.secondary:hover:not(:disabled) { background: #edf4ec; border-color: #8fae95; }
.button.ghost { color: var(--muted); }
.button.ghost:hover { color: var(--cyan); background: #edf2eb; }
.button.compact { min-height: 36px; font-size: 12px; }
.button:hover:not(:disabled) { filter: none; }
.form-error { color: #91443e; background: #fff3ed; border-color: #e9c8ba; border-radius: 10px; }
.muted { color: var(--muted); }
.study-topbar { position: sticky; top: 0; z-index: 30; min-height: 76px; padding: 0 max(28px, calc((100vw - 1140px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.study-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.study-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #eaf1e7; color: #356b4d; }
.study-brand-mark svg { width: 26px; height: 26px; }
.study-brand h1 { font-size: 21px; letter-spacing: .04em; font-weight: 700; }
.study-nav { align-items: center; gap: 6px; margin: 0; }
.study-nav-button { min-height: 40px; padding: 0 20px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; }
.study-nav-button.active { background: #eaf1e7; color: #2c694f; }
.study-nav-button:hover { color: #2c694f; background: #f0f5ed; }
.study-shell { max-width: 1140px; min-height: calc(100vh - 133px); margin: 0 auto; padding: 44px 24px 64px; }
.study-panel { min-width: 0; }
.offline-pane { padding: 0; border: 0; }
.dictionary-heading { margin-bottom: 24px; display: block; }
.section-kicker { margin: 0 0 10px; color: #6b856b; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.dictionary-heading h2 { display: block; font-size: 32px; font-weight: 650; letter-spacing: -.02em; line-height: 1.45; }
.dictionary-heading .section-subtitle { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.dictionary-search { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; margin: 0; }
.dictionary-search .field { gap: 0; }
.dictionary-search input { height: 54px; padding: 0 18px; font-size: 16px; box-shadow: 0 3px 12px #21332204; border-color: #ccd8cb; border-radius: 13px; }
.dictionary-search .button { height: 54px; border-radius: 13px; }
.dictionary-panel:has(.offline-detail) .dictionary-heading { display: none; }
.offline-results { max-width: none; margin: 24px 0 0; gap: 10px; }
.offline-results > .muted { padding: 30px 0; text-align: center; }
.recent-searches { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.recent-searches > span, .recent-searches > strong { margin-right: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.recent-searches button { padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #4c6854; font-size: 13px; cursor: pointer; }
.recent-searches button:hover { border-color: #a9bda8; background: #edf3e9; }
.dictionary-empty { margin: 14px 0; padding: 50px 32px; border: 1px dashed #d2decc; border-radius: 18px; text-align: center; color: var(--muted); background: #f0f4eb; }
.dictionary-empty h3 { color: #4b6650; font-size: 22px; font-weight: 500; text-transform: none; }
.dictionary-empty p { margin: 12px 0 0; font-size: 14px; }
.dictionary-empty svg { width: 48px; height: 48px; color: #7e9b7a; margin-bottom: 14px; }
.dictionary-empty .button { margin-top: 20px; }
.word-result { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 2fr) auto; align-items: center; gap: 24px; width: 100%; padding: 19px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; color: var(--text); }
.word-result:hover { border-color: #9ab597; background: #fbfdf8; }
.word-result-term { font-family: Georgia, 'Times New Roman', serif; font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.word-result-meaning { color: #617464; font-size: 14px; overflow-wrap: anywhere; }
.word-result-action { color: #729276; font-size: 13px; white-space: nowrap; }
.search-results-heading { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.offline-detail { margin: 0; max-width: none; gap: 20px; }
.detail-backbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-backbar .button { min-height: 30px; padding: 0; font-size: 13px; }
.word-card { overflow: hidden; padding: 28px 32px 24px; border: 1px solid #dbe4d6; border-radius: 20px; background: #fff; box-shadow: 0 6px 28px #23392204; }
.word-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.word-heading > div:first-child { min-width: 0; }
.word-card .word-title { margin: 0 0 6px; color: #234a33; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(36px, 5vw, 54px); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; text-transform: none; overflow-wrap: anywhere; }
.word-meaning { margin: 10px 0 0; color: #425b47; font-size: 18px; line-height: 1.6; }
.voice-picker { display: flex; flex-direction: column; gap: 7px; min-width: 190px; max-width: 260px; color: var(--muted); font-size: 12px; }
.voice-picker label { color: var(--muted); font-size: 12px; }
.voice-picker select { width: 100%; color: #3f6249; background: #f5f8f1; border-color: #dbe5d4; }
.word-phonetics { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 15px 0 0; color: #627561; font-size: 15px; }
.word-phonetics > span { display: inline-flex; gap: 8px; align-items: baseline; }
.word-phonetics small, .word-phonetics b { color: #8b9985; font-size: 11px; font-weight: 500; }
.word-practice { margin-top: 23px; padding-top: 22px; border-top: 1px solid #e8eee3; }
.word-practice-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.word-practice .button { min-height: 40px; }
.word-practice .button:disabled { opacity: .55; }
.word-practice audio[hidden] { display: none !important; }
.word-practice p { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.word-practice .split-list { gap: 9px; margin: 15px 0 0; }
.word-practice .split-list li { padding: 0; border: 0; background: transparent; }
.word-practice .split-audio-play { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border: 1px solid #d9e5d1; border-radius: 10px; background: #f2f7ed; color: #385d3b; }
.split-audio-play strong { font-size: 17px; font-weight: 600; }
.split-audio-play span { font-size: 14px; color: #798d71; }
.split-audio-play:hover:not(:disabled) { background: #e8f1df; border-color: #a1bc91; }
.split-audio-play:disabled { opacity: .6; }
#split-play-status { min-height: 20px; display: block; margin: 11px 0 0; font-size: 12px; color: #7c8d76; }
.detail-tabs { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid #dce5d5; padding: 2px 4px 0; }
.detail-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -1px; padding: 12px 0; background: transparent; color: #809077; font-size: 14px; font-weight: 600; cursor: pointer; }
.detail-tabs button.active, .detail-tabs button[aria-selected="true"] { color: #315f39; border-bottom-color: #54804d; }
.detail-content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr); gap: 20px; align-items: start; }
.detail-content-grid > div { min-width: 0; display: grid; gap: 20px; }
.study-section { padding: 23px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; min-width: 0; }
.study-section + .study-section { margin-top: 0; }
.offline-detail .study-section h4 { margin: 0 0 18px; color: #365138; font-size: 16px; font-weight: 650; text-transform: none; }
.study-section > .muted { font-size: 13px; margin-bottom: 0; }
.sentence-list { gap: 0; margin: 0; padding: 0; list-style: none; }
.sentence-list .sentence-card { gap: 9px; padding: 0 0 21px; border: 0; border-bottom: 1px solid #edf0e8; background: transparent; border-radius: 0; }
.sentence-list .sentence-card + .sentence-card { padding-top: 21px; }
.sentence-list .sentence-card:last-child { border-bottom: 0; padding-bottom: 0; }
.sentence-line { color: #38503c; font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.sentence-line .sentence-target { color: #46703c; background: #ecf3e5; border-radius: 4px; }
.sentence-line .sentence-token-active { color: #fff; background: #4c7645; }
.sentence-controls { gap: 9px; align-items: start; flex-direction: column; }
.sentence-controls audio { width: 100%; max-width: 400px; height: 36px; }
.sentence-list em { color: #87927e; font-size: 13px; }
.sentence-playing .sentence-line { color: #234c29; }
.phrase-list, .phonics-list { list-style: none; margin: 0; padding: 0; gap: 0; }
.phrase-list li, .phonics-list li { padding: 12px 0; border-bottom: 1px solid #edf0e8; gap: 4px 12px; }
.phrase-list li:first-child, .phonics-list li:first-child { padding-top: 0; }
.phrase-list li:last-child, .phonics-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.phrase-list li { flex-direction: column; }
.phrase-list li strong { color: #496347; font-size: 15px; font-weight: 550; }
.phrase-list li span { font-size: 13px; color: #84917b; }
.phonics-list li { align-items: center; }
.phonics-list strong { color: #46613e; font-size: 18px; }
.phonics-list span { font-size: 13px; }
.story-text { color: #5c7158; font-size: 14px; line-height: 1.9; }
.detail-memory-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.vocab-update-card { padding: 28px; border-color: var(--line); border-radius: 18px; background: #fff; }
.vocab-update-title h3 { font-size: 18px; }
.vocab-update-profile, .vocab-update-card summary, .vocab-update-phone-row label { color: #6d7d69; }
.vocab-update-status { margin-top: 24px; padding: 20px; border-radius: 12px; background: #f4f7f0; }
.vocab-update-status p { font-size: 14px; }
.vocab-update-status .vocab-update-time { margin-top: 8px; font-size: 12px; }
.vocab-update-rule, .vocab-update-phone-body > p { color: #7d8c75; font-size: 12px; }
.vocab-update-rule { margin-top: 22px; }
.vocab-update-more { margin-top: 12px; gap: 16px; }
.vocab-update-card summary { font-size: 13px; }
.vocab-update-scope { color: #8c9a84; font-size: 11px; margin-top: 16px; }
.vocab-update-details-body pre { border-color: #dce6d5; background: #f7f9f3; color: #526a4c; }
.vocab-update-available { background: #eef6e8; border-color: #b7cdaa; }
.vocab-update-available strong, .vocab-update-download { color: #3b6733; }
.vocab-update-available p { color: #6f8864; }
.vocab-update-feedback { color: #92641d; }
.vocab-update-card[data-state="error"] .vocab-update-badge,
.vocab-update-card[data-state="interrupted"] .vocab-update-badge { color: #ac4d3e; }
.vocab-update-phone-body .vocab-update-phone-saved { color: #56804b; }
footer { padding: 18px 24px; border-top: 1px solid var(--line); color: #94a08e; background: transparent; text-align: center; font-size: 11px; }
@media (max-width: 760px) {
  .study-topbar { padding: 0 20px; }
  .study-shell { padding: 28px 18px 42px; }
  .dictionary-heading h2 { font-size: 28px; }
  .word-card { padding: 22px; }
  .word-heading { gap: 16px; }
  .voice-picker { min-width: 160px; max-width: 190px; }
  .detail-content-grid { grid-template-columns: 1fr; gap: 16px; }
  .detail-content-grid > div { gap: 16px; }
  .study-section { padding: 22px; }
}
@media (max-width: 540px) {
  html { scroll-padding-top: 120px; }
  .study-topbar { min-height: 104px; align-items: stretch; flex-direction: column; gap: 10px; padding: 13px 18px 10px; }
  .study-brand { gap: 8px; }
  .study-brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .study-brand-mark svg { width: 20px; height: 20px; }
  .study-brand h1 { font-size: 18px; }
  .study-nav { width: 100%; gap: 8px; }
  .study-nav-button { flex: 1; min-height: 34px; padding: 0 10px; font-size: 13px; }
  .study-shell { padding: 24px 14px 36px; }
  .dictionary-heading h2 { font-size: 26px; }
  .dictionary-heading .section-subtitle { font-size: 13px; }
  .dictionary-search { grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; }
  .dictionary-search input { height: 49px; font-size: 14px; padding: 0 12px; }
  .dictionary-search .button { height: 49px; padding: 0 10px; font-size: 13px; }
  .offline-results { margin-top: 18px; }
  .word-result { padding: 16px; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .word-result-term { font-size: 23px; }
  .word-result-meaning { grid-column: 1; font-size: 13px; }
  .word-result-action { grid-column: 2; grid-row: 1 / 3; }
  .dictionary-empty { padding: 36px 20px; }
  .dictionary-empty h3 { font-size: 19px; }
  .word-card { padding: 22px 18px 18px; border-radius: 16px; }
  .word-heading { flex-direction: column; gap: 15px; }
  .word-card .word-title { font-size: 43px; }
  .word-meaning { font-size: 16px; }
  .voice-picker { max-width: none; width: 100%; flex-direction: row; align-items: center; gap: 12px; }
  .voice-picker label { flex: 0 0 auto; }
  .voice-picker select { min-width: 0; height: 38px; }
  .word-phonetics { font-size: 14px; gap: 8px 16px; }
  .word-practice { margin-top: 18px; padding-top: 18px; }
  .detail-tabs { gap: 24px; }
  .study-section { padding: 20px 18px; }
  .detail-memory-grid { grid-template-columns: 1fr; }
  .sentence-line { font-size: 17px; }
  .vocab-update-card { padding: 20px 16px; }
  .vocab-update-status { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
