:root{--ink:#203452;--muted:#6c7e99;--blue:#345ef1;--line:#e0e7f3;--paper:#f5f8ff}*{box-sizing:border-box}html{scroll-padding-top:110px}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.8 -apple-system,BlinkMacSystemFont,'Segoe UI','Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif}a{color:var(--blue);text-decoration:none}button,input{font:inherit}button{cursor:pointer;color:inherit}button,a,input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}h1,h2,p{margin-top:0}header{height:80px;background:#ffffffed;backdrop-filter:blur(14px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30;padding:0 max(24px,calc((100% - 1352px)/2));display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:12px;color:var(--ink)}.brand img{width:62px;height:62px;object-fit:contain}.brand b{font-size:18px;line-height:1.3;font-weight:800;letter-spacing:-.35px;display:block}.brand small{display:block;font-size:10px;font-weight:750;letter-spacing:.55px;color:#5f7497;margin-top:4px}.sub{font-size:11px;color:var(--muted)}.layout{max-width:1400px;margin:auto;display:grid;grid-template-columns:266px minmax(0,1fr);gap:36px;padding:30px 24px 70px}.sidebar{position:sticky;top:104px;align-self:start;max-height:calc(100dvh - 130px);overflow:auto;background:white;border:1px solid var(--line);border-radius:18px;padding:18px;scrollbar-width:thin}.sidebar details{margin:0}.sidebar summary{display:none;cursor:pointer}.sidebar-head{display:flex;justify-content:space-between;align-items:center;gap:6px;white-space:nowrap}.sidebar-head strong{font-size:13px;line-height:1.5}.sidebar-head>span{font-size:10px;line-height:1.5;background:#edf2ff;color:var(--blue);padding:3px 6px;border-radius:6px}.sidebar-intro{font-size:11px;color:var(--muted);margin:12px 0 4px}.sidebar input{width:100%;min-height:42px;border:1px solid var(--line);padding:9px 11px;border-radius:9px;font-size:12px;margin:12px 0;background:#f8faff;color:var(--ink)}#page-list{display:grid;gap:4px}#page-list button{display:flex;align-items:center;gap:10px;width:100%;padding:11px 8px;border:0;border-radius:9px;text-align:left;background:none;font-size:12px;line-height:1.6}#page-list button:hover{background:#f3f6ff}#page-list button.active{background:#eaf0ff;color:var(--blue)}.page-index{font-size:10px;color:var(--muted);width:22px;flex-shrink:0}#page-list b{font-weight:600;display:block}#page-list small{display:block;font-size:10px;color:var(--muted);margin-top:3px}main{min-width:0}.hero{position:relative;isolation:isolate;overflow:hidden;padding:30px 32px;border:1px solid var(--line);border-radius:18px;background:#edf3ff;margin-bottom:28px;min-height:240px}.hero:before{content:'';position:absolute;inset:0;z-index:-2;background:url('images/banner-japan.webp') center/cover}.hero:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#f9fbfffa,#f9fbffdf 45%,#f9fbff44)}.eyebrow{font-size:10px;letter-spacing:1.3px;font-weight:700;color:var(--blue);margin-bottom:12px}h1{font-size:24px;line-height:1.5;letter-spacing:0;margin:0 0 12px;font-weight:700}.hero>p{max-width:570px;font-size:14px;color:#405b7d;margin:0}.links{display:flex;gap:18px;font-size:11px;margin-top:22px;font-weight:600}.page-heading{margin-bottom:20px}.page-heading .eyebrow{margin-bottom:8px}.page-heading h2{font-size:20px;line-height:1.5;margin:0 0 8px;scroll-margin-top:110px}.status{min-height:22px;color:var(--muted);font-size:12px;margin:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.card{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;min-width:0}.pill{font-size:10px;color:var(--muted);display:block;margin-bottom:12px}.card h2{font-size:18px;font-weight:650;line-height:1.6;margin:0 0 4px;overflow-wrap:anywhere}.jp{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 10px;overflow-wrap:anywhere}.meaning{font-size:14px;line-height:1.8;margin:0 0 16px;overflow-wrap:anywhere}.audio-button{display:inline-flex;align-items:center;gap:7px;padding:0;border:0;background:none;color:var(--blue);font-size:11px;min-height:32px}.audio-button svg{flex-shrink:0}.pager{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:26px 0}.pager button{padding:10px 14px;border:1px solid var(--line);background:white;border-radius:9px;color:var(--blue);font-size:12px;min-height:42px}.pager button:disabled{opacity:.4;cursor:default}.pager>span{font-size:11px;color:var(--muted);white-space:nowrap}.note{background:#edf3ff;border:1px solid var(--line);border-radius:14px;padding:18px 22px;color:var(--muted);font-size:12px;line-height:1.9;margin:24px 0 0}.empty{grid-column:1/-1;text-align:center;padding:45px;color:var(--muted);background:white;border:1px solid var(--line);border-radius:16px}footer{text-align:center;border-top:1px solid var(--line);padding:24px;font-size:12px;color:var(--muted)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #9cb6ef;outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}@media(max-width:1000px){.layout{gap:24px}.card{padding:18px}}@media(max-width:850px){.layout{grid-template-columns:1fr;padding:20px 18px 45px;gap:20px}.sidebar{position:static;max-height:none;padding:0;border-radius:13px}.sidebar summary{display:block;padding:14px 17px;font-size:12px;font-weight:650}.sidebar summary:after{content:'▼';float:right;font-size:10px;color:var(--blue)}.sidebar details[open] summary:after{content:'▲'}.sidebar-content{padding:0 17px 17px}.sidebar-head{display:none}#page-list{grid-template-columns:1fr 1fr;max-height:320px;overflow:auto}.sidebar-intro{margin-top:4px}}@media(max-width:600px){header{height:76px;padding:0 16px}.brand img{width:50px;height:50px}.brand b{font-size:14px}.brand small{font-size:9px;letter-spacing:.2px}.sub{display:none}.layout{padding:18px 16px 40px}.hero{padding:24px;min-height:230px}.hero h1{font-size:22px}.grid{grid-template-columns:1fr}.page-heading h2{font-size:19px}.card{padding:20px}.pager{gap:8px}.pager button{font-size:11px;padding:9px 12px}.note{padding:17px}#page-list{grid-template-columns:1fr}.sidebar summary{font-size:12px}}@media print{header,.sidebar,.hero,.pager,.audio-button,.home-link{display:none!important}.layout{display:block;padding:0}.grid{display:grid;grid-template-columns:1fr 1fr}.card{break-inside:avoid;border-radius:0}.page-heading h2{scroll-margin-top:0}body{background:white;color:#111}}
/* Match FAN's compact flag selector, placed at the right corner. */
header{justify-content:flex-start}.language{display:flex;gap:3px;flex-shrink:0;padding:3px;border:1px solid var(--line);border-radius:10px;background:#f4f7ff}.language button{display:grid;place-items:center;min-width:42px;min-height:40px;padding:0 8px;border:0;border-radius:7px;background:none;font-size:22px;line-height:1}.language button[aria-pressed=true]{background:white;box-shadow:0 2px 7px #345ef118}html[lang=ja] .hero h1{letter-spacing:0}@media(max-width:600px){header{gap:12px}.language button{min-width:34px;min-height:36px;padding:0 5px;font-size:21px}.brand{gap:9px}}@media(max-width:390px){header{padding:0 12px;gap:9px}.brand img{width:40px;height:40px}.brand b{font-size:12px}.brand small{font-size:7px;letter-spacing:0}.language button{min-width:31px;padding:0 3px}}
/* Keep the introduction stationary; only the compact vocabulary list scrolls. */
body{height:100dvh;overflow:hidden}header{position:relative;flex-shrink:0}.layout{grid-template-rows:minmax(0,1fr);height:calc(100dvh - 128px);padding-top:22px;padding-bottom:16px;overflow:hidden;align-items:stretch}.sidebar{max-height:100%;height:fit-content;top:0}#course-main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.hero{flex-shrink:0;min-height:180px;padding:22px 28px;margin-bottom:16px}.hero h1{margin-bottom:8px}.hero .links{margin-top:14px}.hero .eyebrow{margin-bottom:8px}.page-heading{flex-shrink:0;margin-bottom:12px}.page-heading .eyebrow{margin-bottom:4px}.page-heading h2{font-size:18px;margin-bottom:4px}.word-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#aebed5 #edf2f8;padding:0 7px 2px 0;scrollbar-gutter:stable}.word-scroll::-webkit-scrollbar{width:7px}.word-scroll::-webkit-scrollbar-track{background:#edf2f8;border-radius:8px}.word-scroll::-webkit-scrollbar-thumb{background:#aebed5;border-radius:8px}.grid{gap:10px;align-content:start}.card{padding:12px 14px;border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:2px;align-items:start}.card .pill{grid-column:1/-1;margin:0 0 3px;font-size:10px}.card h2{grid-column:1;grid-row:2;font-size:18px;line-height:1.5;margin:0}.card .jp{grid-column:1;grid-row:3;font-size:12px;margin:0;line-height:1.6}.card .meaning{grid-column:1/-1;grid-row:4;font-size:14px;line-height:1.6;margin:4px 0 0}.card .audio-button{grid-column:2;grid-row:2/4;align-self:center;justify-self:end;min-width:30px;min-height:30px;justify-content:center;font-size:0;gap:0;padding:5px;border-radius:7px;background:#f4f7ff}.card .audio-button svg{width:16px;height:16px}.card .audio-button:hover{background:#eaf0ff}.pager{flex-shrink:0;margin:12px 0 0}.pager button{min-height:36px;padding:6px 12px}.word-scroll .note{margin-top:14px;padding:12px 15px;font-size:11px}footer{height:48px;padding:12px 16px;font-size:11px}#word-scroll:focus-visible{outline:2px solid #9cb6ef;outline-offset:2px;border-radius:4px}@media(max-width:850px){.layout{grid-template-rows:auto minmax(0,1fr);gap:12px;padding-top:16px;padding-bottom:12px}.sidebar{max-height:min(250px,32dvh);overflow:auto}.hero{min-height:150px;padding:18px 22px}.hero .eyebrow{margin-bottom:5px}.hero .links{margin-top:10px}.sidebar summary{padding:11px 16px}#page-list{max-height:170px}}@media(max-width:600px){.layout{height:calc(100dvh - 120px);padding:12px 14px 10px;gap:10px}.hero{min-height:0;padding:14px 18px;margin-bottom:10px}.hero h1{font-size:21px;margin-bottom:5px}.hero>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.7}.hero .eyebrow{font-size:9px;margin-bottom:4px}.hero .links{margin-top:8px;font-size:10px}.page-heading{margin-bottom:8px}.page-heading .eyebrow{font-size:9px;margin-bottom:2px}.page-heading h2{font-size:16px;margin-bottom:2px}.status{font-size:11px;min-height:18px}.card{padding:10px 12px}.grid{gap:8px}.pager{margin-top:8px}.pager button{min-height:32px;padding:5px 10px}.word-scroll{padding-right:5px}footer{height:44px;padding:10px 14px}}@media(max-height:650px) and (min-width:851px){.hero{min-height:0;padding:14px 22px;margin-bottom:10px}.hero>p{display:none}.hero h1{font-size:21px;margin-bottom:4px}.hero .links{margin-top:6px}.page-heading{margin-bottom:8px}}@media print{body{height:auto;overflow:visible}.layout{height:auto;overflow:visible;padding:0}#course-main{display:block;height:auto;overflow:visible}.word-scroll{overflow:visible;height:auto;padding:0}.grid{grid-template-columns:1fr 1fr}.card .audio-button{display:none}footer{height:auto}}

header>.language{margin-left:auto}
