@import './reading-sentence.css';
.focus-header .focus-tag{font-size:11px;color:#8a8c89}.focus-header h1{font-size:17px}.focus-content{padding-top:20px}.focus-progress{display:flex;justify-content:space-between;gap:12px;color:#7a817b;font-size:12px;margin-bottom:12px}.focus-content .meter{margin-bottom:22px}.focus-content .sound-card{margin:18px 0;padding:22px 16px;background:linear-gradient(155deg,#fff7f7,#f5faf6);border-radius:28px}.focus-content .word{font-size:48px}.focus-content .course-options{display:grid;gap:10px}.focus-content .course-options button{text-align:left;min-height:54px}.focus-companion{text-align:center;margin:20px 0 12px}.focus-companion img{height:155px;max-width:90%;object-fit:contain}.focus-companion h2{font-size:21px}.focus-content .muted{text-align:center}.focus-mic{display:block;margin:18px auto;width:108px;height:108px;border:8px solid #faeeef;border-radius:50%;background:#df9aab;color:white;font-weight:700;touch-action:none;box-shadow:0 10px 28px #d793a526}.focus-mic.recording{background:#b9758a;box-shadow:0 0 0 10px #edc1cb55}.focus-mic:disabled{opacity:.45}.focus-audio-note{padding:12px 16px;background:#f8f4ee;border-radius:16px;color:#8f806f;font-size:12px}.focus-help{border:1px solid #ecd9df}.focus-complete{display:block;width:74px;height:74px;margin:18px auto;border-radius:50%;background:#eaf3ed;color:#759e83;font-size:38px;line-height:74px}.focus-content #voice-status{text-align:center;font-size:13px;min-height:20px}.journey-home .journey-heading{margin-top:22px}.learning-illustration{max-height:235px}.focus-content .feedback{padding:15px;border-radius:16px}.focus-content .n5-reading-text{line-height:2.4}

.focus-paragraph{padding:4px 0 18px}.focus-paragraph+.focus-paragraph{border-top:1px solid #f1eded;padding-top:18px}.focus-article .n5-reading-text{margin:0;font-size:19px;line-height:2.3}.focus-paragraph .secondary{margin-top:10px;padding:6px 12px;font-size:12px;min-height:32px}.focus-extras{margin:18px 0;color:#78716f;font-size:14px}.focus-extras summary{cursor:pointer}.focus-extra-body{padding-top:12px;line-height:1.9}.focus-header h1{font-size:18px}.focus-content{max-width:680px;width:100%;margin-inline:auto}

/* Four independent lesson modes share one page and one quiet reading surface. */
.lesson-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:8px auto 0;padding:5px;width:calc(100% - 36px);max-width:644px;flex-shrink:0;border-radius:16px;background:#f4efed}.lesson-tabs button{padding:12px 4px;background:transparent;color:#827874;border:0;border-radius:12px;font-size:15px}.lesson-tabs button.selected{background:#fff;color:#bd788c;box-shadow:0 2px 8px #6b464615;font-weight:700}.lesson-title{font-size:21px;margin:4px 0 22px;font-weight:600}.lesson-word{text-align:center;padding:30px 12px}.lesson-word h2{font-size:48px;line-height:1.5;margin:8px}.lesson-word p{font-size:18px}.lesson-word p:first-child{font-size:20px;color:#9b7f7f}.voice-pending{display:block;margin-top:12px;color:#938981;font-size:12px}.lesson-grammar{padding:16px 0;line-height:1.95;border-bottom:1px solid #eee7e3}.lesson-grammar h2{font-size:22px}.lesson-grammar h3{font-size:15px;color:#9f7280}.lesson-grammar blockquote{margin:10px 0;padding:12px 16px;border-left:3px solid #dca9b8;background:#fbf1f3;font-size:20px}.lesson-translation,.lesson-subtitle{color:#8b8078;line-height:1.8}.focus-paragraph.current{background:#fcf1f4;border-radius:16px;padding:14px}.lesson-dock{flex-shrink:0;max-width:680px;width:100%;margin:auto;gap:10px}.lesson-player{width:100%}.lesson-play-row{display:flex;justify-content:space-between;align-items:center;gap:8px}.lesson-play-row .primary{min-width:130px}.lesson-play-row .text-button{font-size:12px;padding:10px 5px}.lesson-play-row [aria-pressed=true]{color:#b36680;font-weight:bold}.lesson-play-row #lesson-audio-status{font-size:12px;color:#93837a}.lesson-seek-label{display:flex;align-items:center;gap:12px;font-size:11px;color:#93837a}.lesson-seek-label input{flex:1;accent-color:#d993aa;min-width:0}.lesson-dock button:disabled{opacity:.4}.lesson-dock>.primary{flex:1}
/* These lessons use flex layout so the player never overlaps the reading area. */
#app.page-course.free-lesson-page{display:flex;flex-direction:column}#app.page-course.free-lesson-page>.header{flex-shrink:0;height:calc(66px + env(safe-area-inset-top,0px));padding-top:max(14px,env(safe-area-inset-top,0px))}#app.page-course.free-lesson-page>.scroll{position:relative;top:auto;bottom:auto;left:auto;right:auto;flex:1;min-height:0;padding-bottom:24px}#app.page-course.free-lesson-page>.dock{position:relative;left:auto;right:auto;bottom:auto;flex-shrink:0;padding-bottom:max(20px,env(safe-area-inset-bottom,0px))}
.pet-study{position:absolute;left:18px;right:18px;bottom:max(20px,env(safe-area-inset-bottom));z-index:15;background:#fffaf5ed;border:1px solid #f1dfd8;border-radius:26px;padding:24px 20px 20px;text-align:center;max-height:60%;overflow:auto;box-shadow:0 6px 30px #73524718}.pet-study h2{font-size:19px;margin:10px 0 14px}.pet-study>button:not(.focus-mic):not(.pet-study-close){margin:6px}.pet-study p{font-size:13px;color:#8c786d}.pet-study .focus-mic{width:84px;height:84px;margin:12px auto}.pet-study-close{position:absolute;right:6px;top:4px;width:44px;font-size:24px}.pet-study-card{background:#fff;border-radius:18px;padding:12px;margin-top:10px}.companion-rail[hidden]{display:none!important}
#app.page-course.free-lesson-page>.header{height:calc(66px + env(safe-area-inset-top,0px))!important;padding:14px 18px 8px!important;padding-top:max(14px,env(safe-area-inset-top,0px))!important}#app.page-course.free-lesson-page>#lesson-panel{top:auto!important;bottom:auto!important;padding:20px 18px 24px!important}#app.page-course.free-lesson-page>.lesson-dock{bottom:auto!important;margin:0 auto}.lesson-player .text-button{white-space:nowrap}
.companion-chat.has-review{filter:drop-shadow(0 0 7px #edc4d8)}
.lesson-word-list{display:block}.lesson-word-row+.lesson-word-row{margin-top:10px}.lesson-word-row{display:flex;align-items:center;justify-content:space-between;width:100%;padding:15px 16px;text-align:left;border:1px solid #eee4e3;border-radius:16px;background:#fffaf9}.lesson-word-copy{display:block;min-width:0;flex:1;overflow-wrap:anywhere}.lesson-word-copy>*{display:block;position:static;line-height:1.6}.lesson-word-copy>*+*{margin-top:4px}.lesson-word-copy strong{font-size:21px;font-weight:600}.lesson-word-copy>span{font-size:13px;color:#9e7b87}.lesson-word-copy small{font-size:14px;color:#736962}.lesson-word-state{font-size:12px;flex-shrink:0;color:#b07c8c;margin-left:10px}.lesson-word-popup .word-reading{font-size:19px;color:#ae8494;margin-top:6px}.lesson-word-popup .word-meaning{font-size:20px;color:#544744}.lesson-word-popup h3{font-size:13px;color:#9f7985;margin-top:22px}.lesson-word-popup .word-example{font-size:17px;line-height:1.9;color:#554d49}.lesson-word-popup .secondary{margin-top:5px}#modal:has(.lesson-word-popup){max-height:min(760px,85dvh)}
.grammar-intro{font-size:16px;color:#887475;margin-bottom:16px}.grammar-invite{display:flex;align-items:center;gap:10px;padding:12px;background:#fcf0f4;border-radius:18px;margin-bottom:20px}.grammar-invite img{width:65px;height:72px;object-fit:contain}.grammar-invite strong{font-size:14px}.grammar-invite p{font-size:12px;color:#97858c}.grammar-group-list{display:grid;gap:12px}.grammar-group{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:17px 12px;border:1px solid #f0e5e5;background:#fffcfa;border-radius:18px}.grammar-group>span:nth-child(2){flex:1}.grammar-group strong{display:block;font-size:19px}.grammar-group small{display:block;font-size:12px;margin-top:5px}.grammar-number{color:#c695a4;font-size:14px}.grammar-shortcuts{display:flex;gap:9px;flex-wrap:wrap;margin:15px 0}.grammar-shortcuts button{flex:1;font-size:13px!important}.grammar-note{font-size:12px;color:#a18e89;margin-top:18px}.grammar-practice-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#987984;margin-bottom:12px}.grammar-explain{border:1px solid #efdde4;border-radius:16px;padding:14px;background:#fff7fa;margin-bottom:24px;font-size:14px;line-height:1.9}.grammar-explain summary{cursor:pointer;font-weight:600;color:#a06f82}.grammar-explain p{margin:12px 0}.grammar-parts{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}.grammar-parts>span{background:white;padding:10px;border-radius:10px;border-bottom:3px solid #d9a4b6}.grammar-parts strong,.grammar-parts small{display:block}.grammar-parts small{font-size:10px}.grammar-task h2{font-size:21px;line-height:1.8;margin-bottom:20px}.grammar-options{display:grid;gap:12px}.grammar-option{border:1px solid #e9dfdf;border-radius:16px;background:#fffaf9;width:100%;padding:16px;text-align:left;font-size:17px}.grammar-option:disabled{opacity:1}.grammar-feedback{padding:18px;border-radius:18px;margin:16px 0;font-size:14px}.grammar-feedback p{margin:9px 0}.grammar-feedback.right,.grammar-option.right{background:#edf5ec!important;border-color:#aec7a9;color:#55744e}.grammar-feedback.wrong{background:#fff1e9;color:#926644}.grammar-assembled{min-height:85px;border:1px dashed #d6b2bf;background:#fff7fa;padding:16px;border-radius:14px;margin-bottom:18px;font-size:19px;line-height:1.9}.grammar-tokens{display:flex;flex-wrap:wrap;gap:9px}.grammar-tokens button{font-size:18px}.grammar-summary{text-align:center;padding:20px 0}.grammar-summary img{width:110px;margin:0 auto 15px}.grammar-summary p{margin:15px 0}.grammar-summary button{margin:8px}#app.page-course .grammar-shortcuts .primary,#app.page-course .grammar-feedback .primary{background:#ca8ca1;border-color:#ca8ca1}
.lesson-word-speaker{width:46px;height:46px;flex:0 0 46px;display:grid;place-items:center;border-radius:50%;background:#f9eaf0;color:#bc7c95;margin-left:12px}.lesson-word-speaker svg{width:23px;height:23px}.lesson-word-speaker:active{background:#efd4df}
.course-progress-summary{padding:8px 0 14px;margin:0 0 8px;border-bottom:1px solid #eee8ec}.course-progress-summary>div{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#92838d}.course-progress-summary strong{font-size:12px;font-weight:500;color:#8c7686}.course-progress-summary progress{display:block;width:100%;height:4px;margin-top:11px;border:0;border-radius:6px;overflow:hidden;appearance:none;background:#f0e9ee}.course-progress-summary progress::-webkit-progress-bar{background:#f0e9ee}.course-progress-summary progress::-webkit-progress-value{background:#c894a7;border-radius:6px}.course-progress-summary progress::-moz-progress-bar{background:#c894a7;border-radius:6px}
.pet-invitation .primary{font-size:13px;min-height:40px}.pet-invitation .text-button{font-size:12px}

/* A calm, compact conversation card with a single-line recording control. */
:is(.pet-study-chat,.pet-study-review){padding:24px 24px 20px;border:1px solid #fff9f4;border-radius:30px;background:linear-gradient(150deg,#fffdf9f7,#fff2f4f7);box-shadow:0 14px 42px #78505924,inset 0 0 0 1px #ecd6d966;backdrop-filter:blur(18px)}
:is(.pet-study-chat,.pet-study-review) .pet-study-close{right:9px;top:9px;width:36px;min-height:36px;height:36px;border-radius:50%;background:#f2e5e380;color:#a6898e;font-size:22px;line-height:1}
.pet-chat-spark{display:block;color:#c79c77;font-size:23px;line-height:1;margin:0 auto 9px}
.pet-chat-heading h2{font-size:20px;letter-spacing:1px;color:#74535e;margin:0 0 7px;font-weight:600}
.pet-chat-heading p{font-size:12px;color:#a0888d;line-height:1.7}
.pet-study :is(.pet-chat-mic,.pet-review-mic){display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:58px;min-height:58px;margin:21px auto 13px;padding:0 20px;border:1px solid #d99baa80;border-radius:20px;background:linear-gradient(115deg,#dea1af,#cc879e);box-shadow:0 6px 16px #cd8ba333,inset 0 1px 0 #ffe4eb99;color:#fff;white-space:nowrap;font-size:16px;font-weight:600;letter-spacing:2px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
:is(.pet-chat-mic,.pet-review-mic) svg{width:22px;height:25px;flex:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
:is(.pet-chat-mic,.pet-review-mic) span{white-space:nowrap;line-height:1}
.pet-study :is(.pet-chat-mic,.pet-review-mic).recording{background:linear-gradient(115deg,#c67e96,#b76c87);box-shadow:0 0 0 5px #edc1cb55}
.pet-study :is(.pet-chat-mic,.pet-review-mic).canceling{background:#a799a1;box-shadow:none}
.pet-chat-status{font-size:12px;color:#927882;min-height:20px;line-height:1.6}
.pet-study .pet-chat-hint{font-size:10px;color:#b09aa0;letter-spacing:1px;margin-top:6px}.pet-chat-hint span{padding:0 10px}

.pet-study-review .pet-study-count{font-size:11px;letter-spacing:1px;color:#b18c98;margin:3px 0 11px}.pet-study-review h2{font-size:20px;color:#74535e;margin:0 0 8px}.pet-study-review .pet-review-instruction{font-size:12px;color:#a0888d;margin:8px 0 0}.pet-study-review>p[role="status"]:empty{display:none}.pet-study-review>button.text-button{min-height:36px;color:#ac788d}.pet-study-review .pet-review-mic{margin-top:16px}

/* Prevent iOS image callouts from stealing press-to-talk gestures. */
.voice-hold-control,.voice-hold-control *{-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-user-drag:none!important}
.voice-hold-control{touch-action:none!important}
.voice-hold-control>*{pointer-events:none!important}

/* A single circular microphone keeps the home chat action quiet and recognizable. */
.pet-study :is(.pet-chat-mic,.pet-review-mic){width:88px;height:88px;min-height:88px;padding:0;border:5px solid #f8e8ed;border-radius:50%;margin:20px auto 14px;letter-spacing:0;box-shadow:0 5px 18px #cd8ba32b,inset 0 1px 0 #ffe4eb99}
.pet-study :is(.pet-chat-mic,.pet-review-mic) svg{width:29px;height:33px}
.page-home .home-reply .home-reply-play{display:inline-flex;align-items:center;min-height:40px;padding:6px 10px;margin-top:7px;border-radius:14px;background:#f5e8ef;color:#916778;font-size:12px}

.pet-study :is(.pet-chat-mic,.pet-review-mic){position:relative;overflow:visible}
.mic-progress{position:absolute;inset:-10px;opacity:0;transition:opacity .15s;pointer-events:none}
.pet-study :is(.pet-chat-mic,.pet-review-mic) .mic-progress svg{display:block;width:100%;height:100%;transform:rotate(-90deg);fill:none;stroke-width:3}
.mic-progress-track{stroke:#e8ccd6}.mic-progress-value{stroke:#af6282;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--hold-progress,0));transition:stroke-dashoffset .1s linear}
.mic-countdown{position:absolute;bottom:6px;left:0;right:0;font:600 11px/1.2 system-ui;letter-spacing:0;opacity:0;pointer-events:none}
.recording .mic-progress,.preparing .mic-progress,.recording .mic-countdown{opacity:1}
.pet-study .recording>svg{transform:translateY(-6px)}
.preparing .mic-progress-value{stroke-dasharray:20 80;stroke-dashoffset:0;transform-origin:center;animation:mic-preparing 1s linear infinite}
.canceling .mic-progress-value{stroke:#a35e64}.canceling .mic-countdown{opacity:.5}
@keyframes mic-preparing{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.preparing .mic-progress-value{animation:none}.mic-progress-value{transition:none}}

.shadow-modes{margin:0 0 22px}.shadow-passage{padding:18px;background:#fcf7f9;border:1px solid #eee2e9;border-radius:22px}.shadow-passage .n5-reading-text{margin:0}.shadow-status{text-align:center;color:#957184;font-size:13px;line-height:1.7;margin:18px 0 6px}.shadow-time{min-height:20px;text-align:center;font-size:12px;color:#a4909a}.shadow-dock{width:100%}.shadow-controls{display:flex;justify-content:space-around;align-items:center;gap:12px;margin-bottom:12px}.shadow-controls>div{display:flex;flex-direction:column;align-items:center;gap:5px}.shadow-controls small{font-size:11px;color:#96808c}.shadow-mic{display:flex;align-items:center;justify-content:center;width:60px;height:60px;min-height:60px;border-radius:50%;background:#cf93a7;color:#fff;border:4px solid #f6e5ed;font-size:22px;padding:0}.shadow-mic svg{width:24px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7}.shadow-mic.recording{background:#b76583;box-shadow:0 0 0 4px #edc8d655}.shadow-small{width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;background:#f3edf3;color:#8e7899;font-size:21px}.shadow-dock .two>button{min-height:42px;padding:10px}.shadow-controls button:disabled{opacity:.4}
/* Room artwork and its exact-coordinate hit layer resize together. */
#app.page-room .room-art{position:absolute;inset:0;width:100%;height:100%;z-index:0}
.room-outline{fill:transparent;stroke:transparent;stroke-width:3;cursor:pointer;pointer-events:all;stroke-linejoin:round;stroke-linecap:round;transition:stroke .12s,fill .12s}

#app.page-room .room-companion{position:absolute;z-index:4;left:54%;top:66%;width:105px;height:132px;min-height:0;padding:0;background:transparent;border:0;box-shadow:none;transform:translateX(-50%);touch-action:manipulation}
#app.page-room .room-pet{position:absolute;inset:0 0 15px;width:100%;height:110px;filter:drop-shadow(0 9px 5px #68413238);pointer-events:none}
.room-companion>span{position:absolute;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap;padding:4px 10px;border-radius:20px;background:#fffffff0;color:#775c52;font-size:11px;box-shadow:0 2px 9px #60422620}
#app.page-room:has(.room-study-panel) .room-companion{top:53%;left:75%;width:80px;height:100px}
#app.page-room:has(.room-study-panel) .room-pet{height:85px}
#app.page-room:has(.room-study-panel) .room-caption{display:none}
.room-study-panel{position:absolute;z-index:6;left:12px;right:12px;bottom:12px;padding:16px 16px 12px;border:1px solid #fff9;border-radius:23px;background:#fffdf5f5;box-shadow:0 8px 35px #58402325;max-height:32%;overflow:auto;overscroll-behavior:contain;color:#624d46}
.room-study-panel .room-panel-close{position:absolute;right:8px;top:5px;width:32px;min-height:32px;padding:0;font-size:24px;background:transparent;color:#8a776a}
.room-word-title{display:flex;gap:12px;align-items:baseline;padding-right:24px}.room-word-title strong{font-size:22px;color:#443932}.room-word-title span{font-size:13px}.room-reading{font-size:12px;margin:3px 0}.room-example{font-size:15px;margin:9px 0 3px;line-height:1.6}.room-translation{font-size:12px;margin:0 0 8px;color:#8b7567}.room-panel-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.room-panel-actions button{min-height:35px;padding:7px 11px;font-size:12px;border-radius:14px;white-space:nowrap}.room-panel-actions button svg{width:14px;height:14px;vertical-align:middle}.room-panel-actions .selected{background:#f1dfba;color:#77541e}.room-chat-heading{font-size:15px;font-weight:600;padding-right:25px}.room-chat-heading small{margin-left:10px;font-size:10px;font-weight:400;color:#9a8271}.room-chat-line{position:relative;margin-top:9px;padding:8px 35px 8px 10px;background:#f5eee4;border-radius:12px}.room-chat-line.pet-line{background:#edf0e5}.room-chat-line>span{font-size:10px;color:#94785d}.room-chat-line p{margin:4px 0;font-size:14px;line-height:1.6}.room-chat-line small{font-size:11px;color:#8a7568}.room-line-listen{position:absolute;right:4px;top:16px;width:30px;min-height:32px;padding:7px;background:transparent}.room-line-listen svg{width:17px;height:17px}
#app.page-room:has(.room-chat-heading) .room-study-panel{max-height:37%}
@media(prefers-reduced-motion:reduce){.room-outline{transition:none}}
.kitchen-bubble{position:absolute;z-index:5;left:20px;right:94px;top:47%;padding:13px 15px;border-radius:20px 20px 20px 4px;background:#fffdf5f5;box-shadow:0 5px 22px #765b3122;border:1px solid #fff}.kitchen-bubble p{margin:0 0 6px;font-size:12px;color:#8d7660}.kitchen-bubble p[lang]{font-size:16px;color:#634c35}.kitchen-bubble>div{display:flex;gap:6px;align-items:center}.kitchen-bubble button{font-size:12px;padding:5px 10px;min-height:34px;border-radius:14px;white-space:nowrap}.kitchen-bubble .invite-listen{padding:8px;background:transparent}.invite-listen svg{width:16px;height:16px}.kitchen-content{padding:12px 20px 35px!important}.kitchen-content h2{font-size:23px}.kitchen-menu{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.kitchen-menu button{flex:1 0 28%;padding:12px 8px;border-radius:18px;background:#f7eee3}.kitchen-menu button.selected{background:#e4cba7}.kitchen-menu strong,.kitchen-menu small{display:block}.kitchen-menu small{font-size:10px;margin-top:5px}.recipe-ingredient{display:flex;align-items:center;gap:8px;border-bottom:1px solid #eee4d7;padding:10px 0;font-size:12px}.recipe-ingredient>span:first-child{flex:1}.recipe-ingredient small{display:block;color:#8d7965;margin-top:4px}.recipe-step{padding:16px 0;border-bottom:1px solid #eee4d7}.recipe-step>span{font-size:10px;color:#a08b6e;letter-spacing:1px}.recipe-step p{font-size:17px;line-height:1.8;margin:8px 0}.recipe-step>small{font-size:12px;color:#8d7965}.recipe-step>div{display:flex;gap:8px;margin-top:10px}.recipe-step button{font-size:12px;padding:8px 12px;min-height:36px}.recipe-step .selected{background:#e6eddf;color:#587040}
.room-study-panel:has(.room-voice-controls){max-height:40%;padding:18px 20px 12px}.room-word-title{justify-content:center;gap:10px;padding:0 20px}.room-word-title strong{font-size:27px;line-height:1.4}.room-word-speaker{width:32px;min-height:32px;padding:7px;border-radius:50%;background:#f2e7d4;color:#8c7042;flex-shrink:0}.room-word-speaker svg{width:18px;height:18px}.room-word-meaning,.room-study-panel:has(.room-voice-controls) .room-reading{text-align:center;margin:3px 0;font-size:12px;color:#8c7765}.room-example-wrap{position:relative;border-radius:13px;background:#f5efe6;padding:8px 34px 8px 12px;margin-top:12px}.room-example-wrap .room-example{margin:0 0 4px;font-size:14px}.room-example-wrap .room-translation{margin:0;font-size:11px}.room-study-panel:has(.room-voice-controls) .room-panel-actions{display:block}.room-voice-controls{display:flex;align-items:center;justify-content:center;gap:27px;margin-top:12px}.room-panel-actions .room-icon{width:36px;height:36px;min-height:36px;border-radius:50%;padding:0;background:transparent;font-size:24px;color:#a38a63}.room-icon.saved{color:#b68a27}.room-panel-actions .room-mic{display:grid;place-items:center;width:56px;height:56px;min-height:56px;border-radius:50%;background:#a48765;color:#fff;padding:15px;box-shadow:0 4px 12px #92704b25}.room-panel-actions .room-mic svg{width:25px;height:25px}.room-panel-actions .room-mic.recording{background:#b76d60;box-shadow:0 0 0 5px #b76d6020}.room-record-status{text-align:center;font-size:10px;color:#95816f;margin:8px 0 0}.room-panel-actions .room-open{display:block;width:100%;background:transparent;color:#8a6e48;font-size:12px;margin-top:4px}
#app.page-room:has(.room-study-panel) .room-companion{top:40%;left:77%}
#app.page-room .room-wheel[hidden]{display:none}
.room-wheel-toggle{position:absolute;right:16px;top:95px;z-index:7;min-height:33px;padding:7px 12px;border-radius:17px;background:#fffaf1ed;color:#927854;font-size:11px;border:1px solid #fff9;box-shadow:0 3px 12px #775b3220}
.kitchen-bubble .invite-close{position:absolute;right:5px;top:3px;background:transparent;color:#a78f72;width:26px;min-height:26px;padding:0;font-size:18px}
.kitchen-bubble p{padding-right:14px}

#app.free-lesson-page .lesson-dock .shadow-mic{width:60px;height:60px;min-height:60px;flex:none;border-radius:50%;padding:0}
#app.free-lesson-page .lesson-dock .shadow-small{width:44px;height:44px;min-height:44px;flex:none;border-radius:50%;padding:0}
/* Furniture-anchored resting pose shares the artwork coordinate system. */
.resting-companion{display:block;width:100%;height:100%;padding:0;border:0;background:none;min-height:0;cursor:pointer;touch-action:manipulation}
.resting-companion img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 5px 3px #5b3e3520)}
.resting-companion:active:not(:disabled){transform:none}
#app.page-room .room-companion{width:148px;height:172px;top:61%}
#app.page-room .room-pet{height:153px}
#app.page-room:has(.room-study-panel) .room-companion{width:125px;height:145px;top:34%;left:76%}
#app.page-room:has(.room-study-panel) .room-pet{height:126px}
.room-outline{stroke-width:1.35;shape-rendering:geometricPrecision}

#app.page-room .room-study-panel:has(.room-voice-controls){max-height:32%}
#app.page-room .room-study-panel:has(.room-voice-controls){max-height:35%;padding:12px 18px 10px}
.room-study-panel .room-reading:empty{display:none}
.room-study-panel:has(.room-voice-controls) .room-word-title strong{font-size:24px}
.room-study-panel:has(.room-voice-controls) .room-example-wrap{margin-top:8px;padding-top:6px;padding-bottom:6px}
.room-voice-controls{margin-top:8px}.room-panel-actions .room-mic{width:48px;height:48px;min-height:48px;padding:11px}.room-record-status{margin-top:5px}
.header-companion{width:32px;min-height:32px;flex-shrink:0;border-radius:50%;font-size:19px;color:#987754;background:#fffaf0c9;padding:3px}.companion-action{display:block;margin:12px 0 5px;padding:10px 18px;min-height:42px;background:#ecddc5;border:1px solid #dfc8a1;border-radius:16px;color:#725431;font-size:14px}.global-talk-reply{padding:12px 0;text-align:center}.global-talk-reply p{font-size:17px;line-height:1.7}.global-talk-reply small{display:block;margin-top:7px;color:#93806b}.global-talk-reply .companion-action{margin:15px auto 4px}.global-talk-mic{display:grid;place-items:center;width:64px;height:64px;min-height:64px;margin:18px auto 12px;border-radius:50%;background:#b78f70;color:#fff;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.global-talk-mic svg{width:28px;height:28px;pointer-events:none}.global-talk-mic.recording{background:#ad665e;box-shadow:0 0 0 6px #ead2c5}.global-talk-close{position:absolute;right:12px;top:9px;width:32px;height:32px;min-height:32px;font-size:23px}.venue-preview{text-align:center}.venue-preview>img{width:150px;height:150px;object-fit:contain;margin:20px auto}.venue-preview>button{display:block;margin:12px auto;width:80%}.venue-star{font-size:70px;margin:30px}.venue-preview h2{margin:10px}.venue-preview p{margin:10px}

.header-companion img{width:24px;height:24px;object-fit:contain;margin:auto}

/* Distinct, readable object-card controls: ink text, red voice, gold review. */
#app.page-room .room-study-panel:has(.room-voice-controls){background:#fffffffa;border-color:#fff;color:#191919;box-shadow:0 8px 30px #26202c1c}
#app.page-room .room-word-title strong,#app.page-room .room-example{color:#171717}
#app.page-room .room-word-meaning{color:#303035}
#app.page-room .room-reading,#app.page-room .room-translation,#app.page-room .room-record-status{color:#66666e}
#app.page-room .room-example-wrap{background:#f5f5f8}
#app.page-room .room-word-speaker{background:#f0f1f5;color:#383944}
#app.page-room .room-line-listen{color:#454650}
#app.page-room .room-panel-close{color:#565760}
#app.page-room .room-panel-actions .room-mic{background:#e14e60;color:#fff;box-shadow:0 4px 12px #df415c26}
#app.page-room .room-panel-actions .room-mic.recording{background:#c93049;box-shadow:0 0 0 5px #e14e6026}
#app.page-room .room-panel-actions .room-icon{color:#585a66}
#app.page-room .room-panel-actions .room-review-star{color:#e2ad20}
#app.page-room .room-review-star svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;vertical-align:middle}
#app.page-room .room-review-star.saved svg{fill:#ffe287;stroke:#dda719}
#app.page-room .room-open{color:#3e4355}

/* Point-reading targets stay visually invisible after tapping. */
.room-outline.selected{stroke:transparent;fill:transparent;filter:none;outline:none}
.room-outline,.room-outline:focus,.room-outline:focus-visible,.room-outline:active{outline:none;stroke:transparent;fill:transparent;filter:none;box-shadow:none;-webkit-tap-highlight-color:transparent}

/* Sit on the island in artwork coordinates, unchanged when a study card opens. */
.island-companion{display:block;width:100%;height:100%;min-height:0;padding:0;border:0;background:transparent;cursor:pointer;touch-action:manipulation}
#app.page-room .island-pet{width:100%;height:100%;margin:0;pointer-events:none;filter:drop-shadow(0 4px 2px #61412a2b)}
.island-pet .base-pet,.island-pet .rendered-pet-art{object-position:center bottom}
.island-companion:active:not(:disabled){transform:none}
.kitchen-bubble{top:24%}
.kitchen-guide{position:absolute;z-index:7;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));max-height:36%;overflow:auto;padding:14px 16px 9px;border-radius:24px;background:#fffffff5;box-shadow:0 8px 30px #39281722;color:#252525;overscroll-behavior:contain}
.cook-heading{display:flex;align-items:center;gap:8px;padding-right:23px}.cook-heading strong{font-size:13px;flex:1}.cook-heading small{font-size:11px;color:#777}.cook-close{position:absolute;right:8px;top:6px;min-height:28px;width:28px;padding:0;background:transparent;font-size:21px;color:#777}
.kitchen-guide>p{font-size:16px;line-height:1.6;margin:10px 0 4px}.cook-translation{display:block;font-size:12px;line-height:1.5;color:#777}.cook-tools{display:flex;align-items:center;gap:10px;margin-top:10px}.cook-tools .room-mic{width:44px;height:44px;min-height:44px;margin:0}.cook-tools .room-icon{width:32px;height:36px;min-height:36px;padding:5px}.cook-tools svg{width:21px;height:21px}.cook-tools .primary{margin-left:auto;font-size:12px;min-height:40px;padding:8px 12px;border-radius:18px}.cook-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:4px;color:#888;font-size:10px}.cook-bottom button{font-size:10px;min-height:28px;padding:4px 0;background:transparent}
.cook-tools .room-mic{border:0;border-radius:50%;background:#db7788;color:#fff;display:flex;align-items:center;justify-content:center;padding:10px;flex:none}
.cook-tools .room-mic.recording{background:#b95064;box-shadow:0 0 0 5px #db77882b}

/* Native SVG coordinates avoid mobile foreignObject compositing offsets. */
.room-resting-companion{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.room-resting-companion:focus{outline:none}
.room-resting-companion:focus-visible rect{stroke:#aa7e90;stroke-width:2}

.map-label.unavailable{background:#e3e3e3ed;border-color:#b8b8b8;color:#777;box-shadow:none;filter:grayscale(1)}
.map-label.unavailable small{display:block;font-size:9px;color:#858585;margin-top:2px;letter-spacing:1px}
.final-entry{margin:20px 0;background:#f2f6ee;border:1px solid #dce7d4;border-radius:22px;padding:18px!important}
.final-batches,.game-levels{display:flex;gap:8px;margin:18px 0}.final-batches button{flex:1}.final-review .grammar-shortcuts{margin-bottom:24px}.final-group{display:block!important;width:100%;text-align:left}.final-group small{display:block;margin-top:5px}.final-review .grammar-options{display:grid;gap:10px}.final-review{padding-bottom:35px!important}.final-review .grammar-summary img{max-height:140px}.game-levels{align-items:center;justify-content:space-between}.game-levels button{padding:5px 10px;font-size:12px;color:#999;background:#eee}.game-levels small{display:block;font-size:9px}.mini-pairgrid button{font-size:16px;line-height:1.5;overflow-wrap:anywhere;min-height:54px}
.page-match .mini-pairgrid{gap:8px;margin:12px 0 18px}.page-match .mini-pairgrid button{height:auto;min-height:54px;padding:8px;font-size:16px}.page-match .game-heading{margin-bottom:12px;padding-bottom:0}
.word-study-levels{display:none}
.word-study-card{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;padding:22px 20px 20px}
.word-study-card-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:#aa9487;font-size:10px}
.word-study-nav{width:38px;min-height:34px;border-radius:12px;background:#fff4e8;color:#b86e65;font-size:24px;line-height:1}
.word-study-reveal{margin:17px auto 0}
.word-study-card-note{font-size:10px;color:#a79387;margin-top:15px}
.word-study-inline-review{display:inline-block;color:#b9796d;font-size:11px;margin-top:9px;min-height:32px}
.game-wordstudy-entry{border-color:#e4b1a4;background:linear-gradient(135deg,#fff4ed,#fffaf2);box-shadow:0 8px 20px #b86d5d18}.game-wordstudy-entry strong{font-size:17px}.word-study-page{padding-bottom:36px}.word-study-hero{padding:24px 22px 20px;background:linear-gradient(140deg,#fff0e7,#f3e9d7);border:1px solid #efd8c5;border-radius:25px;box-shadow:0 8px 20px #b3836715}.word-study-hero h2{font-size:25px;line-height:1.5;margin:8px 0 5px;color:#67473d}.word-study-hero p{font-size:12px;color:#92776b;line-height:1.8}.word-study-hero small{font-size:10px}.word-study-meter{height:8px;background:#f4ded3;border-radius:10px;overflow:hidden;margin:17px 0 7px}.word-study-meter i{display:block;height:100%;background:linear-gradient(90deg,#e69582,#dc777d);border-radius:10px;transition:width .25s}.word-study-levels{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:16px 0}.word-study-levels span{display:block;text-align:center;border:1px solid #eaded3;border-radius:14px;background:#fffaf5;padding:8px 2px;font-weight:650;color:#6f594c}.word-study-levels span small{display:block;font-size:8px;font-weight:400;margin-top:2px}.word-study-levels .selected{background:#fff0e8;border-color:#e6a998;color:#b86961}.word-study-levels .locked{color:#aaa29d;background:#f3f1ee;filter:grayscale(.2)}.word-study-today{padding:21px 18px}.word-study-today h2{margin:5px 0 4px}.word-study-today p{font-size:12px;color:#89786f}.word-study-stats{gap:10px}.word-study-stats .card{margin:0;padding:16px;text-align:center}.word-study-stats strong{display:block;font:650 25px Georgia,serif;color:#b56c63}.word-study-stats small{font-size:10px}.word-study-route{padding:17px}.word-study-route .section-head{margin:0 0 8px}.word-study-route p{font-size:12px;color:#89786f;margin-bottom:12px}.word-study-session-head{display:flex;align-items:center;justify-content:space-between;margin:0 2px 12px;color:#8c786e;font-size:11px}.word-study-card{text-align:center;padding:33px 20px 26px;background:linear-gradient(145deg,#fffaf0,#fffdf9);border-color:#eee1cb}.word-study-card h2{font-size:39px;line-height:1.3;margin-top:10px;color:#493a33}.word-study-reading{font-size:17px;letter-spacing:3px;color:#aa8571;margin-top:8px}.word-study-meaning{font-size:17px;margin-top:18px;color:#684f45}.word-study-sound{display:inline-flex;align-items:center;gap:4px;margin-top:18px;color:#b86e65}.word-study-example{padding:15px 18px}.word-study-example p{font-size:12px;margin-top:5px}.word-study-actions{margin-top:4px}.word-study-summary{padding:34px 22px}.word-study-summary h2{margin:8px 0}.word-study-summary p{font-size:13px;color:#8d7b70;margin:10px 0 20px}
.word-study-levels{display:none!important}
.word-study-hero{padding:15px 17px 14px;margin-bottom:12px}
.word-study-hero .journey-kicker,.word-study-hero h2,.word-study-hero p{display:none}
.word-study-hero .word-study-meter{margin:0 0 8px}
.word-study-hero small{display:block;font-size:11px;color:#806c62}
.word-study-stats{display:none}
.word-study-sound{display:inline-grid;place-items:center;width:48px;height:48px;min-height:48px;margin:17px auto 0;padding:0;border-radius:50%;background:#fff0f1;border:1px solid #f1c6c8;color:transparent;font-size:0;box-shadow:0 4px 12px #c9828318}
.word-study-sound:before{content:"";width:22px;height:22px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b86e65' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M16 7a7 7 0 010 10M19 3a12 12 0 010 18'/%3E%3C/svg%3E") center/contain no-repeat}
.word-study-sound:active{transform:scale(.95)}
.word-study-card>.eyebrow,.word-study-card-note{display:none}
.word-study-card h2{margin-top:8px}
.word-study-map-page{padding-bottom:28px}
.word-study-map-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:4px 2px 12px}
.word-study-map-heading h2{margin-top:5px;font-size:21px;color:#5f4b42}
.word-study-map-heading .chip{white-space:nowrap}
.word-study-map{position:relative;padding:8px 9px 18px;overflow:hidden}
.word-study-map:before{content:"";position:absolute;top:22px;bottom:28px;left:50%;width:5px;border-radius:5px;background:linear-gradient(180deg,#e8d9cc,#d9e6d7 48%,#ead9d5);transform:translateX(-50%);opacity:.9}
.word-study-unit-row{position:relative;display:flex;align-items:center;min-height:82px;z-index:1}
.word-study-unit-row:nth-child(odd){justify-content:flex-start;padding-right:24%}.word-study-unit-row:nth-child(even){justify-content:flex-end;padding-left:24%}
.word-study-unit{position:relative;display:flex;align-items:center;gap:9px;max-width:76%;padding:5px 9px 5px 5px;border:0;background:transparent;text-align:left}
.word-study-unit-dot{display:grid;place-items:center;width:53px;height:53px;flex:0 0 53px;border:5px solid #fff;border-radius:50%;background:#d9e0e5;color:#7b8994;font:600 13px Georgia,serif;box-shadow:0 3px 10px #8f7f7030}
.word-study-unit-copy{display:flex;min-width:0;flex-direction:column;gap:2px}
.word-study-unit-copy strong{font-size:12px;color:#66564d;line-height:1.3}
.word-study-unit-copy small{font-size:10px;color:#a38f84}
.word-study-unit-copy em{font-style:normal;font-size:11px;letter-spacing:1px;color:#e7aa4b;white-space:nowrap}
.word-study-unit-row.current .word-study-unit-dot{background:#ef8d79;color:#fff;border-color:#fff4ec;box-shadow:0 0 0 5px #ef8d7930,0 5px 14px #ad6c5a2c}
.word-study-unit-row.complete .word-study-unit-dot{background:#79b9a6;color:#fff}
.word-study-unit-row.open .word-study-unit-dot{background:#b6c9aa;color:#fff}
.word-study-unit-row.upcoming{opacity:.6}
.word-study-unit-peer{display:grid;place-items:center;width:34px;height:34px;margin:0 8px;border:3px solid #fff;border-radius:50%;background:#e5ebf3;color:#8495a8;font-size:13px;box-shadow:0 2px 8px #77706424}
.word-study-unit-row:nth-child(odd) .word-study-peer{order:2}
.word-study-start-card{position:sticky;bottom:8px;display:grid;grid-template-columns:1fr auto;gap:5px 12px;align-items:center;margin:6px 0 0;padding:16px 15px;border-color:#f0d2bd;background:#fffaf3;box-shadow:0 8px 20px #95745d18}
.word-study-start-card>div{display:flex;min-width:0;flex-direction:column;gap:3px}
.word-study-start-card strong{font-size:14px;color:#5f4a41}
.word-study-start-card small{font-size:10px;color:#9b877a}
.word-study-start-card .primary{grid-column:2;grid-row:1 / span 2;min-width:102px}
.word-study-start-card .text-button{grid-column:1;justify-self:start;min-height:28px;padding:2px 0;color:#b86e65;font-size:11px}
.word-study-peer-note{margin:11px 2px 0;text-align:center;color:#aa9588;font-size:10px}
.word-study-challenge-start{margin-bottom:9px}
.word-study-example-card{padding:15px 16px;margin:11px 0 20px;background:#fffdf8;border-color:#eee2d4}
.word-study-example-head{display:flex;align-items:center;justify-content:space-between}
.word-study-example-ja{margin:12px 0 7px;line-height:2;font-size:17px;color:#574840}
.word-study-example-ja ruby{ruby-position:over}
.word-study-example-ja rt{font-size:9px;color:#a98670;font-weight:500}
.word-study-example-card>small{font-size:10px;color:#ac988b}
.word-study-example-sound{display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:7px;border-radius:50%;background:#fff0f1;color:#b86e65}
.word-study-example-sound svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* The learning route rises from the current chapter instead of reading like a
   straight list. The alternating connectors keep the chapter nodes connected
   while leaving the map airy on a phone screen. */
.word-study-map{display:flex;flex-direction:column-reverse;padding:18px 9px 10px;overflow:hidden}
.word-study-map:before{display:none}
.word-study-unit-row{min-height:88px}
.word-study-unit-row:before{content:"";position:absolute;top:50%;height:2px;width:42%;border-top:2px solid #decfc2;border-radius:999px;opacity:.85;z-index:0;pointer-events:none}
.word-study-unit-row:nth-child(odd):before{left:29%;transform:rotate(13deg);transform-origin:left center}
.word-study-unit-row:nth-child(even):before{right:29%;transform:rotate(-13deg);transform-origin:right center}
.word-study-unit-row:first-child:before{display:block}
.word-study-unit-row:last-child:before{display:none}
.word-study-unit-row .word-study-unit,.word-study-unit-row .word-study-peer{z-index:1}

/* LingPet's map belongs to the moonlit, mysterious side of the world. Keep
   the lesson controls warm and readable while the route itself carries the
   night-sky identity through a quiet indigo base, organic light pools and
   sparse star points. */
.word-study-map-page{background:
  linear-gradient(180deg,#111831b8,#282344d1),
  url('https://tinymigo.com/japanese/assets/rank-sanctuary-night-v2.png') center/100% 100% no-repeat; color:#f7eddf}
.word-study-map-heading h2{color:#f8ecdc}
.word-study-map-heading .journey-kicker{color:#d9b878}
.word-study-map-heading .chip{background:#ffffff14;color:#e4d5c8;border:1px solid #ffffff20}
.word-study-hero{background:#fffaf00e;border-color:#ffffff20;box-shadow:0 8px 24px #090d251f}
.word-study-hero small{color:#ead8c9}
.word-study-meter{background:#ffffff1c}
.word-study-meter i{background:linear-gradient(90deg,#e4bc6a,#ef9b91)}
.word-study-unit-row:before{border-color:#b9a7bf;opacity:.6}
.word-study-unit-copy{padding:4px 7px;border:1px solid #ffffff12;border-radius:10px;background:#171c3aeb;backdrop-filter:blur(4px);box-shadow:0 4px 10px #090c2524}
.word-study-unit-copy strong{color:#fff1df}
.word-study-unit-copy small{color:#d4c2bd}
.word-study-unit-copy em{color:#f1c86e;text-shadow:0 1px 7px #f1c86e40}
.word-study-unit-dot{border-color:#f4ecdf;background:#c2cbd4;color:#44506e;box-shadow:0 3px 13px #090c2538}
.word-study-unit-row.current .word-study-unit-dot{border-color:#ffe9d9;box-shadow:0 0 0 5px #ee9b7844,0 5px 16px #090c2548}
.word-study-unit-row.complete .word-study-unit-dot{background:#79b9a6}
.word-study-unit-row.open .word-study-unit-dot{background:#91a8c9}
.word-study-peer{border-color:#f4ecdf;background:#70658f;color:#fff1dd;box-shadow:0 2px 10px #090c2538}
.word-study-peer-note{color:#ddc9c2}
#app:has(.word-study-map-page) .header{background:#171c3af2;color:#f7eddf}
#app:has(.word-study-map-page) .header .back{background:#ffffff14;color:#f7eddf}
.word-study-route-path{position:absolute;inset:18px 0 10px;width:100%;height:calc(100% - 28px);overflow:visible;z-index:0;pointer-events:none}
.word-study-route-path path{fill:none;stroke:#f4e4cf;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.68;filter:drop-shadow(0 2px 3px #0b102633)}
.word-study-unit-row:before{display:none}
.word-study-unit-row:nth-of-type(odd){justify-content:center;padding-right:0}
.word-study-unit-row:nth-of-type(even){justify-content:center;padding-left:0}
.word-study-unit-row:nth-of-type(odd) .word-study-unit{transform:translateX(-26px)}
.word-study-unit-row:nth-of-type(even) .word-study-unit{transform:translateX(26px)}
.word-study-unit-row:nth-of-type(odd) .word-study-peer{order:2}

/* Light moonlit base and wider chapter rhythm for the long route. */
.word-study-map-page{background:
  radial-gradient(ellipse at 8% 16%,#eee8f622 0 13%,transparent 42%),
  radial-gradient(ellipse at 94% 40%,#f3e6e522 0 14%,transparent 43%),
  radial-gradient(ellipse at 44% 90%,#eef3ec22 0 18%,transparent 45%),
  #fff; color:#5c5060}
.word-study-map{padding-top:28px;padding-bottom:24px}
.word-study-unit-row{min-height:118px}
.word-study-unit-row{min-height:158px}
.word-study-route-path path{stroke:#d3bc91;stroke-width:1.25;opacity:.74;filter:drop-shadow(0 2px 3px #9b7d8424)}
.word-study-unit-copy{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.word-study-unit-copy strong{color:#5f5160}
.word-study-unit-copy small{color:#9b8794}
.word-study-unit-copy em{color:#c49442;text-shadow:none}
.word-study-unit-dot{width:78px;height:78px;flex-basis:78px;gap:4px;border:4px solid #fffaf4;border-radius:50%;background:#667985;color:#fff;box-shadow:0 5px 14px #8c778d35}
.word-study-unit-dot b{font:700 26px/1 Georgia,serif;color:#fff}
.word-study-unit-dot em{font:normal 13px/1 LingUI,'Hiragino Sans',sans-serif;letter-spacing:0;color:#f8c64f;text-shadow:0 1px 2px #4a4e5b66;white-space:nowrap}
.word-study-unit-row.current .word-study-unit-dot{border-color:#fff7ef;box-shadow:0 0 0 5px #e89a8a3a,0 5px 15px #a9787040}
.word-study-unit-row.complete .word-study-unit-dot{background:#73a395}
.word-study-unit-row.open .word-study-unit-dot{background:#7f98aa}
.word-study-unit-row.upcoming{opacity:1}
.word-study-unit-row.upcoming .word-study-unit-dot{background:#e1e5eb;color:#6e7888;border-color:#fff;box-shadow:0 4px 12px #8792a32e}
.word-study-peer{border-color:#fffaf4;background:#e7dced;color:#796783;box-shadow:0 3px 10px #8c778d26}
.word-study-peer-note{color:#9d8992}
#app:has(.word-study-map-page) .header{background:#fbf8f2f2;color:#594e5e;border-bottom:1px solid #eadfe0}
#app:has(.word-study-map-page) .header .back{background:#ffffffa8;color:#65576a}

/* Vocabulary chapter map: one reusable circle node on a bright island route. */
#app:has(.word-study-map-page){background:#d9f4fb}
#app:has(.word-study-map-page) .header{background:#ffffffde;color:#263d35;border-bottom:1px solid #ffffff80;backdrop-filter:blur(10px)}
#app:has(.word-study-map-page) .header .back{background:#ffffffd9;color:#355448}
.word-study-map-page{position:relative;isolation:isolate;min-height:100%;padding:18px 0 0;background:linear-gradient(180deg,#ffffff18 0 8%,#ffffff00 30%),url('https://tinymigo.com/japanese/assets/map.png') center top/100% auto repeat-y;color:#173b2e;overflow-x:hidden}
.word-study-map-page:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#d6f3fb20 0 22%,#e8f8df12 44%,#ffffff10 75%,#fdf5dd30);z-index:-1;pointer-events:none}
.chapter-map-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:8px 18px 12px}
.chapter-map-kicker{display:block;color:#174b39;font:700 27px/1.1 LingUI,'Hiragino Sans',sans-serif;letter-spacing:.02em;text-shadow:0 1px 0 #ffffffb3}
.chapter-map-top h2{margin:6px 0 10px;color:#1a3f30;font-size:12px;font-weight:600;letter-spacing:.08em}
.chapter-map-progress{display:inline-flex;align-items:center;gap:7px;min-width:126px;padding:8px 12px;border:1px solid #ffffffc9;border-radius:22px;background:#ffffffd9;box-shadow:0 5px 13px #2757431e;color:#1a3f30}
.chapter-map-progress span{color:#f6b81d;font-size:21px;line-height:1}
.chapter-map-progress strong{font:700 19px/1 Georgia,serif}.chapter-map-progress small{color:#728278;font-size:12px}.chapter-map-progress b{margin-left:auto;color:#2a684d;font-size:22px;line-height:1}
.chapter-map-next{display:flex;flex-direction:column;align-items:center;min-width:72px;padding-top:3px;color:#164f39;text-align:center;text-shadow:0 1px 0 #ffffffcc}.chapter-map-next span{font-size:38px;line-height:.8;color:#49a958}.chapter-map-next strong{margin-top:4px;font-size:11px}.chapter-map-next small{margin-top:2px;font-size:10px}
.word-study-map{position:relative;display:flex;flex-direction:column-reverse;min-height:1260px;padding:32px 12px 92px;overflow:hidden;background:linear-gradient(180deg,#ffffff06,#ffffff12)}
.word-study-map:before{display:none}
.word-study-route-path{position:absolute;inset:32px 0 86px;width:100%;height:calc(100% - 118px);overflow:visible;z-index:0;pointer-events:none}
.word-study-route-path path{fill:none;stroke:#fff9e9;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;opacity:.96;filter:drop-shadow(0 2px 2px #3d7f6835)}
.word-study-unit-row{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:140px;padding:0}
.word-study-unit-row:nth-child(odd) .word-study-unit{transform:translateX(-25px)}
.word-study-unit-row:nth-child(even) .word-study-unit{transform:translateX(25px)}
.word-study-unit{position:relative;display:grid;place-items:center;width:86px;height:86px;padding:0;border:0;background:transparent;text-align:center;z-index:2}
.word-study-unit-dot{display:grid;place-items:center;position:relative;width:76px;height:76px;border:5px solid #ffffffed;border-radius:50%;background:#fffefa;color:#163d2c;box-shadow:0 4px 12px #22553d3d,0 0 0 2px #ffffff8a;transform:none;opacity:1}
.word-study-unit-dot b{font:700 23px/1 Georgia,serif;color:#173d2e;letter-spacing:.01em}
.word-study-unit-stars{display:flex;justify-content:center;gap:4px;position:relative;margin-top:-2px;font:700 18px/1 Georgia,serif;letter-spacing:0;color:#d6dce0;text-shadow:0 1px 1px #ffffffa8;z-index:3}
.word-study-unit-row.complete .word-study-unit-stars,.word-study-unit-row.current .word-study-unit-stars,.word-study-unit-row.open .word-study-unit-stars{color:#f6ba1d;text-shadow:0 1px 1px #9c6c163d}
.word-study-unit-row.current .word-study-unit-dot{background:#ff9b87;border-color:#fff9ef;box-shadow:0 0 0 5px #fff4c26b,0 5px 14px #8e4b3c4d}
.word-study-unit-row.complete .word-study-unit-dot{background:#e6f0df}.word-study-unit-row.open .word-study-unit-dot{background:#d9eff9}.word-study-unit-row.locked .word-study-unit-dot{background:#eaf0ec;color:#85988d;opacity:1}
.word-study-unit-row.locked .word-study-unit-dot b{color:#6f8176}.word-study-lock{position:absolute;right:-5px;top:-3px;display:block;width:22px;height:22px;border:3px solid #ffffff;border-radius:50%;background:#768f82;color:#fff;font-size:0;box-sizing:border-box}.word-study-lock:before{content:"";position:absolute;left:6px;top:9px;width:7px;height:6px;border:1.5px solid #fff;border-radius:1px;background:transparent}.word-study-lock:after{content:"";position:absolute;left:8px;top:5px;width:4px;height:6px;border:1.5px solid #fff;border-bottom:0;border-radius:5px 5px 0 0}
.word-study-unit-dot{box-shadow:0 4px 12px #22553d3d,0 0 0 2px #5d7c6aa6}
.word-study-unit-row.current .word-study-unit-dot{box-shadow:0 0 0 5px #fff4c26b,0 5px 14px #8e4b3c4d,0 0 0 2px #c76b5d}
.word-study-unit-a11y{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.word-study-unit-peer{display:none}
.chapter-character-slots{position:absolute;left:5%;right:5%;bottom:20px;height:130px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none;opacity:.78}
.chapter-character-slots span{display:block;width:35%;height:88px;border:2px dashed #ffffffd9;border-radius:50% 50% 42% 45%;background:#fffaf2a8;box-shadow:0 3px 12px #5e9d7240}
.word-study-start-card{position:fixed;left:50%;bottom:12px;z-index:20;display:flex;align-items:center;gap:12px;width:calc(100% - 32px);margin:0;padding:14px 16px;border:1px solid #ffffffdb;border-radius:22px;background:#fffffff0;box-shadow:0 10px 22px #2a62463a;backdrop-filter:blur(10px);transform:translateX(-50%)}
.word-study-start-card>div{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}.word-study-start-card strong{color:#184a35;font-size:15px}.word-study-start-card small{color:#6d8176;font-size:10px}.word-study-start-card .primary{flex:0 0 auto;min-width:112px;padding:12px 16px;border-radius:20px;background:#f46f5f;box-shadow:0 4px 10px #ad44372b;color:#fff;font-weight:700}
.word-study-map-page .word-study-peer-note{display:none}
#app:has(.word-study-map-page) .content{padding-left:0;padding-right:0}

/* The chapter map uses the supplied LingPet reference artwork as its visual base.
   The lower nine chapters stay pixel-faithful while the remaining chapters continue
   upward in the same airy island language. */
#app:has(.word-study-reference-page) .header{display:none}
#app:has(.word-study-reference-page) .content{padding:0!important}
.word-study-reference-page{top:0!important;bottom:0!important;padding:0!important;background:#fff;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}
.word-study-reference-page::-webkit-scrollbar{display:none}
.reference-map-canvas{position:relative;width:100%;min-height:100%;overflow:hidden;line-height:0;background:#82d7ed}
.reference-extension{position:relative;height:3500px;overflow:hidden;background:
  radial-gradient(ellipse at 9% 13%,#ffffffb5 0 3%,transparent 9%),
  radial-gradient(ellipse at 82% 24%,#ffffff8f 0 4%,transparent 11%),
  radial-gradient(ellipse at 25% 53%,#ffffff91 0 3%,transparent 10%),
  radial-gradient(ellipse at 76% 76%,#ffffff85 0 4%,transparent 12%),
  linear-gradient(180deg,#76d4ed 0%,#a9e6ec 42%,#84d1d8 67%,#68b9cd 100%)}
.reference-extension:before,.reference-extension:after{content:"";position:absolute;border-radius:50%;pointer-events:none;opacity:.86}
.reference-extension:before{width:72%;height:20%;left:-22%;top:28%;background:radial-gradient(ellipse at 50% 48%,#77bd54 0 44%,#4b9c54 45% 51%,transparent 52%),radial-gradient(ellipse at 54% 68%,#4b9ca1 0 40%,transparent 41%);filter:drop-shadow(0 17px 0 #d3f2bc)}
.reference-extension:after{width:84%;height:24%;right:-27%;top:59%;background:radial-gradient(ellipse at 50% 48%,#8ad15a 0 42%,#4eaa5c 43% 50%,transparent 51%),radial-gradient(ellipse at 44% 73%,#4f9da4 0 40%,transparent 41%);filter:drop-shadow(0 18px 0 #d3f2bc)}
.reference-extension-route{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
.reference-extension-route path{fill:none;stroke:#fff9e8;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 4px 2px #347a7a55)}
.reference-extension-node-row{position:absolute;z-index:3;display:flex;flex-direction:column;align-items:center;transform:translate(-50%,-50%);line-height:1}
.reference-extension-node{position:relative;width:74px;height:74px;min-height:74px;border:5px solid #fffdf3;border-radius:50%;background:#f5faf2;color:#154532;box-shadow:0 5px 14px #24665a50,0 0 0 2px #6fae984f;display:grid;place-items:center;line-height:1}
.reference-extension-node b{font:700 20px/1 Georgia,serif;letter-spacing:.01em}
.reference-extension-node-row.current .reference-extension-node{background:#ff9a86;border-color:#fff9eb;box-shadow:0 0 0 5px #fff1b866,0 6px 16px #9b51454f}
.reference-extension-node-row.complete .reference-extension-node{background:#bfe8c8}
.reference-extension-node-row.open .reference-extension-node{background:#d9f0fb}
.reference-extension-node-row.locked .reference-extension-node{background:#e2ebea;color:#6f837c}
.reference-extension-node-row.locked .reference-extension-node b{color:#6f837c}
.reference-extension-stars{display:block;margin-top:5px;font:700 17px/1 Georgia,serif;letter-spacing:2px;color:#d7dfe0;text-shadow:0 1px 1px #75887d55;white-space:nowrap}
.reference-extension-node-row.complete .reference-extension-stars,.reference-extension-node-row.current .reference-extension-stars,.reference-extension-node-row.open .reference-extension-stars{color:#f6ba1d;text-shadow:0 1px 1px #9c6c163d}
.reference-extension-lock{position:absolute;right:-4px;top:-3px;width:21px;height:21px;border:3px solid #fff;border-radius:50%;background:#718c80}
.reference-extension-lock:before{content:"";position:absolute;left:5px;top:8px;width:7px;height:6px;border:1.5px solid #fff;border-radius:2px}
.reference-extension-lock:after{content:"";position:absolute;left:7px;top:4px;width:4px;height:6px;border:1.5px solid #fff;border-bottom:0;border-radius:5px 5px 0 0}
.reference-extension-current-label{position:absolute;top:101px;white-space:nowrap;font-size:10px;line-height:1.3;color:#fffdf2;text-shadow:0 1px 3px #27706d;font-weight:650}
.reference-extension-finish{position:absolute;top:1.2%;left:50%;z-index:4;display:flex;flex-direction:column;align-items:center;transform:translateX(-50%);color:#17513e;text-align:center;text-shadow:0 1px 0 #ffffffb8;line-height:1.2}
.reference-extension-finish span{font-size:42px;line-height:.72;color:#4fb05c}
.reference-extension-finish strong{margin-top:8px;font-size:12px}
.reference-extension-finish small{margin-top:4px;font-size:10px}
.reference-base{position:relative;width:100%;line-height:0;background:#fff}
.reference-map-image{display:block;width:100%;height:auto;max-width:none}
.reference-hotspots{position:absolute;inset:0;z-index:10;pointer-events:none}
.reference-hit{position:absolute;z-index:2;transform:translate(-50%,-50%);width:14%;aspect-ratio:1;border:0;border-radius:50%;background:transparent;padding:0;min-height:0;pointer-events:auto}
.reference-hit:focus-visible,.reference-start-hit:focus-visible,.reference-nav-hit:focus-visible{outline:3px solid #147b60;outline-offset:3px}
.reference-start-hit{position:absolute;left:50%;top:79.4%;z-index:3;width:36%;height:6.5%;min-height:0;border:0;background:transparent;padding:0;transform:translate(-50%,-50%);pointer-events:auto}
.reference-nav-hit{position:absolute;bottom:1.2%;z-index:3;width:18%;height:7.5%;min-height:0;border:0;background:transparent;padding:0;pointer-events:auto}
.reference-nav-home{left:13%}.reference-nav-learning{left:38%}.reference-nav-world{left:63%}.reference-nav-me{left:87%}
.reference-base-pet{position:absolute;z-index:1;transform:translate(-50%,-50%);width:14%;height:13%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 3px #477a4b4c)}
.reference-base-baize{width:13%;height:12%;opacity:.9;filter:drop-shadow(0 3px 3px #477a4b3d)}
.reference-extension-pet{position:absolute;z-index:4;transform:translate(-50%,-50%);width:11%;height:8%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 3px #477a4b55)}
.reference-extension-baize{width:10%;height:8%;opacity:.88}
@media(max-width:360px){.reference-extension{height:3150px}.reference-extension-node{width:68px;height:68px;min-height:68px}.reference-extension-node b{font-size:18px}.reference-extension-stars{font-size:15px}}
.reference-base-pet{width:12%;height:10%}
.reference-base-baize{width:11%;height:9%}

/* Replace the reference artwork's baked chapter state with live chapter controls. */
#app:has(.word-study-reference-page) .reference-nav-hit{display:none}
.reference-base-node-layer{position:absolute;inset:0;z-index:12;pointer-events:none}
.reference-overlay-node{position:absolute;transform:translate(-50%,-50%);width:20%;height:14%;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;line-height:1}
.reference-overlay-circle{position:relative;width:58%;aspect-ratio:1;min-height:0;border:4px solid #fffdf3;border-radius:50%;background:var(--node-color,#f7faf4);color:#153e2d;box-shadow:0 4px 10px #366a4d48,0 0 0 1px #6b977b66;display:grid;place-items:center;padding:0;pointer-events:auto;line-height:1}
.reference-overlay-circle b{font:700 18px/1 Georgia,serif}
.reference-overlay-node.current .reference-overlay-circle{box-shadow:0 0 0 4px #fff2ad82,0 5px 12px #7f514747}
.reference-overlay-node.locked .reference-overlay-circle{background:#e6eeea;color:#718078;box-shadow:0 3px 8px #5d766d38}
.reference-overlay-node.locked .reference-overlay-circle b{color:#718078}
.reference-overlay-node.complete .reference-overlay-circle{filter:saturate(.92)}
.reference-overlay-star-cover{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:72%;height:22%;margin-top:-1%;border-radius:8px;background:rgba(125,201,83,.94);box-shadow:0 1px 2px #568a4b22;line-height:1}
.reference-overlay-star-cover em{font:700 14px/1 Georgia,serif;font-style:normal;letter-spacing:1px;color:#d8dfe0;text-shadow:0 1px 1px #64814c70;white-space:nowrap}
.reference-overlay-node.complete .reference-overlay-star-cover em,.reference-overlay-node.current .reference-overlay-star-cover em,.reference-overlay-node.open .reference-overlay-star-cover em{color:#f7bd20;text-shadow:0 1px 1px #966c173d}
.reference-overlay-lock{position:absolute;right:-4px;top:-3px;width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:#70897d}
.reference-overlay-lock:before{content:"";position:absolute;left:5px;top:8px;width:7px;height:6px;border:1.4px solid #fff;border-radius:2px}
.reference-overlay-lock:after{content:"";position:absolute;left:7px;top:4px;width:4px;height:6px;border:1.4px solid #fff;border-bottom:0;border-radius:5px 5px 0 0}

/* Bottom navigation is replaced by a compact progress card with both local companions. */
.reference-bottom-card{position:absolute;left:0;right:0;top:76%;bottom:0;z-index:20;display:flex;flex-direction:column;gap:6px;padding:9px 13px max(12px,env(safe-area-inset-bottom));background:rgba(255,253,248,.96);border-radius:25px 25px 0 0;box-shadow:0 -5px 18px #49835b24;line-height:1.2}
.reference-companion-strip{display:flex;gap:8px;height:43%;min-height:54px;align-items:center}
.reference-companion-card{display:flex;align-items:center;gap:5px;min-width:0;flex:1;padding:4px 6px;border:1px solid #e8dfd0;border-radius:13px;background:#fffefa}
.reference-companion-card img{width:39px;height:39px;object-fit:contain;flex:0 0 auto}
.reference-companion-card:first-child img{width:43px}
.reference-companion-card span{display:flex;min-width:0;flex-direction:column;gap:1px}
.reference-companion-card strong{font-size:11px;color:#57483f}
.reference-companion-card small{font-size:8px;line-height:1.25;color:#9a887b;white-space:nowrap}
.reference-study-row{display:flex;align-items:center;gap:10px;min-height:0;flex:1}
.reference-study-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}
.reference-study-copy>span{font-size:10px;color:#ad8668}
.reference-study-copy strong{overflow:hidden;color:#54473f;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.reference-study-copy small{overflow:hidden;color:#98887e;font-size:8px;text-overflow:ellipsis;white-space:nowrap}
.reference-study-meter{display:block;width:100%;height:4px;margin-top:2px;border-radius:8px;background:#eee9dc;overflow:hidden}
.reference-study-meter b{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#ef9b74,#e77b7e)}
.reference-bottom-card .primary{flex:0 0 auto;min-width:102px;min-height:42px;padding:9px 12px;border-radius:17px;font-size:13px}
@media(max-width:360px){.reference-bottom-card{padding-left:10px;padding-right:10px}.reference-companion-card{padding-left:4px;padding-right:4px}.reference-companion-card img{width:34px;height:34px}.reference-companion-card:first-child img{width:37px}.reference-companion-card small{font-size:7px}.reference-bottom-card .primary{min-width:92px;padding-left:8px;padding-right:8px;font-size:12px}.reference-overlay-circle b{font-size:16px}.reference-overlay-star-cover em{font-size:12px}}
.reference-overlay-node{width:22%;height:16%}
.reference-overlay-circle{width:70%}
.reference-overlay-star-cover{width:80%;height:24%}
.reference-overlay-circle{width:82%}
.reference-overlay-star-cover{width:66%;height:22%;background:transparent;box-shadow:none;border-radius:0}

/* The generated artwork also continues behind the upper chapter extension,
   so the scroll from 1.1 to 1.28 never opens onto a blank color field. */
.reference-extension{
  background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-background.png');
  background-position:center bottom;
  background-size:100% auto;
  background-repeat:no-repeat;
  background-color:#82d7ed;
}

/* Companions live beside the active chapter, rather than inside the progress
   card. Keep them large enough to read on a phone and leave the card focused
   on progress and the next action. */
.reference-base-pet{z-index:13;width:18%;height:15%}
.reference-base-baize{width:14%;height:12%;opacity:.94}
.reference-bottom-card{top:82%;gap:0}
.reference-study-row{min-height:100%}

/* The chapter climb uses one continuous generated artwork; the old decorative
   extension blobs would break the visual flow, so the same long scene carries
   all the way to chapter 1.28. */
.reference-extension{
  background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-long-background.png');
  background-position:center center;
  background-size:100% 100%;
  background-repeat:no-repeat;
}
.reference-extension:before,.reference-extension:after{display:none}
.reference-extension-node{background:#fffdf4}
.reference-extension-node-row.current .reference-extension-node{background:#ff9a86}
.reference-extension-node-row.complete .reference-extension-node{background:#bfe8c8}
.reference-extension-node-row.open .reference-extension-node{background:#d9f0fb}
.reference-extension-stars{color:#d5dde0}
.reference-extension-node-row.complete .reference-extension-stars,.reference-extension-node-row.current .reference-extension-stars,.reference-extension-node-row.open .reference-extension-stars{color:#f6ba1d}

/* Give the upper journey room to breathe. Four contiguous artwork segments
   make the climb feel like a scrollable world instead of one compressed panel. */
.reference-extension{height:4200px;background:none;}
.reference-extension-backdrops{position:absolute;inset:0;z-index:0;display:grid;grid-template-rows:repeat(4,1fr);pointer-events:none}
.reference-extension-backdrops i{display:block;background-position:center;background-size:cover;background-repeat:no-repeat}
.reference-extension-backdrops i:nth-child(1){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-segment-4.png')}
.reference-extension-backdrops i:nth-child(2){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-segment-3.png')}
.reference-extension-backdrops i:nth-child(3){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-segment-2.png')}
.reference-extension-backdrops i:nth-child(4){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-segment-1.png')}
.reference-extension-route{z-index:2}
.reference-extension-node-row{z-index:3}
@media(max-width:360px){.reference-extension{height:3800px}}

/* Standalone component board for checking the chapter icon before it is placed
   on the illustrated route. */
.wordstudy-node-preview{min-height:100%;padding:22px 16px 40px;background:#fff;color:#263d35}
.node-preview-sheet{max-width:520px;margin:0 auto;padding:22px 16px 28px;border:1px solid #eee7df;border-radius:24px;background:#fff;box-shadow:0 12px 28px #42634a14}
.node-preview-sheet h2{margin:7px 0 8px;color:#263d35;font-size:22px}
.node-preview-sheet>p{margin:0 0 25px;color:#82766f;font-size:12px;line-height:1.7}
.node-preview-stage{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:start}
.node-preview-item{display:flex;min-width:0;flex-direction:column;align-items:center;gap:10px}
.node-preview-item .reference-overlay-node{position:relative;left:auto!important;top:auto!important;transform:none;width:100%;height:auto;display:flex;gap:7px;pointer-events:auto}
.node-preview-item .reference-overlay-circle{width:84px;height:84px;flex:0 0 84px;border-width:5px}
.node-preview-item .reference-overlay-circle b{font-size:19px}
.node-preview-item .reference-overlay-star-cover{width:auto;height:auto;margin:0}
.node-preview-item .reference-overlay-star-cover em{font-size:16px;letter-spacing:2px}
.node-preview-item small{color:#9b8b80;font-size:9px;white-space:nowrap}
.node-preview-item.locked .reference-overlay-circle{background:#e6eeea}
@media(max-width:500px){.node-preview-stage{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:22px}.node-preview-item .reference-overlay-circle{width:76px;height:76px;flex-basis:76px}}

/* Refined chapter icon treatment: one circular component, one star row, one
   consistent lock badge, matching the supplied reference instead of a flat
   generic button. */
.reference-overlay-circle{
  background:linear-gradient(145deg,#fffef9 4%,var(--node-color,#f7faf4) 92%);
  border:5px solid #fffdf6;
  box-shadow:inset 0 0 0 2px #ffffff70,0 6px 14px #2f5e4b42,0 0 0 1px #b5c8bd;
  font-family:Georgia,'Times New Roman',serif;
}
.reference-overlay-circle b{color:#183d2f;letter-spacing:.02em;text-shadow:0 1px 0 #ffffffb8}
.reference-overlay-node.current .reference-overlay-circle{box-shadow:0 0 0 5px #fff1b87a,inset 0 0 0 2px #ffffff85,0 7px 16px #7f514754,0 0 0 1px #cf7465}
.reference-overlay-node.locked .reference-overlay-circle{background:linear-gradient(145deg,#f7faf6,#dfe8e4);box-shadow:inset 0 0 0 2px #ffffff9c,0 5px 12px #5d766d32,0 0 0 1px #c0cec8}
.reference-overlay-star-cover em{font-size:17px;letter-spacing:2px;text-shadow:0 1px 1px #ffffffb8}
.reference-overlay-node.complete .reference-overlay-star-cover em,.reference-overlay-node.current .reference-overlay-star-cover em{color:#f5b51d;text-shadow:0 1px 1px #9268174d}
.reference-overlay-lock{width:23px;height:23px;right:-7px;top:-6px;border-width:3px;background:#718c80;box-shadow:0 2px 5px #34544855}
.node-preview-sheet{padding:24px 18px 30px;border-color:#e7ddd0;box-shadow:0 16px 34px #755f5120}
.node-preview-stage{gap:16px}
.node-preview-item .reference-overlay-circle{width:92px;height:92px;flex-basis:92px}
.node-preview-item .reference-overlay-circle b{font-size:20px}
.node-preview-item small{font-size:10px;color:#857368}
@media(max-width:500px){.node-preview-item .reference-overlay-circle{width:82px;height:82px;flex-basis:82px}}

/* Final icon pass: richer pastel fills and generous spacing match the supplied
   chapter reference instead of the pale, compressed row. */
.reference-overlay-circle{background:var(--node-color,#f7faf4);box-shadow:inset 0 0 0 3px #ffffff66,0 7px 15px #2f5e4b45,0 0 0 1px #b5c8bd}
.reference-overlay-node.current .reference-overlay-circle{background:var(--node-color,#ff806f);box-shadow:0 0 0 5px #fff1b87a,inset 0 0 0 3px #ffffff70,0 8px 18px #7f514754,0 0 0 1px #cf7465}
.reference-overlay-node.locked .reference-overlay-circle{background:#dfe7e3}
.node-preview-stage{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 36px;padding:12px 18px 6px}
.node-preview-item{gap:12px}
.node-preview-item .reference-overlay-node{gap:8px}
.node-preview-item .reference-overlay-circle{width:98px;height:98px;flex-basis:98px;border-width:6px}
.node-preview-item .reference-overlay-circle b{font-size:22px}
.node-preview-item .reference-overlay-star-cover em{font-size:18px;letter-spacing:3px}
@media(max-width:500px){.node-preview-stage{gap:24px 20px;padding-left:8px;padding-right:8px}.node-preview-item .reference-overlay-circle{width:88px;height:88px;flex-basis:88px}}

/* Match the compact chapter scale from the reference screen. */
.node-preview-item .reference-overlay-circle{width:72px;height:72px;flex-basis:72px;border-width:4px}
.node-preview-item .reference-overlay-circle b{font-size:17px}
.node-preview-item .reference-overlay-node{gap:6px}
.node-preview-item .reference-overlay-star-cover em{font-size:15px;letter-spacing:2px}
@media(max-width:500px){.node-preview-item .reference-overlay-circle{width:68px;height:68px;flex-basis:68px}.node-preview-stage{gap:22px 18px}}

/* Simplify the icon finish: one colored face, one restrained edge, one soft shadow. */
.reference-overlay-circle{
  border:2px solid #eef4ee;
  background:var(--node-color,#f7faf4);
  box-shadow:0 3px 8px #2f5e4b2e;
}
.reference-overlay-node.current .reference-overlay-circle{
  border-color:#e06d60;
  box-shadow:0 4px 9px #7f51473d;
}
.reference-overlay-node.locked .reference-overlay-circle{
  border-color:#c9d4cf;
  background:#dfe7e3;
  box-shadow:0 3px 8px #5d766d26;
}

/* Remove the dark outer ring; keep only a quiet light edge around each fill. */
.reference-overlay-circle{
  border:1px solid #fffaf2;
  box-shadow:0 2px 5px #2f5e4b18;
}
.reference-overlay-node.current .reference-overlay-circle{
  border-color:#fffaf2;
  box-shadow:0 2px 6px #7f514726;
}
.reference-overlay-node.locked .reference-overlay-circle{
  border-color:#f3f7f4;
  box-shadow:0 2px 5px #5d766d16;
}
.reference-overlay-circle b,
.reference-overlay-node.locked .reference-overlay-circle b{color:#fff;text-shadow:0 1px 2px #36544a40}

/* The map uses a lighter, smaller marker scale while keeping every marker centered on the route. */
#app:has(.word-study-reference-page) .reference-overlay-node{transform:translate(-50%,-50%) scale(.55)}
#app:has(.word-study-reference-page) .reference-extension-node-row{transform:translate(-50%,-50%) scale(.55)}

/* Keep the first map page and its continuation visually quiet so the chapter
   component remains the focus. */
.reference-extension-backdrops i:nth-child(1){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-simple-segment-4.png')}
.reference-extension-backdrops i:nth-child(2){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-simple-segment-3.png')}
.reference-extension-backdrops i:nth-child(3){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-simple-segment-2.png')}
.reference-extension-backdrops i:nth-child(4){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-simple-segment-1.png')}

/* Return to the earlier pink-tree and pavilion art direction for every map
   segment, while keeping the new aspect-ratio-safe crop treatment. */
.reference-extension-backdrops i:nth-child(1){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-background-segment-4.png')}
.reference-extension-backdrops i:nth-child(2){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-background-segment-3.png')}
.reference-extension-backdrops i:nth-child(3){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-background-segment-2.png')}
.reference-extension-backdrops i:nth-child(4){background-image:url('https://tinymigo.com/japanese/assets/vocabulary-chapter-background-segment-1.png')}

/* Upper chapters keep their own pastel color while their progress stars remain hollow. */
.reference-extension-node{border:1px solid #fffaf2;background:var(--node-color,#f7faf4);color:#fff;box-shadow:0 2px 5px #2f5e4b18}
.reference-extension-node-row.current .reference-extension-node,
.reference-extension-node-row.complete .reference-extension-node,
.reference-extension-node-row.open .reference-extension-node,
.reference-extension-node-row.locked .reference-extension-node{background:var(--node-color,#dfe7e3);color:#fff;border-color:#fffaf2;box-shadow:0 2px 5px #2f5e4b18}
.reference-extension-node b,.reference-extension-node-row.locked .reference-extension-node b{color:#fff;text-shadow:0 1px 2px #36544a40}
.reference-extension-stars,.reference-extension-node-row.current .reference-extension-stars,.reference-extension-node-row.complete .reference-extension-stars,.reference-extension-node-row.open .reference-extension-stars{color:#f4f1e7;text-shadow:0 1px 1px #68807444}

/* Abstract bright map direction: a quiet parchment field with celestial and floral accents. */
#app:has(.word-study-reference-page) .reference-map-canvas{background:#eee3d1}
#app:has(.word-study-reference-page) .reference-base{height:177.8vw;min-height:620px;overflow:hidden;background:
  radial-gradient(ellipse at 7% 18%,#f1c45f 0 10%,transparent 10.2%),
  radial-gradient(ellipse at 94% 32%,#ee724b 0 12%,transparent 12.2%),
  radial-gradient(ellipse at 11% 79%,#efa2a2 0 11%,transparent 11.2%),
  radial-gradient(ellipse at 89% 84%,#4d8e62 0 8%,transparent 8.2%),
  #eee3d1}
#app:has(.word-study-reference-page) .reference-map-image{display:none}
.reference-base-route{position:absolute;inset:0;z-index:2;width:100%;height:100%;pointer-events:none}
.reference-base-route path{fill:none;stroke:#fffaf0;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 3px 2px #9b806a28)}
.reference-base-shapes{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.reference-base-shapes i{position:absolute;display:block}
.reference-base-shapes .shape-star{left:16%;top:62%;width:8%;aspect-ratio:1;background:#f5b52b;clip-path:polygon(50% 0,61% 36%,100% 38%,70% 59%,80% 100%,50% 75%,17% 100%,29% 59%,0 38%,39% 36%)}
.reference-base-shapes .shape-moon{right:13%;top:55%;width:14%;aspect-ratio:1;border-radius:50%;background:#7c6eb1;box-shadow:10px -7px 0 0 #eee3d1}
.reference-base-shapes .shape-flower{right:12%;top:70%;width:12%;aspect-ratio:1;background:#ef9fa2;clip-path:polygon(50% 0,62% 28%,93% 12%,74% 45%,100% 58%,68% 64%,73% 100%,48% 76%,24% 100%,28% 66%,0 57%,28% 43%,8% 15%,40% 28%)}
.reference-base-shapes .shape-dots{left:11%;top:48%;width:13%;height:8%;background:radial-gradient(circle,#7667ad 0 14%,transparent 16%) 0 0/35% 50%}
.reference-base-shapes .shape-arc{left:4%;bottom:11%;width:24%;height:12%;border:3px solid #ef9fa2;border-bottom:0;border-radius:50% 50% 0 0;transform:rotate(-18deg)}
.reference-base-shapes .shape-spark{right:9%;bottom:36%;width:7%;aspect-ratio:1;background:#3e8c5c;clip-path:polygon(50% 0,60% 39%,100% 50%,60% 61%,50% 100%,40% 61%,0 50%,40% 39%)}

/* The upper continuation uses the same flat, airy visual language. */
.reference-extension{background:#eee3d1!important}
.reference-extension-backdrops i{background:
  radial-gradient(circle at 16% 18%,#f3c85f 0 2%,transparent 2.3%),
  radial-gradient(circle at 84% 33%,#7e70b4 0 2.3%,transparent 2.6%),
  radial-gradient(ellipse at 72% 72%,#ee9a9e 0 9%,transparent 9.3%),
  radial-gradient(ellipse at 22% 86%,#62a36f 0 8%,transparent 8.3%),
  #eee3d1!important}
.reference-extension:before{display:block;z-index:1;width:15%;height:8%;left:12%;top:48%;background:#f5b52b;clip-path:polygon(50% 0,61% 36%,100% 38%,70% 59%,80% 100%,50% 75%,17% 100%,29% 59%,0 38%,39% 36%);opacity:.9}
.reference-extension:after{display:block;z-index:1;width:14%;height:10%;right:13%;top:21%;background:#7c6eb1;border-radius:50%;box-shadow:12px -8px 0 0 #eee3d1;opacity:.9}

/* Local purple route trial: reuse the compact chapter circles over the generated ribbon. */
#app:has(.word-study-map-page) .word-study-map{min-height:1580px;background:#f5ecdf url('https://tinymigo.com/japanese/assets/wordstudy-purple-route.png?v=orange-thin-1') center/cover no-repeat}
#app:has(.word-study-map-page) .word-study-route-path{display:none}
#app:has(.word-study-map-page) .word-study-unit-row{min-height:170px}
#app:has(.word-study-map-page) .word-study-unit-dot{width:58px;height:58px;border:1px solid #fffaf2;border-radius:50%;background:#f394b6;color:#fff;box-shadow:0 2px 6px #2f5e4b22}
#app:has(.word-study-map-page) .word-study-unit-dot b{font:700 17px/1 Georgia,serif;color:#fff;text-shadow:0 1px 2px #36544a40}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(odd) .word-study-unit{transform:translateX(12px)}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(even) .word-study-unit{transform:translateX(-10px)}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(1) .word-study-unit-dot{background:#ff806f}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(2) .word-study-unit-dot{background:#f394b6}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(3) .word-study-unit-dot{background:#f8d36c}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(4) .word-study-unit-dot{background:#a8e3bb}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(5) .word-study-unit-dot{background:#8fccef}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(6) .word-study-unit-dot{background:#ffc28f}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(7) .word-study-unit-dot{background:#b3adf1}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(8) .word-study-unit-dot{background:#d4ddd8}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(9) .word-study-unit-dot{background:#d4ddd8}
#app:has(.word-study-map-page) .word-study-unit-stars{margin-top:-4px;font-size:15px;letter-spacing:1px;color:#f4f1e7;text-shadow:0 1px 1px #68807444}
#app:has(.word-study-map-page) .word-study-unit-row.complete .word-study-unit-stars,#app:has(.word-study-map-page) .word-study-unit-row.current .word-study-unit-stars,#app:has(.word-study-map-page) .word-study-unit-row.open .word-study-unit-stars{color:#f5b51d}

/* Use the approved compact chapter icon on the live B1 route. Unlearned
   chapters stay colorful and quiet: no gray lock treatment, only outlined
   stars; the button remains disabled until the preceding chapter is done. */
#app:has(.word-study-map-page) .word-study-unit-row{display:flex;align-items:center;justify-content:center;min-height:170px;padding:0;position:relative}
#app:has(.word-study-map-page) .word-study-map{flex-direction:column}
#app:has(.word-study-map-page) .header button:not(.back){display:none}
#app:has(.word-study-map-page) .word-study-map-page{position:absolute;top:98px;right:0;bottom:0;left:0;min-height:0;overflow-y:auto}
#app:has(.word-study-map-page) .word-study-reference-node{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{position:relative;left:auto!important;top:auto!important;transform:none;width:auto;height:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:auto}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle{width:52px;height:52px;flex:0 0 52px;border:1px solid #fffaf2;background:var(--node-color)!important;box-shadow:0 2px 6px #2f5e4b26}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle b{font-size:15px;color:#fff;text-shadow:0 1px 2px #3b4f4840}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{width:auto;height:auto;margin-top:5px;background:transparent;box-shadow:none}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover em{font-size:13px;letter-spacing:1px;color:transparent;text-shadow:none;-webkit-text-stroke:1px #f0b333}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node.complete .reference-overlay-star-cover em{color:#f5b51d;-webkit-text-stroke:0;text-shadow:0 1px 1px #966c173d}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-lock{display:none}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(odd) .word-study-reference-node{transform:translateX(14px)}
#app:has(.word-study-map-page) .word-study-unit-row:nth-child(even) .word-study-reference-node{transform:translateX(-14px)}
#app:has(.word-study-map-page) .word-study-unit-a11y{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Chapter map follows the reference's phone-width S-curve. */
#app:has(.word-study-map-page){background:#fffaf4}
#app:has(.word-study-map-page)>.header{position:absolute;inset:0 0 auto;height:0!important;padding:0!important;background:transparent!important;border:0;z-index:40;pointer-events:none}
#app:has(.word-study-map-page)>.header h1,
#app:has(.word-study-map-page)>.header button:not(.back){display:none}
#app:has(.word-study-map-page)>.header .back{position:absolute;top:max(18px,env(safe-area-inset-top));left:18px;width:42px;height:42px;min-height:42px;padding:0;background:#ffffffdc;color:#736960;border:1px solid #fff;border-radius:50%;box-shadow:0 3px 12px #9f775118;pointer-events:auto}
#app:has(.word-study-map-page) .word-study-map-page{position:absolute;inset:0;top:0!important;right:0!important;bottom:0!important;left:0!important;min-height:0;overflow-y:auto;padding:0 0 80px!important;scrollbar-width:none;background:#fffaf4}
#app:has(.word-study-map-page) .word-study-map{position:relative;width:100%;height:281cqw;min-height:281cqw;margin:0;padding:0;overflow:hidden;flex:none;background:#fffaf4 url('https://tinymigo.com/japanese/assets/wordstudy-long-route-v2.png?v=long-route-1') center top/100% auto no-repeat}
#app:has(.word-study-map-page) .word-study-unit-row{position:absolute;left:var(--node-x);top:var(--node-y);width:0;height:0;min-height:0;padding:0;display:block;transform:translate(-50%,-50%);z-index:3}
#app:has(.word-study-map-page) .word-study-reference-node{position:static;width:0;height:0;display:block;transform:none!important}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{position:absolute;inset:auto;left:50%;top:50%;width:auto;height:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%);pointer-events:auto}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle{width:51px;height:51px;flex:0 0 51px;border:4px solid #fffdf8;background:var(--node-color)!important;box-shadow:0 3px 9px #7456442e}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle b{font:700 16px/1 Georgia,serif;color:#fff;text-shadow:0 1px 1px #563e3633}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle:disabled{opacity:1}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{height:auto;width:auto;margin-top:5px;padding:0;background:transparent;box-shadow:none;white-space:nowrap;line-height:1}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover em{font-size:12px;letter-spacing:1px;color:transparent;-webkit-text-stroke:1px #d79516;text-shadow:0 0 3px #fff,0 0 5px #fff}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node.complete .reference-overlay-star-cover em{color:#f6b923;-webkit-text-stroke:0;text-shadow:0 0 3px #fff,0 1px 1px #94691240}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{position:relative;z-index:4;padding:2px 5px;border:1px solid #efe2cd;background:#fffdf8;border-radius:6px;box-shadow:0 1px 4px #8f75511c}
#app:has(.word-study-map-page) .word-study-start-card{bottom:env(safe-area-inset-bottom,0px);background:#fffdf8;border-color:#fff;}
#app:has(.word-study-map-page) .word-study-route-path path{stroke:#e8a64e;stroke-width:1.8;opacity:1;filter:none}
#app:has(.word-study-map-page) .word-study-unit-row{z-index:10}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{z-index:2}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{z-index:5;padding:3px 7px;border:1px solid #eadbc5;background:#fff;border-radius:6px;box-shadow:0 1px 5px #70583b24}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle b{font-size:15px}
#app:has(.word-study-map-page) .word-study-start-card{bottom:0;background:#fffdf8;border-color:#fff;}
#app:has(.word-study-map-page) .word-study-start-card{position:fixed;left:50%;bottom:max(10px,env(safe-area-inset-bottom));z-index:35;width:calc(100% - 28px);min-height:0;margin:0;padding:7px 10px;border:1px solid #ffffffed;border-radius:18px;background:#fffdf4f2;box-shadow:0 8px 24px #66503b26;backdrop-filter:blur(10px);transform:translateX(-50%);display:grid;grid-template-columns:minmax(90px,1fr) minmax(132px,42%);align-items:center;gap:8px}
#app:has(.word-study-map-page) .word-study-counts{display:flex;flex-direction:row;align-items:center;justify-content:space-around;gap:7px;min-width:0;color:#65574d}
#app:has(.word-study-map-page) .word-study-counts strong{display:flex;flex-direction:column;align-items:center;font:700 22px/1.1 Georgia,serif;color:#d67b50;white-space:nowrap}
#app:has(.word-study-map-page) .word-study-counts small{margin-top:5px;font-family:inherit;font-size:10px;font-weight:500;line-height:1.1;color:#8b7c70}
#app:has(.word-study-map-page) .word-study-counts i{width:1px;height:30px;background:#e9ddce}
#app:has(.word-study-map-page) .word-study-actions{display:flex;flex-direction:column;gap:5px}
#app:has(.word-study-map-page) .word-study-actions button{width:100%;min-height:30px;padding:4px 10px;border-radius:11px;font-size:12px;line-height:1.2}
#app:has(.word-study-map-page) .word-study-actions .primary{background:#f36c5d;color:#fff;box-shadow:0 3px 8px #c953422c}
#app:has(.word-study-map-page) .word-study-actions .secondary{border:1px solid #edb998;background:#fff8ef;color:#a65f3e}
@container phone (max-width:360px){#app:has(.word-study-map-page) .word-study-start-card{grid-template-columns:minmax(82px,1fr) minmax(122px,44%);gap:7px;padding:9px}.word-study-counts strong{font-size:19px}}

/* The chapter map is paged vertically in six-node groups. Chapters sit well
   inside each page; the large empty band at every seam lets the route flow on
   without a node competing with the transition. */
#app:has(.word-study-map-page) .word-study-map-page{scroll-snap-type:y mandatory;scroll-padding-block:0;overscroll-behavior-y:contain;background:#fffaf4}
#app:has(.word-study-map-page) .word-study-map{height:calc(var(--map-pages) * 100svh);min-height:calc(var(--map-pages) * 100svh);overflow:visible;background-color:#fffaf4;background-image:radial-gradient(ellipse at 0% 18%,#fbe9e2 0 5%,transparent 28%),radial-gradient(ellipse at 100% 72%,#f8efdf 0 7%,transparent 27%);background-size:100% 100svh;background-repeat:repeat-y}
#app:has(.word-study-map-page) .word-study-map-sheet{position:relative;display:block;width:100%;height:100svh;min-height:100svh;flex:none;scroll-snap-align:start;scroll-snap-stop:always}
#app:has(.word-study-map-page) .word-study-route-path{display:block;position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:1;pointer-events:none}
#app:has(.word-study-map-page) .word-study-route-path path{fill:none;stroke:#e8a64e;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.96;filter:drop-shadow(0 1px 1px #966d3b24)}
#app:has(.word-study-map-page) .word-study-unit-row{position:absolute;left:var(--node-x);top:var(--node-y);width:0;height:0;min-height:0;padding:0;display:block;transform:translate(-50%,-50%);z-index:3}
#app:has(.word-study-map-page) .word-study-reference-node{position:static;width:0;height:0;display:block;transform:none!important}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{position:absolute;left:50%;top:50%;width:auto;height:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%);pointer-events:auto}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle{width:51px;height:51px;flex:0 0 51px;border:4px solid #fffdf8;background:var(--node-color)!important;box-shadow:0 3px 9px #7456442e}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle b{font:700 16px/1 Georgia,serif;color:#fff;text-shadow:0 1px 1px #563e3633}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle:disabled{opacity:1}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{height:auto;width:auto;margin-top:5px;padding:0;background:transparent;box-shadow:none;white-space:nowrap;line-height:1}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover em{font-size:12px;letter-spacing:1px;color:transparent;-webkit-text-stroke:1px #d79516;text-shadow:0 0 3px #fff,0 0 5px #fff}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node.complete .reference-overlay-star-cover em{color:#f6b923;-webkit-text-stroke:0;text-shadow:0 0 3px #fff,0 1px 1px #94691240}

/* Final map tune: one broad, smooth route; chapter dots sit on its outer bends. */
#app:has(.word-study-map-page) .word-study-route-path path{stroke:#eba943;stroke-width:2.1;opacity:1;filter:none}
#app:has(.word-study-map-page) .word-study-unit-row{z-index:10}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{z-index:2}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{position:relative;z-index:5;padding:3px 7px;border:1px solid #eadbc5;background:#fff;border-radius:6px;box-shadow:0 1px 5px #70583b24}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-node{transform:translate(-50%,calc(-50% - 13px))}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle{width:40px;height:40px;flex-basis:40px;border-width:3px}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-circle b{font-size:13px}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover{margin-top:5px;padding:2px 5px}
#app:has(.word-study-map-page) .word-study-reference-node .reference-overlay-star-cover em{font-size:11px;letter-spacing:.5px}

/* Guided explanations reuse the existing course palette and surfaces. */
.guided-progress{width:100%;height:5px;accent-color:var(--primary,#b8697a);margin:0 0 20px}
.guided-copy{line-height:2;font-size:16px}.guided-grammar h3{line-height:1.65}
.guided-parts{display:grid;gap:12px;margin:18px 0}.guided-parts details{border:1px solid var(--line,#eaded7);border-radius:16px;padding:14px;background:var(--card,#fff)}
.guided-parts summary{cursor:pointer;list-style:none}.guided-parts summary strong{display:block;font-size:23px;line-height:2}.guided-parts summary small{display:block;font-size:14px;line-height:1.7}.guided-parts summary span{display:block;font-size:12px;margin-top:8px;color:var(--muted,#776969)}
.guided-parts p{line-height:1.9}.guided-grammar rt{font-size:.5em}.guided-grammar .grammar-shortcuts{margin-top:24px}
.reading-hide-kana rt{visibility:hidden}.reading-translation{font-size:15px;line-height:1.8;color:var(--muted,#776969)}

/* Keep sentence chunks adjacent; expand only the selected explanation. */
.guided-parts{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}
.guided-parts>details{flex:1 1 105px;min-width:0;border-top:3px solid var(--accent,#9d828c);padding:10px 12px}
.guided-parts>details[open]{flex-basis:100%}
.guided-parts summary strong{font-size:21px;overflow-wrap:anywhere}
.guided-parts summary span{margin-top:4px}
.reading-analysis .guided-parts{margin:12px 0}
/* Grammar cues: consistent colors plus labels, so color is never the only cue. */
.grammar-pattern{background:#f2f6fa;border:1px solid #d8e3ef;border-radius:14px;padding:14px 16px;margin:12px 0 18px}
.grammar-pattern small{display:block;color:#566b80;margin-bottom:8px}
.grammar-pattern strong{display:block;font-size:23px;line-height:1.7;color:#284b68;overflow-wrap:anywhere}
.syntax-sentence{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 5px;margin:18px 0}
.syntax-token{display:inline-flex;flex-direction:column;align-items:center;padding-top:8px;min-width:0}
.syntax-token strong{font-weight:650;font-size:24px;line-height:1.9;padding:0 6px;border-bottom:4px solid var(--syntax-line);border-radius:8px;background:var(--syntax-fill);color:#28343c}
.syntax-token small{font-size:11px;line-height:1.5;margin-top:4px;color:#52616b}
.syntax-noun{--syntax-line:#69b6dc;--syntax-fill:#eaf5fb}
.syntax-particle{--syntax-line:#86bd72;--syntax-fill:#f0f8e9}
.syntax-verb{--syntax-line:#dda44e;--syntax-fill:#fff4de}
.syntax-ending{--syntax-line:#d48aa5;--syntax-fill:#fbeef3}
.syntax-modifier{--syntax-line:#a69bca;--syntax-fill:#f1eef9}
.syntax-plain{--syntax-line:transparent;--syntax-fill:transparent}
.syntax-plain strong{padding:0;font-weight:400}
.guided-parts>details.syntax-group-0{border-top-color:#69b6dc;background:#f6fbfe}
.guided-parts>details.syntax-group-1{border-top-color:#d48aa5;background:#fff7fa}
.guided-parts>details.syntax-group-2{border-top-color:#86bd72;background:#f7fbf2}
.guided-grammar>.grammar-shortcuts{position:sticky;bottom:0;z-index:2;background:#fff;padding:10px 0;margin-bottom:0;border-top:1px solid #eee6e9}

/* Learning world: clear surfaces over a quiet, luminous color field. */
#app.free-lesson-page{--ink:#303c58;--muted:#64728b;--line:#dce3f1;color:var(--ink);background:radial-gradient(ellipse at 5% 8%,#daf6ed 0,transparent 38%),radial-gradient(ellipse at 100% 32%,#ede3ff 0,transparent 45%),linear-gradient(160deg,#f1f8ff,#fbf8ff 70%,#f6f4fe)!important}
#app.free-lesson-page>.header{background:transparent!important;border:0;box-shadow:none}
#app.free-lesson-page .header button{background:#ffffffd9;border:1px solid #ffffff;border-radius:14px;box-shadow:0 4px 14px #5c66900a}
#app.free-lesson-page>.lesson-tabs{position:relative;top:auto;flex-shrink:0;margin:0 18px;padding:5px;background:#ffffffb8;border:1px solid #ffffff;border-radius:18px;box-shadow:0 6px 22px #57639a08;gap:4px}
#app.free-lesson-page .lesson-tabs button{min-height:42px;border-radius:13px;color:#65718a;font-weight:600}
#app.free-lesson-page .lesson-tabs button.selected{background:linear-gradient(135deg,#e8e1fc,#e1effb);color:#4a4988;box-shadow:0 3px 10px #69559b14}
#app.free-lesson-page>#lesson-panel{padding-top:20px!important;scroll-padding-top:12px}
#app.free-lesson-page #lesson-panel>h2{font-size:23px;letter-spacing:.02em;margin:0 0 18px;color:#303c58}
#app.free-lesson-page .grammar-intro{font-size:14px;line-height:1.8;color:#52647a;margin:0 0 12px}
#app.free-lesson-page .grammar-pattern{position:relative;background:linear-gradient(125deg,#e4f4fb,#ece6ff 80%);border:1px solid #fff;border-radius:21px;padding:17px 18px;margin:0 0 16px;box-shadow:0 6px 22px #65769c08}
#app.free-lesson-page .grammar-pattern small{color:#5b608b;font-size:12px;font-weight:700;letter-spacing:.1em}
#app.free-lesson-page .grammar-pattern strong{font-size:23px;line-height:1.7;color:#3d486a}
#app.free-lesson-page .focus-progress{color:#5d6a83;font-size:12px;margin:14px 2px 7px}
#app.free-lesson-page .guided-progress{appearance:none;height:6px;border:0;border-radius:8px;background:#e5e5f2;margin:0 0 16px;overflow:hidden}
#app.free-lesson-page .guided-progress::-webkit-progress-bar{background:#e5e5f2}
#app.free-lesson-page .guided-progress::-webkit-progress-value{background:linear-gradient(90deg,#83cbbd,#9c91dc);border-radius:8px}
#app.free-lesson-page .guided-progress::-moz-progress-bar{background:linear-gradient(90deg,#83cbbd,#9c91dc)}
#app.free-lesson-page .grammar-stage{padding:20px 18px;background:#ffffffed;border:1px solid #fff;border-radius:23px;box-shadow:0 8px 28px #475b7e08}
#app.free-lesson-page .grammar-stage h3{margin:0 0 14px;font-size:18px;color:#35415d;line-height:1.7}
#app.free-lesson-page .guided-copy{font-size:16px;line-height:1.95;margin:0 0 10px}
#app.free-lesson-page .grammar-stage>p{line-height:1.9}
#app.free-lesson-page .text-button{color:#58629a;min-height:40px;padding:8px 10px;border-radius:11px}
#app.free-lesson-page .grammar-stage>.text-button{background:#f1f2fb;margin:4px 4px 4px 0}
#app.free-lesson-page .grammar-option{background:#f9fbff;border:1px solid #dbe2f2;border-radius:15px;padding:16px;min-height:58px;font-size:18px;color:#344363;box-shadow:0 3px 0 #e8ecf6;text-align:left}
#app.free-lesson-page .grammar-option.right{background:#e8f7ef;border-color:#8cc9ad;color:#285a45;opacity:1}
#app.free-lesson-page .grammar-option.wrong{background:#fff0ef;border-color:#e8ada8;color:#8b494c;opacity:1}
#app.free-lesson-page .grammar-feedback{padding:16px;background:#edf7f3;border:1px solid #d1e9dd;border-radius:17px;color:#355c4c;margin-top:18px}
#app.free-lesson-page .grammar-feedback.wrong{background:#fff4eb;border-color:#efdbbd;color:#745234}
#app.free-lesson-page .grammar-feedback .text-button{display:inline-flex;margin-right:8px;background:#ffffffb3}
#app.free-lesson-page .guided-grammar>.grammar-shortcuts{background:#f5f5fff2;border:1px solid #fff;border-radius:18px;padding:10px;bottom:0;gap:10px;box-shadow:0 -4px 18px #556a9208}
#app.free-lesson-page .primary{background:linear-gradient(125deg,#778acb,#9783c7);color:#fff;border:1px solid #8290c9;box-shadow:0 4px 12px #797ab822;border-radius:14px;min-height:46px}
#app.free-lesson-page .secondary{background:#fff;border:1px solid #d9dfef;color:#586582;border-radius:14px;min-height:46px}
#app.free-lesson-page button:disabled{cursor:default}
#app.free-lesson-page .primary:disabled,#app.free-lesson-page .secondary:disabled{opacity:.45;box-shadow:none}
#app.free-lesson-page button:focus-visible,#app.free-lesson-page summary:focus-visible{outline:3px solid #8075c5;outline-offset:3px}
#app.free-lesson-page .syntax-sentence{gap:8px 5px;padding:15px 10px;background:#f8faff;border:1px solid #e7ecf6;border-radius:16px}
#app.free-lesson-page .syntax-token strong{font-size:24px;line-height:1.9}
#app.free-lesson-page .syntax-token small{font-size:11px;color:#506078}
#app.free-lesson-page .focus-extras{background:#ffffffb8;border:1px solid #e0e5f1;border-radius:17px;padding:14px;margin-top:18px}
#app.free-lesson-page .lesson-word-row{background:#ffffffd9;border:1px solid #e2e9f2;border-radius:18px;padding:16px;margin-bottom:10px;box-shadow:0 4px 15px #53628605}
#app.free-lesson-page .lesson-word-row:nth-child(3n+2){border-left:3px solid #b4a1de}
#app.free-lesson-page .lesson-word-row:nth-child(3n+1){border-left:3px solid #8fcabb}
#app.free-lesson-page .lesson-word-row:nth-child(3n){border-left:3px solid #e6b5cb}
#app.free-lesson-page .lesson-word-speaker{background:#ecf0fc;color:#626da3;border:0;border-radius:50%;min-width:42px;min-height:42px}
#app.free-lesson-page .lesson-dock{background:#f7f8fff5;border-top:1px solid #e5e8f5;gap:10px}
#app.free-lesson-page .reading-paper{background:#ffffffde;border:1px solid #fff;border-radius:22px;box-shadow:0 8px 26px #62709908}
@media(prefers-reduced-motion:reduce){#app.free-lesson-page *{scroll-behavior:auto!important;transition:none!important}}
#app.free-lesson-page .grammar-pattern.compact{display:flex;align-items:baseline;gap:10px;padding:11px 14px;margin-bottom:12px;border-radius:14px;box-shadow:none}
#app.free-lesson-page .grammar-pattern.compact small{flex-shrink:0;font-size:11px;margin:0;letter-spacing:0}
#app.free-lesson-page .grammar-pattern.compact strong{font-size:16px;line-height:1.6;font-weight:600}
#app.free-lesson-page .guided-grammar>.grammar-shortcuts>.secondary{flex:0 0 28%;box-shadow:none;background:transparent}
#app.free-lesson-page .beginner-route{margin:0 0 16px;font-size:14px;line-height:1.8}
#app.free-lesson-page .focus-article{background:#ffffffd9;border:1px solid #fff;border-radius:22px;padding:4px 18px;box-shadow:0 8px 26px #62709908}
#app.free-lesson-page .reading-speaker{display:inline-block;color:#68718f;font-size:12px;font-weight:600;letter-spacing:.04em;margin-bottom:3px}
#app.free-lesson-page .focus-paragraph{padding:16px 0;border-bottom:1px solid #e8edf5}
#app.free-lesson-page .focus-paragraph:last-child{border-bottom:0}
#app.free-lesson-page .reading-settings{padding:8px 0 0;color:#62708d;font-size:12px}
#app.free-lesson-page .reading-settings summary{cursor:pointer;text-align:center;min-height:32px;line-height:32px}
#app.free-lesson-page #lesson-audio-status{display:block;text-align:center;color:#67738b;font-size:12px;padding-top:7px}
/* Vocabulary flashcards: one spelling, one reading, one decision. */
#app.page-wordstudy{background:radial-gradient(ellipse at 0 15%,#e1f5ef,transparent 50%),linear-gradient(145deg,#f4f7ff,#f4effc)!important;color:#34415c}
.page-wordstudy .word-study-page:not(.word-study-map-page){padding:22px 20px 30px}
.page-wordstudy .word-study-session-head{gap:16px;align-items:flex-start;margin-bottom:20px;color:#63718a;font-size:13px}
.page-wordstudy .word-study-session-head .chip{background:transparent;padding:0;border:0;color:#63718a;white-space:normal;line-height:1.7}
.page-wordstudy .word-study-session-head>span:last-child{white-space:nowrap;padding-top:3px}
.page-wordstudy .word-study-card{background:#ffffffed;border:1px solid #fff;border-radius:26px;box-shadow:0 12px 35px #6073980b;padding:42px 20px 28px;min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;user-select:text}
.page-wordstudy .word-study-card h2{font-size:clamp(25px,7.5cqw,36px);line-height:1.85;margin:12px 0;color:#303e5b;font-weight:650;overflow-wrap:anywhere;max-width:100%;letter-spacing:.01em}
.page-wordstudy .word-study-card rt{font-size:.43em;color:#6a7891;font-weight:400;letter-spacing:.04em}
.page-wordstudy .word-study-meaning{font-size:17px;line-height:1.8;color:#56627a;margin:18px 0 4px;max-width:100%}
.page-wordstudy .word-study-sound{margin:22px 0 0;background:#edf0fc;border:1px solid #e1e5f5;box-shadow:none}
.page-wordstudy .word-decision{display:grid;grid-template-columns:1fr 1.6fr;gap:12px;margin-top:22px}
.page-wordstudy .word-decision button{min-height:50px;border-radius:16px;font-size:15px}
.page-wordstudy .word-decision .secondary{background:#ffffffbf;border:1px solid #dce2ef;color:#66708a}
.page-wordstudy .word-back{display:block;margin:14px auto;color:#717d96;font-size:13px}
.page-wordstudy button:focus-visible{outline:3px solid #8b80be;outline-offset:3px}
/* B1 game cards: image first, then one spelling/reading, then a clear decision. */
.page-wordstudy .word-study-session-head{margin-bottom:8px}
.page-wordstudy .word-study-session-progress{height:5px;border-radius:999px;background:#e9e5f0;overflow:hidden;margin:0 0 16px}
.page-wordstudy .word-study-session-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#83cdb5,#ad98dd);transition:width .2s ease}
.page-wordstudy .word-study-card[data-word-card]{min-height:0;padding:12px 14px 20px;display:block;text-align:center;border:1px solid #efebf5;border-radius:24px;background:#fff;box-shadow:0 12px 34px #66588012}
.page-wordstudy .word-study-illustration{height:auto;aspect-ratio:320/182;max-height:190px;width:100%;margin:0 auto 16px;border-radius:19px;overflow:hidden;background:#f3effa}
.page-wordstudy .game-word-art{display:block;width:100%;height:100%}
.page-wordstudy .word-study-wordline{display:flex;align-items:center;justify-content:center;gap:10px;min-height:65px;padding:0 6px}
.page-wordstudy .word-study-wordline h2{flex:0 1 auto;margin:0;color:#33314b;font-size:clamp(25px,7.1cqw,34px);line-height:1.6;letter-spacing:.01em;overflow-wrap:anywhere}
.page-wordstudy .word-study-wordline rt{color:#775f83;font-size:.41em;letter-spacing:.03em}
.page-wordstudy .word-study-sound{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;min-height:42px;margin:0;padding:10px;border:1px solid #e7dcef;border-radius:50%;background:#f8f1fb;color:#8d6f9c;box-shadow:none}
.page-wordstudy .word-study-sound svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.page-wordstudy .word-study-sound::before{display:none}
.page-wordstudy .word-study-meaning{margin:8px auto 0;color:#784f66;font-size:18px;font-weight:600;line-height:1.5}
.page-wordstudy .word-study-meaning.word-study-same{color:#7a7080;font-size:13px;font-weight:400}
.page-wordstudy .word-study-art-hint{margin:12px 0 0;color:#9d94a3;font-size:11px;line-height:1.35}
.page-wordstudy .word-study-reveal{margin:10px auto 0;padding:9px 16px;border-radius:12px;background:#f4e8f0;color:#835c79}
.page-wordstudy .word-decision{gap:10px;margin-top:14px;grid-template-columns:1fr 1.3fr}
.page-wordstudy .word-decision button{min-height:48px;border-radius:14px;font-size:15px;font-weight:700}
.page-wordstudy .word-decision .primary{background:#ae7c9d;color:#fff;box-shadow:0 4px 12px #ac7b9d3d}
.page-wordstudy .word-decision .secondary{background:#fff;border-color:#e6d8e3;color:#755e70}
.page-wordstudy .word-back{margin:10px auto 0}
@container phone (max-width:360px){.page-wordstudy .word-study-card[data-word-card]{padding:10px 11px 17px}.page-wordstudy .word-study-illustration{margin-bottom:12px}.page-wordstudy .word-study-wordline h2{font-size:24px}}
/* Word route and flashcard: a clear path, one bookmark, one next action. */
#app:has(.word-study-map-page) .word-study-map-page{scroll-snap-type:none;background:linear-gradient(155deg,#f4f7ff,#fcf7f5);padding:70px 0 116px!important}
.word-route-intro{padding:20px 24px 10px;color:#39425c}
.word-route-intro .n5-levels{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin:0 0 19px;padding:4px;border-radius:13px;background:#eae7ef}
.word-route-intro .n5-levels button{min-height:33px;padding:4px 0;border-radius:9px;font-size:12px}
.word-route-intro .n5-levels .selected{background:#c47a9e;color:#fff}
.word-route-intro .journey-kicker{display:block;color:#92728e;font-size:12px;font-weight:700;letter-spacing:.08em}
.word-route-intro strong{display:block;margin-top:6px;font-size:30px;line-height:1.2}
.word-route-intro strong small{font-size:14px;font-weight:500;color:#7b8195}
.word-route-overview{display:flex;align-items:center;justify-content:space-between;gap:8px}
.word-route-review{min-height:35px;padding:5px 10px;border:1px solid #edd8b4;border-radius:999px;background:#fff9ec;color:#a27434;font-size:12px;font-weight:700;white-space:nowrap}
.word-route-review:disabled{opacity:.5}
.word-route-intro p{margin:8px 0 0;color:#747b90;font-size:13px}
.word-route-list{position:relative;display:grid;gap:9px;padding:14px 20px 22px}
.word-route-list:before{content:"";position:absolute;left:46px;top:32px;bottom:44px;border-left:2px dashed #d6c7db}
.word-route-stop{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr) 72px;align-items:center;gap:11px;width:100%;min-height:66px;padding:9px 14px 9px 7px;text-align:left;border:1px solid #e9e6ef;border-radius:18px;background:#fffdfde8;color:#45445e;box-shadow:0 5px 18px #6d65850d}
.word-route-stop.is-current{border-color:#d9b7ca;background:#fff6fa;box-shadow:0 7px 21px #a673981d}
.word-route-stop:focus-visible,.word-study-star:focus-visible,.word-study-pager button:focus-visible{outline:3px solid #a886bb;outline-offset:2px}
.word-route-number{position:relative;z-index:1;display:grid;place-items:center;width:43px;height:43px;border:3px solid white;border-radius:50%;background:#ddd2e4;color:#695e78;font-size:14px;font-weight:800;box-shadow:0 3px 9px #796a8a22}
.word-route-stop.is-current .word-route-number{background:#d783a8;color:#fff}
.word-route-stop.is-done .word-route-number{background:#8abfaa;color:#fff}
.word-route-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.word-route-copy strong{font-size:15px;line-height:1.3}
.word-route-copy small{color:#8a8da0;font-size:12px}
.word-route-stars{justify-self:end;color:#d49c49;font-size:18px;letter-spacing:1px;white-space:nowrap}
#app:has(.word-study-map-page) .word-study-start-card{grid-template-columns:minmax(0,1fr) minmax(120px,40%);padding:11px 13px;border-radius:19px;background:#fffdfdf5}
#app:has(.word-study-map-page) .word-study-start-card>div:first-child{gap:4px}
#app:has(.word-study-map-page) .word-study-start-card strong{color:#45445e;font-size:15px}
#app:has(.word-study-map-page) .word-study-start-card small{color:#8a8694;font-size:11px}
#app:has(.word-study-map-page) .word-study-actions{grid-column:2;gap:5px}
#app:has(.word-study-map-page) .word-study-actions .primary{background:#c8759b}
#app:has(.word-study-map-page) .word-study-actions .secondary{background:#fff;color:#8c6d87;border-color:#eadbe7}
.page-wordstudy .word-study-session{padding-bottom:110px!important}
.page-wordstudy .word-study-session-head{display:flex;justify-content:space-between;margin:2px 2px 9px;color:#626a80;font-size:13px;font-weight:600}
.page-wordstudy .word-study-card[data-word-card]{position:relative;padding:13px 14px 23px;overflow:hidden}
.page-wordstudy .word-study-star{position:absolute;z-index:2;top:22px;right:23px;display:grid;place-items:center;width:41px;height:41px;min-height:41px;padding:0;border:1px solid #f0dfb8;border-radius:50%;background:#fffdf6ef;color:#c8a364;font-size:28px;line-height:1;box-shadow:0 3px 10px #957e5b1c}
.page-wordstudy .word-study-star.is-starred{color:#e5a840;background:#fff8e6}
.page-wordstudy .word-study-illustration{margin-bottom:17px}
.page-wordstudy .word-study-wordline{justify-content:center;gap:13px}
.page-wordstudy .word-study-meaning{margin:7px auto 0;color:#61465e;font-size:18px;font-weight:600}
.page-wordstudy .word-study-pager{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1.45fr;gap:10px;margin-top:17px;padding:10px 0 calc(7px + env(safe-area-inset-bottom,0px));background:linear-gradient(0deg,#f5f3fa 74%,#f5f3fa00)}
.page-wordstudy .word-study-pager button{min-height:54px;border-radius:15px;font-size:16px;font-weight:700}
.page-wordstudy .word-study-prev{border:1px solid #ded6e4;background:#fff;color:#6a5d73}
.page-wordstudy .word-study-next{border:1px solid #c27599;background:#c27599;color:#fff;box-shadow:0 6px 15px #b56e9138}
.page-wordstudy .word-study-pager button:disabled{opacity:.42;box-shadow:none}
@container phone (max-width:360px){.word-route-stop{grid-template-columns:44px minmax(0,1fr) 66px;padding-right:9px}.word-route-stars{font-size:16px}.page-wordstudy .word-study-pager button{font-size:14px}}
.page-match .word-challenge-page{padding-top:22px!important;background:linear-gradient(170deg,#f9f5fb,#fffaf8)}
.word-challenge-head{display:flex;align-items:center;gap:16px;margin:0 1px 22px;color:#806a88;font-size:13px;font-weight:700}
.word-challenge-head>span{white-space:nowrap}
.word-challenge-meter{height:6px;flex:1;border-radius:999px;background:#e9deeb;overflow:hidden}
.word-challenge-meter i{display:block;height:100%;border-radius:inherit;background:#c77fa5}
.word-challenge-prompt{min-height:158px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:25px 18px;border:1px solid #eee3ef;border-radius:25px;background:#fff;box-shadow:0 12px 30px #5944650c;text-align:center}
.word-challenge-prompt small{color:#9b7f9e;font-size:13px;font-weight:650}
.word-challenge-prompt h2{margin:16px 0 0;color:#44384e;font-size:clamp(26px,7cqw,35px);line-height:1.65;overflow-wrap:anywhere}
.word-challenge-prompt rt,.word-challenge-option rt{color:#8f7997;font-size:.45em;font-weight:400}
.word-challenge-options{display:grid;gap:11px;margin:20px 0 0}
.word-challenge-options button{width:100%;min-height:65px;padding:12px 16px;border:1px solid #e8ddea;border-radius:18px;background:#fff;color:#473b4e;font-size:18px;font-weight:650;line-height:1.5;box-shadow:0 4px 13px #59446508;text-align:center;overflow-wrap:anywhere}
.word-challenge-options button:active{transform:scale(.985)}
.word-challenge-options button.is-wrong{background:#f4f0f2;color:#9b919a;box-shadow:none}
.word-challenge-options button:focus-visible{outline:3px solid #be82a7;outline-offset:2px}
.word-challenge-feedback{min-height:1.5em;margin:14px 3px;color:#aa6681;font-size:13px;text-align:center}
.page-games .game-levels{display:block;margin:18px 0 20px}
.page-games .game-levels .n5-levels,.page-wordstudy .word-route-intro .n5-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;width:100%;padding:5px;border-radius:15px;background:#eeeaf0}
.page-games .game-levels .n5-levels button,.page-wordstudy .word-route-intro .n5-levels button{min-height:42px;padding:4px 0;border:1px solid transparent;border-radius:11px;font-size:13px;font-weight:700;box-shadow:none}
.page-games .game-levels .n5-levels button:not(.selected):not(:disabled),.page-wordstudy .word-route-intro .n5-levels button:not(.selected):not(:disabled){background:#fff;color:#423a49;border-color:#e8e1eb;box-shadow:0 2px 6px #58476112}
.page-games .game-levels .n5-levels button.selected,.page-wordstudy .word-route-intro .n5-levels button.selected{background:#c47a9e;color:#fff;border-color:#c47a9e!important;box-shadow:0 3px 8px #a9698c2e}
.page-games .game-levels .n5-levels button:disabled,.page-wordstudy .word-route-intro .n5-levels button:disabled{opacity:1;background:#494650;color:#d1ccd4;border-color:#494650;box-shadow:none}
/* Lesson 1.1 pilot: one primary reading path, vocabulary in three text rows. */
#app.free-lesson-page:has([data-lesson="B1-C001"]){background:#f7f8fc!important}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-list{gap:0;background:transparent}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-row{background:transparent;border:0;border-bottom:1px solid #e6e8f0;border-radius:0;box-shadow:none;padding:18px 0;gap:10px}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-copy{display:grid;gap:5px;min-width:0;flex:1}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-copy strong{font-size:21px;line-height:1.5;font-weight:600;white-space:nowrap;letter-spacing:0}
#lesson-panel[data-lesson="B1-C001"] .word-reading{font-size:14px;line-height:1.5;color:#7a8095;white-space:nowrap}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-copy small{font-size:14px;line-height:1.6;color:#59627a}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-speaker{flex:0 0 38px;width:38px;height:38px;box-shadow:none;background:#eeecf7;border:0}
#lesson-panel[data-lesson="B1-C001"] .grammar-intro{margin:0 0 12px;color:#74798e}
#lesson-panel[data-lesson="B1-C001"] .grammar-pattern{background:transparent;border:0;border-radius:0;box-shadow:none;padding:8px 0 12px}
#lesson-panel[data-lesson="B1-C001"] .grammar-pattern strong{font-size:23px;color:#433b67}
#lesson-panel[data-lesson="B1-C001"] .grammar-pattern.compact{display:none}
#lesson-panel[data-lesson="B1-C001"] .grammar-stage{padding:12px 0;background:transparent;border:0;border-radius:0;box-shadow:none;min-height:0}
#lesson-panel[data-lesson="B1-C001"] .grammar-stage h3{font-size:19px;line-height:1.7;margin:12px 0}
#lesson-panel[data-lesson="B1-C001"] .guided-copy{font-size:16px;line-height:1.9}
#lesson-panel[data-lesson="B1-C001"] .pilot-rule-note{font-size:14px;line-height:1.9;color:#646d82}
#lesson-panel[data-lesson="B1-C001"] .pilot-example{padding:16px 0;margin:12px 0;border-block:1px solid #e3e5ef}
#lesson-panel[data-lesson="B1-C001"] .focus-extras{background:transparent;border:0;border-radius:0;box-shadow:none;padding:12px 0}
#lesson-panel[data-lesson="B1-C001"] .focus-extras summary{font-size:14px;color:#737b90}
#lesson-panel[data-lesson="B1-C001"] .guided-grammar>.grammar-shortcuts{background:#f7f8fc;border:0;box-shadow:none;padding:12px 0;border-radius:0}
#lesson-panel[data-lesson="B1-C001"] .focus-article{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0}
#lesson-panel[data-lesson="B1-C001"] .focus-paragraph{padding:16px 10px;border-radius:8px}
#lesson-panel[data-lesson="B1-C001"] .focus-paragraph.current{background:#efedf8}
#lesson-panel[data-lesson="B1-C001"] .pilot-translation{color:#71788b;font-size:15px;line-height:1.8}
#lesson-panel[data-lesson="B1-C001"] .pilot-explanation{border-top:1px solid #e3e5ef;margin-top:22px;padding-top:18px;font-size:16px;line-height:1.95}
#lesson-panel[data-lesson="B1-C001"] .pilot-explanation h3{font-size:16px;margin:0 0 10px}
@media(max-width:370px){#lesson-panel[data-lesson="B1-C001"] .lesson-word-copy strong{font-size:18px}#lesson-panel[data-lesson="B1-C001"] .word-reading{font-size:12px}}
/* Grammar reading order: key point, annotated sentence, short explanations. */
#lesson-panel[data-lesson="B1-C001"]:has(.pilot-visual-grammar)>.lesson-title{font-size:13px;font-weight:400;color:#84899b;margin-bottom:16px}
#lesson-panel[data-lesson="B1-C001"] .pilot-keypoint small{font-size:12px;color:#837995}
#lesson-panel[data-lesson="B1-C001"] .pilot-keypoint h3{font-size:26px;line-height:1.5;color:#43365f;margin:8px 0 24px;font-weight:700}
#lesson-panel[data-lesson="B1-C001"] .pilot-sentence{padding:12px 0 18px;border-bottom:1px solid #e4e5ee}
#lesson-panel[data-lesson="B1-C001"] .pilot-sentence .syntax-sentence{background:transparent;border:0;box-shadow:none;padding:4px 0 12px;gap:7px}
#lesson-panel[data-lesson="B1-C001"] .pilot-sentence .syntax-token strong{font-size:24px}
#lesson-panel[data-lesson="B1-C001"] .pilot-sentence .syntax-token small{font-size:12px;margin-top:8px}
#lesson-panel[data-lesson="B1-C001"] .pilot-sentence-caption{display:flex;align-items:center;justify-content:space-between;color:#72788b;font-size:14px}
#lesson-panel[data-lesson="B1-C001"] .pilot-point-list{margin:20px 0 12px;display:grid;gap:14px}
#lesson-panel[data-lesson="B1-C001"] .pilot-point-list>div{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:baseline}
#lesson-panel[data-lesson="B1-C001"] .pilot-point-list dt{font-size:15px;font-weight:600;color:#53516b}
#lesson-panel[data-lesson="B1-C001"] .pilot-point-list dd{margin:0;font-size:14px;line-height:1.75;color:#73798b}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"]:has(#grammar-guide-host)>.lesson-title{display:none}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar{padding-top:12px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-keypoint h3{margin:8px 0 16px;font-size:27px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-sentence .syntax-sentence{margin:8px 0}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-point-list{gap:18px;margin:24px 0}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-point-list>div{grid-template-columns:82px 1fr}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-reading-context{color:#788094;font-size:13px;line-height:1.85;margin:14px 0}
/* Continuous prose: natural paragraphs, no chat cards or repeated speaker labels. */
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"]:has(.continuous-prose)>.lesson-title{display:none}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-reading-title{font-size:22px;line-height:1.6;margin:24px 0 18px;color:#433b60}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .focus-paragraph{border:0;border-radius:12px;padding:8px 10px 10px;margin:0 0 4px;background:transparent}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .focus-paragraph:nth-child(4n+1),#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .focus-paragraph:nth-child(4n+2){background:#fffaf7}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .n5-reading-text{line-height:2.15;font-size:18px;margin:0 0 5px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .focus-paragraph.current .n5-reading-text{border-left:3px solid #b8a2d3;padding-left:10px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .continuous-prose .reading-translation{font-size:14px;line-height:1.9;color:#7c8090;margin:0}
/* Two distinct cards: pure grammar first, the worked example second. */
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card{padding:16px 18px;background:#fff;border:1px solid #e7dfd8;border-radius:16px;margin-bottom:12px;box-shadow:0 3px 12px #8c6c5510}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card small{display:block;font-size:12px;color:#8b7d9f}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card h3{font-size:30px;line-height:1.5;margin:8px 0 0;letter-spacing:.025em;color:#3e3540}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .grammar-pattern-line{color:#3e3540}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .grammar-pattern-line::first-letter{color:#c86e63}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card{padding:16px;background:#fff;border:1px solid #e5e7ee;border-radius:18px;margin:0;box-shadow:none}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card h4{margin:0 0 10px;font-size:12px;line-height:1.5;font-weight:500;color:#9295a5}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-sentence{padding:0;margin:0 0 16px;gap:10px 7px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-token strong{font-size:22px;padding:0 4px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-token small{font-size:10px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .pilot-sentence-caption{gap:8px;font-size:14px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-point-list{padding:0 4px}

/* Xiaojiu illustrates the first grammar explanation without extra taps. */
#lesson-panel[data-lesson="B1-C001"] .grammar-comic{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;margin:20px 0 8px;align-items:center}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-guide{text-align:center;align-self:center}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-guide img{display:block;width:100%;height:auto;filter:drop-shadow(0 5px 8px #e9d9e9)}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-guide>span{display:block;margin-top:6px;font-size:11px;color:#98728d}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-panels{display:grid;gap:6px}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble{position:relative;padding:11px 14px;border-radius:14px;background:#f5f8fb;border:0;box-shadow:0 2px 8px #8ba1b014}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble:before{content:"";position:absolute;left:-7px;top:28px;width:12px;height:12px;background:inherit;border-left:inherit;border-bottom:inherit;transform:rotate(45deg)}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble small{display:block;font-size:11px;color:#6e7c8d;margin-bottom:8px}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble strong{display:block;font-size:22px;line-height:1.6;color:#3d526d;font-weight:650}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble strong span{margin-left:5px;color:#578768}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble p{margin:3px 0 0;font-size:14px;line-height:1.5;color:#566174}
#lesson-panel[data-lesson="B1-C001"] .comic-identity{background:#fff0f4;border-color:#f3e0e7}
#lesson-panel[data-lesson="B1-C001"] .comic-identity strong span{color:#ad6486}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-tip{grid-column:1/-1;display:flex;align-items:baseline;gap:10px;margin:0;padding:8px 2px;font-size:12px;line-height:1.6;color:#737887}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-tip strong{white-space:nowrap;color:#578768;font-size:14px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar:has(.grammar-comic){padding-top:0}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar:has(.grammar-comic) .grammar-rule-card{padding:12px 20px;margin-bottom:12px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar:has(.grammar-comic) .grammar-example-card{padding:12px 16px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar:has(.grammar-comic) .syntax-sentence{margin-bottom:8px}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic{margin-top:12px;gap:8px 12px}
#lesson-panel[data-lesson="B1-C001"] .grammar-comic-bubble{padding:8px 14px}
#lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar:has(.grammar-comic)>.grammar-shortcuts{position:static;margin-top:8px}

#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-long h3{font-size:23px;line-height:1.65;overflow-wrap:anywhere}

.grammar-rule-card .grammar-pattern-line{display:block}
#lesson-panel[data-lesson="B1-C001"]:has(.pilot-reading-title)>.lesson-title{display:none}
/* Scrollable practice: one recording and translation control per passage. */
.follow-companion{display:flex;align-items:center;gap:10px;margin:4px 0 18px;color:#9b718c;font-size:13px}
.follow-companion img{width:58px;height:58px;object-fit:contain}
.follow-cards,.illustrated-details{display:grid;gap:18px;padding-bottom:22px}
.follow-card,.detail-scene{padding:18px;background:#fff;border:1px solid #e6e3ee;border-radius:20px}
.follow-card header{display:flex;gap:9px;align-items:center;font-size:12px;color:#8b8196;margin-bottom:8px}
.follow-card header small,.detail-scene h3 small{color:#b99cac;font-size:11px}
.follow-card .n5-reading-text{margin:0 0 12px;font-size:21px;line-height:2.4}
.follow-card.is-recording{border-color:#d792ac;box-shadow:0 0 0 2px #f8e2ed}
.follow-translation{font-size:14px;line-height:1.7;color:#73788b;margin:12px 0}
.sentence-actions,.sentence-actions-right{display:flex;align-items:center;gap:7px}
.sentence-actions-right{margin-left:auto}
.sentence-icon{display:inline-flex!important;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;min-height:40px;padding:9px!important;border-radius:50%;background:#f3f1f8;color:#87799d;border:0;cursor:pointer}
.sentence-icon svg{width:22px;height:22px}
.sentence-icon.record-icon{background:#fae7ef;color:#b16c8c}
.sentence-icon[aria-expanded="true"]{background:#e5f0eb;color:#527963}
.sentence-icon:disabled{opacity:.3;cursor:default}
.sentence-icon:focus-visible{outline:2px solid #8d79b2;outline-offset:3px}
.sentence-record-state{font-size:11px;color:#b16c8c;white-space:nowrap}
.detail-scene h3{display:flex;gap:8px;align-items:baseline;font-size:17px;line-height:1.6;margin:0 0 16px;color:#554762}
.detail-example{position:relative;padding-bottom:10px;border-bottom:1px solid #eeeaf3}
.detail-example>p{font-size:22px;line-height:2;margin:0 0 6px;color:#3d4259}
.detail-example>span{font-size:13px;color:#838494;display:inline-block;max-width:calc(100% - 45px)}
.detail-example>.sentence-icon{vertical-align:middle;float:right}
.detail-comic{display:grid;grid-template-columns:60px minmax(0,1fr);gap:10px;align-items:center;margin-top:18px}
.detail-comic>img{width:60px;height:auto}
.detail-comic>div{display:grid;gap:10px}
.detail-bubble{background:#f4f0fa;padding:12px;border-radius:14px;position:relative}
.detail-bubble:before{content:"";position:absolute;left:-5px;top:20px;width:10px;height:10px;background:inherit;transform:rotate(45deg)}
.detail-bubble strong{font-size:17px;line-height:1.9;font-weight:600;color:#5f5274}
.detail-bubble p{font-size:13px;line-height:1.7;margin:5px 0 0;color:#727385}
/* Original card hierarchy: words, grammar, example, short explanation. */
#lesson-panel .lesson-word-list{display:grid;gap:12px;background:none;border:0;padding:0}
#lesson-panel .lesson-word-list .lesson-word-row{background:#fff;border:1px solid #e9e7f1;border-radius:18px;padding:18px 20px;box-shadow:0 3px 10px #51436d05}
.grammar-explain .grammar-rule-card{margin:18px 0 14px;padding:20px;border-radius:16px;background:#f3f0fc}
.grammar-explain .grammar-rule-card h3{margin:0;font-size:24px;line-height:1.6}
.grammar-explain .grammar-example-card{padding:18px;border:1px solid #e6edf0;border-radius:16px;margin-bottom:18px;background:white}
.grammar-explain .grammar-parts>span:nth-child(3n+1){background:#eaf4fb}.grammar-explain .grammar-parts>span:nth-child(3n+2){background:#eaf6e9}.grammar-explain .grammar-parts>span:nth-child(3n){background:#fff3df}
.focus-paragraph .sentence-actions-right{display:flex;justify-content:flex-end;margin-top:8px}
#app.page-course.free-lesson-page .lesson-player #lesson-play.round-play{width:54px;height:54px;min-width:54px;border-radius:50%!important;padding:15px;flex:none}
.round-play svg{width:24px;height:24px;display:block}
.grammar-explain .detail-comic{margin:14px 0}.grammar-explain .detail-bubble p{margin:5px 0}
.grammar-explain .detail-bubble>small{display:block;margin-bottom:8px;color:#777185;font-size:12px}.grammar-explain .detail-bubble>strong{display:block}
#lesson-panel .grammar-explain .grammar-rule-card{background:#fff;border:1px solid #ebe8ef;box-shadow:none}
.pattern-ink-0{color:#596f98}.pattern-ink-1{color:#8c69a9}.pattern-ink-2{color:#579482}
#lesson-panel .grammar-example-card,#lesson-panel .grammar-example-card .syntax-sentence{background:transparent;border:0;box-shadow:none;border-radius:0}
#lesson-panel .grammar-example-card{padding:12px 2px 16px}
.follow-card .passage-turn+.passage-turn,.detail-passage .passage-turn+.passage-turn{margin-top:22px}
.detail-passage{padding:8px 0 22px}.detail-focus{border-top:1px solid #e9e5ee;padding-top:16px}.detail-focus h3{font-size:15px;color:#71617e}.detail-passage>.sentence-icon{display:flex;margin-left:auto}.detail-passage .reading-translation{font-size:14px;line-height:1.7;color:#847d89}.follow-translation p{margin:8px 0}
#app.page-course.free-lesson-page #lesson-panel .grammar-explain .grammar-rule-card{background:#fff!important;border:1px solid #ebe8ef;box-shadow:none!important}
#app.page-course.free-lesson-page #lesson-panel .grammar-example-card,#app.page-course.free-lesson-page #lesson-panel .grammar-example-card .syntax-sentence{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
#lesson-panel .reading-speaker-icon{display:inline-flex;width:22px;height:22px;margin-right:8px;vertical-align:-3px;align-items:center;justify-content:center;line-height:1;flex:none;font-size:18px;font-family:"Hiragino Sans",sans-serif;font-weight:700}
.speaker-teal{color:#4b9d95}.speaker-violet{color:#9b79bd}.speaker-amber{color:#ca994a}

/* Grammar: two-color formulas, readable word spacing, content-specific diagrams. */
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card .pattern-content{color:#387b91}
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card .pattern-structure{color:#855cb0}
#app.page-course.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-sentence{column-gap:14px;row-gap:14px;align-items:baseline}
#app.page-course.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-plain{margin-left:-10px}
.grammar-visual-explanation{margin:12px 0 20px;color:#444354}
.grammar-visual-explanation [lang="ja"]{font-size:18px;line-height:2.1;font-weight:650}
.grammar-visual-explanation small{display:block;font-size:12px;line-height:1.7;color:#777181;font-weight:400}
.grammar-visual-explanation small b{display:block;color:#4c4657;font-size:15px;font-weight:500}
.grammar-visual-explanation em{font-style:normal;color:#855cb0;background:#f0e9f8;border-radius:5px;padding:2px 3px}
.grammar-meaning-flow,.grammar-belonging-parts{display:flex;align-items:center;justify-content:center;gap:18px;text-align:center;padding:12px 0}
.grammar-meaning-flow>span{color:#a69ab1}
.grammar-change{padding:8px 16px;border-left:3px solid #d9c9ea}
.grammar-change>span{display:block;color:#a59aaf;margin:2px 0}
.grammar-question-build{padding:8px 16px}
.grammar-addition{display:block;color:#855cb0;margin:4px 0}
.grammar-answer-map{text-align:center;padding:8px 0}
.grammar-answer-branches{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px;border-top:1px solid #e7e0ed;padding-top:12px}
.grammar-answer-branches>div+div{border-left:1px solid #e7e0ed}
.grammar-answer-branches p,.grammar-belonging>p{font-size:13px;margin:3px 0;text-align:center;color:#777181}
.grammar-belonging-parts{gap:12px;flex-wrap:wrap}
.grammar-fox-tip{display:flex;align-items:center;gap:10px;margin-top:18px}
.grammar-fox-tip img{width:46px;height:56px;object-fit:contain;flex-shrink:0}
#app.page-course.free-lesson-page #lesson-panel .grammar-fox-tip p{font-size:13px;line-height:1.8;margin:0;color:#71697c}
#app.page-course.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-particle strong,
#app.page-course.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-ending strong{background:#f0e9f8;border-bottom-color:#aa8bc4;color:#664481}
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card h3{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:4px}
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card .pattern-structure{white-space:nowrap}

/* Keep closing punctuation attached to its word, including flex-based analysis. */
.syntax-with-punctuation{display:inline-flex;align-items:baseline;flex-wrap:nowrap;gap:0;flex-shrink:0}
#app.page-course.free-lesson-page #lesson-panel .syntax-with-punctuation .syntax-plain{margin-left:0!important}
#app.page-course.free-lesson-page #lesson-panel .syntax-with-punctuation .syntax-plain strong{padding-inline:0}
.n5-reading-text{line-break:strict;word-break:normal;overflow-wrap:normal}
.syntax-with-punctuation{white-space:nowrap}
.passage-turn.has-speaker{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:8px;align-items:baseline}
.passage-turn.has-speaker .passage-speaker{grid-column:1;grid-row:1;white-space:nowrap}
.passage-turn.has-speaker .n5-reading-text{grid-column:2;grid-row:1}
.passage-turn.has-speaker .reading-translation{grid-column:2;grid-row:2;margin-top:2px}
.passage-turn:not(.has-speaker) .n5-reading-text,.passage-turn:not(.has-speaker) .reading-translation{grid-column:1/-1}

/* Passage explanations use the relationship in the conversation, not a fixed bubble count. */
.scene-explanation{color:#504a5c;margin-top:16px;font-size:14px;line-height:1.8}
.scene-explanation [lang="ja"]{font-size:17px;font-weight:600;line-height:2.2;word-break:normal;line-break:strict}
.scene-explanation small{display:block;font-size:12px;color:#8b8294}
.scene-explanation p{margin:6px 0 0;font-size:13px;line-height:1.8}
.scene-explanation em{font-style:normal;color:#806399;font-weight:600}
.scene-intro-flow{display:flex;align-items:center;justify-content:space-around;gap:8px;text-align:center}
.scene-intro-flow>span,.scene-context-arrow{color:#b0a1bd}
.scene-return{margin-top:20px;padding-left:12px;border-left:3px solid #c7bbdf}
.scene-links>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:12px 0}
.scene-links b{color:#9269a9;font-size:18px}
.scene-links small{flex-basis:100%;margin-top:-8px}
.scene-response-contrast{margin-top:20px}
.scene-response-contrast h4{font-size:13px;font-weight:600;margin:0 0 12px}
.scene-response-contrast p{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #eee8f1}
.scene-correction{list-style:none;counter-reset:steps;padding:0;margin:0}
.scene-correction li{counter-increment:steps;position:relative;padding:0 0 18px 34px;margin:0}
.scene-correction li:before{content:counter(steps);position:absolute;left:0;top:2px;border-radius:50%;width:22px;height:22px;line-height:22px;text-align:center;color:#8a6ca0;background:#f0eaf6;font-size:12px}
.scene-correction li p{margin:0}
.scene-context{text-align:center;padding:6px 0}
.scene-context-arrow{display:block;margin:8px}
.scene-reassure{background:#edf6f2;border-radius:16px;padding:12px}
.scene-reassure strong{display:block;font-size:15px;color:#517f70;font-weight:600}
.scene-confirmation>span{display:block}
.scene-confirm-answer{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px;padding:12px 0;border-top:1px solid #e9e1ef}
.scene-confirm-answer strong{font-size:14px;color:#7b6192;font-weight:500}
.scene-fox{display:flex;align-items:center;gap:12px;margin-top:20px}
.scene-fox img{width:48px;height:60px;object-fit:contain;flex-shrink:0}
#app.page-course.free-lesson-page #lesson-panel .scene-fox p{margin:0;font-size:13px;line-height:1.8;color:#82758e}

/* Apply the 1.1 visual system to every lesson, including later B1/B2 micro-lessons. */
#app.page-course.free-lesson-page #lesson-panel .lesson-word-list{display:grid;gap:12px;background:transparent;border:0;padding:0}
#app.page-course.free-lesson-page #lesson-panel .lesson-word-list .lesson-word-row{background:#fff;border:1px solid #e9e7f1;border-radius:18px;padding:18px 20px;box-shadow:0 3px 10px #51436d05}
#app.page-course.free-lesson-page #lesson-panel .grammar-explain .grammar-rule-card{padding:18px 20px;background:#fff;border:1px solid #ebe8ef;border-radius:16px;margin:18px 0 14px;box-shadow:none}
#app.page-course.free-lesson-page #lesson-panel .grammar-explain .grammar-rule-card h3{font-size:24px;line-height:1.6;margin:0;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:4px}
#app.page-course.free-lesson-page #lesson-panel .grammar-explain .grammar-example-card{padding:12px 2px 16px;background:transparent;border:0;border-radius:0;margin-bottom:18px;box-shadow:none}
#app.page-course.free-lesson-page #lesson-panel .grammar-example-card .syntax-sentence{column-gap:14px;row-gap:14px;align-items:baseline}
#app.page-course.free-lesson-page #lesson-panel .grammar-example-card .syntax-token strong{font-size:22px;padding:0 4px}
#app.page-course.free-lesson-page #lesson-panel .grammar-example-card .syntax-token small{font-size:10px}
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card .pattern-content{color:#387b91}
#app.page-course.free-lesson-page #lesson-panel .grammar-rule-card .pattern-structure{color:#855cb0;white-space:nowrap}
#app.page-course.free-lesson-page #lesson-panel .continuous-prose .focus-paragraph{border:0;border-radius:0;padding:12px 0 20px;background:transparent}
#app.page-course.free-lesson-page #lesson-panel .continuous-prose .n5-reading-text{line-height:2.4;font-size:19px;margin:0 0 12px}
#app.page-course.free-lesson-page #lesson-panel .continuous-prose .reading-translation{font-size:14px;line-height:1.9;color:#7c8090;margin:0}
#app.page-course.free-lesson-page #lesson-panel .follow-card,#app.page-course.free-lesson-page #lesson-panel .detail-scene{padding:18px;background:#fff;border:1px solid #e6e3ee;border-radius:20px}
#app.page-course.free-lesson-page #lesson-panel .follow-card .n5-reading-text{margin:0 0 12px;font-size:21px;line-height:2.4}
#app.page-course.free-lesson-page #lesson-panel .detail-passage .passage-turn+.passage-turn{margin-top:22px}

/* Same calm 1.1 hierarchy for every course lesson. */
#app.free-lesson-page{background:#f7f8fc!important}
#app.free-lesson-page #lesson-panel .lesson-word-list{gap:0;background:transparent}
#app.free-lesson-page #lesson-panel .lesson-word-list .lesson-word-row{background:transparent;border:0;border-bottom:1px solid #e6e8f0;border-radius:0;box-shadow:none;padding:18px 0;gap:10px}
#app.free-lesson-page #lesson-panel .lesson-word-copy{display:grid;gap:5px;min-width:0;flex:1}
#app.free-lesson-page #lesson-panel .lesson-word-copy strong{font-size:21px;line-height:1.5;font-weight:600;white-space:nowrap;letter-spacing:0}
#app.free-lesson-page #lesson-panel .word-reading{font-size:14px;line-height:1.5;color:#7a8095;white-space:nowrap}
#app.free-lesson-page #lesson-panel .lesson-word-copy small{font-size:14px;line-height:1.6;color:#59627a}
#app.free-lesson-page #lesson-panel .lesson-word-speaker{flex:0 0 38px;width:38px;height:38px;box-shadow:none;background:#eeecf7;border:0}
#app.free-lesson-page #lesson-panel .focus-article{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0}
#app.free-lesson-page #lesson-panel .focus-paragraph{padding:16px 10px;border-radius:8px}
#app.free-lesson-page #lesson-panel .focus-paragraph.current{background:#efedf8}
#app.free-lesson-page #lesson-panel .pilot-reading-title{font-size:22px;line-height:1.6;margin:24px 0 18px;color:#433b60}
#app.free-lesson-page #lesson-panel .pilot-keypoint h3{font-size:27px;line-height:1.5;color:#43365f;margin:8px 0 16px;font-weight:700}
#app.free-lesson-page #lesson-panel .pilot-sentence{padding:12px 0 18px;border-bottom:1px solid #e4e5ee}
#app.free-lesson-page #lesson-panel .pilot-sentence .syntax-sentence{background:transparent;border:0;box-shadow:none;padding:4px 0 12px;gap:7px;margin:8px 0}
#app.free-lesson-page #lesson-panel .pilot-sentence .syntax-token strong{font-size:24px}
#app.free-lesson-page #lesson-panel .pilot-sentence-caption{display:flex;align-items:center;justify-content:space-between;color:#72788b;font-size:14px}
#app.free-lesson-page #lesson-panel:has(.continuous-prose)>.lesson-title{display:none}

/* Vocabulary keeps the compact online card rhythm. Japanese is the anchor;
   reading and gloss use the warm original accent instead of cool blue-gray. */
#app.free-lesson-page #lesson-panel .lesson-word-list{gap:8px}
#app.free-lesson-page #lesson-panel .lesson-word-list .lesson-word-row{background:#fffaf9;border:1px solid #eee4e3;border-radius:14px;padding:9px 14px;box-shadow:none;min-height:58px}
#app.free-lesson-page #lesson-panel .lesson-word-copy strong{color:#2f2d35;font-size:20px}
#app.free-lesson-page #lesson-panel .word-reading{color:#b07a86;font-size:13px}
#app.free-lesson-page #lesson-panel .lesson-word-copy small{color:#a96f79;font-size:14px}
#app.free-lesson-page #lesson-panel .lesson-word-speaker{background:#f7e9ec;color:#b56f7d}
/* Follow-along keeps the text moving while the recording controls stay in reach. */
#lesson-panel .follow-control-dock{position:sticky;bottom:0;z-index:5;margin:12px -2px 0;padding:10px 10px max(10px,env(safe-area-inset-bottom));background:#fffdf9f2;border:1px solid #eee4e3;border-radius:18px;box-shadow:0 -5px 16px #765b5518;backdrop-filter:blur(10px)}
#lesson-panel .follow-control-dock .sentence-actions{justify-content:center;margin:0}
#lesson-panel .follow-control-dock .follow-page-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
#lesson-panel .follow-control-dock .follow-page-actions button{min-height:40px}
/* Follow-along keeps the text moving while the recording controls stay in reach. */
#lesson-panel .follow-control-dock{position:sticky;bottom:0;z-index:5;margin:12px -2px 0;padding:10px 10px max(10px,env(safe-area-inset-bottom));background:#fffdf9f2;border:1px solid #eee4e3;border-radius:18px;box-shadow:0 -5px 16px #765b5518;backdrop-filter:blur(10px)}
#lesson-panel .follow-control-dock .sentence-actions{justify-content:center;margin:0}
#lesson-panel .follow-control-dock .follow-page-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
#lesson-panel .follow-control-dock .follow-page-actions button{min-height:40px}
#lesson-panel .follow-translation.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* 1.1 conversation: compact but clearly separated speech bubbles. */
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph{width:84%;padding:10px 14px;margin:0 0 8px;border-radius:18px;background:#fff;border:1px solid #eee4e3;box-shadow:0 3px 10px #765b550b}
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph:nth-child(even){margin-left:auto;background:#fff8fb}
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph.current{background:#fff3e8}
#app.free-lesson-page #lesson-panel .dialogue-prose .reading-speaker-icon{display:none}
#app.free-lesson-page #lesson-panel .lesson-word-list{gap:12px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card{padding:8px 2px;background:transparent;border:0;border-radius:0;margin-bottom:8px;box-shadow:none}
#lesson-panel .follow-control-dock .sentence-actions{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:62px;position:relative}
#lesson-panel .follow-control-dock .sentence-actions .record-icon{width:56px;height:56px;min-width:56px;border-radius:50%;order:2}
#lesson-panel .follow-control-dock .sentence-actions>[data-action="fl-shadow-demo"]{order:1}
#lesson-panel .follow-control-dock .sentence-actions .sentence-actions-right{order:3;justify-content:flex-end}
#lesson-panel .follow-control-dock .sentence-record-state{position:absolute;left:50%;bottom:0;transform:translateX(-50%);pointer-events:none}
#lesson-panel .follow-control-dock .follow-page-actions{display:flex;justify-content:space-between;align-items:center}
#lesson-panel .follow-control-dock .follow-page-actions .follow-step{width:auto;min-width:72px;padding:8px 12px;border-radius:14px;font-size:13px;line-height:1.3}
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph.speaker-yui{margin-right:auto;margin-left:0;background:#fff8fb}
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph.speaker-mina{margin-left:auto;margin-right:0;background:#f7f2ff}
#app.free-lesson-page #lesson-panel .dialogue-prose .focus-paragraph.speaker-saki{margin-left:8%;margin-right:8%;background:#f1faf4}
#app.free-lesson-page #lesson-panel .reading-romaji{margin:-4px 0 8px;padding-left:2px;color:#9b8791;font-size:12px;letter-spacing:.04em;line-height:1.5}
#app.free-lesson-page #lesson-panel .reading-speaker-label{font-size:.76em;font-weight:650;margin-right:6px;white-space:nowrap}
#app.free-lesson-page #lesson-panel .reading-speaker-label.speaker-teal{color:#4b9d95}
#app.free-lesson-page #lesson-panel .reading-speaker-label.speaker-violet{color:#9b79bd}
#app.free-lesson-page #lesson-panel .reading-speaker-label.speaker-amber{color:#ca994a}
#app.free-lesson-page #lesson-panel .lesson-word-list{display:grid;gap:12px}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-hero-card{padding:16px 18px;background:#fff;border:1px solid #e7dfd8;border-radius:16px;box-shadow:0 3px 12px #8c6c5510}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-hero-card .grammar-rule-card{margin:0 0 12px;padding:0;background:transparent;border:0;box-shadow:none}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-hero-card .grammar-example-card{padding:0;background:transparent;border:0;box-shadow:none}
#lesson-panel[data-lesson="B1-C001"] .grammar-hero-card{background:#fff!important;border:1px solid #e7dfd8!important;border-radius:16px!important;padding:16px 18px!important}
#lesson-panel[data-lesson="B1-C001"] .pilot-visual-grammar{background:#fff!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-hero-card .grammar-rule-card,#lesson-panel[data-lesson="B1-C001"] .grammar-hero-card .grammar-example-card{background:transparent!important;border:0!important;box-shadow:none!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-slot{color:#8c69a9!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-particle{color:#2f2d35!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-noun strong{color:#8c69a9!important;background:#f2eafa!important;border-bottom-color:#b99bd2!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-particle strong,#lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-ending strong{color:#2f2d35!important;background:#f5f5f5!important;border-bottom-color:#555!important}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-list{display:grid!important;gap:2px!important}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-row{margin-top:0!important}
#lesson-panel[data-lesson="B1-C001"] .word-reading{color:#654f57!important}
#lesson-panel[data-lesson="B1-C001"] .lesson-word-copy small{color:#59484d!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-example-card .syntax-noun strong{color:var(--syntax-ink,#28343c)!important;background:var(--syntax-fill,#eaf5fb)!important;border-bottom-color:var(--syntax-line,#69b6dc)!important}

/* Reading feedback: keep every dialogue line on one clean left edge and make
   the sentence currently being spoken unmistakable. */
#app.free-lesson-page #lesson-panel .continuous-prose .focus-paragraph{
  width:100%;
  margin:0 0 6px!important;
  padding:10px 12px!important;
  box-sizing:border-box;
  border-radius:14px!important;
  text-align:left!important;
  background:#fff!important;
  border:1px solid transparent!important;
}
#app.free-lesson-page #lesson-panel .continuous-prose .focus-paragraph.current{
  background:#f7e9f0!important;
  border-color:#e4bfd0!important;
  box-shadow:0 3px 10px #b8759130;
}
#app.free-lesson-page #lesson-panel .continuous-prose .focus-paragraph.current .n5-reading-text{
  border-left:3px solid #b87591!important;
  padding-left:10px!important;
}
#app.free-lesson-page #lesson-panel .continuous-prose .reading-speaker-label{
  display:inline-block;
  margin-right:7px;
  text-align:left;
}
/* The formula card is the visual anchor; only A/B are purple, particles stay black. */
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .grammar-pattern-line .pattern-slot{
  color:#8c69a9!important;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .grammar-pattern-line .pattern-particle{
  color:#2f2d35!important;
}
/* Keep the formula colors stable even for older cached markup. */
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-content,
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-slot{color:#8c69a9!important}
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-structure,
#lesson-panel[data-lesson="B1-C001"] .grammar-rule-card .pattern-particle{color:#2f2d35!important}

/* Follow controls stay anchored while the passage scrolls behind them. */
#app.free-lesson-page #lesson-panel:has(.follow-control-dock){padding-bottom:170px!important}
#app.free-lesson-page #lesson-panel .follow-control-dock{
  position:fixed!important;
  left:50%;
  bottom:0;
  width:min(calc(100vw - 24px),680px);
  margin:0!important;
  transform:translateX(-50%);
  z-index:30;
  border-radius:18px 18px 0 0;
  padding-bottom:max(12px,env(safe-area-inset-bottom));
}
/* Grammar explanation is always visible; the learner should never have to unlock it. */
#app.free-lesson-page #lesson-panel .grammar-explain-open{display:block!important}
#app.free-lesson-page #lesson-panel .grammar-explain-open>h2{margin:0 0 14px;font-size:16px;color:#5b4c67}

/* Keep the follow dock in the lesson flow while pinning it to the visible bottom. */
#app.free-lesson-page #lesson-panel .follow-control-dock{
  position:sticky!important;
  left:auto;
  bottom:0;
  width:auto;
  transform:none;
  margin:14px -2px 0!important;
  z-index:30;
}
#app.free-lesson-page #lesson-panel .follow-control-dock .sentence-icon{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1;
}
/* Open grammar explanation: clean white base with colored syntax pieces. */
#app.free-lesson-page #lesson-panel .grammar-explain-open{
  background:#fff!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
#app.free-lesson-page #lesson-panel .grammar-explain-open .grammar-rule-card{
  background:#fff!important;
  border:1px solid #e7dfd8!important;
  border-radius:16px!important;
}
#app.free-lesson-page #lesson-panel .grammar-explain-open .grammar-example-card{
  background:#fffafc!important;
  border:0!important;
  border-radius:14px!important;
  padding:14px!important;
}
#app.free-lesson-page #lesson-panel .grammar-explain-open .grammar-parts>span:nth-child(3n+1){background:#f2eafa!important}
#app.free-lesson-page #lesson-panel .grammar-explain-open .grammar-parts>span:nth-child(3n+2){background:#eaf6f4!important}
#app.free-lesson-page #lesson-panel .grammar-explain-open .grammar-parts>span:nth-child(3n){background:#fff1d9!important}
/* The dock is a sibling of the scrolling text, anchored by the lesson layout. */
#app.free-lesson-page .lesson-dock:has(#follow-dock){position:relative!important;flex:none!important;padding:10px 18px max(12px,env(safe-area-inset-bottom))!important;margin:0!important;max-width:none;width:100%;background:#fff}
#follow-dock .follow-control-dock{position:static!important;width:100%;transform:none!important;margin:0!important;padding:6px 8px;background:#fff;border:0;box-shadow:none}
#follow-dock .sentence-actions{display:grid;grid-template-columns:1fr 64px 1fr;align-items:center;justify-items:center;position:relative;min-height:70px}
#follow-dock .sentence-actions-right{margin:0}
#follow-dock .record-icon{width:64px;height:64px;border-radius:50%!important;background:#ca90a8;color:#fff;box-shadow:0 0 0 5px #f5e6ed}
#follow-dock .sentence-record-state{position:absolute;bottom:0;left:50%;transform:translateX(-50%)}
#follow-dock .follow-page-actions{display:flex;justify-content:space-between;margin-top:8px}
#follow-dock .follow-step{padding:8px 16px;color:#765e8b}
#app.free-lesson-page #lesson-panel .focus-article .focus-paragraph{border:0!important;background:transparent!important;padding:12px!important;margin:0 0 4px;border-radius:14px;box-shadow:none!important}
#app.free-lesson-page #lesson-panel .focus-article .focus-paragraph.current{background:#f2dce6!important}
#app.free-lesson-page #lesson-panel .focus-article .n5-reading-text{border:0!important;padding:0!important;margin:0!important}
#app.free-lesson-page #lesson-panel .passage-turn.has-speaker{display:grid;grid-template-columns:3em minmax(0,1fr);gap:0 6px;align-items:baseline}
#app.free-lesson-page #lesson-panel .passage-turn .passage-speaker{grid-column:1;white-space:nowrap}
#app.free-lesson-page #lesson-panel .passage-turn .n5-reading-text,#app.free-lesson-page #lesson-panel .passage-turn .reading-translation{grid-column:2;min-width:0;text-align:left}
#app.free-lesson-page #lesson-panel .grammar-explain-open{background:transparent!important;border:0!important;padding:0!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero{background:#fff;border:1px solid #e6e1eb;border-radius:20px;padding:20px 16px;margin:16px 0}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .grammar-rule-card,#app.free-lesson-page #lesson-panel .grammar-lesson-hero .grammar-example-card{background:transparent!important;border:0!important;padding:0!important;margin:0!important;box-shadow:none!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .grammar-rule-card{padding-bottom:22px!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .pattern-content{color:#655e72!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .pattern-structure{color:#986480!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .syntax-noun strong{color:#376c80!important;background:#e9f4f7!important;border-color:#7db6c7!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .syntax-particle strong{color:#987047!important;background:#fcf1dd!important;border-color:#d9b878!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .syntax-ending strong{color:#8f5f85!important;background:#f3e8f1!important;border-color:#c795bd!important}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .syntax-sentence{column-gap:12px;row-gap:16px}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .pilot-sentence-caption{display:flex;align-items:center;justify-content:space-between;margin-top:16px;color:#706476}

/* Keep the original soft round controls, independent of passage height. */
#app.free-lesson-page .lesson-dock:has(#follow-dock){border-radius:0!important;padding:12px 18px max(14px,env(safe-area-inset-bottom))!important;bottom:0}
#follow-dock .sentence-icon{border-radius:50%!important;width:44px;height:44px;background:#f2edf5;color:#927f9f}
#follow-dock .sentence-icon.record-icon{width:64px;height:64px;background:#ca90a8;color:#fff}
#follow-dock .follow-page-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
#follow-dock .follow-step{min-height:42px;border:1px solid #e7dce9;border-radius:16px;background:#fff;font-size:14px}
#follow-dock .follow-step:last-child{background:#e99db7;color:#fff;border-color:#e99db7}
#app.page-course.free-lesson-page #lesson-panel .detail-passage{background:#fff;border:1px solid #e8e3ec;border-radius:20px;padding:20px 16px;margin-bottom:20px}

/* Published textbook-sized B1 lessons read as one article with a few paragraphs. */
#app.free-lesson-page #lesson-panel .lesson-word-list{gap:8px!important}
#app.free-lesson-page #lesson-panel .lesson-word-list .lesson-word-row{margin:0!important}
#app.free-lesson-page #lesson-panel .published-article{background:#fff;border:1px solid #eae5ec;border-radius:20px;padding:12px 18px;box-shadow:0 5px 18px #68507c09}
#app.free-lesson-page #lesson-panel .published-article .article-paragraph{padding:12px 0}
#app.free-lesson-page #lesson-panel .published-article .article-paragraph+.article-paragraph{margin-top:14px;padding-top:8px}
#app.free-lesson-page #lesson-panel .published-article .focus-paragraph{padding:4px 8px!important;margin:0!important}
#app.free-lesson-page #lesson-panel .published-article .focus-paragraph.current{background:#ead7e2!important}
#app.free-lesson-page #lesson-panel .published-article .n5-reading-text{font-size:18px;line-height:2.1}
#app.free-lesson-page #lesson-panel .published-detail-passage .passage-turn+.passage-turn{margin-top:12px}
#app.free-lesson-page #lesson-panel .published-detail-focus{border:0;background:#f7f2fa;border-radius:18px;padding:18px;margin-bottom:22px}
#app.free-lesson-page #lesson-panel .published-detail-focus .detail-focus-label{display:block;font-size:12px;color:#9077a2;margin-bottom:8px}

/* The JLPT course level sits beside the headword without adding a fourth row. */
#app.free-lesson-page #lesson-panel .lesson-word-copy strong{display:flex;align-items:baseline;gap:9px}
#app.free-lesson-page #lesson-panel .lesson-word-level{display:inline-block;flex:0 0 auto;padding:2px 6px;border-radius:6px;background:#f2ebf5;color:#806b91;font-size:10px;font-style:normal;font-weight:650;line-height:1.2;letter-spacing:.02em;vertical-align:middle}
#app.free-lesson-page #lesson-panel .published-detail-focus h3{font-size:20px;color:#684c82;margin:0 0 12px}
#app.free-lesson-page #lesson-panel .published-detail-focus .detail-focus-tips p{margin:7px 0;line-height:1.7;color:#4d4657}
#app.free-lesson-page #lesson-panel .published-grammar-tips{display:grid;gap:8px;margin:14px 0 20px}
#app.free-lesson-page #lesson-panel .published-grammar-tips p{margin:0;padding:11px 14px;border-left:3px solid #c8a9d6;background:#faf6fb;border-radius:0 12px 12px 0;line-height:1.65;color:#534b5d}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .article-paragraph+.article-paragraph{border:0;margin-top:8px}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .focus-paragraph{display:block!important;padding:5px 8px!important;margin:0!important;border:0!important}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .passage-turn,#app.free-lesson-page #lesson-panel .published-article.continuous-prose .n5-reading-text{display:block!important}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .focus-paragraph::after{content:none}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .focus-paragraph.current .n5-reading-text{border:0!important;padding:0!important}
#app.free-lesson-page #lesson-panel .published-article .n5-reading-text{font-size:17px!important;line-height:2.05!important;text-wrap:balance}
#app.free-lesson-page #lesson-panel .published-detail-passage .n5-reading-text{font-size:17px!important;line-height:2.05!important;text-wrap:balance}
#app.free-lesson-page #lesson-panel:not([data-lesson="B1-C001"]) .follow-card .n5-reading-text{font-size:17px!important;line-height:2.05!important;text-wrap:balance}
#app.free-lesson-page #lesson-panel .published-article .article-paragraph{padding:8px 0}

/* Chapter 1 keeps the full reading visible as a compact conversation.  The
   speaker occupies its own column, so wrapped text stays aligned with text. */
#app.free-lesson-page #lesson-panel[data-lesson="B1-C003"]:has(.continuous-prose)>.lesson-title,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C006"]:has(.continuous-prose)>.lesson-title{display:block!important}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C003"] .published-article.continuous-prose .passage-turn.has-speaker,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C006"] .published-article.continuous-prose .passage-turn.has-speaker{
  display:grid!important;grid-template-columns:3.5em minmax(0,1fr);column-gap:5px;align-items:start;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C003"] .published-article.continuous-prose .passage-turn.has-speaker .n5-reading-text,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C006"] .published-article.continuous-prose .passage-turn.has-speaker .n5-reading-text{
  grid-column:2;grid-row:1;display:block!important;text-wrap:wrap;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C003"] .published-article.continuous-prose .article-paragraph,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C006"] .published-article.continuous-prose .article-paragraph{padding:5px 0}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C003"] .published-article.continuous-prose .focus-paragraph,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C006"] .published-article.continuous-prose .focus-paragraph{padding:4px 7px!important}
#app.free-lesson-page #lesson-panel .published-detail-point+.published-detail-point{border-top:1px solid #eaddec;margin-top:12px;padding-top:12px}
#app.free-lesson-page #lesson-panel .published-detail-point h3{margin:0 0 5px}
#app.free-lesson-page #lesson-panel .published-detail-point p{margin:0;line-height:1.65;color:#4d4657}

/* A dialogue stays readable as one article: the speaker has a fixed gutter,
   and every wrapped Japanese line begins at the same text edge. */
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .passage-turn.has-speaker{
  display:grid!important;
  grid-template-columns:3.4em minmax(0,1fr);
  column-gap:6px;
  align-items:start;
}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .passage-turn.has-speaker .passage-speaker{
  grid-column:1;
  grid-row:1;
}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .passage-turn.has-speaker .n5-reading-text{
  grid-column:2;
  grid-row:1;
  display:block!important;
  text-wrap:wrap!important;
}
#app.free-lesson-page #lesson-panel .published-article .n5-reading-text,
#app.free-lesson-page #lesson-panel .published-detail-passage .n5-reading-text{
  text-wrap:wrap!important;
}
#app.free-lesson-page #lesson-panel .published-article .article-paragraph{
  padding:4px 0;
}
#app.free-lesson-page #lesson-panel .published-article.continuous-prose .focus-paragraph{
  padding:3px 8px!important;
}
#app.free-lesson-page #lesson-panel:not([data-lesson="B1-C001"]) .follow-card .passage-turn+.passage-turn{
  margin-top:10px;
}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .pattern-content{
  color:#805aa0!important;
}
#app.free-lesson-page #lesson-panel .grammar-lesson-hero .pattern-structure{
  color:#393440!important;
}
#app.free-lesson-page #lesson-panel .published-grammar-tips{
  gap:3px;
  margin:12px 0 24px;
}
#app.free-lesson-page #lesson-panel .published-grammar-tips p{
  position:relative;
  padding:5px 2px 5px 17px;
  border:0;
  border-radius:0;
  background:transparent;
  line-height:1.65;
}
#app.free-lesson-page #lesson-panel .published-grammar-tips p::before{
  content:"";
  position:absolute;
  top:1em;
  left:2px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#bd92ca;
}

/* Lesson 2: a natural scene, with reading cues outside the artwork. */
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-picture{
  margin:4px 0 22px;padding:12px;background:#fff;
  border:1px solid #eae3ee;border-radius:20px;
  box-shadow:0 6px 22px #67516d0b;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-picture-title{
  margin:2px 3px 11px;font-size:14px;line-height:1.45;
  font-weight:700;color:#4d4057;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-art{
  display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;
  border-radius:14px;background:#faf5f8;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;margin:11px 0 10px;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key>div{
  min-width:0;padding:8px 3px 7px;text-align:center;border-radius:10px;
  background:#fff1f4;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key>div:nth-child(2){background:#eef9f8}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key>div:nth-child(3){background:#f3effb}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key small,
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key span{
  display:block;font-size:10px;line-height:1.4;color:#776e79;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key strong{
  display:block;margin:3px 0;font-size:16px;line-height:1.3;color:#5e435b;white-space:nowrap;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-key-two{grid-template-columns:repeat(2,minmax(0,1fr))}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-takeaway{
  margin:0 2px 9px;font-size:12px;line-height:1.65;color:#605965;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-scene-takeaway b{color:#7b527c}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-picture-question{
  display:flex;align-items:center;gap:10px;padding:7px 11px;
  border-radius:10px;background:#f7f2fa;color:#665b6a;
  font-size:12px;line-height:1.4;
}
#app.free-lesson-page #lesson-panel[data-lesson="B1-C002"] .grammar-picture-question strong{
  font-size:16px;color:#77538b;white-space:nowrap;
}
#app.free-lesson-page #lesson-panel .grammar-visual-explanation>.sr-only{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Keep Book1 recording controls visible without a separate row for Stop. */
#app.free-lesson-page .book1-recording-speed-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
#app.free-lesson-page .reading-rate-control{display:flex;align-items:center;gap:2px;font-size:12px}
#app.free-lesson-page .book1-recording-speed-row .text-button,#app.free-lesson-page .reading-rate-control .text-button{min-width:44px;min-height:44px;padding:6px;font-size:13px}
#app.free-lesson-page .reading-rate-control [aria-pressed=true]{color:#4f548f;background:#eeedff;border-radius:10px;font-weight:700}
#app.free-lesson-page .book1-recording-player .reading-settings{padding-top:0}
#app.free-lesson-page .book1-recording-player #lesson-audio-status{display:block;text-align:center;font-size:12px;line-height:20px}
