@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@400;500;600;700;800&display=swap');
:root{--bg:#e8f0fc;--panel:rgba(250,252,255,.84);--strong:rgba(255,255,255,.94);--ink:#17233b;--muted:#63708a;--blue:#2864dc;--blue-dark:#1647a8;--aqua:#31b9d5;--line:rgba(23,35,59,.11);--shadow:0 26px 80px rgba(40,75,130,.14);--button-shadow:0 15px 30px rgba(40,100,220,.25)}
html[data-theme="dark"]{color-scheme:dark;--bg:#0d1524;--panel:rgba(20,30,48,.88);--strong:rgba(27,39,61,.96);--ink:#f1f5fc;--muted:#aebbd0;--blue:#6f9fff;--blue-dark:#8bb2ff;--aqua:#54d0e4;--line:rgba(220,232,255,.12);--shadow:0 28px 90px rgba(0,0,0,.42);--button-shadow:0 15px 30px rgba(42,99,220,.25)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;min-height:100vh;font-family:"Dosis",sans-serif;color:var(--ink);background:radial-gradient(circle at 4% 5%,rgba(49,185,213,.17),transparent 27%),radial-gradient(circle at 92% 2%,rgba(40,100,220,.17),transparent 23%),linear-gradient(145deg,var(--bg),#f5f8fd 48%,#dfeafa)}button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.shell{width:min(1440px,calc(100% - 24px));margin:12px auto;padding:18px;background:var(--panel);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.7);border-radius:32px;box-shadow:var(--shadow)}.surface-card{background:var(--strong);border:1px solid var(--line);border-radius:24px}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 8px}.brand{display:flex;align-items:center;color:var(--ink);text-decoration:none;font-size:2rem;font-weight:800;letter-spacing:-.045em}.desktop-nav{display:flex;align-items:center;padding:5px;background:rgba(231,238,249,.75);border-radius:15px}.nav-link{padding:9px 17px;border-radius:11px;color:var(--muted);font-weight:700;text-decoration:none;transition:.2s}.nav-link:hover,.nav-link.active{background:white;color:var(--blue);box-shadow:0 3px 12px rgba(40,65,100,.08)}.top-actions{display:flex;align-items:center}.button{min-height:46px;border:0;border-radius:15px;padding:0 19px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-weight:800;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s}.button:hover{transform:translateY(-2px)}.primary{color:#fff;background:linear-gradient(135deg,var(--blue),#377ef1);box-shadow:var(--button-shadow)}.primary:hover{background:linear-gradient(135deg,var(--blue-dark),var(--blue))}.secondary{color:var(--ink);background:#fff;border:1px solid var(--line);box-shadow:0 8px 20px rgba(30,50,80,.06)}.compact{min-height:44px}.menu-button{display:none;width:45px;height:45px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink)}.menu-button svg{width:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.mobile-nav{display:none}.hero{position:relative;min-height:520px;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;overflow:hidden;padding:clamp(38px,6vw,78px);background:linear-gradient(125deg,rgba(255,255,255,.97),rgba(229,239,255,.93));scroll-margin-top:20px}.hero:before{content:"";position:absolute;width:460px;height:460px;right:-80px;top:-130px;border-radius:50%;background:rgba(86,151,255,.13)}.hero-copy{position:relative;z-index:2;max-width:680px}.eyebrow{margin:0 0 10px;color:var(--blue);font-size:.82rem;font-weight:800;letter-spacing:.16em}.eyebrow span{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--aqua)}h1{margin:0;font-size:clamp(3rem,5.5vw,5.6rem);line-height:.94;letter-spacing:-.055em}h1 em{font-style:normal;color:var(--blue)}.lead{max-width:610px;margin:24px 0 0;color:var(--muted);font-size:1.2rem;line-height:1.6}.hero-actions{display:flex;gap:12px;margin-top:30px}.hero-meta{display:flex;gap:30px;margin-top:36px;color:var(--muted)}.hero-meta span{display:flex;flex-direction:column;font-size:.9rem}.hero-meta strong{color:var(--ink);font-size:1.3rem}.hero-visual{position:relative;z-index:1;min-height:380px}.hero-visual img{position:absolute;z-index:1;width:min(430px,90%);right:5%;bottom:-25px;filter:drop-shadow(0 24px 25px rgba(31,65,120,.18))}.visual-glow{position:absolute;width:360px;height:360px;border-radius:50%;right:4%;bottom:-5%;background:rgba(255,255,255,.75)}.floating-card{position:absolute;z-index:2;padding:14px 16px;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.9);border-radius:17px;box-shadow:0 15px 35px rgba(35,70,120,.14)}.card-top{right:2%;top:8%;width:185px;transform:rotate(3deg)}.card-top span{display:block;color:var(--muted);font-size:.68rem;font-weight:800;letter-spacing:.12em}.card-top strong{display:block;margin-top:4px}.progress{height:6px;margin-top:10px;border-radius:9px;background:#dce7f8;overflow:hidden}.progress i{display:block;width:80%;height:100%;background:var(--blue)}.card-bottom{left:3%;bottom:8%;display:flex;align-items:center;gap:10px;transform:rotate(-3deg)}.card-bottom b{width:32px;height:32px;display:grid;place-items:center;border-radius:11px;background:#dcf8f2;color:#12816d}.card-bottom strong,.card-bottom small{display:block}.card-bottom small{color:var(--muted)}.content-section{padding:68px 8px 0;scroll-margin-top:15px}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.section-head h2,.modal h2{margin:0;font-size:clamp(1.9rem,3vw,2.7rem);letter-spacing:-.035em}.text-button{border:0;background:none;color:var(--blue);font-weight:800;font-size:1rem;cursor:pointer}.package-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.package-card,.add-card{min-height:240px;border-radius:24px}.package-card{padding:23px;background:var(--strong);border:1px solid var(--line);box-shadow:0 14px 40px rgba(40,65,100,.07);transition:.2s}.package-card:hover{transform:translateY(-4px);box-shadow:0 20px 45px rgba(40,65,100,.12)}.package-top,.package-footer{display:flex;align-items:center;justify-content:space-between}.subject{padding:6px 11px;border-radius:999px;background:#e7efff;color:var(--blue);font-size:.76rem;font-weight:800}.subject.kielet{background:#f0e9ff;color:#7448bb}.subject.biologia{background:#e2f8f1;color:#19795f}.subject.historia{background:#fff1d8;color:#a6600a}.more{border:0;background:none;color:#8b96a9;font-size:1.2rem}.package-card h3{margin:26px 0 7px;font-size:1.45rem}.package-card p{min-height:44px;margin:0;color:var(--muted);line-height:1.45}.package-footer{margin-top:25px;padding-top:16px;border-top:1px solid var(--line);font-size:.88rem;color:var(--muted)}.start{border:0;background:none;color:var(--blue);font-weight:800;cursor:pointer}.add-card{display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px dashed #c4d2e8;background:rgba(255,255,255,.45);color:var(--ink);cursor:pointer}.add-card:hover{border-color:var(--blue);background:rgba(235,243,255,.8)}.add-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:16px;background:#e3edff;color:var(--blue);font-size:1.7rem}.add-card strong{margin-top:12px;font-size:1.1rem}.add-card small{margin-top:4px;color:var(--muted)}.progress-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:18px}.progress-card{padding:30px}.section-head.inside{align-items:flex-start;margin-bottom:10px}.progress-card>p,.tip-card>p:last-child{color:var(--muted)}.round-icon{width:47px;height:47px;display:grid;place-items:center;border-radius:15px;background:#e7efff;color:var(--blue);font-size:1.3rem;font-weight:800}.week-bars{height:150px;display:grid;grid-template-columns:repeat(7,1fr);gap:12px;margin-top:24px}.week-bars div{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px}.week-bars i{width:min(32px,80%);height:var(--h);min-height:8px;border-radius:8px 8px 3px 3px;background:linear-gradient(var(--aqua),var(--blue))}.week-bars span{color:var(--muted);font-size:.78rem}.tip-card{position:relative;overflow:hidden;padding:30px;border-radius:24px;background:linear-gradient(145deg,#172849,#234a84);color:#fff}.tip-card .eyebrow{color:#78d8eb}.tip-card h3{font-size:1.65rem;line-height:1.3}.tip-icon{position:absolute;right:24px;top:20px;color:#73d7eb;font-size:2rem}footer{display:flex;justify-content:space-between;margin-top:55px;padding:24px 8px 8px;border-top:1px solid var(--line);color:var(--muted);font-weight:600}.modal-backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:rgba(16,28,50,.43);backdrop-filter:blur(5px)}.modal-backdrop[hidden]{display:none}.modal{width:min(540px,100%);padding:30px;border-radius:27px;background:#fff;box-shadow:0 30px 90px rgba(10,25,50,.28);animation:pop .25s ease-out}.modal-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:24px}.close-button{width:42px;height:42px;border:0;border-radius:14px;background:#eef3fa;color:var(--muted);font-size:1.6rem;cursor:pointer}.modal form{display:grid;gap:17px}.modal label{display:grid;gap:7px;font-weight:800}.modal label small{float:right;color:#8a94a5;font-weight:500}.modal input,.modal select,.modal textarea{width:100%;padding:12px 14px;border:1px solid #d5deeb;border-radius:13px;background:#f9fbfe;color:var(--ink);outline:none}.modal input:focus,.modal select:focus,.modal textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(40,100,220,.12)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.toast{position:fixed;z-index:60;right:24px;bottom:24px;padding:13px 18px;border-radius:14px;background:#172849;color:#fff;box-shadow:0 15px 40px rgba(12,25,50,.25);font-weight:700;transform:translateY(90px);opacity:0;transition:.3s}.toast.show{transform:none;opacity:1}@keyframes pop{from{opacity:0;transform:translateY(12px) scale(.98)}}
@media(max-width:900px){.desktop-nav,.desktop-create{display:none}.menu-button{display:grid;place-items:center}.mobile-nav{margin:0 0 12px;padding:10px;border-radius:17px;background:#fff}.mobile-nav.open{display:grid;gap:5px}.mobile-nav a{padding:11px 12px;border-radius:10px;color:var(--ink);text-decoration:none;font-weight:700}.hero{grid-template-columns:1fr;min-height:auto}.hero-visual{min-height:340px;margin-top:20px}.package-grid{grid-template-columns:repeat(2,1fr)}.progress-layout{grid-template-columns:1fr}}
@media(max-width:620px){.shell{width:calc(100% - 12px);margin:6px auto;padding:10px;border-radius:23px}.topbar{height:64px}.brand{font-size:1.65rem}.hero{padding:34px 22px;border-radius:20px}.hero-actions{flex-direction:column}.hero-meta{gap:15px;justify-content:space-between}.hero-meta span{font-size:.72rem}.hero-meta strong{font-size:1.08rem}.hero-visual{min-height:290px}.hero-visual img{width:95%;right:1%;bottom:-15px}.card-top{right:-8px;top:0}.card-bottom{left:-5px;bottom:3%}.content-section{padding:50px 2px 0}.section-head{align-items:flex-start}.package-grid{grid-template-columns:1fr}.package-card,.add-card{min-height:220px}.progress-card,.tip-card{padding:23px}.week-bars{gap:4px}.form-row{grid-template-columns:1fr}.modal-backdrop{place-items:end;padding:0}.modal{border-radius:25px 25px 0 0;padding:24px}.form-actions{flex-direction:column-reverse}.form-actions .button{width:100%}footer{flex-direction:column;gap:5px}.toast{left:12px;right:12px;bottom:12px;text-align:center}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.toast.error{background:#9e2f37}.toast.success{background:linear-gradient(135deg,#168553,#21ad6d);box-shadow:0 15px 40px rgba(17,126,78,.32)}.loading-packages{grid-column:1/-1;padding:45px;text-align:center;border:1px dashed #c4d2e8;border-radius:24px;color:var(--muted);font-weight:700}.error-state{color:#9e2f37;background:#fff7f7}.button:disabled{cursor:wait;opacity:.7;transform:none}

/* Study application views */
.app-shell{min-height:calc(100vh - 24px)}.app-nav button{border:0;cursor:pointer;font-family:inherit;font-size:1rem}.mobile-nav button:not(.button){padding:11px 12px;border:0;border-radius:10px;background:transparent;color:var(--ink);text-align:left;font-weight:700}.app-loading,.empty-page{min-height:55vh;display:grid;place-items:center;align-content:center;gap:12px;text-align:center;color:var(--muted)}.loader{width:34px;height:34px;border:3px solid #dbe6f8;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.page-hero{min-height:390px;display:grid;grid-template-columns:1.15fr .85fr;align-items:center;overflow:hidden;padding:clamp(36px,6vw,72px);background:linear-gradient(125deg,#fff,#e8f1ff)}.page-hero h1,.page-heading h1,.result-card h1{margin:0;font-size:clamp(2.8rem,5vw,5rem);letter-spacing:-.05em}.page-hero .lead{margin-bottom:26px}.page-hero img{width:min(390px,100%);justify-self:center;filter:drop-shadow(0 20px 24px rgba(30,65,120,.16))}.stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:18px}.mini-stat{display:flex;align-items:center;gap:16px;padding:22px}.mini-stat .stat-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:17px;background:#e8f0ff;color:var(--blue);font-size:1.4rem;font-weight:800}.mini-stat small,.mini-stat strong,.mini-stat p{display:block;margin:0}.mini-stat small{color:var(--muted);font-weight:700}.mini-stat strong{font-size:1.8rem}.mini-stat p{color:var(--muted);font-size:.83rem}.dashboard-grid,.stats-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.dashboard-card,.chart-card,.hard-card{padding:28px}.dashboard-card h2,.chart-card h2,.hard-card h2,.recommend-card h2{margin:0;font-size:1.7rem}.exam-list{display:grid;gap:9px}.exam-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;padding:10px;border-radius:16px;background:#f7f9fd}.date-box{width:48px;height:52px;display:grid;place-items:center;align-content:center;border-radius:13px;background:#e5eeff;color:var(--blue)}.date-box b{font-size:1.25rem;line-height:1}.date-box small{text-transform:uppercase}.exam-row div strong,.exam-row div small{display:block}.exam-row div small{color:var(--muted)}.days-left{padding:5px 9px;border-radius:999px;background:white;color:var(--blue);font-size:.78rem;font-weight:800}.skill-list{display:grid;gap:18px}.skill-list span,.big-skill span{display:flex;justify-content:space-between}.skill-list em{font-style:normal;color:var(--blue);font-weight:800}.skill-list i,.big-skill i,.tiny-progress{display:block;height:9px;margin-top:7px;border-radius:9px;background:#e8edf5;overflow:hidden}.skill-list i b,.big-skill i b,.tiny-progress i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,var(--blue),var(--aqua))}.recommend-card{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:25px;margin-top:18px;padding:30px;border-radius:24px;background:linear-gradient(135deg,#172849,#245491);color:white;overflow:hidden}.recommend-card .eyebrow{color:#78d8eb}.recommend-card p:last-child{margin-bottom:0;color:#c7d4e8}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:55px 8px 28px}.page-heading p:last-child{margin:8px 0 0;color:var(--muted);font-size:1.05rem}.subject-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.subject-card{display:flex;align-items:center;gap:18px;padding:24px}.subject-symbol{width:58px;height:58px;display:grid;place-items:center;flex:none;border-radius:18px;font-size:1.7rem;font-weight:800}.blue{background:#e5eeff!important;color:#2864dc!important}.violet{background:#f0e8ff!important;color:#7448bb!important}.green{background:#e2f8f1!important;color:#19795f!important}.orange{background:#fff0d8!important;color:#a6600a!important}.pink{background:#ffe7f0!important;color:#b43c69!important}.subject-card h3{margin:0;font-size:1.4rem}.subject-card p{margin:3px 0;color:var(--muted)}.subject-card>div{width:100%}.subject-card small{color:var(--muted)}.mastery-ring{display:grid;place-items:center;width:47px;height:47px;border-radius:50%;background:conic-gradient(var(--blue) var(--p),#e8edf5 0);color:var(--ink);font-size:.73rem;font-weight:800;position:relative}.mastery-ring:before{content:"";position:absolute;inset:5px;border-radius:50%;background:#fff}.mastery-ring{isolation:isolate}.mastery-ring:before{z-index:-1}.practice-modes{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.practice-modes button{min-height:170px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:20px;border:1px solid var(--line);border-radius:22px;background:#fff;color:var(--ink);text-align:left;cursor:pointer;box-shadow:0 12px 30px rgba(30,60,100,.06);transition:.2s}.practice-modes button:hover{transform:translateY(-4px);border-color:#a9c2ed}.practice-modes span{width:45px;height:45px;display:grid;place-items:center;margin-bottom:auto;border-radius:14px;background:#e8f0ff;color:var(--blue);font-size:1.4rem}.practice-modes b{font-size:1.1rem}.practice-modes small{margin-top:3px;color:var(--muted)}.subheading{margin:45px 0 20px}.session-shell{max-width:850px;min-height:570px;margin:45px auto;padding:30px}.session-top{display:flex;justify-content:space-between;color:var(--muted);font-weight:700}.session-progress{height:7px;margin:18px 0 45px;border-radius:7px;background:#e8edf5}.session-progress i{display:block;height:100%;border-radius:7px;background:var(--blue)}.question-area{max-width:680px;margin:auto;text-align:center}.question-area>h2{margin:25px 0;font-size:2.1rem}.answer-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer-grid button{min-height:65px;padding:12px;border:1px solid #d5dfed;border-radius:16px;background:#f9fbfe;color:var(--ink);font-weight:700;cursor:pointer}.answer-grid button:hover{border-color:var(--blue);background:#edf3ff}.flashcard{min-height:310px;display:grid;place-items:center;padding:35px;border:2px solid #d9e5f5;border-radius:25px;background:linear-gradient(145deg,#fff,#edf4ff);cursor:pointer;box-shadow:0 18px 45px rgba(30,65,110,.09)}.flashcard small{color:var(--blue);font-weight:800;letter-spacing:.12em}.flashcard h2{font-size:2rem}.flashcard p{color:var(--muted)}.flashcard.flipped{background:linear-gradient(145deg,#eaf3ff,#fff)}.self-grade{display:flex;justify-content:center;gap:12px;margin-top:18px}.button.wrong{background:#fff0f1;color:#a52f3a}.button.correct{background:#e1f8ef;color:#147558}.feedback{margin-top:20px;padding:16px;border-radius:16px;font-weight:800}.feedback small{display:block;margin:4px 0 12px;font-weight:500}.feedback.ok{background:#e5f8f1;color:#147558}.feedback.no{background:#fff0f1;color:#a52f3a}.result-card{max-width:780px;margin:55px auto;padding:55px;text-align:center}.result-icon{width:70px;height:70px;display:grid;place-items:center;margin:auto;border-radius:22px;background:#e7efff;color:var(--blue);font-size:2rem}.result-card p{color:var(--muted)}.result-card>div{display:flex;justify-content:center;gap:10px;margin-top:25px}.exam-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.exam-card{padding:25px}.exam-card h3{font-size:1.5rem;margin:24px 0 5px}.exam-card p{color:var(--muted)}.exam-card>strong{display:block;margin:20px 0;color:var(--blue)}.big-skill{margin-top:25px}.big-skill strong{color:var(--blue)}.big-skill i{height:12px}.big-skill small{display:block;margin-top:6px;color:var(--muted)}.hard-row{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.hard-row>b{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#fff0f1;color:#a52f3a}.hard-row span strong,.hard-row span small{display:block}.hard-row span small{color:var(--muted)}.empty-small{padding:25px;text-align:center;color:var(--muted)}
@media(max-width:1050px){.app-nav .nav-link{padding:8px 10px}.practice-modes{grid-template-columns:repeat(3,1fr)}.subject-grid,.exam-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.page-hero{grid-template-columns:1fr}.page-hero img{max-height:270px;object-fit:contain}.stats-row{grid-template-columns:1fr}.dashboard-grid,.stats-layout{grid-template-columns:1fr}.subject-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.page-hero{padding:30px 22px}.page-hero img{margin-top:20px}.page-heading{align-items:flex-start;flex-direction:column;padding-top:38px}.page-heading .button{width:100%}.subject-grid,.exam-grid,.practice-modes{grid-template-columns:1fr}.practice-modes button{min-height:125px}.dashboard-card,.chart-card,.hard-card{padding:21px}.recommend-card{grid-template-columns:1fr}.recommend-card .button{width:100%}.answer-grid{grid-template-columns:1fr}.session-shell{margin:18px 0;padding:20px;min-height:500px}.question-area>h2{font-size:1.6rem}.result-card{padding:30px 20px}.self-grade,.result-card>div{flex-direction:column}.modal form{max-height:70vh;overflow:auto;padding-right:2px}}
.profile-switch select{max-width:145px;padding:10px 30px 10px 12px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);font-weight:700}.subject-group{margin-bottom:35px}.subject-group>h2{margin:0 0 14px;font-size:1.35rem}.user-groups{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.user-level{padding:24px}.level-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}.level-head h2,.level-head p{margin:0}.level-head p{color:var(--muted)}.level-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:#e5eeff;color:var(--blue);font-weight:800}.user-list{display:grid;gap:8px}.user-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;width:100%;padding:12px;border:1px solid transparent;border-radius:15px;background:#f7f9fd;color:var(--ink);text-align:left;cursor:pointer}.user-row:hover,.user-row.selected{border-color:#abc4ee;background:#edf3ff}.user-row>span{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#fff;color:var(--blue);font-weight:800}.user-row div b,.user-row div small{display:block}.user-row div small{color:var(--muted)}.user-row em{color:var(--blue);font-size:.78rem;font-style:normal;font-weight:800}.template-info{margin-top:18px;padding:28px}.template-info h2{margin-top:0}.template-info>div{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.template-info span{padding:15px;border-radius:15px;background:#f5f8fd}.template-info b,.template-info small{display:block}.template-info small{margin-top:4px;color:var(--muted)}
@media(max-width:1200px){.desktop-nav{display:none}.menu-button{display:grid;place-items:center}}
@media(max-width:800px){.user-groups{grid-template-columns:1fr}.template-info>div{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.profile-switch{margin-left:auto}.profile-switch select{max-width:115px}.user-groups,.template-info>div{grid-template-columns:1fr}}

/* Theme switch, motion and dark surfaces */
.theme-switch{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:.85rem;cursor:pointer}.theme-switch input{position:absolute;opacity:0;pointer-events:none}.theme-switch i{position:relative;width:46px;height:26px;border-radius:999px;background:#cbd7e8;box-shadow:inset 0 2px 5px rgba(30,50,80,.14);transition:background .25s}.theme-switch i:after{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:white;box-shadow:0 2px 7px rgba(20,40,70,.25);transition:transform .25s cubic-bezier(.2,.8,.2,1)}.theme-switch input:checked+i{background:var(--blue)}.theme-switch input:checked+i:after{transform:translateX(20px)}.theme-switch input:focus-visible+i{outline:3px solid rgba(50,120,255,.3);outline-offset:2px}#app>*{animation:viewIn .42s cubic-bezier(.2,.8,.2,1) both}.package-card,.subject-card,.mini-stat,.exam-card,.practice-modes button{animation:cardIn .4s ease both}.package-card:nth-child(2),.subject-card:nth-child(2),.mini-stat:nth-child(2){animation-delay:.06s}.package-card:nth-child(3),.subject-card:nth-child(3),.mini-stat:nth-child(3){animation-delay:.12s}.skill-list i b,.big-skill i b,.tiny-progress i{animation:growBar .8s cubic-bezier(.2,.8,.2,1) both;transform-origin:left}.recommend-card{animation:recommendIn .55s cubic-bezier(.2,.8,.2,1) both}.recommend-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.recommend-meta span{padding:6px 10px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.08);color:#dce8fa;font-size:.78rem;font-weight:700}@keyframes viewIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes cardIn{from{opacity:0;transform:translateY(15px) scale(.985)}to{opacity:1;transform:none}}@keyframes growBar{from{transform:scaleX(0)}}@keyframes recommendIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
html[data-theme="dark"] body{background:radial-gradient(circle at 4% 5%,rgba(49,185,213,.12),transparent 27%),radial-gradient(circle at 92% 2%,rgba(60,115,230,.14),transparent 23%),linear-gradient(145deg,#0b1321,#121e31 50%,#0a1322)}html[data-theme="dark"] .topbar,html[data-theme="dark"] .mobile-nav{background:transparent}html[data-theme="dark"] .desktop-nav,html[data-theme="dark"] .nav-link:hover,html[data-theme="dark"] .nav-link.active{background:#1c2940}html[data-theme="dark"] .profile-switch select,html[data-theme="dark"] .menu-button,html[data-theme="dark"] .secondary,html[data-theme="dark"] .modal,html[data-theme="dark"] .package-card,html[data-theme="dark"] .practice-modes button,html[data-theme="dark"] .answer-grid button{background:#1b293f;color:var(--ink)}html[data-theme="dark"] .page-hero{background:linear-gradient(125deg,#1b2a42,#15243b)}html[data-theme="dark"] .page-hero img{filter:drop-shadow(0 20px 24px rgba(0,0,0,.35)) brightness(.9)}html[data-theme="dark"] .exam-row,html[data-theme="dark"] .user-row,html[data-theme="dark"] .template-info span{background:#152238}html[data-theme="dark"] .date-box,html[data-theme="dark"] .subject-symbol.blue,html[data-theme="dark"] .round-icon,html[data-theme="dark"] .stat-icon{background:#213a64!important;color:#8fb4ff!important}html[data-theme="dark"] .days-left,html[data-theme="dark"] .mastery-ring:before{background:#24344f}html[data-theme="dark"] .add-card{background:rgba(24,36,56,.65)}html[data-theme="dark"] .flashcard,html[data-theme="dark"] .flashcard.flipped{background:linear-gradient(145deg,#1c2c46,#142238);border-color:#314867}html[data-theme="dark"] .modal input,html[data-theme="dark"] .modal select,html[data-theme="dark"] .modal textarea{background:#111c2d;border-color:#34445d;color:var(--ink)}html[data-theme="dark"] .close-button{background:#273650;color:var(--ink)}html[data-theme="dark"] .user-row>span{background:#263a5a}html[data-theme="dark"] .user-row:hover,html[data-theme="dark"] .user-row.selected{background:#22395f}html[data-theme="dark"] .loading-packages{background:#17243a}html[data-theme="dark"] .surface-card{box-shadow:0 16px 45px rgba(0,0,0,.16)}
@media(max-width:620px){.theme-switch>span{display:none}.theme-switch i{width:42px}.theme-switch input:checked+i:after{transform:translateX(16px)}}

/* Login */
body.auth-locked .desktop-nav,body.auth-locked .header-buttons,body.auth-locked .mobile-nav,body.auth-locked footer{display:none}.auth-screen{min-height:calc(100vh - 145px);display:grid;place-items:center;padding:35px 12px}.auth-card{width:min(470px,100%);padding:38px}.auth-logo{width:58px;height:58px;display:grid;place-items:center;margin-bottom:24px;border-radius:19px;background:linear-gradient(145deg,var(--blue),#4892ff);color:#fff;box-shadow:var(--button-shadow)}.auth-logo svg{width:34px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.auth-card h1{font-size:clamp(2.4rem,6vw,3.8rem)}.auth-card>p:not(.eyebrow){color:var(--muted);font-size:1.08rem}.auth-card form{display:grid;gap:16px;margin-top:28px}.auth-card label{display:grid;gap:7px;font-weight:800}.auth-card input,.auth-card select{width:100%;padding:13px 14px;border:1px solid #d5deeb;border-radius:13px;background:#f9fbfe;color:var(--ink);outline:none}.auth-card input:focus,.auth-card select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(40,100,220,.12)}.auth-card form .button{width:100%;margin-top:5px}.auth-error{min-height:20px;color:#aa3540;text-align:center;font-weight:700}.auth-card>small{display:block;margin-top:18px;color:var(--muted);text-align:center}html[data-theme="dark"] .auth-card input,html[data-theme="dark"] .auth-card select{background:#111c2d;border-color:#34445d}.credential-button{width:34px;height:34px;border:0;border-radius:11px;background:#e8f0ff;color:var(--blue);font-size:1.1rem;font-weight:800;cursor:pointer}.credential-button:hover{background:#d9e7ff}.user-row{grid-template-columns:1fr auto auto}html[data-theme="dark"] .credential-button{background:#263c61;color:#9abaff}

/* Password visibility */
.password-wrap{position:relative;display:block;width:100%}.password-wrap input{padding-right:52px!important}.password-eye{position:absolute;right:6px;top:50%;width:39px;height:39px;display:grid;place-items:center;transform:translateY(-50%);border:0;border-radius:10px;background:transparent;color:var(--muted);cursor:pointer}.password-eye:hover,.password-eye.visible{background:#e8f0ff;color:var(--blue)}.password-eye svg{width:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.password-eye.visible svg{filter:drop-shadow(0 0 4px rgba(40,100,220,.25))}html[data-theme="dark"] .password-eye:hover,html[data-theme="dark"] .password-eye.visible{background:#283d60;color:#9abaff}

/* Settings menu */
.app-shell{position:relative}.header-buttons{display:flex;align-items:center;gap:8px}.settings-button{width:45px;height:45px;display:grid;place-items:center;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);cursor:pointer;transition:.2s}.settings-button:hover,.settings-button[aria-expanded="true"]{transform:rotate(15deg);background:#eaf1ff;color:var(--blue)}.settings-button svg{width:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.settings-panel{position:absolute;z-index:45;right:18px;top:82px;width:min(390px,calc(100% - 36px));padding:22px;border:1px solid rgba(255,255,255,.7);border-radius:24px;background:rgba(255,255,255,.96);box-shadow:0 28px 70px rgba(20,45,85,.22);backdrop-filter:blur(18px);animation:settingsIn .22s cubic-bezier(.2,.8,.2,1)}.settings-panel[hidden]{display:none}.settings-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:15px}.settings-head h2{margin:0;font-size:1.7rem}.settings-identity{display:flex;align-items:center;gap:12px;padding:10px 2px 17px}.settings-identity>span{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#e6efff;color:var(--blue);font-size:1.15rem;font-weight:800}.settings-identity b,.settings-identity small{display:block}.settings-identity small{margin-top:2px;color:var(--muted);font-weight:600}.admin-setting[hidden]{display:none!important}.settings-field,.settings-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 2px;border-top:1px solid var(--line)}.settings-field span b,.settings-field span small,.settings-row span b,.settings-row span small,.settings-link span b,.settings-link span small{display:block}.settings-field small,.settings-row small,.settings-link small{margin-top:2px;color:var(--muted);font-weight:500}.settings-field select{max-width:145px;padding:9px 28px 9px 10px;border:1px solid var(--line);border-radius:11px;background:#f7f9fd;color:var(--ink);font-weight:700}.settings-link{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;width:100%;padding:14px 2px;border:0;border-top:1px solid var(--line);background:none;color:var(--ink);text-align:left;cursor:pointer}.settings-link-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#e6efff;color:var(--blue);font-size:1.25rem}.settings-link em{color:var(--blue);font-style:normal;font-size:1.2rem}.settings-about{display:flex;justify-content:space-between;margin:8px -10px -10px;padding:13px 12px;border-radius:14px;background:#f4f7fc;color:var(--muted);font-size:.78rem}.settings-about span{font-weight:800}@keyframes settingsIn{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}html[data-motion="off"] *,html[data-motion="off"] *:before,html[data-motion="off"] *:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}html[data-theme="dark"] .settings-button,html[data-theme="dark"] .settings-panel{background:rgba(25,38,59,.98);color:var(--ink);border-color:var(--line)}html[data-theme="dark"] .settings-button:hover,html[data-theme="dark"] .settings-button[aria-expanded="true"]{background:#263b60}html[data-theme="dark"] .settings-field select,html[data-theme="dark"] .settings-about{background:#121f33;color:var(--ink)}html[data-theme="dark"] .settings-link-icon{background:#263c61;color:#8fb4ff}
@media(max-width:620px){.settings-panel{position:fixed;top:auto;right:8px;bottom:8px;left:8px;width:auto;padding:20px;border-radius:24px}.settings-button,.menu-button{width:42px;height:42px}.settings-about{display:none}}

/* Subject and semester management */
.term-section{margin-bottom:42px}.term-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;padding-bottom:10px;border-bottom:1px solid var(--line)}.term-title h2{margin:0;font-size:1.65rem}.term-title span{padding:6px 10px;border-radius:999px;background:#e7efff;color:var(--blue);font-size:.78rem;font-weight:800}.subject-group>h3{margin:0 0 13px;color:var(--muted);font-size:1rem;text-transform:uppercase;letter-spacing:.08em}.subject-card{align-items:flex-start}.subject-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.term-badge{padding:4px 8px;border-radius:999px;background:#edf3fd;color:var(--blue);font-size:.7rem;font-weight:800}.subject-actions{display:flex;gap:5px}.subject-actions button{width:30px;height:30px;border:0;border-radius:9px;background:#edf2f9;color:var(--muted);font-weight:800;cursor:pointer}.subject-actions button:hover{color:var(--blue);background:#e3ecfb}.subject-actions button.danger{background:#f9e9eb;color:#a53540}.subject-actions button.danger:hover{background:#ffe8eb}.subject-card>div{min-width:0}html[data-theme="dark"] .term-title span,html[data-theme="dark"] .term-badge{background:#263c61;color:#9abaff}html[data-theme="dark"] .subject-actions button{background:#22324b;color:#c3cee0}html[data-theme="dark"] .subject-actions button.danger{background:#472733;color:#ff9ba5}

/* Subject card action menu */
.subject-card{position:relative}.subject-card:has(.subject-menu-popover:not([hidden])){z-index:25}
.subject-menu{position:relative;margin-left:auto}.kebab-button{width:38px;height:34px;display:grid;place-items:center;border:1px solid transparent;border-radius:11px;background:#edf2f9;color:var(--muted);font-size:1rem;font-weight:900;letter-spacing:1px;line-height:1;cursor:pointer;transition:.2s}.kebab-button:hover,.kebab-button[aria-expanded="true"]{border-color:#bfd0e8;background:#e3ecfb;color:var(--blue)}.subject-menu-popover{position:absolute;z-index:20;right:0;top:42px;width:190px;padding:6px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 18px 45px rgba(22,47,85,.2);animation:settingsIn .18s ease-out}.subject-menu-popover[hidden]{display:none}.subject-menu-popover button{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;border-radius:9px;background:transparent;color:var(--ink);text-align:left;font-weight:700;cursor:pointer}.subject-menu-popover button:hover{background:#eef4fd}.subject-menu-popover button span{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#e9f0fb;color:var(--blue)}.subject-menu-popover button.danger{color:#a53540}.subject-menu-popover button.danger:hover{background:#fff0f1}.subject-menu-popover button.danger span{background:#f9e5e8;color:#a53540}html[data-theme="dark"] .kebab-button{background:#22324b;color:#c3cee0}html[data-theme="dark"] .kebab-button:hover,html[data-theme="dark"] .kebab-button[aria-expanded="true"]{background:#2a4268;color:#9abaff}html[data-theme="dark"] .subject-menu-popover{background:#1a2940;border-color:#354660}html[data-theme="dark"] .subject-menu-popover button:hover{background:#233754}html[data-theme="dark"] .subject-menu-popover button span{background:#263d61;color:#9abaff}html[data-theme="dark"] .subject-menu-popover button.danger{color:#ff9ba5}html[data-theme="dark"] .subject-menu-popover button.danger:hover{background:#422630}html[data-theme="dark"] .subject-menu-popover button.danger span{background:#4b2933;color:#ff9ba5}

/* Destructive actions */
.card-tools{display:flex;align-items:center;gap:8px}.delete-icon{width:34px;height:34px;display:grid;place-items:center;flex:none;border:1px solid transparent;border-radius:11px;background:#f7e9eb;color:#a53540;font-size:1.2rem;line-height:1;cursor:pointer;transition:.2s}.delete-icon:hover{transform:scale(1.06);border-color:#e7b6bc;background:#ffecef}.user-row{grid-template-columns:1fr repeat(3,auto);padding:5px}.user-main{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;width:100%;padding:7px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.user-main>span{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#fff;color:var(--blue);font-weight:800}.user-main div b,.user-main div small{display:block}.user-main div small{color:var(--muted)}.user-main em{color:var(--blue);font-size:.78rem;font-style:normal;font-weight:800}html[data-theme="dark"] .delete-icon{background:#472733;color:#ff9ba5}html[data-theme="dark"] .user-main>span{background:#263a5a}.exam-card .delete-icon{margin-left:auto}
.role-button{width:34px;height:34px;border:0;border-radius:11px;background:#e4f5ef;color:#147558;font-weight:800;cursor:pointer}.role-button:hover{background:#d1eee4}html[data-theme="dark"] .role-button{background:#21483f;color:#8de0c6}
.modal.wide-modal{width:min(780px,100%)}.material-picker{display:grid;gap:9px;padding:16px;border:1px dashed #b8c9e3;border-radius:16px;background:#f7faff}.material-picker>div{display:flex;flex-wrap:wrap;gap:9px}.material-picker small{color:var(--muted)}.upload-button{display:inline-flex!important;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border:1px solid #cbd9ec;border-radius:12px;background:#fff;color:var(--blue);font-weight:800;cursor:pointer}.ai-choice{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:12px;padding:16px;border:1px solid #bfd2f2;border-radius:16px;background:#edf4ff}.ai-choice input{width:20px!important;height:20px;margin-top:2px}.ai-choice span b,.ai-choice span small{display:block}.ai-choice span small{margin-top:3px;color:var(--muted);font-weight:500}.package-date{margin:10px 0;color:var(--blue);font-weight:800}.button.almost{background:#fff4d9;color:#8b6508}html[data-theme="dark"] .material-picker{background:#142238;border-color:#3a5274}html[data-theme="dark"] .upload-button{background:#1e304b;border-color:#3b5272}html[data-theme="dark"] .ai-choice{background:#1b3152;border-color:#36547d}html[data-theme="dark"] .button.almost{background:#4a3c1d;color:#ffd77a}@media(max-width:620px){.material-picker>div,.upload-button{width:100%}.modal.wide-modal form{max-height:72vh;overflow:auto}.hero-actions{flex-direction:column}.hero-actions .button{width:100%}}
.crop-layer{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px;background:rgba(8,16,30,.78);backdrop-filter:blur(8px)}.crop-dialog{width:min(620px,100%);max-height:96vh;overflow:auto;padding:24px;border-radius:24px;background:#fff;color:#17233a;box-shadow:0 30px 90px rgba(0,0,0,.35)}.crop-dialog h2{margin:0 0 18px}.crop-dialog canvas{display:block;width:min(100%,460px);aspect-ratio:1;margin:auto;border-radius:16px;background:#e9eef6;object-fit:contain}.crop-dialog>label,.crop-position label{display:grid;gap:6px;margin-top:14px;font-weight:800}.crop-position{display:grid;grid-template-columns:1fr 1fr;gap:14px}.crop-dialog input[type="range"]{width:100%}@media(max-width:620px){.crop-layer{padding:0}.crop-dialog{height:100%;max-height:none;border-radius:0}.crop-position{grid-template-columns:1fr}}
.answer-grid button.correct-choice{border-color:#26a875!important;background:#dff8ed!important;color:#126a4c!important;box-shadow:0 0 0 3px rgba(38,168,117,.16);opacity:1}.answer-grid button.wrong-choice{border-color:#db5a67!important;background:#fff0f2!important;color:#9f2f3a!important;opacity:1}.feedback b{font-size:1.15rem}.feedback p{margin:10px 0 14px;line-height:1.5;font-weight:600}.answer-correct{animation:correctPulse .48s ease-out}.answer-wrong{animation:wrongShake .42s ease-out}@keyframes correctPulse{0%{transform:scale(1)}45%{transform:scale(1.025);filter:drop-shadow(0 0 12px rgba(38,168,117,.35))}100%{transform:scale(1)}}@keyframes wrongShake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(3px)}}html[data-theme="dark"] .answer-grid button.correct-choice{background:#183f35!important;color:#91e5c8!important}html[data-theme="dark"] .answer-grid button.wrong-choice{background:#482630!important;color:#ffabb3!important}
.practice-modes{grid-template-columns:repeat(3,1fr)}.written-answer{display:grid;gap:12px;text-align:left}.written-answer label{font-weight:800}.written-answer textarea{width:100%;resize:vertical;padding:16px;border:1px solid #cbd8ea;border-radius:16px;background:#f9fbfe;color:var(--ink);font:inherit;line-height:1.55;outline:none}.written-answer textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(40,100,220,.12)}.written-answer .button{justify-self:end}.written-feedback{margin-top:20px;padding:20px;border-radius:18px;text-align:left}.written-feedback.ok{background:#e5f8f1;color:#126a4c}.written-feedback.no{background:#fff3e7;color:#8c5416}.evaluation-score{display:flex;align-items:center;justify-content:space-between;gap:15px}.evaluation-score strong{font-size:2rem}.evaluation-score span{font-weight:800}.evaluation-list{margin-top:16px;padding:14px;border-radius:13px;background:rgba(255,255,255,.55)}.evaluation-list b{font-size:1rem}.evaluation-list ul{margin:8px 0 0;padding-left:20px}.evaluation-list li+li{margin-top:5px}.evaluation-complete{margin-top:15px;font-weight:800}.written-feedback details{margin:15px 0}.written-feedback summary{cursor:pointer;font-weight:800}html[data-theme="dark"] .written-answer textarea{background:#111c2d;border-color:#34445d}html[data-theme="dark"] .written-feedback.ok{background:#183f35;color:#a7ead3}html[data-theme="dark"] .written-feedback.no{background:#49351f;color:#ffd69c}html[data-theme="dark"] .evaluation-list{background:rgba(8,18,30,.35)}@media(max-width:900px){.practice-modes{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.practice-modes{grid-template-columns:1fr}.written-answer .button{width:100%}}
/* Harjoituskokeen asetukset ja tulokset */
:root{--border:var(--line);--surface-soft:var(--panel);--primary:var(--blue)}
.exam-setup{display:grid;gap:20px}.exam-setup fieldset{border:0;padding:0;margin:0}.exam-setup legend{font-weight:800;margin-bottom:10px}.exam-type-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.exam-type-choice,.timer-choice{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.exam-type-choice input,.timer-choice input{width:20px;height:20px;accent-color:var(--primary);flex:0 0 auto}.exam-type-choice span,.timer-choice span{display:grid;gap:2px}.exam-type-choice small,.timer-choice small{color:var(--muted)}.exam-type-choice.disabled{opacity:.45}.exam-timer{color:var(--primary);white-space:nowrap}.exam-result-stats{display:grid!important;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.exam-result-stats span{display:grid;padding:16px;border-radius:18px;background:var(--surface-soft);border:1px solid var(--border)}.exam-result-stats small{color:var(--muted)}.exam-result-stats strong{font-size:1.7rem}.result-wrong-list{display:grid;gap:9px;margin:22px 0;padding:18px;border:1px solid #efbcc2;border-radius:18px;background:rgba(210,54,70,.06);text-align:left}.result-wrong-list>div{margin-bottom:4px}.result-wrong-list h3,.result-wrong-list p{margin:0}.result-wrong-list>div>small{color:var(--muted)}.result-wrong-list article{display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;padding:13px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}.result-wrong-list article>b{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#ffe4e7;color:#a52f3a}.result-wrong-list article span{display:grid;gap:3px;min-width:0}.result-wrong-list article strong{overflow-wrap:anywhere}.result-wrong-list article small{color:var(--muted)}.result-wrong-list article em{font-style:normal;font-weight:800;color:#a52f3a}.result-actions{display:flex!important;justify-content:center;flex-wrap:wrap;gap:10px}html[data-theme="dark"] .result-wrong-list{border-color:#70404a;background:rgba(170,45,60,.12)}html[data-theme="dark"] .result-wrong-list article>b{background:#4b2630;color:#ffb0b8}
@media(max-width:680px){.exam-type-options,.exam-result-stats{grid-template-columns:1fr}.session-top span{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}.result-actions{display:grid!important}.result-actions .button{width:100%}}
.text-scan-tools{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:3px}.text-scan-tools small{color:var(--muted);font-weight:500}.text-scan-tools .upload-button:disabled{cursor:wait;opacity:.65}@media(max-width:620px){.text-scan-tools,.text-scan-tools .upload-button{width:100%}}
.learning-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.learning-summary article{display:grid;gap:3px;padding:22px}.learning-summary article>span{width:44px;height:44px;display:grid;place-items:center;margin-bottom:8px;border-radius:14px;background:#e7efff;color:var(--blue);font-size:1.25rem;font-weight:800}.learning-summary small{color:var(--muted);font-weight:700}.learning-summary strong{font-size:1.65rem}.streak-flame{position:relative;width:126px;height:126px;display:grid;place-items:center;align-content:center;flex:none;text-align:center}.streak-flame>span{position:absolute;inset:0;display:grid;place-items:center;font-size:7rem;filter:drop-shadow(0 10px 18px rgba(244,112,35,.3));animation:flameDance 1.15s ease-in-out infinite alternate;transform-origin:50% 85%}.streak-flame b,.streak-flame small{position:relative;z-index:1;color:#fff;text-shadow:0 2px 4px rgba(112,39,0,.45)}.streak-flame b{margin-top:17px;font-size:2rem;line-height:1}.streak-flame small{font-size:.7rem;font-weight:800}.progress-chart-card{margin-top:18px;padding:28px}.progress-chart-card h2{margin:0;font-size:1.7rem}.progress-chart{width:100%;height:auto;margin-top:20px;overflow:visible}.progress-chart line{stroke:var(--line);stroke-width:1}.progress-chart polyline{fill:none;stroke:var(--blue);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 5px 7px rgba(40,100,220,.2))}.progress-chart circle{fill:var(--strong);stroke:var(--aqua);stroke-width:3}.chart-labels{display:flex;justify-content:space-between;color:var(--muted);font-weight:700}@keyframes flameDance{from{transform:rotate(-2deg) scale(.97)}to{transform:rotate(2deg) scale(1.04)}}html[data-motion="off"] .streak-flame>span{animation:none}@media(max-width:900px){.learning-summary{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.learning-summary{grid-template-columns:1fr 1fr;gap:9px}.learning-summary article{padding:16px}.learning-summary strong{font-size:1.3rem}.streak-flame{width:100px;height:100px}.streak-flame>span{font-size:5.7rem}.progress-chart-card{padding:20px 12px}.progress-chart{min-height:190px}.page-heading:has(.streak-flame){align-items:center}}
.streak-flame b{position:absolute;z-index:2;left:56%;top:55%;margin:0;transform:translate(-50%,-50%);font-size:2rem;line-height:1}.streak-flame small{position:absolute;z-index:2;left:56%;top:66%;width:90px;transform:translateX(-50%);line-height:1;white-space:nowrap;text-align:center}@media(max-width:620px){.streak-flame b{left:56%;top:54%;font-size:1.7rem}.streak-flame small{left:56%;top:66%;font-size:.62rem}}
.desktop-nav [data-view-link="home"],.mobile-nav [data-view-link="home"]{display:none}
.smart-recommend{grid-template-columns:minmax(0,1fr) 220px;align-items:start}.recommend-main{min-width:0}.countdown-box{display:grid;place-items:center;padding:18px;border:1px solid rgba(255,255,255,.2);border-radius:20px;background:rgba(255,255,255,.1);text-align:center}.countdown-box small{color:#78d8eb;font-weight:800;letter-spacing:.12em}.countdown-box strong{font-size:3.6rem;line-height:.95}.countdown-box b{font-size:.85rem}.countdown-box span{margin-top:8px;font-weight:800}.countdown-box em{margin-top:10px;padding:7px 10px;border-radius:11px;background:rgba(255,255,255,.12);font-size:.78rem;font-style:normal}.recommend-details{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.recommend-details>div{padding:15px;border-radius:16px;background:rgba(8,23,48,.2)}.recommend-details>div>b{display:block;margin-bottom:8px}.weak-topic-list,.hard-question-list{display:grid;gap:6px}.weak-topic-list span,.hard-question-list span{display:flex;justify-content:space-between;gap:10px;color:#dce8f8;font-size:.88rem}.weak-topic-list em{color:#82e0ee;font-style:normal;font-weight:800}.recommend-start{grid-column:2;justify-self:end}.daily-goal{display:flex;align-items:center;gap:10px;margin:16px 0;padding:12px;border-radius:14px;background:#edf4ff}.daily-goal>span{color:var(--blue);font-size:1.3rem}.daily-goal b,.daily-goal small{display:block}.daily-goal small{color:var(--muted)}html[data-theme="dark"] .daily-goal{background:#172a47}@media(max-width:760px){.smart-recommend{grid-template-columns:1fr}.countdown-box,.recommend-details,.recommend-start{grid-column:1}.recommend-details{grid-template-columns:1fr}.recommend-start{justify-self:stretch}}
.package-search{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;margin:0 0 20px;padding:10px 14px}.package-search>span{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#e7efff;color:var(--blue);font-size:1.5rem;font-weight:800}.package-search input{width:100%;min-height:44px;border:0;outline:0;background:transparent;color:var(--ink);font-size:1.08rem;font-weight:700}.package-search input::placeholder{color:var(--muted)}.package-search small{color:var(--muted);font-weight:700;white-space:nowrap}.package-search button{width:38px;height:38px;border:0;border-radius:12px;background:#edf2f9;color:var(--muted);font-size:1.4rem;cursor:pointer}.search-results .empty-search{grid-column:1/-1;min-height:300px;display:grid;place-items:center;align-content:center;padding:30px;border:1px dashed var(--line);border-radius:24px;text-align:center}.empty-search>span{font-size:2.5rem;color:var(--blue)}.empty-search h2,.empty-search p{margin:5px}.empty-search p{color:var(--muted)}.empty-search .button{margin-top:12px}@media(max-width:620px){.package-search{grid-template-columns:auto 1fr auto}.package-search small{grid-column:1/-1;text-align:center}.package-search button{grid-column:3;grid-row:1}}
.package-content-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.package-content-meta span{padding:5px 8px;border-radius:9px;background:#edf3fc;color:var(--muted);font-size:.75rem;font-weight:700}.package-card .package-footer{flex-wrap:wrap;justify-content:flex-start;gap:7px}.package-card .package-footer .start{padding:6px 0}.package-detail-heading{display:grid;grid-template-columns:1fr auto;gap:22px;align-items:end;padding:46px 8px 25px}.package-detail-heading>.text-button{grid-column:1/-1;justify-self:start}.package-detail-heading h1{margin:10px 0 5px;font-size:clamp(2.8rem,5vw,5rem);line-height:1}.package-detail-heading p{margin:0;color:var(--muted)}.reader-actions{display:flex;gap:9px}.package-overview{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.package-overview article{display:grid;padding:18px}.package-overview small{color:var(--muted);font-weight:700}.package-overview strong{font-size:1.45rem}.digital-reader{max-width:920px;margin:0 auto;padding:30px 0 60px}.reader-title{text-align:center;padding:25px}.reader-title h2{margin:0;font-size:2.2rem}.reader-title p:last-child{color:var(--muted)}.reader-page{position:relative;margin:20px 0;padding:clamp(24px,5vw,58px);border:1px solid #d7d0bf;border-radius:12px;background:#fffdf7;color:#24211c;box-shadow:0 20px 55px rgba(39,45,57,.14)}.reader-page:after{content:"";position:absolute;inset:10px;border:1px solid rgba(117,99,68,.12);border-radius:7px;pointer-events:none}.text-page>small{display:block;margin-bottom:20px;color:#776b58;font-weight:800;letter-spacing:.13em}.text-page>div{white-space:pre-wrap;font-family:Georgia,serif;font-size:clamp(1.05rem,2vw,1.25rem);line-height:1.85}.image-page{display:grid;place-items:center}.image-page>span{justify-self:start;margin-bottom:12px;color:#776b58;font-weight:800}.image-page img{display:block;max-width:100%;max-height:85vh;border-radius:5px;object-fit:contain}.image-page figcaption{margin-top:12px;color:#776b58}.reader-file{display:flex;align-items:center;gap:13px;margin:12px 0;padding:16px}.reader-file>span{font-size:1.5rem;color:var(--blue)}.reader-file>div{flex:1}.reader-file b,.reader-file small{display:block}.reader-file small{color:var(--muted)}.empty-reader{padding:55px;border:2px dashed var(--line);border-radius:22px;text-align:center;color:var(--muted)}html[data-theme="dark"] .package-content-meta span{background:#172944}html[data-theme="dark"] .reader-title{color:var(--ink)}@media(max-width:760px){.package-detail-heading{grid-template-columns:1fr}.reader-actions{flex-direction:column}.package-overview{grid-template-columns:1fr 1fr}.reader-page{margin:12px 0;border-radius:8px}.digital-reader{padding-top:10px}.reader-file{align-items:flex-start;flex-wrap:wrap}.reader-file .button{width:100%}}
.image-page img{cursor:zoom-in}.reader-lightbox{position:fixed;inset:0;z-index:120;display:grid;grid-template-columns:80px minmax(0,1fr) 80px;align-items:center;background:rgba(4,9,18,.96);color:#fff;touch-action:pan-y}.reader-lightbox[hidden]{display:none}.reader-lightbox figure{min-width:0;max-width:100%;max-height:100vh;display:grid;place-items:center;margin:0;padding:18px}.reader-lightbox img{display:block;width:auto;max-width:100%;height:auto;max-height:calc(100vh - 75px);object-fit:contain;user-select:none}.reader-lightbox figcaption{padding-top:10px;color:#c9d4e6;text-align:center}.reader-close,.reader-arrow{position:relative;z-index:2;border:1px solid rgba(255,255,255,.2);background:rgba(20,34,56,.78);color:#fff;cursor:pointer;backdrop-filter:blur(8px)}.reader-close{position:absolute;right:18px;top:18px;width:48px;height:48px;border-radius:15px;font-size:2rem}.reader-arrow{width:58px;height:86px;justify-self:center;border-radius:18px;font-size:3.5rem;line-height:1}.reader-arrow:hover,.reader-close:hover{background:var(--blue)}@media(max-width:620px){.reader-lightbox{grid-template-columns:56px minmax(0,1fr) 56px}.reader-lightbox figure{padding:5px}.reader-lightbox img{max-height:calc(100vh - 65px)}.reader-arrow{width:48px;height:72px;border-radius:15px;font-size:2.8rem}.reader-close{right:10px;top:10px;width:44px;height:44px}.reader-lightbox figcaption{font-size:.75rem}}
.package-summary{max-width:920px;margin:25px auto;padding:clamp(22px,4vw,38px)}.summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px}.summary-head h2{margin:0;font-size:2rem}.summary-head p:last-child{margin:6px 0;color:var(--muted)}.summary-overview{margin:24px 0;padding:20px;border-left:4px solid var(--blue);border-radius:0 16px 16px 0;background:#edf4ff;white-space:pre-wrap;font-size:1.08rem;line-height:1.65}.summary-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.summary-columns>div{padding:20px;border-radius:18px;background:#f6f9fd}.summary-columns h3{margin:0 0 12px}.summary-columns ul{display:grid;gap:8px;margin:0;padding-left:20px}.summary-columns dl{display:grid;gap:10px;margin:0}.summary-columns dl div{padding-bottom:9px;border-bottom:1px solid var(--line)}.summary-columns dt{font-weight:800;color:var(--blue)}.summary-columns dd{margin:2px 0 0;color:var(--muted)}.summary-date{display:block;margin-top:15px;color:var(--muted)}.summary-empty{min-height:145px;display:grid;place-items:center;align-content:center;margin-top:18px;padding:20px;border:1px dashed var(--line);border-radius:18px;text-align:center;color:var(--muted)}.summary-empty span{color:var(--blue);font-size:2rem}.summary-empty p{max-width:520px}html[data-theme="dark"] .summary-overview{background:#172a47}html[data-theme="dark"] .summary-columns>div{background:#142238}@media(max-width:700px){.summary-head{display:grid}.summary-head .button{width:100%}.summary-columns{grid-template-columns:1fr}.package-summary{margin:15px 0}}
.summary-body[hidden]{display:none}.summary-toggle{width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:15px;background:#e7efff;color:var(--blue);font-size:2rem;font-weight:800;line-height:1;cursor:pointer;transition:transform .2s,background .2s}.summary-toggle:hover{transform:scale(1.06);background:#dbe8ff}.summary-head>.button+.summary-toggle{margin-left:-10px}@media(max-width:700px){.summary-head{grid-template-columns:1fr auto}.summary-head>div{grid-column:1/-1}.summary-head>.button{width:auto}.summary-head>.button+.summary-toggle{margin-left:0}}
.reader-lightbox figure{overflow:hidden;touch-action:none}.reader-lightbox figure img{transform-origin:center;will-change:transform;transition:transform .16s ease}.reader-lightbox.zoomed figure{cursor:grab}.reader-lightbox.zoomed figure:active{cursor:grabbing}.reader-lightbox.zoomed figure img{transition:none}.reader-zoom-controls{position:absolute;z-index:3;left:50%;bottom:16px;display:flex;align-items:center;gap:5px;padding:5px;border:1px solid rgba(255,255,255,.18);border-radius:16px;background:rgba(20,34,56,.88);transform:translateX(-50%);backdrop-filter:blur(10px)}.reader-zoom-controls button{min-width:46px;height:42px;border:0;border-radius:11px;background:transparent;color:#fff;font-size:1.35rem;font-weight:800;cursor:pointer}.reader-zoom-controls button:hover{background:rgba(255,255,255,.14)}.reader-zoom-controls [data-reader-zoom-reset]{min-width:72px;font-size:.85rem}@media(max-width:620px){.reader-zoom-controls{bottom:9px}.reader-zoom-controls button{min-width:42px;height:40px}}
@media(max-width:620px){.reader-lightbox{width:100vw;height:100dvh;display:block;overflow:hidden;background:#030812;touch-action:none}.reader-lightbox figure{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;padding:0;margin:0;display:grid;place-items:center;overflow:hidden}.reader-lightbox img{width:auto;max-width:100vw;height:auto;max-height:100dvh;border-radius:0;object-fit:contain}.reader-lightbox figcaption{position:absolute;z-index:3;left:50%;bottom:calc(64px + env(safe-area-inset-bottom));max-width:calc(100vw - 130px);padding:7px 11px;border-radius:999px;background:rgba(9,20,37,.78);color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(8px)}.reader-arrow{position:absolute;z-index:4;top:50%;width:44px;height:58px;margin:0;border:0;border-radius:14px;background:rgba(11,24,43,.64);font-size:2.5rem;transform:translateY(-50%)}.reader-arrow.previous{left:max(6px,env(safe-area-inset-left))}.reader-arrow.next{right:max(6px,env(safe-area-inset-right))}.reader-close{z-index:5;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:44px;height:44px;border:0;background:rgba(11,24,43,.72)}.reader-zoom-controls{z-index:5;bottom:max(8px,env(safe-area-inset-bottom));padding:3px;border:0;background:rgba(11,24,43,.72)}.reader-zoom-controls button{min-width:40px;height:38px}.reader-zoom-controls [data-reader-zoom-reset]{min-width:62px}.reader-lightbox.zoomed .reader-arrow{opacity:.25;pointer-events:none}}
.share-icon{min-height:36px;padding:0 11px;border:1px solid var(--line);border-radius:11px;background:var(--soft);color:var(--muted);font:inherit;font-size:.82rem;font-weight:800;cursor:pointer}.share-icon.active{border-color:#75a2ff;background:#e7efff;color:var(--blue)}.community-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.community-card{display:flex;flex-direction:column;min-height:270px;padding:24px}.community-card h2{margin:18px 0 8px;font-size:1.65rem}.community-card>p{flex:1;margin:0;color:var(--muted);line-height:1.55}.community-top,.community-meta,.community-actions{display:flex;align-items:center;gap:10px}.community-top{justify-content:space-between}.own-badge{padding:7px 10px;border-radius:999px;background:#e9f7ef;color:#278255;font-size:.78rem;font-weight:800}.community-meta{flex-wrap:wrap;margin:20px 0 14px;color:var(--muted);font-weight:700}.community-actions{justify-content:space-between}.community-actions .button{min-height:42px;padding:9px 14px}.like-button{min-width:64px;height:42px;border:1px solid var(--line);border-radius:13px;background:transparent;color:var(--muted);font:inherit;font-weight:800;cursor:pointer}.like-button.active{border-color:#ff9bb0;background:#fff0f3;color:#e43f65}html[data-theme="dark"] .share-icon.active{background:#263c61}html[data-theme="dark"] .own-badge{background:#17382d;color:#7ed9ad}html[data-theme="dark"] .like-button.active{background:#432536}@media(max-width:980px){.community-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.settings-panel{z-index:200;max-height:calc(100dvh - 16px);overflow-y:auto}.settings-button{position:relative;z-index:201;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.community-grid{grid-template-columns:1fr}.community-card{min-height:0;padding:20px}.card-tools{flex-wrap:wrap;justify-content:flex-end}.share-icon{order:initial}}
.flashcard{display:block;padding:0;border:0;background:transparent!important;box-shadow:none;perspective:1200px}.flashcard-inner{position:relative;width:100%;min-height:310px;transform-style:preserve-3d;transition:transform .52s cubic-bezier(.2,.75,.25,1)}.flashcard.flipped .flashcard-inner{transform:rotateY(180deg)}.flashcard-face{position:absolute;inset:0;display:grid;place-items:center;align-content:center;padding:35px;border:2px solid #d9e5f5;border-radius:25px;background:linear-gradient(145deg,#fff,#edf4ff);box-shadow:0 18px 45px rgba(30,65,110,.09);backface-visibility:hidden;-webkit-backface-visibility:hidden}.flashcard-back{transform:rotateY(180deg);background:linear-gradient(145deg,#e8f2ff,#fff)}.flashcard-face h2{margin:18px 0 10px}.flashcard-face p{margin:0;line-height:1.5}.flip-hint{display:block;margin-top:24px;color:var(--blue);font-weight:800}html[data-theme="dark"] .flashcard-face{background:linear-gradient(145deg,#1c2c46,#142238);border-color:#314867}html[data-theme="dark"] .flashcard-back{background:linear-gradient(145deg,#203a61,#172942)}html[data-motion="off"] .flashcard-inner{transition:none}@media(max-width:620px){.flashcard-inner{min-height:360px}.flashcard-face{padding:26px 20px}.flashcard-face h2{font-size:1.65rem}.self-grade{display:grid;grid-template-columns:1fr;gap:8px}}
.question-manager{margin:22px 0;padding:26px}.question-manager-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.question-manager-head h2{margin:0;font-size:2rem}.question-manager-head p:last-child{margin:6px 0 0;color:var(--muted)}.managed-question-list{display:grid;gap:9px;margin-top:22px}.managed-question-list article{display:grid;grid-template-columns:38px minmax(0,1fr) 42px;align-items:center;gap:13px;padding:13px;border:1px solid var(--line);border-radius:16px;background:#f7f9fd}.managed-question-list article>span{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#e6efff;color:var(--blue);font-weight:800}.managed-question-list small,.managed-question-list b,.managed-question-list em{display:block}.managed-question-list small{color:var(--blue);font-weight:800}.managed-question-list b{margin:2px 0}.managed-question-list em{color:var(--muted);font-size:.86rem;font-style:normal}.quick-question-actions{display:grid;grid-template-columns:auto auto 1fr}.quick-question-actions .primary{justify-self:stretch}html[data-theme="dark"] .managed-question-list article{background:#142238}@media(max-width:620px){.question-manager{padding:20px 14px}.question-manager-head{display:grid}.question-manager-head .button{width:100%}.managed-question-list article{grid-template-columns:32px minmax(0,1fr) 38px;padding:10px}.managed-question-list em{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quick-question-actions{grid-template-columns:1fr}.quick-question-actions .button{width:100%}}
.question-manager-icon,.question-add-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border:1px solid #bfd0e8;border-radius:13px;background:#e7efff;color:var(--blue);font:inherit;font-size:1.35rem;font-weight:900;cursor:pointer;transition:transform .2s,background .2s}.question-manager-icon:hover,.question-add-icon:hover{transform:translateY(-2px);background:#d9e7ff}.question-manager-icon.large{width:48px;height:48px;font-size:1.55rem}.question-add-icon{width:48px;height:48px;font-size:1.8rem}.question-manager{scroll-margin-top:18px}html[data-theme="dark"] .question-manager-icon,html[data-theme="dark"] .question-add-icon{border-color:#395277;background:#20385d;color:#9bbaff}@media(max-width:620px){.question-manager-icon,.question-add-icon{width:44px;height:44px}.question-manager-head{grid-template-columns:1fr auto}.question-manager-head>div{min-width:0}}
.delete-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.management-actions{display:flex;align-items:center;gap:6px}.card-tools .delete-icon{margin-left:0}.package-status-row{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px}.package-status-row .package-date{margin:0}.package-status-row .mastery-ring{flex:0 0 auto}@media(max-width:620px){.card-tools{width:100%;justify-content:flex-end}.card-tools .share-icon{margin-right:auto}.package-status-row{margin-top:12px}}
@media(max-width:620px){body{font-size:15px}.shell{padding:8px;border-radius:20px}.topbar{height:56px;padding:0 4px}.brand{font-size:1.5rem}.settings-button,.menu-button{width:38px;height:38px;border-radius:12px}.settings-button svg,.menu-button svg{width:20px}.header-buttons{gap:6px}.mobile-nav{margin:2px 0 10px;padding:8px;border:1px solid var(--line);border-radius:18px;background:var(--strong);box-shadow:0 16px 40px rgba(25,50,90,.13)}.mobile-nav.open{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.mobile-nav button:not(.button){min-width:0;min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 3px;border:1px solid transparent;border-radius:13px;text-align:center;font-size:.76rem;line-height:1.05}.mobile-nav button:not(.button):before{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#e7efff;color:var(--blue);font-size:1rem}.mobile-nav button.active{border-color:#bcd0ee;background:#edf4ff;color:var(--blue)}.mobile-nav [data-view-link="subjects"]:before{content:"A"}.mobile-nav [data-view-link="packages"]:before{content:"▤"}.mobile-nav [data-view-link="community"]:before{content:"♧"}.mobile-nav [data-view-link="practice"]:before{content:"▶"}.mobile-nav [data-view-link="exams"]:before{content:"◷"}.mobile-nav [data-view-link="stats"]:before{content:"↗"}html[data-theme="dark"] .mobile-nav button:not(.button):before,html[data-theme="dark"] .mobile-nav button.active{background:#20385d}.page-heading{gap:12px;padding:28px 5px 18px}.page-heading h1,.page-hero h1,.result-card h1{font-size:2.15rem;line-height:1}.page-heading p:last-child{font-size:.92rem}.eyebrow{font-size:.7rem}.page-hero{min-height:0;padding:25px 18px}.page-hero .lead{margin-top:14px;font-size:1rem;line-height:1.45}.page-hero img{width:78%;max-height:220px;object-fit:contain}.hero-actions{gap:8px;margin-top:20px}.button{min-height:42px;padding:0 15px;border-radius:13px}.stats-row,.dashboard-grid,.stats-layout{gap:10px;margin-top:10px}.mini-stat{gap:10px;padding:15px}.mini-stat .stat-icon{width:40px;height:40px;border-radius:12px;font-size:1.1rem}.mini-stat strong{font-size:1.4rem}.dashboard-card,.chart-card,.hard-card,.progress-card,.tip-card{padding:17px}.dashboard-card h2,.chart-card h2,.hard-card h2,.recommend-card h2,.progress-chart-card h2{font-size:1.4rem}.skill-list{gap:13px}.skill-list i,.big-skill i{height:8px;margin-top:5px}.stats-layout .big-skill{margin-top:13px}.stats-layout .big-skill small{display:none}.learning-summary{gap:7px}.learning-summary article{padding:12px}.learning-summary article>span{width:34px;height:34px;margin-bottom:4px;border-radius:11px;font-size:1rem}.learning-summary small{font-size:.72rem}.learning-summary strong{font-size:1.15rem}.progress-chart-card{margin-top:10px;padding:16px 8px}.progress-chart{margin-top:8px;min-height:150px}.package-grid{gap:10px}.package-card,.add-card{min-height:0;border-radius:18px}.package-card{padding:16px}.package-card h3{margin:17px 0 5px;font-size:1.25rem}.package-card p{min-height:0;font-size:.9rem}.package-footer{margin-top:14px;padding-top:12px}.subject-card{gap:12px;padding:16px}.subject-symbol{width:46px;height:46px;border-radius:14px;font-size:1.3rem}.subject-card h3{font-size:1.2rem}.practice-modes{gap:9px}.practice-modes button{min-height:100px;padding:14px;border-radius:17px}.practice-modes span{width:36px;height:36px;border-radius:11px;font-size:1.1rem}.session-shell{min-height:0;padding:16px}.session-progress{margin:13px 0 25px}.question-area>h2{font-size:1.4rem}.flashcard-inner{min-height:300px}.flashcard-face h2{font-size:1.45rem}.recommend-card{gap:15px;padding:20px}.community-card{padding:16px}.community-card h2{margin:13px 0 6px;font-size:1.35rem}.question-manager{margin:12px 0}.managed-question-list{margin-top:14px}}
.shell{max-width:1280px;padding:14px;border-radius:26px}.topbar{height:62px}.brand{font-size:1.75rem}.desktop-nav{padding:4px}.nav-link{padding:7px 13px;font-size:.93rem}.settings-button{width:41px;height:41px}.page-heading{padding:36px 6px 20px}.page-heading h1,.page-hero h1,.result-card h1{font-size:clamp(2.35rem,4vw,3.7rem)}.page-heading p:last-child{font-size:.98rem}.page-hero{min-height:320px;padding:38px 46px}.page-hero img{width:min(300px,85%)}.page-hero .lead{margin-top:16px;font-size:1.05rem}.hero-actions{margin-top:20px}.button{min-height:42px;padding:0 16px;border-radius:13px}.stats-row,.dashboard-grid,.stats-layout{gap:13px;margin-top:13px}.mini-stat{padding:17px}.mini-stat .stat-icon{width:44px;height:44px}.mini-stat strong{font-size:1.55rem}.dashboard-card,.chart-card,.hard-card,.progress-card,.tip-card{padding:22px}.dashboard-card h2,.chart-card h2,.hard-card h2,.recommend-card h2{font-size:1.5rem}.package-grid,.subject-grid,.exam-grid{gap:13px}.package-card,.add-card{min-height:205px;border-radius:20px}.package-card{padding:18px}.package-card h3{margin:18px 0 5px;font-size:1.3rem}.package-card p{min-height:36px}.package-footer{margin-top:16px;padding-top:12px}.subject-card{gap:14px;padding:18px}.subject-symbol{width:50px;height:50px;border-radius:15px;font-size:1.45rem}.subject-card h3{font-size:1.25rem}.practice-modes{gap:11px}.practice-modes button{min-height:135px;padding:16px;border-radius:19px}.practice-modes span{width:39px;height:39px}.subheading{margin:30px 0 15px}.learning-summary{gap:10px}.learning-summary article{padding:17px}.learning-summary article>span{width:38px;height:38px;margin-bottom:4px}.learning-summary strong{font-size:1.4rem}.progress-chart-card{margin-top:13px;padding:21px}.progress-chart{margin-top:12px}.recommend-card{gap:18px;margin-top:13px;padding:23px}.question-manager{margin:15px 0;padding:21px}.question-manager-head h2{font-size:1.65rem}.managed-question-list{margin-top:16px}.community-card{min-height:230px;padding:20px}.community-card h2{margin:14px 0 6px;font-size:1.45rem}.exam-card{padding:20px}.exam-card h3{margin:17px 0 4px;font-size:1.35rem}.session-shell{min-height:500px;margin:28px auto;padding:24px}.session-progress{margin:15px 0 32px}.result-card{margin:35px auto;padding:38px}
@media(max-width:620px){.shell{width:calc(100% - 8px);margin:4px auto;padding:7px;border-radius:18px}.topbar{height:52px}.page-heading{padding:22px 4px 14px}.page-heading h1,.page-hero h1,.result-card h1{font-size:1.9rem}.page-hero{padding:20px 15px}.page-hero img{max-height:170px}.stats-row,.dashboard-grid,.stats-layout{gap:8px;margin-top:8px}.dashboard-card,.chart-card,.hard-card,.progress-card,.tip-card{padding:14px}.package-card{padding:14px}.package-card h3{margin-top:14px}.subject-card{padding:13px}.practice-modes button{min-height:88px;padding:12px}.learning-summary article{padding:10px}.progress-chart-card{padding:13px 7px}.recommend-card{padding:16px}.question-manager{padding:15px 11px}.community-card{padding:14px}.session-shell{margin:10px 0;padding:13px}.flashcard-inner{min-height:270px}.modal{padding:19px}}
@keyframes viewEnter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes cardEnter{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}@keyframes progressGrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes iconPop{0%{transform:scale(.82)}65%{transform:scale(1.08)}100%{transform:scale(1)}}@keyframes navOpen{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}@keyframes softFloat{from{transform:translateY(0)}to{transform:translateY(-5px)}}#app>section:first-child,#app>.page-heading:first-child{animation:viewEnter .34s ease-out}.package-grid>* ,.subject-grid>* ,.exam-grid>* ,.community-grid>* ,.learning-summary>* ,.stats-row>*{opacity:0;animation:cardEnter .38s ease-out forwards}.package-grid>*:nth-child(2),.subject-grid>*:nth-child(2),.exam-grid>*:nth-child(2),.community-grid>*:nth-child(2),.learning-summary>*:nth-child(2),.stats-row>*:nth-child(2){animation-delay:.045s}.package-grid>*:nth-child(3),.subject-grid>*:nth-child(3),.exam-grid>*:nth-child(3),.community-grid>*:nth-child(3),.learning-summary>*:nth-child(3),.stats-row>*:nth-child(3){animation-delay:.09s}.package-grid>*:nth-child(n+4),.subject-grid>*:nth-child(n+4),.exam-grid>*:nth-child(n+4),.community-grid>*:nth-child(n+4),.learning-summary>*:nth-child(n+4){animation-delay:.135s}.skill-list i b,.big-skill i b,.tiny-progress i,.session-progress i{transform-origin:left;animation:progressGrow .65s cubic-bezier(.2,.75,.25,1) both}.mastery-ring{animation:iconPop .42s ease-out}.button,.start,.text-button,.question-manager-icon,.question-add-icon,.delete-icon,.share-icon,.like-button{transition:transform .16s ease,box-shadow .2s ease,background .2s ease}.button:active,.start:active,.text-button:active,.question-manager-icon:active,.question-add-icon:active,.delete-icon:active,.share-icon:active,.like-button:active{transform:scale(.94)}.mobile-nav.open{animation:navOpen .22s ease-out}.mobile-nav.open button{animation:iconPop .26s ease-out both}.mobile-nav.open button:nth-child(2){animation-delay:.025s}.mobile-nav.open button:nth-child(3){animation-delay:.05s}.mobile-nav.open button:nth-child(4){animation-delay:.075s}.mobile-nav.open button:nth-child(5){animation-delay:.1s}.mobile-nav.open button:nth-child(6){animation-delay:.125s}.page-hero img{animation:softFloat 2.8s ease-in-out infinite alternate}.question-manager-icon:hover,.question-add-icon:hover,.practice-modes button:hover span{animation:iconPop .3s ease-out}.toast.show{animation:iconPop .28s ease-out}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
@media(max-width:620px){.streak-flame{width:126px;height:126px}.streak-flame>span{font-size:7rem}.streak-flame b{left:56%;top:55%;font-size:2rem}.streak-flame small{left:56%;top:66%;font-size:.7rem}}
html[data-motion="off"] .package-grid>*,html[data-motion="off"] .subject-grid>*,html[data-motion="off"] .exam-grid>*,html[data-motion="off"] .community-grid>*,html[data-motion="off"] .learning-summary>*,html[data-motion="off"] .stats-row>*{opacity:1}

/* Pakettinäkymän pääkortit käyttävät samaa leveyttä ja muotoa. */
.teacher-card,.question-manager,.package-summary{width:100%;max-width:none;margin:22px 0;padding:26px;border-radius:24px}
@media(max-width:620px){.teacher-card,.question-manager,.package-summary{width:100%;max-width:none;margin:12px 0;padding:14px;border-radius:18px}}
.ai-question-request{padding:16px;border:1px solid rgba(40,100,220,.25);border-radius:17px;background:linear-gradient(135deg,rgba(40,100,220,.07),rgba(49,185,213,.05))}.ai-question-request small{display:block!important;float:none!important;margin-top:2px;line-height:1.4}.ai-question-request.disabled{display:none}

/* Maantiedon karttatehtävät */
.question-head-actions{display:flex;align-items:center;gap:9px}.map-add-icon{color:#168b58;background:rgba(31,183,112,.12);border-color:rgba(31,183,112,.3)}
.map-package-options{display:grid;gap:14px;padding:18px;border:1px solid rgba(31,183,112,.3);border-radius:20px;background:linear-gradient(135deg,rgba(31,183,112,.08),rgba(40,100,220,.06))}.map-package-options[hidden]{display:none}.map-package-options .custom-exam-title>span{background:linear-gradient(135deg,#14a567,#2ccf8a)}.map-gallery-button{min-height:52px!important;display:flex!important;align-items:center;justify-content:center;padding:0 18px;border:2px dashed rgba(31,183,112,.48);border-radius:15px;background:rgba(255,255,255,.72);color:#117749;font-weight:800;cursor:pointer;transition:.2s}.map-gallery-button:hover{border-color:#16975d;background:rgba(31,183,112,.12);transform:translateY(-1px)}.map-gallery-summary{margin-top:-8px;color:var(--muted);font-weight:700;overflow-wrap:anywhere}html[data-theme="dark"] .map-gallery-button{background:rgba(15,32,48,.72);color:#68e4aa}
.map-marker-editor{display:grid;gap:8px}.map-marker-editor>small{color:var(--muted);font-weight:700}.map-editor-image{position:relative;overflow:hidden;max-height:62vh;border:2px solid rgba(40,100,220,.25);border-radius:18px;background:#dfe7ee;cursor:crosshair;line-height:0;touch-action:none;user-select:none;-webkit-user-select:none}.map-editor-image.drawing{border-color:#00b965;box-shadow:0 0 0 4px rgba(0,185,101,.18)}.map-editor-image img{display:block;width:100%;height:auto;max-height:62vh;object-fit:contain;pointer-events:none}.map-editor-image i,.map-target{position:absolute;z-index:2;display:block;border:3px solid #00a85a;border-radius:2px;background:rgba(20,230,116,.16);box-shadow:0 0 0 2px rgba(255,255,255,.92),0 0 18px rgba(0,168,90,.5);pointer-events:none}.map-editor-image i{border:4px solid #00b965;background:rgba(0,225,112,.34);box-shadow:0 0 0 2px rgba(255,255,255,.98),0 0 22px rgba(0,150,80,.72)}.map-editor-image i[hidden]{display:none}.map-editor-image i:before,.map-target:before{content:"";position:absolute;inset:-7px;border:1px dashed rgba(0,126,68,.85);border-radius:3px}.map-editor-image i:before{inset:-9px;border-width:2px;border-color:#007b45}.map-editor-image i{animation:mapTargetPulse 1.25s ease-in-out infinite alternate}
.map-question-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:22px;align-items:start;margin-top:20px}.map-question-viewport{position:relative;min-width:0;padding:10px;border:1px solid var(--line);border-radius:22px;background:#dce5ec;overflow:auto;overscroll-behavior:contain}.map-question-canvas{position:relative;max-width:100%;margin:auto;line-height:0}.map-question-canvas img{display:block;width:100%;height:100%;max-width:none;max-height:none;border-radius:14px;object-fit:fill}.map-target{animation:mapTargetPulse .85s ease-in-out infinite alternate}.map-question-canvas>.map-target:not(.has-shape){border-width:4px;background:rgba(0,225,112,.32);box-shadow:0 0 0 2px rgba(255,255,255,.98),0 0 22px rgba(0,150,80,.72)}.map-question-canvas>.map-target:not(.has-shape):before{inset:-9px;border-width:2px;border-color:#007b45}.map-target-city{min-width:14px;min-height:14px}.map-target-river{background:rgba(20,230,116,.1)}.map-target-mountain{background:rgba(20,230,116,.13)}.map-zoom-button{position:absolute;z-index:5;right:20px;bottom:20px;min-height:40px;padding:0 14px;border:1px solid rgba(255,255,255,.6);border-radius:13px;background:rgba(12,26,46,.82);color:#fff;font-weight:800;cursor:pointer;backdrop-filter:blur(8px)}.map-answer-panel{display:grid;gap:13px;padding:18px;border:1px solid var(--line);border-radius:20px;background:var(--strong)}.map-answer-panel label{font-size:1.15rem;font-weight:800}.map-answer-panel input{width:100%;min-height:54px;padding:0 15px;border:1px solid var(--line);border-radius:15px;background:var(--bg);color:var(--ink);font-weight:700;outline:0}.map-answer-panel input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(40,100,220,.12)}.map-answer-actions{display:flex;flex-wrap:wrap;gap:10px}.map-answer-actions .button{flex:1}.map-question-viewport.expanded{position:fixed;z-index:2000;inset:0;padding:clamp(8px,2vw,24px);border:0;border-radius:0;background:#07101e;display:flex;align-items:center;justify-content:center;touch-action:pan-x pan-y;overflow:auto}.map-question-viewport.expanded .map-question-canvas{max-width:none}.map-question-viewport.expanded .map-question-canvas img{max-width:none;max-height:none}.map-question-viewport.expanded .map-zoom-button{position:fixed;top:18px;right:18px;bottom:auto}.map-view-open{overflow:hidden}.map-view-open .topbar{visibility:hidden}.practice-modes.map-only-modes{grid-template-columns:minmax(240px,420px)}@keyframes mapTargetPulse{from{opacity:.78}to{opacity:1;box-shadow:0 0 0 3px rgba(255,255,255,.95),0 0 24px rgba(0,168,90,.68)}}
@media(max-width:760px){.map-question-layout{grid-template-columns:1fr;gap:14px}.map-answer-panel{padding:14px}.map-marker-editor .map-editor-image,.map-marker-editor .map-editor-image img{max-height:52vh}.map-question-viewport.expanded{justify-content:flex-start;align-items:flex-start}.map-package-options{padding:14px}.question-head-actions{gap:6px}}
.modal #optionsField[hidden]{display:none!important}
@keyframes settingsMobileIn{from{opacity:0;transform:translateY(calc(-50% + 12px)) scale(.98)}to{opacity:1;transform:translateY(-50%) scale(1)}}@media(max-width:620px){.settings-panel{top:50%;right:8px;bottom:auto;left:8px;max-height:calc(100dvh - 24px);transform:translateY(-50%);animation:settingsMobileIn .22s cubic-bezier(.2,.8,.2,1)}}
.question-area>.flashcard{height:clamp(340px,55vh,500px);margin-top:16px;isolation:isolate}.flashcard-inner{height:100%;min-height:0}.flashcard-face{overflow-y:auto;overscroll-behavior:contain;align-content:start;justify-items:center;padding:34px 28px;text-align:center;transform:rotateY(0deg) translateZ(1px)}.flashcard-back{transform:rotateY(180deg) translateZ(1px)}.flashcard-face small{flex:none}.flashcard-face h2{width:100%;max-width:620px;margin:18px 0 12px;overflow-wrap:anywhere;word-break:normal;line-height:1.2}.flashcard-face p{width:100%;max-width:600px;overflow-wrap:anywhere}.flashcard-face .flip-hint{margin-top:auto;padding-top:22px;padding-bottom:2px}@media(max-width:620px){.question-area>.flashcard{height:clamp(320px,54dvh,440px);margin-top:12px}.flashcard-face{padding:24px 17px}.flashcard-face h2{margin:14px 0 10px;font-size:clamp(1.15rem,6vw,1.42rem);line-height:1.22}.flashcard-face p{font-size:.92rem;line-height:1.4}.flashcard-face .flip-hint{padding-top:16px;font-size:.85rem}}

/* Harjoituskokeen kysymystyyppien ja ajastimen liukukytkimet */
.exam-type-choice,.timer-choice{position:relative;cursor:pointer}
.question-ai-check[hidden],[data-question-answer][hidden]{display:none!important}.question-ai-check{align-items:center}.question-ai-check.disabled{opacity:.55;cursor:not-allowed}.question-ai-check span b,.question-ai-check span small{display:block}.question-ai-check span small{margin-top:3px;font-weight:500}
.exam-type-choice input,.timer-choice input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.exam-type-switch{position:relative;display:block;flex:0 0 auto;width:48px;height:27px;border-radius:999px;background:#b8c3d3;box-shadow:inset 0 0 0 1px rgba(23,35,59,.1);transition:background .2s,box-shadow .2s}
.exam-type-switch:before{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(16,31,55,.25);transition:transform .2s cubic-bezier(.2,.8,.2,1)}
.exam-type-choice input:checked+.exam-type-switch,.timer-choice input:checked+.exam-type-switch{background:var(--blue);box-shadow:0 5px 14px rgba(40,100,220,.25)}
.exam-type-choice input:checked+.exam-type-switch:before,.timer-choice input:checked+.exam-type-switch:before{transform:translateX(21px)}
.exam-type-choice input:focus-visible+.exam-type-switch,.timer-choice input:focus-visible+.exam-type-switch{outline:3px solid rgba(40,100,220,.28);outline-offset:3px}
.switch-state{font-style:normal;font-weight:800;color:var(--muted)}
.switch-state:after{content:"Pois"}
.exam-type-choice input:checked~span .switch-state,.timer-choice input:checked~span .switch-state{color:var(--blue)}
.exam-type-choice input:checked~span .switch-state:after,.timer-choice input:checked~span .switch-state:after{content:"Päällä"}
.exam-type-choice:has(input:checked),.timer-choice:has(input:checked){border-color:rgba(40,100,220,.45);background:rgba(40,100,220,.08)}
.exam-type-choice.disabled{cursor:not-allowed}
html[data-theme="dark"] .exam-type-switch{background:#526078}
@media(max-width:620px){.exam-type-switch{width:44px;height:25px}.exam-type-switch:before{width:19px;height:19px}.exam-type-choice input:checked+.exam-type-switch:before,.timer-choice input:checked+.exam-type-switch:before{transform:translateX(19px)}}

/* Etusivun yleishaku */
.home-search{margin-bottom:14px;padding:24px;display:grid;grid-template-columns:minmax(230px,.65fr) minmax(320px,1.35fr);align-items:center;gap:22px;background:linear-gradient(135deg,var(--strong),rgba(226,238,255,.9))}
.home-search-copy h2{margin:0;font-size:1.7rem}.home-search-copy p:last-child{margin:5px 0 0;color:var(--muted)}
.global-search-box{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;min-height:58px;padding:0 16px;border:2px solid rgba(40,100,220,.2);border-radius:18px;background:var(--strong);box-shadow:0 12px 30px rgba(33,70,125,.08)}
.global-search-box:focus-within{border-color:var(--blue);box-shadow:0 0 0 4px rgba(40,100,220,.1),0 12px 30px rgba(33,70,125,.1)}
.global-search-box>span{color:var(--blue);font-size:1.5rem;font-weight:800}.global-search-box input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:1.08rem;font-weight:700}.global-search-box input::placeholder{color:var(--muted);font-weight:600}
.global-search-box button{width:34px;height:34px;border:0;border-radius:11px;background:rgba(99,112,138,.12);color:var(--muted);font-size:1.25rem;cursor:pointer}
.home-search-results{grid-column:1/-1;display:grid;gap:14px;padding-top:18px;border-top:1px solid var(--line)}.search-result-head{display:flex;justify-content:space-between;gap:16px;color:var(--muted)}.search-result-head b{color:var(--ink)}
.home-search-results .package-card{min-height:0}.quick-exam-results{display:grid;gap:8px}.quick-exam-results article{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:var(--strong)}.quick-exam-results article>span{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:rgba(40,100,220,.1);color:var(--blue)}.quick-exam-results b,.quick-exam-results small{display:block}.quick-exam-results small{color:var(--muted)}
.home-search-results .package-footer{flex-wrap:wrap;gap:10px}.home-search-results .package-footer .start{white-space:nowrap}
.ai-loading{display:inline-flex!important;align-items:center;justify-content:center;gap:10px;min-width:240px;cursor:wait}.ai-loading-spinner{width:17px;height:17px;display:inline-block;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:study-spin .75s linear infinite}@keyframes study-spin{to{transform:rotate(360deg)}}.written-answer .written-skip{justify-self:end;background:#ffe4e7;color:#a52f3a;border:1px solid #f1b7bd}.written-answer .written-skip:hover{background:#ffd2d8;border-color:#db8e97}html[data-theme="dark"] .written-answer .written-skip{background:#4b2630;color:#ffb0b8;border-color:#75404a}
.navigation-search-results{display:grid;gap:8px}.navigation-search-results>small{color:var(--blue);font-weight:900;letter-spacing:.12em}.navigation-search-results article{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px 14px;border:1px solid rgba(66,126,235,.35);border-radius:17px;background:linear-gradient(135deg,rgba(74,135,244,.12),rgba(74,135,244,.04))}.navigation-search-results article>span{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--blue);color:#fff;font-size:1.25rem}.navigation-search-results b,.navigation-search-results article small{display:block}.navigation-search-results article small{color:var(--muted)}.navigation-search-results .button{min-width:88px}.search-destination{animation:search-destination-pulse 1.7s ease}@keyframes search-destination-pulse{0%,100%{box-shadow:0 0 0 0 rgba(72,134,245,0)}25%{box-shadow:0 0 0 6px rgba(72,134,245,.3)}60%{box-shadow:0 0 0 12px rgba(72,134,245,0)}}
html[data-theme="dark"] .home-search{background:linear-gradient(135deg,var(--strong),rgba(31,51,82,.92))}
@media(max-width:760px){.home-search{grid-template-columns:1fr;padding:17px;gap:14px}.home-search-copy h2{font-size:1.4rem}.home-search-copy p:last-child{font-size:.88rem}.global-search-box{min-height:50px;padding:0 12px;border-radius:15px}.global-search-box input{font-size:.95rem}.home-search-results{grid-column:auto;padding-top:14px}.search-result-head{display:grid;gap:2px;font-size:.85rem}.quick-exam-results article{grid-template-columns:auto 1fr;padding:10px}.quick-exam-results .button{grid-column:1/-1;width:100%}}
@media(max-width:620px){.navigation-search-results article{grid-template-columns:auto minmax(0,1fr);padding:11px}.navigation-search-results .button{grid-column:1/-1;width:100%}}

/* Harjoituskokeen pakettihaku ja AI:lla rajattu Omanlainen koe */
.exam-package-picker,.custom-exam-box{display:grid;gap:12px;padding:18px;border:1px solid var(--line);border-radius:19px;background:var(--surface-soft,var(--strong))}.exam-package-picker>div:first-child,.custom-exam-title{display:flex;align-items:center;gap:11px}.exam-package-picker b,.custom-exam-title b{font-size:1.12rem}.exam-package-picker small,.custom-exam-title small{display:block;color:var(--muted);font-weight:600}.exam-package-search{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:9px;padding:0 13px;border:1px solid var(--line);border-radius:14px;background:var(--strong)}.exam-package-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(40,100,220,.1)}.exam-package-search span{color:var(--blue);font-size:1.25rem}.exam-package-search input{border:0!important;box-shadow:none!important;background:transparent!important}.custom-exam-box{border-color:rgba(40,100,220,.3);background:linear-gradient(135deg,rgba(40,100,220,.08),rgba(49,185,213,.06))}.custom-exam-title>span{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:13px;background:var(--blue);color:#fff;font-size:1.2rem;box-shadow:var(--button-shadow)}.custom-exam-box textarea{resize:vertical}.custom-exam-box>small{color:var(--muted);font-weight:600}
@media(max-width:620px){.exam-package-picker,.custom-exam-box{padding:14px;border-radius:16px}.custom-exam-title{align-items:flex-start}.custom-exam-title>span{width:36px;height:36px;border-radius:11px}}

/* wide-modal-luokka on taustaelementissä: koko tausta toimii vieritysalueena. */
.modal-backdrop.wide-modal{display:block;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;padding:20px;background:rgba(9,17,31,.78);backdrop-filter:none}
.modal-backdrop[hidden]{display:none!important}
.modal-backdrop.wide-modal>.modal{width:min(540px,100%);height:auto;max-height:none;display:block;overflow:visible;margin:0 auto;padding:30px;box-shadow:0 18px 55px rgba(5,12,25,.28)}
.modal-backdrop.wide-modal>.modal form{display:grid;height:auto;max-height:none;overflow:visible;padding:0;touch-action:auto}
.exam-package-picker{padding:0 0 20px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
@media(max-width:620px){.modal-backdrop.wide-modal{padding:8px 6px 32px}.modal-backdrop.wide-modal>.modal{width:100%;height:auto;max-height:none;margin:0 auto;padding:19px;border-radius:22px}.modal-backdrop.wide-modal>.modal form{height:auto;max-height:none;overflow:visible;padding-bottom:max(8px,env(safe-area-inset-bottom))}}
.home-search-results[hidden],.global-search-box button[hidden],.package-search button[hidden]{display:none!important}
.ai-predicted-choice{border-color:rgba(40,100,220,.3);background:linear-gradient(135deg,rgba(40,100,220,.08),rgba(49,185,213,.06))}.ai-predicted-choice>span b{color:var(--blue)}.ai-predicted-choice:has(input:checked){background:linear-gradient(135deg,rgba(40,100,220,.16),rgba(49,185,213,.12));box-shadow:0 10px 28px rgba(40,100,220,.1)}
 .package-card.active-practice-package{border-color:var(--blue);box-shadow:0 0 0 2px rgba(74,135,245,.25)}.activate-icon{width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--muted);font:inherit;font-weight:900;cursor:pointer}.activate-icon.active{background:var(--blue);border-color:var(--blue);color:#fff}.activate-icon:hover{transform:translateY(-1px)}
 .danger-link{color:#d5536f}
 .written-direction{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;color:var(--muted);font-size:.9rem}.switch-button{border:1px solid #365887;border-radius:999px;background:#172945;color:#9bbcff;padding:8px 14px;font:inherit;font-weight:700;cursor:pointer}.switch-button:hover{background:#203a63}.switch-button:disabled{opacity:.55;cursor:not-allowed}
 .session-direction{margin-left:auto}.session-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
 .package-status-badge{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:.72rem;font-weight:800;background:#e8f4ed;color:#27834e}.package-status-badge.archived{background:#f8e8ec;color:#b64c68}
.evaluation-tense{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.evaluation-tense span{display:grid;gap:2px;padding:12px 14px;border:1px solid currentColor;border-radius:13px;background:rgba(255,255,255,.38)}.evaluation-tense small{font-weight:700;opacity:.8}.evaluation-tense b{font-size:1.08rem}.skip-tense-help{display:grid;gap:3px;margin:14px 0;padding:15px 16px;border:1px solid currentColor;border-radius:14px;background:rgba(255,255,255,.4)}.skip-tense-help small{font-weight:700;opacity:.8}.skip-tense-help b{font-size:1.3rem}.skip-tense-help span{font-size:1.2rem;font-weight:900}.skip-tense-help em{margin-top:3px;font-size:.88rem;font-style:normal;opacity:.75}.model-answer{margin:16px 0;padding:14px 16px;border-radius:14px;background:rgba(74,135,245,.12);font-size:1.15rem}.model-answer b{display:block;font-size:1.25rem;font-weight:900;margin-bottom:4px}.model-answer p{margin:0;font-size:1.2rem;font-weight:800}@media(max-width:620px){.evaluation-tense{grid-template-columns:1fr}}
.hard-card [data-review-hard]{width:100%;margin-top:14px}
.map-target.has-shape{inset:0;width:100%;height:100%;border:0;border-radius:0;background:rgba(0,205,105,.58);box-shadow:none;filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #007a42);animation:mapShapePulse 1.15s ease-in-out infinite alternate}.map-target.has-shape:before{display:none}@keyframes mapShapePulse{from{opacity:.74}to{opacity:.96}}
.active-package-notice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 20px;padding:16px 18px;border:1px solid rgba(67,130,245,.36);background:linear-gradient(135deg,rgba(67,130,245,.13),rgba(69,196,218,.07))}.active-package-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:var(--blue);color:#fff;font-size:1.2rem;font-weight:900;box-shadow:0 8px 20px rgba(50,112,225,.22)}.active-package-notice div{min-width:0}.active-package-notice small{display:block;color:var(--blue);font-size:.72rem;font-weight:900;letter-spacing:.12em}.active-package-notice strong{display:block;margin:2px 0;font-size:1.25rem;overflow-wrap:anywhere}.active-package-notice p{margin:0;color:var(--muted);font-weight:700}.active-package-notice.empty{border-color:var(--line);background:var(--surface)}.active-package-notice.empty .active-package-icon{background:var(--muted);box-shadow:none}@media(max-width:620px){.active-package-notice{grid-template-columns:auto minmax(0,1fr);gap:10px;margin-bottom:14px;padding:12px;border-radius:17px}.active-package-icon{width:38px;height:38px;border-radius:12px}.active-package-notice strong{font-size:1.05rem}.active-package-notice p{font-size:.86rem}.active-package-notice .button{grid-column:1/-1;width:100%;min-height:40px}}
.map-boundary-fill{position:absolute;z-index:3;inset:0;display:block;width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #007a42);animation:mapShapePulse 1.15s ease-in-out infinite alternate}.map-target.map-fill-ready{opacity:0!important;animation:none}
.subject-card[data-open-subject]{cursor:pointer;transition:transform .2s,border-color .2s,box-shadow .2s}.subject-card[data-open-subject]:hover{transform:translateY(-3px);border-color:rgba(40,100,220,.3);box-shadow:0 17px 38px rgba(35,70,120,.11)}.subject-card[data-open-subject]:focus-visible{outline:3px solid rgba(40,100,220,.3);outline-offset:3px}.subject-open-arrow{align-self:center;color:var(--blue);font-size:1.4rem;font-weight:900;transition:transform .2s}.subject-card[data-open-subject]:hover .subject-open-arrow{transform:translateX(4px)}
.subject-detail-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:22px;margin-top:28px;padding:28px}.subject-back{grid-column:1/-1;justify-self:start;padding:0}.subject-detail-title{display:flex;align-items:center;gap:20px;min-width:0}.subject-detail-title .subject-symbol{width:72px;height:72px;border-radius:22px;font-size:2rem}.subject-detail-title h1{font-size:clamp(2.5rem,5vw,4.8rem)}.subject-detail-title p:last-child{margin:8px 0 0;color:var(--muted)}.subject-detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px}.subject-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:13px}.subject-content-section{margin-top:34px}.subject-content-section>.section-head{padding:0 5px}.subject-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:34px}.subject-panel{padding:22px;min-width:0}.subject-panel .section-head h2{font-size:1.55rem}.subject-panel .section-head{margin-bottom:14px}.subject-notes-panel{grid-column:1/-1}.subject-notes-panel .lesson-note-list{grid-template-columns:repeat(3,minmax(0,1fr))}.subject-hard-list .hard-row:last-child{border-bottom:0}
html[data-theme="dark"] .subject-card[data-open-subject]:hover{border-color:rgba(111,159,255,.42);box-shadow:0 18px 42px rgba(0,0,0,.26)}
@media(max-width:900px){.subject-summary{grid-template-columns:1fr 1fr}.subject-detail-grid{grid-template-columns:1fr}.subject-notes-panel{grid-column:auto}.subject-notes-panel .lesson-note-list{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.subject-open-arrow{font-size:1.1rem}.subject-detail-hero{grid-template-columns:1fr;margin-top:8px;padding:17px}.subject-detail-title{align-items:flex-start;gap:12px}.subject-detail-title .subject-symbol{width:50px;height:50px;border-radius:15px;font-size:1.4rem}.subject-detail-title h1{font-size:2.15rem}.subject-detail-title p:last-child{font-size:.9rem}.subject-detail-actions{justify-content:stretch}.subject-detail-actions .button{flex:1}.subject-summary{gap:8px;margin-top:8px}.subject-summary .mini-stat{min-width:0;padding:11px 9px}.subject-summary .mini-stat .stat-icon{display:none}.subject-summary .mini-stat strong{font-size:1.2rem}.subject-summary .mini-stat p{font-size:.7rem;overflow-wrap:anywhere}.subject-content-section,.subject-detail-grid{margin-top:24px}.subject-content-section>.section-head{display:grid}.subject-content-section>.section-head .button{width:100%}.subject-panel{padding:15px}.subject-notes-panel .lesson-note-list{grid-template-columns:1fr}}
.managed-question-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.managed-question-list article{height:100%;align-items:start}.managed-question-list article>div{min-width:0}.managed-question-list b,.managed-question-list em{overflow-wrap:anywhere}.managed-question-list>.empty-small{grid-column:1/-1}
@media(max-width:1050px){.managed-question-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.managed-question-list{grid-template-columns:1fr}}
.managed-question-list article[data-edit-question]{cursor:pointer;transition:transform .16s,border-color .2s,box-shadow .2s}.managed-question-list article[data-edit-question]:hover{transform:translateY(-2px);border-color:rgba(40,100,220,.34);box-shadow:0 10px 24px rgba(34,69,120,.09)}.managed-question-list article[data-edit-question]:focus-visible{outline:3px solid rgba(40,100,220,.3);outline-offset:2px}.managed-question-list article[data-edit-question] .delete-icon{position:relative;z-index:2}
.reader-view-heading{max-width:920px;margin:0 auto;padding:38px 0 10px}.reader-view-heading>.text-button{margin-bottom:30px}.reader-view-heading .subject{display:inline-flex;margin-bottom:12px}.reader-view-heading .eyebrow{margin:0}.reader-view-heading h1{margin:4px 0 8px;font-size:clamp(2.7rem,6vw,5.2rem);line-height:1}.reader-view-heading div>p:last-child{margin:0;color:var(--muted);font-size:1.08rem}.digital-reader.reader-own-page{padding-top:10px}@media(max-width:760px){.reader-view-heading{padding:24px 4px 4px}.reader-view-heading>.text-button{margin-bottom:22px}}
.package-summary.reader-summary{width:100%;max-width:920px;margin:22px auto}.reader-summary+.reader-own-page{padding-top:0}@media(max-width:700px){.package-summary.reader-summary{margin:12px auto}}
.active-package-notice{width:calc((100% - 26px)/3);grid-template-columns:auto minmax(0,1fr);cursor:pointer;transition:transform .18s,border-color .2s,box-shadow .2s}.active-package-notice[data-open-package]:hover{transform:translateY(-2px);border-color:rgba(67,130,245,.62);box-shadow:0 14px 30px rgba(35,70,120,.12)}.active-package-notice[data-open-package]:focus-visible{outline:3px solid rgba(40,100,220,.3);outline-offset:3px}.active-package-notice.empty{cursor:default}@media(max-width:900px){.active-package-notice{width:calc((100% - 13px)/2)}}@media(max-width:620px){.active-package-notice{width:100%}}

/* AI-opettaja harjoitusmuotona */
.practice-modes>[data-practice-teacher-anchor]{min-width:0}.practice-teacher-card{width:auto!important;max-width:none!important;min-height:135px;margin:0!important;padding:0!important;overflow:hidden;border:1px solid var(--line);border-radius:19px;background:var(--strong)}.teacher-launch-card{width:100%;min-height:135px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;padding:16px;border:0;border-radius:inherit;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.teacher-launch-card span{width:39px;height:39px;display:grid;place-items:center;border-radius:13px;background:var(--blue);color:#fff;font-size:1.25rem}.teacher-launch-card b{font-size:1.05rem}.teacher-launch-card small{color:var(--muted);font-weight:600;line-height:1.35}.teacher-launch-card:hover{background:rgba(65,125,245,.07)}.practice-teacher-card:not(.open) .teacher-panel{display:none}.practice-teacher-card.open{grid-column:1/-1;min-height:0;padding:24px!important}.practice-teacher-card.open .teacher-launch-card{display:none}.practice-teacher-card.open .teacher-panel{display:block}.practice-teacher-card.open .teacher-chat{max-height:380px}.practice-teacher-card.open .teacher-form{margin-top:14px}@media(max-width:620px){.practice-teacher-card{min-height:88px;border-radius:17px}.teacher-launch-card{min-height:88px;padding:12px}.teacher-launch-card span{width:36px;height:36px;border-radius:11px;font-size:1.1rem}.practice-teacher-card.open{padding:14px!important}}

.practice-teacher-card.open{background:linear-gradient(145deg,var(--strong),rgba(78,136,245,.10));box-shadow:0 18px 42px rgba(17,52,105,.16)}.practice-teacher-card.open .teacher-head{padding:2px 2px 16px;border-bottom:1px solid var(--line)}.practice-teacher-card.open .teacher-head h2{font-size:1.55rem}.practice-teacher-card.open .teacher-head p{max-width:680px;line-height:1.45}.teacher-collapse{width:38px;height:38px;display:grid;place-items:center;flex:none;border:1px solid var(--line);border-radius:12px;background:var(--strong);color:var(--muted);font-size:1.5rem;line-height:1;cursor:pointer}.teacher-collapse:hover{background:#edf4ff;color:var(--blue);border-color:#b8d0f7}.practice-teacher-card.open .teacher-chat{margin:16px 0;border-radius:16px;background:rgba(255,255,255,.5);box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}.practice-teacher-card.open .teacher-welcome{padding:24px 18px}.practice-teacher-card.open .teacher-image-picker{min-height:42px;padding:3px 0}.practice-teacher-card.open .teacher-form textarea{min-height:76px;border-radius:16px}.practice-teacher-card.open .teacher-form .button{min-height:52px;padding-inline:20px;border-radius:16px}html[data-theme="dark"] .practice-teacher-card.open .teacher-chat{background:rgba(8,18,33,.42)}html[data-theme="dark"] .teacher-collapse:hover{background:#233d68;color:#9ac0ff}

/* AI-opettajan keskustelutyötila */
.teacher-collapse{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;max-height:38px!important;padding:0!important;align-self:center;border-radius:12px!important}.teacher-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:240px;margin-top:16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.24);overflow:hidden}.teacher-history{min-width:0;padding:14px 10px;border-right:1px solid var(--line);background:rgba(18,38,68,.06)}.teacher-history-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 4px 12px}.teacher-history-head b{font-size:.82rem;letter-spacing:.04em}.teacher-history-head button,.teacher-history-open{border:1px solid var(--line);background:var(--strong);color:var(--muted);cursor:pointer}.teacher-history-head button{width:30px;height:30px;border-radius:9px;font-size:1.25rem}.teacher-history-list{display:grid;gap:5px;max-height:330px;overflow:auto}.teacher-history-list>button{width:100%;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;font-size:.86rem;font-weight:700;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.teacher-history-list>button:hover{background:rgba(67,130,245,.12);color:var(--blue)}.teacher-history-list>small{padding:12px 7px;color:var(--muted)}.teacher-main{min-width:0;display:flex;flex-direction:column;padding:16px}.teacher-history-open{display:none;align-self:flex-start;min-height:36px;padding:0 12px;border-radius:10px;font-weight:800}.teacher-workspace.history-collapsed{grid-template-columns:1fr}.teacher-workspace.history-collapsed .teacher-history{display:none}.teacher-workspace.history-collapsed .teacher-history-open{display:inline-flex;align-items:center}.practice-teacher-card.open .teacher-main .teacher-chat{margin:0 0 14px}.teacher-main .teacher-chat:empty{display:none}.practice-teacher-card.open .teacher-main .teacher-form{margin-top:auto}.teacher-main .teacher-image-picker{margin-bottom:2px}html[data-theme="dark"] .teacher-workspace{background:rgba(5,14,28,.2)}html[data-theme="dark"] .teacher-history{background:rgba(4,13,27,.28)}
@media(max-width:620px){.teacher-workspace{grid-template-columns:1fr;position:relative;min-height:250px}.teacher-history{position:absolute;z-index:4;inset:0 auto 0 0;width:min(82%,260px);border-right:1px solid var(--line);box-shadow:16px 0 35px rgba(0,0,0,.22)}.teacher-main{padding:12px}.teacher-history-list{max-height:60vh}.practice-teacher-card.open .teacher-head{align-items:flex-start}.teacher-collapse{align-self:flex-start}}

/* AI-opettajan reunasta reunaan ulottuva historia */
.practice-teacher-card.open .teacher-panel{position:relative;min-height:230px}.practice-teacher-card.open .teacher-workspace{display:block;min-height:0;margin:0;border:0;border-radius:0;background:transparent;overflow:visible}.practice-teacher-card.open .teacher-history{position:absolute;z-index:3;left:-24px;top:-24px;bottom:-24px;width:220px;padding:22px 12px;border:0;border-right:1px solid var(--line);border-radius:19px 0 0 19px;background:rgba(13,31,57,.10)}.practice-teacher-card.open .teacher-head{margin-left:220px;padding:2px 0 16px 22px}.practice-teacher-card.open .teacher-main{margin-left:220px;padding:16px 0 0 22px}.practice-teacher-card.history-collapsed .teacher-history{display:none}.practice-teacher-card.history-collapsed .teacher-head,.practice-teacher-card.history-collapsed .teacher-main{margin-left:0;padding-left:0}.practice-teacher-card.history-collapsed .teacher-history-open{display:inline-flex;align-items:center}.teacher-history-open{height:36px!important;min-height:36px!important;max-height:36px!important}.teacher-collapse{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-height:30px!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;color:#ff5b70!important;font-size:1.55rem!important;font-weight:900}.teacher-collapse:hover{background:rgba(255,72,96,.10)!important;color:#ff304f!important}.practice-teacher-card.open .teacher-main .teacher-form{margin-top:0}.practice-teacher-card.open .teacher-main .teacher-chat:not(:empty){margin-bottom:14px}
@media(max-width:620px){.practice-teacher-card.open .teacher-history{left:-14px;top:-14px;bottom:-14px;width:min(82vw,260px);padding:16px 10px;border-radius:17px 0 0 17px;background:var(--strong)}.practice-teacher-card.open .teacher-head,.practice-teacher-card.open .teacher-main{margin-left:0;padding-left:0}.practice-teacher-card.open .teacher-main{padding-top:12px}}

/* AI-opettajan aina avoin historia ja sulkupainike */
.teacher-history-head button,.teacher-history-open{display:none!important}.practice-teacher-card.history-collapsed .teacher-history{display:block}.teacher-collapse{position:absolute!important;z-index:6;top:-12px;right:-10px;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;max-height:36px!important;border:1px solid rgba(255,78,101,.38)!important;border-radius:11px!important;background:rgba(255,78,101,.12)!important;color:#ff5067!important;box-shadow:0 8px 20px rgba(130,25,45,.14)!important}.teacher-collapse:hover{border-color:#ff5067!important;background:rgba(255,78,101,.20)!important;color:#ff2947!important}
@media(max-width:620px){.practice-teacher-card.open .teacher-history{display:block;left:-14px;top:-14px;bottom:-14px;width:110px;padding:14px 7px}.practice-teacher-card.open .teacher-head,.practice-teacher-card.open .teacher-main,.practice-teacher-card.history-collapsed .teacher-head,.practice-teacher-card.history-collapsed .teacher-main{margin-left:110px;padding-left:10px}.teacher-history-head{padding-inline:3px}.teacher-history-head b{font-size:.68rem;overflow-wrap:anywhere}.teacher-history-list>button{padding:8px 6px;font-size:.74rem}.teacher-collapse{top:-8px;right:-6px}}

.teacher-collapse{display:grid!important;place-items:center!important;text-align:center!important;line-height:1!important;font-family:Arial,sans-serif!important;font-size:22px!important;text-indent:0!important} 

/* ChatGPT-tyylinen AI-opettajan viestikenttä */
.teacher-collapse{font-size:0!important}.teacher-collapse::after{content:"×";display:grid;place-items:center;width:100%;height:100%;font-family:Arial,sans-serif;font-size:22px;line-height:1}.practice-teacher-card.open .teacher-form{display:block;margin-top:0}.teacher-composer{position:relative;display:flex;align-items:stretch;width:100%}.practice-teacher-card.open .teacher-composer textarea{width:100%;min-height:76px;margin:0;padding:16px 108px 16px 58px;border-radius:18px;resize:vertical}.teacher-send{position:absolute;z-index:2;right:10px;top:50%;min-width:82px!important;min-height:42px!important;padding:0 14px!important;transform:translateY(-50%);border-radius:13px!important;box-shadow:0 6px 16px rgba(39,101,225,.22)}.teacher-attach-menu{position:absolute;z-index:4;left:12px;top:50%;transform:translateY(-50%)}.teacher-attach-toggle{width:36px;height:36px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:11px;background:var(--strong);color:var(--blue);font:inherit;font-size:1.35rem;font-weight:800;line-height:1;cursor:pointer}.teacher-attach-toggle:hover{border-color:rgba(67,130,245,.52);background:#edf4ff}.teacher-attach-options{position:absolute;bottom:45px;left:0;z-index:10;display:grid;gap:4px;min-width:148px;padding:6px;border:1px solid var(--line);border-radius:13px;background:var(--strong);box-shadow:0 14px 30px rgba(10,29,57,.22)}.teacher-attach-options[hidden]{display:none}.teacher-attach-options button{min-height:36px;padding:0 10px;border:0;border-radius:9px;background:transparent;color:var(--ink);font:inherit;font-size:.88rem;font-weight:800;text-align:left;white-space:nowrap;cursor:pointer}.teacher-attach-options button:hover{background:#edf4ff;color:var(--blue)}.teacher-form>.teacher-image-preview{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.teacher-form>.teacher-image-preview:empty{display:none}
@media(max-width:620px){.practice-teacher-card.open .teacher-composer textarea{min-height:68px;padding:14px 88px 14px 52px}.teacher-send{right:8px;min-width:70px!important;padding:0 10px!important;font-size:.82rem}.teacher-attach-menu{left:10px}.teacher-attach-toggle{width:32px;height:32px}.teacher-attach-options{bottom:41px}}

/* AI-opettajan ohjainten tarkka kohdistus */
.teacher-attach-menu{left:auto!important;right:102px!important;top:0!important;bottom:0!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-width:32px!important;max-height:32px!important;margin:auto!important;transform:none!important}.teacher-attach-toggle{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-width:32px!important;max-height:32px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:10px!important;line-height:1!important}.teacher-send{top:0!important;right:10px!important;bottom:0!important;height:42px!important;min-height:42px!important;max-height:42px!important;margin:auto!important;transform:none!important;display:grid!important;place-items:center!important}.teacher-attach-options{right:0!important;left:auto!important;bottom:40px!important}.practice-teacher-card.open .teacher-composer textarea{padding-right:146px}.teacher-collapse::after{position:absolute;left:50%;top:50%;width:auto;height:auto;display:block;transform:translate(-50%,-50%);color:#ff5067;text-align:center}
@media(max-width:620px){.teacher-attach-menu{right:82px!important;width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;max-width:29px!important;max-height:29px!important}.teacher-attach-toggle{width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;max-width:29px!important;max-height:29px!important}.teacher-send{right:8px!important;height:38px!important;min-height:38px!important;max-height:38px!important}.practice-teacher-card.open .teacher-composer textarea{padding-right:120px}.teacher-attach-options{bottom:36px!important}}

/* Pluspainike viestikentän vasempaan reunaan */
.teacher-attach-menu{right:auto!important;left:12px!important}.practice-teacher-card.open .teacher-composer textarea{padding-right:108px;padding-left:58px}
@media(max-width:620px){.teacher-attach-menu{right:auto!important;left:10px!important}.practice-teacher-card.open .teacher-composer textarea{padding-right:88px;padding-left:52px}}

/* Sovelluksen lyhyt Study-aloitusanimaatio */
.study-splash{position:fixed;z-index:5000;inset:0;display:grid;place-content:center;justify-items:center;overflow:hidden;background:radial-gradient(circle at 50% 42%,#2d6fd1 0,#183d76 33%,#0e1b31 74%);color:#fff;isolation:isolate;animation:studySplashIn .26s ease-out both}.study-splash:before,.study-splash:after{content:"";position:absolute;z-index:-1;width:min(74vw,760px);aspect-ratio:1;border:1px solid rgba(151,211,255,.22);border-radius:50%;animation:studyOrbit 5s linear infinite}.study-splash:after{width:min(52vw,530px);border-color:rgba(118,237,239,.26);animation-direction:reverse;animation-duration:4.2s}.study-splash-orbit{position:absolute;z-index:-1;border-radius:50%;filter:blur(2px)}.orbit-one{width:44vw;height:44vw;min-width:410px;min-height:410px;background:radial-gradient(circle,rgba(101,173,255,.2),transparent 66%);animation:studyPulse 1.8s ease-in-out infinite}.orbit-two{width:25vw;height:25vw;min-width:250px;min-height:250px;border:2px solid rgba(138,233,255,.27);animation:studyOrbit 3.5s linear infinite}.study-splash-mark{display:grid;place-items:center;width:92px;height:92px;margin-bottom:17px;border:1px solid rgba(255,255,255,.55);border-radius:30px;background:linear-gradient(135deg,#83c8ff,#3976ef);box-shadow:0 0 0 10px rgba(134,198,255,.11),0 22px 50px rgba(2,12,40,.42);font-size:3.55rem;font-weight:800;line-height:1;animation:studyMark .78s cubic-bezier(.15,.95,.28,1.2) both}.study-splash strong{font-size:clamp(2.8rem,7vw,4.4rem);letter-spacing:-.07em;animation:studySplashText .52s .22s ease-out both}.study-splash small{margin-top:3px;color:#cce2ff;font-size:1rem;font-weight:700;letter-spacing:.08em;animation:studySplashText .5s .34s ease-out both}.study-splash-spark{position:absolute;color:#9eeeff;font-size:2rem;text-shadow:0 0 18px rgba(105,221,255,.85);animation:studySpark 1.7s ease-in-out infinite}.spark-one{margin:-162px 0 0 208px}.spark-two{margin:116px 0 0 -228px;font-size:1.4rem;animation-delay:.45s}.study-splash.leaving{animation:studySplashOut .42s ease-in both;pointer-events:none}@keyframes studySplashIn{from{opacity:0}to{opacity:1}}@keyframes studySplashOut{to{opacity:0;transform:scale(1.035);filter:blur(4px)}}@keyframes studyMark{from{opacity:0;transform:scale(.35) rotate(-20deg)}to{opacity:1;transform:none}}@keyframes studySplashText{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@keyframes studyOrbit{to{transform:rotate(360deg)}}@keyframes studyPulse{50%{transform:scale(1.12);opacity:.6}}@keyframes studySpark{50%{transform:scale(1.35) rotate(18deg);opacity:.55}}@media(max-width:620px){.study-splash-mark{width:78px;height:78px;border-radius:25px;font-size:3rem}.spark-one{margin:-135px 0 0 158px}.spark-two{margin:105px 0 0 -166px}}@media(prefers-reduced-motion:reduce){.study-splash,.study-splash *{animation:none!important}.study-splash{transition:opacity .2s ease}.study-splash.leaving{opacity:0;transform:none;filter:none}}

