:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;color:#253a52;background:#fff9f0;font-synthesis:none;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.46;cursor:not-allowed}input,textarea,select{color:#253a52}input[type=checkbox],input[type=radio]{accent-color:#4f80ef}input:focus-visible,button:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8bb7fa;outline-offset:2px}[hidden]{display:none!important}.app-shell{min-height:100dvh;display:flex;flex-direction:column;background:radial-gradient(circle at 70% -20%,#fff2d7 0%,transparent 44%),#fff9f0}.topbar{width:min(1190px,100%);margin:0 auto;padding:24px 28px;display:flex;align-items:center;gap:24px}.brand{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.brand-mark{width:41px;height:41px;display:grid;place-items:center;border-radius:13px;background:#ffcd66;color:#243952;font-size:26px;box-shadow:0 5px 0 #e7b253}.brand strong{display:block;font-size:19px;letter-spacing:.02em}.brand small{display:block;font-size:11px;color:#8d9ca6;letter-spacing:.04em;margin-top:1px}.main-nav{background:#fff;border:1px solid #ebedf0;border-radius:999px;padding:5px;display:flex;gap:4px;box-shadow:0 5px 16px #1e3f5e0a}.nav-item{border:0;background:transparent;border-radius:999px;padding:11px 17px;color:#6b7b8a;font-weight:700;font-size:13px}.nav-item.active{background:#e1efff;color:#286cb5}.parent-toggle{border:1px solid #dbe4ed;background:#fff;border-radius:999px;color:#46627e;padding:10px 17px;font-size:13px;font-weight:700;touch-action:manipulation}.main-content{width:min(1140px,100%);margin:0 auto;padding:30px 28px 44px;flex:1}.app-footer{padding:18px 28px 22px;width:min(1190px,100%);margin:0 auto;display:flex;justify-content:space-between;color:#a3a8ad;font-size:11px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.18em;color:#84a7bb;margin:0 0 8px}.view h1{font-size:clamp(27px,4vw,35px);margin:0;letter-spacing:-.025em}.view-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:27px}.view-heading p:last-child{color:#84919b;margin:9px 0 0;font-size:14px}.heading-actions{display:flex;gap:10px}.primary-button,.soft-button,.danger-button,.ghost-button{border:0;border-radius:13px;padding:12px 18px;font-size:14px;font-weight:750;transition:transform .12s,background .12s}.primary-button{background:#4f80ef;color:white;box-shadow:0 5px 12px #4f80ef30}.primary-button:hover{background:#3d73e8}.soft-button{background:#e9f1ff;color:#386cad}.soft-button:hover{background:#dbe8fd}.danger-button{background:#fff0ef;color:#ba4d49;border:1px solid #ffd2ce}.ghost-button{background:#fff;color:#6a7b8b;border:1px solid #e5ebef}.text-button{background:transparent;border:0;color:#4b80d9;font-weight:700;padding:8px}.danger-text{color:#bf4d46}.primary-button:active,.soft-button:active,.player-primary:active,.big-speak:active{transform:scale(.98)}.learn-head{text-align:center;margin:13px 0 27px;position:relative}.learn-head .ghost-button{position:absolute;right:0;top:0}.category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.category-tile{min-height:162px;border:1px solid #eee9df;background:#fff;border-radius:23px;padding:22px 14px;text-align:left;box-shadow:0 10px 24px #4e606b0b;transition:transform .15s,box-shadow .15s}.category-tile:hover{transform:translateY(-3px);box-shadow:0 16px 26px #536b8520}.tile-icon{font-size:40px;line-height:1.1;display:block;margin-bottom:15px}.category-tile strong{display:block;font-size:18px;margin-bottom:5px}.category-tile small{color:#9ba4aa;font-size:12px}.learning-panel{max-width:550px;margin:0 auto}.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.lesson-pill,.lesson-counter{font-weight:750;border-radius:999px;background:#dfeeff;color:#385a82;padding:10px 16px;font-size:14px}.lesson-counter{background:#fff;color:#667c90;border:1px solid #e8edf3}.round-icon{width:43px;height:43px;border-radius:50%;border:1px solid #e5eaf0;background:#fff;color:#52677a;font-size:32px;line-height:1}.learning-card{background:#fff;border-radius:28px;min-height:465px;padding:25px 20px 30px;box-shadow:0 18px 45px #263f5e10;border:1px solid #f2eae0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px}.word-art{display:grid;place-items:center;font-size:96px;line-height:1.15;min-height:118px;filter:drop-shadow(0 9px 5px #22374712)}.english-display{font-size:clamp(36px,6vw,58px);font-weight:800;letter-spacing:-.03em;line-height:1.22;text-align:center;color:#253a52;overflow-wrap:anywhere;max-width:100%}.english-display.sentence{font-size:clamp(27px,4.6vw,43px);line-height:1.4}.english-word{border:0;background:transparent;padding:1px 4px;color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;border-radius:8px}.english-word:hover,.english-word:focus-visible{background:#ecf4ff}.phonetic-display{font-family:Arial,"Segoe UI Symbol",sans-serif;text-align:center;color:#768ba0;font-size:20px;line-height:1.5;overflow-wrap:anywhere}.chinese-display{font-size:22px;color:#637385;text-align:center;line-height:1.6}.big-speak{width:106px;height:106px;border:0;border-radius:50%;margin:17px auto 5px;display:grid;place-items:center;color:#fff;background:#ffc24c;box-shadow:0 8px 0 #e5a92e,0 17px 24px #ffc24c3e;touch-action:manipulation}.big-speak svg{width:48px;height:48px}.big-speak.active{background:#4f80ef;box-shadow:0 7px 0 #346bd1,0 15px 22px #4f80ef35}.playback-state{display:flex;align-items:center;flex-direction:column;gap:5px;font-size:13px;text-align:center;color:#7c8c9d;min-height:42px}.playback-state #playStateLabel{color:#46647e;font-weight:700}.player-controls{display:flex;align-items:center;justify-content:center;gap:16px;margin:22px auto 13px}.player-secondary,.player-primary{height:55px;border:0;border-radius:999px;font-weight:850}.player-secondary{width:81px;background:#dcecff;color:#35639e;font-size:18px}.player-primary{min-width:158px;background:white;color:#3979dd;box-shadow:0 5px 18px #263f5e15;font-size:17px}.learn-options{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:18px;color:#7c8c99;font-size:12px}.learn-options label{display:flex;align-items:center;gap:5px;cursor:pointer}.manage-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;margin-bottom:17px}.filter-field{display:flex;flex-direction:column;gap:7px;color:#657889;font-size:12px;font-weight:800;min-width:200px}.filter-field input,.filter-field select{min-height:46px;border:1px solid #e3e8ec;border-radius:12px;background:#fff;padding:10px 14px;font-size:14px}.search-field{flex:1;max-width:380px}.muted-count{font-size:12px;color:#98a4ac;padding-bottom:12px;margin-left:auto}.record-list{border:1px solid #eee9e2;border-radius:19px;overflow:hidden;background:#fff;box-shadow:0 10px 28px #263f5e0a}.record-row{display:flex;align-items:center;gap:14px;padding:15px 18px;border-bottom:1px solid #f0f2f4}.record-row:last-child{border-bottom:0}.record-emoji{width:53px;height:53px;background:#fff5dc;border-radius:15px;display:grid;place-items:center;font-size:25px;flex:none}.record-body{flex:1;min-width:0}.record-main{display:flex;flex-wrap:wrap;gap:10px;align-items:baseline}.record-main strong{font-size:16px;overflow-wrap:anywhere}.record-main span{color:#7b8b99;font-size:13px}.record-sub{color:#9aa9b5;font-size:12px;margin-top:4px;overflow-wrap:anywhere}.record-actions{display:flex;align-items:center;gap:7px}.icon-button{border:0;background:#f5f8fb;border-radius:10px;color:#647d98;width:38px;height:38px;font-size:14px}.icon-button.danger{color:#ba5a52;background:#fff2f1}.empty-state{padding:62px 20px;text-align:center;color:#91a0ac}.empty-state strong{display:block;color:#49667e;font-size:18px;margin-bottom:8px}.manage-bottom{margin-top:14px;display:flex;align-items:center;justify-content:space-between;color:#a6aeb5;font-size:12px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.settings-card{background:#fff;border:1px solid #ece7dd;border-radius:20px;padding:26px;box-shadow:0 10px 22px #263f5e08;display:flex;flex-direction:column;gap:15px}.settings-card h2{font-size:18px;margin:0}.help-text{color:#8795a1;font-size:13px;line-height:1.6;margin:0}.field{display:flex;flex-direction:column;gap:8px;color:#52697d;font-size:13px;font-weight:750}.field input,.field select,.field textarea{width:100%;border:1px solid #dfe6ec;border-radius:11px;padding:12px 13px;background:#fcfdff;font-size:14px;resize:vertical;min-height:44px}.field textarea{line-height:1.6}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#576c80;font-size:14px}.setting-row output{font-weight:800;color:#4778d5}.setting-row select,.inline-number{background:#f5f8fc;border:1px solid #e1e7ec;border-radius:10px;padding:9px 10px}.inline-number{display:flex;align-items:center;gap:8px}.inline-number input{width:44px;border:0;outline:0;background:transparent;text-align:center;font-weight:700}.settings-card input[type=range]{width:100%;accent-color:#4f80ef;margin:0}.range-hints{display:flex;justify-content:space-between;font-size:11px;color:#a3adb7;margin-top:-6px}.check-row{display:flex;gap:9px;align-items:center;color:#5f7184;font-size:13px}.settings-actions,.data-actions{display:flex;flex-wrap:wrap;gap:8px}.footnote{font-size:11px;line-height:1.6;color:#a2a9b1;margin:0}.service-status{padding:10px 13px;border-radius:10px;background:#f2f8ff;color:#567d9e;font-size:12px}.version-line{margin-top:auto;color:#a7aeb6;font-size:12px}.about-card{justify-content:flex-start}.about-card p{margin:0}.app-dialog{width:min(480px,calc(100% - 28px));max-height:min(90dvh,750px);overflow:auto;border:0;border-radius:23px;padding:24px;background:white;box-shadow:0 25px 90px #1e355147}.app-dialog::backdrop{background:#1e344a83;backdrop-filter:blur(4px)}.wide-dialog{width:min(690px,calc(100% - 28px))}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font-size:21px;margin:0}.dialog-close{border:0;background:#f4f7fa;border-radius:50%;width:34px;height:34px;color:#738392;font-size:23px}.app-dialog form,.app-dialog>div:not(.dialog-head){display:flex;flex-direction:column;gap:15px}.app-dialog form .dialog-head{margin-bottom:0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.translation-actions{display:flex;flex-wrap:wrap;gap:9px}.translation-actions button{font-size:12px;padding:10px 12px}.required{color:#d45c54}.batch-preview{margin:12px 0;max-height:300px;overflow:auto}.batch-preview-row{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:10px;align-items:center;padding:8px;border-bottom:1px solid #eff1f4;font-size:12px}.batch-preview-row span{overflow-wrap:anywhere}.batch-preview-row input{width:100%;border:1px solid #e4e8ed;border-radius:8px;padding:9px}.import-summary{background:#f6f9fd;border-radius:12px;padding:14px;color:#5b7184;font-size:13px;line-height:1.6}.import-modes{border:0;padding:0;display:flex;flex-direction:column;gap:9px}.import-modes legend{font-size:13px;font-weight:750;margin-bottom:8px}.import-modes label{font-size:13px;color:#617487}.toast{position:fixed;bottom:max(28px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:min(420px,calc(100vw - 34px));background:#263b53;color:white;padding:13px 18px;border-radius:14px;font-size:13px;box-shadow:0 15px 30px #182d4a35;z-index:100;line-height:1.4;text-align:center}.kid-mode .main-nav{display:none}.kid-mode .parent-toggle{font-size:11px;color:#8a9ead;background:#ffffffb9}.kid-mode .topbar{max-width:650px}.kid-mode .main-content{max-width:800px}.kid-mode .brand{opacity:.9}
@media(max-width:820px){.topbar{padding:16px 17px;gap:8px}.brand strong{font-size:16px}.brand small{font-size:9px}.brand-mark{width:35px;height:35px;font-size:22px}.main-nav{gap:0}.nav-item{padding:8px 10px;font-size:12px}.main-content{padding:22px 17px}.category-grid{grid-template-columns:repeat(2,1fr);gap:12px}.category-tile{min-height:142px;padding:18px 15px}.category-tile strong{font-size:16px}.settings-grid{grid-template-columns:1fr}.view-heading{align-items:flex-start;flex-direction:column}.heading-actions{width:100%}.heading-actions button{flex:1}.search-field{max-width:none}.muted-count{margin:0}.learn-head .ghost-button{position:static;margin-top:13px}.learning-card{min-height:410px}.record-row{padding:13px}.record-emoji{width:44px;height:44px;font-size:22px}.record-actions{gap:3px}.icon-button{width:35px;height:35px}}
@media(max-width:480px){.topbar{padding-top:max(15px,env(safe-area-inset-top));flex-wrap:wrap}.topbar .main-nav{order:3;width:100%;justify-content:center}.kid-mode .topbar{flex-wrap:nowrap}.main-content{padding:14px 14px 28px}.view-learn h1{font-size:27px}.learn-head{margin:6px 0 24px}.category-tile{min-height:133px}.tile-icon{font-size:34px}.lesson-top{margin-bottom:10px}.learning-card{min-height:min(62dvh,500px);padding:18px 12px 22px;border-radius:23px;gap:7px}.word-art{font-size:76px;min-height:94px}.english-display{font-size:clamp(32px,10vw,46px)}.english-display.sentence{font-size:clamp(26px,7vw,35px)}.phonetic-display{font-size:16px}.chinese-display{font-size:20px}.big-speak{width:98px;height:98px;margin:12px 0 4px}.player-controls{margin:17px auto 12px;gap:11px}.player-secondary{width:72px;height:52px}.player-primary{min-width:142px;height:54px}.learn-options{gap:12px}.app-footer{padding:12px 18px max(15px,env(safe-area-inset-bottom))}.settings-card{padding:20px}.record-main{gap:4px;flex-direction:column}.record-emoji{display:none}.record-main strong{font-size:15px}.record-actions{align-self:center}.filter-field{min-width:0;flex:1}.filter-field select{min-width:120px}.batch-preview-row{grid-template-columns:1fr}.app-dialog{padding:20px}.dialog-actions button{flex:1}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* V1.1 自由跟读、录音与无需长按的家长入口 */
.parent-toggle{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
.free-practice{margin:0 auto 30px;max-width:820px;background:#e9f4ff;border:1px solid #d8e9fb;border-radius:24px;padding:23px 26px;box-shadow:0 12px 30px #436b9b0c}
.free-title{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-bottom:15px}
.free-title h2{margin:0;color:#2a4968;font-size:21px;letter-spacing:-.02em}
.free-title p{margin:5px 0 0;color:#7591a7;font-size:13px}
.free-tag{border-radius:999px;background:#fff;color:#4f83b5;font-size:11px;font-weight:800;padding:8px 13px;white-space:nowrap}
.free-input-row{display:flex;align-items:stretch;gap:12px}
.free-input-row textarea{flex:1;min-width:0;min-height:72px;max-height:155px;border:1px solid #d5e1ef;background:#fff;border-radius:14px;padding:14px 15px;resize:vertical;line-height:1.5;font-size:16px}
.free-input-row .primary-button{flex:none;min-width:130px}
.free-result{margin-top:20px;padding:19px;border-radius:18px;background:#fff;border:1px solid #e1eaf5}
.free-result-title{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px}
.free-result-title strong{color:#324d6d;font-size:16px}.free-result-title span{color:#8a9ca9;font-size:12px}
.free-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.free-pair textarea{min-height:72px;font-size:17px;font-weight:650}
.free-ipa{border-radius:11px;background:#f6f9fc;padding:11px 13px;font-size:14px;color:#6c879e;line-height:1.65;overflow-wrap:anywhere;margin:13px 0}
.free-record-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.free-record-actions .soft-button{padding:10px 13px;font-size:13px}
.free-record-actions .text-button{font-size:12px}
.free-note{font-size:12px;color:#72889e;line-height:1.5;margin-top:10px;min-height:0}
.free-note:empty{display:none}
.free-save-row{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:17px;padding-top:14px;border-top:1px solid #eff1f3}
.free-save-row label{display:flex;align-items:center;gap:8px;font-size:12px;color:#73879a}
.free-save-row select{max-width:185px;background:#f9fbfe;border:1px solid #e1e8f0;padding:10px 9px;border-radius:10px;color:#3d5e7d}
.category-subheading{text-align:center;font-size:14px;font-weight:750;color:#8198ac;margin:22px 0 16px}
.lesson-recording{max-width:550px;margin:19px auto 0;padding:17px 20px;border:1px solid #e1eaf4;border-radius:17px;background:#ffffffa8;display:flex;gap:15px;align-items:center;justify-content:space-between}
.lesson-recording strong{font-size:14px;color:#426080}.lesson-recording p{margin:4px 0 0;color:#8a9dae;font-size:11px;line-height:1.5}
.lesson-recording .free-record-actions{justify-content:flex-end;flex-shrink:0}
@media(max-width:820px){.free-practice{padding:19px 17px}}
@media(max-width:580px){.free-title{align-items:flex-start}.free-title h2{font-size:19px}.free-title p{font-size:12px}.free-input-row{flex-direction:column}.free-input-row .primary-button{min-height:45px}.free-pair{grid-template-columns:1fr}.free-save-row{align-items:stretch;flex-direction:column}.free-save-row label{justify-content:space-between}.free-save-row select{max-width:none;flex:1}.lesson-recording{flex-direction:column;align-items:flex-start}.lesson-recording .free-record-actions{justify-content:flex-start}.free-result{padding:14px}.free-practice{border-radius:19px;margin-bottom:24px}}

/* V1.2 单一导航、自定义分类与可选 AI 发音 */
.main-nav{flex-shrink:0}.category-subheading{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap}
.category-subheading .text-button{font-size:12px;padding:7px 10px;border:1px solid #dbe6f3;border-radius:999px;background:#fff}
.category-manage{margin-bottom:19px;padding:15px 18px;border:1px solid #e7edf3;border-radius:17px;background:#fff}
.category-manage-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.category-manage h2{font-size:15px;margin:0;color:#354f6a}
.category-manage-list{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.custom-category-row{display:flex;align-items:center;gap:3px;border:1px solid #e1e9f2;border-radius:11px;padding:5px 7px 5px 11px;background:#f8fbff}
.custom-category-row span{font-size:12px;color:#47617b;margin-right:5px}
.custom-category-row button{font-size:11px;padding:5px 7px}
.empty-category-hint{font-size:12px;color:#8b99a7;margin:0}
.ai-voice-settings{padding:12px 13px;border-radius:13px;background:#f4f8fc;border:1px solid #e5eef8;margin:10px 0}
.ai-voice-settings .field+.field{margin-top:11px}
.ai-voice-settings .footnote{margin:10px 0 0}
.ai-voice-action{background:#f2eaff!important;color:#7859a3!important}
@media(max-width:580px){.main-nav{width:100%;order:3;justify-content:center}.topbar{flex-wrap:wrap}.nav-item{flex:1}.category-manage{padding:12px}.category-manage-list{gap:7px}}

/* V1.3：不用 emoji，以本地图片和插画式空状态展示单词。 */
.tile-icon.tile-art{width:57px;height:57px;border-radius:18px;display:grid;place-items:center;background:#e5f2ff;color:#4676ae;font-weight:850;font-size:30px;letter-spacing:-.04em;margin-bottom:14px}
.category-tile:nth-child(4n+2) .tile-art{background:#fff0d8;color:#b27632}
.category-tile:nth-child(4n+3) .tile-art{background:#e7f5e8;color:#568962}
.category-tile:nth-child(4n+4) .tile-art{background:#f7e8f3;color:#a16691}
.tile-art.sentence-art{border-radius:50%}
.record-emoji.record-icon{font-size:18px;font-weight:800;color:#906e41;letter-spacing:-.06em}
.word-art.picture-frame{width:min(100%,272px);height:215px;min-height:0;margin:1px auto 7px;border-radius:24px;background:#f5f9fd;border:1px solid #ecf1f7;filter:none;display:flex;align-items:center;justify-content:center;overflow:hidden}
.picture-frame img{display:block;width:100%;height:100%;object-fit:contain}
.picture-frame img[hidden]{display:none}
.picture-frame svg{width:48%;max-width:140px;height:auto;opacity:.85}
.image-tools{margin:15px auto 0;padding:14px 17px;border:1px solid #e7edf4;border-radius:16px;background:#ffffffbb}
.image-tools-head{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:13px;color:#4f6c84}
.image-tools-head span{font-size:11px;color:#91a0ad;text-align:right;overflow-wrap:anywhere}
.image-tools-head a{color:#4479b7;text-decoration:underline;text-underline-offset:2px}
.picture-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}
.picture-actions .soft-button{padding:9px 13px;font-size:12px}
.picture-actions .text-button{font-size:12px}
.stock-search{display:flex;gap:9px;margin:15px 0}
.stock-search input{flex:1;min-width:0;padding:12px 14px;border:1px solid #dde7f0;border-radius:12px;background:#f8fbff}
.stock-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;max-height:53vh;overflow:auto}
.stock-results>.empty-state,.stock-results>.help-text{grid-column:1/-1}
.stock-result-card{min-width:0;background:#f9fbfe;border:1px solid #e7edf3;border-radius:13px;overflow:hidden;padding-bottom:10px;display:flex;flex-direction:column;gap:7px}
.stock-result-card img{width:100%;height:140px;display:block;object-fit:contain;background:#f0f3f7}
.stock-result-card .stock-caption{font-size:10px;color:#8a9aab;display:block;padding:0 10px;line-height:1.4;overflow-wrap:anywhere}
.stock-source{font-size:11px;color:#4e82c4;padding:0 10px}
.stock-result-card button{margin:auto 10px 0;padding:8px;font-size:11px}
@media(max-width:580px){.word-art.picture-frame{width:220px;height:175px;border-radius:18px}.image-tools{padding:12px}.picture-actions .soft-button{flex:1}.stock-results{grid-template-columns:repeat(2,minmax(0,1fr))}.stock-result-card img{height:110px}.stock-search{flex-wrap:wrap}.stock-search button{flex:1}}

/* v1.4：单张图片独占容器；解决图片与空状态图标在 Safari 里并排占位的问题。 */
.word-art.picture-frame{position:relative;isolation:isolate;background:#f6f9fd}
.word-art.picture-frame.has-picture{background:#fffaf0;border-color:#f0e8db}
.picture-frame #lessonPicture:not([hidden]){position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.picture-frame #picturePlaceholder[hidden]{display:none!important}
.picture-frame.has-picture #picturePlaceholder{display:none!important}

/* 图库弹窗里的通用 div 纵向布局曾覆盖图库网格，使卡片挤成细条。 */
.app-dialog > .stock-results{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:min(52dvh,520px);overflow-y:auto;overflow-x:hidden;align-content:start;padding:2px 4px 6px 1px;scrollbar-gutter:stable}
.stock-result-card{display:flex;flex-direction:column;flex:initial;min-height:0;gap:0;padding:0 0 12px;background:#fff;border-color:#e9edf2;border-radius:16px;box-shadow:0 4px 14px #3247610c}
.stock-result-card img{height:142px;min-height:142px;flex:0 0 auto;object-fit:cover;background:#edf2f7}
.stock-result-card .stock-caption{padding:10px 11px 3px;font-size:11px;min-height:39px;color:#748398}
.stock-source{padding:0 11px 10px;color:#366fba;word-break:break-word}
.stock-result-card button{display:block;margin:auto 11px 0;padding:10px 8px;font-size:12px;min-height:38px;flex-shrink:0}
.stock-provider-row{display:grid!important;grid-template-columns:1fr 1.25fr;gap:12px!important;margin-top:15px}
.stock-provider-row .field{min-width:0}
.stock-help-links{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;justify-content:space-between;margin:-3px 0 12px;font-size:11px;color:#8998a7}
.stock-help-links a{color:#386fb2;text-underline-offset:2px}

/* 视觉细节：柔和纸张底色、细边框、更清晰的焦点和轻量层次。 */
.app-shell{background:radial-gradient(circle at 16% 0%,#fff2dd 0%,transparent 31%),#fffaf3}
.topbar{padding-top:22px;padding-bottom:18px}
.brand-mark{background:#ffcf70;border-radius:14px;box-shadow:0 4px 0 #edb851}
.main-nav{box-shadow:0 6px 22px #243d5d0b}
.nav-item{transition:background .15s,color .15s}
.nav-item.active{background:#e5f0ff;color:#2f669f}
.category-tile{border-color:#eee9df;box-shadow:0 8px 26px #3b4c5f0a}
.category-tile:hover{border-color:#cfdeea}
.learning-card{box-shadow:0 22px 50px #283c5c0e;border-color:#f0e9df}
.big-speak{background:#ffc451;box-shadow:0 7px 0 #e9ad31,0 14px 26px #ffbf482f}
.primary-button,.soft-button,.ghost-button,.player-primary{transition:transform .15s,background .15s,box-shadow .15s}
.soft-button:hover{background:#dceaff}
.field input:focus,.field textarea:focus,.field select:focus,.stock-search input:focus{border-color:#9fbfe7}
.image-tools{box-shadow:0 8px 25px #263f5d08;background:#ffffffdf}
.app-dialog{box-shadow:0 28px 88px #1e35514a}
.dialog-close{min-width:38px;min-height:38px;touch-action:manipulation}
.record-row:hover{background:#fcfdff}
.version-line{font-variant-numeric:tabular-nums}
@media(max-width:580px){
 .topbar{padding-top:max(15px,env(safe-area-inset-top))}
 .main-content{padding-left:16px;padding-right:16px}
 .word-art.picture-frame{width:min(100%,260px);height:205px}
 .app-dialog.wide-dialog{width:calc(100% - 24px);padding:17px;max-height:88dvh}
 .app-dialog > .stock-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:45dvh;scrollbar-gutter:auto}
 .stock-result-card img{height:118px;min-height:118px}
 .stock-result-card .stock-caption{min-height:42px}
 .stock-result-card button{margin:2px 8px 0;min-height:40px}
 .stock-provider-row{grid-template-columns:1fr;gap:10px!important}
 .stock-search{margin:11px 0}
 .stock-search input{width:100%}
 .stock-help-links{margin-bottom:11px}
 .stock-results>.empty-state{padding:22px 8px}
}

/* V1.4.1 自由输入操作区：清空与生成并排，触屏不挤压文本框 */
.free-input-actions{display:flex;flex-direction:column;gap:9px;flex:none;min-width:130px}
.free-input-actions>button{width:100%;min-height:42px}
.free-input-row .free-input-actions .primary-button{min-width:0;flex:1}
@media(max-width:580px){.free-input-actions{width:100%;flex-direction:row;gap:10px}.free-input-actions .soft-button{flex:0 0 32%}.free-input-actions .primary-button{flex:1}.free-input-actions>button{min-height:45px}}

/* v1.4.3：固定模型概览，不再显示选择下拉框 */
.fixed-model-summary { border: 1px solid var(--border, #e2e9f0); border-radius: 14px; padding: 7px 14px; background: #f7fafe; margin: 10px 0; }
.fixed-model-summary p { margin: 0; display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:8px 0; color:#45566c; font-size: .91rem; }
.fixed-model-summary p+p { border-top: 1px solid #e5edf4; }
.fixed-model-summary strong {color:#273e59; font-weight:600; white-space:nowrap;}
.fixed-model-summary span {text-align:right; overflow-wrap:anywhere;}
.fixed-model-note {font-size:.92rem;color:#536479; margin:0 0 12px;}

/* v1.5.0：Pixabay 唯一图库，弹窗自身滚动，不再让搜索结果产生第二层滚动条。 */
.stock-dialog{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:min(91dvh,900px)}
.stock-dialog > .stock-results{max-height:none!important;overflow:visible!important;scrollbar-gutter:auto!important;align-content:start}
.stock-dialog > .stock-results .stock-result-card{min-height:0}
.pixabay-key-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 0}
.pixabay-key-actions .check-row{flex:1}
.pixabay-key-actions .text-button{flex-shrink:0}
@media(max-width:580px){.stock-dialog{max-height:calc(100dvh - 28px)}.stock-dialog > .stock-results{max-height:none!important;overflow:visible!important;grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 覆盖弹窗 div 通用的纵向 flex，保持 Key 记忆和清除操作紧凑。 */
.stock-dialog > .pixabay-key-actions{flex-direction:row;align-items:center;justify-content:space-between;gap:10px}
.stock-dialog > .pixabay-key-actions .check-row{display:flex;gap:8px;justify-content:flex-start;text-align:left}
.stock-dialog > .pixabay-key-actions .text-button{white-space:nowrap}
dialog.stock-dialog > div.pixabay-key-actions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:6px!important}
@media(max-width:400px){dialog.stock-dialog > div.pixabay-key-actions .check-row{font-size:12px}dialog.stock-dialog > div.pixabay-key-actions .text-button{font-size:12px;padding:6px}}

/* 免费 Key 入口与静态配图缩略图；v1.6.2 不再提供图片放大预览。 */
.stock-dialog .stock-help-links{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:4px 0 17px}
.stock-dialog .pixabay-key-cta{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:47px;padding:12px 16px;border:1px solid #dce9f9;border-radius:14px;text-align:center;background:#e9f1ff;color:#386cad;text-decoration:none;font-size:15px;font-weight:750;box-shadow:none;transition:background .12s}
.stock-dialog .pixabay-key-cta:hover,.stock-dialog .pixabay-key-cta:focus-visible{background:#dceaff;color:#285b9a}
.stock-dialog .stock-search #stockSearchButton{width:100%;min-height:50px;background:#4f80ef;color:#fff;font-size:15px;font-weight:800;box-shadow:0 5px 12px #4f80ef30}
.stock-dialog .stock-search #stockSearchButton:not(:disabled):hover{background:#346bd1;color:#fff}
@media(min-width:581px){.stock-dialog .stock-search #stockSearchButton{width:auto;min-width:150px}}
.stock-dialog .pixabay-key-cta span{font-size:17px}
.stock-dialog .stock-help-links>span{text-align:center;font-size:12px;color:#8394a6;line-height:1.5}
.stock-result-card .stock-thumbnail{display:block;position:relative;width:100%;padding:0;margin:0;border:0;border-radius:0;min-height:0;background:transparent;overflow:hidden}
.stock-result-card .stock-thumbnail img{width:100%;height:142px;min-height:142px;object-fit:cover;display:block}
@media(max-width:580px){.stock-result-card .stock-thumbnail img{height:118px;min-height:118px}}

/* v1.7：API Key 获取入口与主操作视觉区分，移动端亦可点击。 */
.api-key-help-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;align-self:flex-start;border:1px solid #c4d9f7;border-radius:12px;background:#ebf3ff;color:#2d66bb;font-size:14px;font-weight:750;text-decoration:none;padding:12px 16px;min-height:44px;max-width:100%;touch-action:manipulation}
.api-key-help-link:hover{background:#dfecff;border-color:#9fbfe9}
.api-key-help-link:focus-visible{outline:3px solid #8bb7fa;outline-offset:3px}
.api-key-help-note{font-size:12px;color:#8492a1;line-height:1.6;margin:-8px 0 1px}
@media(max-width:580px){.api-key-help-link{width:100%;align-self:stretch}}
