*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;background:#f4f1e9;color:#29483c;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #db9b55;outline-offset:-3px}header{height:76px;margin:auto;max-width:1500px;padding:0 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #dcdfd2}.brand{font-size:19px;font-weight:750;letter-spacing:-.5px}.brand>span{display:inline-block;color:#fff;background:#315b49;padding:5px 11px 8px;border-radius:12px;margin-right:7px;font-family:Georgia,serif}.brand small{font-size:11px;font-weight:400;color:#8b9583;margin-left:12px}.tools{display:flex;gap:8px}.tools button{background:#fffcf5;border:1px solid #dce0d4;border-radius:25px;padding:9px 15px;font-size:12px}.tools button[aria-pressed=false]{opacity:.55}main{max-width:1500px;margin:auto;padding:22px 32px 10px;height:calc(100dvh - 76px);display:flex;flex-direction:column}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-shrink:0}.eyebrow{font-size:9px;letter-spacing:2.6px;font-weight:700;color:#8a947e;margin:0 0 8px}h1{font-family:Georgia,'Songti SC',serif;font-size:30px;font-weight:500;margin:0 0 9px;letter-spacing:-.6px}.intro{font-size:12px;color:#82907c;margin:0}.round-info{text-align:right;flex-shrink:0}.round-info span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:2px;color:#8d967e}.round-info b{display:block;font-size:14px;margin-top:7px;font-weight:500}.progress-row{display:flex;align-items:center;gap:18px;margin:20px 0 16px;font-size:11px;flex-shrink:0}#round-dots{display:flex;gap:7px}.dot{width:23px;height:23px;border-radius:50%;background:#e4e6d9;color:#919b84;text-align:center;line-height:23px;font-size:10px}.dot.active{background:#315b49;color:white}.dot.past{background:#b8c8ab;color:#315b49}.track{height:6px;border-radius:20px;overflow:hidden;background:#dfe4d6;flex:1}#progress{height:100%;background:#88a178;transition:width .3s}.workspace{display:grid;grid-template-columns:205px minmax(0,1fr);gap:22px;flex:1;min-height:0}aside{display:flex;flex-direction:column;min-height:0;padding:17px 12px 10px;background:#e6ecdf;border:1px solid #d6dece;border-radius:21px}.rail-heading{font-size:10px;letter-spacing:2px;padding:0 5px 12px;color:#738568;display:flex;justify-content:space-between;align-items:center}.rail-heading span{font-size:9px;letter-spacing:0;color:#92a18a}#rooms{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));gap:9px;flex:1;min-height:0}.room{border:2px solid transparent;border-radius:14px;background:#fffdf5b0;position:relative;padding:5px 8px;display:flex;align-items:center;gap:7px;text-align:left;min-height:0;transition:background .15s,border-color .15s}.room .room-art{width:66px;flex-shrink:0;display:block}.room .room-art svg{display:block;width:100%;height:auto;max-height:80px}.room strong{display:block;font-size:13px;font-weight:600}.room .translation{font-size:10px;display:block;color:#7f8c76;margin-top:3px}.room .room-count{font-size:10px;display:block;color:#849476;margin-top:5px}.room.locked{background:#d9dfd2;opacity:.65}.room.locked .room-art{filter:grayscale(1)}.room.locked strong{font-size:12px}.room.over{border-color:#cc9550;background:#fff0d2;box-shadow:0 0 0 4px #dbbc7530}.room.success{animation:glow .6s}.rail-foot{text-align:center;font-size:9px;line-height:1.7;color:#85947a;margin-top:10px;flex-shrink:0}.collection{min-width:0;min-height:0;display:flex;flex-direction:column;background:#fffdf7;border:1px solid #e4e3d6;border-radius:21px;overflow:hidden}.collection-head{padding:18px 22px 12px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-shrink:0}.collection-head b{display:block;font-family:Georgia,serif;font-size:21px;font-weight:500}.collection-head #new-count{display:block;font-size:10px;color:#92997e;margin-top:5px}.filters{background:#f0f0e5;padding:4px;border-radius:25px;display:flex;gap:3px}.filters button{font-size:11px;border-radius:22px;padding:8px 12px;background:transparent;white-space:nowrap}.filters button.active{background:#315b49;color:#fff}.filters button span{opacity:.7;margin-left:4px}.scroll-hint{padding:0 22px 11px;font-size:10px;color:#98a087;border-bottom:1px solid #eeeee4;flex-shrink:0}#list{overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#b7c4a7 #f7f7f0;padding:18px 20px;scroll-behavior:auto}#items{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:13px}.item{position:relative;min-width:0;background:#f5f4ec;border:2px solid transparent;border-radius:17px;padding:8px 7px 11px;text-align:center;user-select:none;-webkit-user-select:none;touch-action:pan-y;transition:border-color .12s,background .12s}.item:hover{background:#efefdf}.item.selected{border-color:#d4a068;background:#fff2d9}.illustration{height:104px;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab}.illustration svg{width:112px;height:100px;pointer-events:none;filter:drop-shadow(0 5px 1px #8d9e7514)}.illustration:active{cursor:grabbing}.word{font-size:12px;line-height:1.5;min-height:36px;display:flex;align-items:center;justify-content:center;padding:0 3px}.cn{display:block;font-size:11px;color:#6f885b;margin-top:3px}.learn-tag{position:absolute;top:7px;right:7px;border:1px solid #e6d7ba;color:#b19a73;background:#fffbef;border-radius:10px;padding:2px 5px;font-size:8px;pointer-events:none}.done{background:#eef2e7}.done .learn-tag{color:#70905d;border-color:#c9d7b8;background:#e9f0df}.feedback{padding:12px 18px;min-height:46px;font-size:12px;text-align:center;display:flex;align-items:center;justify-content:center;border-top:1px solid #e6e9dd;color:#728263;flex-shrink:0;background:#fcfcf4}.feedback.correct{background:#edf3e4;color:#3f714a}.feedback.wrong{background:#fff3df;color:#9f793f}#empty{text-align:center;padding:40px 15px;color:#839373;font-size:13px;line-height:2}#empty button{display:block;margin:15px auto 0}footer{display:flex;justify-content:space-between;gap:10px;font-size:9px;color:#929b85;padding-top:10px;flex-shrink:0;line-height:1.7}.ghost{position:fixed;z-index:100;pointer-events:none;background:#fff9e9;border:2px solid #d29e5b;border-radius:16px;width:120px;text-align:center;padding:8px;box-shadow:0 15px 35px #25482b33;transform:translate(-50%,-66%)}.ghost svg{width:85px;height:80px;display:block;margin:auto}.ghost span{font-size:11px}.overlay{position:fixed;inset:0;background:#203e3470;z-index:150;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(5px)}[hidden]{display:none!important}.dialog{background:#fffcf4;max-width:480px;width:100%;max-height:94dvh;overflow:auto;padding:32px;border-radius:25px;text-align:center;box-shadow:0 20px 90px #17372b33}.mini-house{width:58px;height:58px;line-height:54px;background:#e5ecdc;border:1px solid #d4dfc7;border-radius:20px;font-size:40px;color:#6f8f62;margin:0 auto 20px}.dialog h2{font-family:Georgia,'Songti SC',serif;font-size:27px;font-weight:400;margin:13px 0 18px}.dialog p{font-size:13px;color:#7a8474;line-height:1.9}.dialog .fine{font-size:10px;line-height:1.8;color:#98a08c}.instructions{text-align:left;background:#f0f2e6;border-radius:13px;padding:14px 23px;margin:18px 0}.instructions span{display:block;font-size:12px;margin:6px 0;color:#69805f}.primary{border:0;background:#315b49;color:white;padding:14px 27px;border-radius:30px;margin:10px 0 0;font-size:13px}.text-button{display:block;margin:16px auto 0;padding:5px 12px;font-size:11px;background:transparent;color:#8c967e}#next-preview{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:18px 0}#next-preview span{background:#eef1e5;border-radius:12px;padding:8px 12px;font-size:11px;color:#6e835f}.spark{position:fixed;pointer-events:none;z-index:120;font-size:24px;color:#d7ab5c;animation:spark .8s ease-out forwards}@keyframes spark{to{transform:translate(var(--x),-70px) rotate(70deg);opacity:0}}@keyframes glow{50%{background:#d7e8bd}}@media(min-width:1300px){.workspace{grid-template-columns:240px minmax(0,1fr)}.room .room-art{width:85px}.room strong{font-size:15px}#items{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}}
@media(max-height:780px){header{height:60px}main{height:calc(100dvh - 60px);padding-top:14px}.eyebrow{font-size:8px;margin-bottom:6px}h1{font-size:25px}.progress-row{margin:13px 0 12px}.room .room-art{width:54px}.rail-foot{display:none}.room strong{font-size:12px}.room .translation{margin-top:1px}.room .room-count{margin-top:3px}.room .room-art svg{max-height:62px}}
@media(max-width:800px){header{padding:0 18px}.brand small{display:none}main{padding-left:16px;padding-right:16px}.workspace{grid-template-columns:170px minmax(0,1fr);gap:13px}.room .room-art{width:48px}.room strong{font-size:12px}.collection-head{padding:15px 14px 10px}.collection-head b{font-size:18px}.filters button{padding:7px 9px;font-size:10px}#list{padding:13px}#items{grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:10px}.scroll-hint{padding-left:14px;padding-right:14px}.illustration{height:95px}.illustration svg{width:102px;height:90px}h1{font-size:26px}.room .room-count{font-size:9px}.rail-heading{letter-spacing:1px;font-size:9px}.rail-heading span{display:none}}
@media(max-width:560px){header{height:58px;padding:0 11px}.brand{font-size:15px}.brand>span{padding:4px 9px 6px;margin-right:4px}.tools{gap:5px}.tools button{padding:7px 9px;font-size:10px}main{height:calc(100dvh - 58px);padding:13px 9px 7px}.heading{gap:8px}.heading .eyebrow{font-size:6px;letter-spacing:1.8px}h1{font-size:19px;letter-spacing:-.5px;margin-bottom:7px}.intro{font-size:9px;line-height:1.6}.round-info span{font-size:8px;letter-spacing:1px}.round-info b{font-size:10px}.progress-row{gap:10px;margin:12px 0;font-size:9px}.dot{width:19px;height:19px;line-height:19px}.workspace{grid-template-columns:106px minmax(0,1fr);gap:8px}aside{padding:11px 6px 7px;border-radius:15px}.rail-heading{font-size:8px;padding:0 3px 9px}#rooms{gap:7px}.room{flex-direction:column;justify-content:center;gap:2px;text-align:center;padding:5px 2px;border-radius:11px}.room .room-art{width:53px}.room .room-art svg{max-height:49px}.room strong{font-size:11px}.room .translation{font-size:9px;margin-top:2px}.room .room-count{font-size:8px;margin-top:2px}.rail-foot{font-size:8px;line-height:1.6}.collection{border-radius:15px}.collection-head{padding:12px 10px 8px;align-items:start;flex-direction:column;gap:9px}.collection-head b{font-size:18px}#new-count{font-size:9px!important}.filters{padding:3px;width:100%}.filters button{flex:1;padding:6px;font-size:9px}.scroll-hint{font-size:8px;line-height:1.7;padding:0 10px 8px}#list{padding:9px 7px}#items{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.item{padding:6px 2px 8px;border-radius:12px}.illustration{height:79px}.illustration svg{width:80px;height:75px;max-width:100%}.word{font-size:10px;min-height:35px;line-height:1.4}.cn{font-size:9px}.learn-tag{font-size:7px;top:4px;right:4px;padding:1px 4px}.feedback{font-size:10px;line-height:1.6;padding:9px 8px;min-height:43px}footer{font-size:8px;padding-top:7px}#voice-status{display:none}.dialog{padding:25px 22px}.dialog h2{font-size:24px}}
.mode-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px;flex-shrink:0}.mode-switch{display:flex;gap:3px;border:1px solid #d9dfce;background:#e9ecdf;border-radius:30px;padding:4px}.mode-switch button{background:transparent;border-radius:25px;padding:8px 18px;font-size:12px}.mode-switch button.active{background:#315b49;color:white}.mode-bar>span{font-size:10px;color:#8d987f}.memory-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))!important}.memory-card{min-height:155px;touch-action:pan-y;perspective:600px;cursor:pointer;background:transparent;border:0;position:relative;padding:0;user-select:none;-webkit-user-select:none}.card-inner{display:block;position:relative;width:100%;height:155px;transition:transform .36s ease;transform-style:preserve-3d}.memory-card.open .card-inner,.memory-card.matched .card-inner{transform:rotateY(180deg)}.card-back,.card-front{position:absolute;inset:0;border-radius:15px;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column;border:2px solid #e0e4d5;overflow:hidden}.card-back{background:#dfe8d5;background-image:repeating-linear-gradient(45deg,transparent,transparent 12px,#f1f4e644 12px,#f1f4e644 13px)}.card-back:before{content:'';position:absolute;inset:8px;border:1px solid #a9bd9766;border-radius:9px}.card-back span{font-family:Georgia,serif;color:#8ca17a;font-size:40px;font-weight:400}.card-back small{font-size:7px;color:#92a180;letter-spacing:2px}.card-front{background:#f7f5ed;transform:rotateY(180deg);padding:7px}.card-front svg{width:98px;height:91px;flex-shrink:0}.card-front .word{font-size:11px;min-height:32px}.card-front .cn{font-size:10px;margin-top:1px}.memory-card.matched .card-front{background:#edf3e4;border-color:#c7d8b7}.memory-card.matched{cursor:pointer}.memory-card .card-back,.memory-card .card-front{pointer-events:none}.flying{position:fixed;z-index:110;pointer-events:none;background:#fffaf0;border:2px solid #b6cda1;border-radius:12px;width:95px;padding:5px;transition:transform .65s cubic-bezier(.3,.1,.2,1),opacity .6s;transform-origin:center;box-shadow:0 10px 30px #53704422}.flying svg{width:85px;height:80px;display:block}.batch-next{display:block;margin:16px auto 4px}.memory-grid~#empty{padding:16px}.memory .filters button[data-filter=todo]{min-width:98px}.memory .scroll-hint{color:#879a74}.memory .illustration{touch-action:pan-y}
@media(max-width:560px){.mode-bar{margin-bottom:12px}.mode-switch button{padding:7px 13px;font-size:10px}.mode-bar>span{font-size:8px;max-width:110px;text-align:right}.memory-card,.card-inner{height:126px;min-height:126px}.card-front{padding:4px}.card-front svg{width:77px;height:72px;max-width:100%}.card-front .word{font-size:9px;min-height:29px}.card-front .cn{font-size:8px}.card-back span{font-size:32px}.card-back small{font-size:6px;letter-spacing:1px}.card-back:before{inset:6px}.mode-switch{padding:3px}}
@media(max-height:780px){.mode-bar{margin-bottom:12px}.mode-switch button{padding-top:6px;padding-bottom:6px}}
@media(max-height:560px){.heading{display:none}footer{display:none}.mode-bar{margin-bottom:8px}.progress-row{margin:0 0 9px}aside{padding:8px}.rail-heading{display:none}.room{flex-direction:row}.room .room-art{width:38px}.room .translation{display:none}.collection-head{padding:9px 13px;flex-direction:row}.scroll-hint{padding-bottom:6px}.room .room-count{font-size:8px}.rail-foot{display:none}}
@media(max-width:560px){#items.memory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Smaller pictures leave room for larger, readable French names. */
.illustration{height:87px}.illustration svg{width:94px;height:83px}.word{font-size:14px;line-height:1.45;min-height:42px}
.card-front svg{width:78px;height:72px}.card-front .word{font-size:14px;line-height:1.4;min-height:40px;width:100%;overflow-wrap:anywhere}.card-front .cn{font-size:11px}.card-front{padding:7px 6px}.memory-card,.card-inner{height:153px;min-height:153px}
@media(max-width:800px){.illustration{height:80px}.illustration svg{width:84px;height:75px}.word{font-size:13px}}
@media(max-width:560px){.illustration{height:64px}.illustration svg{width:64px;height:60px}.word{font-size:12px;min-height:40px;overflow-wrap:anywhere}.card-front svg{width:58px;height:54px}.card-front .word{font-size:12px;min-height:37px;line-height:1.35}.card-front .cn{font-size:9px}.memory-card,.card-inner{height:132px;min-height:132px}}
.speech-dialog{max-width:480px}.speech-dialog h2{font-size:23px}#speech-art svg{width:105px;height:94px}#speech-word{font-size:24px;font-weight:600;line-height:1.5;margin:0 0 13px;overflow-wrap:anywhere}.speech-controls{display:flex;justify-content:center;gap:10px;align-items:center}.speech-controls .primary{margin:0}.secondary{border:1px solid #ccd8bd;background:#eff3e6;border-radius:30px;padding:13px 20px;font-size:13px}#speech-status{min-height:50px;font-size:13px;color:#6b835e}#speech-heard{font-size:13px;background:#f0f2e8;border:1px solid #dfe5d4;border-radius:12px;padding:12px;color:#728568;overflow-wrap:anywhere}.speech-controls button:disabled{opacity:.45;cursor:default}.listening{animation:listen 1.2s ease infinite}@keyframes listen{50%{box-shadow:0 0 0 7px #9bb98444}}@media(max-width:560px){.mode-bar{flex-wrap:wrap;gap:5px}.mode-bar>span{display:none}.mode-switch{width:100%}.mode-switch button{flex:1;padding:7px 6px;font-size:10px}.speech-dialog{padding:22px}.speech-dialog h2{font-size:21px}#speech-word{font-size:23px}.speech-dialog .speech-rule{font-size:12px}}
.round-pill{font-size:10px;white-space:nowrap;padding:5px 9px;border-radius:15px;background:#e1e8d7;color:#789065}#rooms{gap:7px}.room .room-art svg{max-height:65px}.room strong{overflow-wrap:anywhere}.room .room-count{margin-top:3px}.rail-foot{font-size:9px}@media(max-width:560px){.room .room-art{width:42px}.room .room-art svg{max-height:38px}.room strong{font-size:10px}.room .translation{font-size:8px}.room .room-count{font-size:8px}.round-pill{font-size:9px;padding:4px 8px}}
#speech-recovery{text-align:left;background:#eef2e5;border:1px solid #d2dfc4;border-radius:14px;padding:15px;margin:12px 0}#speech-recovery strong{font-size:14px}#speech-recovery p{font-size:12px;line-height:1.8;margin:8px 0}#speech-recovery input{width:100%;border:1px solid #d0dcc2;border-radius:8px;background:#fffdf6;color:#46633c;font:11px system-ui;padding:9px;margin:0 0 10px;user-select:text}#speech-recovery .secondary{font-size:12px;padding:10px 16px}#speech-recovery small{font-size:10px;line-height:1.8;color:#8c977c;display:block}#speech-copy-status{color:#587a45}
.speech-failures{display:inline-block;background:#edf2e4;border-radius:20px;padding:6px 13px;font-size:11px!important;color:#7e966d!important;margin-bottom:0!important}.skip-button{display:block;margin:14px auto 0;background:#f5e9d5;border-color:#e0c9a1;color:#8a744f;font-size:12px}.book-overlay{z-index:180}.book-dialog{width:min(1060px,96vw);max-height:93dvh;background:#fffcf4;border-radius:23px;padding:27px;display:flex;flex-direction:column;box-shadow:0 20px 90px #17372b33}.book-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.book-heading h2{font-family:Georgia,'Songti SC',serif;font-size:28px;font-weight:500;margin:4px 0 8px}.book-heading p{font-size:11px;color:#8a987b;margin:0}.book-intro,.book-hint{font-size:11px;line-height:1.8;color:#849178}.book-controls{display:flex;gap:12px;justify-content:space-between;margin:10px 0}.book-tabs{display:flex;gap:5px;background:#edf1e3;border-radius:25px;padding:4px}.book-tabs button{border-radius:22px;padding:9px 18px;background:transparent;font-size:12px}.book-tabs button.active{background:#315b49;color:#fff}.book-controls input{border:1px solid #d6dfca;border-radius:25px;padding:10px 14px;min-width:240px;font:12px system-ui;background:#fffdf8;color:#46633d}.book-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.book-actions .primary,.book-actions .secondary{padding:10px 15px;margin:0;font-size:11px}.book-actions span{font-size:11px;color:#8b997d;margin-right:auto}.book-actions button:disabled{opacity:.4;cursor:default}.book-scroll{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;border:1px solid #e1e6d6;border-radius:12px}.book-scroll table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}.book-scroll th{position:sticky;top:0;background:#e9efde;font-size:11px;font-weight:500;color:#6e825d;z-index:1}.book-scroll th,.book-scroll td{padding:12px 10px;border-bottom:1px solid #e5e9da;white-space:nowrap}.book-scroll tr:nth-child(even){background:#f4f5eb}.book-scroll input[type=checkbox]{width:19px;height:19px;accent-color:#315b49;cursor:pointer}.book-scroll small{font-size:9px;display:block;color:#92a081;margin-top:5px}.book-word{font-size:13px;background:transparent;text-align:left;padding:2px;color:#355c45}.book-word span{color:#9caf89;margin-left:5px}#book-empty{font-size:12px;color:#879877;text-align:center;padding:25px}#book-notice{min-height:18px;font-size:11px;color:#688651;margin-bottom:0}@media(max-width:650px){.book-dialog{padding:18px;width:97vw;max-height:96dvh}.book-heading h2{font-size:23px}.book-heading>.secondary{font-size:11px;padding:9px 12px}.book-controls{flex-direction:column;gap:9px}.book-controls input{width:100%;min-width:0}.book-tabs{justify-content:center}.book-tabs button{flex:1;padding:8px 12px}.book-actions .primary,.book-actions .secondary{padding:9px 10px;font-size:10px}.book-intro{font-size:10px}.book-hint{font-size:9px}.book-scroll th,.book-scroll td{padding:10px 8px}.book-word{font-size:12px}.brand small{display:none}.tools{gap:4px}.tools button{font-size:10px;padding:7px 8px}.brand{font-size:13px}}


