:root{--navy:#10365e;--navy2:#08284e;--blue:#0d60aa;--sky:#e9f3ff;--ink:#192b3f;--muted:#64748b;--line:#dbe5ee;--bg:#f4f7fb;--white:#fff;--radius:16px;--shadow:0 8px 25px rgba(17,48,84,.065)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;font-size:15px;line-height:1.75;overflow-wrap:anywhere}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #f9bd38;outline-offset:3px}h1,h2,h3,p{margin:0 0 .65em}h1{font-size:clamp(25px,4vw,38px);line-height:1.35;letter-spacing:-.025em}h2{font-size:22px;line-height:1.4}h3{font-size:16px;line-height:1.5}p:last-child{margin-bottom:0}.top{background:#fff;border-bottom:1px solid var(--line)}.top-inner{max-width:1260px;margin:auto;padding:15px 26px;display:flex;justify-content:space-between;align-items:center;gap:18px}.brand{display:flex;gap:12px;align-items:center;color:var(--navy);line-height:1.15;flex-shrink:0}.brand:hover{text-decoration:none}.brand b{font-size:20px;letter-spacing:.035em}.brand small{display:block;font-size:11px;margin-top:5px;color:var(--muted);letter-spacing:.04em}.logo{display:grid;place-content:center;position:relative;width:43px;height:43px;background:var(--navy);color:white;border-radius:12px;font-weight:800;font-size:25px;line-height:1}.logo span{position:absolute;color:#ffdb63;right:8px;bottom:8px;font-size:18px}.top nav{display:flex;align-items:center;gap:22px;font-weight:600;font-size:13px}.top nav a{color:var(--navy)}.wrap{max-width:1260px;margin:0 auto;padding:26px 26px 50px;min-height:70vh}.hero{background:linear-gradient(125deg,var(--navy2) 0%,#124d88 78%,#1679b5);color:#fff;border-radius:22px;padding:34px 42px 30px;position:relative;overflow:hidden;box-shadow:var(--shadow)}.hero::before,.hero::after{content:"";position:absolute;pointer-events:none;border:1px solid #ffffff22;border-radius:50%;width:340px;height:340px;right:-70px;top:-170px}.hero::after{width:470px;height:470px;right:-140px;top:-225px}.hero>*{position:relative;z-index:1}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--blue);display:block;margin-bottom:12px}.hero .eyebrow{color:#bedbff}.hero h1{font-size:clamp(32px,4.5vw,48px);letter-spacing:-.035em;line-height:1.26;margin-bottom:12px}.hero p{color:#e4eefb;font-size:15px;max-width:660px}.search{max-width:650px;display:flex;gap:8px;background:white;padding:6px;border-radius:12px;margin:20px 0 18px}.search input{border:0;min-width:0;flex:1;background:white;color:var(--ink);padding:8px 12px;font-size:16px}.search button{background:#f5d66c;color:#17324b;border:0;padding:9px 21px;border-radius:8px;font-weight:800}.hero-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.hero-tags span{background:#ffffff17;border:1px solid #ffffff25;border-radius:99px;padding:3px 12px;font-size:12px}.section{margin-top:30px;scroll-margin-top:20px}.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:13px}.section-title h2{margin:0;color:var(--navy)}.section-title>span{font-size:13px;color:var(--muted);flex-shrink:0}.text-link{font-size:13px;font-weight:700;color:var(--blue)}.subjects{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}.subject{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;border:1px solid var(--line);border-radius:14px;padding:15px 5px;background:#fff;box-shadow:var(--shadow);color:var(--ink);transition:transform .15s,border-color .15s}.subject:hover{transform:translateY(-2px);border-color:#7caad4;text-decoration:none}.subject.selected{border:2px solid var(--blue);padding:14px 4px;background:#f7fbff}.subject-icon{width:43px;height:43px;border-radius:11px;display:grid;place-content:center;font-weight:800;font-size:23px;line-height:1;background:#e5efff;color:#2e5cb3;margin-bottom:3px}.s1 .subject-icon{background:#fff1e4;color:#ae5d17}.s2 .subject-icon{background:#f3e9ff;color:#7951a4}.s3 .subject-icon{background:#e0f5e8;color:#24784e}.s4 .subject-icon{background:#ddf4f7;color:#16758b}.s5 .subject-icon{background:#fcf0d3;color:#9b6c18}.s6 .subject-icon{background:#ffe5e8;color:#a74357}.s7 .subject-icon{background:#e9edf3;color:#607089}.subject b{font-size:15px}.subject small{font-size:11px;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.video-card,.list-card{min-width:0;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);display:flex;flex-direction:column;transition:transform .15s,border-color .15s}.video-card:hover,.list-card:hover{transform:translateY(-2px);border-color:#8bb4db}.video-card.watched{border-color:#7ab89a}.card-link{display:block;flex:1;color:var(--ink)}.card-link:hover{text-decoration:none}.card-link:hover h3{color:var(--blue)}.thumb{aspect-ratio:16/9;position:relative;overflow:hidden;background:#e3edf8}.thumb img{display:block;width:100%;height:100%;object-fit:cover}.placeholder{display:grid;place-content:center;height:100%;color:#7891ae;font-size:14px;letter-spacing:.1em;font-weight:700}.play-symbol{position:absolute;bottom:9px;left:9px;border-radius:8px;background:#102b49dd;color:white;width:31px;height:29px;display:grid;place-content:center;font-size:12px;line-height:1}.duration{position:absolute;bottom:8px;right:8px;padding:1px 6px;border-radius:4px;background:#000b;color:white;font-size:12px}.card-body{padding:13px 14px 14px}.card-body h3{margin-bottom:7px;font-size:15px}.tag{display:inline-block;color:#205d9c;background:#e7f1ff;font-size:11px;font-weight:800;padding:2px 9px;border-radius:5px;margin:0 0 8px}.meta{color:var(--muted);font-size:11px;line-height:1.4}.card-body .text-link{display:block;margin-top:11px}.local-label{font-size:13px;color:var(--muted);margin:0 0 6px}.check-row{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#42566b;cursor:pointer;flex-wrap:wrap}.check-row input{accent-color:var(--blue);width:17px;height:17px;margin:0}.video-card .check-row{padding:10px 14px;border-top:1px solid var(--line)}.watched .check-row{color:#21744b;background:#eef9f2}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}.panel h1,.panel h2{color:var(--navy)}.consent{margin-top:22px;max-width:850px}.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 17px;border:1px solid transparent;border-radius:9px;font-weight:700;font-size:14px;text-decoration:none;min-height:42px;line-height:1.4}.btn:hover{text-decoration:none;filter:brightness(.96)}.primary{background:var(--blue);color:white}.ghost{background:#fff;color:var(--navy);border-color:var(--line)}.danger{color:#ad3030;background:#fff5f5;border-color:#f0caca}.muted{font-size:13px;color:var(--muted)}.empty{padding:22px;background:#fff;border:1px dashed #cbd5e1;border-radius:12px;color:var(--muted)}.sync-date{margin-top:25px;text-align:right}.school-cta{margin-top:35px;display:flex;justify-content:space-between;align-items:center;gap:20px;background:#e6f1fc;border:1px solid #d1e5f6;border-radius:16px;padding:24px 28px}.school-cta h2{color:var(--navy)}.school-cta p{color:#4c6580;font-size:14px}.school-cta .eyebrow{margin-bottom:4px}.breadcrumbs{font-size:13px;color:var(--muted);margin-bottom:18px}.unit-hero{background:white;border:1px solid var(--line);border-radius:16px;padding:24px 28px}.unit-hero h1{color:var(--navy)}.unit-hero h2{font-size:19px}.watch-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(230px,1fr);gap:22px;align-items:start}.watch-title{font-size:clamp(22px,3vw,30px);margin:6px 0 14px;color:var(--navy)}.player{aspect-ratio:16/9;border-radius:13px;overflow:hidden;background:#0b1727;min-height:200px}.player iframe{width:100%;height:100%;display:block;border:0}.watch-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:16px 0;flex-wrap:wrap}.queue{padding:16px;max-height:700px;overflow:auto}.queue h2{font-size:19px}.queue-item{display:flex;align-items:flex-start;gap:9px;color:var(--ink);padding:10px 8px;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}.queue-item.active{background:#eaf3ff;color:var(--blue);font-weight:700;border-radius:6px}.queue-num{font-size:11px;color:var(--muted);min-width:22px}.description{margin:15px 0}.description summary,.config-help summary{cursor:pointer;font-weight:700;color:var(--navy)}.description p{margin-top:12px;white-space:normal}.pdf-list{display:grid;gap:9px}.pdf-card{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px;color:var(--ink)}.pdf-card:hover{text-decoration:none;border-color:#7caad4}.file-icon{display:grid;place-content:center;width:40px;height:45px;border-radius:7px;background:#ffe8e8;color:#a93838;font-size:12px;font-weight:800;flex-shrink:0}.pdf-card small,.admin-pdf small{display:block;color:var(--muted);font-size:12px}.download{margin-left:auto;color:var(--blue);font-size:12px;font-weight:700}.prose{max-width:850px;margin:auto}.prose h2{margin-top:24px;font-size:18px}.prose a{text-decoration:underline}.foot-inner{max-width:1260px;margin:auto;padding:23px 26px;display:flex;gap:12px;flex-wrap:wrap;align-items:center;color:#67788d;font-size:11px}.foot-inner b{color:var(--navy);font-size:14px}.foot-inner>div{margin-left:auto;display:flex;gap:13px;flex-wrap:wrap}footer{border-top:1px solid var(--line);background:#fff}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.admin .wrap{max-width:1100px}.auth-panel{max-width:540px;margin:24px auto}.form-stack{display:grid;gap:14px;margin-top:15px}.form-stack label:not(.check-row){display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:var(--navy)}.form-stack input:not([type=checkbox]),.form-stack textarea,.form-stack select{width:100%;padding:10px 11px;background:white;color:var(--ink);border:1px solid #cbd8e5;border-radius:8px;min-width:0}.form-stack textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.notice{padding:12px 15px;border:1px solid;border-radius:10px;margin:0 0 18px;font-size:14px}.notice.error{background:#fff3f2;color:#9c2626;border-color:#f0c7c7}.notice.success{background:#edf9f0;color:#236b44;border-color:#b8e0c4}.admin-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.admin-heading h1{margin:0;color:var(--navy)}.admin-nav{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.admin-nav a{background:white;border:1px solid var(--line);padding:7px 13px;border-radius:8px;font-size:13px;font-weight:700}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stats>div{background:white;border:1px solid var(--line);padding:18px;border-radius:12px;box-shadow:var(--shadow)}.stats small{font-size:12px;color:var(--muted);display:block}.stats b{font-size:33px;color:var(--navy);line-height:1.4}.config-help{border-top:1px solid var(--line);margin-top:16px;padding-top:12px}.config-help p{font-size:13px;margin:10px 0}.config-help code{display:block;background:#f1f5fa;padding:11px;border-radius:7px;font-size:12px;white-space:normal;word-break:break-all}.admin-units{display:grid;gap:9px}.unit-edit{padding:14px 18px}.unit-edit summary{cursor:pointer;display:flex;align-items:center;gap:9px;flex-wrap:wrap;list-style:none}.unit-edit summary::before{content:'▸';color:var(--blue)}.unit-edit[open] summary::before{content:'▾'}.unit-edit summary .tag{margin:0}.unit-edit summary .muted{margin-left:auto}.unit-edit form{border-top:1px solid var(--line);padding-top:16px}.admin-pdf{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line);gap:10px}.admin-pdf b{font-size:14px}.sync-message{margin-top:8px}#materials h3{margin-top:23px}
@media(max-width:1000px){.subjects{grid-template-columns:repeat(4,minmax(0,1fr))}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{padding:30px}.watch-layout{grid-template-columns:minmax(0,1fr)}.queue{max-height:360px}}@media(max-width:650px){body{font-size:14px}.top-inner{padding:11px 13px;gap:10px}.brand b{font-size:16px}.brand small{font-size:9px}.brand{gap:7px}.logo{width:35px;height:35px;font-size:21px}.logo span{right:6px;bottom:7px;font-size:15px}.top nav{gap:8px;font-size:11px}.top nav a:first-child{display:none}.wrap{padding:14px 12px 36px}.hero{border-radius:16px;padding:24px 18px}.hero h1{font-size:34px}.hero p{font-size:13px}.search{margin:17px 0 12px}.search input{font-size:14px;padding:8px 7px}.search button{padding:8px 13px}.hero-tags span{font-size:10px;padding:2px 9px}.section{margin-top:24px}.section-title h2{font-size:19px}.section-title>span{font-size:11px;flex-shrink:1}.subjects{gap:7px}.subject{padding:10px 3px;border-radius:10px}.subject.selected{padding:9px 2px}.subject-icon{width:35px;height:35px;font-size:19px}.subject b{font-size:13px}.subject small{font-size:10px}.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.card-body{padding:10px}.card-body h3{font-size:13px}.card-body .text-link{font-size:11px}.meta{font-size:10px}.video-card .check-row{padding:8px 10px;font-size:11px}.panel{padding:16px}.school-cta{flex-direction:column;align-items:flex-start;padding:19px}.school-cta h2{font-size:19px}.unit-hero{padding:18px}.unit-hero h1{font-size:25px}.watch-title{font-size:23px}.download{font-size:10px}.foot-inner{padding:17px 13px}.foot-inner>div{margin-left:0}.admin-heading h1{font-size:26px}.stats>div{padding:11px}.stats small{font-size:10px}.stats b{font-size:26px}.form-grid{grid-template-columns:1fr}.unit-edit summary .muted{margin-left:0}.auth-panel{margin:10px auto}.btn{font-size:13px}.pdf-card{padding:10px;gap:8px}.player{min-height:200px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
