/* FOR YOU brand layer. Load after existing application and subject styles. */
:root{--brand:#005f94;--blue:#005f94;--yellow:#fae200;--english:#7547bc;--math:#2469bf;--science:#167449;--social:#997115;--japanese:#bd4052}
body>header,body:has(.owl-heading)>header{background:#eef5fa;color:var(--brand);border-bottom:4px solid var(--yellow);box-shadow:none;min-height:84px;padding:10px max(24px,calc((100vw - 1160px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}
body>header .brand,body>header a,body>header small,body:has(.owl-heading)>header .brand,body:has(.owl-heading)>header a,body:has(.owl-heading)>header small{color:var(--brand)}
body>header .for-you-brand{display:inline-flex;align-items:center;gap:14px;text-decoration:none;margin:0;flex-shrink:0;min-height:60px}
.for-you-name{font-size:25px;font-weight:800;letter-spacing:.06em;line-height:1.2}
.for-you-name small{font-size:12px;letter-spacing:0;font-weight:500;margin-top:5px;line-height:1.5}
.for-you-logo{display:block;position:relative;width:94px;height:66px;overflow:hidden;background:transparent;border-radius:0;flex-shrink:0}
.for-you-logo img{display:block;width:100%;height:auto;max-width:none;transform:translateY(-12%)}
.for-you-logo-large{width:220px;height:163px;border-radius:0}
.for-you-hero .for-you-logo-large{width:180px;height:134px}
body>header nav{display:flex;gap:16px;flex-wrap:wrap;margin:0}
/* Keep header typography stable while the dashboard mounts .owl-heading. */
body>header,body:has(.owl-heading)>header{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:16px;line-height:1.4;font-feature-settings:"palt" 0,"pkna" 0}
body>header nav a{display:inline-flex;align-items:center;min-height:48px;text-decoration:none;margin:0;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;white-space:nowrap}
.for-you-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 12px;margin:0 0 22px;background:transparent;border:0;border-radius:0;box-shadow:none}
.for-you-hero h1{font-size:30px;line-height:1.5;margin:5px 0 10px;color:var(--brand)}
.for-you-hero p{margin:0;color:#456172;font-size:17px}
.for-you-hero .for-you-eyebrow{color:var(--brand);font-size:14px;font-weight:800;letter-spacing:.14em}
.owl-heading h1,.owl-heading h2{font-size:23px;margin:0;color:var(--brand);font-weight:800}
.owl-heading{margin-bottom:12px;padding-bottom:12px}
.owl-section-heading{margin-top:16px}
.owl-overview{margin-top:24px}
.owl-subjects{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.owl-subject-card{grid-template-columns:84px 1fr auto;align-items:center;align-content:center;min-height:122px;gap:18px;padding:20px 24px}
.owl-subject-card .owl-symbol{grid-column:auto;height:72px}
.owl-subject-card strong{font-size:25px}
[data-subject="英語"]{--subject:var(--english)}[data-subject="数学"]{--subject:var(--math)}[data-subject="理科"]{--subject:var(--science)}[data-subject="社会"]{--subject:var(--social)}[data-subject="国語"]{--subject:var(--japanese)}
.owl-subject-card[data-subject="社会"]{--subject:var(--social);background:var(--subject);color:white}
.book .badge[data-subject],.badge[data-subject]{background:var(--subject);color:#fff}
.lesson-row{border-left:4px solid var(--subject,var(--brand))}
.study-top h1{color:var(--subject,var(--brand))}
progress{accent-color:var(--subject,var(--brand))}
progress::-webkit-progress-value,.owl-bottom progress::-webkit-progress-value{background:var(--subject,var(--brand))}
body.owl-studying{background:#faf9f5}
body.owl-studying>header{background:#fff;border-bottom:1px solid #d4dce0;min-height:64px;padding-top:6px;padding-bottom:6px;color:#273943}
body.owl-studying>header a,body.owl-studying>header small{color:var(--brand)}
body.owl-studying>header .for-you-brand{min-height:48px;gap:10px}
body.owl-studying .for-you-logo{width:60px;height:44px;border-radius:4px}
body.owl-studying .for-you-name{font-size:20px}
body.owl-studying .for-you-name small{display:none}
body[data-entry="student"]{background:#f0f6fa}
body[data-entry="student"] main{max-width:1080px;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,440px);gap:0 44px;align-items:center;margin:28px auto;padding-bottom:40px}
body[data-entry="student"] #message{grid-column:1/-1}
.for-you-entry-intro{border:0;background:transparent;padding:18px 12px;margin:0;box-shadow:none}
.for-you-entry-intro h1{font-size:36px;line-height:1.5;color:var(--brand);margin:20px 0 14px}
.for-you-entry-intro p{font-size:19px;color:#456172;line-height:1.8}
.for-you-entry-intro .for-you-logo{background:transparent}
.for-you-entry-note{display:inline-block;background:var(--yellow);color:#203d4e;padding:8px 14px;border-radius:8px;font-weight:700;font-size:16px;margin-top:16px}
body[data-entry="student"] .login{margin:0;border:1px solid #d3e2ed;border-top:6px solid var(--yellow);box-shadow:0 12px 32px #005f9410;padding:28px}
body[data-entry="student"] .login button[type="submit"]{background:var(--brand);font-weight:700;min-height:56px}
body[data-entry="student"] .login label,body[data-entry="student"] .login input,body[data-entry="student"] .login select{min-width:0}
@media(max-width:900px){body[data-entry="student"] form[data-form="student-login"]{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}body[data-entry="student"] form[data-form="student-login"] label{margin:0}}
body>header a:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}
/* The header identifies the school; the entry screen introduces FOR YOU. */
body>header .owl-school-logo{display:block;width:48px;height:48px;object-fit:contain;flex-shrink:0}
.owl-school-name{font-size:20px;font-weight:700;letter-spacing:0;line-height:1.4;white-space:nowrap}
body.owl-studying>header .owl-school-logo{width:36px;height:36px}
body.owl-studying .owl-school-name{font-size:18px}
@media(max-width:800px){body[data-entry="student"] main{gap:0 22px;grid-template-columns:minmax(0,1fr) minmax(300px,1fr)}.for-you-entry-intro h1{font-size:30px}.for-you-hero{padding:18px 22px;gap:16px}.for-you-hero h1{font-size:26px}.for-you-logo-large{width:180px;height:134px}.owl-subject-card{padding:18px;gap:12px;grid-template-columns:66px 1fr auto}.owl-symbol svg{width:66px;height:58px}}
@media(max-width:600px){body>header,body:has(.owl-heading)>header{padding:10px 16px;gap:12px}.for-you-name{font-size:21px}.for-you-name small{display:none}.for-you-logo{width:74px;height:52px}.for-you-hero{flex-direction:column-reverse;align-items:flex-start;gap:10px;padding:18px 20px}.for-you-logo-large{width:180px;height:134px}.for-you-hero h1{font-size:25px}.owl-subject-card{grid-template-columns:1fr auto;min-height:158px}.owl-subject-card .owl-symbol{grid-column:1/-1;height:54px}.owl-subject-card strong{font-size:22px}body[data-entry="student"] main{display:block;margin-top:10px}.for-you-entry-intro{padding:10px 8px 24px}.for-you-entry-intro h1{font-size:28px;margin-top:12px}body[data-entry="student"] .login{padding:24px}}
.for-you-entry-intro{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:18px 12px}
.for-you-entry-intro .for-you-logo-large{width:320px;max-width:100%;height:auto;aspect-ratio:320/237}
.for-you-entry-intro .for-you-logo img{position:absolute;left:0;top:0}
.for-you-entry-intro h1{width:320px;max-width:100%;font-size:24px;font-weight:700;letter-spacing:.02em;line-height:1.5;text-align:justify;text-align-last:justify;text-justify:inter-character;margin:0}
@media(max-width:800px){.for-you-entry-intro .for-you-logo-large{width:280px}.for-you-entry-intro h1{width:280px;font-size:21px}}
@media(max-width:600px){.for-you-entry-intro{padding:12px 8px 28px}.for-you-entry-intro h1{font-size:clamp(18px,6vw,21px)}.owl-school-name{font-size:18px}}

/* One header geometry for loading, home and study; study keeps its quieter colours. */
body[data-owl-role]>header,body[data-owl-role].owl-studying>header,body[data-owl-role]:has(.owl-heading)>header{box-sizing:border-box;height:90px;min-height:90px;padding:10px max(24px,calc((100vw - 1160px)/2));border-bottom-width:4px;gap:20px;flex-wrap:nowrap}
body[data-owl-role]>header .for-you-brand,body[data-owl-role].owl-studying>header .for-you-brand{min-height:66px;gap:14px}
body[data-owl-role]>header .for-you-logo,body[data-owl-role].owl-studying>header .for-you-logo{width:94px;height:66px;border-radius:0}
body[data-owl-role]>header .owl-school-name,body[data-owl-role].owl-studying>header .owl-school-name{font-size:20px;line-height:1.4}
#study-home{width:min(440px,calc(100vw - 32px));padding:28px;border:1px solid #d4dce0;border-radius:14px;color:#273943}
#study-home h2{font-size:21px;line-height:1.65;margin:0 0 24px}
#study-home .actions{display:flex;justify-content:flex-end;gap:12px}
#study-home button{min-height:48px;min-width:96px}
#study-home::backdrop{background:#17334466}
@media(max-width:600px){body[data-owl-role]>header,body[data-owl-role].owl-studying>header,body[data-owl-role]:has(.owl-heading)>header{height:90px;min-height:90px;padding:10px 16px;gap:12px}body[data-owl-role]>header .for-you-brand,body[data-owl-role].owl-studying>header .for-you-brand{min-height:52px;gap:8px;flex-shrink:1;min-width:0}body[data-owl-role]>header .for-you-logo,body[data-owl-role].owl-studying>header .for-you-logo{width:60px;height:44px}body[data-owl-role]>header .owl-school-name,body[data-owl-role].owl-studying>header .owl-school-name{font-size:16px;white-space:normal}body[data-owl-role]>header nav{flex-direction:column;gap:0;flex-shrink:0}body[data-owl-role]>header nav a{min-height:32px;font-size:14px}}
