:root{--navy:#12345f;--navy2:#0a294e;--blue:#1684d9;--sky:#dff2ff;--gold:#bd8b55;--amber:#f8e8cc;--cream:#fbf7ef;--ink:#19334d;--muted:#556c7e;--line:#d7e5ef;--green:#168a68;--red:#d9536f;--shadow:0 14px 34px rgba(19,47,84,.09)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:'Noto Sans JP','Yu Gothic UI','Meiryo',system-ui,sans-serif;color:var(--ink);background:#eaf2f9}button,input,textarea,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{width:100%;background:white;border:2px solid #c8d8e8;border-radius:13px;padding:11px 12px;font-size:16px;color:#142b42}input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible{outline:3px solid #f5bb52;outline-offset:2px}a{color:#125e9f}h1,h2,h3,p{margin-top:0}.loading{padding:30px}small,.tiny{font-size:12px}.muted{color:var(--muted)}.text-danger{color:#b72b49}.site{min-height:100dvh;max-width:1460px;margin:auto;background:#f4f9fc;display:flex;flex-direction:column;box-shadow:var(--shadow)}.topbar{position:sticky;top:0;z-index:20;background:linear-gradient(110deg,var(--navy2),#154b85);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px;padding:10px clamp(16px,2vw,26px);border-bottom:4px solid #dfb46f}.brand{display:flex;align-items:center;gap:10px;font-size:clamp(18px,2vw,24px);font-weight:900;letter-spacing:-.03em;white-space:nowrap}.brand .brand-icon{background:linear-gradient(150deg,#2fc0e6,#3163b9);border:2px solid #9ce8ff;border-radius:15px;padding:5px 8px;font-size:26px}.brand strong{color:#f9d17b}.version{font-size:11px;background:#197cc0;border-radius:14px;padding:3px 8px;margin-left:5px;vertical-align:middle}.desktop-nav{display:flex;gap:5px;align-items:center;overflow:auto}.nav-btn{border:0;background:transparent;color:#e6f0fb;font-size:13px;font-weight:750;border-radius:12px;padding:10px 12px;white-space:nowrap}.nav-btn.active{background:#278bd9;color:#fff}.nav-btn:hover{background:#2b6eab}.shell{flex:1;width:100%;padding:clamp(14px,2vw,24px);padding-bottom:110px}.page-title{font-size:clamp(22px,3vw,29px);font-weight:900;letter-spacing:-.03em;margin:0 0 7px}.section-title{font-weight:900;font-size:clamp(18px,2vw,22px);margin:0 0 15px;display:flex;gap:8px;align-items:center}.subline{color:var(--muted);line-height:1.7;font-size:14px;margin:0 0 16px}.btn{border:2px solid #1881cd;background:#178de0;color:white;font-weight:850;border-radius:14px;padding:11px 17px;display:inline-flex;justify-content:center;align-items:center;gap:8px;text-decoration:none;font-size:15px;transition:filter .15s,transform .15s}.btn:active{transform:scale(.98)}.btn:hover{filter:brightness(.96)}.btn.secondary{background:white;color:#12619a;border-color:#abd8f2}.btn.soft{background:#e7f5ff;color:#12619a;border-color:#c1e7ff}.btn.green{background:#16966f;border-color:#16966f}.btn.rose{background:#d94e67;border-color:#d94e67}.btn.gold{background:#f5e6cc;color:#76502d;border-color:#eac795}.btn.small{padding:7px 11px;font-size:13px;border-radius:11px}.btn.block{width:100%}.card{background:white;border:1.5px solid var(--line);border-radius:22px;box-shadow:0 4px 14px rgba(28,67,112,.04)}.panel{padding:18px}.grid{display:grid;gap:15px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:#e9f2f9;color:#1c547d;padding:6px 11px;font-size:12px;font-weight:850;border:1px solid #cee0ef}.pill.gold{background:#fff4db;border-color:#f3d9a2;color:#855b28}.pill.rose{background:#fff0f3;border-color:#f4c8d4;color:#a83955}.pill.green{background:#e5f9ef;color:#167151;border-color:#b8e5ce}.badge{font-size:12px;border-radius:999px;font-weight:850;padding:4px 10px;background:#e8f3fc;color:#165f98}.row{display:flex;gap:12px;align-items:center}.row.wrap{flex-wrap:wrap}.row.between{justify-content:space-between}.gap8{gap:8px}.stack{display:flex;flex-direction:column;gap:13px}.course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.course-tile{position:relative;overflow:hidden;min-height:225px;border-radius:24px;border:2px solid #fefaf3;box-shadow:var(--shadow);color:white;display:flex;align-items:flex-end;text-align:left;padding:0;isolation:isolate;background:var(--navy)}.course-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.course-tile::before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(6,38,76,.94),rgba(8,54,103,.18) 74%);z-index:-1}.course-tile.rose::before{background:linear-gradient(0deg,rgba(122,47,69,.94),rgba(97,40,64,.1) 74%)}.course-info{padding:22px;width:100%;display:flex;align-items:end;justify-content:space-between;gap:12px}.course-tile strong{font-size:clamp(19px,2.6vw,28px);line-height:1.25;display:block;text-shadow:0 2px 9px #243c5c}.course-tile small{display:block;margin-top:6px;font-size:13px;color:#f0f6fc}.course-icon{display:inline-flex;background:#fff;border-radius:50%;width:55px;height:55px;align-items:center;justify-content:center;color:#1266a3;font-size:28px;border:3px solid #bde7ff;box-shadow:0 5px 14px #1c3b6180}.hero{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(240px,.55fr);gap:15px;margin-bottom:18px}.hero-banner{min-height:240px;background:linear-gradient(102deg,#f9ebd0,#dfae70);display:flex;align-items:center;overflow:hidden;position:relative;border-radius:24px;border:2px solid #fff}.hero-banner img{width:225px;height:225px;object-fit:cover;border-radius:50%;border:6px solid #fff5d9;flex-shrink:0;margin-left:16px;box-shadow:0 6px 25px rgba(127,83,41,.15)}.hero-copy{padding:20px}.hero-copy h1{font-size:clamp(20px,3vw,34px);line-height:1.5;color:#203b5f;margin:0 0 10px}.hero-copy p{line-height:1.65;font-size:14px;color:#65502f;font-weight:650}.hero-stats{display:grid;gap:10px}.stats-card{padding:17px;display:flex;flex-direction:column;justify-content:center;gap:10px}.stats-card strong{font-size:32px;color:#145b91}.progress-track{width:100%;height:11px;background:#dbebf6;border-radius:999px;overflow:hidden}.progress-fill{height:100%;background:linear-gradient(90deg,#1595e8,#18bdac);border-radius:999px;transition:width .25s}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 27px}.quick{padding:18px 12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;color:#203c59;font-weight:850;font-size:14px;min-height:115px}.quick i{font-style:normal;font-size:34px}.quick:hover,.scene-card:hover{box-shadow:0 7px 26px rgba(21,75,123,.14);border-color:#75bced}.scene-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.scene-card{display:block;text-align:left;padding:0 0 13px;overflow:hidden;border:1.5px solid #d5e3ef;border-radius:19px;background:white;color:var(--ink);box-shadow:0 4px 13px #264e720d}.scene-card img{width:100%;height:120px;object-fit:cover;display:block;background:#e7dfcb}.scene-label{font-size:15px;font-weight:900;padding:12px 13px 2px;line-height:1.4}.scene-caption{color:var(--muted);font-size:12px;padding:0 13px}.scene-progress{padding:9px 13px 0;display:flex;align-items:center;gap:10px}.scene-progress .progress-track{height:6px}.scene-progress small{white-space:nowrap;color:#386d98}.segment{display:flex;gap:5px;background:#e9f1f8;padding:5px;border-radius:13px;width:max-content;max-width:100%;flex-wrap:wrap}.segment button{border:0;background:transparent;border-radius:10px;padding:9px 15px;font-size:14px;font-weight:850;color:#49667f}.segment button.active{background:#fff;box-shadow:0 3px 9px #12375c20;color:#1165a5}.control-group{display:flex;flex-wrap:wrap;gap:8px}.control-group .chip{border:2px solid #d4e4ee;background:#fff;color:#2a5373;border-radius:13px;font-weight:850;padding:9px 12px}.control-group .chip.active{border-color:#168ddd;background:#dff1fe;color:#0f5d98}.control-group .chip.active.rose{border-color:#e65b74;background:#fff0f3;color:#b73e59}.practice-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.65fr);gap:18px}.practice-visual{position:relative;overflow:hidden;border-radius:24px;height:260px;background:#f8dfb4;border:3px solid #fff;box-shadow:0 9px 25px #25436317}.practice-visual .scene-bg{width:100%;height:100%;object-fit:cover;filter:saturate(1.05) brightness(1.03)}.practice-visual .scene-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(248,236,211,.55) 0%,transparent 75%)}.person-cutout{position:absolute;right:13px;bottom:-20px;width:188px;height:224px;object-fit:cover;object-position:center;border:5px solid #fff9e6;border-radius:90px 90px 20px 20px;box-shadow:0 10px 24px #59412f33;transition:transform .3s}.person-cutout.speaking{animation:talkbounce .5s ease-in-out infinite alternate}.person-cutout.thinking{transform:rotate(-3deg)}.person-cutout.excited{transform:translateY(-7px) rotate(2deg)}.person-cutout.supportive{transform:rotate(2deg)}.person-name{position:absolute;left:14px;bottom:14px;background:#123d6ce8;color:white;padding:7px 12px;border-radius:12px;font-weight:850;font-size:13px}.practice-heading{padding:16px 18px}.bubble{background:white;border:2px solid #d4e5f3;border-radius:23px;padding:18px 18px;box-shadow:0 5px 18px rgba(22,55,90,.06);margin:15px 0}.bubble small{font-weight:800;color:#2b7aaf;display:block;margin-bottom:8px}.bubble h2{font-size:clamp(19px,2.6vw,26px);line-height:1.48;margin:0 0 9px}.bubble .translation{font-size:15px;color:#42627f;font-weight:650}.lesson-input{width:100%;min-height:84px;resize:vertical}.lesson-side{display:flex;flex-direction:column;gap:13px}.hint{border-radius:16px;background:#fff5df;border:1.5px solid #f1d5a9;padding:13px;line-height:1.7;font-size:14px}.hint strong{color:#865624}.feedback{background:#e9faf2;border:2px solid #b8e9d0;border-radius:18px;padding:16px;line-height:1.7}.feedback strong{color:#116c51}.feedback p{margin:6px 0}.vocab-table{width:100%;border-collapse:collapse;font-size:14px}.vocab-table td{border-bottom:1px solid #e2ecf4;padding:8px 4px;vertical-align:top}.vocab-table td:first-child{font-weight:850;color:#115ca0}.speaker-row{display:flex;align-items:center;gap:10px}.avatar-photo{width:64px;height:64px;object-fit:cover;object-position:center;border-radius:50%;border:3px solid #f3d6a3;box-shadow:0 4px 14px #244e7222}.avatar-photo.speaking{animation:talkbounce .45s ease-in-out infinite alternate}.avatar-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.avatar-option{border:2px solid #e0e9f3;background:#fff;border-radius:16px;padding:9px;text-align:center;color:#23435d;font-weight:850}.avatar-option.active{border-color:#197ec4;background:#e7f5ff}.avatar-option img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px}.avatar-option span{display:block;margin-top:6px}.chat-history{display:flex;flex-direction:column;gap:10px;max-height:390px;overflow:auto;background:#f4f8fc;border-radius:18px;padding:13px}.chat-row{max-width:86%;align-self:flex-start;background:#fff;border:1.5px solid #d8e7f1;border-radius:16px;padding:12px;line-height:1.65;white-space:pre-wrap}.chat-row.mine{align-self:flex-end;background:#daf0ff;border-color:#a8ddfa}.chat-row small{display:block;color:#36709a;font-weight:800;margin-bottom:5px}.library-layout{display:grid;grid-template-columns:260px 1fr;gap:16px}.library-filters{padding:15px;height:max-content}.library-list{display:grid;gap:10px}.library-item{padding:14px 16px;border:1.5px solid #d9e6f1;background:#fff;border-radius:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.library-item .en{font-size:17px;font-weight:900;color:#173f6d}.library-item .ja{color:#587187;font-size:13px;margin-top:4px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.detail-box{padding:17px;line-height:1.7}.import-preview{max-height:390px;overflow:auto;border:1px solid #d4e4ef;border-radius:15px}.candidate{padding:13px 15px;border-bottom:1px solid #e1ebf3;background:white}.candidate:last-child{border:0}.candidate input[type=checkbox]{width:20px;height:20px}.candidate-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:10px}.history-row{padding:13px 15px;border-bottom:1px solid #e5edf4;display:flex;justify-content:space-between;align-items:center;gap:12px}.history-row:last-child{border:0}.notice{background:#fff7e7;border:1.5px solid #efd59c;border-radius:14px;padding:12px;line-height:1.65;color:#79511f;font-size:13px}.notice.blue{background:#eef7ff;border-color:#cde8fa;color:#255f88}.notice.red{background:#fff0f2;border-color:#efc3cc;color:#9d3247}.empty{padding:40px 20px;color:#60788c;text-align:center}.bottomnav{position:fixed;bottom:0;left:0;right:0;z-index:25;background:#0e315c;border-top:3px solid #d1a264;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -4px 18px #153e6320;display:none;justify-content:space-around}.bottomnav button{border:0;background:transparent;color:#e2ecf6;min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;font-weight:800;gap:4px;padding:6px 3px;flex:1}.bottomnav button .icon{font-size:22px}.bottomnav button.active{color:#ffdf76;border-top:3px solid #ffdf76}.list-plain{padding-left:20px;line-height:1.85;font-size:14px}.file-hint{display:block;padding:15px 12px;border:2px dashed #8bb7d3;text-align:center;border-radius:16px;background:#f7fcff;font-weight:800}.importer-actions{display:flex;gap:10px;flex-wrap:wrap}.success{color:#117854}.danger{color:#b33d52}.widthmax{max-width:720px}.checkline{display:flex;align-items:center;gap:9px;font-weight:700;font-size:14px}.checkline input{width:20px;height:20px;flex-shrink:0}.smallnote{font-size:12px;color:#5f7484;line-height:1.7}.stage-dots{display:flex;gap:5px;justify-content:flex-end}.stage-dots span{width:10px;height:10px;border-radius:50%;background:#d5e5f0}.stage-dots span.active{background:#108cdf}.stage-dots span.done{background:#18a77c}@keyframes talkbounce{from{transform:translateY(1px) scale(1)}to{transform:translateY(-3px) scale(1.015)}}
@media(max-width:1150px){.desktop-nav .nav-btn{font-size:12px;padding:9px}.scene-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.desktop-nav{display:none}.bottomnav{display:flex}.hero{grid-template-columns:1fr}.hero-stats{grid-template-columns:1fr 1fr}.practice-grid{grid-template-columns:1fr}.library-layout{grid-template-columns:1fr}.library-filters{position:static}.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.topbar{min-height:56px;padding:8px 12px;border-bottom-width:3px}.brand{font-size:19px;gap:7px}.brand .brand-icon{padding:3px 6px;font-size:23px}.version{font-size:10px;margin-left:1px}.shell{padding:12px 12px 100px}.course-grid{gap:10px}.course-tile{min-height:185px}.course-info{padding:12px;display:block}.course-icon{width:41px;height:41px;font-size:22px;border-width:2px;margin-bottom:6px}.course-tile strong{font-size:17px}.course-tile small{font-size:11px;line-height:1.5}.hero-banner{min-height:180px}.hero-banner img{width:125px;height:155px;border-radius:90px;margin-left:8px;border-width:3px}.hero-copy{padding:10px 12px}.hero-copy h1{font-size:17px}.hero-copy p{font-size:11px}.hero-stats{gap:8px}.stats-card{padding:12px}.stats-card strong{font-size:24px}.quick-grid{gap:9px;grid-template-columns:repeat(2,minmax(0,1fr));margin:13px 0 18px}.quick{min-height:89px;padding:11px 8px}.quick i{font-size:30px}.scene-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scene-card img{height:98px}.scene-label{font-size:14px;padding:9px 10px 1px}.scene-caption{font-size:11px;padding:0 10px}.scene-progress{padding:8px 10px 0}.panel{padding:14px}.grid.two,.grid.three,.detail-grid{grid-template-columns:1fr}.avatar-grid{gap:5px}.avatar-option{padding:5px;border-radius:10px;font-size:11px}.avatar-option img{border-radius:7px}.practice-visual{height:212px}.person-cutout{width:145px;height:178px;right:5px}.person-name{font-size:12px}.bubble{padding:14px}.bubble h2{font-size:19px}.control-group .chip{padding:8px 10px;font-size:13px}.candidate-fields{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.toast{position:fixed;top:74px;left:50%;transform:translate(-50%,-20px);background:#112f54;color:white;z-index:90;padding:12px 19px;border-radius:14px;font-weight:800;box-shadow:0 10px 30px #1b456b44;max-width:92vw;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;text-align:center}.toast.visible{opacity:1;transform:translate(-50%,0)}
.hero-banner .hero-avatar{object-fit:cover;object-position:center;width:205px;height:210px;border:6px solid #fff9e8;border-radius:110px;box-shadow:0 9px 25px #734a2733}
@media(max-width:650px){.hero-banner .hero-avatar{width:126px;height:158px;border-width:3px}}

/* v3.2 mobile finish: enough clearance for the persistent bottom tabs and focused form fields. */
@media(max-width:900px){
  html{scroll-padding-top:90px;scroll-padding-bottom:125px}
  .shell{padding-bottom:calc(120px + env(safe-area-inset-bottom))}
  .bottomnav{min-height:68px}
  .bottomnav button{line-height:1.15}
  .bottomnav:focus-within{outline:2px solid #f2c16d;outline-offset:-2px}
}
@media(max-width:650px){
  .shell{padding-bottom:calc(125px + env(safe-area-inset-bottom))}
  .bottomnav button{min-height:67px;font-size:11px}
  .bottomnav button .icon{font-size:21px}
  input,textarea,select{scroll-margin-bottom:120px}
}
@supports selector(body:has(input:focus)){
  @media(max-width:900px){
    body:has(input:focus,textarea:focus,select:focus) .bottomnav{display:none}
  }
}
