:root {
  --paper: #fffaf5;
  --paper-deep: #fff3ea;
  --ink: #5b4438;
  --muted: #967d70;
  --coral: #ee8079;
  --coral-soft: #ffd6cd;
  --peach: #f8c4a9;
  --sage: #b9c5a1;
  --blue: #b9ced9;
  --sun: #f5bd68;
  --line: rgba(126, 87, 68, 0.14);
  --shadow: 0 20px 55px rgba(145, 96, 71, 0.1);
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-width: 0; max-width: 100%; overflow-x: hidden; background: #f2e9e2; color: var(--ink); font-family: Manrope, sans-serif; }
body.auth-pending { overflow: hidden; }
.auth-gate[hidden] { display: none; }
.auth-gate { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: radial-gradient(circle at 50% 22%, rgba(255,255,255,.96), rgba(255,241,232,.97) 45%, rgba(239,224,214,.98)); }
.auth-card { width: min(100%, 390px); padding: 32px 25px 26px; border: 1px solid rgba(238,128,121,.3); border-radius: 28px; background: linear-gradient(145deg, #fffdf9, #fff1e9); box-shadow: inset 0 2px 0 #fff, 0 22px 60px rgba(91,68,56,.18); text-align: center; }
.auth-heart { width: 58px; height: 58px; margin-bottom: 16px; filter: drop-shadow(0 7px 10px rgba(213,96,91,.16)); }
.auth-card .eyebrow { justify-content: center; }
.auth-card h2 { margin-bottom: 12px; font-size: 30px; }
.auth-card > p:not(.eyebrow):not(.auth-status) { margin: 0 auto 22px; max-width: 310px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-button { width: 100%; min-height: 52px; padding: 12px 20px; border: 1px solid #f39a94; border-radius: 16px; background: linear-gradient(180deg, #f79791, #e97670); box-shadow: inset 0 2px 0 rgba(255,255,255,.38), 0 5px 0 #ca625e, 0 12px 22px rgba(213,96,91,.24); color: white; cursor: pointer; font-weight: 700; }
.auth-button:disabled { cursor: wait; opacity: .72; }
.auth-secondary { display: block; margin: 14px auto 0; padding: 5px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.auth-secondary[hidden], .auth-support[hidden] { display: none; }
.auth-support { display: inline-block; margin-top: 14px; color: #b96963; font-size: 11px; font-weight: 700; text-underline-offset: 3px; }
.activation-panel[hidden] { display: none; }
.activation-panel { display: grid; gap: 10px; }
.activation-panel label { color: var(--ink); font-size: 11px; font-weight: 700; text-align: left; }
.activation-panel input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #e5c9bd; border-radius: 14px; outline: 0; background: rgba(255,255,255,.8); color: var(--ink); font: 600 13px Manrope, sans-serif; text-transform: uppercase; }
.activation-panel input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(238,128,121,.14); }
.browser-notice { padding: 13px; border: 1px solid #ecd6a8; border-radius: 14px; background: linear-gradient(145deg, #fffaf0, #fff1d6); text-align: left; }
.browser-notice strong, .browser-notice span { display: block; }
.browser-notice strong { color: #8b693f; font-size: 11px; }
.browser-notice ol { margin: 7px 0; padding-left: 20px; color: #8d714f; font-size: 10px; line-height: 1.55; }
.browser-notice span { color: #9b7d58; font-size: 9px; line-height: 1.45; }
.browser-notice button { margin-top: 9px; padding: 6px 9px; border: 1px solid #dfbb7d; border-radius: 9px; background: rgba(255,255,255,.72); color: #936c36; cursor: pointer; font-size: 9px; font-weight: 700; }
.browser-notice button[hidden] { display: none; }
.auth-status { margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff1eb; color: #a65f57; font-size: 12px; line-height: 1.45; }
.auth-card small { display: block; margin: 18px auto 0; max-width: 290px; color: #aa9184; font-size: 10px; line-height: 1.5; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }
.page-shell { width: 100%; max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: Comfortaa, sans-serif; font-size: 12px; line-height: 1.1; text-transform: uppercase; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--coral); border-radius: 50%; color: var(--coral); font-size: 21px; }
.brand strong, .brand small { display: block; font-weight: 700; }
.brand small { margin-top: 3px; color: var(--coral); font-size: 9px; letter-spacing: .12em; }
.streak { color: var(--muted); font-size: 11px; font-weight: 700; }.streak span { color: var(--sun); font-size: 16px; margin-right: 4px; }
#app { width: 100%; min-width: 0; padding: 0 18px 28px; }
.welcome { position: relative; display: flex; justify-content: space-between; padding: 28px 5px 22px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--coral); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; } h1, h2 { font-family: Comfortaa, sans-serif; }
h1 { margin-bottom: 12px; color: var(--ink); font-size: clamp(30px, 8vw, 40px); line-height: 1.08; letter-spacing: -.04em; }
h1 em { color: var(--coral); font-style: normal; }.welcome-copy { max-width: 235px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sun { color: var(--sun); font-size: 29px; padding: 13px 16px 0 0; }.doodle { animation: drift 3s ease-in-out infinite; }
.progress-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.64); }
.progress-copy strong, .progress-copy span { display: block; }.progress-copy strong { font-size: 12px; }.progress-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }.progress-dots { display: flex; gap: 5px; }.progress-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral-soft); }.progress-dot.active { background: var(--coral); transform: scale(1.25); }.progress-dot.done { background: var(--sage); }
.baby-stage { position: relative; min-height: 250px; margin: 14px 0; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, #fff1e7 0%, #f8eee6 55%, #eaf0ea 100%); }
.baby-stage::after { position: absolute; right: 12%; bottom: 27px; left: 12%; height: 12px; border-radius: 50%; background: rgba(126,87,68,.11); content: ''; filter: blur(3px); }
.stage-note { position: absolute; z-index: 3; top: 17px; left: 17px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }.note-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.cloud { position: absolute; width: 70px; height: 18px; border-radius: 40%; background: rgba(255,255,255,.75); }.cloud::before, .cloud::after { position: absolute; bottom: 0; border-radius: 50%; background: inherit; content: ''; }.cloud::before { left: 12px; width: 30px; height: 30px; }.cloud::after { left: 34px; width: 22px; height: 22px; }.cloud-left { top: 73px; left: 25px; transform: scale(.7); opacity: .7; }.cloud-right { top: 45px; right: 20px; transform: scale(.5); opacity: .5; }
.sparkle { position: absolute; z-index: 2; color: var(--sun); font-size: 19px; }.sparkle-one { top: 55px; left: 83px; }.sparkle-two { right: 74px; bottom: 65px; color: var(--coral); }
.baby { position: absolute; z-index: 2; right: calc(50% - 53px); bottom: 26px; width: 106px; height: 175px; transform-origin: 50% 100%; }.baby-halo { position: absolute; top: 2px; left: 7px; width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.48); }.baby-head { position: absolute; z-index: 2; top: 9px; left: 15px; width: 77px; height: 82px; border: 2px solid #e9b08c; border-radius: 49% 51% 47% 49%; background: #f7c5a1; box-shadow: inset -7px -3px 0 rgba(226,146,122,.12); }.baby-ear { position: absolute; top: 34px; width: 12px; height: 20px; border: 2px solid #e9b08c; border-radius: 50%; background: #f7c5a1; }.baby-ear.left { left: -9px; }.baby-ear.right { right: -9px; }.baby-hair { position: absolute; top: -3px; left: 12px; width: 51px; height: 22px; border-radius: 50% 80% 20% 30%; background: #b8795a; transform: rotate(-12deg); }.baby-eye { position: absolute; top: 39px; width: 7px; height: 9px; border-radius: 50%; background: var(--ink); }.baby-eye.left { left: 24px; }.baby-eye.right { right: 24px; }.baby-nose { position: absolute; top: 51px; left: 35px; width: 8px; height: 7px; border-bottom: 2px solid #d58f78; border-radius: 50%; }.baby-mouth { position: absolute; top: 61px; left: 31px; width: 16px; height: 8px; border-bottom: 2px solid #b96b68; border-radius: 50%; }.baby-body { position: absolute; bottom: 2px; left: 19px; width: 68px; height: 93px; border-radius: 45% 45% 25% 25%; background: #f9f2e8; box-shadow: inset -6px 0 0 rgba(235,190,169,.22); }.baby-body::before { position: absolute; top: 19px; left: 29px; width: 10px; height: 10px; border-radius: 50%; background: #efc49a; content: ''; box-shadow: 0 20px #efc49a, 0 40px #efc49a; }.baby-hand { position: absolute; top: 21px; width: 27px; height: 15px; border: 2px solid #e9b08c; border-radius: 50%; background: #f7c5a1; }.baby-hand.left { left: -18px; transform: rotate(29deg); }.baby-hand.right { right: -18px; transform: rotate(-29deg); }.baby-foot { position: absolute; bottom: -8px; width: 30px; height: 18px; border: 2px solid #e9b08c; border-radius: 50%; background: #f7c5a1; }.baby-foot.left { left: 0; transform: rotate(14deg); }.baby-foot.right { right: 0; transform: rotate(-14deg); }.baby-blanket { position: absolute; z-index: 3; bottom: 4px; left: 15px; width: 77px; height: 61px; border-radius: 45% 45% 24% 24%; background: rgba(253,225,208,.86); transform: rotate(-6deg); }
.baby-caption { position: absolute; z-index: 4; bottom: 10px; left: 0; width: 100%; color: var(--ink); text-align: center; font-family: Comfortaa, sans-serif; font-size: 12px; }.heart { color: var(--coral); margin-left: 3px; }
.baby[data-state="listening"] { animation: listen 1s ease-in-out infinite; }.baby[data-state="thinking"] { animation: think .8s ease-in-out infinite; }.baby[data-state="happy"] { animation: happy 1s cubic-bezier(.2,.8,.3,1); }.baby[data-state="try-again"] { animation: tryAgain .55s ease-in-out 2; }.baby[data-state="completed"] { animation: happy 1s ease-in-out; }
.phrase-panel, .speak-panel, .tracker-panel { padding: 21px; border-radius: 18px; }.phrase-panel { background: #fff; border: 1px solid var(--line); }.section-kicker { display: flex; justify-content: space-between; }.section-kicker span { color: var(--muted); }.phrase-panel h2 { margin-bottom: 5px; font-size: 30px; letter-spacing: .02em; }.pinyin { margin-bottom: 2px; color: var(--coral); font-size: 14px; font-style: italic; }.translation { margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.listen-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.listen-button { display: flex; min-width: 0; align-items: center; gap: 7px; min-height: 43px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 11px; }.listen-button:hover { border-color: var(--coral); }.button-icon { color: var(--coral); font-size: 19px; }.listen-button small { margin-left: auto; color: var(--muted); font-size: 9px; }
.speak-panel { position: relative; margin-top: 12px; background: #f8eee6; }.speak-panel h2 { margin-bottom: 5px; font-size: 21px; }.speak-panel > p { margin-bottom: 18px; color: var(--muted); font-size: 11px; }.record-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; border: 0; border-radius: 12px; background: var(--coral); color: white; box-shadow: 0 8px 20px rgba(238,128,121,.24); cursor: pointer; font-weight: 700; }.record-button:hover { background: #e66d6b; transform: translateY(-1px); }.record-button:disabled { cursor: wait; opacity: .65; }.mic-icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; font-size: 17px; transform: rotate(45deg); }.demo-button { display: block; margin: 10px auto 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }.voice-status { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 10px; }.status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }.voice-status.is-active .status-light { background: var(--coral); box-shadow: 0 0 0 5px var(--coral-soft); animation: pulse 1s infinite; }.transcript, .result-message { margin-top: 12px; padding: 10px; border-radius: 9px; font-size: 11px; line-height: 1.45; }.transcript { color: var(--muted); background: rgba(255,255,255,.6); }.result-message.success { color: #60704c; background: #e7efdf; }.result-message.try { color: #a2685c; background: #ffe5dc; }
.action-panel { display: flex; width: 100%; min-width: 0; align-items: center; gap: 13px; margin-top: 12px; padding: 13px 16px; border: 1px dashed #e8bb9d; border-radius: 13px; background: #fff9ed; }.action-panel > div { min-width: 0; }.action-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; color: var(--sun); background: #fff0c9; font-size: 19px; }.action-panel strong { font-size: 11px; }.action-panel p { margin: 3px 0 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.action-icon img { display: block; width: 23px; height: 23px; }
.finish-panel { display: flex; width: 100%; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 3px 17px; border-bottom: 1px solid var(--line); }.finish-copy { display: flex; min-width: 0; align-items: center; gap: 10px; }.finish-copy > div { min-width: 0; }.finish-check { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid var(--line); border-radius: 50%; color: white; background: white; font-size: 15px; }.finish-copy strong { font-size: 11px; }.finish-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }.complete-button { display: flex; min-width: 0; max-width: 52%; align-items: center; gap: 8px; padding: 10px 10px; border: 1px solid var(--coral); border-radius: 9px; background: transparent; color: var(--coral); cursor: pointer; font-size: 10px; font-weight: 700; }.complete-button span:first-child { overflow-wrap: anywhere; }.complete-button:disabled { border-color: var(--line); color: #c4b5ac; cursor: not-allowed; }.finish-panel.is-complete .finish-check { border-color: var(--sage); background: var(--sage); }.finish-panel.is-complete .complete-button { border-color: var(--sage); color: #738361; }
.tracker-panel { width: 100%; min-width: 0; margin-top: 18px; background: #fff4ed; }.tracker-heading { display: flex; justify-content: space-between; align-items: start; }.tracker-heading .section-kicker { margin-bottom: 4px; }.tracker-heading h2 { margin-bottom: 0; font-size: 19px; }.tracker-count { color: var(--coral); font-size: 11px; font-weight: 700; }.tracker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; width: 100%; min-width: 0; margin-top: 17px; }.tracker-item { display: grid; min-width: 0; justify-items: center; gap: 6px; color: #c7b3aa; font-size: 9px; }.tracker-item > span:last-child { max-width: 100%; white-space: nowrap; font-size: clamp(7px, 2.15vw, 9px); }.reward { display: grid; place-items: center; width: clamp(30px, 9.2vw, 43px); height: clamp(30px, 9.2vw, 43px); border: 1px dashed #dfc7bb; border-radius: 50%; background: rgba(255,255,255,.55); filter: grayscale(1); font-size: 19px; }.tracker-item.is-open { color: var(--ink); }.tracker-item.is-open .reward { border-style: solid; border-color: var(--sun); background: #fff0cf; filter: none; }.footer-note { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 22px 4px 0; color: #c2aaa0; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.footer-note a { color: #b77a72; font-weight: 700; text-align: right; text-decoration: none; }
.footer-note a:hover { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
.tracker-certificate-button { display: flex; min-height: 44px; margin: 18px auto 2px; padding: 10px 20px; align-items: center; justify-content: center; gap: 12px; border: 1px solid #efaaa3; border-radius: 14px; background: linear-gradient(180deg, #fffaf4, #fee9e1); box-shadow: inset 0 1px 0 #fff, 0 4px 0 #e8c3b9, 0 9px 18px rgba(126,87,68,.12); color: #b96963; cursor: pointer; font-family: Comfortaa, sans-serif; font-size: 11px; font-weight: 700; }
.tracker-certificate-button[hidden] { display: none; }
@keyframes drift { 50% { transform: translateY(5px) rotate(5deg); } } @keyframes listen { 50% { transform: translateY(-5px) rotate(-2deg); } } @keyframes think { 50% { transform: rotate(4deg); } } @keyframes happy { 0%,100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-16px) rotate(-6deg); } 70% { transform: translateY(-4px) rotate(5deg); } } @keyframes tryAgain { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } } @keyframes pulse { 50% { opacity: .45; } }
.recording-playback { width: 100%; height: 36px; margin-top: 12px; }
.pinyin { font-family: "Noto Sans", "Segoe UI", sans-serif; font-style: normal; font-weight: 400; letter-spacing: .01em; }
.baby { right: calc(50% - 62px); width: 124px; height: 166px; background: url("assets/generated/baby-idle.webp?v=1") center bottom / contain no-repeat; }
.baby > * { display: none; }
.baby::before { display: none; }
.baby::after { position: absolute; top: 8px; right: -8px; color: var(--sun); content: '✦'; font-size: 24px; opacity: 0; text-shadow: -122px 42px 0 var(--coral); }
.baby[data-state="idle"], .baby[data-state="try-again"] { background-image: url("assets/generated/baby-idle.webp?v=1"); animation: none; }
.baby[data-state="listening"], .baby[data-state="thinking"] { background-image: url("assets/generated/baby-listening.webp?v=1"); animation: none; }
.baby[data-state="happy"], .baby[data-state="completed"] { background-image: url("assets/generated/baby-success.webp?v=1"); animation: none; }
.baby[data-state="happy"]::after, .baby[data-state="completed"]::after { animation: babySparkles 1.15s ease-out; }
@keyframes babyBreathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.018); } }
@keyframes babyListen { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-4px); } }
@keyframes babyThink { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-3deg) translateY(-2px); } 70% { transform: rotate(2deg); } }
@keyframes babyCelebrate { 0% { transform: translateY(0) scale(.96); } 38% { transform: translateY(-15px) scale(1.04) rotate(-2deg); } 70% { transform: translateY(-5px) scale(1.02) rotate(2deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes babySparkles { 0% { opacity: 0; transform: scale(.35) rotate(-20deg); } 38% { opacity: 1; transform: scale(1.15) rotate(8deg); } 100% { opacity: 0; transform: scale(.8) rotate(20deg); } }
.brand-mark { width: 34px; height: 34px; border: 0; filter: drop-shadow(0 4px 5px rgba(196, 113, 105, .18)); }
.listen-button, .record-button, .demo-button, .complete-button { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease; }
.listen-button { justify-content: center; min-height: 48px; padding: 9px 11px; border: 1px solid #efd4c8; border-radius: 14px; background: linear-gradient(180deg, #fff 0%, #fff8f3 58%, #fbece4 100%); box-shadow: inset 0 1px 0 #fff, 0 4px 0 #ead5cb, 0 9px 16px rgba(136, 91, 71, .12); text-align: center; }
.listen-button:hover { border-color: #efaaa2; box-shadow: inset 0 1px 0 #fff, 0 5px 0 #e7c9bd, 0 12px 20px rgba(136, 91, 71, .15); transform: translateY(-2px); }
.listen-button:active { box-shadow: inset 0 2px 4px rgba(126, 87, 68, .09), 0 1px 0 #e7c9bd, 0 4px 8px rgba(136, 91, 71, .1); transform: translateY(3px); }
.button-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border: 1px solid #f3c2ba; border-radius: 50%; background: linear-gradient(145deg, #fff, #ffe8e1); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(212, 116, 108, .14); font-size: 16px; }
.record-button { min-height: 58px; border: 1px solid #f69a94; border-radius: 17px; background: linear-gradient(180deg, #f79690 0%, #ee8079 56%, #e6716d 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(170,70,68,.12), 0 6px 0 #cf625f, 0 13px 24px rgba(213, 96, 91, .27); text-shadow: 0 1px 1px rgba(139, 57, 54, .2); }
.record-button:hover { background: linear-gradient(180deg, #f99e98 0%, #ef837d 56%, #e87570 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.42), 0 7px 0 #c95e5b, 0 16px 28px rgba(213, 96, 91, .3); transform: translateY(-2px); }
.record-button:active { box-shadow: inset 0 2px 5px rgba(152, 56, 54, .18), 0 2px 0 #c95e5b, 0 6px 12px rgba(213, 96, 91, .2); transform: translateY(4px); }
.mic-icon { background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.demo-button { min-height: 32px; padding: 6px 13px; border: 1px solid #ead2c7; border-radius: 999px; background: linear-gradient(180deg, #fffdfb, #f8eae3); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #e5d1c8, 0 7px 12px rgba(126,87,68,.1); text-decoration: none; }
.demo-button:hover { border-color: #e9b9ae; color: #80655a; transform: translateY(-1px); }
.demo-button:active { box-shadow: inset 0 2px 4px rgba(126,87,68,.08), 0 1px 0 #e5d1c8; transform: translateY(2px); }
.complete-button { min-height: 40px; padding: 9px 13px; border-color: #efaca4; border-radius: 13px; background: linear-gradient(180deg, #fffdfb, #fdece6); box-shadow: inset 0 1px 0 #fff, 0 4px 0 #e8c9bf, 0 8px 15px rgba(126,87,68,.11); }
.complete-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 5px 0 #e3bfb4, 0 11px 18px rgba(126,87,68,.14); }
.complete-button:not(:disabled):active { transform: translateY(3px); box-shadow: inset 0 2px 4px rgba(126,87,68,.08), 0 1px 0 #e3bfb4; }
.complete-button:disabled { background: linear-gradient(180deg, #fff, #f4eeea); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #e6ddd8; opacity: .78; }
.welcome, .progress-row { display: none; }
.topbar { padding: 10px 16px 6px; }
#app { padding: 0 12px 20px; }
.baby-stage { min-height: 178px; margin: 5px 0 7px; }
.stage-note { top: 11px; left: 13px; }
.baby-caption { bottom: 4px; }
.phrase-panel, .speak-panel { padding: 13px 15px; border-radius: 16px; }
.phrase-panel h2 { margin-bottom: 2px; font-size: 25px; }
.phrase-panel .pinyin { margin-bottom: 0; font-size: 13px; }
.phrase-panel .translation { margin-bottom: 9px; }
.listen-button { min-height: 40px; }
.speak-panel { margin-top: 7px; }
.speak-panel h2 { margin-bottom: 3px; font-size: 18px; }
.speak-panel > p { margin-bottom: 9px; }
.record-button { min-height: 49px; }
.voice-status { margin-top: 8px; }
.recording-playback { height: 34px; margin-top: 8px; }
.review-prompt { margin: 8px 0 0; color: var(--ink); font-size: 11px; font-weight: 600; line-height: 1.45; text-align: center; }
.review-prompt[hidden], .demo-button[hidden], .review-prompt + .demo-button[hidden] { display: none !important; }
.review-prompt + .demo-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 170px; margin-top: 7px; color: var(--coral); font-size: 11px; font-weight: 700; }
.admin-panel[hidden] { display: none; }
.admin-panel { margin: 4px 0 8px; padding: 12px; border: 1px solid #efd4c8; border-radius: 16px; background: linear-gradient(145deg, #fff, #fff1e9); box-shadow: 0 7px 18px rgba(126,87,68,.1); }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.admin-heading strong, .admin-heading span { display: block; }
.admin-heading strong { font-family: Comfortaa, sans-serif; font-size: 12px; }
.admin-heading span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.admin-heading a { color: var(--coral); font-size: 10px; }
.admin-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.admin-days button, .admin-actions button { border: 1px solid #ead2c7; border-radius: 10px; background: linear-gradient(#fff, #f8eae3); color: var(--ink); box-shadow: 0 2px 0 #e5d1c8; cursor: pointer; font-size: 9px; }
.admin-days button { min-width: 0; min-height: 34px; padding: 3px 1px; font-size: clamp(7px, 2vw, 9px); }
.admin-days button.is-active { border-color: var(--coral); background: linear-gradient(#ffaaa3, var(--coral)); color: white; box-shadow: 0 2px 0 #cf625f; }
.admin-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.admin-actions { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.admin-actions button { min-height: 30px; padding: 4px; }
.admin-invite[hidden] { display: none; }
.admin-invite { margin-top: 10px; padding: 10px; border: 1px solid #ead2c7; border-radius: 12px; background: rgba(255,255,255,.7); }
.admin-invite label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 9px; font-weight: 700; }
.admin-invite > div { display: flex; gap: 6px; }
.admin-invite input { min-width: 0; flex: 1; padding: 8px; border: 1px solid #ead2c7; border-radius: 8px; background: white; color: var(--ink); font-size: 9px; }
.admin-invite button { padding: 6px 9px; border: 1px solid var(--coral); border-radius: 8px; background: var(--coral); color: white; cursor: pointer; font-size: 9px; font-weight: 700; }
.admin-invite p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.admin-users[hidden] { display: none; }
.admin-users { margin-top: 10px; padding: 10px; border: 1px solid #d8dfce; border-radius: 12px; background: rgba(255,255,255,.74); }
.admin-users-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 9px; }
.admin-users button { padding: 5px 7px; border: 1px solid #cbd5bd; border-radius: 8px; background: #f7faef; color: #6f7d61; cursor: pointer; font-size: 8px; font-weight: 700; }
.admin-user { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.admin-user:first-child { border-top: 0; }
.admin-user strong, .admin-user span { display: block; overflow-wrap: anywhere; }
.admin-user strong { font-size: 9px; }
.admin-user span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.admin-users > p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.reward { width: clamp(30px, 9.2vw, 43px); height: clamp(30px, 9.2vw, 43px); border: 0; background: transparent; filter: grayscale(.9); opacity: .48; }
.reward img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(126,87,68,.12)); }
.tracker-item.reward-day-6 .reward { position: relative; border: 0; background: transparent; box-shadow: none; }
.tracker-item.reward-day-6 .reward::before { position: absolute; z-index: 0; top: 50%; left: 50%; width: 79%; height: 79%; border: 1px solid #cbd8d9; border-radius: 50%; background: linear-gradient(145deg, #fcffff, #edf4f4); box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(126,87,68,.12); content: ''; transform: translate(-50%, -50%); }
.tracker-item.reward-day-6 .reward img { position: relative; z-index: 1; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(88,116,122,.14)); }
.tracker-item.is-open .reward { border: 0; background: transparent; filter: none; opacity: 1; transform: translateY(-2px); }
.tracker-item.reward-day-6.is-open .reward { border: 0; background: transparent; }
.tracker-item.reward-day-6.is-open .reward::before { border-color: #a9c9cc; background: linear-gradient(145deg, #fff, #e6f3f3); }
.modal-open { overflow: hidden; }
.celebration-modal[hidden], .celebration-card[hidden], .certificate-view[hidden] { display: none; }
.celebration-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; width: 100%; max-width: 100vw; padding: 16px; overflow: hidden; }
.celebration-backdrop { position: absolute; inset: 0; background: rgba(91,68,56,.28); backdrop-filter: blur(5px); }
.celebration-card { position: relative; z-index: 1; width: min(100%, 390px); padding: 30px 24px 22px; overflow: hidden; border: 1px solid rgba(238,128,121,.3); border-radius: 26px; background: linear-gradient(145deg, #fffdf9, #fff0e7); box-shadow: inset 0 2px 0 #fff, 0 22px 60px rgba(91,68,56,.22); text-align: center; animation: certificateArrive .55s cubic-bezier(.2,.9,.25,1.15); }
.celebration-card::before, .celebration-card::after { position: absolute; width: 105px; height: 105px; border-radius: 50%; content: ''; filter: blur(2px); opacity: .42; }
.celebration-card::before { top: -55px; left: -40px; background: #ffd8c9; }
.celebration-card::after { right: -45px; bottom: -60px; background: #e2edd9; }
.celebration-sparkles { color: var(--sun); font-size: 16px; letter-spacing: .45em; }
.celebration-seal { display: grid; place-items: center; width: 62px; height: 62px; margin: 10px auto 16px; border: 1px solid #efb06c; border-radius: 50%; background: linear-gradient(145deg, #fff9dd, #ffd78e); box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 5px 0 #e7b767, 0 11px 20px rgba(177,123,53,.18); color: #a86f32; font-family: Comfortaa, sans-serif; font-size: 25px; font-weight: 700; }
.celebration-card .eyebrow { display: block; margin-bottom: 8px; }
.celebration-card h2 { margin-bottom: 10px; font-size: 27px; }
.celebration-card > p:not(.eyebrow) { margin: 0 auto 20px; max-width: 300px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.certificate-primary { min-height: 48px; padding: 11px 20px; border: 1px solid #f39a94; border-radius: 15px; background: linear-gradient(180deg, #f79791, #e97670); box-shadow: inset 0 2px 0 rgba(255,255,255,.38), 0 5px 0 #ca625e, 0 12px 22px rgba(213,96,91,.24); color: white; cursor: pointer; font-weight: 700; }
.certificate-status { margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff1eb; color: #a65f57; font-size: 12px; line-height: 1.45; }
.certificate-link { display: block; margin: 14px auto 0; padding: 4px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.certificate-view { position: relative; z-index: 1; display: grid; gap: 12px; width: min(100%, 900px); max-width: 100%; max-height: 94vh; overflow-x: hidden; overflow-y: auto; }
.certificate-sheet { position: relative; width: 100%; max-width: 100%; aspect-ratio: 297 / 210; overflow: hidden; border: 7px solid #fffaf3; border-radius: 18px; background: #fffaf3; box-shadow: 0 24px 70px rgba(91,68,56,.28); }
.certificate-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.certificate-copy { position: absolute; inset: 13% 16% 11%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #674b3e; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.certificate-kicker { margin: 0 0 1.5%; color: #dd7b73; font-family: Comfortaa, sans-serif; font-size: clamp(10px, 2.2vw, 24px); font-weight: 700; letter-spacing: .24em; }
.certificate-number { margin: 0 0 2%; padding: .55% 4%; border: 1.5px solid #e8a465; border-radius: 999px; background: rgba(255,244,213,.82); color: #b76b32; font-family: Comfortaa, sans-serif; font-size: clamp(9px, 1.7vw, 19px); font-weight: 700; }
.certificate-copy h2 { margin: 0 0 2%; font-size: clamp(19px, 4.4vw, 48px); letter-spacing: -.035em; }
.certificate-awarded { margin: 0 0 1%; color: #9a7c6d; font-size: clamp(8px, 1.5vw, 17px); }
.certificate-copy strong { color: #c56e67; font-family: Comfortaa, sans-serif; font-size: clamp(11px, 2.1vw, 24px); }
.certificate-copy .certificate-position { margin: 1.3% 0 0; color: #76594b; font-size: clamp(7px, 1.3vw, 15px); }
.certificate-copy > p:not(.certificate-kicker):not(.certificate-awarded):not(.certificate-position) { margin: 2% 0; font-size: clamp(7px, 1.35vw, 15px); line-height: 1.55; }
.certificate-mark { color: #ed8980; font-size: clamp(16px, 3vw, 30px); }
.certificate-copy small { font-size: clamp(6px, 1vw, 12px); letter-spacing: .06em; }
.certificate-actions { display: flex; width: 100%; max-width: 100%; align-items: center; justify-content: center; gap: 16px; }
.certificate-actions .certificate-primary { max-width: 100%; }
.certificate-actions .certificate-link { margin: 0; color: white; }
@keyframes certificateArrive { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 520px) { .celebration-modal { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }.certificate-view { width: 100%; max-width: 100%; gap: 10px; }.certificate-sheet { width: 100%; max-width: 100%; border-width: 4px; border-radius: 12px; }.certificate-copy { inset: 12% 14% 10%; }.certificate-actions { flex-direction: column; gap: 7px; }.certificate-actions .certificate-primary { width: min(100%, 330px); min-height: 43px; padding-right: 12px; padding-left: 12px; font-size: clamp(12px, 4vw, 16px); }.certificate-actions .certificate-link { font-size: 12px; } }
@media (max-width: 390px) { #app { padding-right: 8px; padding-left: 8px; }.phrase-panel, .speak-panel, .tracker-panel { min-width: 0; padding-right: 11px; padding-left: 11px; }.tracker-grid { gap: 2px; }.footer-note { align-items: center; justify-content: center; text-align: center; }.footer-note a { max-width: 100%; text-align: center; overflow-wrap: anywhere; }.complete-button { max-width: 100%; } }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { width: 297mm !important; height: 210mm !important; margin: 0 !important; overflow: hidden !important; background: white !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body > *:not(.celebration-modal) { display: none !important; }
  .celebration-modal { position: fixed !important; inset: 0 !important; display: block !important; width: 297mm !important; height: 210mm !important; padding: 0 !important; overflow: hidden !important; background: white !important; }
  .celebration-backdrop, .celebration-card, .certificate-actions { display: none !important; }
  .certificate-view { display: block !important; width: 297mm !important; height: 210mm !important; max-width: none !important; max-height: none !important; margin: 0 !important; overflow: hidden !important; }
  .certificate-sheet { width: 297mm !important; height: 210mm !important; aspect-ratio: auto !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; break-inside: avoid !important; page-break-inside: avoid !important; }
}
@media (min-width: 700px) { body { padding: 30px 0; }.page-shell { border-radius: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
