@charset "UTF-8";
:root{--primary:#275c70;--primary-dk:#173b4e;--primary-lt:#edf4f7;--accent:#b99a63;--gold:#b99a63;--ink:#193544;--ink-2:#526975;--ink-3:#748893;--line:#dce7e9;--green:#31816e;--serif:Georgia,'Times New Roman',serif;--r:20px;color-scheme:light}
*{box-sizing:border-box}html{background:#dae7e8;scroll-behavior:smooth}body{margin:0;color:var(--ink);font:16px/1.6 -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;background:radial-gradient(ellipse at 20% 0,#c9e2df,transparent 50%),#e3eded}h1,h2,h3,h4,p{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.4;cursor:default}button,input,textarea,summary{-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #bc9b58;outline-offset:3px}input,textarea{min-width:0;max-width:100%;color:var(--ink)}[hidden],.hide{display:none!important}.app{position:relative;width:100%;max-width:460px;min-height:calc(460px * 16 / 9);margin:24px auto;background:#f3f7f6;border:1px solid #e6eeee;border-radius:28px;box-shadow:0 28px 100px #183f4922;overflow:clip;padding:0 18px 26px}.topbar{position:sticky;top:0;z-index:30;margin:0 -18px;padding:17px 18px 9px;background:#f3f7f6f5;border-bottom:1px solid #dfe9e8;backdrop-filter:blur(14px)}.brand-row{display:flex;align-items:center;gap:10px}.brand-icon{width:42px;height:46px;display:grid;place-items:center;background:var(--primary-dk);color:#dbbc83;border-radius:13px 13px 13px 3px;flex-shrink:0;box-shadow:0 3px 8px #1a3c4a18}.brand-icon svg{width:25px;height:25px}.brand-copy{flex:1}.brand-title{font-size:19px;letter-spacing:.08em;font-weight:750}.brand-sub{font:9px/1.5 var(--serif);letter-spacing:.19em;color:#758b93;margin-top:1px}.submit-btn{border:0;background:#2c7967;color:white;min-height:42px;border-radius:12px;padding:9px 12px;font-size:12px;font-weight:700}.tool-row{display:flex;gap:8px;align-items:center;min-height:35px;margin-top:7px}.dy-skill-pill{font-size:11px;color:#71858a;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tool-row>button,.tools-dropdown summary{border:0;background:transparent;color:#52707a;font-size:12px;min-height:36px;padding:5px 0}.tools-dropdown{position:relative}.tools-dropdown summary{list-style:none;padding:4px 8px;font-size:20px;line-height:1}.tools-dropdown summary::-webkit-details-marker{display:none}.tools-menu{position:absolute;right:0;top:38px;min-width:180px;background:white;border:1px solid var(--line);border-radius:15px;box-shadow:0 12px 40px #173b4e26;padding:8px;display:grid;gap:4px;z-index:50}.tools-menu button{border:0;background:#f2f6f5;border-radius:8px;text-align:left;font-size:13px;padding:10px;min-height:44px;color:var(--ink)}.tools-menu button.danger{color:#a35d61}.audio-status{font-size:10px;min-height:15px;color:#6b8189;letter-spacing:.02em}.menu-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;height:90px;padding:0 18px;margin:10px 0 14px;background:#183c4b;color:#fff;border-radius:16px;box-shadow:0 6px 16px #193f4b12}.menu-intro h2{font-size:19px;font-weight:650;line-height:1.3;white-space:nowrap}.global-stats{display:flex;align-items:center;gap:14px;font-size:12px;color:#b9d0d4;white-space:nowrap}.global-stats b{font-weight:500}.global-stats strong{font:23px/1.2 var(--serif);color:#dec894}.topic-filters{display:none}.topic-heading{display:flex;justify-content:space-between;align-items:center;margin:0 2px 12px;font-size:11px;color:#7a8c91}.topic-heading h3{font-size:17px;color:var(--ink)}.topic-heading h3 span{font:italic 14px var(--serif);color:#92a5ab;margin-left:8px}.set-grid{display:grid;gap:13px}.set-card{position:relative;text-align:left;width:100%;border:1px solid #e0e8e7;border-radius:18px;background:#fff;padding:17px 18px;color:var(--ink);transition:transform .15s,border-color .15s;box-shadow:0 3px 8px #25445203;overflow:hidden}.set-card:hover{border-color:#7fa9aa;transform:translateY(-2px)}.card-top,.card-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px}.num{font-size:10px;letter-spacing:.05em;font-weight:700;color:#477782}.card-status{font-size:10px;color:#8a999c;display:flex;align-items:center;gap:6px}.card-status:before{content:'';width:5px;height:5px;border-radius:100%;background:#c6d5d5}.set-card.completed .card-status{color:#2d836a}.set-card.completed .card-status:before{background:#389577}.set-card.in-progress .card-status{color:#a58b50}.set-card h4{font-size:18px;line-height:1.4;margin:11px 0 12px;font-weight:650}.phrase-preview{display:flex;flex-wrap:wrap;gap:6px;max-width:95%}.phrase-preview span{font-size:11px;background:#f0f5f4;color:#617a81;padding:3px 8px;border-radius:5px;line-height:1.6}.phrase-preview span:nth-child(n+4){display:none}.card-bottom{font-size:10px;color:#8a9a9d;margin-top:17px;margin-bottom:8px}.card-bottom strong{font-size:12px;color:#528b80}.progress-bar{height:3px;border-radius:4px;background:#e9f0ee;overflow:hidden}.fill{height:100%;background:#5d9c8b;border-radius:4px}.set-header{display:flex;align-items:center;justify-content:space-between;gap:10px;height:52px;padding:0;margin:8px 0 10px;border:0}.compact-group-summary{flex:1;min-width:0}.compact-group-summary h2{font-size:17px;line-height:1.2;font-weight:650;overflow-wrap:anywhere}.compact-group-summary .progress-bar{height:2px;margin-top:6px}.group-controls{display:flex;align-items:center;gap:4px;flex-shrink:0}.group-controls button{border:0;background:transparent;color:#4b7881;height:32px;min-width:25px;padding:0 4px;line-height:1}.group-controls .group-arrow{font-size:25px}.group-controls .group-reset{font-size:11px;min-width:35px}.text-button{border:0;background:transparent;color:#3e7683;padding:6px 0;min-height:36px;font-size:11px;touch-action:manipulation}.step-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 13px}.step-tab{border:1px solid #e0e9e7;border-radius:12px;background:#fff;min-height:58px;padding:7px 3px;color:#819393;font-size:10px;display:flex;flex-direction:column;align-items:center;gap:4px}.step-tab .num{font-size:10px;color:#8ca3a6;line-height:1.2}.step-tab.active{background:#1f4c5b;color:#fff;border-color:#1f4c5b;box-shadow:0 5px 12px #204c5b19}.step-tab.active .num{color:#afd3d2}.step-tab.done .num{color:#4b9b7e}.step-body{border:1px solid #e0e9e7;border-radius:20px;background:white;padding:19px 16px;margin-bottom:14px}.step-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:13px}.step-title h3{font-size:17px}.step-title span{font-size:10px;color:#879b9e}.desc{display:none}.q-nav{display:flex;justify-content:space-between;font-size:11px;color:#819799}.q-nav b{color:#356d79}.question-dots{display:flex;column-gap:14px;row-gap:10px;flex-wrap:wrap;margin:13px 0 22px}.question-dot{width:34px;height:36px;padding:0;border:1px solid #e4eeeb;background:#f7faf9;border-radius:9px;color:#8da5a5;font-size:11px}.question-dot.active{background:#e6f1ef;border-color:#6d9e97;color:#245e60;box-shadow:0 0 0 2px #e3efeb}.question-dot.correct,.question-dot.saved{background:#e3f2e9;color:#38876a}.question-dot.wrong{background:#fbefeb;color:#b17665}.prompt-audio-row{display:flex;align-items:flex-start;gap:10px}.prompt-content{flex:1;min-width:0}.prompt-listen{flex-shrink:0}.speaker-icon{width:20px;height:20px}.audio-btn,.match-audio{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;padding:9px;border:1px solid #d6e5e2;background:#eff7f4;border-radius:12px;color:#51877e;flex-shrink:0}.playing{background:#bfe4d6!important;color:#215e4d!important;box-shadow:0 0 0 3px #e1f4e8}.q-stem{font-size:21px;line-height:1.65;color:#254753;overflow-wrap:anywhere}.q-stem.chinese{font-size:19px;line-height:1.8}.q-stem.recall{font-size:25px;min-height:60px;display:flex;align-items:center}.q-stem-zh{font-size:13px;color:#8a9a9c;margin-top:14px;line-height:1.8}.mirror-chunks{display:flex;flex-wrap:wrap;gap:3px .5em}.mirror-chunk{display:inline;max-width:100%;overflow-wrap:anywhere}.mirror-relation{color:#8c9c9b}.blank{display:inline-block;min-width:85px;background:#edf5f2;border-bottom:2px solid #90b4aa;color:#5b8e80;padding:0 8px;text-align:center}.input-row{margin:17px 0 12px}input[type=text],textarea{width:100%;border:1.5px solid #d8e6e3;border-radius:12px;background:#fbfdfc;padding:13px;color:#254753;font-size:17px;line-height:1.65}textarea{min-height:140px;resize:vertical}input::placeholder,textarea::placeholder{font-size:13px;color:#a2b4b4}input[readonly],textarea[readonly]{background:#f4f8f6}.mode-toggle{display:flex;background:#f0f5f3;border:1px solid #e3ebe7;border-radius:11px;padding:4px;margin:16px 0 13px;gap:4px}.mode-toggle button{flex:1;border:0;border-radius:8px;min-height:38px;background:transparent;color:#8a9d9a;font-size:12px;font-weight:650}.mode-toggle button.active{background:#fff;color:#2e6d6b;box-shadow:0 2px 5px #294f4210}.assembly-help{font-size:11px;color:#8b9f9b;margin:10px 0}.assembly-answer{min-height:88px;background:#f2f8f5;border:1px dashed #b6cec4;border-radius:14px;padding:12px;display:flex;align-content:flex-start;flex-wrap:wrap;gap:7px}.assembly-placeholder{font-size:13px;color:#99b1a7;align-self:center;padding:12px 2px}.chunk-pool{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0 17px}.chunk-chip{max-width:100%;min-height:44px;text-align:left;border:1px solid #d9e4e0;border-bottom:3px solid #d9e4e0;border-radius:11px;background:white;color:#355868;font-size:14px;padding:9px 12px;line-height:1.5;transition:transform .12s,background .12s;overflow-wrap:anywhere}.chunk-chip:active{transform:translateY(2px)}.assembly-answer .chunk-chip{border:1px solid #b4d1c5;background:#e1efe7;color:#396d59}.chunk-chip.used{opacity:.22;border-style:dashed}.chunk-chip.selected{background:#e2f0ea;border-color:#74aa96}.action-group{display:grid;gap:10px;margin-top:15px}.action-group .left{display:grid;grid-template-columns:1.2fr 1fr;gap:8px}.action-group .right{display:flex;justify-content:space-between;gap:10px;padding-top:4px}.btn{min-height:44px;border:1px solid #285d6d;border-radius:11px;padding:9px 12px;background:#285d6d;color:#fff;font-size:12px;font-weight:650;line-height:1.5}.btn.ghost{background:#fff;color:#65828a;border-color:#dce7e3}.btn.warn{background:#f6eee0;color:#947d4d;border-color:#e5d9bc}.action-group .right .btn{flex:1;border:0;background:#f3f7f5}.action-group #redo-btn,.action-group #edit-btn{min-height:34px;font-size:11px;padding:5px}.feedback{display:none;background:#f0f7f2;border:1px solid #dae8de;border-radius:13px;padding:14px;margin-top:16px;color:#587967;font-size:12px}.feedback.show{display:block}.feedback.bad{background:#fdf3ef;border-color:#efdcd4;color:#a17362}.feedback.warn{background:#f8f5eb;border-color:#e9e2cb;color:#8c835f}.answer-line,.full-sentence{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;margin-top:10px;font-size:16px;color:#365c58;line-height:1.7;overflow-wrap:anywhere}.full-sentence{font-size:14px}.answer-line .audio-btn,.full-sentence .audio-btn{width:36px;height:38px;min-width:36px;padding:7px}.audio-text{min-width:0;flex:1}.feedback-note,.answer-zh{font-size:11px;margin-top:8px;color:#8e9e94}mark{background:#f5d7be;color:#975d3d;border-radius:3px;padding:0 2px}.review-row{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#92a7a2;gap:8px;margin-top:13px}.review-row>span{display:none}.stage-complete,.round-complete{margin-top:19px;padding-top:15px;border-top:1px solid var(--line);display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:12px;color:#518771}.round-complete{display:block;background:#eff7f0;border:0;border-radius:12px;padding:13px;margin:13px 0}.round-complete h4{font-size:14px}.round-complete p{font-size:11px;margin:5px 0 10px}.match-round-info{display:flex;justify-content:space-between;font-size:10px;color:#8ba19c;margin-bottom:11px;gap:7px}.match-grid{display:grid;grid-template-columns:1.12fr 1fr;gap:10px}.match-col{min-width:0}.match-col h4{font-size:9px;color:#91a5a3;font-weight:500;min-height:32px;margin-bottom:8px}.match-item{position:relative;display:flex;gap:6px;align-items:center;border:1px solid #dce7e2;border-radius:12px;padding:11px 8px;background:#f7faf8;min-height:102px;margin-bottom:9px;cursor:pointer}.match-col:nth-child(2) .match-item{background:#f5f5ee;border-color:#e5e4d6}.match-item .text{font-size:14px;line-height:1.5;flex:1;overflow-wrap:anywhere;min-width:0}.match-col:first-child .match-item{padding:12px 8px 37px}.match-audio{position:absolute;bottom:6px;right:6px;width:32px;height:30px;min-width:32px;border-radius:8px;padding:6px}.match-audio .speaker-icon{width:16px;height:16px}.badge{font:9px var(--serif);color:#a5b8af;align-self:flex-start;margin-top:3px}.match-item.selected{border:2px solid #83ad9b;background:#e9f4ee!important}.match-item.matched{opacity:.28;cursor:default}.match-feedback{font-size:12px;color:#458f71;margin-top:12px}.match-feedback.bad{color:#af7865}.option-table{font-size:11px;margin-top:12px;width:100%;border-collapse:collapse;table-layout:fixed}.option-table td,.option-table th{text-align:left;padding:7px 4px;border-bottom:1px solid #dce7e0;overflow-wrap:anywhere}.option-table .correct-row{background:#e2f0e4;color:#2c7350}.option-table .chosen-wrong-row{background:#fae9e3;color:#9b6150}
.dy-toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:90%;width:max-content;font-size:12px;color:#fff;background:#214c4a;padding:12px 18px;border-radius:12px;z-index:400;opacity:0;pointer-events:none;transition:opacity .15s;box-shadow:0 6px 24px #193b3625}.dy-toast.show{opacity:1}footer{text-align:center;margin-top:28px;font-size:10px;color:#9eb0a8}footer strong{display:block;font-size:13px;letter-spacing:.15em;color:#78958b;margin-bottom:5px}body.phrase-buddy-open{overflow:hidden}body.phrase-buddy-open .app{visibility:hidden}.phrase-buddy-launch{position:fixed;right:max(16px,calc((100vw - 460px)/2 + 16px));bottom:max(18px,env(safe-area-inset-bottom));z-index:50;width:52px;height:52px;border:1px solid #e3d9b6;border-radius:18px;background:#fffbeb;box-shadow:0 6px 20px #344c2f26;padding:0;display:none}.phrase-buddy-launch svg{display:block;margin:auto}.phrase-buddy{position:fixed;inset:0;z-index:200;background:radial-gradient(ellipse at 50% 25%,#fffffb,#edf5ef);padding:55px 20px 25px;display:none;flex-direction:column;justify-content:center;align-items:center;overflow:auto;text-align:center}.phrase-buddy-close{position:absolute;top:max(15px,env(safe-area-inset-top));right:20px;width:44px;height:44px;border:1px solid #cadbd1;border-radius:14px;background:white;color:#3e6a58;font-size:26px}.phrase-buddy-stage{width:100%;height:min(48dvh,420px);display:flex;justify-content:center;align-items:center;flex-shrink:1;min-height:130px;margin-bottom:12px}.phrase-buddy-art{position:relative;height:100%;max-width:90vw;aspect-ratio:var(--crop-ratio,.6);overflow:hidden;filter:drop-shadow(0 10px 7px #214b2220)}.phrase-buddy-image{position:absolute;top:0;left:var(--sprite-left,0%);width:var(--sprite-width,500%);height:100%;max-width:none;object-fit:fill;pointer-events:none}.phrase-buddy-en{font:650 clamp(23px,6vw,34px)/1.25 -apple-system,'Segoe UI',sans-serif;color:#234d60;max-width:420px;overflow-wrap:anywhere;margin:10px 0}.phrase-buddy-zh{font-size:20px;color:#528670;margin-bottom:24px;max-width:90vw}.phrase-buddy-controls{display:flex;gap:12px}.phrase-buddy-controls button{width:46px;height:46px;border:1px solid #d2e2d7;border-radius:14px;background:white;color:#51836e;font-size:23px}.phrase-buddy-action-frame{opacity:0;animation:buddy-action 3.2s steps(1,end) infinite}.phrase-buddy[data-motion=yes] .phrase-buddy-base-frame{animation:buddy-base 3.2s steps(1,end) infinite}.phrase-buddy[data-motion=no] .phrase-buddy-action-frame{display:none}@keyframes buddy-action{50%,99%{opacity:1}}@keyframes buddy-base{50%,99%{opacity:0}}.phrase-buddy-art.jump{animation:buddy-jump .6s ease-out}@keyframes buddy-jump{0%{transform:translateY(20px);opacity:0}70%{transform:translateY(-8px)}100%{transform:translateY(0);opacity:1}}
@media(max-width:500px){html,body{background:#f3f7f6}.app{margin:0 auto;min-height:100dvh;border:0;border-radius:0;box-shadow:none;padding-bottom:calc(30px + env(safe-area-inset-bottom))}.topbar{padding-top:calc(13px + env(safe-area-inset-top))}}@media(max-width:360px){.app{padding-left:13px;padding-right:13px}.topbar{margin-left:-13px;margin-right:-13px;padding-left:13px;padding-right:13px}.brand-title{font-size:17px}.step-body{padding:16px 12px}.chunk-chip{font-size:13px;padding:8px 10px}.match-grid{gap:8px}.match-item .text{font-size:13px}.dy-login-card{padding:20px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

/* Compact personal navigation: one row, approximately 30% of the old header. */
.topbar.personal-header{display:flex;align-items:center;gap:7px;height:39px;min-height:39px;padding:4px 12px;border-radius:0}
.personal-header .brand-icon{width:25px;height:28px;border-radius:8px 8px 8px 2px;box-shadow:none}
.personal-header .brand-icon svg{width:19px;height:19px}
.personal-header .brand-title{flex:1;min-width:0;white-space:nowrap;font-size:15px;line-height:1.2;letter-spacing:.04em}
.personal-header .compact-back{border:0;background:transparent;color:#52747b;font-size:25px;line-height:1;padding:0;width:21px;height:31px;flex-shrink:0}
.personal-header .refresh-btn{border:0;border-radius:9px;min-height:30px;padding:4px 10px;background:#2c7967;color:white;font-size:12px;line-height:1.4;white-space:nowrap;flex-shrink:0}
.personal-header .tools-dropdown summary{font-size:20px;min-height:30px;padding:2px 4px;line-height:1}
.personal-header .tools-menu{top:33px}
.personal-header .audio-status{font-size:10px;color:#718a88;line-height:1.5;padding:5px 8px;min-height:0}
@media(max-width:500px){.topbar.personal-header{height:calc(39px + env(safe-area-inset-top));padding-top:calc(4px + env(safe-area-inset-top))}}
@media(max-width:360px){.topbar.personal-header{gap:5px;padding-left:10px;padding-right:10px}.personal-header .brand-title{font-size:14px}.personal-header .refresh-btn{padding-left:8px;padding-right:8px}}
