/* Adapted from the five generated screens in Stitch project 8530891724675744808.
   Design reference: englup-work/stitch-reference. Learning state stays in the existing engines. */
:root {
  --st-primary: #006948;
  --st-primary-ink: #006948;
  --st-ink: #0b1c30;
  --st-muted: #565e74;
  --st-line: #e2e8f0;
  --st-surface: #f8f9ff;
  --st-low: #eff4ff;
  --st-container: #e5eeff;
  --st-inverse: #213145;
  --st-mint: #68dba9;
  --ink: var(--st-ink);
  --muted: var(--st-muted);
  --green: var(--st-primary);
  --learn-ink: var(--st-ink);
  --learn-emerald: var(--st-primary);
  --learn-canvas: var(--st-surface);
  --ev-blue: var(--st-primary);
}
html { background: #e9edf4; -webkit-text-size-adjust: 100%; }
body { color: var(--st-ink); font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; letter-spacing: -.015em; }
button, a, input, textarea { touch-action: manipulation; }
button, a.button { font-weight: 600; }
:focus-visible { outline: 3px solid #00855d; outline-offset: 3px; }
::selection { color: #0b1c30; background: #bdeed8; }

/* Home: quiet cards, secondary word challenge, and one factual record panel. */
.shell, .vocab-shell, body:has(#skills-app), body:has(.layout), body.daily-shell { background: var(--st-surface); }
.shell > header, .vocab-top, .sk-header, .daily-shell > header { min-height: 56px; background: #f8f9fff2; border-bottom: 1px solid #e8edf5; box-shadow: 0 1px 8px #0b1c3005; backdrop-filter: blur(16px); }
.brand span, .daily-brand-mark { background: var(--st-primary); color: #fff; border-radius: 9px; box-shadow: none; }
.shell > header > span { background: var(--st-container); color: #3f465c; font-size: 11px; padding: 4px 7px; }
.shell .section-top h1 { font-size: 20px; font-weight: 700; }
.shell main { padding-top: 10px; }
.track { border: 0; border-radius: 16px; padding: 15px 14px; box-shadow: 0 2px 9px #0b1c3005; background: #fff; }
.track .icon { width: 38px; height: 40px; background: var(--st-low); color: var(--st-primary); }
.track h2 { font-size: 16px; line-height: 22px; }
.track p { color: var(--st-muted); font-size: 13px; }
.track small { font-size: 12px; color: #565e74; }
.track.skills .icon { background: #e1f5ea; }
.word-card { border: 0; background: var(--st-low); border-radius: 12px; min-height: 66px; box-shadow: none; }
.word-badge { background: var(--st-container); color: var(--st-primary); }
.word-card h2 { font-size: 15px; }
.word-card p { color: var(--st-muted); }
.growth-panel { border: 0; box-shadow: 0 2px 9px #0b1c3005; border-radius: 16px; }
.stats strong { font-size: 22px; font-weight: 700; color: var(--st-ink); }
.stats span, .growth-caption { color: var(--st-muted); }
.shell > nav { background: #f8f9fff2; border-top-color: #e3e9f2; }
.shell > nav a[aria-current] { background: #def3e8; color: var(--st-primary); }

/* The integrated daily lesson now uses the same Stitch system. */
.daily-shell { min-height: 100dvh; box-shadow: 0 0 40px #0b1c3005; }
.daily-shell > header { padding: 9px 16px; gap: 8px; }
.daily-shell > header a { gap: 8px; }
.daily-shell > header b { font-size: 17px; }
.daily-brand-mark { display: grid; place-items: center; width: 30px; height: 32px; font-size: 17px; font-weight: 700; }
.daily-shell > header > span { color: var(--st-muted); font-size: 11px; }
.daily-shell main { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.daily-shell nav { padding: 4px; gap: 2px; margin-bottom: 14px; border-radius: 12px; background: var(--st-low); }
.daily-shell nav span { min-height: 44px; padding: 6px 0; justify-content: center; font-size: 11px; line-height: 16px; color: #5c647a; border-radius: 9px; }
.daily-shell nav small { font-size: 10px; line-height: 14px; }
.daily-shell nav .current { color: #fff; background: var(--st-primary); box-shadow: 0 2px 5px #00694812; }
.daily-shell nav .done { background: #dff2e8; color: var(--st-primary); }
.daily-shell h1 { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -.025em; }
.daily-shell h2 { font-size: 17px; line-height: 24px; font-weight: 650; }
.daily-shell h3 { font-size: 15px; line-height: 22px; }
.daily-shell p { font-size: 14px; line-height: 22px; }
.daily-shell .kicker { font-size: 11px; line-height: 16px; letter-spacing: .01em; color: var(--st-primary); }
.daily-shell .card { border: 0; border-radius: 16px; padding: 16px; box-shadow: 0 2px 10px #0b1c3005; margin-bottom: 12px; }
.daily-shell .micro-intro { padding: 0 2px 10px; margin-bottom: 0; background: transparent; box-shadow: none; }
.daily-shell .micro-intro h1 { font-size: 17px; line-height: 24px; margin-bottom: 4px; }
.daily-shell .micro-intro .kicker { margin: 0 0 3px; }
.daily-shell .micro-intro > p:not(.kicker) { margin: 4px 0; color: var(--st-muted); font-size: 13px; line-height: 20px; }
.daily-shell .micro-intro .precheck-link { padding: 4px 0; min-height: 44px; margin: 0; border: 0; border-radius: 5px; background: transparent; font-size: 12px; color: var(--st-primary); text-decoration: underline; text-underline-offset: 4px; }
.daily-shell .micro-actions { margin-top: 10px; padding: 12px; }
.daily-shell .micro-actions > .secondary { width: 100%; margin-bottom: 0; }
.daily-shell button, .daily-shell .button { min-height: 46px; border-radius: 12px; padding: 11px 14px; background: var(--st-primary); color: #fff; font-size: 14px; line-height: 20px; }
.daily-shell button:disabled { opacity: .44; }
.daily-shell .secondary, .daily-shell a.button.secondary { color: var(--st-primary); background: var(--st-low); border-color: transparent; }
.daily-shell .question { margin-top: 16px; padding-top: 16px; border-color: #e9edf4; }
.daily-shell .question form > label { font-weight: 600; color: var(--st-ink); line-height: 23px; }
.daily-shell input[type=text], .daily-shell textarea { border: 1px solid #cad4e1; border-radius: 12px; padding: 12px; min-height: 48px; font-size: 16px; background: #fbfcff; }
.daily-shell input[type=text]:focus, .daily-shell textarea:focus { border-color: #00855d; box-shadow: 0 0 0 3px #00855d12; }
.daily-shell .passage { background: var(--st-low); color: var(--st-ink); font-size: 16px; line-height: 27px; padding: 15px; border-radius: 12px; }
.daily-shell .feedback { font-size: 13px; line-height: 21px; padding: 12px; background: var(--st-low); }
.daily-shell .feedback.good { background: #e4f5ec; color: #005137; }
.daily-shell .teaching, .daily-shell .writing-guide { border: 0; border-radius: 12px; background: var(--st-low); padding: 14px; }
.daily-shell .teaching .passage { background: #fff; }
.daily-shell .writing-guide p { padding: 10px; border-radius: 10px; background: #fff; font-size: 13px; }
.daily-shell .writing-guide small { display: block; font-size: 11px; line-height: 18px; }
.daily-shell .check { padding: 10px; background: var(--st-low); border-radius: 10px; font-size: 13px; }
.daily-shell .footer-note, .daily-shell .footer-note p { font-size: 11px; color: var(--st-muted); }
.daily-shell .sticky-next { bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 5px 18px #00694818; }

/* Vocabulary / reading / factual records share the same surfaces. */
body:has(.vocab-shell) .ev-panel, body:has(#skills-app) .sk-card, #vocabEmbed .ev-panel { border: 0; background: #fff; border-radius: 16px; box-shadow: 0 2px 10px #0b1c3005; }
body:has(.vocab-shell) .ev-action-grid article, #vocabEmbed .ev-action-grid article { background: var(--st-low); border: 0; border-radius: 12px; }
body:has(.vocab-shell) button, #vocabEmbed button, body:has(#skills-app) .sk-card button { background: var(--st-primary); border-radius: 12px; font-size: 14px; font-weight: 600; min-height: 46px; }
body:has(.vocab-shell) .ev-speak, #vocabEmbed .ev-speak, body:has(.vocab-shell) .ev-secondary, #vocabEmbed .ev-secondary, body:has(#skills-app) .sk-card .sk-secondary { color: var(--st-primary)!important; background: var(--st-low)!important; }
body:has(.vocab-shell) .ev-word, #vocabEmbed .ev-word { font-size: 32px!important; line-height: 42px; letter-spacing: -.02em; color: var(--st-ink); }
body:has(.vocab-shell) .ev-meaning, #vocabEmbed .ev-meaning { font-size: 17px; line-height: 26px; color: var(--st-ink); }
body:has(.vocab-shell) blockquote, #vocabEmbed blockquote, body:has(#skills-app) .sk-passage { background: var(--st-low); border: 0; border-radius: 12px; font-size: 16px; line-height: 26px; }
body:has(.vocab-shell) .ev-stats div, body:has(#skills-app) .sk-results div { background: var(--st-low); border: 0; border-radius: 12px; }
body:has(#skills-app) .sk-steps { background: var(--st-low); padding: 4px; border-radius: 12px; gap: 2px; }
body:has(#skills-app) .sk-steps li { border: 0; border-radius: 8px; background: transparent; font-size: 11px; line-height: 18px; }
body:has(#skills-app) .sk-steps li[aria-current] { color: #fff; background: var(--st-primary); }
body:has(#skills-app) .sk-option { background: #fff; border: 1px solid #dce4ed; border-radius: 12px; padding: 13px 12px; }
body:has(#skills-app) .sk-option:has(input:checked) { border-color: var(--st-primary); background: #e6f5ed; }

/* Tutor player: textbook context, a clear key sentence, synced caption and controls. */
body:has(.layout) .video-frame { border: 0; border-radius: 16px; background: var(--st-inverse); box-shadow: 0 3px 12px #0b1c300c; }
body:has(.layout) .video-top { min-height: 40px; background: var(--st-inverse); padding: 10px 12px; }
body:has(.layout) .video-top span { font-size: 11px; color: #eaf1ff; }
body:has(.layout) .video-top span:last-child { color: #d6e0ef; }
body:has(.layout) .video-art { padding: 126px 12px 12px; background: var(--st-inverse); }
body:has(.layout) .video-art .book-background { height: 148px; opacity: .48; object-position: center 42%; }
body:has(.layout) .video-art::before { background: linear-gradient(180deg,#21314500,#21314533 70%,#213145); }
body:has(.layout) .focus-card { padding: 14px; background: #17283ded; border: 1px solid #ffffff15; box-shadow: none; border-radius: 12px; }
body:has(.layout) .focus-card h2 { font-size: 16px; line-height: 23px; margin: 5px 0 10px; }
body:has(.layout) .focus-card .video-tag { font-size: 11px; color: #9be4c4; }
body:has(.layout) .focus-card p:not(.video-tag) { font-size: 13px; line-height: 21px; }
body:has(.layout) .focus-card .scene-example { margin: 0 0 13px; padding: 12px; background: #ffffff09; border-radius: 10px; }
body:has(.layout) .scene-example strong { display: block; color: #c5f6df; font-size: 20px; line-height: 28px; font-weight: 650; letter-spacing: 0; }
body:has(.layout) .scene-example span { display: block; margin-top: 4px; color: #d3deed; font-size: 12px; line-height: 19px; }
body:has(.layout) .focus-card p b, body:has(.layout) .vocab-row > b { color: #b8edda; background: #ffffff0c; border-radius: 5px; font-size: 10px; }
body:has(.layout) .vocab-list { gap: 6px; }
body:has(.layout) .vocab-speak { min-height: 44px; font-size: 13px; background: #ffffff0b; border: 1px solid #ffffff20; border-radius: 9px; color: #f1f5ff; padding: 8px; }
body:has(.layout) .vocab-listen { color: #b9ead3; font-size: 11px; }
body:has(.layout) .focus-card .vocab-hint { font-size: 11px; line-height: 17px; color: #c2cfdf; margin-bottom: 0; }
body:has(.layout) .book-source { top: 88px; right: 12px; min-height: 36px; display: flex; align-items: center; padding: 7px 10px; font-size: 11px; box-shadow: none; color: #0b1c30; }
body:has(.layout) .video-caption { padding: 12px 14px; min-height: 94px; background: #101f32; font-size: 14px; line-height: 23px; }
body:has(.layout) .caption-label { color: #b3edcf; background: #ffffff12; font-size: 10px; border-radius: 4px; }
body:has(.layout) .video-progress { height: 4px; background: #ffffff20; }
body:has(.layout) .video-progress i { background: var(--st-mint); }
body:has(.layout) .scene-seek { padding: 8px 10px; gap: 8px; background: var(--st-inverse); }
body:has(.layout) .seek-btn { width: 44px; height: 44px; background: #ffffff08; border: 1px solid #ffffff18; border-radius: 10px; }
body:has(.layout) .seek-count { font-size: 11px; color: #d6e0ef; }
body:has(.layout) #lectureSeek { accent-color: #68dba9; min-height: 44px; }
body:has(.layout) .video-controls { gap: 8px; margin-top: 10px; }
body:has(.layout) .video-controls .btn { min-height: 46px; font-size: 13px; border-radius: 12px; font-weight: 600; }
body:has(.layout) .btn.primary { background: var(--st-primary); color: #fff; box-shadow: none; }
body:has(.layout) .video-controls .secondary { background: var(--st-low); border-color: transparent; color: var(--st-primary); }
body:has(.layout) .video-controls .fine { display: none; }
body:has(.layout) .lecture-status { padding: 10px 12px; background: var(--st-low); border: 0; border-radius: 10px; font-size: 12px; line-height: 19px; color: var(--st-muted); }
body:has(.layout) .voice-settings { margin: 6px 0 10px; font-size: 12px; color: var(--st-muted); }
body:has(.layout) .voice-settings summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
body:has(.layout) .voice-settings summary::before { content: '⌄'; }
body:has(.layout) .tts-panel { background: var(--st-low); border: 0; padding: 12px; border-radius: 12px; }
body.lecture-embed { box-shadow: none; }
body.lecture-embed .layout { width: 100%; max-width: none; margin: 0; padding: 0; gap: 0; }
body.lecture-embed .stage-card.lesson-start { padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
body.lecture-embed .video-art { padding-top: 100px; }
body.lecture-embed .video-art .book-background { height: 124px; }
body.lecture-embed .book-source { top: 59px; }
body:has(.layout) .vocab-row > b { justify-self: start; width: fit-content; }
body:has(.layout) .vocab-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
body:has(.layout) .vocab-speak { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-height: 55px; text-align: left; }
body:has(.layout) .vocab-speak > span:first-child { overflow-wrap: anywhere; }

@media (max-width: 359px) {
  .daily-shell main { padding-inline: 12px; }
  .daily-shell > header { padding-inline: 12px; }
  .daily-shell .card { padding: 14px; }
  .daily-shell nav span { font-size: 10px; }
  body:has(.layout) .scene-example strong { font-size: 18px; line-height: 26px; }
  body:has(.layout) .focus-card { padding: 12px; }
  .track h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; transition: none!important; } }
