:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;color:#17223c;background:#f3f5fb;font-synthesis:none;--blue:#203fc7;--muted:#68748b;--line:#e3e7f1;--green:#147a58;--orange:#ac5512}
*{box-sizing:border-box}body{margin:0;font-size:16px;line-height:1.55}button,input,textarea,select{font:inherit}button,a,input,textarea,select{touch-action:manipulation}button{cursor:pointer;border:0;transition:background .15s,transform .15s}button:disabled{opacity:.5;cursor:not-allowed}button:not(:disabled):active{transform:translateY(1px)}a{color:var(--blue)}:focus-visible{outline:3px solid #5d83ff;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:2rem;letter-spacing:-.04em;line-height:1.25}h2{font-size:1.2rem;letter-spacing:-.02em}h3{font-size:1rem}small,.small{font-size:.875rem}header{background:white;border-bottom:1px solid var(--line)}.header-inner{max-width:1280px;margin:auto;padding:18px 32px;display:flex;align-items:center;gap:18px}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.125rem}.brand img{width:38px}.brand span small{display:block;letter-spacing:.09em;font-size:.75rem;color:var(--muted);font-weight:500}.spacer{flex:1}.role-switch{display:flex;background:#f1f3f9;border-radius:12px;padding:4px;gap:2px}.role-switch button{padding:8px 18px;border-radius:9px;color:var(--muted);background:transparent;font-weight:600}.role-switch .active{color:var(--blue);background:white;box-shadow:0 2px 6px #17223c12}.avatar{background:#e8edff;color:var(--blue);border-radius:50%;width:36px;height:36px;display:grid;place-items:center;font-weight:800}.shell{max-width:1280px;margin:auto;padding:28px 32px 48px}.banner{background:#e8edff;color:#2b418c;border-radius:12px;padding:12px 16px;font-size:.875rem;margin-bottom:26px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.banner a{margin-left:auto}.eyebrow{font-size:.875rem;letter-spacing:.06em;color:var(--muted);margin-bottom:8px}.intro{display:flex;align-items:end;justify-content:space-between;margin-bottom:26px;gap:18px}.intro p{margin-top:8px;color:var(--muted)}.badge{font-size:.875rem;display:inline-flex;border-radius:30px;padding:4px 10px;background:#eef2fd;color:var(--blue);gap:5px;align-items:center}.badge.green{background:#e6f6ed;color:var(--green)}.badge.orange{background:#fff0df;color:var(--orange)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:28px}.stat{padding:22px 24px;background:white;border:1px solid var(--line);border-radius:16px}.stat strong{display:block;font-size:2rem;line-height:1.2;letter-spacing:-.05em;margin:6px 0}.stat span{color:var(--muted);font-size:.875rem}.grid{display:grid;grid-template-columns:360px 1fr;gap:24px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.panel-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:10px}.compose{position:sticky;top:20px}.compose p{color:var(--muted);font-size:.875rem;margin:6px 0 20px}label{display:block;font-size:.875rem;font-weight:600;margin-bottom:7px}input,textarea,select{width:100%;border:1px solid #cdd4e4;border-radius:10px;padding:11px 12px;color:#17223c;background:white}textarea{min-height:208px;resize:vertical;line-height:1.9}input:focus,textarea:focus,select:focus{border-color:var(--blue)}.field{margin-bottom:18px}.primary,.secondary,.quiet,.danger{border-radius:10px;padding:11px 17px;font-weight:650;display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:44px}.primary{background:var(--blue);color:white}.primary:hover{background:#1934ab}.secondary{background:#ecf0fd;color:var(--blue)}.quiet{background:transparent;color:var(--muted);padding:8px 10px}.danger{background:#fff0ef;color:#b33229}.full{width:100%}.muted{color:var(--muted)}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:20px;gap:26px}.tabs button{background:none;padding:0 0 14px;color:var(--muted);font-weight:600;border-bottom:2px solid transparent}.tabs .active{border-bottom-color:var(--blue);color:var(--blue)}.assignment{margin-bottom:14px;transition:border-color .15s}.assignment:hover{border-color:#a6b6ef}.assignment-top{display:flex;justify-content:space-between;gap:14px;align-items:start}.assignment h2{margin-bottom:6px}.terms{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0}.term{background:#f4f6fc;padding:5px 10px;border-radius:7px;font-size:.875rem}.progress{height:6px;background:#e9edf7;border-radius:6px;overflow:hidden}.progress div{height:100%;background:var(--blue);border-radius:6px}.assignment-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}.empty{text-align:center;padding:42px 18px;color:var(--muted)}.empty h2{color:#17223c;margin-bottom:8px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}th{text-align:left;font-size:.875rem;font-weight:500;color:var(--muted);border-bottom:1px solid var(--line);padding:12px 8px}td{padding:14px 8px;border-bottom:1px solid #edf0f7}tr:last-child td{border-bottom:none}.score{font-size:1.125rem;font-weight:800;color:var(--green)}.score.low{color:var(--orange)}.detail{margin-top:20px}.history{padding:12px 16px;background:#f6f8fd;border-radius:10px;margin:8px 0}.history audio{height:32px;max-width:100%;margin-top:8px}.student-grid{display:grid;grid-template-columns:270px 1fr;gap:24px}.word-list{display:flex;flex-direction:column;gap:8px}.word-item{display:flex;align-items:center;gap:12px;text-align:left;background:white;border:1px solid var(--line);padding:13px 15px;border-radius:12px}.word-item.active{border-color:var(--blue);background:#edf1ff}.word-num{font-size:.875rem;color:var(--muted);width:20px}.word-item strong{flex:1;font-weight:600}.practice{background:white;border:1px solid var(--line);border-radius:22px;overflow:hidden}.practice-head{padding:20px 28px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:10px}.stage{padding:40px 24px;text-align:center;background:linear-gradient(160deg,#edf2ff 0%,#f7f9ff 80%)}.word{font-size:clamp(2.3rem,6vw,4rem);line-height:1.2;letter-spacing:-.045em;color:#172d83;margin:14px 0 12px;overflow-wrap:anywhere}.stage .muted{margin-bottom:22px}.listen{background:white;border:1px solid #d2dcfa;color:var(--blue)}.record-area{padding:24px;text-align:center}.record-button{border-radius:50%;width:72px;height:72px;background:var(--blue);color:white;display:inline-grid;place-items:center;margin:10px 0}.record-button svg{width:30px;height:30px}.record-button.recording{background:#ce3e40;animation:pulse 1s infinite}.record-label{display:block;font-weight:650;margin-bottom:6px}.result{margin:20px auto 0;max-width:480px;border-radius:15px;padding:20px;background:#f2f7ff}.result-score{font-size:2.8rem;font-weight:800;line-height:1.15;color:var(--blue);letter-spacing:-.04em}.metrics{display:flex;justify-content:space-around;margin-top:15px;gap:10px}.metrics span{font-size:.875rem;color:var(--muted);display:block}.metrics strong{font-size:1.1rem}.practice-footer{border-top:1px solid var(--line);padding:18px 24px;display:flex;justify-content:space-between;align-items:center;gap:12px}.auth{max-width:440px;margin:8vh auto}.auth h1{margin-bottom:12px}.auth p{margin-bottom:24px;color:var(--muted)}.error{color:#ae2e27;background:#fff1f0;padding:12px;border-radius:10px;margin-top:14px}.loading{padding:40px;text-align:center;color:var(--muted)}#notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);border-radius:12px;box-shadow:0 8px 32px #17223c24;background:#17223c;color:white;padding:12px 20px;max-width:90vw;z-index:10;display:none}.record-preview{margin:14px auto;max-width:380px}.record-preview audio{width:100%;height:40px}.footer-note{font-size:.875rem;color:var(--muted);margin-top:24px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.inline-actions{display:flex;gap:10px;margin-top:16px;justify-content:center}.checkbox-label{display:flex;align-items:center;gap:8px;font-weight:400}.checkbox-label input{width:18px;height:18px}.mobile-only{display:none}.offline{background:#fff2df;color:#88530b}@keyframes pulse{50%{box-shadow:0 0 0 10px #ce3e4018}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media(max-width:850px){.grid{grid-template-columns:1fr}.compose{position:static}.student-grid{grid-template-columns:1fr}.word-list{flex-direction:row;overflow-x:auto;padding-bottom:8px}.word-item{flex-shrink:0}.word-num{display:none}.stats{gap:10px}.stat{padding:16px}.stat strong{font-size:1.6rem}.header-inner{padding:14px 18px;gap:10px}.shell{padding:22px 18px}.brand span small{display:none}.avatar{display:none}.role-switch button{padding:7px 12px}.intro{align-items:start}h1{font-size:1.7rem}.panel{padding:20px}.stage{padding:32px 16px}.intro .badge{white-space:nowrap}.desktop-only{display:none}.mobile-only{display:block}}@media(max-width:420px){.brand{font-size:1rem;gap:8px}.brand img{width:30px}.stats{grid-template-columns:1fr 1fr}.stats .stat:last-child{grid-column:1/-1;display:flex;gap:12px;align-items:center}.stats .stat:last-child strong{margin:0}.assignment-bottom{flex-wrap:wrap}.practice-head,.practice-footer{padding:16px}.header-inner{flex-wrap:wrap}.brand{flex:1}.role-switch{margin-left:auto}} 
/* Keep the brand legible beside the role switch on narrow phones. */
.brand{white-space:nowrap;flex-shrink:0}.brand span{flex-shrink:0}
@media(max-width:420px){.header-inner .spacer{display:none}.brand{flex:1 0 auto;font-size:.95rem}.role-switch{flex-shrink:0}}
.pronunciation{margin:10px 0 18px}.ipa{font-family:"Arial","DejaVu Sans",sans-serif;font-size:1.45rem;font-weight:400;letter-spacing:.025em;color:#3f5550;line-height:1.65;overflow-wrap:anywhere}.ipa-source{font-size:.75rem;color:var(--muted);text-underline-offset:3px}.ipa-missing{font-size:.87rem;color:var(--muted);margin-bottom:5px}.word-cell{min-width:200px;white-space:normal}.word-cell .pronunciation{margin:5px 0}.word-cell .ipa{font-size:1rem}.ipa-editor{font-size:.75rem;margin:8px 0 2px;color:var(--muted);max-width:300px}.ipa-editor form{display:grid;gap:10px;margin-top:12px}.ipa-editor input{font-family:"Arial",sans-serif}.ipa-editor .row{justify-content:space-between}.ipa-editor .secondary{font-size:.75rem;padding:8px 10px}.ipa i{font-style:italic}
