
/* source: inline-1 */

:root{
  --ink:#17211f;
  --muted:#69716f;
  --faint:#929896;
  --line:#e5e8e6;
  --line-strong:#cfd6d2;
  --accent:#214f77;
  --accent-soft:#edf4f8;
  --paper:#fff;
  --sans:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","Noto Sans JP","Hiragino Sans",Arial,sans-serif;
  --serif:"Noto Serif TC","Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",Georgia,serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.8;text-rendering:optimizeLegibility}
a{color:inherit}
button,a{touch-action:manipulation}
button{font:inherit}
.site-skip{position:absolute;left:16px;top:-80px;z-index:1000;background:#111;color:#fff;padding:10px 14px;text-decoration:none}
.site-skip:focus{top:12px}
.site-nav{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
.site-nav-inner{width:min(1120px,calc(100% - 40px));min-height:72px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}
.site-brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}
.site-mark{width:40px;height:40px;display:grid;place-items:center;position:relative;background:linear-gradient(145deg,#2f73a8,#245d8c);border:1px solid #174b74;color:#fff;font:700 22px/1 var(--serif);box-shadow:4px 4px 0 #d9e8f3,0 5px 14px rgba(25,74,111,.13),inset 0 1px 0 rgba(255,255,255,.24);flex:0 0 auto;transition:transform .22s ease,box-shadow .22s ease,background-color .22s ease}
.site-brand:hover .site-mark{transform:translate(-1px,-2px);box-shadow:6px 6px 0 #d9e8f3,0 9px 18px rgba(25,74,111,.17),inset 0 1px 0 rgba(255,255,255,.3)}
.site-brand:focus-visible{outline:3px solid rgba(33,79,119,.22);outline-offset:5px}
.site-brand strong{display:block;font:600 17px/1.25 var(--serif)}
.site-brand small{display:block;color:var(--faint);font-size:10px;line-height:1.3;margin-top:3px;white-space:nowrap}
.site-links{display:flex;align-items:center;gap:20px;font-size:13px;font-weight:600;white-space:nowrap}
.site-links a{--nav-color:#555f5c;position:relative;text-decoration:none;color:#555f5c;padding:8px 1px;transition:color .2s ease}
.site-links a::after{content:"";position:absolute;left:0;right:0;bottom:1px;height:2px;background:var(--nav-color);transform:scaleX(0);transform-origin:left;transition:transform .2s ease}
.site-links .nav-japanese{--nav-color:#214f77}
.site-links .nav-learning{--nav-color:#2f776c}
.site-links .nav-travel{--nav-color:#b27b00}
.site-links .nav-tools{--nav-color:#343b3a}
.site-links a[aria-current="page"]{color:var(--nav-color);font-weight:800}
.site-links a[aria-current="page"]::after{transform:scaleX(1)}
.site-links a:hover,.site-links a:focus-visible{color:var(--nav-color)}
.site-links a:hover::after,.site-links a:focus-visible::after{transform:scaleX(1)}
.page{width:min(820px,calc(100% - 40px));margin:0 auto;padding:58px 0 84px}
.article-head{padding-bottom:36px;border-bottom:1px solid var(--line-strong)}
.eyebrow{margin:0 0 18px;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
.article-head h1{margin:0;font:700 clamp(48px,9vw,86px)/1.02 var(--serif);letter-spacing:-.045em;color:#17201e}
.article-head h1 .alt{display:block;margin-top:10px;color:#416d8e;font-size:.42em;letter-spacing:-.01em}
.meaning{margin:28px 0 0;font:500 clamp(20px,3vw,27px)/1.65 var(--serif);color:#343c3a}
.article-tools{margin-top:28px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.meta{display:flex;gap:8px 18px;flex-wrap:wrap;color:var(--faint);font-size:12px}
.meta a{text-decoration:none;color:#687a83}
.tool-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.tool-btn,.text-link{min-height:42px;border:1px solid var(--line-strong);background:#fff;color:#34413e;padding:8px 12px;display:inline-flex;align-items:center;gap:7px;text-decoration:none;cursor:pointer;border-radius:0}
.tool-btn:hover,.text-link:hover{border-color:#83938d;background:#fbfcfb}
.tool-btn:focus-visible,.text-link:focus-visible,.example-action:focus-visible,.site-links a:focus-visible,.related a:focus-visible{outline:3px solid rgba(33,79,119,.24);outline-offset:3px}
.icon{width:17px;height:17px;display:inline-block}
.section{padding:54px 0;border-bottom:1px solid var(--line)}
.section:last-of-type{border-bottom:0}
.section-kicker{margin-bottom:10px;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.17em;text-transform:uppercase}
.section h2{margin:0 0 20px;font:700 clamp(27px,4vw,38px)/1.3 var(--serif);letter-spacing:-.02em}
.section-intro{margin:0 0 30px;color:#4f5956;font-size:16px;line-height:1.9}
/* V2 final review: low-saturation information colors. The page stays white, but each learning function has a visual role. */
.section-core{margin-top:30px;padding:38px 32px 40px;background:#f4f8fb;border:1px solid #dce8ef;border-left:4px solid #557f9d}
.section-core .section-kicker{color:#315f82}
.section-core .fact-grid{border-top-color:#cfdde5}
.section-core .fact{border-bottom-color:#dce6eb}
.section-core .fact:nth-child(even){border-left-color:#d5e1e7}
.section-connection .formula{padding:18px 20px 20px;background:#f5f7f8;border-top-color:#58758a}
.section-connection .note{padding:16px 18px;background:#f3f7f8;border-top-color:#dce5e8;border-left-color:#86a4b2}
.section-examples .examples{border-top:0}
.section-examples .example{margin:0 0 16px;padding:28px 24px 30px;background:#fffaf0;border:1px solid #f0e6cf}
.section-examples .example:last-child{margin-bottom:0;padding-bottom:30px}
.section-examples .example-action:hover{background:#fff4da}
.section-examples .insight{margin-top:16px;padding:11px 12px 11px 14px;background:#f1f7f5;border-top:0;border-left:2px solid #8eb1a6;color:#586964}
.section-examples .insight strong{color:#3f7164}
.section-nuance{padding:40px 32px 42px;background:#f2f7f5;border:1px solid #dce9e4;border-left:4px solid #6f9b8d}
.section-nuance .section-kicker{color:#4b7b6d}
.section-nuance .quote{background:rgba(255,255,255,.62);padding:14px 18px;border-left-color:#5d8f81}
.section-compare .compare{background:#fbfcfd}
.section-compare .compare-head{background:#eef4f8;color:#244b68}
.section-compare .compare-label{background:#f7f9fa}
.section-compare .compare-row:nth-child(n+2) .compare-text:nth-child(2){background:#f7fafc}
.section-compare .compare-row:nth-child(n+2) .compare-text:nth-child(3){background:#fafafa}
.core-lead{margin:0 0 30px;font:600 clamp(20px,3vw,27px)/1.65 var(--serif);color:#263b4a}
.fact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line-strong)}
.fact{padding:18px 20px 20px 0;border-bottom:1px solid var(--line)}
.fact:nth-child(odd){padding-right:28px}
.fact:nth-child(even){padding-left:28px;border-left:1px solid var(--line)}
.fact-label{display:block;margin-bottom:7px;color:var(--faint);font-size:11px;font-weight:800;letter-spacing:.12em}
.fact-value{font-size:16px;line-height:1.75;color:#26302e}
.fact-value strong{color:var(--accent)}
.formula-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:38px;margin-top:32px}
.formula{padding-top:16px;border-top:2px solid #405c70}
.formula-type{font-size:12px;color:var(--faint);font-weight:700;letter-spacing:.08em}
.formula-main{margin:8px 0 10px;font:700 20px/1.65 var(--serif);color:#263a48}
.formula-main strong{color:var(--accent)}
.formula-examples{display:flex;flex-wrap:wrap;gap:7px 15px;color:#545e5b;font-size:15px}
.formula-examples span+span::before{content:"·";margin-right:15px;color:#b5bbb8}
.note{margin-top:30px;padding:18px 0 0 18px;border-top:1px solid var(--line);border-left:3px solid #92aab7;color:#4b5653}
.note strong{display:block;margin-bottom:4px;color:#263b4a;font-size:12px;letter-spacing:.12em}
.examples{border-top:1px solid var(--line-strong)}
.example{position:relative;padding:34px 0 38px;border-bottom:1px solid var(--line)}
.example:last-child{border-bottom:0;padding-bottom:0}
.example-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:15px}
.example-label{display:flex;align-items:baseline;gap:13px;min-width:0}
.example-num{font:500 25px/1 var(--serif);color:#99a19e;min-width:30px}
.example-tag{font-size:11px;color:#667c87;letter-spacing:.08em;font-weight:700}
.example-actions{display:flex;gap:6px;flex:0 0 auto}
.example-action{width:42px;height:42px;border:0;background:transparent;color:#6b7773;display:grid;place-items:center;cursor:pointer}
.example-action:hover{background:#f5f7f6;color:var(--accent)}
.jp{margin:0;font-family:"Noto Sans JP","Yu Gothic","Hiragino Kaku Gothic ProN",var(--sans);font-size:clamp(20px,2.7vw,24px);font-weight:500;line-height:2;color:#17211f}
.jp .grammar{color:var(--accent);font-weight:800}
ruby{ruby-position:over}
rt{font-size:.58em;line-height:1;color:#8e9693;font-weight:400;user-select:none}
.hide-furigana rt{display:none}
.translation{margin:12px 0 0;color:#495451;font-size:15px;line-height:1.85}
.insight{margin:16px 0 0;padding-top:14px;border-top:1px dashed #e0e4e2;color:#65706d;font-size:14px;line-height:1.85}
.insight strong{color:#456879;font-size:11px;letter-spacing:.1em;margin-right:8px}
.deep-copy{font-size:16px;color:#404a47;line-height:2}
.deep-copy p{margin:0 0 22px}
.deep-copy p:last-child{margin-bottom:0}
.quote{margin:28px 0;padding:4px 0 4px 20px;border-left:3px solid #416d8e;font:600 18px/1.9 var(--serif);color:#293c48}
.compare{margin-top:28px;border-top:1px solid var(--line-strong)}
.compare-row{display:grid;grid-template-columns:150px 1fr 1fr;border-bottom:1px solid var(--line)}
.compare-row>div{padding:15px 18px}
.compare-row>div+div{border-left:1px solid var(--line)}
.compare-label{padding-left:0!important;color:#8a9390;font-size:12px;font-weight:700;letter-spacing:.08em}
.compare-head{font-weight:800;color:#263b4a;background:#fbfcfc}
.compare-text{font-size:14px;line-height:1.8;color:#4e5956}
.related{padding:50px 0 0}
.related h2{margin:0 0 8px;font:700 26px/1.3 var(--serif)}
.related-intro{margin:0 0 22px;color:var(--faint);font-size:13px}
.related ul{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.related li{border-bottom:1px solid var(--line)}
.related a{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 0;text-decoration:none}
.related a:hover .related-title{text-decoration:underline;text-underline-offset:4px}
.related-title{font-weight:650}
.related-meta{color:#9aa19f;font-size:11px;white-space:nowrap}
.footer{border-top:0;background:#121817;color:#e7ece9}
.footer-inner{width:min(1120px,calc(100% - 40px));margin:auto;padding:38px 0 44px;font-size:12px}
.footer-links{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:14px}
.footer-links a{text-decoration:none;color:#d7dfdb}
.footer-links a:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}
.footer-copy{color:#8f9b96}
.toast{position:fixed;left:50%;bottom:24px;z-index:100;transform:translate(-50%,16px);background:#17211f;color:#fff;padding:10px 15px;font-size:13px;opacity:0;pointer-events:none;transition:.2s ease}
.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:700px){
  body{font-size:15px;line-height:1.85}
  .site-nav-inner{width:calc(100% - 28px);min-height:64px;gap:12px}
  .site-mark{width:35px;height:35px;font-size:19px;box-shadow:3px 3px 0 #d9e8f3,0 4px 10px rgba(25,74,111,.11)}
  .site-brand strong{font-size:14px}
  .site-brand small{display:none}
  .site-links{gap:11px;font-size:11px}
  .page{width:calc(100% - 32px);padding:42px 0 68px}
  .article-head{padding-bottom:30px}
  .eyebrow{margin-bottom:14px}
  .article-head h1{font-size:52px;line-height:1.03}
  .article-head h1 .alt{font-size:.43em;margin-top:9px}
  .meaning{margin-top:22px;font-size:20px;line-height:1.7}
  .article-tools{align-items:flex-start;margin-top:22px}
  .tool-actions{width:100%}
  .tool-btn,.text-link{flex:1 1 auto;justify-content:center;min-height:44px;padding:8px 10px;font-size:13px}
  .section{padding:42px 0}
  .section h2{font-size:29px;margin-bottom:18px}
  .section-intro{font-size:15px;margin-bottom:24px}
  .core-lead{font-size:20px;margin-bottom:22px}
  .fact-grid{display:block}
  .fact,.fact:nth-child(odd),.fact:nth-child(even){padding:16px 0 17px;border-left:0}
  .fact-label{margin-bottom:5px}
  .fact-value{font-size:15px}
  .formula-grid{grid-template-columns:1fr;gap:28px;margin-top:25px}
  .formula-main{font-size:18px}
  .formula-examples{font-size:14px;gap:5px 12px}
  .formula-examples span+span::before{margin-right:12px}
  .note{margin-top:25px;padding:16px 0 0 14px;font-size:14px}
  .example{padding:29px 0 32px}
  .example-head{margin-bottom:11px;gap:12px}
  .example-num{font-size:22px;min-width:26px}
  .example-tag{font-size:10px}
  .example-action{width:40px;height:40px}
  .jp{font-size:20px;line-height:2.05}
  .translation{font-size:14.5px;margin-top:10px}
  .insight{font-size:13.5px;line-height:1.8}
  .deep-copy{font-size:15px;line-height:1.95}
  .deep-copy p{margin-bottom:18px}
  .quote{margin:22px 0;padding-left:15px;font-size:17px}
  .compare{border-top:1px solid var(--line-strong)}
  .compare-row{display:block;border-bottom:1px solid var(--line)}
  .compare-row.compare-header{display:none}
  .compare-row>div{padding:0;border:0}
  .compare-label{padding:22px 0 9px!important;color:#7c8783;font-size:11px;letter-spacing:.14em;text-transform:uppercase}
  .compare-text{padding:15px 0 17px!important;font-size:14.5px;line-height:1.85}
  .compare-text+.compare-text{border-top:1px dotted #dfe4e1}
  .compare-text::before{content:attr(data-compare);display:block;margin-bottom:6px;color:#214f77;font-size:12px;font-weight:800;letter-spacing:.01em}
  .compare-text[data-compare="〜くても"]::before{color:#59635f}
  .compare-text.jp::before{font-family:var(--sans);line-height:1.4}
  .compare-text.jp{font-size:18px;line-height:2}
  .related{padding-top:42px}
  .related a{display:block;padding:15px 0}
  .related-meta{display:block;margin-top:4px;white-space:normal}
  .footer-inner{width:calc(100% - 32px);padding:30px 0 36px}
}
@media(max-width:390px){
  .site-brand strong{display:none}
  .site-links{gap:10px}
  .article-head h1{font-size:48px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


/* ===== FINAL REVIEW V3: Editorial grammar layout ===== */
:root{--editorial-line:#dfe5e2;--editorial-line-strong:#c7d1cd;--editorial-quiet:#6f7b77}
.page{width:min(960px,calc(100% - 48px));padding-top:50px}
.article-head{padding-bottom:38px;border-bottom:1px solid var(--editorial-line-strong)}
.article-head h1{letter-spacing:-.045em}
.meaning{max-width:740px}
.reading-index{display:flex;align-items:center;gap:0;border-bottom:1px solid var(--editorial-line);margin:0 0 2px;overflow-x:auto;scrollbar-width:none}
.reading-index::-webkit-scrollbar{display:none}
.reading-index a{flex:0 0 auto;padding:15px 20px 14px 0;margin-right:24px;color:#74817c;text-decoration:none;font-size:11px;font-weight:750;letter-spacing:.04em;white-space:nowrap;border-bottom:2px solid transparent}
.reading-index a:hover,.reading-index a:focus-visible{color:var(--accent);border-bottom-color:#8faabc;outline:none}
.section{position:relative;margin:0;padding:58px 0 62px;border-bottom:1px solid var(--editorial-line);background:#fff!important;border-left:0!important;border-right:0!important;border-top:0!important;box-shadow:none!important;border-radius:0!important}
.section:last-of-type{border-bottom:0}
.section-kicker{margin:0 0 12px;color:var(--accent)!important;font-size:10px;font-weight:800;letter-spacing:.15em;text-transform:uppercase}
.section h2{margin:0 0 24px;font:700 clamp(27px,3.6vw,37px)/1.3 var(--serif);letter-spacing:-.025em}
.section-intro{max-width:760px}
.section-core{margin-top:0!important;padding-top:60px!important}
.core-lead{max-width:760px;margin:0 0 34px!important;padding:2px 0 2px 22px!important;border-left:3px solid #557f9d!important;background:transparent!important;color:#26332f!important;font:600 19px/1.9 var(--serif)!important}
.fact-grid{display:grid!important;grid-template-columns:1fr 1fr;border-top:1px solid var(--editorial-line-strong)!important;background:transparent!important}
.fact{min-height:0!important;padding:20px 22px 21px 0!important;border:0!important;border-bottom:1px solid var(--editorial-line)!important;background:transparent!important;border-radius:0!important}
.fact:nth-child(even){padding-left:28px!important;border-left:1px solid var(--editorial-line)!important}
.fact-label{color:#7b8783!important;font-size:10px!important;letter-spacing:.1em!important}
.fact-value{margin-top:6px;color:#2b3733!important;font-size:15px;line-height:1.85}
.formula-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:0!important;border-top:1px solid var(--editorial-line-strong)!important;border-bottom:1px solid var(--editorial-line-strong)!important;background:transparent!important}
.formula{padding:24px 28px 26px 0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.formula+.formula{padding-left:30px!important;border-left:1px solid var(--editorial-line)!important}
.formula-type{color:#76827e!important;font-size:11px!important;letter-spacing:.08em}
.formula-main{margin-top:8px!important;font-size:16px!important}
.formula-examples{margin-top:16px!important;padding-top:14px!important;border-top:1px solid #edf0ee!important}
.note{margin-top:26px!important;padding:18px 0 0 20px!important;border:0!important;border-left:2px solid #a7b8c2!important;background:transparent!important;border-radius:0!important;color:#4c5955!important}
.examples{border-top:1px solid var(--editorial-line-strong)!important;background:transparent!important}
.example{padding:30px 0 32px!important;border:0!important;border-bottom:1px solid var(--editorial-line)!important;background:#fff!important;border-radius:0!important;box-shadow:none!important}
.example-head{margin-bottom:16px!important}
.example-num{color:var(--accent)!important;font:700 13px/1 var(--serif)!important}
.example-tag,.example-label{background:transparent!important;border:0!important;color:#82908b!important;padding:0!important;border-radius:0!important}
.jp{font-size:clamp(20px,2.4vw,25px)!important;line-height:2!important;color:#15201d!important}
.jp .grammar,.grammar{background:linear-gradient(transparent 70%,#dceaf3 70%)!important;color:#163f60!important;padding:0 1px!important;border:0!important}
.translation{margin-top:8px!important;color:#66716d!important;font-size:14px!important}
.insight{margin-top:14px!important;padding:12px 0 0 18px!important;border:0!important;border-left:2px solid #d5ddda!important;background:transparent!important;border-radius:0!important;color:#65716d!important}
.example-action{border:0!important;background:transparent!important;color:#5b7585!important;padding:6px!important}
.deep-copy{max-width:780px!important}
.deep-copy p{margin:0 0 20px!important;color:#384541!important;font-size:16px!important;line-height:2!important}
.quote{margin:28px 0!important;padding:3px 0 3px 24px!important;border:0!important;border-left:3px solid #557f9d!important;background:transparent!important;border-radius:0!important;font:600 19px/1.9 var(--serif)!important;color:#25332f!important}
.compare{border-top:1px solid var(--editorial-line-strong)!important;border-bottom:1px solid var(--editorial-line-strong)!important;background:transparent!important;border-radius:0!important;overflow:visible!important}
.compare-head,.compare-row{display:grid!important;grid-template-columns:150px 1fr 1fr!important;border:0!important;border-bottom:1px solid var(--editorial-line)!important;background:#fff!important}
.compare-row:last-child{border-bottom:0!important}
.compare-head>* , .compare-row>*{padding:17px 18px!important;border:0!important;background:transparent!important}
.compare-head>*+*,.compare-row>*+*{border-left:1px solid #edf0ee!important}
.compare-label{color:#74807c!important;font-size:11px!important;letter-spacing:.06em!important}
.compare-header{font-weight:750!important;color:#2b3934!important}
.compare-text{color:#485550!important}
.related{padding-top:56px!important;background:#fff!important}
@media(min-width:901px){
  .section{padding-left:72px}
  .section-kicker{position:absolute;left:0;top:66px;width:54px;line-height:1.55;letter-spacing:.09em}
  .section-core .section-kicker{top:68px}
}
@media(max-width:700px){
  .page{width:calc(100% - 32px);padding-top:38px}
  .reading-index{margin-left:-16px;margin-right:-16px;padding-left:16px}
  .reading-index a{padding-top:13px;padding-bottom:12px;margin-right:18px}
  .section{padding:42px 0 46px!important}
  .section-kicker{position:static!important;width:auto!important;margin-bottom:9px}
  .core-lead{font-size:17px!important;line-height:1.85!important;padding-left:16px!important;margin-bottom:26px!important}
  .fact-grid{display:block!important}
  .fact,.fact:nth-child(even){padding:16px 0!important;border-left:0!important}
  .formula-grid{display:block!important}
  .formula,.formula+.formula{padding:20px 0 22px!important;border-left:0!important}
  .formula+.formula{border-top:1px solid var(--editorial-line)!important}
  .example{padding:25px 0 27px!important}
  .jp{font-size:20px!important}
  .quote{font-size:17px!important;padding-left:17px!important}
  .compare{border-top:0!important;border-bottom:0!important}
  .compare-head{display:none!important}
  .compare-row{display:block!important;padding:20px 0!important;border-top:1px solid var(--editorial-line-strong)!important}
  .compare-row>*{padding:4px 0!important;border-left:0!important}
  .compare-label{display:block!important;margin-bottom:8px!important;color:var(--accent)!important}
}

/* ===== FINAL REVIEW V4: compact editorial + persistent grammar identity ===== */
@media(min-width:701px){
  .page{width:min(1080px,calc(100% - 64px));padding-top:34px}
  .article-head{padding-bottom:28px}
  .article-head h1{font-size:clamp(52px,6vw,72px)}
  .article-head h1 .alt{margin-top:5px}
  .meaning{margin-top:18px;font-size:clamp(20px,2.2vw,25px)}
  .article-tools{margin-top:20px}
  .reading-index a{padding-top:12px;padding-bottom:11px}
  .section{padding-top:40px;padding-bottom:44px}
  .section-core{padding-top:42px!important}
  .section h2{margin-bottom:17px}
  .core-lead{margin-bottom:22px!important;line-height:1.75!important}
  .fact{padding-top:15px!important;padding-bottom:16px!important}
  .formula-grid{margin-top:22px}
  .formula{padding-top:18px!important;padding-bottom:19px!important}
  .note{margin-top:20px!important}
  .example{padding-top:23px!important;padding-bottom:25px!important}
  .section-intro{margin-bottom:21px}
  .deep-copy p{margin-bottom:15px!important;line-height:1.85!important}
  .quote{margin:20px 0!important}
  .compare{margin-top:20px}
  .related{padding-top:42px!important}
  .section{padding-left:90px}
  .section-kicker{top:47px;width:68px}
  .section-core .section-kicker{top:49px}
}
.grammar-identity{
  position:fixed;left:0;right:0;top:72px;z-index:46;
  background:rgba(255,255,255,.97);border-bottom:1px solid var(--editorial-line-strong);
  box-shadow:0 7px 18px rgba(23,33,31,.055);backdrop-filter:blur(12px);
  opacity:0;transform:translateY(-8px);pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.grammar-identity.show{opacity:1;transform:translateY(0);pointer-events:auto}
.grammar-identity-inner{width:min(1080px,calc(100% - 64px));min-height:58px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}
.grammar-id-copy{display:flex;align-items:baseline;gap:12px;min-width:0;white-space:nowrap}
.grammar-id-name{font:700 20px/1.2 var(--serif);color:#173f60;letter-spacing:-.02em}
.grammar-id-meaning{overflow:hidden;text-overflow:ellipsis;color:#66716d;font-size:12px}
.grammar-id-links{display:flex;align-items:center;gap:18px;white-space:nowrap}
.grammar-id-links a{color:#6f7b77;text-decoration:none;font-size:11px;font-weight:750}
.grammar-id-links a:hover,.grammar-id-links a.is-active{color:var(--accent)}
.grammar-mobile-dock{display:none}
.section,[id$="-title"]{scroll-margin-top:148px}
@media(max-width:700px){
  body{padding-bottom:calc(54px + env(safe-area-inset-bottom))}
  .site-nav{position:relative;top:auto}
  .page{padding-top:30px}
  .article-head{padding-bottom:24px}
  .article-head h1{font-size:46px}
  .meaning{margin-top:17px;font-size:20px;line-height:1.65}
  .article-tools{margin-top:20px}
  .reading-index{display:none}
  .section{padding-top:36px!important;padding-bottom:39px!important}
  .section h2{margin-bottom:16px}
  .grammar-identity{top:0;z-index:75}
  .grammar-identity-inner{width:100%;min-height:55px;padding:8px 16px;display:block}
  .grammar-id-copy{display:block;line-height:1.15;white-space:normal}
  .grammar-id-name{display:block;font-size:15px;line-height:1.2}
  .grammar-id-meaning{display:block;margin-top:3px;font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .grammar-id-links{display:none}
  .grammar-mobile-dock{position:fixed;left:0;right:0;bottom:0;z-index:74;display:flex;align-items:stretch;background:rgba(255,255,255,.98);border-top:1px solid var(--editorial-line-strong);box-shadow:0 -8px 22px rgba(23,33,31,.07);padding-bottom:env(safe-area-inset-bottom);opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s ease}
  .grammar-mobile-dock.show{opacity:1;transform:none;pointer-events:auto}
  .grammar-mobile-dock a,.grammar-mobile-dock button{min-width:0;min-height:46px;flex:1 1 0;border:0;border-right:1px solid #e8ecea;background:#fff;color:#68746f;text-decoration:none;display:flex;align-items:center;justify-content:center;padding:0 5px;font-size:10.5px;font-weight:750;white-space:nowrap}
  .grammar-mobile-dock a.is-active{background:var(--accent-soft);color:var(--accent)}
  .grammar-mobile-dock button{flex:0 0 43px;border-right:0;color:var(--accent);font-size:17px;cursor:pointer}
  .section,[id$="-title"]{scroll-margin-top:68px}
}


/* ===== FINAL REVIEW V5: compact rhythm + one-line desktop reading header ===== */
.grammar-header-copy,.grammar-header-links{display:none}
.nuance-highlight{background:linear-gradient(transparent 68%,#fff0a8 68%,#fff0a8 91%,transparent 91%);box-decoration-break:clone;-webkit-box-decoration-break:clone;padding:0 .04em}
.section-nuance .quote{border:0!important;padding:0!important;background:transparent!important;color:#25332f!important}
@media(min-width:701px){
  .article-head{padding-bottom:22px}
  .page{padding-top:28px}
  .reading-index a{padding-top:10px;padding-bottom:9px}
  .section{padding-top:30px!important;padding-bottom:34px!important}
  .section-core{padding-top:32px!important}
  .section h2{margin-bottom:13px!important}
  .section-intro{margin-bottom:16px!important}
  .core-lead{margin-bottom:17px!important}
  .fact{padding-top:12px!important;padding-bottom:13px!important}
  .formula-grid{margin-top:15px!important}
  .formula{padding-top:14px!important;padding-bottom:15px!important}
  .note{margin-top:15px!important;padding-top:13px!important}
  .example{padding-top:18px!important;padding-bottom:20px!important}
  .example-head{margin-bottom:11px!important}
  .deep-copy p{margin-bottom:12px!important;line-height:1.78!important}
  .quote{margin:14px 0!important}
  .compare{margin-top:14px!important}
  .related{padding-top:32px!important}
  .section{padding-left:82px!important}
  .section-kicker{top:35px!important;width:64px!important}
  .section-core .section-kicker{top:36px!important}
  .grammar-identity{display:none!important}
  .site-nav.reading-mode .site-brand>span:last-child{display:none}
  .site-nav.reading-mode .site-brand{gap:0;flex:0 0 auto}
  .site-nav.reading-mode .site-links{display:none}
  .site-nav.reading-mode .grammar-header-copy{display:flex;align-items:baseline;gap:10px;min-width:0;flex:1;margin-left:4px;white-space:nowrap}
  .site-nav.reading-mode .grammar-header-name{font:700 20px/1.15 var(--serif);color:#173f60;letter-spacing:-.02em}
  .site-nav.reading-mode .grammar-header-divider{color:#c0c9c5;font-size:13px}
  .site-nav.reading-mode .grammar-header-meaning{overflow:hidden;text-overflow:ellipsis;color:#66716d;font-size:12px}
  .site-nav.reading-mode .grammar-header-links{display:flex;align-items:center;gap:20px;white-space:nowrap}
  .site-nav.reading-mode .grammar-header-links a{position:relative;color:#6f7b77;text-decoration:none;padding:9px 0;font-size:11px;font-weight:760}
  .site-nav.reading-mode .grammar-header-links a:hover,.site-nav.reading-mode .grammar-header-links a.is-active{color:var(--accent)}
  .site-nav.reading-mode .grammar-header-links a.is-active::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:2px;background:var(--accent)}
  .section,[id$="-title"]{scroll-margin-top:90px!important}
}
@media(max-width:700px){
  .section{padding-top:30px!important;padding-bottom:32px!important}
  .section h2{margin-bottom:12px!important}
  .section-intro{margin-bottom:17px!important}
  .core-lead{margin-bottom:20px!important}
  .example{padding-top:20px!important;padding-bottom:21px!important}
  .deep-copy p{margin-bottom:14px!important;line-height:1.82!important}
  .quote{margin:15px 0!important}
  .grammar-id-name{font-size:18px!important;font-weight:700!important}
  .grammar-id-meaning{font-size:13px!important;margin-top:2px!important}
  .grammar-identity-inner{min-height:59px!important;padding:8px 16px!important}
}


.theme-toggle{width:38px;height:38px;flex:0 0 38px;border:1px solid var(--line-strong);background:transparent;color:var(--accent);display:grid;place-items:center;cursor:pointer;padding:0;transition:background-color .18s ease,border-color .18s ease,color .18s ease}
.theme-toggle:hover,.theme-toggle:focus-visible{background:var(--accent-soft);border-color:#91aabd;outline:none}
.theme-icon{grid-area:1/1;font-size:20px;line-height:1}.theme-sun{display:none}html[data-theme="dark"] .theme-moon{display:none}html[data-theme="dark"] .theme-sun{display:block}
html[data-theme="dark"]{color-scheme:dark}
@media(max-width:767px){.theme-toggle{width:34px;height:34px;flex-basis:34px}.theme-icon{font-size:18px}}


/* 文法：桌機以章節用途分色，手機維持閱讀優先 */
@media(min-width:901px){
  .page{padding-top:34px!important}
  .section{margin:0 0 20px!important;padding:30px 30px 32px 104px!important;border:1px solid transparent!important;border-top-width:3px!important}
  .section-core{background:#f4f8fc!important;border-color:#d8e5ef!important;border-top-color:#6f95b1!important}
  .section-connection{background:#f3f9f7!important;border-color:#d8e8e2!important;border-top-color:#739b8d!important}
  .section-examples{background:#fffaf1!important;border-color:#eee1c8!important;border-top-color:#c6a566!important}
  .section-nuance{background:#fffdf6!important;border-color:#ece4cc!important;border-top-color:#c7ad63!important}
  .section-compare{background:#f7f5fa!important;border-color:#e2ddeb!important;border-top-color:#8c7ca3!important}
  .section-kicker{top:34px!important;left:28px!important;width:66px!important}
  .section h2{margin-bottom:10px!important}
  .section-intro{margin-bottom:20px!important}
  .section+.section{margin-top:20px!important}
  .formula{background:rgba(255,255,255,.62)!important}
  .section-examples .example{background:rgba(255,255,255,.70)!important;border-color:#eadfc9!important;padding:20px 22px 22px!important;margin-bottom:12px!important}
  .section-examples .insight{background:#f4f8f5!important}
  .section-compare .compare-head,.section-compare .compare-row{background:rgba(255,255,255,.58)!important}
}
.nuance-highlight{background:linear-gradient(transparent 67%,#f7df7a 67%,#f7df7a 91%,transparent 91%)!important}
/* 日夜 */
html[data-theme="dark"]{--ink:#e7eeeb;--muted:#aab6b1;--faint:#84918c;--line:#293431;--line-strong:#3a4743;--accent:#7fb0d2;--accent-soft:#1a2b36;--paper:#121817}
html[data-theme="dark"] body{background:#101514;color:var(--ink)}
html[data-theme="dark"] .site-nav{background:rgba(16,21,20,.96);border-bottom-color:#2c3834}
html[data-theme="dark"] .site-brand strong,html[data-theme="dark"] .article-head h1,html[data-theme="dark"] .section h2,html[data-theme="dark"] .jp{color:#edf3f0!important}
html[data-theme="dark"] .site-brand small,html[data-theme="dark"] .lead,html[data-theme="dark"] .section-intro,html[data-theme="dark"] .grammar-header-meaning,html[data-theme="dark"] .grammar-id-meaning{color:#9eaaa5!important}
html[data-theme="dark"] .article-head{border-bottom-color:#33403c}
html[data-theme="dark"] .grammar-header-name,html[data-theme="dark"] .grammar-id-name{color:#9dcced!important}
html[data-theme="dark"] .grammar-mobile-dock{background:rgba(17,23,22,.98);border-top-color:#33403c;box-shadow:0 -8px 22px rgba(0,0,0,.24)}
html[data-theme="dark"] .grammar-mobile-dock a,html[data-theme="dark"] .grammar-mobile-dock button{background:#111716;color:#aab6b1;border-right-color:#2d3935}
html[data-theme="dark"] .grammar-mobile-dock a.is-active{background:#1a2b36;color:#9dcced}
html[data-theme="dark"] .formula,html[data-theme="dark"] .note,html[data-theme="dark"] .example,html[data-theme="dark"] .compare-head,html[data-theme="dark"] .compare-row{color:#dfe8e4}
html[data-theme="dark"] .nuance-highlight{background:linear-gradient(transparent 67%,rgba(215,174,61,.55) 67%,rgba(215,174,61,.55) 91%,transparent 91%)!important}
html[data-theme="dark"] .related{border-color:#2c3834}
html[data-theme="dark"] .footer{background:#0d1110;border-top-color:#222b28}
@media(min-width:901px){
 html[data-theme="dark"] .section-core{background:#15212a!important;border-color:#263d4c!important;border-top-color:#6f9aba!important}
 html[data-theme="dark"] .section-connection{background:#16231f!important;border-color:#294039!important;border-top-color:#6e9a8c!important}
 html[data-theme="dark"] .section-examples{background:#241f16!important;border-color:#423723!important;border-top-color:#b99b5e!important}
 html[data-theme="dark"] .section-nuance{background:#211f17!important;border-color:#3d3828!important;border-top-color:#bea75f!important}
 html[data-theme="dark"] .section-compare{background:#201c27!important;border-color:#3a3245!important;border-top-color:#8e7ba4!important}
 html[data-theme="dark"] .formula,html[data-theme="dark"] .section-examples .example,html[data-theme="dark"] .section-compare .compare-head,html[data-theme="dark"] .section-compare .compare-row{background:rgba(255,255,255,.035)!important;border-color:rgba(255,255,255,.08)!important}
 html[data-theme="dark"] .section-examples .insight{background:#17221d!important;color:#afbbb5!important}
}
@media(max-width:900px){
 .section{background:transparent!important;border-left:0!important;border-right:0!important}
 .section-core,.section-connection,.section-examples,.section-nuance,.section-compare{border-top:2px solid color-mix(in srgb,var(--accent) 28%,transparent)!important}
 html[data-theme="dark"] .section{background:transparent!important;border-bottom-color:#2a3532!important}
}
/* 動態閱讀 Header 保留單行並放置日夜切換 */
@media(min-width:901px){.site-nav.reading-mode .theme-toggle{margin-left:4px}.site-nav.reading-mode .site-nav-inner{gap:14px}}



/* source: v7-final-overrides */

/* Header alignment */
@media(min-width:768px){
  .site-nav-inner{width:min(1180px,calc(100% - 64px))!important}
  .site-links{margin-left:auto!important}
  .theme-toggle{margin-left:18px!important}
}
@media(min-width:901px){
  .site-nav.reading-mode .grammar-header-copy{flex:1 1 auto!important}
  .site-nav.reading-mode .grammar-header-links{margin-left:auto!important}
  .site-nav.reading-mode .theme-toggle{margin-left:16px!important}
}
/* Dark mode: every reading layer stays legible */
html[data-theme="dark"] body{background:#101514!important;color:#e7eeeb!important}
html[data-theme="dark"] .site-links a{color:#aebbb6!important}
html[data-theme="dark"] .site-links .nav-japanese[aria-current="page"]{color:#8ec5ec!important}
html[data-theme="dark"] .site-links .nav-learning:hover{color:#83c5b6!important}
html[data-theme="dark"] .site-links .nav-travel:hover{color:#dfbf70!important}
html[data-theme="dark"] .site-links .nav-tools:hover{color:#d2dbd7!important}
html[data-theme="dark"] .theme-toggle{color:#9dcced!important;border-color:#42514c!important;background:#141b19!important}
html[data-theme="dark"] .article-head h1,
html[data-theme="dark"] .section h2,
html[data-theme="dark"] .core-lead,
html[data-theme="dark"] .fact-value,
html[data-theme="dark"] .formula-main,
html[data-theme="dark"] .formula-examples,
html[data-theme="dark"] .note,
html[data-theme="dark"] .jp,
html[data-theme="dark"] .translation,
html[data-theme="dark"] .deep-copy,
html[data-theme="dark"] .quote,
html[data-theme="dark"] .compare-text,
html[data-theme="dark"] .related a{color:#e4ece8!important}
html[data-theme="dark"] .meaning{color:#cdd8d3!important}
html[data-theme="dark"] .fact-label,
html[data-theme="dark"] .formula-type,
html[data-theme="dark"] .example-tag,
html[data-theme="dark"] .compare-label,
html[data-theme="dark"] .section-kicker{color:#9dcced!important}
html[data-theme="dark"] .grammar-header-meaning,
html[data-theme="dark"] .grammar-id-meaning,
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .insight,
html[data-theme="dark"] .meta{color:#aebbb6!important}
html[data-theme="dark"] .tool-btn,
html[data-theme="dark"] .text-link{background:#151c1a!important;color:#dce5e1!important;border-color:#3d4a46!important}
html[data-theme="dark"] .reading-index a,
html[data-theme="dark"] .grammar-header-links a,
html[data-theme="dark"] .grammar-id-links a{color:#a6b3ae!important}
html[data-theme="dark"] .reading-index a:hover,
html[data-theme="dark"] .reading-index a:focus-visible,
html[data-theme="dark"] .grammar-header-links a:hover,
html[data-theme="dark"] .grammar-header-links a.is-active{color:#9dcced!important}
html[data-theme="dark"] .site-nav.reading-mode .grammar-header-name,
html[data-theme="dark"] .grammar-id-name{color:#a8d3f0!important}
html[data-theme="dark"] .section-nuance .quote{color:#e4ece8!important}
html[data-theme="dark"] .compare-text[data-compare="〜くても"]::before{color:#b9c5c0!important}
/* Desktop section color remains soft and readable */
@media(min-width:901px){
  .section{box-shadow:0 1px 0 rgba(31,55,66,.02)!important}
  .section-core{background:#f5f9fc!important}
  .section-connection{background:#f4faf8!important}
  .section-examples{background:#fffbf3!important}
  .section-nuance{background:#fffdf7!important}
  .section-compare{background:#f8f6fb!important}
}
/* Mobile: reference-book density, not exhibition spacing */
@media(max-width:700px){
  body{font-size:15px!important;line-height:1.72!important}
  .page{padding-top:24px!important}
  .article-head{padding-bottom:20px!important}
  .article-head h1{font-size:44px!important}
  .meaning{font-size:18px!important;line-height:1.55!important;margin-top:14px!important}
  .article-tools{margin-top:16px!important}
  .section{padding-top:25px!important;padding-bottom:27px!important}
  .section h2{font-size:24px!important;line-height:1.35!important;margin-bottom:10px!important}
  .section-kicker{margin-bottom:8px!important;font-size:9.5px!important}
  .section-intro{font-size:14.5px!important;line-height:1.72!important;margin-bottom:13px!important}
  .core-lead{font-size:16px!important;line-height:1.72!important;margin-bottom:14px!important;padding-left:14px!important}
  .fact{padding:10px 0 11px!important}
  .fact-label{font-size:10px!important;margin-bottom:3px!important}
  .fact-value{font-size:14.5px!important;line-height:1.72!important}
  .formula-grid{gap:16px!important;margin-top:12px!important}
  .formula{padding:12px 0 13px!important}
  .formula-type{font-size:10.5px!important;margin-bottom:5px!important}
  .formula-main{font-size:16px!important;line-height:1.7!important}
  .formula-examples{font-size:13px!important;line-height:1.65!important;margin-top:7px!important}
  .note{margin-top:14px!important;padding:12px 0 0 12px!important;font-size:13.5px!important;line-height:1.7!important}
  .example{padding:17px 0 18px!important}
  .example-head{margin-bottom:7px!important}
  .example-num{font-size:19px!important}
  .jp{font-size:18px!important;line-height:1.82!important}
  .translation{font-size:14px!important;line-height:1.72!important;margin-top:7px!important}
  .insight{font-size:13px!important;line-height:1.68!important;margin-top:8px!important}
  .deep-copy{font-size:14.5px!important;line-height:1.76!important}
  .deep-copy p{margin-bottom:11px!important}
  .quote{font-size:15.5px!important;line-height:1.75!important;margin:11px 0!important}
  .compare-label{padding:13px 0 6px!important;font-size:10.5px!important}
  .compare-text{padding:9px 0 10px!important;font-size:14px!important;line-height:1.7!important}
  .compare-text.jp{font-size:16px!important;line-height:1.72!important}
  .grammar-identity-inner{min-height:58px!important;padding:7px 16px!important}
  .grammar-id-name{font-size:18px!important;line-height:1.15!important}
  .grammar-id-meaning{font-size:13px!important;line-height:1.25!important;margin-top:3px!important}
  .grammar-mobile-dock a,.grammar-mobile-dock button{min-height:44px!important}
}


/* source: v8-final-fixes */


/* Final dark-reading polish: deep charcoal, never pure black. */
@media(min-width:768px){
  .site-nav-inner{width:min(1180px,calc(100% - 64px))!important}
  .site-links{margin-left:auto!important}
  .theme-toggle{margin-left:18px!important}
}
.no-break{white-space:nowrap}
@media(min-width:901px){
  .section-compare .compare-text.jp{font-size:clamp(18px,1.75vw,22px)!important;line-height:1.85!important}
}
html[data-theme="dark"]{
  --paper:#121817!important;
  --ink:#e8efec!important;
  --muted:#b1bdb8!important;
  --faint:#8e9b96!important;
  --line:#303b38!important;
  --line-strong:#43504c!important;
  --accent:#8fc5e8!important;
  --accent-soft:#1b303c!important;
}
html[data-theme="dark"] body{background:#121817!important;color:#e8efec!important}
html[data-theme="dark"] .site-nav{background:rgba(17,23,22,.97)!important;border-bottom-color:#34413d!important}
html[data-theme="dark"] .article-head{background:transparent!important}
html[data-theme="dark"] .site-brand strong,
html[data-theme="dark"] .article-head h1,
html[data-theme="dark"] .section h2,
html[data-theme="dark"] .core-lead,
html[data-theme="dark"] .fact-value,
html[data-theme="dark"] .formula-main,
html[data-theme="dark"] .formula-examples,
html[data-theme="dark"] .note,
html[data-theme="dark"] .jp,
html[data-theme="dark"] .translation,
html[data-theme="dark"] .deep-copy,
html[data-theme="dark"] .quote,
html[data-theme="dark"] .compare-text{color:#e8efec!important}
html[data-theme="dark"] rt{color:#9aa8a2!important}
html[data-theme="dark"] .meaning{color:#d4ddd9!important}
html[data-theme="dark"] .site-brand small,
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .grammar-header-meaning,
html[data-theme="dark"] .grammar-id-meaning,
html[data-theme="dark"] .insight,
html[data-theme="dark"] .meta{color:#b0bcb7!important}
html[data-theme="dark"] .fact-label,
html[data-theme="dark"] .formula-type,
html[data-theme="dark"] .example-tag,
html[data-theme="dark"] .compare-label,
html[data-theme="dark"] .section-kicker{color:#9dcced!important}
html[data-theme="dark"] .tool-btn,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .theme-toggle{background:#171e1c!important;color:#dfe8e4!important;border-color:#46534f!important}
html[data-theme="dark"] .site-links a{color:#b7c2bd!important}
html[data-theme="dark"] .site-links .nav-japanese[aria-current="page"]{color:#9dcced!important}
html[data-theme="dark"] .grammar-header-links a,
html[data-theme="dark"] .grammar-id-links a,
html[data-theme="dark"] .reading-index a{color:#b2bdb8!important}
html[data-theme="dark"] .grammar-header-links a.is-active,
html[data-theme="dark"] .grammar-id-links a.is-active,
html[data-theme="dark"] .reading-index a.is-active{color:#9dcced!important}
@media(min-width:901px){
  html[data-theme="dark"] .section-core{background:#17242b!important;border-color:#2c414b!important;border-top-color:#78a4bf!important}
  html[data-theme="dark"] .section-connection{background:#182520!important;border-color:#30433c!important;border-top-color:#78a292!important}
  html[data-theme="dark"] .section-examples{background:#252118!important;border-color:#453b28!important;border-top-color:#b89d62!important}
  html[data-theme="dark"] .section-nuance{background:#232119!important;border-color:#423b29!important;border-top-color:#c0a85e!important}
  html[data-theme="dark"] .section-compare{background:#221f29!important;border-color:#3d3748!important;border-top-color:#9583aa!important}
  html[data-theme="dark"] .formula,
  html[data-theme="dark"] .section-examples .example,
  html[data-theme="dark"] .section-compare .compare-head,
  html[data-theme="dark"] .section-compare .compare-row{background:#1b2220!important;border-color:#3a4541!important}
  html[data-theme="dark"] .section-examples .example{background:#211f19!important}
  html[data-theme="dark"] .section-examples .insight{background:#19231f!important;color:#bec9c4!important}
}
html[data-theme="dark"] .nuance-highlight{background:linear-gradient(transparent 67%,rgba(232,195,76,.62) 67%,rgba(232,195,76,.62) 91%,transparent 91%)!important}
/* Related reading must participate in dark mode instead of retaining a white panel. */
html[data-theme="dark"] .related{background:#171e1c!important;border-color:#34413d!important;color:#e8efec!important}
html[data-theme="dark"] .related h2,
html[data-theme="dark"] .related-title{color:#edf3f0!important}
html[data-theme="dark"] .related-intro{color:#aebbb6!important}
html[data-theme="dark"] .related ul{background:transparent!important;border-top-color:#36433f!important}
html[data-theme="dark"] .related li{border-bottom-color:#36433f!important}
html[data-theme="dark"] .related a{color:#e2eae6!important}
html[data-theme="dark"] .related-meta{color:#9ca9a4!important}
html[data-theme="dark"] .related a:hover{background:#1c2522!important}
html[data-theme="dark"] .footer{background:#0f1413!important;border-top-color:#2a3431!important}
@media(max-width:700px){
  .no-break{white-space:normal}
  html[data-theme="dark"] .grammar-identity{background:#171e1c!important;border-bottom-color:#34413d!important}
  html[data-theme="dark"] .grammar-mobile-dock{background:rgba(23,30,28,.985)!important;border-top-color:#3a4642!important}
  html[data-theme="dark"] .grammar-mobile-dock a,
  html[data-theme="dark"] .grammar-mobile-dock button{background:#171e1c!important;color:#bdc8c3!important;border-right-color:#34413d!important}
  html[data-theme="dark"] .grammar-mobile-dock a.is-active{background:#1c303b!important;color:#a8d4f0!important}
}



/* 日／夜切換：預設日間，僅在使用者主動切換後記住選擇 */
.toggle-checkbox{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;opacity:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.toggle-7-label{width:32px;height:32px;flex:0 0 32px;border:1px solid #dbe1de;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;transition:border-color .35s ease,background-color .35s ease;color:#17211f;background:transparent}.toggle-7-label::before{content:"";position:absolute;inset:-6px}
.toggle-7-label:hover{background:#f7f9f8;border-color:#c8d1cd}
.toggle-checkbox:focus-visible + .toggle-7-label{outline:3px solid rgba(33,79,119,.24);outline-offset:3px}
.t7-core{width:15px;height:15px;border:1.5px solid currentColor;border-radius:50%;position:relative;transition:all .5s cubic-bezier(.4,0,.2,1);box-shadow:inset 0 0 0 0 currentColor}
.t7-rays{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;transition:transform .5s,opacity .5s}
.t7-ray{position:absolute;width:1px;height:6px;background-color:currentColor;transition:all .5s}
.t7-r1{transform:translateY(-10px)}.t7-r2{transform:translateY(10px)}.t7-r3{transform:translateX(-10px)}.t7-r4{transform:translateX(10px)}
#toggle-7:checked + .toggle-7-label .t7-rays,html[data-theme="dark"] .toggle-7-label .t7-rays{opacity:0;transform:rotate(45deg) scale(.5)}
#toggle-7:checked + .toggle-7-label .t7-core,html[data-theme="dark"] .toggle-7-label .t7-core{border-color:transparent;transform:rotate(-25deg);box-shadow:inset 6px -4px 0 0 currentColor}
html[data-theme="dark"] .toggle-7-label{border-color:#3b4844;color:#e8efec;background:#141b19}
html[data-theme="dark"] .toggle-7-label:hover{background:#18211f;border-color:#52615c}
@media(max-width:767px){.toggle-7-label{width:30px;height:30px;flex-basis:30px}.toggle-7-label::before{inset:-7px}.t7-core{width:14px;height:14px}.t7-ray{height:4px}.t7-r1{transform:translateY(-9px)}.t7-r2{transform:translateY(9px)}.t7-r3{transform:translateX(-9px)}.t7-r4{transform:translateX(9px)}}
@media(min-width:768px){.site-links + .toggle-checkbox + .toggle-7-label{margin-left:18px}.site-nav.reading-mode .grammar-header-links + .site-links + .toggle-checkbox + .toggle-7-label{margin-left:16px}}



/* v9：手機比較區改成逐項直式閱讀，避免文法名稱與句尾被拆開 */
.compare-vs{font-family:var(--sans);font-size:.58em;font-weight:700;letter-spacing:.04em;color:#7b8782;white-space:nowrap}
.no-break{white-space:nowrap}
@media(max-width:700px){
  #compare-title{font-size:22px!important;line-height:1.45!important;letter-spacing:-.015em!important}
  .section-compare .section-intro{font-size:15px!important;line-height:1.75!important;margin-bottom:12px!important}
  .section-compare .compare{border-top:1px solid var(--line-strong)!important}
  .section-compare .compare-row{display:block!important;padding:13px 0 14px!important;margin:0!important;border-top:0!important;border-bottom:1px solid var(--line)!important;background:transparent!important}
  .section-compare .compare-row.compare-header{display:none!important}
  .section-compare .compare-label{display:block!important;margin:0 0 6px!important;padding:0!important;color:var(--accent)!important;font-size:12px!important;font-weight:850!important;letter-spacing:.03em!important}
  .section-compare .compare-text{display:block!important;margin:0!important;padding:6px 0 7px!important;border:0!important;font-size:14px!important;line-height:1.68!important;background:transparent!important}
  .section-compare .compare-text+.compare-text{border-top:1px dotted var(--line)!important;margin-top:3px!important;padding-top:10px!important}
  .section-compare .compare-text::before{display:block!important;margin-bottom:3px!important;font-size:12.5px!important;line-height:1.45!important;color:var(--accent)!important;font-weight:800!important}
  .section-compare .compare-text[data-compare="〜くても"]::before{color:#59635f!important}
  .section-compare .compare-text.jp{font-size:16px!important;line-height:1.72!important;word-break:normal!important;overflow-wrap:normal!important}
  .section-compare .compare-text.jp .no-break{white-space:nowrap!important}
  .section{padding-top:25px!important;padding-bottom:27px!important}
  .section h2{margin-bottom:9px!important}
  .section-intro{margin-bottom:14px!important}
}
/* 夜間相關文法不可殘留白底；每一層文字都有獨立對比 */
html[data-theme="dark"] .related{background:#171e1c!important;color:#e8efec!important;border-color:#34413d!important}
html[data-theme="dark"] .related h2,html[data-theme="dark"] .related-title{color:#edf3f0!important}
html[data-theme="dark"] .related-intro{color:#aebbb6!important}
html[data-theme="dark"] .related ul{background:transparent!important;border-color:#36433f!important}
html[data-theme="dark"] .related li{border-color:#36433f!important}
html[data-theme="dark"] .related a{color:#e2eae6!important}
html[data-theme="dark"] .related-meta{color:#9ca9a4!important}
html[data-theme="dark"] .related a:hover{background:#1c2522!important}



/* source: n2-review-v8-final */

/* =========================================================
   N2 REVIEW v8 — desktop human-reading system
   - Main section titles centered
   - Long content stays left-aligned inside a centered reading axis
   - Short decision modules may center as a whole
   - Related sections stay left-aligned and visually lighter
   ========================================================= */
@media (min-width:901px){
  :root{
    --v7-read:860px;
    --v7-section:940px;
    --v7-hero:1000px;
    --v7-wide:1180px;
  }

  .page{
    width:min(var(--v7-wide),calc(100% - 64px))!important;
    margin-inline:auto!important;
    padding-top:22px!important;
    padding-bottom:44px!important;
  }

  /* ---------- Page hero ---------- */
  .article-head{
    width:min(100%,var(--v7-hero))!important;
    margin-inline:auto!important;
    padding:20px 0 18px!important;
    text-align:center!important;
  }
  .article-head h1{
    margin:6px 0 7px!important;
    font-size:clamp(36px,3vw,48px)!important;
    line-height:1.18!important;
  }
  .article-head .meaning{
    margin:4px auto 7px!important;
    max-width:860px!important;
  }
  .article-head .lead{
    margin:5px auto 8px!important;
    max-width:860px!important;
    line-height:1.62!important;
  }
  .article-head .meta{
    justify-content:center!important;
    margin-top:10px!important;
  }
  .article-head .toolbar,
  .article-head .article-tools{
    justify-content:center!important;
  }
  .quiz-intro{
    max-width:820px!important;
    margin:14px auto 0!important;
    padding:11px 14px!important;
    text-align:left!important;
  }

  /* ---------- Main section title system ---------- */
  .section{
    width:min(100%,var(--v7-section))!important;
    margin-inline:auto!important;
    padding:18px 0 20px!important;
  }
  .section-head{
    display:block!important;
    position:static!important;
    width:100%!important;
    margin:0 auto 10px!important;
    text-align:center!important;
  }
  .section > .section-kicker,
  .section-head .section-kicker{
    position:static!important;
    inset:auto!important;
    display:block!important;
    width:auto!important;
    max-width:none!important;
    margin:0 0 5px!important;
    padding:0!important;
    text-align:center!important;
    line-height:1.4!important;
    font-size:11px!important;
    letter-spacing:.09em!important;
    white-space:normal!important;
  }
  .section > h2,
  .section-head h2{
    display:block!important;
    width:100%!important;
    margin:0 auto 8px!important;
    padding:0!important;
    text-align:center!important;
    font-size:clamp(29px,2.25vw,37px)!important;
    line-height:1.2!important;
  }
  .section-intro{
    max-width:var(--v7-read)!important;
    margin:0 auto 10px!important;
    line-height:1.62!important;
  }

  /* ---------- Content axis ---------- */
  .section-panel,
  .compact-core,
  .form-list,
  .examples,
  .compare-stack,
  .compare-groups,
  .deep-copy,
  .note,
  .same-event,
  .quick-steps{
    width:min(100%,var(--v7-read))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Core should feel like the successful connection rows */
  .section-core .core-lead,
  .section-core .fact-grid{
    width:min(100%,var(--v7-read))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .section-core .core-lead,
  .compact-core .core-line{
    padding:7px 0 8px!important;
    margin:0 auto 8px!important;
    line-height:1.62!important;
  }
  .fact-grid,
  .compact-facts{
    display:block!important;
    border:0!important;
    background:transparent!important;
  }
  .fact-grid .fact,
  .compact-fact{
    display:grid!important;
    grid-template-columns:150px minmax(0,1fr)!important;
    align-items:center!important;
    gap:24px!important;
    min-height:0!important;
    padding:9px 0 10px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    background:transparent!important;
  }
  .fact-grid .fact:first-child,
  .compact-fact:first-child{
    border-top:1px solid var(--line)!important;
  }
  .fact-label,
  .compact-fact > span{
    margin:0!important;
    color:var(--faint)!important;
    font-size:11px!important;
    font-weight:800!important;
  }
  .fact-value,
  .compact-fact > strong{
    margin:0!important;
    line-height:1.55!important;
  }

  /* Connection rows are the reference density */
  .form-row{
    min-height:0!important;
    padding:10px 0 11px!important;
    gap:22px!important;
  }
  .form-label{align-self:center!important}
  .form-value{line-height:1.6!important}

  /* ---------- Comparison: no giant cards ---------- */
  #compare .compare-stack,
  #compare .compare-groups{
    width:min(100%,var(--v7-read))!important;
    margin-inline:auto!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }
  #compare .compare-grammar{
    position:relative!important;
    margin:0!important;
    padding:11px 0 12px 14px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  #compare .compare-grammar:first-child{border-top:1px solid var(--line)!important}
  #compare .compare-grammar::before{
    content:"";
    position:absolute;
    left:0;
    top:14px;
    bottom:14px;
    width:3px;
    background:#8d9aa0;
  }
  #compare .compare-a::before{background:#b68a58}
  #compare .compare-b::before{background:#5f8fab}
  #compare .compare-c::before{background:#6f927e}
  #compare .compare-grammar h3{
    margin:0 0 5px!important;
    font-size:22px!important;
    line-height:1.35!important;
  }
  #compare .compare-a h3{color:#9a6734!important}
  #compare .compare-b h3{color:#376f8e!important}
  #compare .compare-c h3{color:#587e69!important}
  #compare .compare-detail{
    display:grid!important;
    grid-template-columns:72px minmax(0,1fr)!important;
    column-gap:18px!important;
    align-items:start!important;
    margin:0!important;
    padding:4px 0!important;
    background:transparent!important;
    border:0!important;
  }
  #compare .compare-detail > span{
    grid-column:1!important;
    margin:1px 0 0!important;
    color:var(--faint)!important;
    font-size:11px!important;
    font-weight:850!important;
    line-height:1.45!important;
  }
  #compare .compare-detail > p{
    grid-column:2!important;
    margin:0 0 3px!important;
    line-height:1.58!important;
  }
  #compare .compare-example{
    font-weight:700!important;
  }
  #compare .compare-translation,
  #compare .compare-zh{
    color:var(--muted)!important;
    font-size:14px!important;
  }

  /* ---------- Study / Reading Focus ---------- */
  .study-focus{
    width:min(100%,var(--v7-read))!important;
    margin:20px auto 0!important;
    padding-top:14px!important;
  }
  .study-focus .eyebrow,
  .study-focus > h2{
    text-align:center!important;
  }
  .study-focus > h2{
    margin:4px 0 7px!important;
    font-size:27px!important;
  }
  .focus-grid,.focus-list{
    display:block!important;
    border:0!important;
    background:transparent!important;
  }
  .focus-item{
    padding:9px 0 10px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    background:transparent!important;
  }

  /* ---------- Keigo short decision module ---------- */
  .keigo-flow{
    width:min(100%,760px)!important;
    margin-inline:auto!important;
  }
  .keigo-step{
    padding:10px 0 11px!important;
    text-align:center!important;
  }
  .keigo-step h3{margin:3px 0 5px!important}
  .keigo-arrow{
    margin:4px 0 7px!important;
    text-align:center!important;
    font-size:25px!important;
    font-weight:800!important;
    color:var(--blue)!important;
  }
  .keigo-step p{margin:3px 0!important}
  .keigo-key{
    margin:8px auto 0!important;
    text-align:center!important;
  }
  /* Long keigo reference rows stay left aligned on centered axis */
  #keigo .form-list{
    width:min(100%,var(--v7-read))!important;
    margin-inline:auto!important;
  }
  #keigo .form-row{
    grid-template-columns:220px minmax(0,1fr)!important;
    gap:28px!important;
  }

  /* ---------- Quiz / practice ---------- */
  .quiz{
    width:100%!important;
  }
  .question{
    width:min(100%,880px)!important;
    margin-inline:auto!important;
    padding:20px 0 25px!important;
    border-bottom:1px solid var(--line)!important;
  }
  .question + .question{padding-top:25px!important}
  .question-top{
    display:grid!important;
    grid-template-columns:46px minmax(0,1fr) 42px!important;
    gap:13px!important;
    align-items:start!important;
    margin:0 0 11px!important;
  }
  .question-top .question-number{
    grid-column:1!important;
    margin:0!important;
    padding-top:6px!important;
    align-self:start!important;
  }
  .question-top .question-text{
    grid-column:2!important;
    margin:0!important;
    max-width:none!important;
    font-size:21px!important;
    line-height:1.85!important;
  }
  .question-top .question-audio,
  .question-top .speak-question,
  .question-top .icon-button{
    grid-column:3!important;
    position:static!important;
    right:auto!important;
    top:auto!important;
    align-self:start!important;
    margin:0!important;
  }
  .options{
    width:min(100%,820px)!important;
    max-width:none!important;
    margin-inline:auto!important;
    gap:7px!important;
  }
  .option,.option-btn,.practice-option{
    min-height:47px!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  /* Never let an answered question lose its explanation */
  .question .answer[hidden]{display:none!important}
  .question.is-answered .answer,
  .question.answered .answer{
    display:block!important;
    width:min(100%,820px)!important;
    max-width:820px!important;
    margin:11px auto 0!important;
  }
  .question.is-answered{padding-bottom:24px!important}
  .question.answered{padding-bottom:24px!important}
  .question.is-answered .answer-choice-summary,
  .question.answered .answer-summary{
    width:min(100%,820px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .question.is-answered .translation,
  .question.is-answered .explain-row,
  .question.is-answered .vocab-line,
  .question.answered .answer-block{
    margin-left:0!important;
    margin-right:0!important;
  }
  .question.is-answered .options.is-collapsed{display:none!important}

  /* ---------- Reading ---------- */
  .reading-paper{
    width:min(100%,880px)!important;
    margin-inline:auto!important;
    padding:16px 19px!important;
  }
  .reading-paper .jp-article{
    font-size:17px!important;
    line-height:1.9!important;
  }

  /* ---------- Related: deliberately smaller and left-aligned ---------- */
  .related,
  .vocab-related{
    width:min(100%,820px)!important;
    margin:18px auto 0!important;
    padding:13px 0 14px!important;
    text-align:left!important;
  }
  .related .eyebrow,
  .vocab-related .eyebrow{
    margin-bottom:4px!important;
    font-size:11px!important;
    text-align:left!important;
  }
  .related h2,
  .vocab-related h2{
    margin:0 0 4px!important;
    font-size:24px!important;
    line-height:1.3!important;
    text-align:left!important;
  }
  .related p,
  .related-intro,
  .vocab-related p{
    margin:0 0 7px!important;
    font-size:13px!important;
    text-align:left!important;
  }
  .related ul,
  .vocab-related ul{
    margin-top:7px!important;
  }
  .related a,
  .vocab-related a{
    min-height:0!important;
    padding:9px 0!important;
    text-align:left!important;
  }
}

/* Mobile keeps comfortable reading; section titles remain stacked and collision-free. */
@media (max-width:900px){
  .section-head{
    display:block!important;
    position:static!important;
    text-align:center!important;
  }
  .section > .section-kicker,
  .section-head .section-kicker{
    position:static!important;
    inset:auto!important;
    width:auto!important;
    margin:0 0 5px!important;
    text-align:center!important;
  }
  .section > h2,
  .section-head h2{
    margin-top:0!important;
    text-align:center!important;
  }
  .question-top{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 40px!important;
    gap:7px 10px!important;
  }
  .question-top .question-number{grid-column:1!important;grid-row:1!important;margin:0!important}
  .question-top .question-audio,
  .question-top .speak-question,
  .question-top .icon-button{grid-column:2!important;grid-row:1!important;position:static!important}
  .question-top .question-text{grid-column:1 / -1!important;grid-row:2!important;margin:0!important}
  #compare .compare-detail{grid-template-columns:1fr!important;padding:5px 0!important}
  #compare .compare-detail > span,
  #compare .compare-detail > p{grid-column:1!important}
  #compare .compare-detail > span{margin-bottom:2px!important}
}
html[data-theme="dark"] #compare .compare-a h3{color:#d9ad77!important}
html[data-theme="dark"] #compare .compare-b h3{color:#8ec1df!important}
html[data-theme="dark"] #compare .compare-c h3{color:#8fbea2!important}


/* =========================================================
   v8 refinements
   ========================================================= */
@media (min-width:901px){
  :root{
    --v8-read:860px;
    --v8-book:820px;
    --v8-section:940px;
  }

  /* Reading index uses the same outer axis as the section below it. */
  .reading-index{
    width:min(100%,var(--v8-section))!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .reading-index a:first-child{padding-left:0!important}

  /* Connection boxes: keep compact size but give text breathing room from borders. */
  .section-connection .formula{
    padding-left:18px!important;
    padding-right:18px!important;
  }
  .section-connection .formula-type,
  .section-connection .formula-main,
  .section-connection .formula-examples{
    margin-left:0!important;
    margin-right:0!important;
  }
  .section-connection .note{
    margin-left:18px!important;
    margin-right:18px!important;
  }

  /* Focus + Related become one book-like tail axis. */
  .study-focus,
  .related,
  .vocab-related{
    width:min(100%,var(--v8-book))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .study-focus{
    padding-top:13px!important;
    padding-bottom:0!important;
  }
  .study-focus .focus-item{
    padding:10px 0 11px!important;
  }
  .study-focus .focus-item h3{
    max-width:720px!important;
    margin-bottom:4px!important;
    font-weight:760!important;
  }
  .study-focus .focus-item p{
    max-width:720px!important;
    line-height:1.62!important;
  }
  .study-focus .focus-item:nth-child(1) h3{color:#426f63!important}
  .study-focus .focus-item:nth-child(2) h3{color:#9a6f32!important}
  .study-focus .focus-item:nth-child(3) h3{color:#4e6f8c!important}

  .related,
  .vocab-related{
    margin-top:14px!important;
    border-top:1px solid var(--line)!important;
    padding-top:12px!important;
  }
  .related h2,
  .vocab-related h2{
    font-size:23px!important;
  }
  .related li,
  .vocab-related li{
    border-bottom:1px solid var(--line)!important;
  }
  .related a,
  .vocab-related a{
    padding:8px 0!important;
  }

  /* Desktop compare = compact table, not oversized panels. */
  .compare-table{
    width:min(100%,var(--v8-read))!important;
    margin:8px auto 0!important;
    border-collapse:collapse!important;
    table-layout:fixed!important;
    background:transparent!important;
    font-size:15px!important;
  }
  .compare-table th,
  .compare-table td{
    padding:10px 12px!important;
    border-bottom:1px solid var(--line)!important;
    vertical-align:top!important;
    text-align:left!important;
    line-height:1.58!important;
  }
  .compare-table thead th{
    border-top:1px solid var(--line)!important;
    font-size:17px!important;
    font-weight:800!important;
  }
  .compare-table-label{
    width:78px!important;
    color:var(--faint)!important;
    font-size:11px!important;
  }
  .compare-table tbody th{
    width:78px!important;
    color:var(--faint)!important;
    font-size:11px!important;
    font-weight:800!important;
  }
  .compare-head-1{
    color:#996431!important;
    background:rgba(182,138,88,.045)!important;
  }
  .compare-head-2{
    color:#376f8e!important;
    background:rgba(95,143,171,.045)!important;
  }
  .compare-table .jp-cell{
    font-weight:700!important;
  }
  .compare-table .zh-cell{
    color:var(--muted)!important;
    font-size:14px!important;
  }
  /* Existing vertical blocks are mobile fallback only when a table exists. */
  .compare-table + .compare-groups,
  .compare-table + .compare-stack{
    display:none!important;
  }

  /* Keep core information at the same comfortable density as FORM rows. */
  .section-core .fact-grid .fact{
    grid-template-columns:150px minmax(0,1fr)!important;
    padding-top:9px!important;
    padding-bottom:9px!important;
  }
}

@media (max-width:900px){
  .compare-table{display:none!important}
  .compare-table + .compare-groups,
  .compare-table + .compare-stack{
    display:block!important;
  }
}

html[data-theme="dark"] .study-focus .focus-item:nth-child(1) h3{color:#82b3a5!important}
html[data-theme="dark"] .study-focus .focus-item:nth-child(2) h3{color:#d5ad6a!important}
html[data-theme="dark"] .study-focus .focus-item:nth-child(3) h3{color:#8db1cf!important}
html[data-theme="dark"] .compare-head-1{color:#d9ad77!important;background:rgba(182,138,88,.06)!important}
html[data-theme="dark"] .compare-head-2{color:#8ec1df!important;background:rgba(95,143,171,.06)!important}


/* source: grammar-section-nav-colors-v9 */

/* v9：文法段落導覽文字與對應章節色一致 */
.reading-index a:nth-child(1){--section-nav-color:#315f82;color:#315f82!important}
.reading-index a:nth-child(2){--section-nav-color:#547c6e;color:#547c6e!important}
.reading-index a:nth-child(3){--section-nav-color:#3e788c;color:#3e788c!important}
.reading-index a:nth-child(4){--section-nav-color:#966f38;color:#966f38!important}
.reading-index a:nth-child(5){--section-nav-color:#756489;color:#756489!important}
.reading-index a:hover,
.reading-index a:focus-visible,
.reading-index a.is-active{
  color:var(--section-nav-color)!important;
  border-bottom-color:var(--section-nav-color)!important;
}
html[data-theme="dark"] .reading-index a:nth-child(1){--section-nav-color:#8fc1e2;color:#8fc1e2!important}
html[data-theme="dark"] .reading-index a:nth-child(2){--section-nav-color:#91b8a8;color:#91b8a8!important}
html[data-theme="dark"] .reading-index a:nth-child(3){--section-nav-color:#83bacd;color:#83bacd!important}
html[data-theme="dark"] .reading-index a:nth-child(4){--section-nav-color:#d5ad6a;color:#d5ad6a!important}
html[data-theme="dark"] .reading-index a:nth-child(5){--section-nav-color:#b4a1cc;color:#b4a1cc!important}


/* source: n2-shared-voice-style-v10 */

.n2-voice-setting{
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  color:var(--muted,#6f7d79);font-size:12px
}
.n2-voice-setting label{font-weight:750;color:inherit}
.n2-voice-select{
  max-width:210px;min-width:112px;height:28px;
  border:1px solid var(--line,#d9e0de);border-radius:0;
  background:transparent;color:var(--text,#17211f);
  padding:2px 24px 2px 7px;font:inherit;cursor:pointer
}
.n2-voice-select:focus-visible{
  outline:2px solid color-mix(in srgb,var(--blue,#2f6f9f) 35%,transparent);
  outline-offset:2px
}
html[data-theme="dark"] .n2-voice-select,
body.dark-mode .n2-voice-select{
  background:#121817;color:#e8efed;border-color:#38413f
}
@media(max-width:700px){
  .n2-voice-setting{gap:4px}
  .n2-voice-select{max-width:142px;min-width:96px}
}


/* source: compare-table-dom-fix-v11 */

/* v11：桌機 Compare 真正三欄表頭，不再受舊 .compare-head Grid 影響 */
@media (min-width:901px){
  #compare .compare-table{
    display:table!important;
    width:min(100%,860px)!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    margin:8px auto 0!important;
  }
  #compare .compare-table col.compare-col-label{width:76px!important}
  #compare .compare-table col.compare-col-a,
  #compare .compare-table col.compare-col-b{width:auto!important}
  #compare .compare-table thead{display:table-header-group!important}
  #compare .compare-table tbody{display:table-row-group!important}
  #compare .compare-table tr{display:table-row!important}
  #compare .compare-table th,
  #compare .compare-table td{
    display:table-cell!important;
    box-sizing:border-box!important;
  }
  #compare .compare-table .compare-column-title{
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    font-size:17px!important;
    line-height:1.45!important;
  }
  #compare .compare-table .compare-column-a{
    color:#996431!important;
    background:rgba(182,138,88,.045)!important;
  }
  #compare .compare-table .compare-column-b{
    color:#376f8e!important;
    background:rgba(95,143,171,.045)!important;
  }
}
@media (max-width:900px){
  #compare .compare-table{display:none!important}
}
html[data-theme="dark"] #compare .compare-table .compare-column-a{
  color:#d9ad77!important;background:rgba(182,138,88,.06)!important
}
html[data-theme="dark"] #compare .compare-table .compare-column-b{
  color:#8ec1df!important;background:rgba(95,143,171,.06)!important
}


/* source: n2-book-reading-v12 */

/* =========================================================
   N2 v12 BOOK READING SYSTEM
   全頁書本式閱讀：中央版心、合理行長、穩定段距、同軸分隔
   ========================================================= */
@media (min-width: 901px){
  :root{
    --book-reading: 820px;
    --book-medium: 900px;
    --book-section: 940px;
    --book-wide: 1120px;
  }

  /* Page */
  .page{
    width:min(var(--book-wide),calc(100% - 64px))!important;
    margin-inline:auto!important;
    padding-bottom:48px!important;
  }

  /* Hero / title: visually centered, not oversized */
  .article-head{
    width:min(100%,960px)!important;
    margin-inline:auto!important;
    padding-top:24px!important;
    padding-bottom:18px!important;
  }
  .article-head h1{
    line-height:1.17!important;
    margin-top:6px!important;
    margin-bottom:7px!important;
  }
  .article-head .lead,
  .article-head .meaning{
    max-width:820px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    line-height:1.68!important;
  }

  /* Section shell */
  .section{
    width:min(100%,var(--book-section))!important;
    margin-inline:auto!important;
    padding-top:18px!important;
    padding-bottom:20px!important;
  }
  .section-head{
    width:100%!important;
    margin:0 auto 10px!important;
  }
  .section-intro{
    width:min(100%,var(--book-reading))!important;
    margin-left:auto!important;
    margin-right:auto!important;
    line-height:1.68!important;
  }

  /* Long-form content uses a book reading width */
  .reading-paper,
  .reading-body,
  .article-body,
  .long-copy,
  .deep-copy,
  .section-copy,
  .section-panel,
  .study-focus,
  .related,
  .vocab-related{
    max-width:var(--book-reading)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Natural text measure */
  .reading-paper p,
  .reading-body p,
  .article-body p,
  .long-copy p,
  .section-copy p,
  .section-panel p,
  .focus-item p,
  .related p,
  .vocab-related p{
    line-height:1.82!important;
  }

  /* Book-like paragraph rhythm */
  .reading-paper p + p,
  .reading-body p + p,
  .article-body p + p,
  .long-copy p + p{
    margin-top:15px!important;
  }

  /* Ruby: close to base text, prevent awkward character spreading */
  ruby{
    ruby-position:over;
  }
  rt{
    font-size:.52em!important;
    line-height:1!important;
    color:var(--faint,#82908c)!important;
    letter-spacing:.02em!important;
  }
  ruby, ruby *{
    word-break:keep-all!important;
  }

  /* Inline words / grammar must not break in the middle */
  .grammar-name,
  .grammar-pattern,
  .word,
  .jp-term,
  .compare-column-title,
  [data-grammar]{
    word-break:keep-all!important;
    overflow-wrap:normal!important;
  }

  /* Short information rows: same density as FORM */
  .fact-grid .fact,
  .compact-fact,
  .form-row,
  .focus-item{
    min-height:0!important;
  }
  .fact-grid .fact,
  .compact-fact{
    padding-top:9px!important;
    padding-bottom:9px!important;
  }
  .form-row{
    padding-top:10px!important;
    padding-bottom:10px!important;
  }

  /* All left accent-line content keeps safe distance */
  .core-line,
  .quote,
  .note-line,
  .translation,
  .keigo-summary-line{
    padding-left:24px!important;
    box-sizing:border-box!important;
  }

  /* Tables */
  table{
    line-height:1.58!important;
  }
  .compare-table,
  .keigo-compare-table{
    max-width:860px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Study Focus + Related = one book tail */
  .study-focus,
  .related,
  .vocab-related{
    width:min(100%,var(--book-reading))!important;
  }
  .study-focus{
    padding-top:13px!important;
  }
  .study-focus .focus-item{
    padding:10px 0 11px!important;
  }
  .study-focus .focus-item h3,
  .study-focus .focus-item > strong{
    max-width:700px!important;
    margin-bottom:4px!important;
  }
  .study-focus .focus-item p{
    max-width:700px!important;
  }
  .related,
  .vocab-related{
    margin-top:14px!important;
    padding-top:12px!important;
    border-top:1px solid var(--line)!important;
  }
  .related h2,
  .vocab-related h2{
    font-size:23px!important;
    margin-bottom:4px!important;
  }
  .related a,
  .vocab-related a{
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  /* Reading article */
  .reading-paper{
    width:min(100%,860px)!important;
    padding:16px 20px!important;
  }
  .reading-paper .jp-article,
  .reading-paper .reading-text,
  .reading-paper p{
    font-size:19px!important;
    line-height:1.95!important;
    font-weight:430!important;
  }

  /* Keep semantic groups together */
  .reading-unit,
  .sentence-unit{
    break-inside:avoid;
  }
}

/* Mobile: keep comfortable but not huge */
@media (max-width:900px){
  .core-line,
  .quote,
  .note-line,
  .translation,
  .keigo-summary-line{
    padding-left:16px!important;
  }
  .reading-paper .jp-article,
  .reading-paper .reading-text,
  .reading-paper p{
    line-height:1.9!important;
  }
  rt{font-size:.5em!important}
}


/* source: grammar-v12-final */

@media(min-width:901px){
  .reading-index{
    width:min(100%,940px)!important;
    margin-inline:auto!important;
  }
  .reading-index a{
    white-space:nowrap!important;
  }
  #compare .compare-table{
    width:min(100%,860px)!important;
  }
  #compare .compare-table col.compare-col-label{width:76px!important}
  #compare .compare-table th,
  #compare .compare-table td{padding:9px 11px!important}
}


/* source: grammar-compare-nowrap-v13 */

@media(min-width:901px){
  #compare .compare-table{
    width:min(100%,860px)!important;
    table-layout:fixed!important;
  }
  #compare .compare-table col.compare-col-label{width:76px!important}
  #compare .compare-table thead th:nth-child(2),
  #compare .compare-table thead th:nth-child(3){
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
  }
}


/* source: context-aware-tools-v15 */

/* =========================================================
   v15 CONTEXT-AWARE TOOL ROW
   - info only -> centered compact row
   - info + actions -> left info / right actions
   - long content -> auto gap reduction / wrap
   ========================================================= */
.context-row{
  width:min(100%,1120px);
  margin:14px auto 0;
  box-sizing:border-box;
}
.context-row.context-info-only{
  display:flex;
  justify-content:center;
  align-items:center;
}
.context-row.context-split{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:clamp(18px,3vw,42px);
}
.context-row .context-info{
  display:flex;
  align-items:center;
  gap:clamp(10px,1.4vw,18px);
  flex-wrap:wrap;
  min-width:0;
}
.context-row.context-info-only .context-info{
  justify-content:center;
}
.context-row.context-split .context-info{
  justify-content:flex-start;
}
.context-row .context-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:nowrap;
  white-space:nowrap;
}
.context-row .n2-voice-setting{
  flex:0 0 auto;
}
.context-row .context-info > *{
  flex:0 0 auto;
}
.context-row .context-info .meta-item,
.context-row .context-info > span:not(.n2-voice-setting){
  white-space:nowrap;
}

/* If the row gets crowded, do not force a bad layout */
@media (max-width:1180px) and (min-width:901px){
  .context-row.context-split{
    column-gap:18px;
  }
  .context-row .context-info{
    gap:10px 12px;
  }
}
@media (max-width:980px) and (min-width:901px){
  .context-row.context-split{
    grid-template-columns:1fr;
    row-gap:10px;
  }
  .context-row.context-split .context-info{
    justify-content:center;
  }
  .context-row.context-split .context-actions{
    justify-content:center;
  }
}

@media(max-width:900px){
  .context-row,
  .context-row.context-info-only,
  .context-row.context-split{
    display:block;
    width:100%;
  }
  .context-row .context-info{
    justify-content:flex-start!important;
    gap:8px 12px;
  }
  .context-row .context-actions{
    justify-content:flex-start;
    flex-wrap:wrap;
    margin-top:10px;
    gap:8px;
  }
}


/* source: grammar-context-v15 */

@media(min-width:901px){
  .article-head .context-row{max-width:900px}
}


/* source: hero-prose-wrap-v15 */

@media(min-width:901px){
  .article-head .lead,
  .article-head .meaning,
  .article-head .sublead{
    max-width:900px!important;
    text-wrap:pretty!important;
    line-height:1.68!important;
  }
}


/* source: information-hierarchy-v17 */

/* =========================================================
   v17 N2 INFORMATION / ACTION SYSTEM
   Rule update:
   - Voice / meta / actions must stay on the SAME LINE on desktop when possible.
   - If left/right areas take more width, low-contrast meta text gets SMALLER first.
   - Only collapse to multi-line on genuinely narrow screens.
   ========================================================= */

.context-row{ container-type:inline-size; }

/* muted informational text */
.context-meta-group{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap;
  gap:clamp(8px,1.1vw,16px);
  min-width:0;
  white-space:nowrap;
  font-size:clamp(.86rem,.76rem + .22vw,.98rem);
  line-height:1.35;
}
.context-meta-item{
  color:#8a9692!important;
  font-weight:450!important;
  white-space:nowrap;
  font-size:inherit!important;
}

/* keep voice control readable */
.context-row .n2-voice-setting{
  color:#53615d!important;
  font-weight:650!important;
  white-space:nowrap!important;
}
.context-row .n2-voice-select{
  color:var(--text,#17211f)!important;
  height:40px!important;
}

/* split rows: left voice + center muted info + right actions */
.context-row.context-split{
  display:grid!important;
  grid-template-columns:minmax(max-content,auto) minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:clamp(14px,2.1vw,30px)!important;
}
.context-row.context-split .context-info{
  display:contents!important;
}
.context-row.context-split .n2-voice-setting{
  justify-self:start!important;
  min-width:max-content;
}
.context-row.context-split .context-meta-group{
  justify-self:center!important;
  max-width:100%;
}
.context-row.context-split .context-actions{
  justify-self:end!important;
  display:inline-flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:clamp(10px,1vw,14px)!important;
}

/* info-only rows remain compact and centered */
.context-row.context-info-only .context-info{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:clamp(10px,1.2vw,18px)!important;
}
.context-row.context-info-only .context-meta-group{
  justify-content:center!important;
}

.context-row .context-actions button,
.context-row .context-actions a{
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
}

/* Step down metadata first before breaking the row */
@container (max-width: 1180px){
  .context-row.context-split .context-meta-group{
    font-size:.92rem!important;
    gap:12px!important;
  }
}
@container (max-width: 1100px){
  .context-row.context-split .context-meta-group{
    font-size:.88rem!important;
    gap:10px!important;
  }
}
@container (max-width: 1000px){
  .context-row.context-split .context-meta-group{
    font-size:.84rem!important;
    gap:8px!important;
  }
}
@container (max-width: 940px){
  .context-row.context-split{
    grid-template-columns:minmax(max-content,auto) minmax(0,1fr)!important;
    row-gap:10px!important;
  }
  .context-row.context-split .context-actions{
    grid-column:1 / -1!important;
    justify-self:end!important;
  }
}

/* only on narrow devices allow natural stacking */
@media(max-width:900px){
  .context-row.context-split{
    grid-template-columns:1fr!important;
    row-gap:10px!important;
  }
  .context-row.context-split .context-info,
  .context-row.context-split .context-actions{
    display:block!important;
  }
  .context-row.context-split .context-actions{
    justify-self:stretch!important;
  }
  .context-row .n2-voice-setting{ display:block!important; }
  .context-row .context-meta-group{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
    margin-top:8px!important;
    font-size:.92rem!important;
    gap:8px 12px!important;
    white-space:normal;
  }
  .context-row .context-actions{
    margin-top:10px!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}

html[data-theme="dark"] .context-meta-item,
body.dark-mode .context-meta-item{
  color:#98a4a0!important;
}


/* source: hero-prose-v16 */

@media(min-width:901px){
  .article-head .lead,
  .article-head .meaning,
  .article-head .sublead{
    max-width:920px!important;
    text-wrap:pretty!important;
    line-height:1.68!important;
  }
}


/* source: safe-tool-row-v18 */

/* =========================================================
   v18 SAFE TOOL ROW
   confirmed rule:
   - desktop keeps one row when possible
   - left/right controls never touch the page frame
   - center muted metadata shrinks first
   ========================================================= */

@media(min-width:901px){
  .context-row{
    box-sizing:border-box!important;
    padding-left:30px!important;
    padding-right:30px!important;
    padding-top:13px!important;
    padding-bottom:13px!important;
  }

  .context-row.context-split{
    width:min(100%,1120px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  .context-row.context-info-only{
    width:min(100%,980px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* left functional group */
  .context-row.context-split .n2-voice-setting{
    margin-left:0!important;
    padding-left:0!important;
  }

  /* right action group */
  .context-row.context-split .context-actions{
    margin-right:0!important;
    padding-right:0!important;
  }

  /* muted center info yields space first */
  .context-row.context-split .context-meta-group{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }

  .context-row.context-split .context-meta-item{
    font-size:clamp(.80rem,.72rem + .18vw,.92rem)!important;
  }
}

/* Medium desktop: keep the row, compress metadata before wrapping */
@media(min-width:901px) and (max-width:1120px){
  .context-row{
    padding-left:24px!important;
    padding-right:24px!important;
  }
  .context-row.context-split{
    column-gap:16px!important;
  }
  .context-row.context-split .context-meta-group{
    gap:8px!important;
    font-size:.82rem!important;
  }
}

/* Mobile/tablet: smaller safe edge, natural wrapping remains allowed */
@media(max-width:900px){
  .context-row{
    box-sizing:border-box!important;
    padding-left:16px!important;
    padding-right:16px!important;
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
}


/* source: page-context-classification-v19 */

/* =========================================================
   v19 PAGE-CONTEXT CLASSIFICATION
   A. content-context-row:
      grammar / reading / compare / light practice info
      -> compact centered single line
   B. operation-context-row:
      vocabulary / heavy quiz controls
      -> left info + center muted metadata + right actions
   ========================================================= */

/* A — content pages: compact, centered, never spread to page edges */
@media(min-width:901px){
  .article-head .content-context-row{
    width:min(100%,900px)!important;
    margin:14px auto 0!important;
    padding:11px 20px!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    box-sizing:border-box!important;
  }
  .article-head .content-context-row > .context-info{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:clamp(10px,1.4vw,18px)!important;
    min-width:0!important;
  }
  .article-head .content-context-row .n2-voice-setting{
    flex:0 0 auto!important;
  }
  .article-head .content-context-row .context-meta-group{
    display:inline-flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:clamp(9px,1.15vw,15px)!important;
    font-size:clamp(.84rem,.78rem + .15vw,.94rem)!important;
    white-space:nowrap!important;
  }
  .article-head .content-context-row .content-inline-action{
    flex:0 0 auto!important;
    min-height:36px!important;
    padding:6px 11px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
  }
}

/* Narrow desktop: shrink muted information first, but stay centered */
@media(min-width:901px) and (max-width:1040px){
  .article-head .content-context-row{
    width:min(100%,860px)!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .article-head .content-context-row > .context-info{
    gap:9px!important;
  }
  .article-head .content-context-row .context-meta-group{
    font-size:.82rem!important;
    gap:8px!important;
  }
}

/* B — heavy operation pages keep v18 safety edges */
@media(min-width:901px){
  .article-head .operation-context-row{
    width:min(100%,1120px)!important;
    padding-left:30px!important;
    padding-right:30px!important;
    padding-top:13px!important;
    padding-bottom:13px!important;
    box-sizing:border-box!important;
  }
}

/* Mobile: both categories can wrap naturally */
@media(max-width:900px){
  .article-head .content-context-row,
  .article-head .operation-context-row{
    width:100%!important;
    padding:10px 16px!important;
    box-sizing:border-box!important;
  }
  .article-head .content-context-row > .context-info{
    display:flex!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:8px 12px!important;
  }
}


/* source: all-center-compact-v20 */

/* =========================================================
   v20 ALL PAGES = CENTER COMPACT
   - no left/right split
   - voice + muted info + actions live in one centered cluster
   - desktop prefers one line
   - if content is too long, shrink muted info / spacing first
   - only then allow a centered wrap
   ========================================================= */

@media(min-width:901px){
  .article-head .center-compact-row{
    width:min(100%,1180px)!important;
    margin:14px auto 0!important;
    padding:11px 24px!important;
    box-sizing:border-box!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
  }

  .article-head .center-compact-row > .context-info{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:10px 14px!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 auto!important;
  }

  .article-head .center-compact-row .n2-voice-setting{
    flex:0 0 auto!important;
    margin:0 4px 0 0!important;
    color:#53615d!important;
    font-weight:650!important;
    white-space:nowrap!important;
  }

  .article-head .center-compact-row .n2-voice-select{
    height:38px!important;
    max-width:260px!important;
  }

  .article-head .center-compact-row .context-meta-group{
    display:inline-flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:10px 14px!important;
    margin:0!important;
    color:#8a9692!important;
    font-size:clamp(.82rem,.76rem + .16vw,.92rem)!important;
    line-height:1.35!important;
    white-space:nowrap!important;
  }

  .article-head .center-compact-row .context-meta-item{
    color:#8a9692!important;
    font-weight:450!important;
    font-size:inherit!important;
    white-space:nowrap!important;
  }

  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:6px 11px!important;
    margin:0!important;
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
  }
}

/* Medium desktop: compress metadata before wrapping */
@media(min-width:901px) and (max-width:1180px){
  .article-head .center-compact-row{
    width:min(100%,1080px)!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  .article-head .center-compact-row > .context-info{
    gap:8px 10px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    gap:8px 10px!important;
    font-size:.80rem!important;
  }
  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    padding-left:9px!important;
    padding-right:9px!important;
  }
}

/* Smaller desktop / large tablet: still centered compact, wrapping is centered */
@media(min-width:901px) and (max-width:1020px){
  .article-head .center-compact-row > .context-info{
    max-width:920px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    font-size:.78rem!important;
  }
}

/* Mobile */
@media(max-width:900px){
  .article-head .center-compact-row{
    width:100%!important;
    margin:12px auto 0!important;
    padding:10px 16px!important;
    box-sizing:border-box!important;
  }
  .article-head .center-compact-row > .context-info{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:7px 10px!important;
    font-size:.86rem!important;
    margin:0!important;
  }
  .article-head .center-compact-row .n2-voice-setting{
    display:inline-flex!important;
    justify-content:center!important;
  }
}

/* dark mode muted information */
html[data-theme="dark"] .center-compact-row .context-meta-item,
body.dark-mode .center-compact-row .context-meta-item{
  color:#98a4a0!important;
}


/* source: desktop-single-line-v21 */

/* =========================================================
   v21 DESKTOP SINGLE-LINE COMPACT ROW
   Confirmed:
   - desktop: NEVER wrap
   - long content shrinks in this order:
     muted metadata -> gaps -> voice select width -> button padding/font
   - tablet/mobile may wrap naturally
   ========================================================= */

@media(min-width:1024px){
  .article-head .center-compact-row{
    width:min(100%,1220px)!important;
    margin:14px auto 0!important;
    padding:10px 18px!important;
    box-sizing:border-box!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    overflow:visible!important;
  }

  .article-head .center-compact-row > .context-info{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    gap:8px 11px!important;
    width:max-content!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 auto!important;
  }

  /* Voice group stays readable but can become narrower. */
  .article-head .center-compact-row .n2-voice-setting{
    display:inline-flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    margin:0 2px 0 0!important;
    font-size:13px!important;
    white-space:nowrap!important;
  }
  .article-head .center-compact-row .n2-voice-select{
    width:clamp(180px,19vw,250px)!important;
    max-width:250px!important;
    min-width:170px!important;
    height:38px!important;
    font-size:13px!important;
    padding-left:8px!important;
    padding-right:24px!important;
  }

  /* Muted metadata gives up space first. */
  .article-head .center-compact-row .context-meta-group{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    gap:8px 11px!important;
    margin:0!important;
    min-width:0!important;
    font-size:12.5px!important;
    line-height:1.2!important;
  }
  .article-head .center-compact-row .context-meta-item{
    font-size:inherit!important;
    white-space:nowrap!important;
  }

  /* Actions stay on the same line. */
  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    min-height:38px!important;
    height:38px!important;
    padding:5px 9px!important;
    font-size:13px!important;
    line-height:1!important;
    margin:0!important;
  }
}

/* Normal desktop */
@media(min-width:1180px){
  .article-head .center-compact-row > .context-info{
    gap:9px 13px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    font-size:13px!important;
    gap:9px 13px!important;
  }
  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    padding-left:10px!important;
    padding-right:10px!important;
    font-size:13.5px!important;
  }
}

/* Crowded desktop: shrink, still NEVER wrap */
@media(min-width:1024px) and (max-width:1179px){
  .article-head .center-compact-row{
    padding-left:12px!important;
    padding-right:12px!important;
  }
  .article-head .center-compact-row > .context-info{
    gap:6px 8px!important;
  }
  .article-head .center-compact-row .n2-voice-setting{
    font-size:12.5px!important;
  }
  .article-head .center-compact-row .n2-voice-select{
    width:clamp(165px,18vw,205px)!important;
    min-width:160px!important;
    font-size:12.5px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    font-size:11.5px!important;
    gap:6px 8px!important;
  }
  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    padding-left:7px!important;
    padding-right:7px!important;
    font-size:12px!important;
  }
}

/* Very narrow desktop: last compression step; still one line */
@media(min-width:1024px) and (max-width:1080px){
  .article-head .center-compact-row .n2-voice-select{
    width:155px!important;
    min-width:155px!important;
  }
  .article-head .center-compact-row .context-meta-group{
    font-size:11px!important;
    gap:5px 6px!important;
  }
  .article-head .center-compact-row .center-compact-action,
  .article-head .center-compact-row .content-inline-action{
    padding-left:6px!important;
    padding-right:6px!important;
    font-size:11.5px!important;
  }
}

/* Tablet / mobile: wrapping is allowed only here */
@media(max-width:1023px){
  .article-head .center-compact-row > .context-info{
    flex-wrap:wrap!important;
    justify-content:center!important;
  }
}


/* source: migration-validation-compat */
html,body{max-width:100%;overflow-x:clip}

/* validation migration compatibility: preserves source content inside PASS system */
.migrated-copy{font-size:1rem;line-height:1.9;color:var(--muted);max-width:100%}
.migrated-copy p{margin:0 0 1rem}.migrated-copy p:last-child{margin-bottom:0}
.migrated-copy strong{color:var(--ink);font-weight:750}
.migrated-copy ul,.migrated-copy ol{margin:.8rem 0 1rem;padding-left:1.35rem}
.migrated-copy li+li{margin-top:.5rem}.migrated-copy br{line-height:1.6}
.migrated-copy .migration-note,.migration-note{margin:18px 0 0;padding:15px 17px;border-left:3px solid var(--grammar);background:var(--panel-soft);border-radius:0 10px 10px 0}
.migration-compare-box{display:grid;gap:14px}.migration-compare-box>div{padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.word-group-title{grid-column:1/-1;margin:10px 0 -2px;padding:0 0 8px;border-bottom:1px solid var(--line);font-weight:800;color:var(--ink);font-size:1rem;letter-spacing:.02em}
.migration-study,.migration-guide,.migration-disclaimer{width:min(100%,880px);margin:36px auto 0;padding:24px 0;border-top:1px solid var(--line)}
.migration-study h2,.migration-guide h2{margin:0 0 12px;font-size:1.2rem}.migration-study .migrated-copy,.migration-guide .migrated-copy{font-size:.96rem}
.migration-disclaimer{font-size:.86rem;color:var(--muted);padding-top:18px}
@media(max-width:700px){.migrated-copy{font-size:.96rem;line-height:1.85}.migration-study,.migration-guide,.migration-disclaimer{margin-top:28px;padding-top:20px}}


/* source: validation-refinements-v2 */

/* =========================================================
   7-page validation refinement v2
   confirmed refinements:
   - long vocabulary titles scale down by length
   - content returns to centered book-reading axis
   - quiz instructions use deliberate line breaks
   - reference disclaimer is short and low-emphasis
   ========================================================= */

/* Book-like centered reading axis */
.words-grid,
.study-focus,
.vocab-related,
.migration-guide,
.migration-disclaimer,
.related{
  width:min(100%,980px);
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Long vocabulary titles: scale instead of filling the viewport */
@media (min-width:901px){
  .article-head h1.title-adaptive-long{
    font-size:clamp(42px,4.25vw,56px)!important;
    line-height:1.12!important;
    letter-spacing:-.035em!important;
    text-wrap:balance;
  }
  .article-head h1.title-adaptive-xlong{
    font-size:clamp(38px,3.85vw,50px)!important;
    line-height:1.14!important;
    letter-spacing:-.03em!important;
    text-wrap:balance;
  }
}

/* Quiz lead: Japanese / Chinese / count are deliberate lines */
.article-head .lead .lead-line{
  display:block;
}
.article-head .lead .lead-zh{
  margin-top:2px;
}
.article-head .lead .lead-count{
  display:block;
  margin-top:1px;
  color:#74807c;
  font-size:.88em;
  line-height:1.6;
}

/* Short, quiet reference information */
.migration-disclaimer{
  margin-top:34px!important;
  padding-top:20px!important;
  padding-bottom:0!important;
  border-top:1px solid #e1e6e3!important;
  color:#6f7b77!important;
}
.migration-disclaimer .reference-label{
  margin:0 0 7px!important;
  color:#7f8a86!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.06em!important;
}
.migration-disclaimer .reference-line{
  margin:0!important;
  font-size:13px!important;
  line-height:1.85!important;
}
.migration-disclaimer .reference-line + .reference-line{
  margin-top:4px!important;
}
.migration-disclaimer a{
  color:inherit!important;
  text-underline-offset:3px;
}

@media (max-width:900px){
  .words-grid,
  .study-focus,
  .vocab-related,
  .migration-guide,
  .migration-disclaimer,
  .related{
    width:100%;
  }
}


/* source: validation-refinements-v3 */

/* =========================================================
   7-page validation refinement v3
   confirmed:
   1. nuance key phrases = restrained warm underline
   2. remove redundant legacy part-of-speech metadata row
   3. reference info = one compact fixed small-text row on desktop
   ========================================================= */

/* Nuance emphasis: only marked key phrases, not whole paragraphs */
.nuance-key{
  position:relative;
  display:inline;
  font-weight:650;
  z-index:0;
  text-decoration:none!important;
  background:
    linear-gradient(
      to top,
      rgba(216,184,82,.32) 0,
      rgba(216,184,82,.32) 34%,
      transparent 34%,
      transparent 100%
    );
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
  padding:0 .05em;
}

/* Reference information: quiet, single desktop line */
.migration-disclaimer.reference-inline{
  width:min(100%,980px)!important;
  margin:30px auto 0!important;
  padding:14px 0 0!important;
  border-top:1px solid #e1e6e3!important;
  display:flex!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  gap:8px!important;
  color:#7b8682!important;
  font-size:12px!important;
  line-height:1.65!important;
  white-space:nowrap!important;
}
.migration-disclaimer.reference-inline .reference-label{
  flex:0 0 auto!important;
  margin:0!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.04em!important;
  color:#727d79!important;
}
.migration-disclaimer.reference-inline .reference-copy{
  margin:0!important;
  min-width:0!important;
  font-size:12px!important;
  line-height:inherit!important;
  color:inherit!important;
  white-space:nowrap!important;
}
.migration-disclaimer.reference-inline a{
  color:inherit!important;
  text-underline-offset:3px!important;
}

@media(max-width:900px){
  .migration-disclaimer.reference-inline{
    display:block!important;
    white-space:normal!important;
    font-size:12px!important;
  }
  .migration-disclaimer.reference-inline .reference-copy{
    margin-top:4px!important;
    white-space:normal!important;
  }
}


/* source: confirmed-compare-system-v4 */

/* =========================================================
   v4 confirmed compare system
   Desktop: true 3-column comparison table
   Mobile: attribute-by-attribute comparison blocks
   ========================================================= */

.compare-table-wrap{
  width:min(100%,980px);
  margin:22px auto 0;
}

.compare-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#fff;
  border:1px solid #dfe5e2;
  border-radius:14px;
  overflow:hidden;
}

.compare-table th,
.compare-table td{
  padding:14px 16px;
  border-right:1px solid #e4e8e6;
  border-bottom:1px solid #e4e8e6;
  text-align:left;
  vertical-align:top;
  line-height:1.75;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td{
  border-bottom:0;
}

.compare-table th:last-child,
.compare-table td:last-child{
  border-right:0;
}

.compare-table thead th{
  background:#f4f6f5;
  color:#2a3531;
  font-size:.93rem;
  font-weight:750;
}

.compare-table thead th:first-child{
  width:108px;
}

.compare-table tbody th{
  width:108px;
  background:#fafbfa;
  color:#68736f;
  font-size:.86rem;
  font-weight:700;
  white-space:nowrap;
}

.compare-table .grammar-name{
  display:inline-block;
  white-space:nowrap;
  word-break:keep-all;
  overflow-wrap:normal;
  font-weight:750;
}

.compare-table .jp-example{
  display:block;
  margin-bottom:4px;
  color:#17201d;
}

.compare-table .zh-example{
  display:block;
  color:#6c7873;
  font-size:.92em;
}

.compare-mobile{
  display:none;
}

@media(max-width:760px){
  .compare-table-wrap{
    width:100%;
  }
  .compare-table{
    display:none;
  }
  .compare-mobile{
    display:grid;
    gap:14px;
  }
  .compare-mobile-item{
    border-top:1px solid #dfe5e2;
    padding-top:12px;
  }
  .compare-mobile-label{
    margin:0 0 8px;
    color:#697570;
    font-size:.8rem;
    font-weight:750;
    letter-spacing:.04em;
  }
  .compare-mobile-pair{
    display:grid;
    gap:9px;
  }
  .compare-mobile-side{
    padding:10px 12px;
    background:#f8faf9;
    border-left:3px solid #cfd9d4;
  }
  .compare-mobile-grammar{
    display:block;
    margin-bottom:4px;
    font-weight:750;
    white-space:nowrap;
    word-break:keep-all;
  }
}

/* 659060014 line-break and book-axis refinements */
#compare,
.section-compare,
.section-core,
.section-connection,
.section-examples,
.section-nuance{
  scroll-margin-top:90px;
}

.section-core .deep-copy,
.section-nuance .deep-copy,
.section-compare .deep-copy,
.section-examples .examples-list,
.section-connection .formulas{
  width:min(100%,860px);
  margin-left:auto;
  margin-right:auto;
}

.grammar-unit,
.section-compare strong,
.section-core strong,
.section-nuance strong{
  word-break:keep-all;
  overflow-wrap:normal;
}

@media(min-width:901px){
  .section-compare h2{
    text-wrap:balance;
  }
}


/* source: confirmed-compare-system-v5 */

/* v5: section title clean-up + unified compare table */
.section h2 .nuance-key,
.section h2 .grammar-unit,
.section h3 .nuance-key,
.section h3 .grammar-unit{
  background:none !important;
  background-image:none !important;
  box-shadow:none !important;
  text-decoration:none !important;
  border-bottom:0 !important;
  padding:0 !important;
}

.compare-table-wrap{
  width:min(100%,980px);
  margin:18px auto 0;
}
.compare-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#fff;
  border:1px solid #dfe5e2;
  border-radius:16px;
  overflow:hidden;
}
.compare-table th,
.compare-table td{
  padding:14px 16px;
  border-right:1px solid #e4e8e6;
  border-bottom:1px solid #e4e8e6;
  text-align:left;
  vertical-align:top;
  line-height:1.72;
  word-break:normal;
  overflow-wrap:break-word;
}
.compare-table th:last-child,
.compare-table td:last-child{border-right:0;}
.compare-table tr:last-child th,
.compare-table tr:last-child td{border-bottom:0;}
.compare-table thead th{
  background:#f4f6f5;
  color:#20302b;
  font-weight:780;
  font-size:.95rem;
}
.compare-table thead th:first-child{
  width:118px;
}
.compare-table tbody th{
  width:118px;
  background:#fafbfa;
  color:#67726e;
  font-weight:760;
  font-size:.86rem;
  white-space:nowrap;
}
.compare-table .grammar-name,
.compare-mobile-grammar{
  display:inline-block;
  font-weight:780;
  white-space:nowrap;
  word-break:keep-all;
  overflow-wrap:normal;
}
.compare-table .jp-example,
.compare-mobile .jp-example{
  display:block;
  margin-bottom:4px;
  color:#18221e;
}
.compare-table .zh-example,
.compare-mobile .zh-example{
  display:block;
  color:#68746f;
  font-size:.93em;
}
.compare-intro{
  margin:0 0 8px;
}
.compare-mobile{display:none;}

html[data-theme="dark"] .compare-table{
  background:#1d2422;
  border-color:#3b4541;
}
html[data-theme="dark"] .compare-table thead th{
  background:#25302d;
  color:#e8efec;
}
html[data-theme="dark"] .compare-table tbody th{
  background:#212927;
  color:#b8c4bf;
}
html[data-theme="dark"] .compare-table td,
html[data-theme="dark"] .compare-table th{
  border-color:#3a4541;
}
html[data-theme="dark"] .compare-table .jp-example{color:#f1f4f2;}
html[data-theme="dark"] .compare-table .zh-example{color:#c4cfca;}

@media (max-width:760px){
  .compare-table{display:none;}
  .compare-mobile{display:grid;gap:12px;}
  .compare-mobile-item{
    border:1px solid #dfe5e2;
    border-radius:14px;
    overflow:hidden;
    background:#fff;
  }
  .compare-mobile-label{
    padding:10px 12px;
    background:#f4f6f5;
    color:#5f6b66;
    font-size:.8rem;
    font-weight:760;
    letter-spacing:.04em;
  }
  .compare-mobile-pair{display:grid;grid-template-columns:1fr;}
  .compare-mobile-side{
    padding:12px 12px 13px;
    border-top:1px solid #e4e8e6;
  }
  .compare-mobile-side:first-child{border-top:0;}
  .compare-mobile-side:nth-child(1){border-left:4px solid #b8cbc1;}
  .compare-mobile-side:nth-child(2){border-left:4px solid #d3d9f3;}
  html[data-theme="dark"] .compare-mobile-item{background:#1d2422;border-color:#3b4541;}
  html[data-theme="dark"] .compare-mobile-label{background:#25302d;color:#bfc9c4;}
  html[data-theme="dark"] .compare-mobile-side{border-color:#3a4541;}
}


/* source: second-batch-v2 grammar title wrapping */
.article-head h1{
  text-wrap:balance;
}
.article-head h1 .grammar-title-inline,
.article-head h1 .grammar-title-split{
  display:inline-flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:baseline;
  gap:0 .18em;
  max-width:100%;
}
.article-head h1 .grammar-title-part{
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
}
.article-head h1 .grammar-unit,
.article-head h1 .grammar-title-note,
.article-head h1 .grammar-title-sub{
  display:inline-block;
  white-space:nowrap;
  background:none !important;
  background-image:none !important;
  box-shadow:none !important;
  text-decoration:none !important;
  border-bottom:0 !important;
  padding:0 !important;
}
.article-head h1 .grammar-separator{
  display:inline-block;
  padding:0 .06em 0 .04em;
  color:currentColor;
}
.article-head h1 .grammar-title-note,
.article-head h1 .grammar-title-sub{
  font-size:.72em;
  line-height:1.15;
  font-weight:680;
  color:#4f6978;
}
.article-head h1 .grammar-title-inline .grammar-title-note,
.article-head h1 .grammar-title-inline .grammar-title-sub{
  margin-left:.06em;
}
@media(max-width:767px){
  .article-head h1 .grammar-title-note,
  .article-head h1 .grammar-title-sub{
    font-size:.74em;
  }
}


/* source: second-batch-v3 structured connection table */
.section-connection .deep-copy{
  width:min(100%,900px);
  margin-left:auto;
  margin-right:auto;
}
.connection-table-wrap{
  width:100%;
  margin:18px auto 0;
}
.connection-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#fff;
  border:1px solid #dce5e1;
  border-radius:14px;
  overflow:hidden;
}
.connection-table th,
.connection-table td{
  padding:14px 16px;
  border-right:1px solid #e3e9e6;
  border-bottom:1px solid #e3e9e6;
  text-align:left;
  vertical-align:top;
  line-height:1.72;
}
.connection-table th:last-child,
.connection-table td:last-child{border-right:0;}
.connection-table tr:last-child th,
.connection-table tr:last-child td{border-bottom:0;}
.connection-table thead th{
  background:#f3f7f5;
  color:#253530;
  font-size:.86rem;
  font-weight:780;
}
.connection-table thead th:nth-child(1){width:24%;}
.connection-table thead th:nth-child(2){width:34%;}
.connection-table thead th:nth-child(3){width:42%;}
.connection-kind{
  color:#52635d;
  font-size:.9rem;
  font-weight:760;
}
.connection-rule-main{
  display:inline-block;
  color:#173f60;
  font-weight:760;
  word-break:keep-all;
  overflow-wrap:normal;
}
.connection-examples{
  display:flex;
  flex-wrap:wrap;
  gap:5px 12px;
  align-items:baseline;
}
.connection-examples > span,
.connection-examples > li{
  display:inline-block;
}
.connection-examples ul,
.connection-examples ol{
  margin:0;
  padding-left:1.15em;
}
.connection-examples .connection-divider{
  color:#a7b1ad;
}
.connection-empty{color:#9aa6a1;}
.connection-notes{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.connection-note{
  margin:0;
  padding:11px 14px;
  background:#f5f8f6;
  border-left:3px solid #9bb6aa;
  color:#52635d;
  line-height:1.75;
}
.connection-mobile{display:none;}
html[data-theme="dark"] .connection-table{
  background:#1d2422;
  border-color:#3a4541;
}
html[data-theme="dark"] .connection-table thead th{
  background:#25302d;
  color:#e8efec;
}
html[data-theme="dark"] .connection-table th,
html[data-theme="dark"] .connection-table td{border-color:#3a4541;}
html[data-theme="dark"] .connection-kind{color:#bac6c1;}
html[data-theme="dark"] .connection-rule-main{color:#a8d3f0;}
html[data-theme="dark"] .connection-note{
  background:#202926;
  border-left-color:#718f83;
  color:#c2ccc8;
}
@media(max-width:760px){
  .connection-table{display:none;}
  .connection-mobile{display:grid;gap:12px;}
  .connection-mobile-item{
    border:1px solid #dce5e1;
    border-radius:13px;
    overflow:hidden;
    background:#fff;
  }
  .connection-mobile-kind{
    padding:10px 12px;
    background:#f3f7f5;
    color:#52635d;
    font-size:.82rem;
    font-weight:780;
  }
  .connection-mobile-row{
    display:grid;
    grid-template-columns:52px minmax(0,1fr);
    gap:8px;
    padding:10px 12px;
    border-top:1px solid #e3e9e6;
  }
  .connection-mobile-label{
    color:#87938e;
    font-size:.76rem;
    font-weight:760;
  }
  .connection-mobile-value{min-width:0;line-height:1.7;}
  .connection-mobile-value .connection-rule-main{
    white-space:normal;
    word-break:keep-all;
  }
  html[data-theme="dark"] .connection-mobile-item{background:#1d2422;border-color:#3a4541;}
  html[data-theme="dark"] .connection-mobile-kind{background:#25302d;color:#c0cbc6;}
  html[data-theme="dark"] .connection-mobile-row{border-color:#3a4541;}
  html[data-theme="dark"] .connection-mobile-label{color:#8f9d97;}
}

/* source: fourth-batch-v4 connection line-break refinement */
/* Presentation only: keep the confirmed CONNECTION layout while avoiding awkward orphaned grammar chunks. */
.connection-note{
  text-wrap:pretty;
  overflow-wrap:break-word;
}
.connection-note strong{
  word-break:keep-all;
  overflow-wrap:normal;
}

/* source: final-11-v3 compare grammar label readability */
/* Desktop comparison table: keep grammar names in the first column at normal reading size. */
@media (min-width:761px){
  .compare-table tbody th{
    font-size:1rem;
    line-height:1.65;
  }
  .compare-table .grammar-name{
    font-size:1rem;
    line-height:1.65;
  }
}


/* source: final-11-v5 long compare grammar label wrap fix */
/* Allow long grammar names in the first column of compare tables to wrap naturally on desktop. */
@media (min-width:761px){
  .compare-table.compare-list-table tbody th{
    white-space:normal;
  }
  .compare-table.compare-list-table .grammar-name{
    display:block;
    white-space:normal;
    word-break:break-word;
    overflow-wrap:anywhere;
    line-height:1.6;
  }
}


/* source: final-11-v7 compare first-column readability */
/* Keep grammar labels in comparison tables at the confirmed desktop reading size. */
@media (min-width:761px){
  .compare-table.compare-list-table tbody th,
  .compare-table.compare-list-table .grammar-name{
    font-size:1.08rem!important;
    line-height:1.6!important;
  }
}

/* source: all-batches-first-audit-v2 compare typography normalization */
/* Desktop: keep every comparison table at the confirmed readable scale used by 659060048. */
@media (min-width:761px){
  .section-compare .compare-table thead th{
    font-size:1.05rem!important;
    line-height:1.55!important;
  }
  .section-compare .compare-table thead .grammar-name{
    font-size:1.08rem!important;
    line-height:1.55!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    text-wrap:balance;
  }
  .section-compare .compare-table tbody th{
    font-size:1rem!important;
    line-height:1.65!important;
  }
  .section-compare .compare-table td{
    font-size:1rem!important;
    line-height:1.78!important;
  }
  .section-compare .compare-table .jp-example{
    font-size:1.02rem!important;
    line-height:1.85!important;
  }
  .section-compare .compare-table .zh-example{
    font-size:.95rem!important;
    line-height:1.72!important;
  }
  .section-compare .compare-table.compare-list-table tbody th,
  .section-compare .compare-table.compare-list-table .grammar-name{
    font-size:1.08rem!important;
    line-height:1.6!important;
  }
}

/* Mobile: do not let the comparison system fall back to the old small annotation scale. */
@media (max-width:760px){
  .section-compare .compare-mobile-label{
    font-size:.88rem!important;
    line-height:1.5!important;
  }
  .section-compare .compare-mobile-grammar{
    font-size:1rem!important;
    line-height:1.55!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
  }
  .section-compare .compare-mobile-side > div{
    font-size:.96rem!important;
    line-height:1.72!important;
  }
  .section-compare .compare-mobile .jp-example{
    font-size:1rem!important;
    line-height:1.82!important;
  }
  .section-compare .compare-mobile .zh-example{
    font-size:.92rem!important;
    line-height:1.7!important;
  }
}


/* comparison template */

/* N2 comparison / technique master template v1 — 659060067 */
.comparison-page{--to:#496979;--ba:#526e9b;--tara:#4f7d68;--nara:#9a7131}
.comparison-head h1{font-size:clamp(44px,8vw,78px)}
.comparison-head .meaning strong{font-weight:700;color:#274c66}
.condition-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:30px;border-top:1px solid var(--editorial-line-strong);border-bottom:1px solid var(--editorial-line-strong)}
.condition-card{padding:24px 20px 24px;border-right:1px solid var(--editorial-line);background:#fff}
.condition-card:last-child{border-right:0}
.condition-symbol{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 12px;border:1px solid currentColor;font:700 24px/1 var(--serif);letter-spacing:-.02em}
.type-to .condition-symbol,.mini-symbol.type-to,.mobile-compare.type-to h3{color:var(--to)}
.type-ba .condition-symbol,.mini-symbol.type-ba,.mobile-compare.type-ba h3{color:var(--ba)}
.type-tara .condition-symbol,.mini-symbol.type-tara,.mobile-compare.type-tara h3{color:var(--tara)}
.type-nara .condition-symbol,.mini-symbol.type-nara,.mobile-compare.type-nara h3{color:var(--nara)}
.condition-role{margin:16px 0 2px;color:#89928f;font-size:10px;font-weight:800;letter-spacing:.12em}
.condition-card h3{margin:0 0 10px;font:700 19px/1.4 var(--serif);color:#26332f}
.condition-card>p:not(.condition-role){margin:0;color:#58635f;font-size:14px;line-height:1.8}
.condition-key{display:block;margin-top:16px;padding-top:13px;border-top:1px solid #edf0ee;color:#71807a;font-size:11px;font-weight:700;line-height:1.6}
.decision-strip{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:24px;padding:15px 0;border-top:1px solid var(--editorial-line);border-bottom:1px solid var(--editorial-line);font-size:13px;color:#52605b}
.decision-strip strong{color:#29465a}.decision-strip span{white-space:nowrap}
.condition-table-wrap,.master-compare-wrap{overflow-x:auto;margin-top:28px;border:1px solid var(--editorial-line-strong)}
.condition-table,.master-compare-table{width:100%;border-collapse:collapse;table-layout:fixed;background:#fff}
.condition-table th,.condition-table td,.master-compare-table th,.master-compare-table td{padding:15px 16px;border-right:1px solid #edf0ee;border-bottom:1px solid #e7ebe9;text-align:left;vertical-align:top;line-height:1.75;font-size:14px}
.condition-table tr:last-child>* ,.master-compare-table tr:last-child>*{border-bottom:0}
.condition-table tr>*:last-child,.master-compare-table tr>*:last-child{border-right:0}
.condition-table thead th,.master-compare-table thead th{background:#f4f7f6;color:#53615c;font-size:11px;font-weight:800;letter-spacing:.05em}
.condition-table tbody th{width:90px;background:#fafbfa;text-align:center}
.mini-symbol{display:inline-block;min-width:42px;padding:5px 8px;border:1px solid currentColor;font:700 18px/1.3 var(--serif);text-align:center}
.status{display:inline-block;padding:3px 8px;font-size:11px;font-weight:800;border:1px solid}
.status-no{color:#8a4d4d;background:#fff8f7;border-color:#e5c8c5}.status-warn{color:#82662e;background:#fffaf0;border-color:#e3d2a9}.status-yes{color:#426d5d;background:#f4faf7;border-color:#c8ded4}
.connection-note{margin-top:24px;padding:18px 0 0 20px;border-left:2px solid #8da7b7;color:#4c5955}.connection-note strong{display:block;margin-bottom:4px;color:#27465a;font-size:12px;letter-spacing:.08em}.connection-note p{margin:0;line-height:1.9}
.micro-contrast{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:30px;border-top:1px solid var(--editorial-line-strong);border-bottom:1px solid var(--editorial-line-strong)}
.micro-contrast>div{padding:20px 24px 22px 0}.micro-contrast>div+div{padding-left:28px;border-left:1px solid var(--editorial-line)}
.micro-label{color:#6c7d76;font-size:10px;font-weight:800;letter-spacing:.12em}.micro-contrast p{margin:8px 0 0;color:#485550;font-size:14px;line-height:1.9}.micro-contrast strong{font-family:"Noto Sans JP",var(--sans);color:#1f4d6c}
.strategy-flow{border-top:1px solid var(--editorial-line-strong)}
.strategy-step{display:grid;grid-template-columns:52px 1fr;gap:20px;padding:22px 0;border-bottom:1px solid var(--editorial-line)}
.strategy-step>span{font:700 13px/1.4 var(--serif);color:#6e8ba0}.strategy-step strong{display:block;margin-bottom:4px;color:#263a48}.strategy-step p{margin:0;color:#55625d;line-height:1.9}
.practice-card{margin-top:34px;padding:26px 28px 28px;border:1px solid #d8e1dc;background:#fff}
.practice-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.practice-kicker{display:block;color:#6d837b;font-size:10px;font-weight:800;letter-spacing:.13em}.practice-top h3{margin:4px 0 0;font:700 20px/1.5 var(--serif);color:#263530}.practice-question{margin-top:24px!important}.practice-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:22px}.practice-options button{min-height:48px;border:1px solid #cfd7d3;background:#fff;color:#2f3d38;padding:10px 12px;cursor:pointer;font-family:"Noto Sans JP",var(--sans);font-size:15px}.practice-options button:hover,.practice-options button:focus-visible{border-color:#6f8998;background:#f7fafb;outline:none}.practice-options button.is-correct{border-color:#6f9b88;background:#edf7f2;color:#285d49;font-weight:800}.practice-options button.is-wrong{border-color:#bb7a75;background:#fff3f1;color:#843f39}.practice-options button:disabled{cursor:default}.practice-answer{margin-top:20px;padding:17px 20px;border-left:3px solid #6f9b88;background:#f5faf7;color:#45544e}.practice-answer strong{color:#2c674f}.practice-answer ul{margin:9px 0 0;padding-left:20px}.practice-status{min-height:1.5em;margin:10px 0 0;color:#66736e;font-size:13px}
.master-compare-table thead th{text-align:center}.master-compare-table thead th:first-child{text-align:left;width:120px}.master-compare-table tbody th{background:#fafbfa;color:#68746f;font-size:11px;font-weight:800}.master-compare-table td{text-align:center;color:#44524d}.master-compare-table td strong{color:#315f82}
.mobile-compare-cards{display:none}
.closing-note{margin-top:28px;padding:20px 0 0 20px;border-left:3px solid #557f9d}.closing-note strong{font:700 18px/1.6 var(--serif);color:#2a3a34}.closing-note p{margin:6px 0 0;color:#53605b;line-height:1.9}
@media(max-width:900px){.condition-cards{grid-template-columns:1fr 1fr}.condition-card:nth-child(2){border-right:0}.condition-card:nth-child(-n+2){border-bottom:1px solid var(--editorial-line)}.master-compare-table{min-width:760px}}
@media(max-width:700px){.comparison-head h1{font-size:44px}.condition-cards{display:block}.condition-card{border-right:0;border-bottom:1px solid var(--editorial-line);padding:20px 0}.condition-card:last-child{border-bottom:0}.condition-card{display:grid;grid-template-columns:58px 1fr;column-gap:14px}.condition-symbol{grid-row:1/5;align-self:start}.condition-role{margin-top:0}.condition-card h3{margin-bottom:4px}.condition-key{margin-top:9px;padding-top:8px}.decision-strip{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}.decision-strip strong{grid-column:1/-1}.condition-table-wrap{border-left:0;border-right:0;margin-left:-16px;margin-right:-16px}.condition-table{min-width:660px}.micro-contrast{grid-template-columns:1fr}.micro-contrast>div{padding:18px 0}.micro-contrast>div+div{padding-left:0;border-left:0;border-top:1px solid var(--editorial-line)}.strategy-step{grid-template-columns:40px 1fr;gap:12px}.practice-card{padding:22px 18px}.practice-options{grid-template-columns:1fr}.master-compare-wrap{display:none}.mobile-compare-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mobile-compare{padding:18px;border:1px solid var(--editorial-line-strong);background:#fff}.mobile-compare h3{margin:0 0 12px;font:700 24px/1 var(--serif)}.mobile-compare dl{margin:0}.mobile-compare dl div{display:grid;grid-template-columns:48px 1fr;gap:10px;padding:8px 0;border-top:1px solid #edf0ee}.mobile-compare dt{color:#89928f;font-size:10px;font-weight:800}.mobile-compare dd{margin:0;color:#45524d;font-size:13px;line-height:1.6}}
@media(max-width:430px){.mobile-compare-cards{grid-template-columns:1fr}.decision-strip{grid-template-columns:1fr}.decision-strip strong{grid-column:auto}}
html[data-theme="dark"] .comparison-page{--to:#8bb1c2;--ba:#96add5;--tara:#8cbba5;--nara:#cfad70}
html[data-theme="dark"] .condition-card,html[data-theme="dark"] .condition-table,html[data-theme="dark"] .master-compare-table,html[data-theme="dark"] .practice-card,html[data-theme="dark"] .mobile-compare{background:#17201e;color:#e7eeeb}
html[data-theme="dark"] .condition-card h3,html[data-theme="dark"] .practice-top h3,html[data-theme="dark"] .closing-note strong{color:#edf3f0}
html[data-theme="dark"] .condition-card>p:not(.condition-role),html[data-theme="dark"] .micro-contrast p,html[data-theme="dark"] .strategy-step p,html[data-theme="dark"] .master-compare-table td,html[data-theme="dark"] .mobile-compare dd{color:#bac5c0}
html[data-theme="dark"] .condition-table thead th,html[data-theme="dark"] .master-compare-table thead th,html[data-theme="dark"] .condition-table tbody th,html[data-theme="dark"] .master-compare-table tbody th{background:#1c2724;color:#aebbb6}
html[data-theme="dark"] .practice-options button{background:#18211f;border-color:#43514c;color:#dfe8e4}
html[data-theme="dark"] .practice-options button:hover{background:#202c29}
html[data-theme="dark"] .practice-options button.is-correct{background:#1d352b;color:#b8e3cf;border-color:#5e927b}
html[data-theme="dark"] .practice-options button.is-wrong{background:#3a2624;color:#efb9b4;border-color:#9d6863}
html[data-theme="dark"] .practice-answer{background:#1b2b25;color:#c5d4cd}



/* ===== COMPARISON TEMPLATE V2: responsive reading polish ===== */
.connection-mobile-list{display:none}
.comparison-page .example-tag{font-size:13px;font-weight:800;letter-spacing:.02em;line-height:1.45;color:#35536a}
.comparison-page .example-label{align-items:center}
.comparison-page .example-num{flex:0 0 auto}
.comparison-page .section h2,
.comparison-page .section-intro,
.comparison-page .core-lead{overflow-wrap:anywhere}

@media (min-width:701px){
  .comparison-page .section>h2,
  .comparison-page .section>.section-intro{max-width:820px}
  .comparison-page .condition-card h3{font-size:20px}
  .comparison-page .condition-role{font-size:11px}
  .comparison-page .condition-key{font-size:12px}
  .comparison-page .example-tag{font-size:13.5px}
}

@media (max-width:900px){
  .comparison-page{width:min(100% - 40px,820px)}
  .comparison-page .section{padding-left:0!important;padding-right:0!important}
  .comparison-page .section-kicker{position:static!important;width:auto!important;text-align:center;margin-bottom:10px!important}
  .comparison-page .section>h2,
  .comparison-page .section>.section-intro,
  .comparison-page .section>.core-lead{text-align:center;margin-left:auto!important;margin-right:auto!important}
  .comparison-page .core-lead{max-width:720px;padding:0!important;border-left:0!important}
  .comparison-page .condition-card{text-align:center}
  .comparison-page .condition-symbol{margin-inline:auto}
  .comparison-page .condition-role,.comparison-page .condition-card h3,.comparison-page .condition-card>p:not(.condition-role),.comparison-page .condition-key{text-align:center}
  .comparison-page .decision-strip{justify-content:center;text-align:center}
  .comparison-page .example-tag{font-size:14px}
}

@media (max-width:700px){
  body{font-size:16px;line-height:1.82}
  .comparison-page{width:calc(100% - 30px);padding-top:34px;padding-bottom:64px}
  .comparison-head{text-align:center}
  .comparison-head h1{font-size:clamp(38px,12vw,48px);line-height:1.12;letter-spacing:-.035em}
  .comparison-head .meaning{max-width:31em;margin-left:auto;margin-right:auto;font-size:18px;line-height:1.72;text-align:center}
  .comparison-head .article-tools{justify-content:center;align-items:center}
  .comparison-head .meta{justify-content:center;text-align:center}
  .comparison-head .tool-actions{width:auto}
  .comparison-head .tool-btn{min-width:132px}

  .comparison-page .section{padding-top:38px!important;padding-bottom:42px!important}
  .comparison-page .section-kicker{font-size:11px!important;letter-spacing:.11em!important;line-height:1.55}
  .comparison-page .section>h2{max-width:12.5em;font-size:clamp(27px,8vw,33px);line-height:1.38;text-wrap:balance}
  .comparison-page .section>.section-intro{max-width:31em;font-size:16px;line-height:1.85;text-wrap:pretty}
  .comparison-page .section>.core-lead{max-width:29em;font-size:18px!important;line-height:1.8!important;text-wrap:pretty}

  .comparison-page .condition-cards{margin-top:24px}
  .comparison-page .condition-card{display:block;padding:25px 12px 26px}
  .comparison-page .condition-symbol{width:max-content;min-width:56px;height:56px;font-size:28px}
  .comparison-page .condition-role{margin:12px 0 3px;font-size:12px;letter-spacing:.08em}
  .comparison-page .condition-card h3{margin-bottom:8px;font-size:22px;line-height:1.45}
  .comparison-page .condition-card>p:not(.condition-role){max-width:28em;margin-inline:auto;font-size:15.5px;line-height:1.85}
  .comparison-page .condition-key{max-width:28em;margin:13px auto 0;padding-top:11px;font-size:13px;line-height:1.7}
  .comparison-page .decision-strip{display:flex;flex-direction:column;align-items:center;gap:7px;margin-top:20px;font-size:14px;line-height:1.7}
  .comparison-page .decision-strip strong{margin-bottom:2px}
  .comparison-page .decision-strip span{white-space:normal}

  /* 接續與限制：手機完全直式，不使用橫向 table / scroll */
  .comparison-page .condition-table-wrap{display:none!important}
  .comparison-page .connection-mobile-list{display:grid;grid-template-columns:1fr;gap:14px;margin-top:24px}
  .comparison-page .connection-mobile-card{border:1px solid var(--editorial-line-strong);background:#fff;padding:20px 18px;text-align:center}
  .comparison-page .connection-mobile-head{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:14px}
  .comparison-page .connection-mobile-head .mini-symbol{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 10px;border:1px solid currentColor;font:700 24px/1 var(--serif)}
  .comparison-page .connection-mobile-head strong{font:700 19px/1.45 var(--serif);color:#293733}
  .comparison-page .connection-mobile-card dl{margin:0}
  .comparison-page .connection-mobile-card dl>div{display:grid;grid-template-columns:1fr;gap:4px;padding:11px 0;border-top:1px solid #edf0ee}
  .comparison-page .connection-mobile-card dt{color:#7b8783;font-size:12px;font-weight:800;letter-spacing:.04em}
  .comparison-page .connection-mobile-card dd{margin:0;color:#34423d;font-size:15px;line-height:1.75;overflow-wrap:anywhere}
  .comparison-page .connection-note{text-align:center;padding:18px 16px 0;margin-top:22px;border-left:0;border-top:3px solid #557f9d}
  .comparison-page .connection-note strong{display:block;font-size:18px}
  .comparison-page .connection-note p{max-width:31em;margin:7px auto 0;font-size:14.5px;line-height:1.85;text-align:left}

  .comparison-page .example{padding:27px 0 30px!important}
  .comparison-page .example-head{align-items:center}
  .comparison-page .example-label{min-width:0;display:flex;align-items:center;gap:10px}
  .comparison-page .example-tag{font-size:15px!important;font-weight:850;letter-spacing:0;line-height:1.45;color:#2b5674;white-space:normal;text-wrap:balance}
  .comparison-page .example-num{font-size:24px}
  .comparison-page .jp{font-size:21px!important;line-height:2.05!important;text-align:left;overflow-wrap:anywhere}
  .comparison-page .translation{font-size:15px;line-height:1.8;text-align:left}
  .comparison-page .insight{text-align:left}

  .comparison-page .mobile-compare-cards{grid-template-columns:1fr!important;gap:14px}
  .comparison-page .mobile-compare{text-align:center;padding:20px 17px}
  .comparison-page .mobile-compare h3{font-size:28px}
  .comparison-page .mobile-compare dl div{grid-template-columns:1fr;gap:4px;padding:10px 0}
  .comparison-page .mobile-compare dt{font-size:12px}
  .comparison-page .mobile-compare dd{font-size:14.5px;line-height:1.72}

  .comparison-page .strategy-step,.comparison-page .practice-card,.comparison-page .closing-note{text-align:left}
}

@media (max-width:390px){
  .comparison-page{width:calc(100% - 26px)}
  .comparison-head h1{font-size:38px}
  .comparison-page .section>h2{font-size:27px}
  .comparison-page .section>.core-lead{font-size:17px!important}
  .comparison-page .example-tag{font-size:14.5px!important}
  .comparison-page .example-actions{gap:5px}
  .comparison-page .example-action{width:38px;height:38px}
}

html[data-theme="dark"] .connection-mobile-card{background:#19201e;border-color:#39423f}
html[data-theme="dark"] .connection-mobile-head strong{color:#e5ebe8}
html[data-theme="dark"] .connection-mobile-card dl>div{border-top-color:#303936}
html[data-theme="dark"] .connection-mobile-card dd{color:#d7dfdb}
html[data-theme="dark"] .connection-mobile-card dt{color:#9da8a4}



/* ===== V2.1: tablet centering + no horizontal comparison scroll ===== */
.comparison-page .example-tag{font-size:15px!important}
@media (max-width:900px){
  .comparison-head{text-align:center}
  .comparison-head .meaning{margin-left:auto;margin-right:auto;text-align:center}
  .comparison-head .article-tools{justify-content:center}
  .comparison-head .meta{justify-content:center;text-align:center}
  .comparison-head .tool-actions{justify-content:center}
  .master-compare-wrap{display:none!important}
  .mobile-compare-cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .mobile-compare{text-align:center}
  .comparison-page .example-tag{font-size:15.5px!important}
}
@media (max-width:700px){
  .mobile-compare-cards{grid-template-columns:1fr!important}
  .comparison-page .example-tag{font-size:16px!important}
}
@media (max-width:390px){
  .comparison-page .example-tag{font-size:15.5px!important}
}



/* v3.1 desktop tuning: section nav + colored sections + centered JLPT heading */
body{background:#f2ede3!important}
.page.comparison-page{padding-top:24px!important;padding-bottom:72px!important}
.article-head.comparison-head{
  background:#fbf8f2!important;
  border:1px solid #dfd7c9!important;
  border-radius:24px!important;
  padding:40px clamp(18px,3vw,34px) 34px!important;
  box-shadow:0 10px 28px rgba(50,46,39,.04)!important;
  margin-bottom:14px!important;
}
.comparison-reading-index{margin:0 0 10px!important;padding:0 4px 2px!important}
.comparison-reading-index a{padding-top:16px!important;padding-bottom:16px!important;margin-right:28px!important}
.comparison-page .section{
  margin:0 0 24px!important;
  padding:34px clamp(18px,3vw,34px) 38px!important;
  border:1px solid #dfd7c9!important;
  border-radius:24px!important;
  box-shadow:0 8px 24px rgba(50,46,39,.035)!important;
  background:#fffdf8!important;
}
.comparison-page .section:last-of-type{border-bottom:1px solid #dfd7c9!important}
.comparison-page .section-heading{margin-bottom:26px!important}
.comparison-page .section-heading > p:not(.section-kicker){max-width:860px}
.section-tint-blue{background:linear-gradient(180deg,#f8fbfd 0%,#fdfcf8 100%)!important}
.section-tint-sky{background:linear-gradient(180deg,#f9fcfe 0%,#ffffff 100%)!important}
.section-tint-lilac{background:linear-gradient(180deg,#fbf9fe 0%,#fffdf9 100%)!important}
.section-tint-green{background:linear-gradient(180deg,#f8fbf8 0%,#fffdf8 100%)!important}
.section-tint-peach{background:linear-gradient(180deg,#fffaf5 0%,#fffefd 100%)!important}
.section-tint-ink{background:linear-gradient(180deg,#f6f8fb 0%,#fffefd 100%)!important}
.section-tint-gold{background:linear-gradient(180deg,#fffbf2 0%,#fffefd 100%)!important}
#jlpt .desktop-heading-center{max-width:900px;margin:0 auto 30px!important;text-align:center!important}
#jlpt .desktop-heading-center .section-kicker,
#jlpt .desktop-heading-center h2,
#jlpt .desktop-heading-center p{text-align:center!important;margin-left:auto!important;margin-right:auto!important}
#jlpt .jlpt-steps{max-width:1040px;margin-left:auto!important;margin-right:auto!important}
#jlpt .beginner-practice{max-width:1040px;margin-left:auto!important;margin-right:auto!important}
#mistakes .section-heading h2,#jlpt .section-heading h2,#summary .section-heading h2{line-height:1.28!important}
@media (min-width:901px){
  .comparison-page .section-heading h2{max-width:14em}
  #jlpt .section-heading h2{max-width:none}
}
@media (max-width:900px){
  body{background:#f6f2ea!important}
  .article-head.comparison-head{border-radius:20px!important;padding:30px 18px 26px!important;margin-bottom:10px!important}
  .comparison-reading-index{padding:0!important}
  .comparison-page .section{margin:0 0 16px!important;padding:26px 16px 28px!important;border-radius:18px!important}
}

/* =========================================================
   V3.2 — 正式 N2 模板式背景分區
   參考既有 Grammar PASS 頁：矩形淡色區域 + 上方主題色線
   ========================================================= */

body{
  background:#fff !important;
}

.page.comparison-page{
  background:#fff !important;
  padding-top:18px !important;
}

/* 文章首區回到正式模板的乾淨白底，不做大圓角卡片 */
.article-head.comparison-head{
  background:#fff !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:34px 10px 28px !important;
  margin-bottom:0 !important;
}

/* 段落索引：沿用其他 N2 模板的細線式導覽 */
.comparison-reading-index{
  margin:0 0 0 !important;
  padding:0 10px 1px !important;
  border-top:1px solid #cbd4d8 !important;
  border-bottom:1px solid #cbd4d8 !important;
  background:#fff !important;
}
.comparison-reading-index a{
  padding-top:14px !important;
  padding-bottom:13px !important;
  margin-right:30px !important;
}

/* 所有大章節改為正式教材式矩形分區 */
.comparison-page .section{
  margin:0 0 20px !important;
  padding:28px clamp(28px,4vw,58px) 34px !important;
  border-radius:0 !important;
  box-shadow:none !important;
  border:1px solid var(--section-border,#d6e1e8) !important;
  border-top:3px solid var(--section-accent,#5f8ead) !important;
  background:var(--section-bg,#f5f9fc) !important;
}

/* 參考截圖中的低飽和區域色 */
.comparison-page #start{
  --section-bg:#f5f9fc;
  --section-border:#d5e3ec;
  --section-accent:#5e8fad;
}
.comparison-page #scene{
  --section-bg:#f5f9fc;
  --section-border:#d7e4eb;
  --section-accent:#6e9bad;
}
.comparison-page #pair{
  --section-bg:#faf8fc;
  --section-border:#e3dceb;
  --section-accent:#8b789f;
}
.comparison-page #forms{
  --section-bg:#f4faf8;
  --section-border:#d7e7e1;
  --section-accent:#6f988a;
}
.comparison-page #mistakes{
  --section-bg:#fff8f2;
  --section-border:#eadfd3;
  --section-accent:#b58a61;
}
.comparison-page #jlpt{
  --section-bg:#f5f9fc;
  --section-border:#d6e1e9;
  --section-accent:#547f9d;
}
.comparison-page #summary{
  --section-bg:#fffbf3;
  --section-border:#eadfc8;
  --section-accent:#c39a52;
}
.comparison-page #related{
  --section-bg:#fafafa;
  --section-border:#e1e3e2;
  --section-accent:#8b9893;
}

/* 大區域內的小內容保留白底，形成「教材紙張」層次 */
.comparison-page .mistake-card,
.comparison-page .jlpt-steps li,
.comparison-page .beginner-practice,
.comparison-page .form-card,
.comparison-page .pair-card,
.comparison-page .scene-card,
.comparison-page .summary-card{
  background:rgba(255,255,255,.88) !important;
}

/* JLPT 區桌機繼續維持置中標題 */
@media (min-width:901px){
  #jlpt .desktop-heading-center{
    max-width:900px !important;
    margin:0 auto 30px !important;
    text-align:center !important;
  }
  #jlpt .desktop-heading-center .section-kicker,
  #jlpt .desktop-heading-center h2,
  #jlpt .desktop-heading-center p{
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

/* 手機維持目前直式閱讀；只把背景區域改成正式模板矩形感 */
@media (max-width:900px){
  body{
    background:#fff !important;
  }
  .article-head.comparison-head{
    padding:28px 14px 24px !important;
  }
  .comparison-reading-index{
    padding-left:4px !important;
    padding-right:4px !important;
  }
  .comparison-page .section{
    margin:0 0 14px !important;
    padding:25px 16px 28px !important;
    border-radius:0 !important;
  }
}


/* =========================================================
   V3.3 — PRACTICE 重整 + 相關文法固定模板
   ========================================================= */

/* PRACTICE：教材式層級，不把英文小標與標題擠成同一行 */
#jlpt .beginner-practice{
  max-width:920px!important;
  margin:34px auto 0!important;
  padding:28px 30px 30px!important;
  border:1px solid #d7e0e5!important;
  border-top:3px solid #5f88a2!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
#jlpt .practice-head{
  display:block!important;
  margin:0 0 24px!important;
  padding:0 0 18px!important;
  border-bottom:1px solid #e1e6e8!important;
  text-align:left!important;
}
#jlpt .practice-kicker{
  display:block!important;
  margin:0 0 6px!important;
  color:#315f82!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.15em!important;
  line-height:1.4!important;
}
#jlpt .practice-title{
  margin:0!important;
  color:#17211f!important;
  font:700 23px/1.45 var(--serif)!important;
  letter-spacing:-.015em!important;
}
#jlpt .practice-lead{
  margin:7px 0 0!important;
  color:#6c7773!important;
  font-size:13px!important;
  line-height:1.75!important;
}
#jlpt .practice-question{
  padding:10px 10px 20px!important;
  text-align:center!important;
}
#jlpt .beginner-practice .question-jp{
  margin:0!important;
  font-size:20px!important;
  line-height:2.05!important;
  text-align:center!important;
}
#jlpt .beginner-practice .question-zh{
  margin:12px 0 0!important;
  color:#44504c!important;
  font-size:15px!important;
  line-height:1.8!important;
  text-align:center!important;
}
#jlpt .practice-options{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  margin-top:4px!important;
}
#jlpt .practice-options button{
  min-height:58px!important;
  border:1px solid #cfd8dc!important;
  background:#fff!important;
  font-size:17px!important;
  line-height:1.45!important;
  transition:border-color .15s ease,background .15s ease,transform .15s ease!important;
}
#jlpt .practice-options button:hover,
#jlpt .practice-options button:focus-visible{
  border-color:#698da2!important;
  background:#f7fafc!important;
  transform:translateY(-1px);
}
#jlpt .practice-options button.is-correct{
  border-color:#6f9b88!important;
  background:#edf7f2!important;
  color:#285d49!important;
}
#jlpt .practice-options button.is-wrong{
  border-color:#bb7a75!important;
  background:#fff3f1!important;
  color:#843f39!important;
}
#jlpt .practice-feedback{
  min-height:1.5em!important;
  margin:14px 0 0!important;
  text-align:center!important;
  color:#66736e!important;
  font-size:13px!important;
}
#jlpt .answer-explain{
  margin-top:18px!important;
  padding:18px 20px!important;
  border-radius:0!important;
  border-left:3px solid #6f9b88!important;
  background:#f5faf7!important;
}

/* 相關文法：完全比照既有 N2 Grammar 固定模板 */
.comparison-page .related{
  padding:50px 0 0!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.comparison-page .related h2{
  margin:0 0 8px!important;
  font:700 26px/1.3 var(--serif)!important;
  letter-spacing:0!important;
}
.comparison-page .related-intro{
  margin:0 0 22px!important;
  color:#929896!important;
  font-size:13px!important;
  line-height:1.6!important;
}
.comparison-page .related ul{
  list-style:none!important;
  margin:0!important;
  padding:0!important;
  border-top:1px solid var(--line,#e5e8e6)!important;
}
.comparison-page .related li{
  margin:0!important;
  padding:0!important;
  border-bottom:1px solid var(--line,#e5e8e6)!important;
}
.comparison-page .related a{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  padding:17px 0!important;
  color:inherit!important;
  text-decoration:none!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
}
.comparison-page .related a:hover .related-title{
  text-decoration:underline!important;
  text-underline-offset:4px!important;
}
.comparison-page .related-title{
  color:inherit!important;
  font-size:inherit!important;
  font-weight:650!important;
  overflow-wrap:anywhere!important;
}
.comparison-page .related-meta{
  color:#9aa19f!important;
  font-size:11px!important;
  white-space:nowrap!important;
  opacity:1!important;
}

@media(max-width:680px){
  #jlpt .beginner-practice{
    padding:22px 16px 24px!important;
    margin-top:26px!important;
  }
  #jlpt .practice-head{
    text-align:center!important;
    margin-bottom:18px!important;
    padding-bottom:15px!important;
  }
  #jlpt .practice-title{
    font-size:20px!important;
    text-align:center!important;
  }
  #jlpt .practice-lead{
    text-align:center!important;
  }
  #jlpt .practice-question{
    padding:8px 0 16px!important;
  }
  #jlpt .beginner-practice .question-jp{
    font-size:18px!important;
  }
  #jlpt .practice-options{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  #jlpt .practice-options button{
    min-height:52px!important;
    font-size:16px!important;
  }
  .comparison-page .related{
    padding-top:38px!important;
  }
  .comparison-page .related a{
    padding:15px 0!important;
    gap:12px!important;
  }
}

/* v29 final QA overrides */
.hero-control-row{width:min(920px,100%);margin:18px auto 0;display:flex;align-items:center;justify-content:center;gap:26px 34px;flex-wrap:wrap}.hero-control-row .lyrics-mode-switch{margin:0!important}.hero-control-row .lyrics-color-legend{margin:0!important}.lyrics-topic-head .lyrics-mode-switch{gap:22px!important}.lyrics-topic-head .mode-switch-btn{min-width:92px!important}.lyrics-topic-head .lyrics-color-legend{gap:8px 16px!important}.phrase b ruby rt,.related-title ruby rt,.related-grid strong ruby rt{font-size:.68em}.phrase b{line-height:1.45;overflow-wrap:anywhere}.phrase span{line-height:1.7}.related .eyebrow{margin-bottom:8px}.related-grid{margin-top:18px}.related-grid a:hover{border-color:var(--accent,#2f6f9f)}@media (max-width:860px){.hero-control-row{gap:14px;flex-direction:column}.lyrics-topic-head .lyrics-mode-switch{justify-content:center!important}.lyrics-topic-head .lyrics-color-legend{justify-content:center!important}}



/* V3 Beginner First — 2026-08-20 */
.beginner-heading{text-align:center;max-width:780px;margin-inline:auto}
.beginner-heading h2{max-width:760px;margin-left:auto;margin-right:auto;text-wrap:balance}
.beginner-heading p:not(.section-kicker){max-width:720px;margin-left:auto;margin-right:auto}
.beginner-rule-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:26px}
.beginner-rule-card,.form-card,.summary-card{border:1px solid var(--line,#dfe5e2);background:var(--surface,#fff);padding:24px 20px;text-align:center;border-radius:18px;min-width:0}
.big-form{font-size:36px;line-height:1;font-weight:900;letter-spacing:.02em;margin-bottom:12px}
.big-form.small{font-size:28px;margin:0}
.beginner-rule-card h3{font-size:20px;line-height:1.35;margin:0 0 9px;text-wrap:balance}
.plain-rule{font-size:15px;line-height:1.8;margin:0 auto 16px;max-width:22em}
.mini-scene{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:11px 10px;border-radius:12px;background:color-mix(in srgb,currentColor 5%,transparent);font-size:14px;font-weight:800}
.scene-arrow{opacity:.55}.tiny-term{margin:12px 0 0;font-size:12px;line-height:1.65;opacity:.66}
.beginner-keyline{margin:22px auto 0;max-width:860px;padding:17px 20px;border:1px solid var(--line,#dfe5e2);border-radius:16px;text-align:center;font-size:16px;line-height:1.75;background:var(--surface,#fff)}
.scene-stack{display:grid;gap:16px;max-width:900px;margin:26px auto 0}.scene-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:18px;border:1px solid var(--line,#dfe5e2);border-radius:18px;padding:22px;background:var(--surface,#fff);min-width:0}.scene-number{font-size:12px;font-weight:900;opacity:.45;padding-top:7px}.scene-main{min-width:0}.scene-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:18px;margin-bottom:14px}.form-pill{display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:5px 10px;border:1px solid currentColor;border-radius:999px;font-size:16px;line-height:1;font-weight:900}.jp-example{font-size:21px;line-height:2;margin:0;text-wrap:pretty;overflow-wrap:anywhere}.zh-example{font-size:15px;line-height:1.75;margin:4px 0 14px;opacity:.78}.why-box,.wrong-note{margin:10px 0 0;padding:13px 15px;border-radius:12px;line-height:1.75;font-size:14px}.why-box{background:color-mix(in srgb,var(--accent,#3d6d62) 7%,transparent)}.wrong-note{border:1px dashed var(--line,#dfe5e2);opacity:.88}.dialogue-mini{display:grid;gap:8px;margin-bottom:8px}.dialogue-mini p{margin:0;font-size:18px;line-height:1.9}.speaker{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:50%;border:1px solid currentColor;font-size:12px;font-weight:900;margin-right:6px}
.pair-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:26px}.pair-card{border:1px solid var(--line,#dfe5e2);border-radius:18px;padding:22px;background:var(--surface,#fff);min-width:0}.pair-card.pair-ba{grid-column:1/-1;max-width:760px;width:100%;justify-self:center}.pair-card h3{text-align:center;font-size:20px;margin:0 0 12px}.pair-question{text-align:center;line-height:1.75;margin:0 0 18px}.pair-example{padding:14px 15px;border-radius:12px;background:color-mix(in srgb,var(--accent,#3d6d62) 5%,transparent);margin-top:10px}.pair-example p{margin:0 0 5px;line-height:1.8;font-size:16px;overflow-wrap:anywhere}.pair-example span{font-size:13px;line-height:1.6;opacity:.76}.plain-note{text-align:center;font-size:14px;line-height:1.75;margin:14px 0 0}
.form-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:26px}.form-card{text-align:left}.form-card-head{display:flex;align-items:center;gap:12px;justify-content:center;font-size:18px;text-align:center;margin-bottom:14px}.form-examples{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}.form-examples span{padding:7px 10px;border:1px solid var(--line,#dfe5e2);border-radius:10px;font-size:13px;background:color-mix(in srgb,var(--accent,#3d6d62) 4%,transparent)}.form-card>p{font-size:14px;line-height:1.8;margin:8px 0}.form-card .tiny-term{text-align:center}
.mistake-list{display:grid;gap:12px;max-width:860px;margin:26px auto 0}.mistake-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:15px;align-items:start;border:1px solid var(--line,#dfe5e2);border-radius:16px;padding:18px;background:var(--surface,#fff)}.mistake-no{display:flex;width:34px;height:34px;border-radius:50%;align-items:center;justify-content:center;background:color-mix(in srgb,var(--accent,#3d6d62) 11%,transparent);font-weight:900}.mistake-card h3{font-size:17px;margin:2px 0 6px}.mistake-card p{font-size:14px;line-height:1.75;margin:0}
.jlpt-steps{list-style:none;padding:0;max-width:820px;margin:26px auto;display:grid;gap:10px}.jlpt-steps li{display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;align-items:start;padding:15px 17px;border:1px solid var(--line,#dfe5e2);border-radius:14px;background:var(--surface,#fff)}.jlpt-steps li>span{display:flex;width:32px;height:32px;border-radius:50%;align-items:center;justify-content:center;font-weight:900;background:color-mix(in srgb,var(--accent,#3d6d62) 10%,transparent)}.jlpt-steps strong{font-size:15px}.jlpt-steps p{font-size:13px;line-height:1.6;margin:4px 0 0;opacity:.76}.beginner-practice{max-width:820px;margin-left:auto;margin-right:auto}.beginner-practice .question-jp{font-size:18px;line-height:2;text-align:center}.beginner-practice .question-zh{text-align:center}.practice-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.practice-options button{min-height:48px}.answer-explain{margin-top:14px;padding:15px;border-radius:12px;background:color-mix(in srgb,var(--accent,#3d6d62) 6%,transparent);line-height:1.75}.answer-explain p{margin:6px 0}
.summary-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:26px}.summary-card{display:flex;flex-direction:column;align-items:center;gap:8px}.summary-card strong{font-size:17px;line-height:1.45;text-wrap:balance}.summary-card p{font-size:13px;line-height:1.55;margin:0;opacity:.72}.summary-card em{font-style:normal;font-size:13px;font-weight:800;padding-top:4px}.final-memory{text-align:center;margin:22px auto 0;max-width:700px;border:1px solid var(--line,#dfe5e2);border-radius:16px;padding:18px;background:var(--surface,#fff)}.final-memory p{margin:3px 0;font-size:16px;line-height:1.7}
.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}.related-grid a{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line,#dfe5e2);padding:14px 16px;border-radius:12px;text-decoration:none;min-width:0}.related-grid strong{overflow-wrap:anywhere}.related-grid span{white-space:nowrap;font-size:12px;opacity:.6}
.tone-to{--local-tone:#37745f}.tone-ba{--local-tone:#496aa7}.tone-tara{--local-tone:#a3663d}.tone-nara{--local-tone:#755a9f}.tone-to .big-form,.tone-to .form-pill{color:var(--local-tone)}.tone-ba .big-form,.tone-ba .form-pill{color:var(--local-tone)}.tone-tara .big-form,.tone-tara .form-pill{color:var(--local-tone)}.tone-nara .big-form,.tone-nara .form-pill{color:var(--local-tone)}
@media(max-width:980px){.beginner-rule-grid,.summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.pair-grid,.form-stack{grid-template-columns:1fr}.pair-card.pair-ba{grid-column:auto;max-width:none}.related-grid{grid-template-columns:1fr}}
@media(max-width:680px){
  .comparison-head{text-align:center}.comparison-head .meaning{max-width:32em;margin-left:auto;margin-right:auto;text-wrap:balance}.comparison-head .article-tools{justify-content:center}.comparison-head .meta{justify-content:center}
  .section{overflow:visible}.section-heading,.beginner-heading{text-align:center}.section-heading h2,.beginner-heading h2{font-size:clamp(22px,7vw,29px);line-height:1.3;text-wrap:balance}.section-heading p,.beginner-heading p{text-align:center}
  .beginner-rule-grid,.summary-cards{grid-template-columns:1fr;gap:12px}.beginner-rule-card{padding:20px 16px}.big-form{font-size:34px}.beginner-rule-card h3{font-size:20px}.plain-rule{font-size:15px}
  .scene-card{grid-template-columns:1fr;gap:8px;padding:18px 15px;text-align:center}.scene-number{padding:0}.scene-title{justify-content:center}.jp-example{font-size:19px;line-height:2;text-align:center}.zh-example{text-align:center}.why-box,.wrong-note{text-align:left}.dialogue-mini{text-align:left;max-width:100%;overflow-wrap:anywhere}.dialogue-mini p{font-size:17px}
  .pair-card,.form-card{padding:18px 15px}.pair-example{text-align:left}.pair-question{text-align:center}.form-card{text-align:center}.form-card>p{text-align:left}.form-examples{flex-direction:column;align-items:stretch}.form-examples span{text-align:center;width:100%}
  .mistake-card,.jlpt-steps li{grid-template-columns:36px minmax(0,1fr);gap:11px;padding:15px 13px}.mistake-card{text-align:left}.mistake-no,.jlpt-steps li>span{width:30px;height:30px}
  .practice-options{grid-template-columns:1fr}.beginner-practice .question-jp{font-size:17px;line-height:2}.answer-explain{text-align:left}
  .related-grid a{align-items:flex-start;flex-direction:column;text-align:center}.related-grid span{white-space:normal}.related-grid a>*{width:100%}
  .beginner-keyline,.final-memory{padding:16px 14px}.beginner-keyline{display:grid;gap:4px}
}
@media(max-width:390px){.beginner-rule-card,.scene-card,.pair-card,.form-card,.summary-card{border-radius:14px}.scene-title{font-size:17px}.jp-example{font-size:18px}.section-kicker{font-size:11px}.form-pill{font-size:15px;min-width:40px}}



/* ===== LYRICS STUDY V4 — exact N2 shell ===== */
.lyrics-page{
  width:min(1180px,calc(100% - 64px))!important;
  margin-inline:auto!important;
  padding:0 0 54px!important;
}
.lyrics-page .hero{
  width:100%;
  margin:0;
  padding:48px 0 42px;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(320px,.72fr);
  gap:46px;
  align-items:end;
}
.lyrics-page .hero-kicker{
  margin:0 0 12px;
  font-size:11px;
  letter-spacing:.12em;
  color:var(--accent,var(--n2-blue,#2f6f9f));
  font-weight:800;
}
.lyrics-page .hero h1{
  margin:0;
  font-family:"Noto Serif JP","Yu Mincho",serif;
  font-size:clamp(48px,6.3vw,82px);
  line-height:1;
  letter-spacing:-.04em;
  color:var(--text,#1b1f23);
  font-weight:600;
}
.lyrics-page .hero-sub{
  max-width:600px;
  margin:18px 0 0;
  color:var(--muted,#667085);
  font-size:16px;
}
.lyrics-page .hero-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-top:18px;
  color:var(--muted,#667085);
  font-size:12px;
}
.lyrics-page .cover{
  min-height:230px;
  border:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
  box-shadow:none;
  padding:26px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.lyrics-page .cover small{font-size:10px;letter-spacing:.14em;color:var(--muted,#667085)}
.lyrics-page .cover strong{font-family:"Noto Serif JP","Yu Mincho",serif;font-size:34px;line-height:1.2;margin-top:8px}
.lyrics-page .cover span{font-size:13px;color:var(--muted,#667085);margin-top:8px}

.mv-section{
  width:min(100%,1000px);
  margin:0 auto 48px;
  padding:22px 0 42px;
  border-top:1px solid var(--line,#e5e7eb);
  border-bottom:1px solid var(--line,#e5e7eb);
}
.mv-head{display:flex;justify-content:space-between;align-items:end;gap:22px;margin-bottom:16px}
.mv-kicker{margin:0 0 4px;font-size:10px;letter-spacing:.13em;color:var(--accent,var(--n2-blue,#2f6f9f));font-weight:800}
.mv-head h2{margin:0;font-size:28px;line-height:1.3}
.mv-head p:not(.mv-kicker){margin:6px 0 0;color:var(--muted,#667085);font-size:13px}
.mv-youtube-link{font-size:12px;color:var(--text,#1b1f23);text-decoration:none;border-bottom:1px solid currentColor}
.mv-frame{position:relative;aspect-ratio:16/9;background:#111;overflow:hidden}
.mv-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.mv-load{width:100%;height:100%;border:0;background:linear-gradient(135deg,#171717,#282828);color:#fff;display:grid;place-items:center;align-content:center;gap:12px}
.mv-play-icon{width:60px;height:60px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(255,255,255,.45);font-size:22px;padding-left:4px}
.mv-load-copy{display:grid;gap:2px}.mv-load-copy strong{font-size:16px}.mv-load-copy small{font-size:11px;color:#c8c8c8;font-weight:400}

.workspace{
  width:min(100%,1060px)!important;
  margin:0 auto 52px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.4fr) minmax(310px,.72fr)!important;
  gap:38px!important;
  align-items:start!important;
}
.lyrics-head{display:flex;align-items:end;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid var(--line,#e5e7eb)}
.lyrics-head h2,.study-panel h2{margin:0;font-size:26px;line-height:1.3}
.modebar{display:flex;gap:8px}
.modebar button{border:1px solid var(--line,#e5e7eb);background:var(--surface,#fff);color:var(--muted,#667085);border-radius:999px;padding:6px 10px;font-size:12px}
.modebar button.active{background:var(--text,#1b1f23);color:#fff;border-color:var(--text,#1b1f23)}
.lyric-line{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid var(--line,#e5e7eb);background:transparent;color:var(--text,#1b1f23);padding:18px 0}
.lyric-line:hover{background:color-mix(in srgb,var(--surface,#fff) 85%,#dbeafe 15%)}
.lyric-line.active{padding-left:12px;border-left:3px solid var(--accent,var(--n2-blue,#2f6f9f));background:color-mix(in srgb,var(--surface,#fff) 88%,#dbeafe 12%)}
.lyric-jp{display:block;font-family:"Noto Serif JP","Yu Mincho",serif;font-size:21px;line-height:1.9}
.lyric-zh{display:none;color:var(--muted,#667085);font-size:14px;padding-top:7px}
.show-all .lyric-zh,.lyric-line.active .lyric-zh{display:block}
.study-panel{position:sticky;top:82px;border:1px solid var(--line,#e5e7eb);background:var(--surface,#fff);padding:22px;box-shadow:none}
.study-label{font-size:10px;letter-spacing:.12em;color:var(--accent,var(--n2-blue,#2f6f9f));font-weight:800}
.selected-jp{font-family:"Noto Serif JP","Yu Mincho",serif;font-size:22px;line-height:1.7;margin:14px 0 6px}
.selected-zh{color:var(--muted,#667085);font-size:14px}
.study-grid{display:grid;gap:14px;margin-top:16px}
.study-block{border-top:1px solid var(--line,#e5e7eb);padding-top:11px}
.study-block small{display:block;color:var(--muted,#667085);font-size:10px;letter-spacing:.1em;margin-bottom:4px}
.study-block ul{margin:5px 0 0;padding-left:18px;color:var(--muted,#667085);font-size:13px}
.mobile-detail{display:none}
.after{width:min(100%,820px)!important;margin:0 auto!important;display:block!important}
.after article{border-top:1px solid var(--text,#1b1f23);padding-top:14px}
.after .eyebrow{font-size:10px;letter-spacing:.13em;color:var(--muted,#667085)}
.after h3{margin:6px 0 5px;font-size:25px}
.after p{margin:0 0 13px;color:var(--muted,#667085)}
.phrases{display:grid}
.phrase{display:grid;grid-template-columns:170px 1fr;gap:16px;padding:9px 0;border-top:1px solid var(--line,#e5e7eb)}
.phrase b{font-size:17px}.phrase span{font-size:13px;color:var(--muted,#667085)}

@media(max-width:900px){
  .lyrics-page{width:min(100% - 28px,1180px)!important}
  .lyrics-page .hero{grid-template-columns:1fr;gap:22px;padding:34px 0 30px}
  .lyrics-page .hero h1{font-size:clamp(42px,13vw,64px)}
  .lyrics-page .cover{min-height:170px}
  .mv-section{padding-top:18px;margin-bottom:34px}
  .mv-head{display:block}
  .mv-youtube-link{display:inline-block;margin-top:10px}
  .workspace{grid-template-columns:1fr!important;gap:20px!important}
  .study-panel{display:none}
  .lyric-jp{font-size:18px}
  .lyric-line{padding:16px 0}
  .mobile-detail{display:none;padding:14px 12px 16px;border-bottom:1px solid var(--line,#e5e7eb);background:var(--surface,#fff)}
  .lyric-line.active + .mobile-detail{display:block}
  .mobile-detail .md-tag{font-size:10px;letter-spacing:.1em;color:var(--accent,var(--n2-blue,#2f6f9f));font-weight:800}
  .mobile-detail p{font-size:13px;margin:6px 0}
  .mobile-detail ul{font-size:12px;color:var(--muted,#667085);padding-left:18px}
  .phrase{grid-template-columns:120px 1fr}
}



.sync-status{margin:8px 0 2px;color:var(--muted,#667085);font-size:12px}
.sync-status.is-playing{color:var(--accent,var(--n2-blue,#2f6f9f));font-weight:700}
.sync-toggle.active{border-color:var(--accent,var(--n2-blue,#2f6f9f))!important;color:var(--accent,var(--n2-blue,#2f6f9f))!important;background:transparent!important}
.lyric-line{position:relative;padding-left:72px!important}
.lyric-time{position:absolute;left:0;top:22px;width:58px;color:var(--muted,#8a8f98);font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
.lyric-line.active{
  border-left:3px solid var(--accent,var(--n2-blue,#2f6f9f))!important;
  padding-left:81px!important;
}
.lyric-line.active .lyric-time{left:9px;color:var(--accent,var(--n2-blue,#2f6f9f));font-weight:800}
.selected-time{margin-top:14px;color:var(--accent,var(--n2-blue,#2f6f9f));font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
.mv-frame .mv-gate{position:absolute;inset:0}
.mv-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.mv-api-note{position:absolute;left:10px;bottom:8px;z-index:2;color:#bbb;font-size:10px;background:rgba(0,0,0,.55);padding:4px 7px;border-radius:5px}
@media(max-width:900px){
  .lyrics-head{align-items:flex-start!important;gap:12px!important}
  .modebar{flex-wrap:wrap;justify-content:flex-end}
  .lyric-line{padding-left:0!important;padding-top:29px!important}
  .lyric-line.active{padding-left:10px!important}
  .lyric-time{left:0;top:9px;width:auto}
  .lyric-line.active .lyric-time{left:10px}
}



/* V7: existing N2 page title is the only title; remove duplicate song hero */
.lyrics-page{
  padding-top:22px!important;
}
.mv-section{
  margin-top:0!important;
  padding-top:0!important;
  border-top:0!important;
}
@media(max-width:900px){
  .lyrics-page{
    padding-top:14px!important;
  }
}



.sync-offset{
  display:flex;
  align-items:center;
  gap:5px;
  margin-left:4px;
}
.sync-offset span{
  font-size:10px;
  color:var(--muted,#667085);
  margin-right:2px;
}
.sync-offset button{
  padding:5px 7px!important;
  min-width:auto!important;
  font-size:10px!important;
}
.sync-offset button.active{
  border-color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  background:transparent!important;
}
@media(max-width:700px){
  .sync-offset{width:100%;justify-content:flex-end;margin-top:4px}
}



/* playback controls */
.player-controls{display:flex;gap:6px}
.player-btn{border:1px solid var(--line,#e5e7eb);background:var(--surface,#fff);color:var(--text,#1b1f23);border-radius:999px;padding:6px 10px;font-size:12px}
.player-btn:disabled{opacity:.38;cursor:not-allowed}

/* category colors */
.tag{display:inline-flex;align-items:center;min-height:21px;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.02em;margin-right:5px;border:1px solid currentColor}
.tag-grammar{color:#7b4bb7;background:#f7f1ff}
.tag-verb{color:#2563a6;background:#eef6ff}
.tag-noun{color:#55745a;background:#f1f7f2}
.tag-adj{color:#b6682e;background:#fff5ec}
.tag-adverb{color:#8a548f;background:#fbf1fc}
.tag-muted{color:#7a7f87;background:#f5f5f5}
.grammar-text{color:#7b4bb7}
.study-tags{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0 4px}
.vocab-row{display:grid;grid-template-columns:auto minmax(70px,auto) 1fr;gap:8px;align-items:center;padding:7px 0;border-top:1px solid var(--line,#e5e7eb);font-size:13px}
.vocab-row:first-child{border-top:0}
.vocab-row strong{font-size:15px}
.vocab-row span:last-child{color:var(--muted,#667085)}
.nuance-block p,.grammar-block p{margin:5px 0 0;color:var(--muted,#667085);font-size:13px}

/* persistent compact controller while reading lyrics */
.mv-dock{
  position:fixed;right:18px;bottom:18px;z-index:120;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-width:280px;max-width:380px;padding:10px 12px;
  border:1px solid var(--line,#e5e7eb);
  background:color-mix(in srgb,var(--surface,#fff) 94%,transparent);
  backdrop-filter:blur(14px);box-shadow:0 14px 42px rgba(0,0,0,.14);
  border-radius:14px;
}
.mv-dock-title{font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mv-dock-actions{display:flex;gap:6px}
.mv-dock-actions button{border:1px solid var(--line,#e5e7eb);background:var(--surface,#fff);border-radius:999px;padding:5px 8px;font-size:11px}
.mv-dock[hidden]{display:none!important}

/* desktop/tablet: keep actual MV visible next to lyrics while reading */
@media(min-width:901px){
  .mv-section{
    position:sticky;
    top:72px;
    z-index:30;
  }
  /* once reading area begins, video remains reachable and compact control remains visible */
  .workspace{position:relative}
}

/* tablet refinement */
@media(min-width:701px) and (max-width:1100px){
  .workspace{grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr)!important;gap:28px!important}
  .study-panel{top:76px!important;padding:18px!important}
  .lyric-jp{font-size:19px!important}
  .modebar{flex-wrap:wrap;justify-content:flex-end}
}

/* mobile: keep a small controller always reachable; avoid covering lyrics */
@media(max-width:900px){
  .player-controls{width:100%;justify-content:flex-end}
  .lyrics-head{align-items:flex-start!important}
  .mv-dock{
    left:10px;right:10px;bottom:10px;min-width:0;max-width:none;
    border-radius:12px;padding:8px 10px;
  }
  .mv-dock-title{font-size:11px}
  .mv-dock-actions button{padding:5px 7px}
  .lyrics-side{padding-bottom:70px}
  .mobile-detail{
    border-left:3px solid transparent;
  }
  .lyric-line.active + .mobile-detail{
    border-left-color:var(--accent,var(--n2-blue,#2f6f9f));
  }
}

@media(max-width:520px){
  .modebar{gap:5px!important}
  .modebar button{font-size:10px!important;padding:5px 7px!important}
  .sync-offset{justify-content:flex-start!important}
  .vocab-row{grid-template-columns:auto 1fr}
  .vocab-row span:last-child{grid-column:2}
}



.grammar-kind{margin-left:8px;color:var(--muted,#667085);font-size:12px}
.basic-word-note{margin-left:6px;color:var(--muted,#667085);font-size:13px}
.md-grammar-title{font-weight:700;color:#7b4bb7!important;margin-bottom:4px!important}



/* Clean MV heading */
.mv-head{margin-bottom:12px!important}

/* Only two reading controls */
.modebar{display:flex!important;align-items:center!important;gap:8px!important}
.modebar .sync-toggle,
.modebar [data-mode="focus"]{display:inline-flex!important}

/* lyric semantic colors */
.lyric-token{font-weight:650}
.lyric-grammar{color:#7b4bb7}
.lyric-verb{color:#2563a6}
.lyric-noun{color:#55745a}
.lyric-adj{color:#b6682e}
.lyric-adverb{color:#a14f8f}
.lyric-line.active .lyric-token{font-weight:750}

/* Fixed player controller: always visible and always usable */
.mv-dock{
  display:flex!important;
  position:fixed!important;
  right:18px!important;
  bottom:18px!important;
  z-index:200!important;
  min-width:310px!important;
  max-width:420px!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:10px 12px!important;
  border:1px solid var(--line,#e5e7eb)!important;
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(14px)!important;
  box-shadow:0 14px 42px rgba(0,0,0,.16)!important;
  border-radius:14px!important;
}
.mv-dock-title{font-size:12px!important;font-weight:800!important}
.mv-dock-actions{display:flex!important;gap:6px!important}
.mv-dock-actions button{
  border:1px solid var(--line,#e5e7eb)!important;
  background:#fff!important;
  color:#1b1f23!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  font-size:11px!important;
  white-space:nowrap!important;
}
.mv-dock-actions button:hover{background:#f5f7fa!important}

@media(max-width:900px){
  .mv-dock{
    left:10px!important;right:10px!important;bottom:10px!important;
    min-width:0!important;max-width:none!important;
    border-radius:12px!important;padding:8px 10px!important;
  }
  .mv-dock-title{display:none!important}
  .mv-dock-actions{width:100%!important;justify-content:space-between!important}
  .mv-dock-actions button{flex:1!important}
  .lyrics-side{padding-bottom:82px!important}
}



/* ===== V13 compact MV + lyrics-first layout ===== */

.workspace{
  width:min(1180px,calc(100% - 48px))!important;
  margin:18px auto 56px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 420px!important;
  gap:34px!important;
  align-items:start!important;
}

.lyrics-side{
  min-width:0;
}

.lyrics-sidebar{
  min-width:0;
  display:grid;
  gap:16px;
  position:sticky;
  top:82px;
}

.compact-mv-card{
  border:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
  padding:14px;
}

.compact-mv-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.compact-mv-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--accent,var(--n2-blue,#2f6f9f));
}

.compact-mv-state{
  font-size:10px;
  color:var(--muted,#667085);
}

.compact-mv-card .mv-shell{
  width:100%!important;
  margin:0!important;
}

.compact-mv-card .mv-frame{
  width:100%!important;
  aspect-ratio:16/9!important;
  min-height:0!important;
  background:#111;
  box-shadow:none!important;
}

.compact-mv-card .mv-gate{
  padding:18px!important;
}

.compact-mv-card .mv-load{
  min-width:0!important;
  width:min(100%,270px)!important;
  padding:14px 16px!important;
}

.compact-mv-card .mv-play-icon{
  width:46px!important;
  height:46px!important;
  font-size:17px!important;
}

.compact-mv-card .mv-load-copy strong{
  font-size:14px!important;
}

.compact-mv-card .mv-load-copy small{
  font-size:10px!important;
}

.compact-mv-controls{
  display:flex;
  gap:8px;
  margin-top:10px;
}

.compact-mv-controls button{
  flex:1;
  border:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
  color:var(--text,#1b1f23);
  border-radius:999px;
  padding:7px 10px;
  font-size:11px;
}

.compact-mv-controls button:hover{
  background:#f6f8fa;
}

.study-panel{
  position:static!important;
  top:auto!important;
  padding:18px!important;
  box-shadow:none!important;
}

.study-panel h2{
  font-size:22px!important;
}

.selected-jp{
  font-size:20px!important;
}

.compact-sync-status{
  margin:6px 0 0!important;
  font-size:11px!important;
}

.lyrics-head{
  position:sticky;
  top:66px;
  z-index:24;
  background:var(--surface,#fff);
  padding-top:10px;
}

.lyric-line{
  scroll-margin-top:140px;
}

/* Fixed global controls stay compact */
.mv-dock{
  min-width:260px!important;
  max-width:340px!important;
}
.mv-dock-title{
  max-width:110px;
}
.mv-dock-actions button{
  padding:5px 8px!important;
}

/* Tablet: MV + current-line panel side by side above lyrics */
@media (min-width:701px) and (max-width:1100px){
  .workspace{
    width:min(100% - 36px,980px)!important;
    grid-template-columns:1fr!important;
    gap:24px!important;
  }

  .lyrics-sidebar{
    grid-row:1;
    position:static;
    display:grid;
    grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
    gap:18px;
  }

  .lyrics-side{
    grid-row:2;
  }

  .compact-mv-card{
    align-self:start;
  }

  .study-panel{
    align-self:stretch;
  }

  .lyrics-head{
    top:62px;
  }
}

/* Mobile: compact MV above lyrics, explanations inline per lyric */
@media (max-width:700px){
  .workspace{
    width:min(100% - 24px,680px)!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
    margin-top:10px!important;
  }

  .lyrics-sidebar{
    grid-row:1;
    position:static;
    display:block;
  }

  .lyrics-side{
    grid-row:2;
  }

  .compact-mv-card{
    padding:10px;
  }

  .compact-mv-head{
    margin-bottom:8px;
  }

  .compact-mv-card .mv-frame{
    max-height:220px;
  }

  .compact-mv-controls{
    margin-top:8px;
  }

  .study-panel{
    display:none!important;
  }

  .lyrics-head{
    top:58px;
    padding-top:8px;
    padding-bottom:8px;
  }

  .lyrics-head h2{
    font-size:22px!important;
  }

  .modebar{
    gap:5px!important;
  }

  .modebar button{
    font-size:10px!important;
    padding:5px 7px!important;
  }

  .mv-dock{
    left:8px!important;
    right:8px!important;
    bottom:8px!important;
    min-width:0!important;
    max-width:none!important;
  }
}

/* Very small phones */
@media (max-width:390px){
  .compact-mv-card .mv-frame{
    max-height:200px;
  }
  .compact-mv-label{font-size:10px}
  .compact-mv-state{font-size:9px}
}



.teacher-legend{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:12px 0 4px;
}
.teacher-block{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line,#e5e7eb);
}
.teacher-eyebrow{
  margin-bottom:6px;
  color:var(--muted,#667085);
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
}
.teacher-core-line{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.teacher-core-line strong{
  color:#7b4bb7;
  font-size:19px;
}
.teacher-kind{
  color:#7b4bb7;
  background:#f7f1ff;
  border-radius:999px;
  padding:3px 8px;
  font-size:10px;
  font-weight:800;
}
.teacher-block p{
  margin:5px 0 0;
  color:var(--text,#1b1f23);
  font-size:13px;
  line-height:1.75;
}
.build-grid{
  display:grid;
  gap:6px;
}
.build-row{
  display:grid;
  grid-template-columns:88px 1fr;
  gap:10px;
  align-items:center;
  min-height:30px;
}
.build-row span{
  color:var(--muted,#667085);
  font-size:11px;
}
.build-row strong{
  font-size:14px;
  color:var(--text,#1b1f23);
}
.teacher-vocab{
  display:grid;
  gap:5px;
}
.teacher-word{
  display:grid;
  grid-template-columns:auto minmax(64px,auto) 1fr;
  gap:7px;
  align-items:center;
  font-size:12px;
}
.teacher-word strong{
  font-size:14px;
}
.teacher-word > span:last-child{
  color:var(--muted,#667085);
}
.teacher-empty{
  color:var(--muted,#667085);
  font-size:12px;
}
.teacher-caution{
  padding:11px 12px;
  border:1px solid #eee6cf;
  background:#fffdf7;
}
.teacher-caution .teacher-eyebrow{
  color:#8b6b24;
}
.md-teacher-note{
  margin-top:8px!important;
  padding:8px 10px;
  background:#fffdf7;
  border-left:3px solid #d7b45a;
  color:#6f5a27!important;
  font-size:12px!important;
}
@media(max-width:700px){
  .teacher-word{
    grid-template-columns:auto 1fr;
  }
  .teacher-word > span:last-child{
    grid-column:2;
  }
}



.lyric-line{overflow:visible!important;white-space:normal!important}
.lyric-jp{display:block!important;overflow:visible!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere}
.lyric-jp ruby{white-space:nowrap}
.lyric-token{display:inline!important;white-space:normal!important}
.lyric-time{white-space:nowrap}
@media(max-width:700px){.lyric-jp{font-size:18px!important;line-height:2!important}}



/* ===== V16 / N2-style lyrics topic + viewport-safe teacher panel ===== */

.lyrics-topic-head{
  width:min(1180px,calc(100% - 48px));
  margin:26px auto 6px;
  padding:0 0 18px;
  border-bottom:1px solid var(--line,#e5e7eb);
}
.lyrics-topic-kicker{
  margin-bottom:4px;
  color:var(--accent,var(--n2-blue,#2f6f9f));
  font-size:11px;
  font-weight:800;
  letter-spacing:.11em;
}
.lyrics-topic-head h1{
  margin:0;
  color:var(--text,#1b1f23);
  font-size:34px;
  line-height:1.25;
  font-weight:800;
}
.lyrics-topic-head p{
  margin:7px 0 10px;
  color:var(--muted,#667085);
  font-size:13px;
  line-height:1.75;
}

/* Text-only colored legend: no pill, no circle, no border/background */
.lyrics-color-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  align-items:center;
  padding-top:4px;
  font-size:13px;
  font-weight:800;
}
.legend-text{
  position:relative;
  padding-left:11px;
}
.legend-text::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:5px;
  height:5px;
  border-radius:1px;
  transform:translateY(-50%);
  background:currentColor;
}
.legend-grammar{color:#7b4bb7}
.legend-verb{color:#2563a6}
.legend-noun{color:#55745a}
.legend-adj{color:#b6682e}
.legend-adverb{color:#a14f8f}

/* Desktop: the entire sidebar is confined to viewport.
   The teacher panel itself scrolls, so you never need to reach page end. */
@media (min-width:1101px){
  .lyrics-sidebar{
    position:sticky!important;
    top:76px!important;
    height:calc(100vh - 94px)!important;
    max-height:calc(100vh - 94px)!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    gap:12px!important;
    overflow:hidden!important;
  }

  .compact-mv-card{
    padding:10px!important;
  }

  .compact-mv-card .mv-frame{
    aspect-ratio:16/9!important;
    max-height:220px!important;
  }

  .compact-mv-card .mv-gate{
    padding:12px!important;
  }

  .compact-mv-card .mv-load{
    width:min(100%,230px)!important;
    padding:10px 12px!important;
  }

  .compact-mv-card .mv-play-icon{
    width:40px!important;
    height:40px!important;
    font-size:15px!important;
  }

  .compact-mv-controls{
    margin-top:7px!important;
  }

  .study-panel{
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding:16px 16px 22px!important;
  }

  .study-panel::-webkit-scrollbar{
    width:8px;
  }
  .study-panel::-webkit-scrollbar-thumb{
    background:#d7dbe0;
    border-radius:8px;
  }
}

/* Mid desktop/laptop: slightly smaller sidebar/MV */
@media (min-width:901px) and (max-width:1100px){
  .lyrics-topic-head{
    width:min(100% - 36px,980px);
  }

  .lyrics-sidebar{
    position:sticky!important;
    top:70px!important;
    max-height:calc(100vh - 86px)!important;
    overflow:hidden!important;
  }

  .compact-mv-card .mv-frame{
    max-height:210px!important;
  }

  .study-panel{
    max-height:calc(100vh - 315px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
}

/* Tablet */
@media (min-width:701px) and (max-width:900px){
  .lyrics-topic-head{
    width:min(100% - 36px,980px);
    margin-top:20px;
  }
  .lyrics-topic-head h1{font-size:30px}
  .lyrics-sidebar{
    position:static!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .study-panel{
    max-height:none!important;
    overflow:visible!important;
  }
}

/* Mobile */
@media (max-width:700px){
  .lyrics-topic-head{
    width:min(100% - 24px,680px);
    margin-top:16px;
    padding-bottom:14px;
  }
  .lyrics-topic-kicker{font-size:10px}
  .lyrics-topic-head h1{font-size:27px}
  .lyrics-topic-head p{font-size:12px}
  .lyrics-color-legend{
    gap:6px 14px;
    font-size:12px;
  }
  .legend-text{padding-left:9px}
  .legend-text::before{width:4px;height:4px}
}

/* Ensure teacher panel headings remain visible/readable in scroll area */
.study-panel .study-label{
  margin-bottom:3px;
}
.study-panel h2{
  margin-bottom:8px!important;
}



/* ===== V17 MTV single-column ===== */

.lyrics-topic-head{
  margin-bottom:14px!important;
}
.lyrics-topic-head h1{
  font-family:"Noto Serif JP","Yu Mincho",serif;
  font-size:38px!important;
}
.lyrics-color-legend{
  margin-top:10px;
}

/* One vertical reading line. No left-right reading. */
.mtv-workspace{
  width:min(1000px,calc(100% - 40px))!important;
  margin:0 auto 64px!important;
  display:block!important;
}

.mtv-stage{
  position:relative;
  margin-bottom:28px;
}

/* MTV player stays at top while scrolling on desktop/tablet/mobile */
.mtv-video-wrap{
  position:sticky;
  top:66px;
  z-index:35;
  background:var(--surface,#fff);
  padding-top:8px;
}

.mtv-video-card{
  border:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
  padding:12px;
}

.mtv-video-card .compact-mv-head{
  margin-bottom:8px;
}

.mtv-video-card .mv-frame{
  width:100%!important;
  aspect-ratio:16/9!important;
  max-height:54vh;
  box-shadow:none!important;
}

.mtv-video-card .compact-mv-controls{
  margin-top:8px!important;
}

/* Current lyric/translation/grammar directly under video */
.mtv-current{
  margin-top:14px;
  padding:18px 20px 20px;
  border:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
}
.mtv-current-kicker{
  color:var(--accent,var(--n2-blue,#2f6f9f));
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
}
.mtv-current-time{
  margin-top:6px;
  color:var(--muted,#667085);
  font:11px ui-monospace,SFMono-Regular,Menlo,monospace;
}
.mtv-current-jp{
  margin-top:6px;
  font-family:"Noto Serif JP","Yu Mincho",serif;
  font-size:27px;
  line-height:1.8;
}
.mtv-current-zh{
  margin-top:6px;
  color:var(--muted,#667085);
  font-size:14px;
  line-height:1.75;
}
.mtv-current-teach{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line,#e5e7eb);
}
.mtv-pattern{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.mtv-label{
  font-size:10px;
  font-weight:800;
}
.mtv-label-grammar{color:#7b4bb7}
.mtv-pattern strong{
  color:#7b4bb7;
  font-size:17px;
}
.mtv-pattern-kind{
  color:var(--muted,#667085);
  font-size:11px;
}
.mtv-core{
  margin:7px 0 0;
  font-size:13px;
  line-height:1.8;
}
.mtv-note{
  margin:8px 0 0;
  padding:8px 10px;
  background:#fffdf7;
  border-left:3px solid #d7b45a;
  color:#6f5a27;
  font-size:12px;
  line-height:1.75;
}

/* Full lyrics list */
.lyrics-side{
  width:100%!important;
  max-width:820px;
  margin:28px auto 0;
}
.lyrics-head{
  position:static!important;
  top:auto!important;
  background:transparent!important;
  padding-top:0!important;
}
.lyrics-head h2{
  font-size:26px!important;
}
.lyric-line{
  padding-top:20px!important;
  padding-bottom:8px!important;
  border-bottom:0!important;
}
.lyric-line.active{
  background:transparent!important;
  border-left:3px solid var(--accent,var(--n2-blue,#2f6f9f))!important;
}
.lyric-inline-detail{
  margin:0 0 6px;
  padding:0 0 18px 72px;
  border-bottom:1px solid var(--line,#e5e7eb);
}
.lyric-inline-zh{
  color:var(--muted,#667085);
  font-size:14px;
  line-height:1.7;
}
.lyric-inline-grammar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
  margin-top:8px;
}
.inline-grammar-label{
  color:#7b4bb7;
  font-size:10px;
  font-weight:800;
}
.lyric-inline-grammar strong{
  color:#7b4bb7;
  font-size:15px;
}
.inline-grammar-kind{
  color:var(--muted,#667085);
  font-size:11px;
}
.lyric-inline-expl{
  margin:5px 0 0;
  color:var(--text,#1b1f23);
  font-size:13px;
  line-height:1.75;
}

/* current lyric gets slightly stronger detail */
.lyric-inline-detail.active{
  background:linear-gradient(90deg,rgba(47,111,159,.045),transparent);
}

/* Remove old teacher side panel/sidebar remnants */
.lyrics-sidebar,.study-panel{display:none!important}

/* fixed small control remains */
.mv-dock{
  z-index:120!important;
}

@media(max-width:900px){
  .mtv-workspace{
    width:min(100% - 28px,900px)!important;
  }
  .mtv-video-wrap{
    top:58px;
  }
  .mtv-video-card{
    padding:8px;
  }
  .mtv-video-card .mv-frame{
    max-height:44vh;
  }
  .mtv-current{
    padding:14px 15px 16px;
  }
  .mtv-current-jp{
    font-size:23px;
  }
  .lyric-inline-detail{
    padding-left:0;
  }
}

@media(max-width:600px){
  .lyrics-topic-head h1{
    font-size:30px!important;
  }
  .mtv-workspace{
    width:min(100% - 20px,600px)!important;
  }
  .mtv-video-wrap{
    top:56px;
    padding-top:4px;
  }
  .mtv-video-card .mv-frame{
    max-height:34vh;
  }
  .compact-mv-head{
    display:none!important;
  }
  .compact-mv-controls{
    display:none!important;
  }
  .mtv-current{
    margin-top:8px;
    padding:12px 13px 14px;
  }
  .mtv-current-jp{
    font-size:20px;
    line-height:1.8;
  }
  .mtv-current-zh{
    font-size:13px;
  }
  .mtv-core,.mtv-note{
    font-size:12px;
  }
  .lyrics-side{
    margin-top:20px;
    padding-bottom:80px;
  }
  .lyric-jp{
    font-size:18px!important;
  }
  .lyric-inline-zh{
    font-size:13px;
  }
  .lyric-inline-expl{
    font-size:12px;
  }
}



/* V18: no duplicate translation, no click-to-seek */
.lyric-line{
  cursor:default!important;
}
.lyric-line:hover{
  background:transparent!important;
  padding-left:0!important;
}
.lyric-line.active{
  cursor:default!important;
}
.lyric-inline-detail{
  padding-top:2px!important;
}
.lyric-inline-zh{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:8px;
  align-items:start;
}
.inline-section-label{
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
}
.inline-zh-label{
  color:#55745a;
}
.inline-grammar-label{
  color:#7b4bb7;
}
.lyric-inline-note{
  margin:7px 0 0;
  padding:7px 9px;
  border-left:3px solid #d7b45a;
  background:#fffdf7;
  color:#6f5a27;
  font-size:12px;
  line-height:1.7;
}
.mtv-current-zh{display:none!important}
@media(max-width:600px){
  .lyric-inline-zh{
    grid-template-columns:36px 1fr;
  }
}



/* V19: sync mode reveals only the currently playing line's translation + grammar */
.lyric-line{
  cursor:default!important;
}
.lyric-line:hover{
  background:transparent!important;
  padding-left:0!important;
}
.lyric-inline-detail{
  display:none;
}
.lyric-inline-detail.is-visible{
  display:block;
}
.sync-detail-mode .lyric-inline-detail{
  display:none;
}
.sync-detail-mode .lyric-inline-detail.is-visible{
  display:block;
}
.reading-detail-mode .lyric-inline-detail{
  display:block!important;
}

/* Current playing block gets one clear highlight, no hover behavior */
.lyric-line.active{
  background:rgba(47,111,159,.035)!important;
}
.lyric-inline-detail.active.is-visible{
  background:linear-gradient(90deg,rgba(47,111,159,.05),transparent);
}

/* Reading-mode button state */
[data-reading-mode].active{
  background:var(--text,#1b1f23)!important;
  color:#fff!important;
  border-color:var(--text,#1b1f23)!important;
}



/* V20: lyric rows must never move on hover */
.lyric-line,
.lyric-line:hover,
.lyric-line:focus,
.lyric-line:focus-visible,
.lyric-line.active,
.lyric-line.active:hover{
  padding-left:72px!important;
  padding-right:0!important;
  margin-left:0!important;
  margin-right:0!important;
  transform:none!important;
  translate:none!important;
  text-indent:0!important;
}

.lyric-line:hover{
  background:transparent!important;
}

.lyric-line .lyric-time,
.lyric-line:hover .lyric-time,
.lyric-line.active .lyric-time{
  left:0!important;
}

.lyric-line.active{
  padding-left:72px!important;
  border-left:3px solid var(--accent,var(--n2-blue,#2f6f9f))!important;
}

.lyric-line.active .lyric-jp,
.lyric-line:hover .lyric-jp{
  transform:none!important;
  margin-left:0!important;
}

@media(max-width:900px){
  .lyric-line,
  .lyric-line:hover,
  .lyric-line:focus,
  .lyric-line:focus-visible,
  .lyric-line.active,
  .lyric-line.active:hover{
    padding-left:0!important;
  }
  .lyric-line.active{
    padding-left:10px!important;
  }
  .lyric-line .lyric-time,
  .lyric-line:hover .lyric-time{
    left:0!important;
  }
  .lyric-line.active .lyric-time{
    left:10px!important;
  }
}



/* ===== V21: fixed MTV viewing stage ===== */

.lyrics-topic-head h1{
  font-size:38px!important;
  line-height:1.2!important;
}

.mtv-workspace{
  width:min(1040px,calc(100% - 40px))!important;
  margin:0 auto 72px!important;
  display:block!important;
}

/* Sync mode: keep MV + current lyric/translation/grammar together in the viewport */
.sync-mode .mtv-stage{
  position:sticky;
  top:66px;
  z-index:40;
  background:var(--surface,#fff);
  padding-top:6px;
  padding-bottom:8px;
}

.sync-mode .mtv-video-wrap{
  position:static!important;
  top:auto!important;
}

.mtv-video-card{
  padding:10px!important;
}
.mtv-video-card .compact-mv-head{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:7px!important;
}
.mtv-song-meta{
  margin-left:auto;
  color:var(--muted,#667085);
  font-size:11px;
  white-space:nowrap;
}
.mtv-video-card .mv-frame{
  max-height:42vh!important;
  aspect-ratio:16/9!important;
}
.mtv-video-card .compact-mv-controls{
  margin-top:7px!important;
}

.mtv-current{
  margin-top:8px!important;
  padding:12px 16px 14px!important;
}
.mtv-current-kicker{
  font-size:9px!important;
}
.mtv-current-time{
  margin-top:3px!important;
}
.mtv-current-jp{
  margin-top:4px!important;
  font-size:23px!important;
  line-height:1.65!important;
}
.mtv-current-zh{
  margin-top:3px!important;
  font-size:13px!important;
  line-height:1.65!important;
}
.mtv-current-teach{
  margin-top:9px!important;
  padding-top:8px!important;
}
.mtv-pattern strong{
  font-size:16px!important;
}
.mtv-core{
  margin-top:4px!important;
  font-size:12px!important;
  line-height:1.65!important;
}
.mtv-note{
  margin-top:6px!important;
  padding:6px 8px!important;
  font-size:11px!important;
  line-height:1.6!important;
}

/* During sync mode, the long transcript is below the fixed MTV stage;
   no inline explanations are shown. */
.sync-mode .lyrics-side{
  margin-top:18px!important;
}
.sync-mode .lyric-inline-detail{
  display:none!important;
}

/* Reading mode: stage returns to normal document flow, all explanations visible. */
.reading-mode .mtv-stage{
  position:static!important;
  top:auto!important;
}
.reading-mode .mtv-video-wrap{
  position:static!important;
}
.reading-mode .lyric-inline-detail{
  display:block!important;
}

/* Full lyrics heading */
.lyrics-reading-note{
  margin:4px 0 10px;
  color:var(--muted,#667085);
  font-size:12px;
}

/* Mode buttons */
[data-sync-toggle].active,
[data-reading-mode].active{
  background:var(--text,#1b1f23)!important;
  color:#fff!important;
  border-color:var(--text,#1b1f23)!important;
}

/* Desktop/laptop viewport fit */
@media(min-width:901px){
  .sync-mode .mtv-stage{
    max-height:calc(100vh - 74px);
    overflow:hidden;
  }
}

/* Tablet */
@media(min-width:601px) and (max-width:900px){
  .lyrics-topic-head h1{font-size:34px!important}
  .sync-mode .mtv-stage{top:58px}
  .mtv-video-card .mv-frame{max-height:36vh!important}
  .mtv-current-jp{font-size:21px!important}
  .mtv-current{padding:10px 13px 12px!important}
}

/* Mobile: keep MV + current line + translation + grammar within one screen */
@media(max-width:600px){
  .lyrics-topic-head h1{font-size:28px!important}
  .mtv-workspace{width:min(100% - 16px,600px)!important}
  .sync-mode .mtv-stage{
    top:56px;
    max-height:calc(100vh - 64px);
    overflow:hidden;
  }
  .mtv-video-card{
    padding:6px!important;
  }
  .mtv-video-card .compact-mv-head{
    display:flex!important;
    margin-bottom:4px!important;
  }
  .mtv-song-meta{
    font-size:9px;
    max-width:55%;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .mtv-video-card .mv-frame{
    max-height:27vh!important;
  }
  .compact-mv-controls{
    display:none!important;
  }
  .mtv-current{
    margin-top:5px!important;
    padding:8px 10px 9px!important;
  }
  .mtv-current-time{font-size:9px!important}
  .mtv-current-jp{
    font-size:18px!important;
    line-height:1.55!important;
  }
  .mtv-current-zh{
    font-size:12px!important;
    line-height:1.5!important;
  }
  .mtv-current-teach{
    margin-top:6px!important;
    padding-top:6px!important;
  }
  .mtv-pattern strong{font-size:14px!important}
  .mtv-pattern-kind{font-size:9px!important}
  .mtv-core,.mtv-note{
    font-size:10.5px!important;
    line-height:1.45!important;
  }
}

/* Ensure no lyric hover motion */
.lyric-line,
.lyric-line:hover,
.lyric-line:focus,
.lyric-line.active{
  transform:none!important;
  translate:none!important;
}



/* V22: single source of playback controls + clear mode switch */
.compact-mv-controls{display:none!important}

.lyrics-mode-switch{
  display:flex;
  align-items:center;
  gap:18px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--line,#e5e7eb);
}

.mode-switch-btn{
  appearance:none;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:transparent;
  color:var(--muted,#667085);
  padding:5px 0 6px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.mode-switch-btn:hover{
  color:var(--text,#1b1f23);
}

.mode-switch-btn.active{
  color:var(--accent,var(--n2-blue,#2f6f9f));
  border-bottom-color:currentColor;
  background:transparent!important;
}

.sync-mode [data-sync-toggle]{
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  border-bottom-color:currentColor!important;
}
.sync-mode [data-reading-mode]{
  color:var(--muted,#667085)!important;
  border-bottom-color:transparent!important;
}

.reading-mode [data-reading-mode]{
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  border-bottom-color:currentColor!important;
}
.reading-mode [data-sync-toggle]{
  color:var(--muted,#667085)!important;
  border-bottom-color:transparent!important;
}

/* The YouTube player itself handles play/pause. */
.mtv-video-card{
  padding-bottom:8px!important;
}

@media(max-width:600px){
  .lyrics-mode-switch{
    gap:14px;
    margin-top:10px;
  }
  .mode-switch-btn{
    font-size:12px;
  }
}



/* ===== V23 FULL UX PASS ===== */

/* Remove all obsolete player dock remnants */
.mv-dock{display:none!important}

/* Topic */
.lyrics-topic-head{
  width:min(1040px,calc(100% - 40px))!important;
  margin:22px auto 0!important;
  padding-bottom:12px!important;
}
.lyrics-topic-head h1{
  margin:0!important;
  font-family:"Noto Serif JP","Yu Mincho",serif;
  font-size:clamp(28px,4vw,40px)!important;
  line-height:1.25!important;
}
.lyrics-topic-head p{
  max-width:760px;
  margin:7px 0 8px!important;
}

/* Mode strip: simple text, easy to understand, sticky only while reading */
.lyrics-mode-switch{
  width:min(1040px,calc(100% - 40px));
  margin:0 auto 10px;
  padding:0;
  display:flex;
  align-items:center;
  gap:22px;
  border-bottom:1px solid var(--line,#e5e7eb);
  background:var(--surface,#fff);
  z-index:60;
}
.mode-switch-btn{
  appearance:none;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  padding:9px 0 8px!important;
  color:var(--muted,#667085)!important;
  font-size:13px!important;
  font-weight:800!important;
  cursor:pointer;
}
.mode-switch-btn.active{
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  border-bottom-color:currentColor!important;
}
.reading-mode .lyrics-mode-switch{
  position:sticky;
  top:64px;
}

/* Main width */
.mtv-workspace{
  width:min(1040px,calc(100% - 40px))!important;
  margin:0 auto 64px!important;
}

/* SYNC MODE: true MTV screen, no long transcript distraction */
.sync-mode .lyrics-side{
  display:none!important;
}
.sync-mode .mtv-stage{
  position:sticky!important;
  top:66px!important;
  z-index:40;
  max-height:calc(100vh - 72px);
  overflow:hidden;
  background:var(--surface,#fff);
  padding:4px 0 8px;
}
.sync-mode .mtv-video-wrap{
  position:static!important;
  top:auto!important;
}

/* Video card */
.mtv-video-card{
  border:1px solid var(--line,#e5e7eb)!important;
  padding:8px!important;
}
.mtv-video-card .compact-mv-head{
  min-height:20px;
  margin:0 0 5px!important;
}
.mtv-video-card .mv-frame{
  width:100%!important;
  aspect-ratio:16/9!important;
  max-height:min(42vh,430px)!important;
  box-shadow:none!important;
}

/* Current line lesson below MV */
.mtv-current{
  margin-top:7px!important;
  padding:10px 14px 12px!important;
  border:1px solid var(--line,#e5e7eb)!important;
}
.mtv-current-kicker{font-size:9px!important}
.mtv-current-time{margin-top:2px!important;font-size:9px!important}
.mtv-current-jp{
  margin-top:3px!important;
  font-size:clamp(18px,2vw,24px)!important;
  line-height:1.65!important;
}
.mtv-current-zh{
  margin-top:3px!important;
  font-size:13px!important;
  line-height:1.6!important;
}
.mtv-current-teach{
  margin-top:7px!important;
  padding-top:7px!important;
}
.mtv-pattern{
  gap:6px!important;
}
.mtv-pattern strong{
  font-size:15px!important;
}
.mtv-pattern-kind{
  font-size:10px!important;
}
.mtv-core{
  margin-top:4px!important;
  font-size:12px!important;
  line-height:1.6!important;
}
.mtv-note{
  margin-top:5px!important;
  padding:5px 8px!important;
  font-size:11px!important;
  line-height:1.55!important;
}

/* READING MODE */
.reading-mode .mtv-stage{
  position:static!important;
  max-height:none!important;
  overflow:visible!important;
}
.reading-mode .mtv-video-wrap{
  position:static!important;
}
.reading-mode .mtv-video-card .mv-frame{
  max-height:min(34vh,340px)!important;
}
.reading-mode .mtv-current{
  display:none!important;
}
.reading-mode .lyrics-side{
  display:block!important;
  width:min(820px,100%)!important;
  margin:22px auto 0!important;
}

/* Reading list clarity */
.lyrics-head{
  position:static!important;
  padding:0 0 8px!important;
}
.lyrics-head h2{
  font-size:26px!important;
}
.lyrics-reading-note{
  margin:0 0 12px!important;
}
.lyric-line{
  cursor:default!important;
  transition:none!important;
  transform:none!important;
  translate:none!important;
  padding-top:18px!important;
  padding-bottom:6px!important;
}
.lyric-line:hover,
.lyric-line:focus,
.lyric-line:focus-visible{
  background:transparent!important;
  transform:none!important;
  translate:none!important;
}
.lyric-inline-detail{
  padding-top:0!important;
  padding-bottom:16px!important;
}
.reading-mode .lyric-inline-detail{
  display:block!important;
}
.sync-mode .lyric-inline-detail{
  display:none!important;
}

/* Preserve text coloring and ruby readability */
.lyric-jp{
  line-height:2!important;
}
.lyric-jp ruby{
  white-space:nowrap;
}
.mtv-current-jp ruby{
  white-space:nowrap;
}
.lyric-token{
  font-weight:650;
}

/* Tablet */
@media(min-width:601px) and (max-width:900px){
  .lyrics-topic-head,
  .lyrics-mode-switch,
  .mtv-workspace{
    width:min(100% - 28px,900px)!important;
  }
  .sync-mode .mtv-stage{
    top:58px!important;
    max-height:calc(100vh - 64px)!important;
  }
  .mtv-video-card .mv-frame{
    max-height:36vh!important;
  }
  .mtv-current{
    padding:9px 12px 10px!important;
  }
  .mtv-current-jp{font-size:20px!important}
}

/* Mobile: keep MV + current line + translation + grammar in one screen */
@media(max-width:600px){
  .lyrics-topic-head,
  .lyrics-mode-switch,
  .mtv-workspace{
    width:min(100% - 16px,600px)!important;
  }

  .lyrics-topic-head{
    margin-top:14px!important;
  }

  .lyrics-mode-switch{
    gap:16px;
  }

  .reading-mode .lyrics-mode-switch{
    top:56px;
  }

  .sync-mode .mtv-stage{
    top:56px!important;
    max-height:calc(100vh - 60px)!important;
  }

  .mtv-video-card{
    padding:5px!important;
  }

  .mtv-video-card .compact-mv-head{
    min-height:16px;
    font-size:9px!important;
  }

  .mtv-song-meta{
    max-width:60%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:9px!important;
  }

  .mtv-video-card .mv-frame{
    max-height:27vh!important;
  }

  .mtv-current{
    margin-top:5px!important;
    padding:7px 9px 8px!important;
  }

  .mtv-current-kicker{font-size:8px!important}
  .mtv-current-time{font-size:8px!important}
  .mtv-current-jp{
    font-size:17px!important;
    line-height:1.5!important;
  }
  .mtv-current-zh{
    font-size:11.5px!important;
    line-height:1.45!important;
  }
  .mtv-current-teach{
    margin-top:5px!important;
    padding-top:5px!important;
  }
  .mtv-pattern strong{font-size:13px!important}
  .mtv-pattern-kind{font-size:8.5px!important}
  .mtv-core,.mtv-note{
    font-size:10px!important;
    line-height:1.4!important;
  }

  .reading-mode .mtv-video-card .mv-frame{
    max-height:25vh!important;
  }

  .reading-mode .lyrics-side{
    padding-bottom:24px!important;
  }

  .lyric-inline-detail{
    padding-left:0!important;
  }
}

/* Very short viewport: prioritize keeping the full lesson visible */
@media(max-height:720px){
  .sync-mode .mtv-video-card .mv-frame{
    max-height:28vh!important;
  }
  .sync-mode .mtv-current-note{
    display:none;
  }
  .sync-mode .mtv-current{
    padding-top:6px!important;
    padding-bottom:6px!important;
  }
}

/* Dark mode neutral surfaces */
[data-theme="dark"] .lyrics-mode-switch,
[data-theme="dark"] .sync-mode .mtv-stage{
  background:var(--surface,#111)!important;
}



/* ===== V24 centered song hero ===== */

.lyrics-topic-head{
  width:min(920px,calc(100% - 40px))!important;
  margin:28px auto 14px!important;
  padding:0 0 18px!important;
  text-align:center!important;
  border-bottom:1px solid var(--line,#e5e7eb)!important;
}

.lyrics-topic-kicker{
  margin:0 0 8px!important;
  text-align:center!important;
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.13em!important;
}

.lyrics-topic-head h1{
  margin:0!important;
  display:grid!important;
  justify-items:center!important;
  gap:5px!important;
  line-height:1.15!important;
  color:var(--text,#1b1f23)!important;
}

.song-title{
  display:block!important;
  font-family:"Noto Serif JP","Yu Mincho",serif!important;
  font-size:clamp(40px,5.4vw,62px)!important;
  font-weight:600!important;
  letter-spacing:-.035em!important;
}

.song-artist{
  display:block!important;
  font-family:"Noto Serif JP","Yu Mincho",serif!important;
  font-size:clamp(18px,2.2vw,26px)!important;
  font-weight:500!important;
  letter-spacing:.02em!important;
  color:var(--muted,#667085)!important;
}

.lyrics-topic-head > p{
  width:min(620px,100%)!important;
  margin:13px auto 0!important;
  text-align:center!important;
  color:var(--muted,#667085)!important;
  font-size:13px!important;
  line-height:1.8!important;
}

/* Mode switch belongs to the hero, centered */
.lyrics-topic-head .lyrics-mode-switch{
  width:auto!important;
  margin:18px auto 0!important;
  padding:0!important;
  display:flex!important;
  justify-content:center!important;
  gap:28px!important;
  border-bottom:0!important;
  background:transparent!important;
  position:static!important;
}

.lyrics-topic-head .mode-switch-btn{
  min-width:74px!important;
  padding:7px 0 8px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--muted,#667085)!important;
  font-size:13px!important;
  font-weight:800!important;
}

.lyrics-topic-head .mode-switch-btn.active{
  color:var(--accent,var(--n2-blue,#2f6f9f))!important;
  border-bottom-color:currentColor!important;
}

/* Text-only legend, centered, visually secondary */
.lyrics-topic-head .lyrics-color-legend{
  margin:13px auto 0!important;
  padding:0!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:8px 18px!important;
  font-size:12px!important;
  font-weight:800!important;
}

/* Remove old external mode-strip spacing rules */
body > .lyrics-mode-switch{
  display:none!important;
}

/* On reading mode the hero doesn't need to become sticky */
.reading-mode .lyrics-mode-switch{
  position:static!important;
  top:auto!important;
}

/* Tablet */
@media(max-width:900px){
  .lyrics-topic-head{
    width:min(100% - 28px,820px)!important;
    margin-top:22px!important;
  }
  .song-title{
    font-size:clamp(36px,8vw,50px)!important;
  }
  .song-artist{
    font-size:20px!important;
  }
}

/* Mobile: mode first, legend after mode */
@media(max-width:600px){
  .lyrics-topic-head{
    width:min(100% - 20px,600px)!important;
    margin-top:16px!important;
    padding-bottom:15px!important;
  }

  .lyrics-topic-kicker{
    font-size:10px!important;
    margin-bottom:6px!important;
  }

  .song-title{
    font-size:34px!important;
  }

  .song-artist{
    font-size:18px!important;
  }

  .lyrics-topic-head > p{
    margin-top:10px!important;
    font-size:12px!important;
    line-height:1.65!important;
  }

  .lyrics-topic-head .lyrics-mode-switch{
    margin-top:14px!important;
    gap:22px!important;
  }

  .lyrics-topic-head .mode-switch-btn{
    min-width:68px!important;
    font-size:12px!important;
  }

  .lyrics-topic-head .lyrics-color-legend{
    margin-top:11px!important;
    gap:6px 14px!important;
    font-size:11px!important;
  }
}



/* ===== V25: larger normal MV + centered current lyric ===== */

.mtv-workspace{
  width:min(1180px,calc(100% - 32px))!important;
}

/* Bring MV back to a normal, comfortable viewing size */
.mtv-video-card{
  padding:10px!important;
}

.mtv-video-card .mv-frame{
  width:100%!important;
  aspect-ratio:16/9!important;
  max-height:none!important;
  min-height:0!important;
}

/* On desktop, let video use nearly the full content width */
@media(min-width:1101px){
  .mtv-workspace{
    width:min(1180px,calc(100% - 40px))!important;
  }
  .mtv-video-card .mv-frame{
    height:auto!important;
  }
}

/* Tablet still gets a proper 16:9 player */
@media(min-width:601px) and (max-width:1100px){
  .mtv-workspace{
    width:min(100% - 28px,980px)!important;
  }
  .mtv-video-card .mv-frame{
    width:100%!important;
    aspect-ratio:16/9!important;
    max-height:none!important;
  }
}

/* Mobile: keep it full width, still 16:9, not tiny */
@media(max-width:600px){
  .mtv-workspace{
    width:min(100% - 16px,600px)!important;
  }
  .mtv-video-card{
    padding:6px!important;
  }
  .mtv-video-card .mv-frame{
    width:100%!important;
    aspect-ratio:16/9!important;
    max-height:none!important;
  }
}

/* Center current lyric content under MV */
.mtv-current{
  text-align:center!important;
}

.mtv-current-kicker,
.mtv-current-time,
.mtv-current-jp,
.mtv-current-zh{
  text-align:center!important;
}

.mtv-current-jp{
  max-width:900px;
  margin-left:auto!important;
  margin-right:auto!important;
}

.mtv-current-zh{
  max-width:760px;
  margin-left:auto!important;
  margin-right:auto!important;
}

.mtv-current-teach{
  max-width:900px;
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:left!important;
}

.mtv-pattern{
  justify-content:center!important;
}

.mtv-core,
.mtv-note{
  text-align:left!important;
}

/* Avoid over-shrinking the sync stage on wide screens */
.sync-mode .mtv-stage{
  max-height:none!important;
  overflow:visible!important;
}

/* Reading mode can keep video slightly smaller but still comfortably viewable */
.reading-mode .mtv-video-card .mv-frame{
  width:100%!important;
  aspect-ratio:16/9!important;
  max-height:none!important;
}



/* ===== V26: redesign current lyric panel / typography / layout ===== */

.mtv-current{
  width:min(1040px, calc(100% - 24px))!important;
  margin:18px auto 0!important;
  padding:28px 32px 30px!important;
  background:#fff!important;
  border:1px solid #e6ece8!important;
  box-shadow:0 8px 22px rgba(23,33,31,.045)!important;
  text-align:center!important;
}

.mtv-current-kicker{
  display:inline-block!important;
  margin:0 auto 4px!important;
  font-size:11px!important;
  letter-spacing:.16em!important;
  font-weight:800!important;
  color:#163f60!important;
}

.mtv-current-time{
  display:block!important;
  margin:0 auto 12px!important;
  font-size:13px!important;
  line-height:1.2!important;
  color:#6c7773!important;
  font-weight:700!important;
  letter-spacing:.08em!important;
}

.mtv-current-jp{
  max-width:900px!important;
  margin:0 auto 18px!important;
  padding:0!important;
  font-size:42px!important;
  line-height:1.42!important;
  letter-spacing:.01em!important;
  font-family: var(--serif)!important;
  font-weight:700!important;
  color:#17211f!important;
  text-align:center!important;
  word-break:keep-all!important;
  overflow-wrap:anywhere!important;
}

.mtv-current-jp ruby{
  ruby-align:center;
}

.mtv-current-jp rt{
  font-size:.28em!important;
  line-height:1!important;
}

.mtv-current-zh{
  max-width:820px!important;
  margin:0 auto 18px!important;
  padding:14px 18px!important;
  border-left:4px solid #d9e5f0!important;
  background:#f8fbfd!important;
  color:#4a5852!important;
  font-size:21px!important;
  line-height:1.72!important;
  text-align:center!important;
}

.mtv-current-teach{
  max-width:820px!important;
  margin:0 auto!important;
  padding:18px 20px 16px!important;
  background:#fffdf8!important;
  border:1px solid #eee7d6!important;
  text-align:left!important;
}

.mtv-pattern{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px 10px!important;
  margin:0 0 12px!important;
  text-align:center!important;
}

.mtv-label{
  font-size:12px!important;
  letter-spacing:.08em!important;
}

.mtv-pattern strong{
  font-size:28px!important;
  line-height:1.2!important;
  font-family: var(--serif)!important;
  color:#7d4ed8!important;
}

.mtv-pattern-kind{
  font-size:14px!important;
  color:#6d7773!important;
  font-weight:700!important;
}

.mtv-core{
  margin:0 0 12px!important;
  font-size:18px!important;
  line-height:1.8!important;
  color:#17211f!important;
}

.mtv-note{
  margin:0!important;
  padding:12px 14px 0!important;
  border-top:1px solid #eee5cf!important;
  font-size:15px!important;
  line-height:1.75!important;
  color:#7a6a41!important;
  background:transparent!important;
}

@media (max-width: 1100px){
  .mtv-current{
    width:min(100% - 20px, 940px)!important;
    padding:24px 24px 26px!important;
  }
  .mtv-current-jp{font-size:36px!important}
  .mtv-current-zh{font-size:19px!important}
  .mtv-pattern strong{font-size:25px!important}
}

@media (max-width: 768px){
  .mtv-current{
    width:min(100% - 16px, 720px)!important;
    margin-top:14px!important;
    padding:20px 16px 22px!important;
  }
  .mtv-current-kicker{font-size:10px!important}
  .mtv-current-time{font-size:12px!important;margin-bottom:10px!important}
  .mtv-current-jp{
    font-size:29px!important;
    line-height:1.5!important;
    margin-bottom:14px!important;
  }
  .mtv-current-zh{
    font-size:17px!important;
    line-height:1.7!important;
    padding:12px 14px!important;
    margin-bottom:14px!important;
  }
  .mtv-current-teach{
    padding:14px 14px 12px!important;
  }
  .mtv-pattern{
    justify-content:flex-start!important;
    text-align:left!important;
    margin-bottom:10px!important;
  }
  .mtv-pattern strong{font-size:22px!important}
  .mtv-pattern-kind{font-size:13px!important}
  .mtv-core{font-size:16px!important;line-height:1.72!important}
  .mtv-note{font-size:14px!important;line-height:1.68!important;padding-top:10px!important}
}

@media (max-width: 480px){
  .mtv-current{
    padding:18px 12px 20px!important;
  }
  .mtv-current-jp{
    font-size:25px!important;
    line-height:1.52!important;
  }
  .mtv-current-zh{
    font-size:15px!important;
    padding:10px 12px!important;
  }
  .mtv-pattern strong{font-size:20px!important}
  .mtv-core{font-size:15px!important}
  .mtv-note{font-size:13px!important}
}

html[data-theme="dark"] .mtv-current{
  background:#121816!important;
  border-color:#2e3b37!important;
  box-shadow:0 10px 24px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] .mtv-current-kicker{color:#9dcced!important}
html[data-theme="dark"] .mtv-current-time{color:#a5b1ad!important}
html[data-theme="dark"] .mtv-current-jp{color:#f0f4f2!important}
html[data-theme="dark"] .mtv-current-zh{
  background:#162026!important;
  border-left-color:#35526e!important;
  color:#d6dfdc!important;
}
html[data-theme="dark"] .mtv-current-teach{
  background:#191f1d!important;
  border-color:#37433f!important;
}
html[data-theme="dark"] .mtv-pattern-kind{color:#b2bdb9!important}
html[data-theme="dark"] .mtv-core{color:#e5ece9!important}
html[data-theme="dark"] .mtv-note{
  color:#d2c18f!important;
  border-top-color:#3f4743!important;
}



.lyric-inline-note:empty,
.mtv-note:empty{display:none!important;}

.mtv-current-teach{
  background:#fff!important;
  border:1px solid #ece8de!important;
  box-shadow:none!important;
}

.mtv-pattern{margin-bottom:10px!important;}
.mtv-core{margin-bottom:0!important;}

.lyric-inline-detail{
  background:#fff!important;
}

.lyric-inline-expl{
  margin-bottom:0!important;
}

.lyrics-reading-note{
  color:#596661!important;
}

.grammar-summary h3{
  letter-spacing:.01em!important;
}

html[data-theme="dark"] .mtv-current-teach{
  background:#151b19!important;
}
html[data-theme="dark"] .lyric-inline-detail{
  background:#111715!important;
}



.hero-control-row{width:min(980px,100%);margin:18px auto 0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px 34px}.hero-control-row .lyrics-color-legend{margin:0!important;justify-content:flex-start!important}.hero-control-row .lyrics-mode-switch{margin:0!important;justify-content:flex-end!important}.lyrics-topic-head .mode-switch-btn{min-width:92px!important}
.related{padding-top:48px!important;background:transparent!important;border:0!important}.related h2{margin:0 0 8px!important;font:700 26px/1.3 var(--serif)!important}.related-intro{margin:0 0 22px!important;color:var(--faint,#7a8581)!important;font-size:13px!important}.related ul{list-style:none!important;margin:0!important;padding:0!important;border-top:1px solid var(--line,#e5e7eb)!important}.related li{border-bottom:1px solid var(--line,#e5e7eb)!important}.related a{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:20px!important;padding:17px 0!important;text-decoration:none!important;border:0!important;border-radius:0!important;background:transparent!important}.related-title{font-weight:650!important;color:var(--text,#17211f)!important}.related-meta{color:#9aa19f!important;font-size:11px!important;white-space:nowrap!important}.related a:hover .related-title{text-decoration:underline!important;text-underline-offset:4px!important}
@media(max-width:860px){.hero-control-row{display:flex;flex-direction:column;align-items:center;gap:12px}.hero-control-row .lyrics-mode-switch,.hero-control-row .lyrics-color-legend{justify-content:center!important}}
@media(max-width:600px){.related{padding-top:34px!important}.related a{display:block!important;padding:15px 0!important}.related-meta{display:block!important;margin-top:4px!important;white-space:normal!important}}
html[data-theme="dark"] .related-title{color:#edf3f0!important}html[data-theme="dark"] .related ul,html[data-theme="dark"] .related li{border-color:#36433f!important}html[data-theme="dark"] .related-meta{color:#9ca9a4!important}



.mtv-current-jp ruby,
.lyric-jp ruby,
.related-title ruby,
.phrase b ruby{
  ruby-position:over !important;
  ruby-align:space-around !important;
}
.mtv-current-jp rt,
.lyric-jp rt,
.related-title rt,
.phrase b rt{
  text-align:center !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
}



@media (max-width: 900px){
  .lyric-line,
  .lyric-line:hover,
  .lyric-line:focus,
  .lyric-line:focus-visible,
  .lyric-line.active,
  .lyric-line.active:hover{
    padding-top:14px !important;
    padding-right:0 !important;
    padding-bottom:14px !important;
    padding-left:0 !important;
  }
  .lyric-line.active{
    padding-left:12px !important;
  }
  .lyric-line .lyric-time,
  .lyric-line:hover .lyric-time,
  .lyric-line.active .lyric-time{
    position:static !important;
    display:block !important;
    width:auto !important;
    margin:0 0 10px !important;
    left:auto !important;
    top:auto !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
  .lyric-jp{
    display:block !important;
    line-height:1.9 !important;
  }
  .lyric-jp ruby{
    ruby-position:over !important;
  }
  .lyric-jp rt{
    font-size:.52em !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }
}



.reading-mode .lyric-line .lyric-zh{display:none!important}
.sync-status.visually-hidden-status{display:none!important}
@media(max-width:900px){
  .reading-mode .lyric-line,
  .reading-mode .lyric-line.active{
    padding-top:15px!important;
    padding-left:0!important;
  }
  .reading-mode .lyric-line.active{padding-left:10px!important}
  .reading-mode .lyric-time,
  .reading-mode .lyric-line.active .lyric-time{
    position:static!important;
    display:block!important;
    width:auto!important;
    left:auto!important;
    top:auto!important;
    margin:0 0 16px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .reading-mode .lyric-jp{
    display:block!important;
    padding-top:2px!important;
    line-height:2.05!important;
  }
  .reading-mode .lyric-jp rt{
    line-height:1!important;
  }
}

