:root { color-scheme: light; --ink: #203f35; --green: #2e5948; --muted: #768176; --paper: #faf9f5; }
* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { height: 100%; overflow: hidden; overscroll-behavior: none; margin: 0; background: #e6e9e3; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
a { color: inherit; }
[hidden] { display: none !important; }
#app-shell { position: relative; max-width: 430px; height: 100dvh; margin: 0 auto; background: var(--paper); }
/* Only the content pane scrolls, and only when its contents exceed the viewport. */
main { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: none; display: flex; flex-direction: column; }
main > .flash { flex: none; }
.daily-page, .simple-page, .sign-in-page, .admin-page { flex: 1 0 auto; }
.development-badge { position: absolute; z-index: 10; top: 3px; right: 6px; color: #9a8c5b; font-size: 9px; letter-spacing: .12em; pointer-events: none; }
.flash { margin: 0; padding: 14px 24px; font-size: 13px; background: #e7efdf; }
.daily-page { padding: max(20px, env(safe-area-inset-top)) 24px max(30px, env(safe-area-inset-bottom)); min-height: 0; display: flex; flex-direction: column; }
.daily-header { display: flex; align-items: center; justify-content: space-between; }
.daily-header-actions { display: flex; align-items: center; gap: 10px; }
.header-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 13px; font-weight: 650; text-decoration: none; }
.existing-account-login { display: inline-block; margin: 8px 0 0; padding: 8px 0; font-size: 13px; color: #58735e; text-underline-offset: 4px; }
.wordmark { font-size: 20px; font-weight: 750; letter-spacing: -.9px; text-decoration: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #547064; background: #efeee7; border: 0; }
.icon-button svg { width: 22px; height: 22px; }
.daily-meta { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #69796b; }
.streak-pill { padding: 8px 12px; background: #efe9d9; border-radius: 24px; color: #7d7049; font-weight: 650; }
.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .16em; color: #8b9b85; }
.muted { color: #8a9188; font-size: 12px; line-height: 1.9; }
.question-card { padding: 28px 25px; border: 1px solid #dce4d5; border-radius: 26px; background: #edf1e8; }
.question-label { display: flex; align-items: center; gap: 7px; color: #6e8164; font-size: 11px; }
.question-dot { width: 5px; height: 5px; border-radius: 50%; background: #9cae88; }
.question-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 7.6vw, 33px); font-weight: 400; line-height: 1.35; letter-spacing: -.8px; margin: 25px 0 24px; overflow-wrap: anywhere; }
.recording-status { min-height: 37px; padding: 0 5px; margin: 27px 0 12px; text-align: center; color: #899186; font-size: 11px; line-height: 1.7; }
.recording-status[role=alert] { color: #a04937; }
.recording-controls { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.record-button { width: 92px; height: 92px; border-radius: 50%; border: 6px solid var(--paper); outline: 1px solid #d8e0d3; background: var(--green); color: #fafaf1; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 13px #34554120; }
.record-button svg { width: 30px; height: 30px; }
.record-button.is-recording { background: #be664e; animation: pulse 1.5s infinite; }
.stop-icon { width: 22px; height: 22px; background: currentColor; border-radius: 5px; }
.record-timer { font-size: 13px; font-variant-numeric: tabular-nums; }
.recording-preview audio { width: 100%; height: 42px; margin: 12px 0; }
.preview-actions { display: flex; gap: 10px; }
.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; min-height: 50px; padding: 15px 20px; border-radius: 15px; text-decoration: none; font-size: 14px; font-weight: 600; }
.primary-button { background: var(--green); color: white; flex: 1; }
.secondary-button { background: #e9ede3; color: var(--green); }
.simple-page { padding: 35px 26px; min-height: 0; }
.simple-header { display: flex; align-items: center; gap: 12px; margin-bottom: 35px; }
.simple-header a { text-decoration: none; font-size: 25px; }
.simple-header h1 { font-size: 20px; }
.settings-email { margin: 0 0 28px; color: #8a9687; font-size: 13px; overflow-wrap: anywhere; }
.settings-links { display: grid; gap: 2px; }
.settings-links a, .settings-links button { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #e8ebe1; padding: 20px 0; text-decoration: none; font-size: 13px; }
.settings-links .danger { color: #a77a64; }
.simple-page > p { font-size: 13px; line-height: 1.9; color: #7d8977; }
.simple-page h2 { font-size: 17px; margin-top: 25px; }
:focus-visible { outline: 2px solid #789269; outline-offset: 4px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px #be664e13; } }
@keyframes appear { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

.translation-button { margin-top: 0; padding: 8px 0; background: transparent; border: 0; color: #657b5a; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.question-translation { margin-top: 0; color: #627655; font-size: 14px; line-height: 1.8; }
.question-translation summary { font-size: 12px; cursor: pointer; }
.question-translation p { margin: 12px 0 0; }
.language-help { margin-top: 24px; text-align: left; }
.answer-help-form { margin: 0; }
.answer-help-form label { display: block; margin-bottom: 9px; font-size: 14px; color: #6d7c63; }
.answer-help-form textarea { width: 100%; padding: 13px; border: 1px solid #dce3d3; border-radius: 13px; background: #fffdf8; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.7; resize: vertical; overscroll-behavior-y: contain; }
.answer-help-form .primary-button { width: 100%; margin-top: 12px; }
.answer-help-result { margin-top: 24px; padding: 21px; background: #edf1e8; border-radius: 15px; overflow-wrap: anywhere; }
.english-answer { margin: 12px 0; font-family: Georgia, serif; font-size: 26px; line-height: 1.4; }
.ipa-answer { margin: 0 0 15px; color: #697c5d; font-family: "DejaVu Sans", "Arial", sans-serif; font-size: 14px; line-height: 1.8; }
.help-error { font-size: 12px; line-height: 1.8; color: #a04937; }

.recording-player { display: grid; justify-items: center; margin: 16px 0; }
.play-recording-button { display: grid; place-items: center; width: 66px; height: 66px; border: 1px solid #dce3d5; border-radius: 50%; background: #edf1e8; color: var(--green); }
.play-recording-button svg { width: 23px; height: 23px; }
.recording-status:empty { min-height: 0; margin: 12px 0; }
.recording-controls { margin-top: 28px; }

.question-card { margin-top: 18px; }

.play-recording-button { position: relative; }
.playback-gauge { position: absolute; inset: -5px; pointer-events: none; }
.playback-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.playback-track { stroke: #dce3d5; stroke-width: 3; }
.playback-fill { stroke: var(--green); stroke-width: 3; stroke-linecap: round; }


.daily-complete { margin: auto 0; padding: 32px 0 18px; text-align: center; }
.completion-medal { position: relative; width: 96px; height: 96px; margin: 0 auto 22px; }
.completion-medal > svg { width: 100%; height: 100%; transform: rotate(-7deg); }
.medal-spark { position: absolute; color: #c2a567; }
.medal-spark-one { top: 5px; right: -23px; font-size: 23px; }
.medal-spark-two { bottom: 4px; left: -25px; font-size: 28px; }
.daily-complete h1 { margin: 0; color: var(--ink); font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.completion-praise { margin: 10px 0 28px; color: #75836b; font-size: 14px; }
.completion-streak { padding: 24px 24px 26px; border: 1px solid #dce4d4; border-radius: 25px; background: #edf1e8; }
.completion-label { display: inline-flex; align-items: center; gap: 5px; color: #708567; font-size: 11px; }
.completion-label > span { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; background: #7e946e; font-size: 10px; }
.completion-count { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin: 12px 0 24px; color: #7c8b71; font-size: 15px; }
.completion-count strong { color: var(--green); font-size: 66px; font-weight: 650; line-height: 1.15; letter-spacing: -3px; }
.completion-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; border-top: 1px solid #dde5d5; padding-top: 22px; }
.completion-day { display: flex; flex-direction: column; align-items: center; gap: 11px; color: #809073; font-size: 11px; }
.completion-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #a5b09a; background: #e0e7d8; font-size: 18px; }
.completion-dot.is-done { background: #557b57; color: #fff; font-size: 15px; }
.completion-day.is-today .completion-dot { outline: 1px solid #789866; outline-offset: 3px; }
.completion-day.is-today > span:first-child { color: var(--green); font-weight: 600; }

.header-date { display: flex; align-items: baseline; gap: 8px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.header-date > span { color: #899180; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.next-practice { margin-top: 20px; padding: 20px 12px 0; }
.next-practice-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #687a5e; }
.next-practice-heading > span:last-child { color: #929a86; font-size: 10px; }
.next-practice-clock { display: block; margin-top: 12px; color: var(--ink); font-size: 25px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.next-practice .primary-button { margin-top: 14px; }
@media (max-width: 350px) { .daily-page { padding-inline: 20px; } .completion-streak { padding-inline: 18px; } .completion-week { gap: 5px; } .next-practice { padding-inline: 2px; } }
@media (max-height: 750px) {
  .daily-complete { padding-top: 20px; padding-bottom: 8px; }
  .completion-medal { width: 74px; height: 74px; margin-bottom: 16px; }
  .completion-praise { margin-bottom: 22px; }
  .completion-streak { padding-top: 19px; padding-bottom: 21px; }
  .completion-count { margin-bottom: 18px; }
  .completion-count strong { font-size: 56px; }
  .completion-week { padding-top: 17px; }
  .next-practice { margin-top: 16px; padding-top: 14px; }
}

.guest-save { width: 100%; margin: 26px 0; }
.guest-save .primary-button { display: flex; justify-content: center; text-decoration: none; }
.guest-save p { color: #7c8b70; font-size: 14px; margin-top: 12px; }
.practice-saved { background: #e6eddf; color: #234b3d; border-radius: 18px; padding: 16px 22px; margin: 22px 0; font-weight: 600; }

.first-practice-hint { text-align: center; color: #526e55; font-size: 16px; font-weight: 500; line-height: 1.65; margin: 22px 0 0; }
.first-practice-hint span { display: inline-block; margin-left: 3px; }

.language-page { flex: none; width: 100%; max-width: 460px; margin: 0 auto; padding: 44px 24px 24px; }
.language-page:has(.existing-account-login) { padding-top: 28px; }
.language-heading { text-align: center; margin-bottom: 30px; }
.language-mark { display: flex; justify-content: center; align-items: center; margin-bottom: 24px; color: #345b48; }
.language-mark span { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid #cdddc5; border-bottom-width: 5px; border-radius: 18px; background: #edf3e8; font-size: 28px; font-weight: 800; transform: rotate(-9deg); }
.language-mark span + span { margin-left: -8px; transform: rotate(10deg); background: #f5eacb; border-color: #e0cfa0; }
.language-heading h1 { font-size: 26px; line-height: 1.4; font-weight: 800; letter-spacing: -.6px; margin: 0 0 12px; }
.language-heading p { color: #6c7b69; font-size: 15px; line-height: 1.6; margin: 0; }
.language-options { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.language-option { position: relative; display: flex; align-items: center; gap: 16px; padding: 15px 18px; border: 2px solid #e0e5da; border-bottom-width: 5px; border-radius: 16px; background: #fffdf8; cursor: pointer; transition: border-color .15s, background .15s; }
.language-option:has(input:checked) { background: #edf6e5; border-color: #86ad68; }
.language-option:has(input:focus-visible) { outline: 3px solid #345b48; outline-offset: 4px; }
.language-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.language-letter { display: grid; place-items: center; width: 44px; height: 40px; border-radius: 10px; background: #eef0e9; font-size: 22px; font-weight: 700; }
.language-name { flex: 1; font-weight: 700; font-size: 19px; }
.language-name small { display: block; margin-top: 2px; color: #7c8977; font-size: 12px; font-weight: 400; }
.language-check { visibility: hidden; color: #4e7939; font-size: 24px; font-weight: 800; }
.language-option:has(input:checked) .language-check { visibility: visible; }
.language-footer { position: sticky; bottom: 0; padding: 24px 0 max(12px, env(safe-area-inset-bottom)); background: var(--paper); }
.language-continue { width: 100%; min-height: 54px; border: 0; border-bottom: 5px solid #294b39; border-radius: 15px; background: #487456; color: white; font: inherit; font-weight: 800; cursor: pointer; }
.language-continue:disabled { background: #e3e7dd; color: #9aa393; border-color: #d4dacc; cursor: default; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trial-ended .completion-medal { font-size: 76px; color: #c2a567; }
.trial-ended .question-label { justify-content: center; margin-bottom: 20px; }
.trial-ended h1 { font-size: 27px; line-height: 1.45; }
.trial-coming-soon { border: 1px solid #dce4d5; border-radius: 18px; padding: 20px; color: #6e8164; font-size: 14px; }

.completion-celebration { flex: 1; display: flex; flex-direction: column; margin: 0; padding: 20px 0 0; }
.celebration-hero { margin: auto 0 20px; }
.alpaca-scene { position: relative; display: grid; place-items: center; width: 230px; height: 210px; margin: 0 auto 12px; }
.alpaca-scene::before { content: ""; position: absolute; inset: 26px 24px 12px; border-radius: 50%; background: #f6ead7; }
.celebration-alpaca { position: relative; width: 220px; height: 220px; object-fit: contain; animation: alpaca-arrive .65s cubic-bezier(.2,.8,.3,1) both; }
.celebration-spark { position: absolute; z-index: 1; color: #d9a14c; }
.spark-one { top: 24px; left: 16px; font-size: 25px; transform: rotate(-15deg); }
.spark-two { top: 48px; right: 6px; font-size: 31px; }
.spark-three { bottom: 30px; left: 8px; font-size: 14px; color: #81a88c; }
.completion-celebration h1 { font-size: 31px; font-weight: 800; letter-spacing: -1.3px; }
.completion-celebration .completion-praise { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: #708176; }
.completion-celebration .completion-streak { border: 2px solid #e6e9df; border-radius: 23px; background: #fffefb; padding: 15px 18px 17px; }
.completion-celebration .completion-label { font-size: 11px; color: #6c8571; }
.completion-celebration .completion-count { margin: 4px 0 12px; gap: 7px; font-size: 15px; color: #5f776a; }
.completion-celebration .completion-count strong { font-size: 46px; font-weight: 800; letter-spacing: -2px; color: #2e5948; }
.completion-celebration .completion-week { border-top: 1px solid #eef0e8; padding-top: 13px; gap: 5px; }
.completion-celebration .completion-day { gap: 9px; font-size: 10px; }
.completion-celebration .completion-dot { width: 27px; height: 27px; background: #f0f1e9; color: #c4cabb; font-size: 17px; }
.completion-celebration .completion-dot.is-done { background: #537f64; color: white; font-size: 14px; }
.completion-celebration .completion-day.is-today .completion-dot { outline-color: #9cba97; outline-offset: 2px; }
.celebration-actions { margin-top: auto; padding-top: 20px; }
.share-incentive { margin: 0 0 12px; font-size: 13px; line-height: 1.65; font-weight: 500; color: #61776b; text-wrap: balance; }
.celebration-share-button { width: 100%; min-height: 58px; border-radius: 17px; border-bottom: 5px solid #1f4034; background: #3b7257; color: #fffef9; font-size: 16px; font-weight: 750; transition: transform .12s; }
.celebration-share-button:active { transform: translateY(3px); border-bottom-width: 2px; }
.celebration-share-button svg { width: 21px; height: 21px; }
.share-status { margin: 10px 0 0; color: #6c7c6b; font-size: 12px; line-height: 1.7; }
.share-status:empty { display: none; }
.completion-celebration .next-practice { margin-top: 17px; padding: 0; }
.completion-celebration .next-practice-heading { justify-content: center; font-size: 10px; gap: 8px; color: #8a9688; }
.completion-celebration .next-practice-clock { margin-top: 5px; font-size: 13px; color: #718374; letter-spacing: 1px; }
.completion-celebration .guest-save { margin: 22px 0 0; }
.bonus-back { display: block; align-self: flex-start; margin-top: 20px; font-size: 12px; color: #748772; text-underline-offset: 4px; }
@keyframes alpaca-arrive { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-height: 750px) {
  .completion-celebration { padding-top: 12px; }
  .celebration-hero { margin-bottom: 15px; }
  .alpaca-scene { width: 185px; height: 145px; margin-bottom: 9px; }
  .celebration-alpaca { width: 170px; height: 170px; }
  .alpaca-scene::before { inset: 18px 24px 0; }
  .completion-celebration h1 { font-size: 28px; }
  .completion-celebration .completion-streak { padding-block: 12px; }
  .completion-celebration .completion-count strong { font-size: 39px; }
  .completion-celebration .completion-count { margin-bottom: 9px; }
  .celebration-actions { padding-top: 15px; }
}

.share-card-dialog { width: min(410px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 16px; border: 0; border-radius: 25px; background: #faf9f5; color: var(--ink); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 28px 90px #102f2840; }
.share-card-dialog::backdrop { background: #183c329e; backdrop-filter: blur(5px); }
.share-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.share-card-header h2 { margin: 0 0 0 4px; font-size: 17px; font-weight: 750; }
.share-card-close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #edece4; color: #6b7b6e; font-size: 27px; }
.share-card-language { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.share-card-language-button { min-height: 36px; padding: 7px 13px; border: 1px solid #d7dfd0; border-radius: 12px; background: #eff3e9; color: #315844; font-size: 13px; font-weight: 600; cursor: pointer; }
.share-card-language-button[aria-pressed="true"] { border-color: #78916a; background: #e2eadb; }
.share-card-language-button:disabled { opacity: .5; cursor: wait; }
.share-card-frame { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.share-card-frame > p { font-size: 14px; color: #768771; }
.share-card-image { display: block; width: 100%; height: auto; max-height: 56dvh; object-fit: contain; border-radius: 18px; }
.share-card-send { margin-top: 17px; }
.share-card-download { display: block; margin: 15px auto 2px; width: fit-content; color: #788671; font-size: 13px; text-underline-offset: 4px; }
.share-card-status { margin: 12px 4px 0; color: #768571; font-size: 12px; line-height: 1.65; }
.share-card-status:empty { display: none; }
@media (max-height: 650px) { .share-card-dialog { padding: 12px; } .share-card-image { max-height: 43dvh; } .share-card-send { min-height: 48px; margin-top: 12px; } }

.completion-celebration > .completion-label { align-self: center; }

.record-translation-prompt { max-width: 300px; margin: 0; text-align: center; text-wrap: balance; color: #667c60; font-size: 14px; line-height: 1.75; }
.completion-sentences { width: 100%; margin: 0 0 15px; text-align: left; overflow-wrap: anywhere; }
.completion-sentences h2 { margin: 0 0 7px; font-size: 11px; font-weight: 500; color: #7c8a74; }
.completion-sentences p { margin: 0; color: #315844; font-family: Georgia, serif; font-size: 19px; line-height: 1.45; }
.completion-sentences p + p { margin-top: 7px; }
.completion-celebration:has(.completion-sentences) .alpaca-scene { width: 180px; height: 150px; }
.completion-celebration:has(.completion-sentences) .celebration-alpaca { width: 165px; height: 165px; }
