.phrase-lesson{--lesson-ink:#f5eee4;--lesson-muted:#c9beae;--lesson-gold:#f4d9a2}
.lesson-wrap{width:min(1064px,calc(100% - 40px));margin:auto}
.lesson-hero{padding:135px 0 45px}.lesson-hero h1{font-size:clamp(2.65rem,6vw,5rem);line-height:1.03;letter-spacing:-.045em;margin:12px 0 16px;max-width:13ch}
.lesson-kicker{color:var(--lesson-gold);font-weight:700;font-size:.8rem;letter-spacing:.12em;text-transform:uppercase}
.lesson-title-ja{color:var(--lesson-muted);font-size:1.05rem;margin:0 0 15px;line-height:1.7}.lesson-intro{font-size:1.08rem;line-height:1.75;max-width:69ch;color:var(--lesson-muted)}
.lesson-quick{border:1px solid #544b3d;border-radius:20px;padding:24px;background:#151412;margin-bottom:24px}.lesson-quick h2{font-size:1.4rem;margin:0 0 7px;letter-spacing:0}.lesson-quick>p{margin:0 0 18px;color:var(--lesson-muted);font-size:.9rem}
.quick-phrases{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.quick-phrase{padding:13px;border:1px solid #50483b;border-radius:12px;background:#201c16;text-decoration:none}.quick-phrase:hover{background:#2c2419}.quick-phrase b,.quick-phrase span{display:block;overflow-wrap:anywhere}.quick-phrase b{font-size:.91rem;line-height:1.5;color:var(--lesson-gold)}.quick-phrase span{font-size:1.02rem;line-height:1.6;margin-top:5px;color:var(--lesson-ink)}
.lesson-controls{position:sticky;top:77px;z-index:40;background:#11100ff2;border:1px solid #4c453a;border-radius:16px;padding:16px;margin-bottom:22px;backdrop-filter:blur(12px)}
.lesson-control-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.lesson-direction{display:flex;gap:6px;flex-wrap:wrap}.lesson-direction button,.lesson-clear{border:1px solid #655a47;border-radius:9px;background:#211e18;color:var(--lesson-ink);padding:10px 13px;font:inherit;font-size:.9rem;min-height:44px;cursor:pointer}.lesson-direction button[aria-pressed=true]{background:#f2d7a4;color:#211a10;border-color:#f2d7a4;font-weight:750}.lesson-explanations{display:flex;align-items:center;gap:9px;font-size:.9rem;color:var(--lesson-muted);min-height:44px}.lesson-explanations input{width:19px;height:19px;accent-color:#f2d7a4}
.lesson-search-row{display:flex;align-items:center;gap:8px;margin-top:12px}.lesson-search-row input{min-width:0;flex:1;width:100%;min-height:46px;border:1px solid #655a47;border-radius:9px;background:#080808;color:var(--lesson-ink);font:inherit;padding:11px 13px}.lesson-search-label{display:block;font-size:.8rem;color:var(--lesson-muted);margin-top:10px}.lesson-search-row .lesson-clear{flex-shrink:0}.lesson-result-count{color:var(--lesson-muted);font-size:.82rem;margin:9px 0 0;min-height:1.4em}
.lesson-jumps{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}.lesson-jumps a{padding:7px 11px;border:1px solid #50483b;border-radius:999px;min-height:36px;display:inline-flex;align-items:center;font-size:.83rem;line-height:1.35;color:var(--lesson-gold);text-decoration:none}.lesson-jumps a:hover{background:#282219}
.lesson-preface{padding:8px 0 25px}.lesson-preface details{border-bottom:1px solid #413a30;padding:13px 0}.lesson-preface summary{cursor:pointer;font-size:1rem;font-weight:650;min-height:44px;line-height:1.5;display:list-item}.lesson-preface p,.lesson-preface li{color:var(--lesson-muted);font-size:.94rem;line-height:1.8}.lesson-preface ul{padding-left:21px}
.phrase-section{margin:35px 0 48px;scroll-margin-top:260px}.phrase-section>h2{font-size:clamp(1.6rem,3vw,2.25rem);line-height:1.3;letter-spacing:-.02em;margin:0 0 7px}.section-ja{color:var(--lesson-muted);margin:0 0 22px;font-size:.95rem}
.phrase-card{border:1px solid #504637;border-radius:20px;padding:26px;margin:18px 0;background:linear-gradient(140deg,#191612,#11100f);scroll-margin-top:275px;min-width:0}.phrase-card header{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}.phrase-number{width:34px;height:34px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:#36291a;color:#f4d9a2;font-weight:700;font-size:.85rem}.phrase-card h3{font-size:1.23rem;letter-spacing:0;line-height:1.5;margin:0;color:var(--lesson-ink)}.phrase-card .card-title-ja{font-size:.88rem;color:var(--lesson-muted);line-height:1.6;margin:4px 0 0}
.phrase-body{min-width:0}.phrase-card.has-illustration .phrase-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,300px);align-items:start;gap:26px}.phrase-language-pair{display:flex;flex-direction:column;gap:6px}.phrase-english{font-size:1.08rem;line-height:1.65;color:var(--lesson-gold);margin:0;order:0}.phrase-japanese{font-family:'Yu Gothic UI','Hiragino Sans','Meiryo',sans-serif;font-size:clamp(1.6rem,3.3vw,2.15rem);font-weight:750;line-height:1.6;color:var(--lesson-ink);overflow-wrap:anywhere;margin:0;order:1}.phrase-romaji{font-size:1.02rem;color:var(--lesson-muted);line-height:1.75;overflow-wrap:anywhere;margin:0;order:2}.phrase-lesson[data-direction=ja-en] .phrase-japanese{order:0}.phrase-lesson[data-direction=ja-en] .phrase-romaji{order:1}.phrase-lesson[data-direction=ja-en] .phrase-english{order:2}
.phrase-illustration{margin:0}.phrase-illustration img{display:block;width:100%;max-width:100%;height:auto;object-fit:contain;border-radius:14px;background:#e9e0d1}.phrase-illustration figcaption{font-size:11px;line-height:15px;color:var(--lesson-muted);margin-top:6px}
.phrase-notes{margin-top:19px;border-top:1px solid #42392c;padding-top:13px}.phrase-notes summary{font-size:.91rem;color:var(--lesson-gold);font-weight:650;cursor:pointer;min-height:42px;line-height:1.6;display:list-item}.phrase-notes p{font-size:.96rem;color:var(--lesson-muted);line-height:1.8;margin:12px 0}.phrase-word-notes{margin:15px 0 0}.phrase-word-notes dt{font-weight:750;color:var(--lesson-ink);font-size:1rem;margin:15px 0 4px}.phrase-word-notes dt span{font-weight:400;color:var(--lesson-gold);font-size:.88rem;margin-left:8px}.phrase-word-notes dd{margin:0;color:var(--lesson-muted);font-size:.9rem;line-height:1.8}.phrase-word-notes dd[lang=ja]{margin-top:6px}
.phrase-source-links{font-size:.8rem;color:var(--lesson-muted);line-height:1.7;margin:15px 0 0}.phrase-source-links a{color:var(--lesson-gold)}
.jiro-meaning{border-left:3px solid #b77c32;background:#292015;padding:15px 17px;border-radius:0 12px 12px 0;margin-top:19px}.jiro-meaning strong{color:#ffe1aa;font-size:.98rem}.jiro-meaning p{color:#eee0c9;font-size:.94rem;line-height:1.8;margin:8px 0 0}.phrase-related{margin-top:14px;font-size:.86rem;line-height:1.7;color:var(--lesson-gold)}
.lesson-empty{padding:26px;background:#211b13;border:1px solid #655239;border-radius:14px;margin:25px 0}.lesson-empty h2{font-size:1.2rem;letter-spacing:0;margin:0 0 10px}.lesson-empty p{color:var(--lesson-muted);font-size:.96rem;line-height:1.7}
.lesson-sources{border-top:1px solid #524634;padding:28px 0 42px}.lesson-sources>h2{font-size:1.35rem;letter-spacing:0}.lesson-sources details{padding:16px 0;border-bottom:1px solid #423a30}.lesson-sources summary{cursor:pointer;color:var(--lesson-gold);line-height:1.6;font-weight:650;min-height:44px}.lesson-sources p{font-size:.9rem;line-height:1.8;color:var(--lesson-muted)}.lesson-closing{padding:10px 0 55px}.lesson-closing p{color:var(--lesson-muted);line-height:1.8}.phrase-lesson .plan-fab{position:static;width:max-content;max-width:calc(100% - 32px);margin:22px auto}
.phrase-lesson :is(button,input,a,summary):focus-visible{outline:3px solid #ffe1aa;outline-offset:4px}.phrase-card[hidden],.phrase-section[hidden],.jp-explanation[hidden],.lesson-empty[hidden]{display:none!important}
.phrase-course-entry{border:1px solid #756044;border-radius:20px;padding:28px;background:linear-gradient(135deg,#2b2115,#15120e);margin:8px 0 38px}.phrase-course-entry h2{font-size:clamp(1.6rem,3vw,2.3rem);line-height:1.25;margin:9px 0 12px;letter-spacing:-.02em}.phrase-course-entry p{color:#d5c9b5;line-height:1.75;max-width:70ch}.guide-group{margin-bottom:45px}.guide-group>h2{font-size:1.7rem;letter-spacing:-.02em;margin:0 0 20px}.phrase-guide-link{margin:25px 0;padding:18px;border-left:3px solid #d8ae70;background:#1c1711;color:#ddcfb9;line-height:1.8}.phrase-guide-link a{color:#f5d29c}
@media(max-width:650px){.lesson-wrap{width:calc(100% - 32px)}.lesson-hero{padding-top:110px;padding-bottom:28px}.lesson-hero h1{font-size:2.8rem}.lesson-intro{font-size:1rem}.lesson-quick{padding:18px}.quick-phrases{grid-template-columns:1fr}.quick-phrase{padding:11px 13px}.quick-phrase b{font-size:.91rem}.quick-phrase span{font-size:1.02rem}.lesson-controls{top:64px;padding:13px}.lesson-direction{gap:6px}.lesson-direction button{font-size:.79rem;padding:9px 10px}.lesson-explanations{font-size:.83rem}.lesson-control-row{gap:4px}.lesson-jumps{gap:7px}.lesson-jumps a{font-size:.78rem;padding:7px 9px}.lesson-search-row input{font-size:16px;padding:10px;min-height:44px}.lesson-clear{font-size:.8rem;padding:10px}.phrase-card{padding:19px 17px;border-radius:16px;scroll-margin-top:320px}.phrase-section{scroll-margin-top:310px}.phrase-card.has-illustration .phrase-body{grid-template-columns:1fr;gap:20px}.phrase-card h3{font-size:1.12rem}.phrase-japanese{font-size:1.68rem;line-height:1.65}.phrase-english{font-size:1rem}.phrase-romaji{font-size:.96rem}.phrase-notes p{font-size:.92rem}.phrase-lesson .footer-grid{grid-template-columns:minmax(0,1fr);gap:24px}.phrase-course-entry{padding:20px}}
@media(prefers-reduced-motion:reduce){.phrase-lesson *{scroll-behavior:auto!important}}
@media(max-width:650px){.lesson-controls{position:static}.phrase-card,.phrase-section{scroll-margin-top:95px}}
.lesson-back-to-search{display:inline-flex;min-height:44px;align-items:center;font-size:.85rem;color:#f4d9a2;margin-top:6px}

.phrase-lesson .phrase-card,.phrase-lesson .phrase-section{scroll-margin-top:var(--lesson-scroll-offset,350px)}
