:root{--navy:#173553;--navy2:#244767;--blue:#176f9c;--bluebg:#e9f4fa;--text:#1d3044;--sub:#64748b;--stroke:#dbe3eb;--bg:#f3f6f9;--white:#fff;--green:#16705d;--greenbg:#e8f6f1;--red:#9e4745;--redbg:#fbeeee;--amber:#805e21;--amberbg:#fff6e5;--shadow:0 7px 26px rgba(29,53,80,.06)}
*{box-sizing:border-box}html{font-size:15px}body{margin:0;background:var(--bg);font-family:Roboto,"Segoe UI",Arial,sans-serif;color:var(--text);line-height:1.42}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.app-shell{max-width:1510px;margin:auto;padding:24px 26px 45px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:17px}.brand{display:flex;align-items:center;gap:13px}.brandmark{width:47px;height:47px;border-radius:13px;background:var(--navy);color:white;display:grid;place-items:center;font-size:21px;font-weight:750;letter-spacing:-1px}.eyebrow{font-size:10px;letter-spacing:.15em;color:var(--blue);font-weight:800}.masthead h1{font-size:26px;letter-spacing:-.035em;margin:0;font-weight:750}.masthead p{margin:1px 0 0;color:var(--sub);font-size:12px}.mast-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.btn{border:1px solid var(--stroke);border-radius:9px;background:var(--white);color:var(--navy);padding:9px 13px;font-size:12px;font-weight:700;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn:hover{border-color:#8cadc6;background:#f7fbfd}.btn.primary{background:var(--navy);color:#fff;border-color:var(--navy)}.btn.primary:hover{background:#244e76}.btn.flat{border-color:transparent;background:transparent}.btn.small{padding:6px 9px;min-height:30px;font-size:11px}.btn.danger{color:var(--red);border-color:#edc8c8}.tabs{display:flex;gap:6px;background:#e9eef3;border-radius:11px;padding:5px;width:max-content;max-width:100%;margin-bottom:18px}.tab{border:0;background:transparent;padding:10px 19px;font-size:13px;font-weight:750;border-radius:8px;color:#61758c}.tab.active{background:#fff;color:var(--navy);box-shadow:0 1px 5px #14355316}.card{background:#fff;border:1px solid var(--stroke);border-radius:14px;box-shadow:var(--shadow)}.toolbar{padding:17px 18px;margin-bottom:15px}.toolbar-grid{display:grid;grid-template-columns:170px 155px 305px minmax(220px,1fr) auto;gap:14px;align-items:end}.field{display:flex;flex-direction:column;gap:5px;min-width:0}label,.field label{font-size:11px;font-weight:750;color:#52677e}input[type=text],input[type=date],input[type=number],select,textarea{width:100%;min-height:38px;border:1px solid #d3dfe8;border-radius:8px;background:#fff;color:var(--text);padding:8px 10px;outline:0}input:focus,select:focus,textarea:focus{border-color:#448eb5;box-shadow:0 0 0 3px #cde7f380}textarea{resize:vertical;min-height:75px}.toolbar-footer{display:flex;justify-content:space-between;gap:10px;margin-top:12px;align-items:center;color:var(--sub);font-size:12px}.weekrow{display:flex;align-items:center;gap:8px}.week-label{min-width:91px;text-align:center;font-weight:750;color:var(--navy)}.workspace{display:grid;grid-template-columns:310px minmax(0,1fr);gap:15px;align-items:start}.roster,.detail{min-width:0}.roster-head{padding:17px 17px 12px;border-bottom:1px solid var(--stroke)}.roster-head h2,.detail-head h2{font-size:17px;letter-spacing:-.018em;margin:0}.small-muted{font-size:11px;color:var(--sub)}.progress{height:6px;background:#ecf1f5;overflow:hidden;border-radius:10px;margin:9px 0 3px}.progress>div{height:100%;background:var(--blue);transition:width .18s}.roster-list{max-height:690px;overflow:auto;padding:8px}.student{border:1px solid transparent;border-radius:9px;padding:11px 10px;text-align:left;background:transparent;width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--text)}.student:hover{background:#f3f7fb}.student.active{background:var(--bluebg);border-color:#b4d9ea}.student-code{font-size:13px;font-weight:750}.student-meta{font-size:10px;color:var(--sub);margin-top:2px}.count-pill{font-size:11px;font-weight:750;color:#60748a;border-radius:99px;background:#eef2f6;padding:4px 8px;white-space:nowrap}.count-pill.done{background:#e6f4f1;color:#08755f}.detail-head{border-bottom:1px solid var(--stroke);padding:17px 20px;display:flex;justify-content:space-between;gap:10px;align-items:center}.detail-body{padding:16px 20px}.headingline{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.subheader{font-size:10px;font-weight:800;letter-spacing:.09em;color:#7e91a3;text-transform:uppercase}.scale-guide{font-size:11px;color:var(--sub)}.criterion{padding:13px 0;border-bottom:1px solid #e8edf1;display:grid;grid-template-columns:minmax(165px,1fr) minmax(240px,1.37fr);column-gap:18px;row-gap:7px}.criterion:last-child{border-bottom:0}.criterion-name{font-size:13px;font-weight:750;margin:0}.criterion-help{font-size:11px;color:var(--sub);margin:3px 0 0;max-width:330px}.criterion-actions{display:flex;flex-direction:column;gap:8px;align-items:stretch}.rating{display:grid;grid-template-columns:34px repeat(3,1fr);gap:5px}.rate{border:1px solid #d8e1e9;background:#f8fafc;border-radius:7px;padding:8px 4px;min-height:33px;font-size:11px;font-weight:750;color:#68788a}.rate.active{background:var(--navy);border-color:var(--navy);color:#fff}.rate.active[data-level=""]{background:#edf3f7;border-color:#cbd9e4;color:#536e85}.rate.active.level-under{background:var(--red);border-color:var(--red)}.rate.active.level-over{background:var(--green);border-color:var(--green)}.rate:not(.active):hover{border-color:#7ca6c2}.comment-select{min-height:33px;font-size:11px;padding:6px 8px;background:#fff}.notearea{margin-top:16px;padding-top:15px;border-top:1px solid var(--stroke)}.notearea textarea{margin-top:5px}.action-footer{border-top:1px solid var(--stroke);padding:13px 20px;display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}.save-status{color:var(--green);font-size:11px;font-weight:700}.infonote{margin-top:17px;padding:12px 14px;border-left:3px solid #acc7d9;color:#5f748a;font-size:11px;background:#f0f5f9;border-radius:6px}.secondary-layout{display:grid;grid-template-columns:260px 1fr;gap:15px}.sidefilters{padding:17px;display:flex;flex-direction:column;gap:13px}.sidefilters h2{font-size:16px;margin:0}.content-card{padding:19px;min-height:260px}.content-title{font-size:18px;margin:0 0 4px}.content-intro{color:var(--sub);font-size:12px;margin:0 0 14px}.history-entry{border:1px solid var(--stroke);border-radius:9px;margin:0 0 10px;overflow:hidden}.history-top{background:#f8fafc;padding:11px 13px;display:flex;justify-content:space-between;gap:10px;align-items:center}.history-date{font-weight:750;font-size:12px}.history-content{padding:12px 13px;display:flex;flex-direction:column;gap:7px}.history-line{font-size:12px;line-height:1.45}.level-chip{border-radius:5px;font-size:10px;font-weight:750;padding:3px 6px;display:inline-block;margin-left:5px;white-space:nowrap}.level-chip.under{background:var(--redbg);color:var(--red)}.level-chip.expected{background:var(--bluebg);color:#1e678e}.level-chip.over{background:var(--greenbg);color:var(--green)}.comment{font-size:11px;color:#64758b;margin-left:4px}.empty{padding:37px 20px;text-align:center;color:var(--sub);font-size:13px}.empty strong{display:block;color:var(--navy);font-size:15px;margin-bottom:5px}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.metricbox{background:#f6f9fb;border:1px solid #e6edf2;padding:12px 15px;border-radius:10px}.metricbox .big{font-size:23px;font-weight:800;color:var(--navy)}.metricbox .label{color:var(--sub);font-size:11px}.section-title{font-size:14px;font-weight:800;margin:22px 0 9px;letter-spacing:-.01em}.result-table{width:100%;border-collapse:collapse;font-size:12px}.result-table th{text-align:left;font-size:10px;letter-spacing:.025em;color:#6a7c90;font-weight:750;background:#f5f8fa;padding:10px 8px;border-bottom:1px solid var(--stroke)}.result-table td{padding:11px 8px;border-bottom:1px solid #e9eff3;vertical-align:middle}.stacked{height:9px;display:flex;width:100%;overflow:hidden;border-radius:99px;background:#edf1f4;min-width:100px}.stacked span.under{background:#cb7975}.stacked span.expected{background:#65a5c7}.stacked span.over{background:#72af97}.small-count{font-size:11px;color:#657991;white-space:nowrap}.summary-notes{margin-top:16px;display:grid;grid-template-columns:1fr 1fr;gap:13px}.summary-note textarea{min-height:106px}.feedback-list{display:flex;flex-direction:column;gap:7px}.feedback-item{font-size:12px;padding:8px 10px;border:1px solid #e7edf2;background:#f9fbfc;border-radius:7px}.feedback-item small{color:var(--sub)}.summary-print-actions{margin-top:17px;display:flex;justify-content:flex-end;gap:8px}.privacy{font-size:11px;color:#6e7f91;padding:14px 3px 0}.toast{position:fixed;bottom:18px;right:18px;z-index:10;background:#173553;color:white;border-radius:10px;padding:11px 15px;box-shadow:0 8px 30px #17355330;max-width:390px;font-size:12px;opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s}.toast.show{opacity:1;transform:translateY(0)}dialog{border:0;border-radius:15px;padding:0;box-shadow:0 22px 80px #0a294b50;max-width:430px;width:calc(100% - 32px)}dialog::backdrop{background:#102c49a8}.dialog-body{padding:22px}.dialog-head{font-weight:750;font-size:19px;margin:0 0 5px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}#print-view{display:none}
.session-picks{display:flex;flex-wrap:nowrap;align-items:center;gap:5px;min-height:38px}.session-check{min-height:38px;min-width:38px;border:1px solid #d3dfe8;border-radius:8px;background:#fff;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:5px 9px;cursor:pointer;color:#53677d;font-size:12px;font-weight:700;user-select:none;white-space:nowrap}.session-check:hover{border-color:#7faac8;background:#f7fbfe}.session-check:has(input:checked){border-color:#2477a5;background:#e7f3f9;color:#144a6f}.session-check input{width:14px;height:14px;margin:0;accent-color:#196f9c;cursor:pointer}.session-check:focus-within{outline:2px solid #74b2d0;outline-offset:2px}.session-day{margin-left:3px;min-width:100px}.session-day:has(input:checked){background:#e8f5ee;border-color:#55a889;color:#166449}
@media(max-width:1040px){.toolbar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar-grid .taskfield{grid-column:span 2}.toolbar-grid .session-field{grid-column:span 1}.toolbar-grid .newclass{align-self:end}.criterion{grid-template-columns:1fr;gap:8px}.criterion-help{max-width:none}.roster-list{max-height:800px}}
@media(max-width:700px){.app-shell{padding:14px 11px 28px}.masthead{align-items:flex-start;flex-direction:column}.masthead h1{font-size:23px}.tabs{width:100%}.tab{padding:10px 7px;flex:1}.toolbar{padding:13px}.toolbar-grid{grid-template-columns:1fr 1fr;gap:10px}.toolbar-grid .taskfield{grid-column:1 / -1}.toolbar-grid .session-field{grid-column:1 / -1}.toolbar-grid .newclass{grid-column:1 / -1}.toolbar-footer{flex-direction:column;align-items:flex-start}.workspace,.secondary-layout{grid-template-columns:1fr}.roster-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:230px;gap:3px;overflow:auto}.student{padding:9px 7px}.student-meta{display:none}.student-code{font-size:11px}.count-pill{font-size:10px;padding:3px 5px}.roster-head{padding:11px}.detail-body{padding:11px 14px}.detail-head{padding:12px 14px}.criterion{padding:11px 0}.rating{grid-template-columns:31px repeat(3,1fr)}.rate{font-size:10px}.summary-grid,.summary-notes{grid-template-columns:1fr}.content-card{padding:14px}.result-table{font-size:10px}.result-table td,.result-table th{padding:9px 4px}}
@media print{@page{size:A4 portrait;margin:14mm 15mm}.app-shell,.toast,dialog{display:none!important}body{background:white!important;color:#1b3042;font-family:Roboto,Arial,sans-serif;font-size:10pt}#print-view{display:block!important}#print-view h1{font-size:20pt;color:#163c61;margin:0 0 4mm}#print-view h2{font-size:12pt;margin:8mm 0 3mm;padding-bottom:1mm;border-bottom:1px solid #9aafbe}#print-view .report-sub{font-size:9pt;color:#607184;margin-bottom:5mm}#print-view .print-details{display:flex;gap:12mm;font-size:9pt;margin:5mm 0}#print-view table{width:100%;border-collapse:collapse;font-size:9pt}#print-view th{background:#edf2f6;text-align:left;padding:2.2mm;border:1px solid #dce5ec}#print-view td{padding:2.2mm;border:1px solid #dce5ec}#print-view .print-text{white-space:pre-wrap;font-size:9pt;line-height:1.4}#print-view .print-feedback{font-size:8.7pt;line-height:1.36;padding-bottom:2mm}#print-view .print-feedback small{color:#5e7184}#print-view .footerprint{margin-top:10mm;border-top:1px solid #dce5ec;padding-top:2mm;font-size:8pt;color:#6d7e8c}.avoid-break{break-inside:avoid}}

/* v1.4 – kompakt kommentar-rullegardin og fraværsregistrering */
.criterion{padding:15px 0;align-items:start;overflow:visible}
.criterion-actions{gap:8px;min-width:0}
.criterion-title-row{display:flex;gap:10px;align-items:baseline}
.criterion-title-row .ordinal{font-size:10px;color:#3980a8;font-weight:850;letter-spacing:.08em}
.criterion-note{width:100%;resize:vertical;min-height:39px;height:39px;line-height:1.4;font-size:12px;padding:9px 10px}
.criterion-note:focus{min-height:62px}
.comment-picker{position:relative;border:1px solid #dce6ed;border-radius:8px;background:#fbfdff;z-index:1}
.comment-picker[open]{z-index:22;background:#fff;border-color:#8dbbd4}
.comment-picker>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:35px;padding:7px 11px;font-size:11px;color:#2b607e;font-weight:750}
.comment-picker>summary::-webkit-details-marker{display:none}
.comment-picker>summary:after{content:'▾';font-size:14px;color:#69879b}
.comment-picker[open]>summary:after{content:'▴'}
.comment-picker[open]>summary{background:#edf5fa;border-radius:7px}
.picker-inner{position:absolute;top:calc(100% + 5px);right:0;width:min(570px,calc(100vw - 42px));max-height:330px;overflow-y:auto;padding:13px;display:grid;grid-template-columns:1fr 1fr;gap:14px;border:1px solid #bed3e1;border-radius:10px;background:white;box-shadow:0 13px 30px #1b405030;z-index:40}
.comment-picker.drop-up .picker-inner{top:auto;bottom:calc(100% + 5px)}
.picker-group-label{font-size:10px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:#647f90;margin:0 0 7px}
.picker-group{display:flex;flex-direction:column;gap:8px;min-width:0}
.comment-choice{display:flex;align-items:flex-start;gap:7px;font-size:11px;line-height:1.4;color:#31475b;cursor:pointer}
.comment-choice input{margin:1px 0 0;width:15px;height:15px;accent-color:#176f9c;flex:0 0 auto;cursor:pointer}
.picker-foot{grid-column:1/-1;display:flex;justify-content:flex-end;border-top:1px solid #e6eef2;padding-top:8px}
.picker-close{border:1px solid #d3e2eb;background:#f8fbfd;border-radius:6px;font-size:11px;color:#255877;font-weight:750;padding:6px 11px;cursor:pointer}
.notearea{margin-top:17px}.notearea textarea{min-height:58px}
.action-footer{position:sticky;bottom:0;background:white;z-index:4;box-shadow:0 -5px 13px #1b40500b;border-radius:0 0 14px 14px}
.pager-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.navigation-counter{font-size:11px;color:#6f8292;margin-right:4px;white-space:nowrap}
.history-comment{margin:3px 0 0 14px;color:#60768b;font-size:11px}.history-comment.own{color:#284d6a;white-space:pre-wrap}
.save-hint{font-size:10px;color:#637b8c;padding-top:5px}
.attendance-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 15px;margin:0 0 20px;border:1px solid #dce7ee;border-radius:9px;background:#f6fafc}
.attendance-row .attendance-heading{font-size:12px;font-weight:800;color:var(--navy)}
.attendance-row .attendance-desc{font-size:10px;color:#61788a;margin-top:2px}
.attendance-select{width:min(270px,100%);min-width:210px!important;font-size:12px;font-weight:650}
.attendance-hint{padding:10px 13px;font-size:11px;border-radius:8px;border:1px solid #f0d8b1;background:#fff9ec;color:#7c5a28;margin:-12px 0 15px}
.absence-notice{border:1px dashed #c5d7e1;border-radius:9px;background:#f7fafc;color:#526e81;padding:17px;font-size:12px;margin:7px 0}
.attendance-tag{font-weight:750;font-size:10px;border-radius:6px;padding:3px 7px;display:inline-block;background:#fff2df;color:#806025}
.attendance-tag.undocumented{background:#fbeaea;color:#963e3b}
.attendance-tag.documented{background:#e9f3f9;color:#246687}
.attendance-tag.present{background:#e9f6ef;color:#2d7657}
.attendance-line{margin-top:8px;color:#5b7287;font-size:11px}
.attendance-summary{border:1px solid #e1e9ef;background:#f9fbfd;padding:12px;border-radius:9px;font-size:12px;line-height:1.7}
.attendance-summary .attendance-dates{font-size:11px;margin-top:6px;color:#526b80}
@media(max-width:800px){.picker-inner{grid-template-columns:1fr;max-height:270px}.criterion{grid-template-columns:1fr}.comment-picker>summary{font-size:12px}}
@media(max-width:500px){.action-footer{padding:10px}.pager-actions{width:100%;justify-content:space-between}.navigation-counter{display:none}.pager-actions .btn{flex:1;padding:9px 7px}.attendance-row{flex-direction:column;align-items:stretch;gap:7px}.attendance-select{width:100%;min-width:0!important}}

/* v1.4 – fem nivåer og kompakt lærerside */
.rating{grid-template-columns:34px repeat(5,minmax(0,1fr))}
.rate{font-size:10px;padding:8px 3px;white-space:nowrap}
.rate.active.level-below{background:#b87355;border-color:#b87355}
.rate.active.level-above{background:#357f89;border-color:#357f89}
.level-chip.below{background:#fff3e7;color:#925e29}
.level-chip.above{background:#e3f5f7;color:#247082}
.stacked span.below{background:#dfb17c}
.stacked span.above{background:#52a7b6}
.teacher-layout{grid-template-columns:285px minmax(0,1fr)}
.teacher-class-table{display:flex;flex-direction:column;gap:4px;max-height:550px;overflow-y:auto}
.teacher-student{display:flex;justify-content:space-between;align-items:center;border:1px solid transparent;background:#f8fafc;color:#26405b;border-radius:8px;padding:9px 10px;font-size:12px;font-weight:700;width:100%;text-align:left}
.teacher-student.current{background:#e9f4fa;border-color:#b4d9ea}
.teacher-student .teacher-grade{font-variant-numeric:tabular-nums;color:#235f82;font-weight:800}
.teacher-mark{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.teacher-banner{padding:15px;border:1px solid #d7e7ef;background:#f4f9fb;border-radius:11px}
.teacher-banner .big{font-size:27px;font-weight:850;color:var(--navy)}
.teacher-banner .meta{font-size:11px;color:#627a91;margin-top:5px}
.teacher-legend{font-size:11px;color:#587086;margin-top:10px;line-height:1.7}
.teacher-table{width:100%;border-collapse:collapse;margin-top:12px;font-size:12px}
.teacher-table th,.teacher-table td{border-bottom:1px solid #e5edf2;padding:9px;text-align:left}
.teacher-table th{font-size:10px;text-transform:uppercase;color:#6c8096;background:#f7fafc}
.teacher-teaching-note{border-left:3px solid #a9bfd1;padding:9px 13px;background:#f8fafc;font-size:11px;color:#536b7d;margin-top:14px}
@media(max-width:1100px){.rating{grid-template-columns:34px repeat(5,minmax(0,1fr))}.rate{font-size:9px}}
@media(max-width:700px){.teacher-layout{grid-template-columns:1fr}.teacher-mark{grid-template-columns:1fr}}
@media(max-width:500px){.rating{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.rate{font-size:10px;min-height:36px}}

/* v1.5 – undervisningstype og automatisk, konsis vurderingsrapport */
.toolbar-grid{grid-template-columns:minmax(140px,.8fr) 145px minmax(285px,1.55fr) minmax(155px,.95fr) minmax(185px,1.3fr) auto;gap:11px}
.toolbar-grid .taskfield{grid-column:auto}
.lesson-type-tag{display:inline-block;padding:3px 7px;border:1px solid #c6dce9;background:#eef7fb;border-radius:5px;color:#235978;font-weight:750;font-size:10px}
.lesson-type-tag.classroom,.lesson-type-tag.theory{background:#f2f0fc;border-color:#dfd8f6;color:#65539a}
.auto-report{border:1px solid #d6e5ee;border-radius:12px;background:linear-gradient(155deg,#f5faff 0%,#fff 75%);padding:16px 18px;margin:14px 0 18px}
.auto-report-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.auto-report-title h3{margin:0;font-size:14px;color:var(--navy)}
.auto-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.auto-panel{background:white;border:1px solid #e3edf3;border-radius:9px;padding:13px 14px}
.auto-panel h4{font-size:12px;margin:0 0 7px;color:#215679}
.auto-panel.next h4{color:#8a5c27}
.auto-panel p{font-size:12px;margin:0;line-height:1.65;white-space:pre-wrap}
.auto-desc{font-size:11px;color:#687d8d;margin:10px 0 0}
.mini-stats{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}
.mini-stat{padding:7px 10px;border:1px solid #e4ebf0;border-radius:7px;background:#f8fafc;font-size:11px;color:#5e7284}
.mini-stat strong{color:#173553;font-size:13px}
.diagnostic-details{margin-top:16px;border:1px solid #e6edf2;border-radius:9px;overflow:hidden}
.diagnostic-details>summary{cursor:pointer;background:#f6f9fb;padding:10px 13px;font-size:12px;font-weight:750;color:#2a5c7b}
.diagnostic-details>.diagnostic-inner{padding:12px}
.comment-frequency{font-size:11px;color:#49637b;line-height:1.8}
.print-check{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:11px;font-weight:700;color:#496078}
.print-check input{accent-color:#176f9c;width:15px;height:15px}
.summary-notes{margin-top:12px}
@media(max-width:1380px){.toolbar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar-grid .taskfield{grid-column:span 2}.toolbar-grid .session-field{grid-column:span 1}}
@media(max-width:700px){.toolbar-grid{grid-template-columns:1fr 1fr}.toolbar-grid .taskfield{grid-column:1/-1}.auto-grid{grid-template-columns:1fr}}
@media print{#print-view .print-auto{padding:4mm 0;line-height:1.65;font-size:10.2pt;white-space:pre-wrap}#print-view h2{margin-top:7mm}#print-view .compact-meta{font-size:9pt;color:#587086;line-height:1.7}#print-view .report-sub{margin-bottom:3mm}}

/* V1.6 — terminfilter og kompakte vurderingsfaner */
.toolbar-grid{grid-template-columns:minmax(116px,.75fr) 144px minmax(275px,1.65fr) 115px 155px minmax(180px,1.3fr) auto;gap:10px}
.toolbar-grid .taskfield{grid-column:auto}
.assessment-sections{display:flex;align-items:stretch;gap:8px;margin:4px 0 12px;flex-wrap:wrap}
.assessment-section-tab{flex:1 1 150px;display:flex;align-items:center;justify-content:space-between;gap:7px;border:1px solid #dbe6ed;background:#f8fafc;border-radius:9px;color:#365571;font-size:12px;font-weight:750;text-align:left;padding:11px 12px;min-height:43px}
.assessment-section-tab:hover{background:#eef6fa;border-color:#abcbdc}
.assessment-section-tab.active{border-color:#2a698f;background:#e6f3fb;color:#183c5a;box-shadow:inset 0 0 0 1px #2a698f}
.assessment-section-tab .section-count{font-size:10px;color:#47748b;background:#e6edf2;border-radius:999px;padding:3px 7px;white-space:nowrap}
.assessment-section-tab.active .section-count{background:white;color:#176f9c}
.assessment-group-heading{font-size:11px;font-weight:750;color:#60768c;display:flex;align-items:center;justify-content:space-between;gap:9px;margin:6px 0 0}
.assessment-group-heading .group-tip{font-weight:450;font-size:10px;color:#788c9a}
.assessment-panel{min-height:200px}
.assessment-panel .criterion:first-child{border-top:1px solid #e8edf1}
.assessment-panel .criterion:last-child{border-bottom:0}
@media(max-width:1380px){.toolbar-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.toolbar-grid .session-field{grid-column:span 2}.toolbar-grid .taskfield{grid-column:span 2}.toolbar-grid .newclass{grid-column:span 1}}
@media(max-width:820px){.assessment-sections{gap:5px}.assessment-section-tab{font-size:11px;padding:9px}.toolbar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar-grid .session-field,.toolbar-grid .taskfield{grid-column:1/-1}}
@media(max-width:560px){.assessment-section-tab{flex:1 1 100%;min-height:37px}.assessment-panel{min-height:auto}.assessment-group-heading{align-items:flex-start}}

/* V1.9 – én klikkbar, sammenleggbar rad per vurderingsområde */
.assessment-list{display:flex;flex-direction:column;gap:8px;margin:9px 0 4px}
.criterion-accordion{display:block;padding:0;margin:0;border:1px solid #d9e5ed;border-radius:10px;background:#fff;overflow:visible;min-width:0}
.criterion-accordion[open]{border-color:#b5d1e1;box-shadow:0 2px 12px #1d43600d}
.criterion-accordion > summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:34px minmax(0,1fr) auto 20px;align-items:center;gap:10px;padding:13px 14px;min-height:68px;background:#fafcfe;border-radius:10px;outline-offset:3px}
.criterion-accordion > summary::-webkit-details-marker{display:none}
.criterion-accordion[open] > summary{background:#eef6fb;border-radius:10px 10px 0 0;border-bottom:1px solid #dceaf2}
.criterion-accordion > summary:hover{background:#f0f7fb}
.criterion-accordion[open] > summary:hover{background:#e6f2f9}
.criterion-accordion .criterion-ord{font-size:11px;font-weight:800;color:#39779b}
.criterion-accordion .criterion-overview{min-width:0}
.criterion-accordion .criterion-name{margin:0 0 2px;font-size:13px;font-weight:750;color:#203b54}
.criterion-accordion .criterion-help{font-size:11px;margin:0;color:#698096;max-width:none}
.criterion-accordion .criterion-overview-status{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;text-align:right}
.criterion-accordion .criterion-state{font-size:10px;font-weight:750;border:1px solid #dce5eb;background:#fff;color:#728399;border-radius:6px;padding:5px 8px;white-space:nowrap}
.criterion-accordion .criterion-state.has-value{border-color:#a8cadb;background:#e8f5fa;color:#215e82}
.criterion-accordion .criterion-state.level-under,.criterion-accordion .criterion-state.level-below{background:#faefed;color:#a04e48;border-color:#ebd0cc}
.criterion-accordion .criterion-state.level-over,.criterion-accordion .criterion-state.level-above{background:#e6f4ed;color:#287457;border-color:#c3e1d0}
.criterion-accordion .criterion-extras{font-size:10px;color:#56788f;white-space:nowrap}
.criterion-accordion .accordion-chevron{font-size:18px;font-weight:500;color:#668ca2;line-height:1;text-align:center;transform:rotate(0deg);transition:transform .12s}
.criterion-accordion[open] .accordion-chevron{transform:rotate(180deg)}
.criterion-accordion-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:9px}
.criterion-accordion-body .level-label{font-size:10px;font-weight:750;color:#6b8192;text-transform:uppercase;letter-spacing:.04em}
.criterion-accordion-body .rating{width:100%;max-width:840px}
.criterion-accordion-body .comment-picker,.criterion-accordion-body .criterion-note{width:100%;max-width:840px}
.accordion-overview-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.accordion-help{font-size:11px;color:#6d8295}
.accordion-all-btn{font-size:11px;border:1px solid #d4e2eb;background:#fff;color:#245e7f;border-radius:7px;padding:6px 10px;font-weight:700}
.accordion-all-btn:hover{background:#eaf5fb}
@media(max-width:800px){.criterion-accordion > summary{grid-template-columns:24px minmax(0,1fr) 16px;gap:7px;padding:12px}.criterion-accordion .criterion-overview-status{grid-column:2;justify-content:flex-start;text-align:left}.criterion-accordion .accordion-chevron{grid-column:3;grid-row:1 / span 2}.criterion-accordion-body{padding:12px}.accordion-overview-line{align-items:flex-start}}
@media(max-width:490px){.criterion-accordion .criterion-help{font-size:10px}.criterion-accordion .criterion-extras{white-space:normal}}

/* V1.9 – ryddigere oppsett: ny klasse ved dato og økter mot høyre, to kompakte rader. */
.toolbar-grid{
  display:grid;
  grid-template-columns:minmax(185px,1fr) minmax(155px,.78fr) 122px minmax(440px,2fr);
  grid-template-areas:
    "class date newclass sessions"
    "term mode task task";
  column-gap:13px;
  row-gap:13px;
  align-items:end;
}
.toolbar-grid .meta-class{grid-area:class}
.toolbar-grid .meta-date{grid-area:date}
.toolbar-grid .newclass{grid-area:newclass;min-height:38px;white-space:nowrap;align-self:end;padding-inline:10px}
.toolbar-grid .session-field{grid-area:sessions;min-width:0}
.toolbar-grid .session-picks{justify-content:flex-end;gap:5px}
.toolbar-grid .term-field{grid-area:term}
.toolbar-grid .meta-mode{grid-area:mode}
.toolbar-grid .taskfield{grid-area:task;min-width:0}
.toolbar-grid .field > label{white-space:nowrap}
@media(max-width:1050px){
  .toolbar-grid{
    grid-template-columns:minmax(180px,1fr) minmax(165px,.85fr) 122px;
    grid-template-areas:
      "class date newclass"
      "sessions sessions sessions"
      "term mode mode"
      "task task task";
    column-gap:12px;
    row-gap:12px;
  }
  .toolbar-grid .session-picks{justify-content:flex-start;flex-wrap:wrap}
  .toolbar-grid .taskfield{grid-column:1 / -1;min-width:0}
}
@media(max-width:900px){
  .toolbar-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:
      "class date"
      "newclass sessions"
      "term mode"
      "task task";
  }
  .toolbar-grid .newclass{justify-self:start}
  .toolbar-grid .session-picks{justify-content:flex-start}
  .toolbar-grid .taskfield{grid-column:1 / -1}
}
@media(max-width:620px){
  .toolbar-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:
      "class newclass"
      "date term"
      "mode mode"
      "sessions sessions"
      "task task";
    gap:10px;
  }
  .toolbar-grid .field>label{white-space:normal}
  .toolbar-grid .newclass{justify-self:stretch}
  .toolbar-grid .session-picks{flex-wrap:wrap}
}

/* V1.9 – refined visual language, professional electro workshop dashboard */
:root{
 --navy:#142f4a;--navy2:#24506e;--blue:#12758f;--bluebg:#e8f6f9;
 --text:#20364a;--sub:#687b8d;--stroke:#dce6ee;--bg:#ecf2f6;
 --green:#157963;--greenbg:#e6f6ef;--red:#a74640;--redbg:#fff0ed;
 --amber:#935e2e;--amberbg:#fff6e8;
 --shadow:0 4px 9px rgba(24,51,76,.035),0 14px 34px rgba(24,51,76,.07)
}
body{background:radial-gradient(ellipse 70% 24% at 88% 0%,#d5eaf1 0%,transparent 100%),linear-gradient(145deg,#f2f6f9 0%,#eaf1f5 62%,#eef4f7 100%);min-height:100vh}
.app-shell{max-width:1540px;padding-top:19px}
.masthead{position:relative;overflow:hidden;isolation:isolate;padding:21px 26px;border-radius:19px;background:linear-gradient(118deg,#112c46 0%,#1a4460 58%,#126f82 100%);box-shadow:0 14px 29px rgba(15,52,76,.15);margin-bottom:15px;min-height:116px}
.masthead:before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:-24% 8% auto auto;width:320px;height:210px;border:1px solid rgba(255,255,255,.12);border-radius:50%;transform:rotate(-15deg);box-shadow:0 0 0 38px rgba(255,255,255,.028),0 0 0 82px rgba(255,255,255,.025)}
.masthead:after{content:'';position:absolute;z-index:-1;pointer-events:none;inset:auto -30px -100px auto;width:330px;height:180px;border:1px solid rgba(255,255,255,.13);border-radius:50%;transform:rotate(-20deg)}
.brandmark{height:56px;width:56px;border-radius:15px;background:linear-gradient(145deg,#1d9aa5,#125b79);box-shadow:inset 0 1px 0 #ffffff33,0 8px 17px #071e3b55;border:1px solid #ffffff35;font-size:23px}
.eyebrow{color:#b3e9ef;letter-spacing:.18em;font-size:10px}
.masthead h1{color:#fff;font-size:30px;line-height:1.23;letter-spacing:-.035em}
.masthead p{color:#d6e5ee;margin-top:4px;font-size:12px}
.mast-actions{gap:9px}
.mast-actions .btn{border:1px solid #ffffff3d;color:#fff;background:#ffffff1a;min-height:42px;border-radius:10px;padding-inline:16px;box-shadow:0 3px 8px #091d2a1f}
.mast-actions .btn:hover{background:#ffffff2b;border-color:#ffffff75}
.mast-actions .btn.save-as{background:#e4a65e;border-color:#e4a65e;color:#192f41;box-shadow:0 5px 13px #0a253a32}
.mast-actions .btn.save-as:hover{background:#f3b878;border-color:#f3b878}
.tabs{background:#dce7ed;border-radius:12px;gap:4px;padding:5px;margin-bottom:17px;box-shadow:inset 0 1px 2px #27465b0c}
.tab{font-size:12px;padding:10px 17px;border-radius:8px;color:#506b7c;transition:background .15s,color .15s}
.tab:hover{color:#153951;background:#ffffff82}
.tab.active{color:#124c65;background:#fff;box-shadow:0 3px 9px #24475d1a}
.card{border:1px solid #d8e5ed;border-radius:15px;background:#fff;box-shadow:var(--shadow)}
.toolbar{position:relative;overflow:hidden;padding:20px 21px 17px}
.toolbar:before{content:'';position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,#1687a0,#58b7aa 48%,#e1a15b 100%)}
.field label,.toolbar .field>label{font-size:11px;font-weight:780;color:#42647b}
input[type=text],input[type=date],input[type=number],select,textarea{border-color:#ccdce7;box-shadow:0 1px 2px #182f4810;background:#fcfdff;border-radius:9px}
input[type=text]:hover,input[type=date]:hover,select:hover,textarea:hover{border-color:#96bacd}
input:focus,select:focus,textarea:focus{border-color:#11869e;box-shadow:0 0 0 3px #8ed4df55}
.toolbar-footer{border-top:1px solid #edf1f4;padding-top:12px;margin-top:16px}
.toolbar-footer #lessonMetaHint{font-size:11px;color:#6c8695}
.week-label{font-size:12px;color:#195476}
.btn{transition:background .14s,border-color .14s,transform .12s,box-shadow .14s}
.btn:active{transform:translateY(1px)}
.btn.primary{background:linear-gradient(135deg,#183b59,#176b82);border-color:#205b74;box-shadow:0 3px 7px #17425a2a}
.btn.primary:hover{background:linear-gradient(135deg,#245572,#1a8498)}
.btn:not(.primary):not(.danger):hover{box-shadow:0 3px 9px #1b496010}
.roster-head{background:linear-gradient(135deg,#fbfdff,#f0f7fa);padding:19px 18px 13px;border-radius:15px 15px 0 0}
.roster-head h2{font-size:19px;color:#173d59}
.progress{height:7px;background:#dfeaf1;margin-top:11px}
.progress>div{background:linear-gradient(90deg,#1f789b,#39af9e)}
.roster-list{padding:10px}
.student{border-radius:10px;margin-bottom:4px;padding:13px 12px}
.student.active{background:linear-gradient(105deg,#eaf6f9,#f1f8fc);border-color:#91cad9;box-shadow:inset 3px 0 0 #1893a7,0 2px 8px #17375310}
.student-code{color:#1f4059}
.detail-head{background:linear-gradient(115deg,#fbfdff,#f3f9fb);border-radius:15px 15px 0 0;padding:19px 22px;border-bottom-color:#dceaf0}
.detail-head h2{font-size:19px;color:#163b57}
.detail-body{padding:18px 23px}
.attendance-row{padding:11px 14px;min-height:72px;border-radius:11px;border-color:#cce7da;background:linear-gradient(100deg,#edf9f2,#f7fcf9 70%);margin-bottom:18px}
.attendance-row.is-absent{border-color:#ecd9b8;background:linear-gradient(105deg,#fff7ea,#fffdf8)}
.attendance-info{display:flex;align-items:center;gap:12px;min-width:0}
.presence-symbol{display:inline-grid;flex:none;place-items:center;width:35px;height:35px;border-radius:11px;background:#d3eee0;color:#197653;font-size:18px;font-weight:800}
.is-absent .presence-symbol{background:#ffe2c7;color:#9d5a22}
.attendance-row .attendance-heading{font-size:12px;color:#194e43}
.is-absent .attendance-heading{color:#815121}
.attendance-row .attendance-desc{font-size:10.5px;margin-top:4px;max-width:440px}
.attendance-change{width:min(235px,100%);flex:none;display:flex;flex-direction:column;gap:3px}
.attendance-change label{font-size:10px;color:#456e65}
.attendance-select{width:100%!important;min-width:0!important;min-height:37px;font-size:11px}
.accordion-overview-line{padding:4px 0 10px}
.criterion-accordion{border:1px solid #dae5ed;border-radius:11px;box-shadow:0 2px 4px #203c5210;transition:box-shadow .15s,border-color .15s}
.criterion-accordion:hover{border-color:#a8c6d7;box-shadow:0 4px 13px #16395413}
.criterion-accordion > summary{background:linear-gradient(100deg,#fbfdff,#f8fbfd);min-height:64px}
.criterion-accordion[open]{border-color:#b4d4df;box-shadow:0 6px 17px #1c556c15}
.criterion-accordion[open]>summary{background:linear-gradient(90deg,#e8f5f8,#f2f9fc)}
.criterion-accordion .criterion-ord{background:#e0f0f6;border-radius:8px;padding:7px 5px;text-align:center;color:#176783}
.criterion-accordion .criterion-state.has-value{font-weight:800}
.criterion-accordion-body{background:linear-gradient(180deg,#fff,#fcfeff);padding:16px 20px 19px}
.rate{min-height:38px;border-radius:8px;border-color:#d3e0e8}
.rate:not(.active):hover{background:#e8f4f7;border-color:#93c8d5}
.comment-picker>summary{min-height:39px;border-radius:8px}
.comment-picker>summary:hover{background:#eff8fb}
.notearea{margin-top:15px}
.action-footer{background:#fcfdff;border-radius:0 0 15px 15px;border-top-color:#d8e8ef;padding:14px 22px}
.infonote{border-left-color:#269cad;background:#e8f3f8;color:#466879;border-radius:10px}
.teacher-banner,.metricbox,.auto-panel{box-shadow:0 3px 11px #1d455511}
.auto-report{box-shadow:0 7px 17px #1b4a6510}
.content-card{padding:23px}
.privacy{line-height:1.65}
@media(max-width:970px){.masthead{padding:18px 20px}.masthead h1{font-size:26px}.attendance-row{gap:10px}.attendance-change{width:205px}}
@media(max-width:620px){.app-shell{padding:9px 9px 24px}.masthead{align-items:flex-start;flex-direction:column;border-radius:13px;gap:12px}.mast-actions{width:100%;justify-content:flex-start}.attendance-row{align-items:stretch;flex-direction:column}.attendance-change{width:100%}.tabs{width:100%;flex-wrap:wrap}.tab{flex:1 1 auto;font-size:11px}.detail-body{padding:15px}.detail-head{padding:15px}.criterion-accordion-body{padding:12px}}


/* V2.0 – essential text only, PIN-protected teacher view */
.toolbar-footer{justify-content:flex-start}
.accordion-overview-line{justify-content:flex-end}
.attendance-row{min-height:63px;padding-block:9px;margin-bottom:14px}
.attendance-change{gap:2px}
.teacher-page-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.teacher-change-pin{align-self:flex-start}
.teacher-page-head h2{margin:0}
.lock-symbol{display:grid;place-items:center;width:47px;height:47px;background:#e9f4f7;color:var(--navy);border-radius:12px;margin-bottom:12px;font-size:23px}
.lock-desc{font-size:13px;color:#587187;margin:0 0 17px}
#teacherLockDialog .field{margin-top:13px}
#teacherLockDialog input{font-size:18px;letter-spacing:.12em}
#teacherLockDialog #teacherConfirmField[hidden]{display:none}
.lock-error{margin:10px 0 0;font-size:12px;font-weight:700;color:var(--red)}
.lock-error[hidden]{display:none}
.lock-privacy{font-size:11px;color:#718396;margin:14px 0 0}
#teacherLockDialog .dialog-actions{margin-top:19px}
/* Retain the disclaimer needed for safe handling of pupil records. */
.privacy{padding:11px 4px 0;font-size:10.5px}

/* V2.1 – provasjonsoversikt / faglig samtale. V2.0 styles kept intact. */
.assessment-workspace{display:grid;grid-template-columns:285px minmax(0,1fr);gap:15px;align-items:start}
.assessment-sidebar{padding:18px;display:flex;flex-direction:column;gap:13px}
.assessment-sidebar h2{font-size:16px;margin:0}
.assessment-catalog{margin-top:5px;display:flex;flex-direction:column;gap:6px;max-height:65vh;overflow-y:auto}
.assessment-item{display:flex;flex-direction:column;gap:3px;text-align:left;background:#f7fafc;border:1px solid #e4ebf1;border-radius:10px;padding:11px;color:var(--text);width:100%}
.assessment-item.current{background:#e7f4f7;border-color:#74b7bf;box-shadow:inset 3px 0 var(--blue)}
.assessment-item strong{font-size:12px}.assessment-item span{font-size:10px;color:var(--sub)}
.assessment-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.assessment-editor-head h2{margin:0;font-size:18px}
.assessment-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}
.assessment-fields .span2{grid-column:1/-1}
.assessment-student-grid{width:100%;border-collapse:collapse;font-size:12px;margin:12px 0}
.assessment-student-grid th{font-size:10px;color:var(--sub);text-align:left;border-bottom:1px solid var(--stroke);padding:8px}
.assessment-student-grid td{padding:7px 8px;border-bottom:1px solid #edf1f4}
.assessment-student-grid tr.current{background:#edf8fb}
.assessment-student-grid select{width:125px;min-height:32px}
.assessment-student-grid .btn{min-height:30px;padding:5px 10px}
.test-comment{background:#f6fafc;border:1px solid #dbe9ee;border-radius:12px;padding:14px;margin-top:14px}
.test-comment textarea{min-height:65px}
.assessment-count{font-size:11px;color:#617b90;margin:7px 0}
.test-mini{border:1px solid #dbe9f0;border-radius:9px;padding:10px 12px;background:#fafcfe;font-size:12px;line-height:1.65}
.test-mini+.test-mini{margin-top:7px}.test-mini strong{color:var(--navy)}
.teacher-evidence{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0}
.teacher-evidence .metricbox{padding:10px 12px}
.teacher-evidence .metricbox strong{font-size:16px;color:var(--navy)}
.teacher-evidence .metricbox span{display:block;color:var(--sub);font-size:10px;margin-top:3px}
.report-context{margin:10px 0;padding:10px 12px;border-radius:8px;background:#eef7fa;color:#1c5977;font-size:11px}
@media(max-width:1050px){.assessment-workspace{grid-template-columns:1fr}.assessment-fields{grid-template-columns:repeat(2,1fr)}.assessment-fields .span2{grid-column:1/-1}.assessment-catalog{max-height:240px}}
@media(max-width:670px){.assessment-fields{grid-template-columns:1fr}.assessment-fields .span2{grid-column:auto}.teacher-evidence{grid-template-columns:1fr}.tabs{width:100%;overflow:auto}.tab{white-space:nowrap}}
@media print{#print-view .test-mini{border:0;padding:2mm 0;background:none;font-size:9pt}}

/* V2.2 – klar arbeidsdeling mellom lærerens analyse og elevrapport */
.report-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.report-editor-head .content-title{margin:0}
.report-tag{font-size:11px;color:#256b84;background:#e8f5fa;border:1px solid #d0e7ee;border-radius:20px;padding:5px 9px;font-weight:750}
.report-tag.custom{color:#805d29;background:#fff6e5;border-color:#e9d6b6}
.report-compose{display:grid;grid-template-columns:1fr;gap:14px;margin:14px 0}
.report-compose .report-field{background:#f8fbfd;border:1px solid #dce8f0;border-radius:11px;padding:14px 16px}
.report-compose .report-field label{font-size:14px;color:var(--navy);margin-bottom:8px;display:block}
.report-compose textarea{min-height:120px;background:white;line-height:1.6;font-size:13px;resize:vertical;width:100%}
.report-compose textarea#reportForward{min-height:110px}
.report-auto-suggestions{margin-top:16px}
.report-auto-suggestions .auto-grid{margin-top:12px}
.report-auto-suggestions .auto-panel{background:#fff}
.report-actionline{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}
.report-actionline .report-footnote{color:var(--sub);font-size:11px;flex:1 1 180px}
.teacher-report-link{margin-top:14px;padding:12px 14px;border:1px solid #d6e5ed;border-radius:10px;background:#f4f9fb;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.teacher-report-link strong{font-size:12px;color:var(--navy)}
.teacher-report-link span{font-size:11px;color:var(--sub)}
@media(max-width:700px){.report-editor-head,.report-actionline{align-items:stretch}.report-compose .report-field{padding:12px}}

/* V2.3 – roligere arbeidsflate og riktig plassering av navigasjonen */
.workspace{align-items:start}
.roster{position:sticky;top:12px;align-self:start}
.roster-list{max-height:min(73vh,780px);overflow-y:auto;scrollbar-gutter:stable}
.accordion-overview-line{justify-content:flex-end;gap:8px;padding-top:1px;padding-bottom:9px}
.accordion-all-btn{min-height:33px;padding:7px 12px;border-radius:8px}
#collapseAllCriteria{color:#456b80;background:#f4f8fa}
#expandAllCriteria{color:#1b5273;background:#fff}
.action-footer{position:static!important;bottom:auto!important;z-index:auto!important;box-shadow:none!important;padding:13px 20px!important;gap:12px}
.pager-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.record-options{position:relative;font-size:11px;color:#547184}
.record-options summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:5px;font-weight:650;border-radius:8px;padding:8px 10px;border:1px solid transparent}
.record-options summary::-webkit-details-marker{display:none}
.record-options summary:after{content:'⌄';font-size:14px;margin-left:5px}
.record-options[open] summary,.record-options summary:hover{background:#eef5f8;border-color:#dce9ef}
.record-options-menu{position:absolute;bottom:calc(100% + 5px);left:0;min-width:220px;padding:10px;background:#fff;border:1px solid #d9e6ed;border-radius:9px;box-shadow:0 8px 24px #1c3c541c;z-index:5}
.record-options-menu button{width:100%}
@media(max-width:700px){.roster{position:static}.roster-list{max-height:230px;overflow-y:auto}.action-footer{align-items:stretch}.pager-actions{width:100%;justify-content:space-between}.record-options{order:2}}
@media(max-width:450px){.pager-actions .btn{font-size:11px;padding-inline:8px}.navigation-counter{display:none}}

/* V2.4 – trygg flytting mellom grupper. */
.toolbar-grid .class-tools{grid-area:newclass;display:flex;align-items:end;gap:5px;min-width:0}
.toolbar-grid .class-tools .btn{min-height:38px;white-space:nowrap;padding:8px 9px;font-size:11px}
.toolbar-grid .class-tools .newclass{grid-area:auto;align-self:auto}
.toolbar-grid .class-tools .move-class{background:#eaf5fa;border-color:#bddbe9;color:#155978}
.toolbar-grid{grid-template-columns:minmax(175px,1fr) minmax(150px,.78fr) 177px minmax(390px,2fr)}
@media(max-width:1050px){.toolbar-grid{grid-template-columns:minmax(180px,1fr) minmax(165px,.85fr) 177px}}
@media(max-width:900px){.toolbar-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.toolbar-grid .class-tools{justify-self:start}}
@media(max-width:620px){.toolbar-grid .class-tools{flex-wrap:wrap;align-self:end}}
.move-dialog{max-width:545px}
#moveDialog [hidden]{display:none!important}
.move-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}
.move-form-grid .span2{grid-column:1 / -1}
.move-preview{max-height:210px;overflow:auto;margin-top:14px;padding:13px;border:1px solid #d7e4ec;border-radius:10px;background:#f5f9fc;font-size:12px;white-space:pre-line;line-height:1.5}
.move-warn{font-size:11px;color:#855321;background:#fff5e8;border:1px solid #f5d9b1;padding:10px 12px;border-radius:9px;margin-top:12px}
@media(max-width:570px){.move-form-grid{grid-template-columns:1fr}.move-form-grid .span2{grid-column:auto}}


/* V2.5 – sammenleggbart oppsett for registrering. Kun visning, samme dataformat. */
.session-toolbar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.session-title{font-size:12px;color:#284b66;font-weight:750;line-height:1.5;min-width:0}
.session-toolbar-fields{display:block}
#sessionToolbar.is-collapsed{padding:12px 17px}
#sessionToolbar.is-collapsed .session-toolbar-head{margin-bottom:0}
#sessionToolbar.is-collapsed .session-toolbar-fields{display:none}
#toggleSessionToolbar{white-space:nowrap;flex:none}
.workspace{grid-template-columns:minmax(225px,270px) minmax(0,1fr)}
.workspace.roster-hidden{grid-template-columns:minmax(0,1fr)}
.workspace.roster-hidden .roster{display:none}
.workspace.roster-hidden .detail{width:100%;max-width:1180px;margin:0 auto}
.roster-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:3px}
.roster-hide{padding:5px 8px!important;min-height:28px!important}
.roster-list{max-height:min(74vh,780px)}
.detail-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.quick-student-nav{display:inline-flex;align-items:center;gap:4px}
.quick-student-nav .btn{min-width:29px;padding:4px 8px;font-size:17px;min-height:30px}
.quick-count{color:#617991;font-size:11px;font-weight:750;min-width:34px;text-align:center}
#showRosterToggle{white-space:nowrap}
.attendance-compact{display:flex;flex-wrap:wrap;align-items:center;gap:9px;background:#f2faf5;border:1px solid #d3e9dc;border-radius:10px;padding:9px 11px;margin-bottom:15px}
.attendance-compact.is-absent{background:#fff7ed;border-color:#f1d9ba}
.attendance-compact-main{display:flex;align-items:center;gap:9px;flex:1;min-width:170px;font-size:12px;color:#245944}
.attendance-compact.is-absent .attendance-compact-main{color:#93591f}
.compact-presence-icon{display:grid;place-items:center;border-radius:8px;width:27px;height:27px;flex:none;background:#d5eddf;font-size:15px;color:#237653;font-weight:800}
.attendance-compact.is-absent .compact-presence-icon{background:#ffe6c7;color:#945b20}
.attendance-edit-btn{margin-left:auto;white-space:nowrap}
.attendance-editor{flex:1 1 100%;padding:10px 0 1px;border-top:1px solid #d8e6e0;display:grid;grid-template-columns:minmax(110px,140px) minmax(180px,310px);gap:12px;align-items:center}
.attendance-editor[hidden]{display:none!important}
.attendance-editor label{font-size:11px}
.attendance-editor select{min-height:34px}
.shared-note{margin-top:14px;border:1px solid #dce7ef;border-radius:10px;background:#fcfdff;overflow:hidden}
.shared-note summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:11px 14px;font-size:12px;font-weight:750;color:#294b66}
.shared-note summary::-webkit-details-marker{display:none}
.shared-note .shared-note-preview{font-size:10px;color:#688399;font-weight:650;margin-left:auto}
.shared-note .shared-note-chevron{font-size:14px;color:#6c8799;transition:transform .15s}
.shared-note[open] .shared-note-chevron{transform:rotate(180deg)}
.shared-note[open] summary{border-bottom:1px solid #e2edf4;background:#f4f9fc}
.shared-note-body{padding:12px 14px}
.shared-note-body textarea{width:100%;min-height:70px}
.criterion-accordion>summary{min-height:60px}
@media(max-width:850px){.workspace{grid-template-columns:235px minmax(0,1fr)}.detail-head-actions{gap:6px}.detail-head{align-items:flex-start}.quick-student-nav{order:1}}
@media(max-width:700px){.workspace,.workspace.roster-hidden{grid-template-columns:1fr}.roster{position:static}.detail-head{gap:10px}.detail-head-actions{align-items:flex-end;flex-wrap:wrap}.session-toolbar-head{align-items:flex-start}.session-title{font-size:11px}.attendance-editor{grid-template-columns:1fr}.workspace.roster-hidden .detail{max-width:none}}
@media(max-width:450px){.detail-head{flex-direction:column;align-items:stretch}.detail-head-actions{justify-content:space-between}.session-toolbar-head{gap:5px}#toggleSessionToolbar{font-size:10px;padding-inline:7px}}


/* V2.6 – ryddigere elevhistorikk */
.history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.history-actions{display:flex;gap:8px;flex-wrap:wrap}
.history-entry.history-accordion{border:1px solid var(--stroke);border-radius:11px;margin:0 0 10px;overflow:hidden;background:#fff}
.history-entry.history-accordion>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#f8fafc}
.history-entry.history-accordion>summary::-webkit-details-marker{display:none}
.history-entry.history-accordion[open]>summary{border-bottom:1px solid var(--stroke);background:#f4f8fb}
.history-summary-main{min-width:0;flex:1}
.history-summary-meta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap;justify-content:flex-end}
.history-mini{font-size:10px;font-weight:750;color:#60748a;background:#eef3f6;border-radius:999px;padding:4px 8px;white-space:nowrap}
.history-summary-chevron{font-size:15px;color:#6d8498;transition:transform .16s ease}
.history-entry.history-accordion[open] .history-summary-chevron{transform:rotate(180deg)}
.history-top-tools{display:flex;justify-content:flex-end;margin-bottom:8px}
.history-content{padding:12px 14px;display:flex;flex-direction:column;gap:7px}
.test-mini-accordion{border:1px solid #dbe9f0;border-radius:9px;background:#fafcfe;overflow:hidden}
.test-mini-accordion + .test-mini-accordion{margin-top:7px}
.test-mini-accordion summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px}
.test-mini-accordion summary::-webkit-details-marker{display:none}
.test-mini-accordion summary span{font-size:11px;color:#60748a}
.test-mini-body{padding:0 12px 12px;font-size:12px;line-height:1.65}
@media(max-width:760px){.history-entry.history-accordion>summary{align-items:flex-start;flex-direction:column}.history-summary-meta{justify-content:flex-start}.history-actions{width:100%}}


/* V2.7: tydelig tilbakemelding når lagring fører til neste elev. */
.student-save-notice{display:flex;gap:11px;align-items:center;margin:13px 19px 0;padding:11px 14px;border-radius:11px;background:#eaf8f4;border:1px solid #bedfd4;color:#165f50}
.student-save-check{display:grid;place-items:center;min-width:30px;height:30px;border-radius:9px;background:#cfede3;font-size:18px;font-weight:800}
.student-save-notice.is-empty{background:#f4f7fa;border-color:#dce5ec;color:#425a6e}
.student-save-notice.is-empty .student-save-check{background:#e6edf2;color:#526c82}
.student-save-notice.is-empty span:not(.student-save-check){color:#657c90}
.student-save-notice>div{display:flex;flex-direction:column;gap:2px}
.student-save-notice strong{font-size:12px;font-weight:800}
.student-save-notice span:not(.student-save-check){font-size:12px;color:#237866}
#saveStudent{min-width:164px}


/* V2.8 – utvidet karakterskala på prøver og oppgaver */
.grade-explainer{margin-left:10px;font-size:11px;color:#617a90;font-weight:500}
.assessment-student-grid select[data-test-grade]{min-width:94px;font-weight:700}
@media(max-width:750px){.grade-explainer{display:block;margin-left:0;margin-top:4px}}


/* V2.9 – klasseadministrasjon */
.toolbar-grid .class-tools .delete-class{border-color:#e6c9c8;color:#9b4141;background:#fff9f9}
.toolbar-grid .class-tools .delete-class:hover{background:#fff0ef;border-color:#dca2a0}
.toolbar-grid{grid-template-columns:minmax(175px,1fr) minmax(150px,.78fr) 240px minmax(365px,2fr)}
@media(max-width:1050px){.toolbar-grid{grid-template-columns:minmax(180px,1fr) minmax(165px,.85fr) 240px}}
@media(max-width:900px){.toolbar-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.delete-class-dialog{max-width:490px}
.delete-class-info{padding:13px 15px;border:1px solid #dce9ee;background:#f6fafc;border-radius:10px;margin-top:14px}
.delete-class-name{font-size:19px;color:#163655;font-weight:800}
.delete-class-counts{font-size:12px;color:#4e6b80;margin-top:4px;line-height:1.7}
.delete-class-warning{border:1px solid #efb8b8;background:#fff5f4;border-radius:9px;padding:12px 13px;font-size:12px;line-height:1.5;color:#91383c;margin:14px 0}
.delete-class-safety{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.delete-class-ack{display:flex;align-items:center;gap:9px;font-weight:650;color:#315065;font-size:12px}
.delete-class-ack input{width:16px;height:16px;accent-color:#185b73}
.delete-class-safety[hidden],.delete-class-warning[hidden]{display:none!important}
.delete-class-safety input[type=text]{max-width:260px}
#confirmDeleteClass:disabled{opacity:.45;cursor:not-allowed}


/* V3.0 – plassering av faner og øktoverskrift, uten endring i lagrede data. */
.toolbar-grid .session-field .session-options-wrap{width:max-content;max-width:100%;margin-left:auto;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.toolbar-grid .session-field .session-options-wrap>label{display:block;margin:0;font-size:11px;font-weight:750;color:#52677e}
.toolbar-grid .session-field .session-options-wrap .session-picks{justify-content:flex-start}
@media(max-width:1050px){.toolbar-grid .session-field .session-options-wrap{margin-left:0;width:100%}}
@media(max-width:900px){.toolbar-grid .session-field .session-options-wrap{margin-left:0;width:100%}}

/* V3.1 – tale-til-tekst, uten endring av vurderingsdata. */
.dictation-wrap{position:relative;min-width:0;width:100%}
.dictation-wrap>textarea{display:block;width:100%;padding-right:52px;min-width:0}
.dictation-btn{position:absolute;top:7px;right:8px;border:1px solid #c8dbe5;border-radius:9px;background:#f5fafc;color:#1b628a;width:34px;height:34px;min-height:34px;padding:0;display:grid;place-items:center;z-index:1;transition:background .15s,border-color .15s}
.dictation-btn:hover{background:#e5f4fb;border-color:#87b2cb}
.dictation-btn:focus-visible{outline:3px solid #9bd1e9;outline-offset:2px}
.dictation-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dictation-btn.is-listening{background:#fce9e9;border-color:#d58a8a;color:#a62e35;box-shadow:0 0 0 3px rgba(194,55,60,.11)}
.dictation-btn.is-listening::after{content:'';width:6px;height:6px;background:#c43d49;border-radius:50%;position:absolute;right:3px;top:3px}
@media print{.dictation-btn{display:none!important}}


/* V3.2: Hurtigvurdering og detaljert vurdering per elev og økt. */
.review-switcher{display:flex;align-items:center;gap:8px;padding:5px;background:#edf4f8;border:1px solid #d7e4ed;border-radius:12px;margin:0 0 15px;flex-wrap:wrap}
.review-mode{font-size:12px;font-weight:750;color:#355a73;background:transparent;border:1px solid transparent;border-radius:9px;padding:10px 16px;min-height:38px;flex:1;min-width:175px}
.review-mode.selected{color:#183e5b;background:white;border-color:#bad3e2;box-shadow:0 2px 7px #15395713}
.review-mode:hover{background:#fff}
.review-quick-panel[hidden],.review-detail-panel[hidden]{display:none!important}
.quick-form{border:1px solid #dce8ef;background:linear-gradient(180deg,#fcfeff,#f7fafc);border-radius:11px;padding:18px;display:flex;flex-direction:column;gap:13px;margin-bottom:8px}
.quick-heading{font-size:13px;font-weight:800;color:#294b66}
.quick-status-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.quick-status{border:1px solid #d5e2eb;background:#fff;color:#385970;border-radius:9px;min-height:42px;font-size:12px;font-weight:720;padding:10px}
.quick-status.active.good{background:#e6f5ee;color:#146747;border-color:#8ec6ab}
.quick-status.active.expected{background:#e8f3fc;color:#175f89;border-color:#8dbedc}
.quick-status.active.followup{background:#fff4e7;color:#955b27;border-color:#dfb27e}
.quick-picker{border:1px solid #d5e3eb;border-radius:9px;background:#fff;overflow:hidden}
.quick-picker>summary{cursor:pointer;padding:11px 13px;font-size:12px;font-weight:700;display:flex;justify-content:space-between;list-style:none;color:#345a74}
.quick-picker>summary::-webkit-details-marker{display:none}
.quick-picker[open]>summary{border-bottom:1px solid #e2eaf0}
.quick-picker-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 18px;padding:10px 13px}
.quick-choice{display:flex;align-items:center;gap:8px;padding:7px 0;font-size:12px;font-weight:500;color:#344d60;cursor:pointer}
.quick-choice input{width:16px;height:16px;flex:none;accent-color:#17688d}
.quick-note-label label{font-size:11px}
.quick-form textarea{min-height:85px}
.quick-history-chip{background:#dff3ed;color:#08775d}
.history-quick{padding:10px 12px;border-radius:9px;background:#f0f8fb;border:1px solid #dcecf4;font-size:12px;line-height:1.6}
.history-quick>strong{margin-right:8px;color:#184763}
.quick-inline-status{display:inline-block;background:#d8eafa;color:#145779;border-radius:5px;padding:2px 7px;font-weight:700}
.quick-observation{display:inline-block;margin:6px 5px 0 0;padding:3px 7px;border-radius:6px;background:#fff;border:1px solid #d9e5ed;color:#38566d;font-size:11px}
.history-quick p{margin:8px 0 0;white-space:pre-wrap}
.quick-teacher-notes{margin-top:14px}
@media(max-width:640px){.quick-status-row{grid-template-columns:1fr}.quick-picker-content{grid-template-columns:1fr}.review-mode{min-width:130px;padding:9px}}


/* V3.3 – Vurderingsbok, rolig klasseliste og lukket arbeidsflyt. */
#bookView[hidden],#registerView[hidden],#registerWorkContent[hidden],#sessionFinishView[hidden],#registerTab[hidden]{display:none!important}
.book-intro{position:relative;display:flex;align-items:center;gap:22px;border:1px solid #d9e2e7;border-radius:16px;background:linear-gradient(115deg,#fff 0%,#f4f9fa 100%);padding:23px 26px;margin-bottom:18px;box-shadow:0 8px 28px #153d5810}
.book-intro-icon{width:76px;height:88px;border-radius:5px 12px 12px 5px;background:linear-gradient(115deg,#143550,#245a6b);color:#f6e7bd;box-shadow:inset 7px 0 0 #102b43,7px 6px 0 #deedf0,0 10px 20px #12365335;display:grid;place-items:center;font-size:23px;letter-spacing:.05em;font-weight:800;flex:none}
.book-eyebrow,.book-label{letter-spacing:.12em;font-size:10px;font-weight:800;color:#637d88}
.book-intro h2{font-size:27px;margin:3px 0 4px;color:#143550}
.book-intro p{font-size:13px;color:#5b7181;margin:0}
.book-intro .btn{margin-left:auto;white-space:nowrap}
.book-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;align-items:start}
.book-class{display:grid;grid-template-columns:139px minmax(0,1fr);gap:0;border:1px solid #d6e3e9;border-radius:16px;background:#fff;box-shadow:0 12px 29px #1a3b5410;overflow:hidden;min-width:0}
.book-cover{position:relative;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;text-align:center;padding:38px 11px 18px;background:linear-gradient(140deg,#1a3d56,#234e5c 60%,#163c52);color:#f7e4bd;min-height:320px;border-right:4px solid #d7b779;box-shadow:inset -3px 0 0 #0c253744;gap:12px}
.book-cover .book-binding{position:absolute;top:0;bottom:0;left:9px;border-left:2px solid #9cbbbc66;border-right:1px solid #0c2c3b;width:5px}
.book-cover span{font-size:9px;letter-spacing:.17em;border-top:1px solid #e4c69080;border-bottom:1px solid #e4c69080;padding:9px 0;font-weight:800}
.book-cover strong{font-size:26px;line-height:1.2;color:#fff7e6;letter-spacing:-.03em;overflow-wrap:anywhere}
.book-cover small{font-weight:650;font-size:10px;letter-spacing:.2em;opacity:.8}
.book-cover i{position:absolute;width:18px;height:26px;bottom:0;right:20px;background:#dca859;clip-path:polygon(0 0,100% 0,100% 100%,50% 72%,0 100%)}
.book-class-content{padding:19px 18px;min-width:0}
.book-class-top{display:flex;align-items:start;justify-content:space-between;gap:8px}
.book-class-top h3{font-size:21px;margin:3px 0 4px;color:#163553}
.book-class-top p{font-size:11px;color:#657b8b;margin:0}
.book-class-mark{font-size:10px;border-radius:99px;background:#edf5f5;color:#356976;padding:5px 9px;white-space:nowrap;font-weight:700}
.book-class-actions{display:flex;gap:7px;margin:20px 0 16px;flex-wrap:wrap}
.book-class-actions .btn{min-height:37px}
.book-recent{border-top:1px solid #e5ecef;padding-top:13px}
.book-recent-label{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:#688296;margin-bottom:8px}
.book-session-row{background:transparent;border:0;border-bottom:1px solid #edf1f3;display:flex;align-items:center;gap:8px;width:100%;padding:9px 0;text-align:left;min-width:0;color:#28465a}
.book-session-row:hover{background:#f1f8fa}
.book-session-date{font-weight:800;font-size:11px;white-space:nowrap}
.book-session-lesson{font-size:10px;color:#5c7486;flex:1;min-width:0}
.book-session-progress{font-size:10px;color:#566f7c;white-space:nowrap}
.book-status{font-size:9px;padding:4px 6px;border-radius:6px;font-weight:800;white-space:nowrap}
.book-status.closed{background:#e5f3ec;color:#236a4a}.book-status.open{background:#fff4df;color:#876225}
.book-chevron{font-size:19px;color:#6a9aae}
.book-more summary{cursor:pointer;font-size:11px;font-weight:700;color:#236781;padding:9px 0;list-style:none}
.book-more summary::-webkit-details-marker{display:none}
.book-bottom-note{text-align:center;font-size:11px;color:#6d7f8c;padding:18px}
.book-session-header{display:flex;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid #d4e4ea;border-radius:13px;background:#fff;padding:11px 15px;margin-bottom:14px;box-shadow:0 4px 20px #133c5310}
.book-session-title{display:flex;flex:1;flex-direction:column;min-width:180px}
.book-session-title strong{font-size:14px;color:#163b51}
.book-session-title span{font-size:11px;color:#628197}
.book-back{background:#edf4f7}
.book-end{background:#e7f2eb;border-color:#b9d6c3;color:#20573c;font-weight:800}
.book-end:hover{background:#d5ebda;border-color:#8ebc9d}.student-save-notice #finishAfterLast{margin-left:auto;align-self:center;white-space:nowrap}
.book-finish{max-width:760px;text-align:center;margin:24px auto 34px;border:1px solid #d9e6e6;border-radius:19px;background:linear-gradient(135deg,#fcfefe,#eef7f5);box-shadow:0 20px 50px #13395113;padding:44px 35px}
.book-finish-emblem{height:72px;width:72px;border-radius:50%;display:grid;place-items:center;margin:0 auto 17px;background:#dcefe4;border:2px solid #9bc7ad;color:#17633d;font-weight:900;font-size:29px}
.book-finish h2{margin:8px 0 6px;color:#173e50;font-size:25px}
.book-finish p{font-size:13px;color:#5b7481}
.book-finish-counters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px auto 13px;max-width:450px}
.book-finish-counters>div{border:1px solid #dae7e7;border-radius:11px;background:#fff;padding:15px 10px;display:flex;flex-direction:column;gap:4px}
.book-finish-counters strong{font-size:29px;color:#173553}
.book-finish-counters span{font-size:11px;color:#657e88}
.book-finish-note{font-size:11px!important;margin:14px 0 21px!important}
.book-finish-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.book-close-btn{background:#214c5a!important;border-color:#214c5a!important}
@media(max-width:1130px){.book-catalog{grid-template-columns:1fr}.book-cover{min-height:260px}.book-class{grid-template-columns:145px minmax(0,1fr)}}
@media(max-width:650px){.book-intro{flex-wrap:wrap;padding:17px;gap:16px}.book-intro .btn{margin-left:0}.book-intro h2{font-size:22px}.book-class{grid-template-columns:84px minmax(0,1fr)}.book-cover{padding:33px 5px 10px;min-height:280px;gap:10px}.book-cover span{font-size:7px}.book-cover strong{font-size:18px}.book-class-content{padding:13px 11px}.book-class-top{display:block}.book-class-mark{display:inline-block;margin-top:5px}.book-session-row{flex-wrap:wrap;gap:5px}.book-session-progress{white-space:normal}.book-session-lesson{flex:0 1 50px}.book-status{margin-left:auto}.book-session-header{gap:8px}.book-session-title{order:2;flex:1 1 100%}.book-finish{padding:23px 16px}}


/* V3.4 – valgt klasse og enkelt register i stedet for mange store bokkort */
.simple-book-header{max-width:1050px;margin:0 auto 14px;display:flex;align-items:center;gap:15px;border:1px solid #dce7ed;border-radius:16px;background:linear-gradient(115deg,#ffffff,#f4f9fa);padding:19px 22px;box-shadow:0 8px 27px #163b5611}
.simple-book-emblem{height:51px;width:45px;display:grid;place-items:center;border-radius:6px 11px 11px 6px;flex:none;border-left:5px solid #bb995d;background:#1e445b;color:#fff1ce;box-shadow:0 5px 12px #153e5720;font-size:17px;font-weight:850}
.simple-book-intro{flex:1;min-width:0}.simple-book-intro h2{font-size:24px;line-height:1.15;margin:3px 0 0;color:#163b53}
.simple-book-header .btn{white-space:nowrap}
.simple-book-card{max-width:1050px;margin:auto;background:#fff;border:1px solid #d6e3e9;border-radius:16px;overflow:hidden;box-shadow:0 12px 32px #173c5415;border-left:5px solid #be9b63}
.simple-class-select{padding:21px 25px 17px;display:flex;align-items:end;gap:20px;background:linear-gradient(180deg,#f9fcfd,#fff);border-bottom:1px solid #e4edf1}
.simple-class-select .field{max-width:390px;flex:1}
.simple-class-select select{font-size:16px;font-weight:800;height:46px;color:#123a54;background:#fff}
.simple-class-meta{color:#687f8f;font-size:12px;padding-bottom:13px;font-weight:650;flex:1}
.simple-book-sessions{padding:19px 25px 24px}
.simple-book-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:22px}
.simple-book-actions .btn{min-height:43px;padding:10px 16px;font-size:13px}
.simple-session-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #e5edf1}
.simple-session-heading h3{font-size:15px;margin:0;color:#1b3c55}
.simple-session-heading>span{font-size:11px;color:#678194}
.simple-session-list{display:flex;flex-direction:column}
.simple-session-row{display:flex;align-items:center;gap:16px;background:#fff;color:#193d56;border:0;border-bottom:1px solid #e8eff3;width:100%;padding:13px 12px;text-align:left;border-radius:7px;min-width:0}
.simple-session-row:hover,.simple-session-row:focus-visible{background:#f0f8fb;outline-offset:-2px}
.simple-session-date{font-size:12px;font-weight:800;white-space:nowrap;min-width:95px}
.simple-session-type{font-size:12px;flex:1;color:#587284;min-width:0}
.simple-session-count{font-size:11px;color:#60798b;white-space:nowrap}
.simple-session-arrow{font-size:21px;color:#5a9aac;line-height:1}
.simple-more{margin-top:11px}
.simple-book-empty{padding:32px 12px;text-align:center;color:#627c8d;font-size:13px;background:#f8fbfc;border-radius:10px}
@media(max-width:750px){.simple-book-header{padding:15px}.simple-book-intro h2{font-size:21px}.simple-class-select{display:block;padding:17px}.simple-class-select .field{max-width:none}.simple-class-meta{padding:8px 0 0}.simple-book-sessions{padding:17px}.simple-session-row{gap:9px;flex-wrap:wrap}.simple-session-date{min-width:auto}.simple-session-type{flex:1}.simple-session-count{margin-left:auto}.simple-book-header .btn{padding:7px 9px}}
@media(max-width:480px){.simple-session-count{margin-left:0}.simple-session-row .book-status{margin-left:auto}.simple-book-header .book-eyebrow{font-size:9px}.simple-book-emblem{width:37px;height:45px}}


/* V3.5 – ren bokforside + inne i boken. Ingen endring i vurderingsformat. */
#bookCoverView[hidden],#bookInsideView[hidden]{display:none!important}
.book-cover-stage{max-width:940px;margin:6px auto 0;display:grid;grid-template-columns:minmax(250px,.85fr) minmax(310px,1.15fr);gap:0;align-items:stretch;border-radius:20px;background:#fff;border:1px solid #d8e4e9;box-shadow:0 18px 52px #1c3f5820;overflow:hidden}
.book-cover-art{position:relative;min-height:460px;background:linear-gradient(125deg,#163a4d 0%,#204c60 58%,#1b4155 100%);color:#f8e9ca;margin:25px 0 25px 25px;border-radius:5px 16px 16px 5px;box-shadow:9px 9px 0 #c2d6de,14px 14px 16px #1a455633;border:1px solid #427084;overflow:hidden}
.book-cover-binding{position:absolute;inset:0 auto 0 0;width:28px;background:linear-gradient(90deg,#092b41,#17465b,#366479);box-shadow:3px 0 4px #09253644;border-right:1px solid #668492}
.book-cover-art-content{position:absolute;inset:58px 34px 64px 54px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:23px;border:1px solid #d7ad6b66}
.book-cover-art-content span{font-size:10px;letter-spacing:.20em;font-weight:800}
.book-cover-art-content strong{font-size:35px;line-height:1.12;font-family:Georgia,'Times New Roman',serif;letter-spacing:.015em;font-weight:600}
.book-cover-art-content small{font-size:10px;letter-spacing:.17em;font-weight:700}
.book-cover-rule{height:1px;background:#d7ad6b99;width:72%}
.book-cover-ribbon{position:absolute;bottom:-4px;right:22px;background:#d3a35c;width:22px;height:55px;clip-path:polygon(0 0,100% 0,100% 100%,50% 76%,0 100%)}
.book-cover-select{padding:56px 46px 48px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:17px}
.book-cover-select h2{margin:0 0 8px;color:#16384f;font-size:29px;letter-spacing:-.03em}
.book-cover-select .field{margin-bottom:0}
.book-cover-select .field select{font-size:17px;font-weight:800;min-height:49px}
.book-cover-submeta{font-size:12px;color:#668092;min-height:18px}
.book-open-action{font-size:14px;min-height:48px;margin-top:4px;justify-content:space-between}
.book-new-class{width:max-content;min-height:28px;align-self:center}
#bookInsideView{max-width:1140px;margin:0 auto}
.inside-book-head{display:flex;align-items:center;gap:20px;padding:23px 25px;border-radius:16px 16px 0 0;background:linear-gradient(110deg,#edf6f9,#fff);border:1px solid #d7e4ea;border-bottom:0}
.inside-book-identity{flex:1;min-width:0;text-align:center}.inside-book-identity h2{font-size:27px;color:#173e58;margin:2px 0 2px;line-height:1.15}.inside-book-identity #insideBookMeta{color:#637e91;font-size:12px}
.inside-close-book{white-space:nowrap}
.inside-book-tools{display:flex;gap:9px;align-items:center;justify-content:flex-end;padding:12px 25px;background:#fff;border:1px solid #d7e4ea;border-top:1px solid #e3edf2;border-bottom:1px solid #e3edf2}
.inside-book-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.92fr);gap:16px;align-items:start;background:#f3f8fb;padding:20px;border-radius:0 0 16px 16px;border:1px solid #d7e4ea;border-top:0}
.inside-new-session,.inside-old-sessions{box-shadow:0 5px 20px #123b5510;padding:22px 20px;min-width:0}
.inside-new-session h3,.inside-old-sessions h3{font-size:16px;margin:0 0 20px;color:#163b54}
.inside-session-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 12px}
.inside-session-selector,.inside-session-task{grid-column:1/-1}
.inside-session-form .field label,.inside-session-form .form-label{color:#4e6e84;font-size:11px;font-weight:800}
.inside-session-picks{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:6px}
.inside-session-picks label{position:relative;cursor:pointer}
.inside-session-picks input{position:absolute;opacity:0;pointer-events:none}
.inside-session-picks span{display:flex;align-items:center;justify-content:center;padding:8px 13px;min-width:42px;min-height:38px;border:1px solid #d5e2eb;border-radius:9px;font-weight:800;color:#496780;background:#f9fbfd;font-size:12px}
.inside-session-picks input:checked+span{background:#e5f4fa;border-color:#3a91b6;color:#0c5e83}
.inside-session-picks input:focus-visible+span{outline:2px solid #287ba4;outline-offset:2px}
.inside-session-picks .day-checkbox span{min-width:116px}
.inside-session-bottom{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:18px}
#newSessionConflict{font-size:11px;color:#91651d;line-height:1.4;flex:1;min-width:180px}
.inside-list-head{display:flex;justify-content:space-between;gap:8px;align-items:center;border-bottom:1px solid #e2edf2;padding-bottom:13px}.inside-list-head h3{margin:0}.inside-list-head span{font-size:11px;color:#72869a}
.inside-session-list{padding-top:8px}.inside-session-list .simple-session-row{display:grid;grid-template-columns:minmax(78px,1fr) minmax(95px,1.15fr) auto;row-gap:7px;column-gap:8px}
.inside-session-list .simple-session-row .simple-session-count{grid-column:2}.inside-session-list .simple-session-row .book-status{grid-column:3;grid-row:1}.inside-session-list .simple-session-row .simple-session-arrow{grid-column:3;grid-row:2;font-size:16px}
.inside-book-grid .simple-book-empty{padding:20px 8px}
@media(max-width:970px){.inside-book-grid{grid-template-columns:1fr}.inside-session-list .simple-session-row{display:flex}.inside-session-list .simple-session-row .simple-session-count{margin-left:auto}}
@media(max-width:700px){.book-cover-stage{grid-template-columns:1fr;max-width:460px}.book-cover-art{min-height:235px;margin:18px 24px 6px}.book-cover-art-content{inset:24px 30px 25px 46px;gap:12px}.book-cover-art-content strong{font-size:27px}.book-cover-select{padding:27px 28px 32px}.inside-book-head{flex-wrap:wrap;gap:10px;justify-content:space-between}.inside-book-identity{order:-1;flex-basis:100%}.inside-book-tools{flex-wrap:wrap;justify-content:flex-start}.inside-book-grid{padding:12px}.inside-new-session,.inside-old-sessions{padding:17px}}
@media(max-width:420px){.inside-session-form{grid-template-columns:1fr}.inside-session-selector,.inside-session-task{grid-column:auto}.inside-session-list .simple-session-row{gap:8px;flex-wrap:wrap}}


/* V3.6: tett, tydelig struktur inne i vurderingsboken. All datalogikk beholdes. */
#bookInsideView{max-width:1180px}
.inside-book-head{padding:15px 21px;gap:12px;align-items:center;background:linear-gradient(110deg,#f2f8fb,#fff);border-radius:14px 14px 0 0}
.inside-book-identity{flex:1 1 auto;min-width:0;text-align:left}
.inside-book-identity .book-eyebrow{font-size:9px;letter-spacing:.11em}
.inside-book-identity h2{font-size:23px;margin:2px 0 0}
.inside-book-identity #insideBookMeta{font-size:11px}
.inside-book-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.inside-close-book{white-space:nowrap;background:#eaf3f7;border-color:#c9dce6}
.inside-admin-menu{position:relative;z-index:5}
.inside-admin-menu>summary{list-style:none;display:flex;gap:7px;align-items:center;cursor:pointer;background:#fff;border:1px solid #d3e2ea;border-radius:9px;padding:9px 12px;font-size:11px;font-weight:800;color:#30536c;min-height:36px;white-space:nowrap}
.inside-admin-menu>summary::-webkit-details-marker{display:none}
.inside-admin-menu>summary span{font-size:13px;color:#6f8494}
.inside-admin-menu[open]>summary{background:#e9f4fa;border-color:#9bc7d9}
.inside-admin-menu[open]>summary span{transform:rotate(180deg)}
.inside-book-top-actions .inside-book-tools{position:absolute;top:calc(100% + 7px);right:0;z-index:8;display:flex;flex-direction:column;align-items:stretch;gap:7px;background:#fff;box-shadow:0 15px 36px #193e5a30;border:1px solid #d3e2ea;border-radius:12px;padding:12px;min-width:205px;white-space:nowrap}
.inside-book-top-actions .inside-book-tools .btn{justify-content:flex-start;width:100%}
.inside-book-grid{grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;background:#f4f8fa;border-radius:0 0 14px 14px}
.inside-new-session,.inside-old-sessions{padding:16px 18px;box-shadow:0 3px 13px #163b5510;border-radius:11px}
.inside-new-session h3,.inside-old-sessions h3{font-size:15px;margin:0 0 12px}
.inside-session-form{grid-template-columns:minmax(175px,.8fr) minmax(150px,.7fr) minmax(215px,1fr);gap:10px 14px;align-items:end}
.inside-session-selector{grid-column:1/3;align-self:start}
.inside-session-task{grid-column:3;align-self:start}
.inside-session-form .field label,.inside-session-form .form-label{font-size:11px}
.inside-session-form .field select,.inside-session-form .field input{min-height:37px}
.inside-session-picks{margin-top:4px;gap:6px}
.inside-session-picks span{padding:6px 10px;min-height:37px;min-width:39px}
.inside-session-picks .day-checkbox span{min-width:111px}
.inside-session-bottom{margin-top:12px;display:flex;justify-content:flex-start;gap:12px}
#startBookSession{padding:9px 19px;min-height:38px}
.inside-list-head{padding-bottom:8px}
.inside-list-head h3{margin:0}
.inside-session-list{padding-top:4px}
.inside-session-list .simple-session-row{display:flex;align-items:center;gap:14px;padding:10px 12px;border-radius:6px;flex-wrap:wrap}
.inside-session-list .simple-session-row .simple-session-date{min-width:90px}
.inside-session-list .simple-session-row .simple-session-type{flex:1}
.inside-session-list .simple-session-row .simple-session-count{grid-column:auto;margin-left:auto;white-space:nowrap}
.inside-session-list .simple-session-row .book-status{grid-column:auto;grid-row:auto}
.inside-session-list .simple-session-row .simple-session-arrow{grid-column:auto;grid-row:auto}
.inside-book-grid .simple-book-empty{padding:16px 12px;text-align:left;min-height:auto}
@media(max-width:900px){
 .inside-session-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .inside-session-form>.field:nth-child(3){grid-column:1/3}
 .inside-session-selector,.inside-session-task{grid-column:1/3}
 .inside-book-head{flex-wrap:wrap}
}
@media(max-width:600px){
 .inside-book-top-actions{gap:6px}
 .inside-book-identity{flex-basis:100%}
 .inside-book-head{padding:13px 14px}
 .inside-book-grid{padding:9px}
 .inside-new-session,.inside-old-sessions{padding:14px 13px}
 .inside-book-top-actions{justify-content:flex-start;width:100%}
 .inside-book-top-actions .inside-book-tools{left:0;right:auto}
 .inside-session-form{grid-template-columns:1fr}
 .inside-session-form>.field:nth-child(3),.inside-session-selector,.inside-session-task{grid-column:1}
 .inside-session-list .simple-session-row{gap:8px}
}


/* V3.7 – én klasse gjennom hele vurderingsboken. Bokomslag uten faner. */
#bookTabs[hidden],#bookContextBar[hidden]{display:none!important}
.book-context-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 15px 11px 14px;margin:0 0 9px;background:linear-gradient(110deg,#173553,#244f66);color:#fff;border:1px solid #2b5970;border-radius:14px;box-shadow:0 6px 18px rgba(14,48,70,.12)}
.book-context-identity{display:flex;gap:11px;align-items:center;min-width:0}
.book-context-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,#2c8fa1,#29627a);font-size:14px;font-weight:800;color:#fff;flex:none}
.book-context-eyebrow{font-size:9px;font-weight:800;letter-spacing:.12em;color:#b6dfe9}
.book-context-name{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.book-context-name strong{font-size:18px;line-height:1.22;letter-spacing:-.01em;color:#fff}
.book-context-name span{font-size:11px;color:#d0e4ec}
.book-context-actions{display:flex;align-items:center;gap:8px;flex:none}
.book-context-actions .btn{border-color:#54748c;background:rgba(255,255,255,.12);color:#fff}
.book-context-actions .btn:hover{background:rgba(255,255,255,.23)}
.book-context-actions .context-close{background:#fff;color:#173553;border-color:#fff}
#bookTabs{width:max-content;margin-bottom:16px;flex-wrap:wrap}
#bookTabs .tab{white-space:nowrap}
/* Skjul dupliserte klassevalg inne i boken: bokvalget gjøres bare på forsiden. */
#registerView .meta-class,#assessmentsView .assessment-sidebar > .field:has(#testClass),#teacherView .sidefilters > .field:has(#teacherClass){display:none!important}
/* Klasseidentiteten står nå i toppstripen, så vi unngår dobbelt klasseoverskrift. */
#bookInsideView .inside-book-identity{display:none!important}
#bookInsideView .inside-book-head{justify-content:flex-end;padding:9px 10px 6px;min-height:0;border:0;box-shadow:none;background:transparent}
#bookInsideView .inside-book-top-actions{margin:0}
/* Registreringssiden har allerede sin egen Til vurderingsboken-knapp. */
#bookInsideView #closeFromInside{display:none!important}
@media(max-width:900px){.book-context-bar{align-items:flex-start}.book-context-name{gap:4px;flex-direction:column;align-items:flex-start}#bookTabs{width:100%}.book-context-actions{flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:600px){.book-context-bar{flex-direction:column;align-items:stretch;gap:10px}.book-context-actions{width:100%}.book-context-actions .btn{flex:1}.book-context-name span{font-size:10px}#bookTabs{gap:3px}#bookTabs .tab{padding:9px 11px;font-size:12px}}


/* V3.8 – sammenlagte fagpaneler ved åpning av lærerside og prøver/oppgaver */
.bookfold{margin:10px 0;border:1px solid #dce8ef;border-radius:11px;background:#fff;overflow:hidden}
.bookfold-summary{list-style:none;display:flex;align-items:center;gap:12px;cursor:pointer;padding:15px 16px;background:linear-gradient(110deg,#f5f9fc,#fff);min-height:56px}
.bookfold-summary::-webkit-details-marker{display:none}
.bookfold-summary:hover{background:#eff7fb}
.bookfold[open]>.bookfold-summary{border-bottom:1px solid #dce8ef;background:#edf6fa}
.bookfold-heading{font-size:14px;font-weight:800;color:#173553;flex:1;min-width:0}
.bookfold-extra{font-size:11px;color:#54768b;font-weight:650;line-height:1.5;text-align:right}
.bookfold-arrow{font-size:17px;font-weight:700;color:#65839a;transition:transform .15s}
.bookfold[open]>.bookfold-summary .bookfold-arrow{transform:rotate(180deg)}
.bookfold-body{padding:15px 16px}
.bookfold-assessment{margin:0}
#assessmentEditor:has(.bookfold-assessment){min-height:0;padding:12px}
.bookfold-assessment .assessment-editor-head{justify-content:flex-end;margin-bottom:10px}
.bookfold-assessment .assessment-editor-head h2{display:none}
.teacher-bookfold .teacher-banner{margin:0}
.teacher-bookfold .teacher-evidence{margin-bottom:0}
.teacher-bookfold .teacher-mark{margin:0}
.teacher-bookfold .teacher-table{margin-top:0}
.teacher-bookfold .teacher-report-link{margin:0}
.bookfold-toolbar{display:flex;gap:8px;justify-content:flex-end;margin:2px 0 12px}
.teacher-filter-panel{border:1px solid #deebf1;border-radius:10px;background:#f8fbfd;overflow:hidden}
.teacher-filter-panel>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:12px;font-weight:750;padding:10px 12px;color:#285a79}
.teacher-filter-panel>summary::-webkit-details-marker{display:none}
.teacher-filter-panel>summary span{color:#7391a5;transition:transform .15s}
.teacher-filter-panel[open]>summary{background:#edf6fa;border-bottom:1px solid #dce8ef}
.teacher-filter-panel[open]>summary span{transform:rotate(180deg)}
.teacher-filter-panel-body{display:flex;flex-direction:column;gap:12px;padding:12px}
.teacher-filter-panel-body .small-muted{margin:0}
@media(max-width:650px){.bookfold-summary{padding:12px}.bookfold-extra{font-size:10px;max-width:45%}.bookfold-body{padding:12px}}


/* V3.9 – kompakt lærerside, samme lagrings- og vurderingslogikk */
#teacherView .teacher-layout{grid-template-columns:246px minmax(0,1fr);gap:13px}
#teacherView .sidefilters{padding:14px;gap:11px;align-self:start}
#teacherView .teacher-page-head{margin-bottom:1px}
#teacherView .teacher-term-quick select{min-height:36px}
#teacherView .teacher-filter-panel>summary{padding:9px 11px}
#teacherView .teacher-roster-heading{display:flex;justify-content:space-between;align-items:center;padding:4px 1px 2px;color:var(--navy);font-size:12px}
#teacherView .teacher-class-table{max-height:470px;gap:3px}
#teacherView .teacher-student{min-height:32px;padding:6px 9px;border-radius:7px}
#teacherView .teacher-student.current{border-left:3px solid #268eab;padding-left:7px}
#teacherView .teacher-settings{border-top:1px solid #e1ebf0;padding-top:8px;margin-top:3px}
#teacherView .teacher-settings>summary{font-size:11px;color:#607e95;cursor:pointer;font-weight:700;list-style:none}
#teacherView .teacher-settings>summary::-webkit-details-marker{display:none}
#teacherView .teacher-settings>summary:before{content:'⚙ ';font-size:12px}
#teacherView .teacher-settings>div{padding-top:8px}
#teacherView .content-card{padding:18px 20px;min-height:0}
#teacherView .teacher-opt-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}
#teacherView .teacher-opt-header .content-title{margin:0;font-size:20px}
#teacherView .teacher-opt-header .content-intro{margin:2px 0 0;font-size:11px}
#teacherView .teacher-opt-header .btn{white-space:nowrap}
#teacherView .teacher-glance{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #d8e7ef;background:#f8fbfd;border-radius:11px;margin-bottom:8px}
#teacherView .teacher-glance-status{display:flex;flex-direction:column;gap:2px;min-width:170px}
#teacherView .teacher-glance-status>span{font-size:10px;color:#607b90;font-weight:700}
#teacherView .teacher-glance-status>strong{font-size:16px;color:var(--navy);line-height:1.3}
#teacherView .teacher-glance-figures{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
#teacherView .teacher-glance-figures>div{display:flex;flex-direction:column;align-items:center;min-width:68px}
#teacherView .teacher-glance-figures strong{font-size:16px;color:var(--navy);font-variant-numeric:tabular-nums}
#teacherView .teacher-glance-figures span{font-size:10px;color:#71869a;text-align:center;white-space:nowrap}
#teacherView .bookfold-toolbar{margin:0 0 10px;gap:6px}
#teacherView .teacher-fold-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#teacherView .teacher-bookfold{margin:0;min-width:0}
#teacherView .teacher-bookfold[open],#teacherView .teacher-bookfold:last-child{grid-column:1/-1}
#teacherView .bookfold-summary{min-height:52px;padding:11px 13px;gap:7px}
#teacherView .bookfold-heading{font-size:12.5px;line-height:1.3}
#teacherView .bookfold-extra{font-size:10px}
#teacherView .bookfold-body{padding:13px}
#teacherView .teacher-bookfold .teacher-banner .big{font-size:23px}
@media(max-width:1050px){#teacherView .teacher-fold-grid{grid-template-columns:1fr}}
@media(max-width:760px){#teacherView .teacher-layout{grid-template-columns:1fr}#teacherView .teacher-glance{align-items:stretch;flex-direction:column}#teacherView .teacher-glance-figures{justify-content:space-between}#teacherView .teacher-opt-header{flex-wrap:wrap}}


/* V3.10 – skoleårsbøker, enkel elevvelger og innstillinger */
.app-settings-btn{white-space:nowrap;border-color:#c7dce6}
.settings-dialog .settings-menu{display:grid;gap:9px;margin:16px 0}
.settings-dialog .settings-menu .btn{justify-content:flex-start;text-align:left}
.recovery-code{background:#eaf3f7;border:1px solid #c8dce7;border-radius:10px;padding:17px 12px;text-align:center;font-family:ui-monospace,Consolas,monospace;font-size:19px;font-weight:800;letter-spacing:1.4px;color:#163b54;margin:15px 0;overflow-wrap:anywhere}
.forgot-pin-link{display:block;margin-top:8px;font-size:11px}
.book-empty-select{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-height:290px;text-align:center;color:#6d8396;background:linear-gradient(145deg,#fcfeff,#f4f9fc);border:1px dashed #d6e5ee;border-radius:12px;padding:25px}
.book-empty-select strong{font-size:20px;color:#23445f}
.book-empty-select span{font-size:12px}
.book-empty-icon{height:45px;width:45px;border-radius:13px;display:grid;place-items:center;background:#e5f1f7;color:#2d6e87;font-size:23px}
.report-filter-panel{border:1px solid #dce8ef;border-radius:9px;overflow:hidden}
.report-filter-panel>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px 12px;cursor:pointer;color:#315876;font-size:12px;font-weight:800;background:#f6fafc}
.report-filter-panel>summary::-webkit-details-marker{display:none}
.report-filter-panel[open]>summary{border-bottom:1px solid #dce8ef}
.report-filter-panel-body{display:grid;gap:12px;padding:12px}
#teacherView .teacher-settings{display:none}
#teacherView .teacher-layout{grid-template-columns:235px minmax(0,1fr)}
#teacherView .sidefilters{gap:13px}
#teacherView .teacher-opt-header .content-intro{margin-top:4px}
#bookCoverYear{font-size:10px}
@media(max-width:700px){#teacherView .teacher-layout{grid-template-columns:1fr}.mast-actions{align-items:center;gap:5px}.app-settings-btn{min-height:35px}}


/* V3.11 — oversikt er innholdsfortegnelse; opprettelse skjer kun i Registrer økt. */
#registerDraftView[hidden],#registerSessionHeader[hidden]{display:none!important}
#bookInsideView .inside-book-grid{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding-top:6px}
#bookInsideView .inside-book-grid>.book-dashboard,#bookInsideView .inside-book-grid>.inside-old-sessions{width:100%;max-width:none;align-self:stretch}
#bookInsideView .book-dashboard{padding:19px 22px;border-radius:13px}
.book-dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.book-dashboard-head h2{margin:0 0 3px;color:#193e58;font-size:19px;letter-spacing:-.02em}
.book-dashboard-head p{margin:0;color:#718599;font-size:12px}
.book-create-btn{min-width:132px}
.book-dashboard-stats{display:grid;grid-template-columns:repeat(3,minmax(105px,160px));gap:10px;margin-top:15px}
.book-dashboard-stats>div{background:#f4f9fc;border:1px solid #e0ebf1;border-radius:10px;padding:12px 15px;display:flex;flex-direction:column;gap:1px}
.book-dashboard-stats strong{font-size:23px;color:#183f5a;font-variant-numeric:tabular-nums;line-height:1.2}
.book-dashboard-stats span{font-size:11px;color:#647f94}
#bookInsideView .inside-old-sessions{padding:18px 22px}
#bookInsideView .inside-session-list{padding-top:5px}
#registerDraftView{max-width:1150px;margin:0 auto}
.book-draft-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;color:#607f94;font-size:12px;font-weight:650}
#registerDraftView .inside-new-session{padding:20px 23px}
#registerDraftView .inside-session-form{margin-top:12px}
@media(max-width:680px){.book-dashboard-head{align-items:stretch}.book-create-btn{width:100%}.book-dashboard-stats{gap:6px}.book-dashboard-stats>div{padding:11px 8px}.book-dashboard-stats strong{font-size:19px}.book-dashboard-stats span{font-size:10px}#bookInsideView .book-dashboard,#bookInsideView .inside-old-sessions{padding:15px}#registerDraftView .inside-new-session{padding:16px}.book-draft-top{flex-wrap:wrap}}


/* V3.12 – diskret sideblading i vurderingsboken, valgfritt skoleår uten tidsbegrenset liste */
.book-page-nav{display:flex;gap:6px;align-items:center;min-width:0;border:1px solid #8caaba66;border-radius:9px;padding:3px 5px;background:#ffffff13}
.book-page-arrow{font-size:20px!important;line-height:1!important;width:34px;min-width:34px;min-height:31px!important;padding:3px!important;font-weight:800!important}
.book-page-arrow:disabled{opacity:.4}
.book-page-indicator{font-size:11px;font-weight:750;min-width:166px;max-width:210px;text-align:center;color:#f3f8fa;white-space:nowrap}
.school-year-preview{font-size:12px;color:#25637f;font-weight:750;padding-top:3px}
@media(max-width:900px){.book-page-nav{width:max-content}.book-page-indicator{min-width:145px}.book-context-actions{justify-content:flex-end}}
@media(max-width:600px){.book-page-nav{width:100%;justify-content:space-between}.book-page-indicator{flex:1;min-width:0}.book-context-actions{flex-wrap:wrap}.book-context-actions>#bookOverviewBtn,.book-context-actions>#bookCloseBtn{flex:1}}


/* V3.14 – enklere lagre/åpne-knapper og mobiltilpasset vurderingsbok */
.mast-actions{align-items:center}
.mast-actions .save-current{background:#20596f;border-color:#20596f}
.mast-actions .save-current:hover{background:#16465a}
.json-save-feedback{flex-basis:100%;text-align:right;font-size:10px;line-height:1.25;color:#6a8192;font-weight:650}
.json-save-feedback.is-unsaved{color:#99631a}
.json-save-feedback.is-saved{color:#24735b}
.settings-storage-info{border:1px solid #dce7ef;background:#f6fafc;border-radius:9px;padding:9px 12px;color:#435e70;font-size:12px}
.settings-storage-info summary{cursor:pointer;font-weight:750;color:#285978}
.settings-storage-info p{margin:9px 0 0;line-height:1.5}
@media(max-width:780px){
 .app-shell{padding:12px 10px 24px}
 .masthead{gap:12px;margin-bottom:12px}
 .mast-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .mast-actions>.btn{font-size:12px;min-height:44px;padding:8px 6px;max-width:none;white-space:nowrap}
 .mast-actions>.json-save-feedback{grid-column:1/-1;text-align:center;min-height:15px}
 .tabs{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-wrap:nowrap!important;scrollbar-width:thin;scroll-snap-type:x proximity;gap:4px;padding:5px;justify-content:flex-start}
 .tabs .tab{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:10px 12px;scroll-snap-align:start}
 .book-context-bar{min-width:0}
 .book-context-actions{min-width:0}
 .book-page-indicator{font-size:11px}
 .roster-list{max-height:225px}
 .card,.content-card,.secondary-layout,.detail{min-width:0}
 .assessment-student-grid{min-width:500px}
 #assessmentEditor{overflow-x:auto}
 input[type=text],input[type=date],input[type=number],select,textarea{font-size:16px}
 .btn,button{touch-action:manipulation}
 .review-switcher,.action-footer,.pager-actions{max-width:100%}
 .book-draft-top{flex-wrap:wrap}
}
@media(max-width:430px){
 .mast-actions>.btn{font-size:11px}
 .book-page-nav{min-width:0;width:100%}
 .book-page-arrow{min-width:38px;min-height:40px!important}
 .book-page-indicator{min-width:0;white-space:normal}
 .book-dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
 .book-dashboard-stats span{overflow-wrap:anywhere}
 .detail-head-actions{flex-wrap:wrap;justify-content:flex-start}
 .pager-actions .btn{min-height:42px}
 .rating{overflow-x:auto;scrollbar-width:thin}
 .rate{min-width:55px}
 .book-cover-stage{max-width:100%;min-width:0}
}


/* V3.15 – lukk hver underside og gå tilbake til bokoversikten. */
.book-page-exit[hidden]{display:none!important}
.book-page-exit{position:sticky;top:0;z-index:8;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px 7px 16px;margin:-3px 0 14px;border:1px solid #d8e5ed;background:rgba(246,250,252,.98);box-shadow:0 3px 12px rgba(21,54,80,.08);border-radius:11px;backdrop-filter:blur(8px)}
.book-page-exit-title{font-weight:750;color:#294f6a;font-size:12px;overflow-wrap:anywhere}
.book-page-exit-btn{flex:none;border-color:#b6cfdd!important;background:#fff!important;color:#224967!important;min-height:34px;padding:6px 12px!important}
.book-page-exit-btn:hover{background:#e9f3f8!important;border-color:#689bb5!important}
.book-page-exit-btn>span{font-size:20px;font-weight:500;line-height:12px;margin-right:2px}
@media(max-width:640px){.book-page-exit{padding:7px 9px;min-height:48px;margin-bottom:10px}.book-page-exit-title{font-size:11px}.book-page-exit-btn{min-height:39px!important}}


/* V3.16: Bedre kommentargrupper og enhetlig lagring/lukking. */
.student-save-notice{margin:8px 18px 0;padding:6px 10px;gap:8px;border-radius:8px;background:#f2f9f6;box-shadow:none}
.student-save-notice>div{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px}
.student-save-notice .student-save-check{width:24px;height:24px;font-size:13px}
.student-save-notice strong,.student-save-notice span:not(.student-save-check){font-size:11px}

.book-bottom-actions[hidden]{display:none!important}
.book-bottom-actions{margin-top:18px;background:#f9fcfd;border:1px solid #cbdfea;border-radius:13px;padding:15px 17px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;box-shadow:0 5px 16px #2149620d}
.book-bottom-hint{display:flex;flex-direction:column;gap:3px;min-width:200px}
.book-bottom-hint strong{font-size:13px;color:#183f59}
.book-bottom-hint span{font-size:11px;color:#647e90}
.book-bottom-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.book-bottom-buttons .btn{min-height:40px}
.quick-picker-groups{grid-template-columns:1fr!important;gap:6px!important;padding:9px!important}
.quick-tag-group{border:1px solid #dce8ee;border-radius:9px;background:#fbfdfe;overflow:hidden}
.quick-tag-group>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;padding:10px 12px;color:#2b5972;font-size:12px;font-weight:750}
.quick-tag-group>summary::-webkit-details-marker{display:none}
.quick-tag-group>summary>span:last-child{margin-left:6px;font-size:12px;color:#7291a5}
.quick-group-count{margin-left:auto;font-weight:750;color:#177d79;font-size:11px}
.quick-group-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 13px;padding:10px 12px;border-top:1px solid #e3edf2;background:#fff}
.record-options-menu.record-options-expanded{width:min(490px,calc(100vw - 48px));padding:12px;max-width:90vw}
.record-options-menu.record-options-expanded .shared-note{margin:0 0 10px}
.record-options-menu.record-options-expanded .shared-note-body textarea{min-height:75px}
@media(max-width:700px){.book-bottom-actions{flex-direction:column;align-items:stretch;padding:12px}.book-bottom-buttons{display:grid;grid-template-columns:1fr 1fr}.book-bottom-buttons #bottomBack{grid-column:1 / -1}.quick-group-options{grid-template-columns:1fr}}


/* V3.17: hurtigavkryssinger uten undermenyer + enkel lukking */
.quick-rated-form{gap:10px;padding:15px}
.quick-rated-form .quick-subheading{color:#667f90;font-size:11px;margin-top:-6px}
.quick-rated-layout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start}
.quick-rated-group{border:1px solid #dce7ed;border-radius:10px;overflow:hidden;background:#fff}
.quick-rated-head{display:flex;align-items:center;justify-content:space-between;padding:10px 11px;font-size:12px;background:#f4f8fa}
.quick-rated-group.level-under .quick-rated-head{background:#fff0eb;color:#9b5144}
.quick-rated-group.level-expected .quick-rated-head{background:#e9f4fa;color:#195c80}
.quick-rated-group.level-over .quick-rated-head{background:#e9f6f0;color:#237252}
.quick-rated-options{padding:5px 8px;display:grid;gap:2px}
.quick-rated-option{display:flex;align-items:center;gap:7px;padding:7px 6px;border:1px solid transparent;border-radius:6px;font-size:11px;line-height:1.33;cursor:pointer}
.quick-rated-option:hover{background:#f4f8fa}
.quick-rated-option.chosen{background:#edf7fb;border-color:#a7cfe1}
.quick-rated-option input{width:17px;height:17px;flex:none;accent-color:#1b7798}
.quick-prior{border:1px solid #dfe8ee;border-radius:8px;padding:8px 11px}
.quick-prior summary{font-size:11px;font-weight:750;cursor:pointer}
.rated-history-under{border-color:#efcbca;background:#fff2ef}
.rated-history-expected{border-color:#cae3f0;background:#edf7fc}
.rated-history-over{border-color:#c6e2d6;background:#edf8f1}
.mast-actions .btn[hidden]{display:none!important}
.simple-close-footer{justify-content:space-between;gap:14px}
.simple-close-footer .book-bottom-hint{font-size:11px;color:#637d8d}
@media(max-width:950px){.quick-rated-layout{grid-template-columns:1fr}.quick-rated-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.quick-rated-options{grid-template-columns:1fr}.simple-close-footer{flex-direction:column;align-items:stretch}}


/* V3.20: «Åpne boken» på forsiden; Åpne, Lagre og Lagre som i åpen bok */
.json-save-feedback[hidden]{display:none!important}
.settings-file-section{border:1px solid #d9e8ef;background:#f4f9fc;border-radius:10px;padding:13px;margin:13px 0;display:flex;flex-direction:column;gap:8px}
.settings-file-section>strong{font-size:13px;color:#244962}
.settings-file-section>.btn{justify-content:flex-start;text-align:left;white-space:normal}
.settings-file-section>p{margin:0;font-size:11px;line-height:1.45;color:#5e7488}


/* V3.20 – filkontroller samlet i bokens toppfelt */
.mast-actions .btn.open-current{background:#ffffff16;border-color:#ffffff55;color:#fff}
.mast-actions .btn.open-current:hover{background:#ffffff2d;border-color:#ffffff8b}
@media(max-width:780px){.mast-actions .open-current{order:2}.mast-actions .save-current{order:3}.mast-actions .save-as{order:4}.mast-actions .app-settings-btn{order:1}.mast-actions .json-save-feedback{order:5}}


/* V3.28 – én stabil navigasjon, med fysisk reserverte sidemarger.
   På PC ligger pilene alltid i de reserverte 43px brede margene,
   aldri over et vurderingsskjema eller en ramme.
   På smalere vinduer vises egen navigasjonsrad i vanlig dokumentflyt. */
.book-paper{position:relative;min-width:0}
.book-context-page-indicator{font-size:11px;font-weight:760;color:#dcebf2;padding:8px 10px;border:1px solid #ffffff30;border-radius:8px;white-space:nowrap}
#bookSideNav[hidden]{display:none!important}
.book-side-text{display:none!important}
.book-side-arrow{color:#3b7189;touch-action:manipulation;cursor:pointer;font-weight:650}
.book-side-arrow:focus-visible{outline:3px solid #1a8cad;outline-offset:3px}
.book-side-arrow:disabled{opacity:.30!important;cursor:default}
.book-side-arrow>span[aria-hidden]{font-size:22px;line-height:1}
@media(min-width:1200px){
  #bookPaper.book-open-page{padding-inline:43px!important}
  #bookSideNav.book-side-nav{
    position:fixed!important;inset:0!important;z-index:25!important;
    display:block!important;width:100vw!important;height:100vh!important;
    padding:0!important;margin:0!important;border:0!important;
    background:transparent!important;pointer-events:none!important;overflow:visible!important;
  }
  #bookSideNav.nav-culled{visibility:hidden!important}
  #bookSideNav .book-side-arrow{
    position:fixed!important;top:var(--nav-gutter-y,65vh)!important;
    box-sizing:border-box!important;transform:translateY(-50%)!important;
    width:21px!important;min-width:21px!important;height:34px!important;min-height:34px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    margin:0!important;padding:0!important;
    border:1px solid #bdd3dc!important;border-radius:5px!important;
    background:#f1f8fbe6!important;box-shadow:none!important;
    pointer-events:auto!important;opacity:.82!important;
  }
  #bookSideNav .book-side-prev{left:var(--nav-gutter-left,35px)!important;right:auto!important}
  #bookSideNav .book-side-next{right:var(--nav-gutter-right,35px)!important;left:auto!important}
  #bookSideNav .book-side-arrow:hover:not(:disabled){opacity:1!important;background:#d9edf6!important}
  #bookSideNav .book-side-indicator{display:none!important}
}
@media(max-width:1199px){
  #bookPaper.book-open-page{padding-inline:0!important}
  #bookSideNav.book-side-nav{
    position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:8px!important;width:100%!important;height:auto!important;min-height:44px!important;
    padding:4px 6px!important;margin:0 0 9px!important;
    border:1px solid #e0eaf0!important;border-radius:9px!important;
    background:#f7fbfd!important;box-shadow:none!important;
    pointer-events:auto!important;
  }
  #bookSideNav .book-side-arrow{
    position:static!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;
    box-sizing:border-box!important;transform:none!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;
    border:1px solid #bdd3dc!important;border-radius:7px!important;
    background:#fff!important;box-shadow:none!important;padding:0!important;margin:0!important;
    opacity:1!important;pointer-events:auto!important;
  }
  #bookSideNav .book-side-indicator{display:block!important;text-align:center;color:#58758a;font-size:11px;font-weight:750}
}
@media print{#bookSideNav{display:none!important}}


/* V3.31: Bevisst deling fra lærersiden til elevrapport, uten å endre andre felter. */
.teacher-mark{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.teacher-comment-field{grid-column:1/-1}
.teacher-share-label{display:flex;align-items:flex-start;gap:9px;font-weight:650!important;color:#254862!important;font-size:12px;margin:10px 0 4px;cursor:pointer}
.teacher-share-label input{width:17px;height:17px;flex-shrink:0;margin:0;accent-color:#15577b}
.teacher-student-feedback{padding:14px 16px;margin:13px 0;border-radius:11px;background:#f7fafc;border:1px solid #d7e6ec}
.teacher-student-feedback h3{font-size:14px;margin:0 0 8px;color:#163b53}
.teacher-feedback-level{font-size:12px;margin:0 0 8px}
.teacher-feedback-level span{color:#647c8b}
.teacher-feedback-comment{white-space:pre-wrap;font-size:13px;line-height:1.6;margin:0;color:#213d52}
@media(max-width:700px){.teacher-mark{grid-template-columns:1fr}.teacher-comment-field{grid-column:1}}


/* V3.32 – bokhylle. Samme datafil kan inneholde flere fag. */
#bookSideNav[hidden]{display:none!important} /* Pilene skjules alltid på bokhyllen */
.book-shelf-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:260px;overflow:auto;margin:10px 0 14px;padding:1px 2px 3px}
.shelf-book{display:flex;align-items:center;gap:9px;text-align:left;background:#f7fafc;border:1px solid #d6e3eb;border-radius:9px;padding:10px;min-width:0;color:#214765}
.shelf-book:hover{background:#eef7fb;border-color:#83b5cd}.shelf-book.active{background:#e5f3fa;border-color:#2b8eab;box-shadow:inset 3px 0 #2584a1}
.shelf-book-spine{width:23px;height:41px;flex:none;display:grid;place-items:center;background:linear-gradient(120deg,#173b55,#23667d);border-radius:4px 8px 8px 4px;color:#f3dec0;font-size:12px;font-weight:850;box-shadow:2px 2px 4px #184a6330}
.shelf-book-description{display:flex;flex-direction:column;min-width:0;gap:2px;overflow:hidden}.shelf-book-description strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shelf-book-description span{font-size:10px;color:#667e90;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shelf-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}.shelf-actions .book-new-class{flex:1;text-align:center}.shelf-actions #bookDeleteSelected{font-size:11px}
.book-cover-select{min-width:0}.book-cover-select>h2{margin-bottom:15px}
@media(max-width:1050px){.book-shelf-list{grid-template-columns:1fr}}
@media(max-width:750px){.book-shelf-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.book-shelf-list{grid-template-columns:1fr}.shelf-actions{flex-direction:column;align-items:stretch}}
/* V3.33 – én fag-/skoleårsbok med flere klasser. Bøker velges kun i rullegardin. */
#bookShelfList[hidden],#shelfSubjectFilter[hidden]{display:none!important}
.book-cover-select{gap:14px}
.book-class-picker{display:flex;align-items:center;gap:7px;min-width:190px}
.book-class-picker label{font-size:12px;font-weight:750;color:#24516a;white-space:nowrap}
.book-class-picker select{max-width:210px;min-width:118px;border:1px solid #c7dce8;background:white;border-radius:9px;padding:9px 12px;font-weight:750;color:#183e57}
.settings-class-tools{border:1px solid #d5e4ec;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px}
.settings-class-tools[hidden]{display:none!important}
.settings-class-tools strong{font-size:12px;color:#234761}
#bookInsideView .inside-book-head{justify-content:flex-end}
@media(max-width:850px){.book-class-picker{flex:1 1 100%;}.book-class-picker select{flex:1;max-width:none}.inside-book-top-actions{width:100%;justify-content:flex-end}}

/* V3.34: Visuell bokhylle fra faktiske fag-/skoleårsbøker; klassevalg beholdes inne i boken. */
.visual-shelf{min-height:460px;display:flex;flex-direction:column;justify-content:center;margin:25px 0 25px 25px;padding:29px 17px 20px 25px;background:linear-gradient(155deg,#12364d,#1a5163);border-radius:9px 16px 16px 9px;border-left:8px solid #102e45;box-shadow:8px 8px 0 #c2d6de,12px 12px 16px #1a455633;color:#f3e4c5;min-width:0;overflow:hidden}
.visual-shelf-heading{display:flex;justify-content:space-between;gap:9px;align-items:center;padding:0 6px 12px;font-size:10px;font-weight:850;letter-spacing:.14em;color:#e9d3ad}
.visual-shelf-heading #visualShelfCount{font-size:10px;letter-spacing:0;font-weight:600;color:#bfd9e4}
.visual-shelf-books{min-height:252px;display:flex;align-items:flex-end;gap:9px;overflow-x:auto;overflow-y:hidden;padding:16px 7px 9px;scrollbar-color:#7dabb7 #1e5263;scrollbar-width:thin;scroll-snap-type:x proximity}
.shelf-volume{position:relative;flex:0 0 89px;max-width:89px;min-height:214px;border:1px solid #608391;border-left:7px solid #0c2a3e;border-radius:3px 8px 8px 3px;background:linear-gradient(90deg,#102f45 0%,#27586b 27%,#174455 100%);color:#ffe6b8;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:8px;padding:22px 6px 19px;text-align:center;box-shadow:3px 4px 8px #081c2a66;scroll-snap-align:start;transition:transform .13s,box-shadow .13s}
.shelf-volume:nth-child(3n+2){background:linear-gradient(90deg,#24374c,#49697b 35%,#243b4d)}
.shelf-volume:nth-child(3n){background:linear-gradient(90deg,#1a3d49,#41746f 35%,#285a5b)}
.shelf-volume:hover{transform:translateY(-5px)}
.shelf-volume.active{outline:3px solid #edbd69;outline-offset:2px;box-shadow:3px 7px 15px #051d2ac0}
.shelf-volume:focus-visible{outline:3px solid #fff;outline-offset:3px}
.shelf-volume:before{content:'';position:absolute;top:8px;bottom:8px;left:3px;border-left:1px solid #c2d9dd60}
.shelf-volume .shelf-volume-rule{height:1px;width:74%;background:#e4ba797c;flex:0 0 1px}
.shelf-volume .shelf-volume-title{font-size:11px;font-weight:800;letter-spacing:.035em;overflow-wrap:anywhere;line-height:1.45;max-width:100%}
.shelf-volume .shelf-volume-title.long{font-size:9px;letter-spacing:-.025em}
.shelf-volume .shelf-volume-year{font-size:10px;font-weight:750;color:#fff6e4;letter-spacing:.03em}
.shelf-volume .shelf-volume-kind{font-size:8px;letter-spacing:.05em;opacity:.8}
.visual-shelf-plank{height:11px;border-radius:2px;background:linear-gradient(180deg,#c99c60,#936c45 55%,#755538);box-shadow:0 3px 7px #0a273c7a;margin:0 0 0 -10px;flex:none}
.visual-shelf-hint{font-size:10px;text-align:center;line-height:1.45;color:#c3dbe4;margin:15px 0 0}
@media(max-width:700px){.visual-shelf{min-height:248px;margin:18px 24px 6px;padding:19px 13px 12px 18px}.visual-shelf-books{min-height:142px;padding:6px 7px 9px;gap:8px}.shelf-volume{flex-basis:76px;max-width:76px;min-height:128px;padding:10px 5px 9px;gap:4px}.shelf-volume .shelf-volume-title{font-size:10px}.shelf-volume .shelf-volume-title.long{font-size:9px;letter-spacing:-.025em}
.shelf-volume .shelf-volume-year{font-size:9px}.shelf-volume .shelf-volume-kind{font-size:7px}.visual-shelf-hint{margin-top:9px}.book-cover-select{padding:22px 24px 26px}}
@media(max-width:390px){.visual-shelf{margin:12px 12px 4px}.visual-shelf-heading{font-size:9px}.book-cover-select{padding:18px}}
@media print{.visual-shelf{display:none!important}}

/* V3.35 – bokomslag som i den gamle vurderingsboken og kompakt bokhylle ved siden av. */
.book-cover-stage{grid-template-columns:minmax(270px,.91fr) minmax(350px,1.09fr);max-width:1030px;min-height:500px}
.book-cover-art{min-height:472px;margin:24px 0 26px 26px}
.book-cover-art-content{inset:58px 28px 62px 52px}
.book-cover-art-content strong{font-size:clamp(25px,2.7vw,35px);overflow-wrap:anywhere}
.book-cover-select{padding:30px 35px 27px;gap:13px;justify-content:center}
.book-cover-select h2{font-size:28px;margin-bottom:0}
.book-cover-select .visual-shelf{margin:0 0 5px;padding:12px 13px 10px 16px;min-height:145px;box-shadow:none;border-left:5px solid #102e45;border-radius:10px}
.book-cover-select .visual-shelf-heading{padding:0 4px 3px;font-size:9px}
.book-cover-select .visual-shelf-books{min-height:91px;max-height:102px;padding:8px 4px 3px;gap:7px}
.book-cover-select .shelf-volume{flex-basis:68px;max-width:68px;min-height:80px;padding:6px 3px 6px;gap:2px;border-left-width:5px}
.book-cover-select .shelf-volume .shelf-volume-kind{font-size:6px}
.book-cover-select .shelf-volume .shelf-volume-title{font-size:9px;line-height:1.25}
.book-cover-select .shelf-volume .shelf-volume-title.long{font-size:8px}
.book-cover-select .shelf-volume .shelf-volume-year{font-size:8px}
.book-cover-select .visual-shelf-plank{height:7px;margin-left:-5px}
.book-cover-select .field select{min-height:47px}
.book-cover-select .shelf-actions{margin-top:0}
.empty-shelf-note{font-size:11px;color:#ecdfcb;padding:10px}
.shelf-save-prompt{border:1px solid #c8e0d2;background:#eff9f3;color:#205c45;border-radius:9px;padding:8px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}
.shelf-save-prompt[hidden]{display:none!important}
.shelf-save-prompt .btn{white-space:nowrap}
@media(max-width:700px){
 .book-cover-stage{grid-template-columns:1fr;max-width:480px}
 .book-cover-art{min-height:228px;margin:15px 22px 6px}
 .book-cover-art-content{inset:24px 25px 27px 46px;gap:11px}
 .book-cover-art-content strong{font-size:26px}
 .book-cover-select{padding:20px 24px 25px;gap:11px}
 .book-cover-select h2{font-size:23px}
 .book-cover-select .visual-shelf{min-height:122px;margin:0;padding:10px 12px 8px}
 .book-cover-select .visual-shelf-books{min-height:75px;max-height:90px}
 .book-cover-select .shelf-volume{flex-basis:62px;max-width:62px;min-height:68px}
}
@media(max-width:390px){.book-cover-art{margin:11px 12px 5px}.book-cover-select{padding:15px 15px 20px}}


/* V3.36 – tydelig bokhylle + ett omslag. Alle vurderingskomponenter er uendret. */
@media (min-width: 851px) {
  .book-cover-stage {
    max-width: 1120px;
    min-height: 555px;
    grid-template-columns: minmax(320px,.94fr) minmax(440px,1.06fr);
    align-items: stretch;
    overflow: visible;
  }
  .book-cover-art {
    min-height: 500px;
    margin: 25px 0 29px 27px;
  }
  .book-cover-select {
    padding: 30px 38px 30px 38px;
    gap: 13px;
    justify-content: center;
  }
  .book-cover-select h2 {font-size: 28px;margin-bottom: 2px;}
  .book-cover-select .visual-shelf {
    min-height: 232px;
    padding: 17px 18px 14px 20px;
    margin: 0 0 8px;
    border-left: 7px solid #102e45;
    border-radius: 10px 14px 14px 10px;
    background: linear-gradient(145deg,#143448,#1a4e61);
  }
  .book-cover-select .visual-shelf-heading {padding: 0 2px 10px;font-size: 10px;}
  .book-cover-select .visual-shelf-books {
    min-height: 148px; max-height: 168px;
    gap: 9px; padding: 10px 9px 8px;
    align-items: flex-end;
  }
  .book-cover-select .shelf-volume {
    flex: 0 0 86px; max-width: 86px;
    min-height: 136px;
    border-left-width: 6px;
    padding: 14px 5px 11px;
    gap: 5px;
  }
  .book-cover-select .shelf-volume .shelf-volume-kind {font-size: 7px;}
  .book-cover-select .shelf-volume .shelf-volume-title {font-size: 10px;line-height:1.35;}
  .book-cover-select .shelf-volume .shelf-volume-title.long {font-size: 9px;}
  .book-cover-select .shelf-volume .shelf-volume-year {font-size: 9px;}
  .book-cover-select .visual-shelf-plank {height: 10px;margin-left: -5px;}
  .book-cover-select .shelf-actions {margin-top: 2px;}
  .book-cover-select .field select {min-height: 48px;}
}
/* Clear, user-selected cover action. Use the existing guarded openSelectedBook function. */
.book-cover-art {transition: box-shadow .17s, transform .17s;}
.book-cover-click {
  position:absolute;inset:0;width:100%;height:100%;
  appearance:none;border:0;margin:0;padding:0;background:transparent;
  border-radius:inherit;cursor:pointer;z-index:2;
}
.book-cover-click:focus-visible {outline:3px solid #f0b965;outline-offset: -6px;}
.book-cover-click:disabled {cursor:default;}
.book-cover-art:has(.book-cover-click:hover:not(:disabled)) {transform: translateY(-2px);box-shadow:9px 11px 0 #c2d6de,14px 17px 20px #1a455644;}
/* At tablet widths place the cover above the shelf and picker; avoid squeezed columns. */
@media (min-width:701px) and (max-width:850px) {
  .book-cover-stage {grid-template-columns:1fr;max-width:560px;}
  .book-cover-art {min-height:300px;margin:18px 26px 5px;}
  .book-cover-select {padding:26px 30px 28px;}
  .book-cover-select .visual-shelf {min-height:185px;padding:16px 17px;}
  .book-cover-select .visual-shelf-books {min-height:115px;max-height:145px;}
  .book-cover-select .shelf-volume {flex-basis:80px;max-width:80px;min-height:105px;padding:10px 5px;}
}
/* The mobile view retains one column but books remain legible, not thumb-sized. */
@media (max-width:700px) {
  .book-cover-select .visual-shelf {min-height:183px;padding:15px 15px 12px 17px;}
  .book-cover-select .visual-shelf-heading {font-size:10px;padding-bottom:8px;}
  .book-cover-select .visual-shelf-books {min-height:111px;max-height:145px;padding:9px 6px 7px;gap:8px;}
  .book-cover-select .shelf-volume {flex:0 0 80px;max-width:80px;min-height:108px;padding:11px 5px 9px;gap:4px;}
  .book-cover-select .shelf-volume .shelf-volume-kind {font-size:7px;}
  .book-cover-select .shelf-volume .shelf-volume-title {font-size:10px;}
  .book-cover-select .shelf-volume .shelf-volume-title.long {font-size:9px;}
  .book-cover-select .shelf-volume .shelf-volume-year {font-size:9px;}
  .book-cover-select .visual-shelf-plank {height:8px;}
}
@media (max-width:360px) {
  .book-cover-select .visual-shelf {padding:11px 10px;}
  .book-cover-select .shelf-volume {flex-basis:68px;max-width:68px;min-height:100px;}
}


/* V3.36: ved ny oppstart er bokhyllen tom. Omslag vises først når en bok er opprettet. */
.single-subject-label{margin:14px 0 0;padding:12px 15px;border:1px solid #d7e5eb;border-radius:10px;background:#f4f9fb;display:flex;justify-content:space-between;align-items:center;gap:12px}
.single-subject-label span{font-size:12px;font-weight:700;color:#5a7890}
.single-subject-label strong{font-size:15px;color:#193d52}
.book-cover-stage.book-shelf-empty{grid-template-columns:minmax(0,1fr)!important;max-width:830px;min-height:0}
.book-cover-stage.book-shelf-empty .book-cover-art{display:none!important}
.book-cover-stage.book-shelf-empty .book-cover-select{padding:34px 46px;min-width:0}
.book-cover-stage.book-shelf-empty .visual-shelf{min-height:200px}
.book-cover-stage.book-shelf-empty .visual-shelf-books{min-height:105px}
.book-cover-stage.book-shelf-empty #openBookClass{display:none}
.book-cover-select .field[hidden],.book-cover-select button[hidden]{display:none!important}
.book-cover-stage.book-shelf-empty .shelf-actions{justify-content:center}
.book-cover-stage.book-shelf-empty #bookNewClass{border:1px solid #245d76;background:#18516b;color:#fff;padding:11px 28px;border-radius:9px}
@media(max-width:700px){.book-cover-stage.book-shelf-empty .book-cover-select{padding:22px 20px}.book-cover-stage.book-shelf-empty .visual-shelf{min-height:160px}}


/* V3.37 — kompakt bokhylle / faste, like bokser. Påvirker bare forside og tom klasse. */
.shelf-save-prompt{display:none!important}
.inside-empty-class{border:1px dashed #cadce4;border-radius:10px;padding:27px 24px;text-align:center;background:#f6fafb;margin-top:12px}
.inside-empty-class[hidden]{display:none!important}
.inside-empty-class strong{font-size:16px;color:#183e52}
.inside-empty-class p{color:#668092;font-size:13px;margin:8px 0 0}
@media(min-width:851px){
 .app-shell:has(.book-cover-stage:not([hidden])){padding-top:12px;padding-bottom:15px}
 .masthead:has(+ #bookContextBar[hidden]){min-height:76px;padding:12px 20px;margin-bottom:12px;border-radius:14px}
 .masthead:has(+ #bookContextBar[hidden]) .brandmark{width:42px;height:42px}
 .masthead:has(+ #bookContextBar[hidden]) h1{font-size:25px}
 .book-cover-stage{max-width:990px;min-height:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;border-radius:14px;overflow:hidden}
 .book-cover-art{min-height:0;height:388px;margin:12px 0 12px 14px;border-radius:4px 11px 11px 4px;box-shadow:6px 5px 0 #c2d6de,8px 7px 12px #1a455625}
 .book-cover-art-content{inset:42px 26px 42px 43px;gap:14px}
 .book-cover-art-content strong{font-size:clamp(25px,2.1vw,31px)}
 .book-cover-select{padding:17px 25px 16px;gap:7px;justify-content:center}
 .book-cover-select h2{font-size:23px;margin:0}
 .book-cover-select>.book-eyebrow{font-size:9px}
 .book-cover-select .visual-shelf{min-height:0;height:137px;margin:0;padding:10px 12px 8px;border-left-width:5px;border-radius:8px}
 .book-cover-select .visual-shelf-heading{font-size:9px;padding:0 2px 5px}
 .book-cover-select .visual-shelf-books{min-height:0;height:91px;max-height:91px;gap:7px;padding:4px 5px 3px}
 .book-cover-select .shelf-volume{box-sizing:border-box;flex:0 0 65px;max-width:65px;height:83px;min-height:83px;padding:7px 4px 6px;gap:2px;border-left-width:5px;border-radius:4px}
 .book-cover-select .shelf-volume .shelf-volume-title{font-size:9px}
 .book-cover-select .shelf-volume .shelf-volume-year{font-size:9px}
 .book-cover-select .visual-shelf-plank{height:6px}
 .book-cover-select .book-cover-submeta{min-height:14px;font-size:11px}
 .book-cover-select .field select{min-height:38px;height:38px;font-size:13px;border-radius:8px}
 .book-cover-select .field{gap:3px}
 .book-cover-select .book-open-action{min-height:38px;font-size:12px;border-radius:8px}
 .book-cover-select .shelf-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:0}
 .book-cover-select .shelf-actions .btn{min-width:0;width:100%;min-height:34px;border-radius:8px;margin:0}
 .book-cover-stage.book-shelf-empty{max-width:710px!important}
 .book-cover-stage.book-shelf-empty .book-cover-select{padding:25px 30px}
 .book-cover-stage.book-shelf-empty .visual-shelf{height:134px;min-height:0}
 .book-cover-stage.book-shelf-empty .visual-shelf-books{min-height:0;height:83px}
 .book-cover-stage.book-shelf-empty .shelf-actions{display:flex;justify-content:center}
}
@media(max-width:850px){
 .book-cover-stage{border-radius:12px}
 .book-cover-select h2{font-size:22px}
 .book-cover-select .shelf-actions .btn{min-height:37px;border-radius:8px}
 .book-cover-select .visual-shelf{border-radius:9px}
}
@media(min-width:851px) and (max-height:690px){
 .book-cover-art{height:334px}.book-cover-select .visual-shelf{height:108px}
 .book-cover-select .visual-shelf-books{height:63px;max-height:63px}
 .book-cover-select .shelf-volume{height:58px;min-height:58px}
 .book-cover-select .book-cover-submeta{display:none}
}


/* ============================================================================
   V3.41 — FORSIDE REBYGD FRA V3.37 (ikke en samling V3.38–V3.40-overstyringer).
   Én skalerbar bok med breddebasert tittel + en tilgjengelig, fleksibel bokhylle.
   Alle regler er avgrenset til startsiden. Ingen vurderingsdata eller skript endres.
   ============================================================================ */

/* Omslaget har sin egen lokale typografiske målestokk; ikke viewport-font som
   kan gjøre tittelen bredere enn selve boken. */
#bookCoverView:not(.book-shelf-empty) .book-cover-art {
  box-sizing:border-box;
  container-type:inline-size;
  aspect-ratio: 0.70;
  min-height:0;
  border-radius:6px 17px 17px 6px;
  box-shadow:8px 8px 0 #cadbe3,12px 13px 23px #133e5229;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-binding {
  width:6.7%;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art-content {
  /* Emne, tittel og år holder seg innenfor den innvendige gullrammen. */
  inset:8.8% 7.6% 9.2% 13.8%;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  gap:clamp(8px,3.0cqw,23px);
  min-width:0;
  padding:clamp(12px,3.3cqw,24px) clamp(7px,1.8cqw,15px);
  text-align:center;
  border:1px solid #d7ad6b7c;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art-content span {
  font-size:clamp(9px,2.15cqw,13px);
  letter-spacing:.16em;
  line-height:1.35;
  max-width:100%;
  overflow-wrap:anywhere;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art-content strong {
  font-family:Georgia,'Times New Roman',serif;
  font-size:clamp(19px,7.6cqw,48px);
  font-weight:600;
  line-height:1.12;
  letter-spacing:-.025em;
  display:block;
  width:100%;
  max-width:100%;
  overflow-wrap:normal;
  word-break:normal;
  text-wrap:balance;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art-content small {
  font-size:clamp(9px,2.15cqw,13px);
  font-weight:800;
  letter-spacing:.18em;
  line-height:1.35;
  max-width:100%;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-rule {
  flex:0 0 1px;
  align-self:center;
  width:84%;
  background:#dab879a8;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-ribbon {
  right:5.2%;
  width:4.8%;
  height:8%;
  bottom:-3px;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-click:focus-visible {outline-offset:-5px}

/* Bruk hele skrivebordsvinduet, men behold scroll på uvanlig lave vinduer. */
@media (min-width:960px) {
 .app-shell:has(#bookCoverView:not([hidden])) {
   display:flex;flex-direction:column;
   max-width:none;width:100%;min-height:100vh;min-height:100dvh;
   padding:clamp(12px,1.4vw,22px) clamp(15px,2vw,37px) 12px;
 }
 .app-shell:has(#bookCoverView:not([hidden]))>.masthead {
   margin-bottom:14px;flex:0 0 auto;
 }
 .app-shell:has(#bookCoverView:not([hidden]))>#bookPaper {
   display:flex;flex:1 1 auto;width:100%;min-height:0;
 }
 .app-shell:has(#bookCoverView:not([hidden])) #bookView {
   display:flex;flex:1 1 auto;min-width:0;
 }
 .app-shell:has(#bookCoverView:not([hidden]))>.privacy {
   flex:none;padding:10px 4px 0;
 }
 #bookCoverView:not(.book-shelf-empty) {
   flex:1 1 auto;
   display:grid;
   grid-template-columns:minmax(0,41%) minmax(0,59%);
   align-items:stretch;
   width:100%;max-width:none;min-width:0;
   min-height:530px;
   margin:0;
   border-radius:18px;
   overflow:hidden;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-art {
   width:min(calc(100% - 38px),535px,calc((100dvh - 205px)*.70));
   height:auto;max-height:none;
   justify-self:center;align-self:center;
   margin:0;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select {
   min-width:0;
   display:flex;flex-direction:column;
   justify-content:flex-start;
   padding:clamp(22px,3vh,35px) clamp(24px,3.1vw,52px);
   gap:clamp(10px,1.25vh,16px);
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select>.book-eyebrow {font-size:10px;letter-spacing:.11em}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2 {
   font-size:clamp(24px,2.25vw,34px);
   line-height:1.15;margin:0 0 2px;
 }
 #bookCoverView:not(.book-shelf-empty) .visual-shelf {
   display:flex;flex-direction:column;
   justify-content:flex-start;
   flex:1 1 auto;min-height:235px;height:auto;
   margin:0;
   padding:16px 17px 13px;
   border-left:6px solid #102e45;border-radius:12px;
   box-shadow:none;
 }
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-heading {
   padding:0 4px 10px;font-size:10px;
 }
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books {
   display:grid;
   grid-template-columns:repeat(5,minmax(0,1fr));
   grid-auto-rows:minmax(105px,1fr);
   flex:1 1 auto;
   min-height:0;max-height:none;height:auto;
   align-items:stretch;align-content:stretch;
   gap:12px;
   overflow-x:hidden;overflow-y:auto;
   padding:7px 7px 12px;
   scroll-snap-type:none;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume {
   box-sizing:border-box;
   flex:initial;
   width:100%;max-width:148px;min-width:0;
   height:auto;min-height:0;
   justify-self:center;align-self:stretch;
   padding:clamp(9px,1.45vh,17px) 4px;
   gap:4px;
   border-left:6px solid #0c2a3e;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind{font-size:7px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:clamp(10px,.9vw,12px);line-height:1.3}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title.long{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:11px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-plank{height:9px}
 #bookCoverView:not(.book-shelf-empty) .field{margin:0;gap:4px}
 #bookCoverView:not(.book-shelf-empty) .field label{font-size:11px}
 #bookCoverView:not(.book-shelf-empty) .field select{height:43px;min-height:43px;font-size:14px;border-radius:8px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-submeta{min-height:15px;font-size:12px}
 #bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:44px;margin:0;font-size:13px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{width:100%;margin:0;min-width:0;min-height:39px;font-size:12px}
 /* Vis alle boktekstene. Høyden på hyllen er viktigere enn fem tynne kolonner. */
}
@media (min-width:960px) and (max-width:1200px) {
 #bookCoverView:not(.book-shelf-empty){grid-template-columns:minmax(0,42%) minmax(0,58%)}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select {padding:19px 23px;gap:8px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{font-size:25px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf {padding:12px 12px 10px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(89px,1fr);gap:9px;padding:5px 4px 9px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume{padding:8px 3px;gap:2px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind{font-size:7px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:10px}
}
@media (min-width:960px) and (max-height:700px) {
 #bookCoverView:not(.book-shelf-empty){min-height:530px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select {padding-top:13px;padding-bottom:13px;gap:7px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{min-height:225px;padding-top:10px;padding-bottom:9px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{padding-bottom:6px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{grid-auto-rows:minmax(85px,1fr);gap:7px;padding-top:3px;padding-bottom:7px}
 #bookCoverView:not(.book-shelf-empty) .field select{height:38px;min-height:38px}
 #bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:38px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{min-height:34px}
}
/* Bærbare skjermer (720–800 px høye): stram inn høyden, ikke skjul knapper.
   Fem bokkolonner gir to rader med ni bøker; omslaget er fortsatt stort. */
@media (min-width:960px) and (max-height:820px) {
 #bookCoverView:not(.book-shelf-empty) .book-cover-select {padding-top:12px;padding-bottom:12px;gap:7px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{font-size:24px;margin:0}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{min-height:190px;padding:9px 11px 8px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{padding-bottom:5px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
   grid-template-columns:repeat(5,minmax(0,1fr));
   grid-auto-rows:minmax(75px,1fr);gap:7px;padding:3px 4px 7px;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume{padding:6px 3px;gap:2px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind{font-size:6px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .field select{min-height:36px;height:36px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-submeta{min-height:12px;font-size:11px}
 #bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:37px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{min-height:34px}
}
@media (min-width:960px) and (max-height:700px) {
 #bookCoverView:not(.book-shelf-empty){min-height:465px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{min-height:180px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{grid-auto-rows:minmax(68px,1fr)}
}
/* På smale vinduer er det viktigere med en lesbar, hel bok enn å presse
   bokstavene sammen i to små spalter. Hele siden kan scrolles naturlig. */
@media (max-width:959px) {
 #bookCoverView:not(.book-shelf-empty) {
   display:flex;flex-direction:column;
   width:min(100%,780px);max-width:none;
   min-height:0;margin:0 auto;
   align-items:stretch;overflow:hidden;
   border-radius:17px;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-art {
   align-self:center;
   justify-self:center;
   width:min(calc(100% - 38px),410px);
   height:auto;max-height:none;min-height:0;
   margin:25px auto 13px;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select {
   min-width:0;
   padding:20px clamp(18px,4vw,42px) 30px;
   gap:11px;
   justify-content:flex-start;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select h2{font-size:clamp(23px,3vw,29px);margin:0}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{
   margin:0;min-height:238px;height:auto;padding:15px 14px 12px;
   box-shadow:none;border-left-width:6px;border-radius:11px;
 }
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{padding-bottom:10px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
   min-height:155px;max-height:380px;height:auto;
   display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
   grid-auto-rows:125px;align-items:stretch;gap:10px;
   padding:6px 5px 12px;overflow-x:hidden;overflow-y:auto;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume{
   box-sizing:border-box;min-height:0;height:auto;
   flex:initial;min-width:0;max-width:140px;width:100%;justify-self:center;
   padding:11px 5px;gap:3px;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:11px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:44px}
}
@media (max-width:560px) {
 #bookCoverView:not(.book-shelf-empty) .book-cover-art {
   width:min(calc(100% - 40px),380px);margin:18px auto 12px;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select{padding:17px 18px 25px;gap:10px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{min-height:177px;padding:12px 12px 10px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
   display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden;
   min-height:117px;height:124px;max-height:124px;
   padding:6px 5px 9px;gap:9px;
   scroll-snap-type:x proximity;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume{
   flex:0 0 91px;min-height:112px;height:auto;width:91px;max-width:91px;
   padding:11px 4px;gap:4px;
 }
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind{font-size:7px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:10px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{width:100%;min-height:39px;margin:0}
}
/* Ingen bok opprettet: bruk den ledige flaten til en tydelig startknapp. */
@media (min-width:960px) {
 .app-shell:has(#bookCoverView.book-shelf-empty:not([hidden]))>#bookPaper {display:flex;flex:1 1 auto}
 .app-shell:has(#bookCoverView.book-shelf-empty:not([hidden])) #bookView {display:flex;flex:1 1 auto}
 #bookCoverView.book-shelf-empty {
   flex:1 1 auto;display:flex;align-items:center;justify-content:center;
   max-width:none!important;width:100%;min-height:530px;margin:0;
 }
 #bookCoverView.book-shelf-empty .book-cover-select{width:min(100%,950px);padding:35px 45px}
 #bookCoverView.book-shelf-empty .visual-shelf{height:clamp(220px,34vh,360px);min-height:220px}
}


/* ===========================================================================
   V3.42 — PROPORTIONAL BOOKS, SHELVES GROW WITH THE NUMBER OF BOOKS
   Deliberately preserves the 0.70 main cover and the assessment/data features.
   Overrides only the welcome page. No fixed-height shelf and NO stretching.
   =========================================================================== */
#bookCoverView:not(.book-shelf-empty){
  box-sizing:border-box;
  grid-template-columns:minmax(285px,38%) minmax(0,62%);
  min-height:0;
  width:min(100%,1360px);max-width:1360px;
  margin:auto;
  align-items:center;
  overflow:hidden;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art{
  box-sizing:border-box;
  width:min(calc(100% - 34px),385px,calc((100dvh - 188px)*.70));
  max-width:385px;
  aspect-ratio:0.70;
  height:auto;min-height:0;max-height:none;
  margin:22px auto;
  align-self:center;justify-self:center;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-art-content strong{
  font-size:clamp(18px,7.2cqw,44px);
  overflow-wrap:normal;word-break:normal;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-select{
  display:flex;flex-direction:column;
  min-height:0;min-width:0;
  justify-content:center;
  padding:clamp(18px,2.6vw,42px);
  gap:8px;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{
  font-size:clamp(25px,2.3vw,34px);
  line-height:1.16;margin:0 0 14px;
}
#bookCoverView:not(.book-shelf-empty) .book-library-body{
  display:flex;flex-direction:column;
  align-items:flex-start;
  gap:21px;
  width:100%;min-width:0;
}
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
  flex-direction:row;align-items:center;
  gap:clamp(15px,2vw,28px);
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf{
  box-sizing:border-box;
  flex:0 1 auto;
  display:flex;flex-direction:column;
  justify-content:flex-start;
  width:max-content;max-width:100%;min-width:185px;
  height:auto;min-height:0;max-height:none;
  margin:0;padding:15px 15px 12px;
  border-left:6px solid #102e45;
  border-radius:12px;
  overflow:hidden;
  box-shadow:5px 6px 0 #c2d6de;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{
  display:flex;justify-content:space-between;gap:18px;
  flex:0 0 auto;
  padding:0 3px 12px;
  font-size:10px;white-space:nowrap;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
  box-sizing:content-box;
  flex:0 1 auto;
  display:flex;flex-flow:row wrap;
  justify-content:flex-start;align-content:flex-start;align-items:flex-start;
  gap:12px;
  width:max-content;max-width:100%;
  height:auto;min-height:0;max-height:415px;
  padding:6px 5px 11px;
  overflow-x:hidden;overflow-y:auto;
  scroll-snap-type:none;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume{
  box-sizing:border-box;
  flex:0 0 108px;
  width:108px;min-width:108px;max-width:108px;
  height:auto;min-height:0;max-height:none;
  aspect-ratio:0.70;
  align-self:flex-start;
  justify-content:space-between;
  padding:15px 5px 13px;gap:5px;
  border-left:6px solid #0c2a3e;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind{font-size:7px;line-height:1.25}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title,
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title.long{font-size:11px;line-height:1.25}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{font-size:11px}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-plank{flex:0 0 9px;height:9px;margin:0 -6px}
#bookCoverView:not(.book-shelf-empty) .book-library-controls{
  display:flex;flex-direction:column;
  flex:1 1 auto;
  min-width:0;
  width:min(100%,470px);
  max-width:470px;
  gap:11px;
}
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-controls{
  flex:1 1 240px;min-width:230px;
}
#bookCoverView:not(.book-shelf-empty) .book-library-controls .field{margin:0;gap:5px}
#bookCoverView:not(.book-shelf-empty) .book-library-controls .field select{
  width:100%;height:44px;min-height:44px;
  font-size:14px;border-radius:9px;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-submeta{font-size:12px;min-height:14px}
#bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:45px;width:100%;margin:0}
#bookCoverView:not(.book-shelf-empty) .shelf-actions{
  display:grid;grid-template-columns:1fr 1fr;
  width:100%;gap:10px;margin:3px 0 0;
}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{
  width:100%;min-width:0;min-height:40px;margin:0;font-size:12px;
}
@media (max-width:1240px) and (min-width:960px){
  #bookCoverView:not(.book-shelf-empty){grid-template-columns:minmax(280px,38%) minmax(0,62%)}
  #bookCoverView:not(.book-shelf-empty) .book-cover-select{padding:18px 22px}
  #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
    flex-direction:column;align-items:flex-start;gap:16px;
  }
  #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{max-height:285px}
}
@media (min-width:960px) and (max-height:760px){
  #bookCoverView:not(.book-shelf-empty) .book-cover-select{padding-top:13px;padding-bottom:13px;gap:5px}
  #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{font-size:25px;margin-bottom:6px}
  #bookCoverView:not(.book-shelf-empty) .book-library-body{gap:12px}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf{padding:11px 12px 9px}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{padding-bottom:7px}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{max-height:275px}
  #bookCoverView:not(.book-shelf-empty) .shelf-volume{width:94px;min-width:94px;max-width:94px;flex-basis:94px;padding:10px 4px;gap:3px}
  #bookCoverView:not(.book-shelf-empty) .book-library-controls{gap:6px}
  #bookCoverView:not(.book-shelf-empty) .book-library-controls .field select{min-height:39px;height:39px}
  #bookCoverView:not(.book-shelf-empty) .book-open-action{min-height:40px}
  #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{min-height:36px}
}
@media (max-width:959px){
  #bookCoverView:not(.book-shelf-empty){
    display:flex;flex-direction:column;align-items:stretch;
    width:min(100%,760px);min-height:0;margin:0 auto;
  }
  #bookCoverView:not(.book-shelf-empty) .book-cover-art{
    width:min(calc(100% - 40px),360px);max-width:360px;
    height:auto;aspect-ratio:0.70;
    margin:22px auto 12px;
  }
  #bookCoverView:not(.book-shelf-empty) .book-cover-select{
    padding:18px clamp(17px,4vw,38px) 28px;gap:8px;
  }
  #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{margin-bottom:8px}
  #bookCoverView:not(.book-shelf-empty) .book-library-body,
  #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
    flex-direction:column;align-items:flex-start;gap:20px;
  }
  #bookCoverView:not(.book-shelf-empty) .book-library-controls,
  #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-controls{
    flex:0 1 auto;min-width:0;width:min(100%,550px);max-width:550px;
  }
  #bookCoverView:not(.book-shelf-empty) .visual-shelf{max-width:100%}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{max-height:370px}
}
@media (max-width:520px){
  #bookCoverView:not(.book-shelf-empty) .book-cover-art{
    width:min(calc(100% - 36px),310px);max-width:310px;
  }
  #bookCoverView:not(.book-shelf-empty) .book-cover-select{padding:16px 15px 26px}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf{padding:12px 12px 9px;min-width:0}
  #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
    flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;
    max-width:100%;max-height:none;gap:9px;
  }
  #bookCoverView:not(.book-shelf-empty) .shelf-volume{
    flex:0 0 94px;width:94px;min-width:94px;max-width:94px;
    aspect-ratio:0.70;padding:11px 4px;
  }
  #bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title{font-size:10px}
  #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{font-size:11px}
}
/* Empty library: no oversized shelf when there are no books yet. */
#bookCoverView.book-shelf-empty .book-library-body{display:flex;flex-direction:column;gap:16px;align-items:center}
#bookCoverView.book-shelf-empty .book-library-controls{width:min(100%,460px)}
#bookCoverView.book-shelf-empty .visual-shelf{
  width:min(100%,460px);max-width:460px;min-height:0;height:auto;
}
#bookCoverView.book-shelf-empty .visual-shelf-books{height:auto;min-height:85px}


/* V3.43: Bokhylle OVER betjeningen, ikke ved siden av. */
#bookCoverView:not(.book-shelf-empty) .book-library-body,
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
  display:flex;flex-direction:column;align-items:flex-start;
  justify-content:flex-start;gap:16px;
  width:100%;min-width:0;
}
#bookCoverView:not(.book-shelf-empty) .book-library-controls,
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-controls{
  width:min(100%,480px);max-width:480px;min-width:0;
  flex:0 1 auto;align-self:flex-start;gap:9px;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf{
  max-width:100%;width:max-content;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
  max-width:100%;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-select{
  justify-content:center;
}
@media(min-width:960px) and (max-height:760px){
 #bookCoverView:not(.book-shelf-empty) .book-library-body,
 #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{gap:9px}
 #bookCoverView:not(.book-shelf-empty) .book-library-controls,
 #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-controls{gap:6px}
}
@media(max-width:959px){
 #bookCoverView:not(.book-shelf-empty) .book-library-body,
 #bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
   gap:17px;
 }
}
#newBookOpenExisting[hidden]{display:none!important}
.new-book-year-status{font-size:13px;font-weight:650;color:#215e75;margin:10px 0 0;line-height:1.45}
#newBookSubmit:disabled{opacity:.55;cursor:not-allowed}




/* V3.46: Samlet, rolig forside. Én definisjon som erstatter 3.44/3.45-overstyringene. */
@media(min-width:960px){
 #bookCoverView:not(.book-shelf-empty){
  display:grid;box-sizing:border-box;grid-template-columns:minmax(0,37%) minmax(0,63%);
  align-items:center;flex:0 1 auto;width:min(100%,1120px);max-width:1120px;
  min-height:0;height:min(548px,calc(100dvh - 171px));max-height:548px;
  margin:auto;border-radius:18px;overflow:hidden;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-art{
  box-sizing:border-box;margin:0;min-height:0;max-height:none;
  width:min(317px,calc(100% - 36px),calc((100dvh - 210px)*.70));
  max-width:317px;height:auto;aspect-ratio:.70;
  justify-self:center;align-self:center;
 }
 #bookCoverView:not(.book-shelf-empty) .book-cover-select{
  box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;
  align-items:stretch;min-width:0;height:auto;max-height:100%;
  padding:18px 36px 18px 13px;gap:13px;
 }
}
#bookCoverView:not(.book-shelf-empty) .book-cover-select .book-eyebrow{display:none!important}
#bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{
 font-family:Roboto,Arial,sans-serif;font-size:clamp(27px,2.8vw,33px);
 font-weight:800;line-height:1.15;letter-spacing:-.027em;
 color:#173d53;margin:0 0 2px;
}
#bookCoverView:not(.book-shelf-empty) .book-library-body,
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-body{
 display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;
 width:100%;min-width:0;gap:14px;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf{
 box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;
 flex:0 0 auto;align-self:flex-start;width:fit-content;max-width:100%;
 height:194px;min-height:0;max-height:194px;
 margin:0;padding:13px 14px 11px;
 background:#f1f6f8;border:1px solid #d9e6ec;
 border-radius:13px;box-shadow:none;color:#1b455d;overflow:hidden;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-heading{
 display:flex;justify-content:space-between;align-items:center;
 padding:0 2px 8px;gap:17px;color:#355b70;
 font-size:12px;font-weight:800;letter-spacing:0;line-height:1.25;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-heading #visualShelfCount{
 color:#6b8190;font-size:11px;font-weight:700;letter-spacing:0;white-space:nowrap;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-books{
 box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;
 align-items:flex-end;justify-content:flex-start;gap:10px;
 flex:0 0 auto;width:max-content;max-width:100%;height:139px;min-height:0;max-height:139px;
 overflow-x:auto;overflow-y:hidden;padding:5px 5px 5px;
 scrollbar-width:thin;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume{
 box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;
 justify-content:space-between;gap:4px;flex:0 0 62px;
 width:62px;min-width:62px;max-width:62px;
 height:128px;min-height:128px;max-height:128px;aspect-ratio:auto;
 margin:0;padding:11px 4px 8px 4px;
 border:1px solid #64889a;border-left:6px solid #0e2d42;
 border-radius:4px 8px 8px 4px;
 background:linear-gradient(90deg,#102e43 0%,#275669 31%,#194458 100%);
 color:#f9e7c2;box-shadow:2px 4px 6px #0b2d4033;
 overflow:visible;scroll-snap-align:start;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume::before{
 content:'';position:absolute;left:7px;top:6px;bottom:6px;width:1px;background:#8daab86b;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume.active{
 outline:2px solid #d6a053;outline-offset:2px;box-shadow:2px 4px 9px #0e304040;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume:focus-visible{outline:3px solid #c9913e;outline-offset:2px}
#bookCoverView:not(.book-shelf-empty) .shelf-volume:hover{transform:translateY(-2px)}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-top,
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-kind,
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-rule{display:none!important}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-spine{
 position:relative;z-index:1;flex:1 1 auto;display:flex;
 justify-content:center;align-items:center;width:100%;min-height:0;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title,
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title.long{
 font-family:Roboto,Arial,sans-serif;writing-mode:vertical-rl;transform:rotate(180deg);
 font-size:12px;font-weight:850;line-height:1;letter-spacing:.045em;
 color:#ffe6b7;white-space:nowrap;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-bottom{
 position:relative;z-index:1;display:flex;justify-content:center;width:100%;
}
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-year{
 font-size:8px;font-weight:850;letter-spacing:.02em;white-space:nowrap;
 color:#fff;line-height:1.2;
}
#bookCoverView:not(.book-shelf-empty) .visual-shelf-plank{
 box-sizing:border-box;flex:0 0 5px;height:5px;
 background:linear-gradient(180deg,#d7b27b,#b68b52);border-radius:4px;
 margin:1px -4px 0;box-shadow:0 2px 3px #523f2c21;
}
#bookCoverView:not(.book-shelf-empty) .book-library-controls,
#bookCoverView:not(.book-shelf-empty).shelf-size-few .book-library-controls{
 box-sizing:border-box;display:flex;flex:0 0 auto;
 width:min(100%,526px);max-width:526px;min-width:0;
 align-self:flex-start;flex-direction:column;
 gap:7px;margin:0;padding:0;
 background:transparent;border:0;box-shadow:none;border-radius:0;
}
#bookCoverView:not(.book-shelf-empty) .book-library-controls .field{margin:0;gap:5px}
#bookCoverView:not(.book-shelf-empty) .book-library-controls .field label{
 font-family:Roboto,Arial,sans-serif;font-size:12px;font-weight:750;color:#506d80;
}
#bookCoverView:not(.book-shelf-empty) .book-library-controls .field select{
 box-sizing:border-box;width:100%;height:42px;min-height:42px;
 padding:0 12px;border:1px solid #cbdbe4;border-radius:10px;
 background:#fff;box-shadow:none;font-size:14px;font-weight:700;color:#153b55;
}
#bookCoverView:not(.book-shelf-empty) .book-cover-submeta{
 margin:0;min-height:0;font-size:11px;color:#78909e;line-height:1.3;
}
#bookCoverView:not(.book-shelf-empty) .book-open-action{
 box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;
 width:100%;height:44px;min-height:44px;
 margin:1px 0 0;padding:0 16px;border-radius:10px;
 background:linear-gradient(90deg,#19445e,#216883);
 box-shadow:0 4px 8px #153f5522;font-size:14px;font-weight:750;
}
#bookCoverView:not(.book-shelf-empty) .book-open-action span{font-size:19px}
#bookCoverView:not(.book-shelf-empty) .shelf-actions{
 display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:8px;margin:3px 0 0;width:100%;
}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{
 box-sizing:border-box;flex:0 0 auto;min-width:0;width:auto;
 display:inline-flex;align-items:center;justify-content:center;
 height:38px;min-height:38px;border-radius:9px;
 padding:0 13px;font-size:12px;font-weight:750;
 box-shadow:none;margin:0;
}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .book-new-class{
 color:#1a4d69;background:#edf5f9;border:1px solid #c5d9e3;
}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .book-new-class:hover{background:#e2eef5}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .btn.danger{
 background:transparent;border:1px solid transparent;
 color:#ae554c;padding:0 10px;
}
#bookCoverView:not(.book-shelf-empty) .shelf-actions .btn.danger:hover{
 background:#fff2f0;border-color:#f3d3ce;
}
#bookCoverView:not(.book-shelf-empty) #shelfSavePrompt{margin-top:0}
@media(min-width:960px) and (max-height:750px){
 #bookCoverView:not(.book-shelf-empty){height:min(508px,calc(100dvh - 160px));}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select{gap:10px;padding-top:14px;padding-bottom:14px}
 #bookCoverView:not(.book-shelf-empty) .book-library-body{gap:11px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{height:178px;max-height:178px;padding-top:10px;padding-bottom:9px}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf-books{height:127px;max-height:127px}
 #bookCoverView:not(.book-shelf-empty) .shelf-volume{height:116px;min-height:116px;max-height:116px}
}
@media(max-width:959px){
 #bookCoverView:not(.book-shelf-empty) .book-cover-select{box-sizing:border-box;padding:24px 20px 28px;gap:15px}
 #bookCoverView:not(.book-shelf-empty) .book-cover-select>h2{font-size:clamp(27px,4.5vw,32px)}
 #bookCoverView:not(.book-shelf-empty) .visual-shelf{height:194px;min-height:0;max-height:194px}
 #bookCoverView:not(.book-shelf-empty) .book-library-controls{width:min(100%,530px)}
}
@media(max-width:520px){
 #bookCoverView:not(.book-shelf-empty) .book-cover-select{padding:18px 14px 24px}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions{flex-direction:column;align-items:stretch}
 #bookCoverView:not(.book-shelf-empty) .shelf-actions .btn{width:100%;justify-content:center}
}


/* V3.48: Navngitte bøker med separate fag og skoleår. */
#newBookDialog .new-book-field{margin-top:13px;gap:5px}
#newBookDialog .new-book-field input{min-height:43px}
#newBookDialog .new-book-explain{margin-top:10px;line-height:1.4}
#newBookDialog .optional-tag{font-weight:500;color:#6c8797;font-size:12px}
#newBookDialog .required-symbol{color:#a9564f}
#newBookDialog .new-book-year-status{margin:8px 0 0;min-height:15px}
#bookCoverView:not(.book-shelf-empty) .shelf-volume-title.long{font-size:10px;letter-spacing:0}
#bookCoverView:not(.book-shelf-empty) .shelf-volume-title{max-height:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bookCoverView:not(.book-shelf-empty) .book-cover-submeta{min-height:18px;line-height:1.2}
@media(max-height:740px) and (min-width:960px){#newBookDialog .dialog-body{padding:20px 24px 16px}#newBookDialog .new-book-field{margin-top:8px}}

/* V3.50: Behold kompakt, balansert forside. Boktekst skal aldri klippes. */
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title,
#bookCoverView:not(.book-shelf-empty) .shelf-volume .shelf-volume-title.long{
  white-space:nowrap;overflow:hidden;text-overflow:clip;
  max-height:calc(100% - 8px);
}


/* V3.52 – innlesing av elevnavn, uten endring av bokhylle */
.name-import-launch{white-space:nowrap;background:#f1f8fb;border-color:#c3d9e7;color:#205472}
.names-import-dialog{max-width:min(750px,calc(100vw - 20px));width:750px}
.names-import-body{max-height:min(86vh,850px);overflow-y:auto}
.names-import-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:13px;margin-top:16px}
.names-import-formats{margin-top:9px;font-size:12px}
.names-paste-details{padding:9px 12px;border:1px solid #dce7ee;border-radius:11px;margin-top:14px}
.names-paste-details summary{cursor:pointer;font-weight:700;color:#234961}
.names-paste-details textarea{margin:10px 0 6px;width:100%;min-height:90px;padding:9px 12px;border:1px solid #c9dce6;border-radius:8px}
.names-import-notice{margin:13px 0 3px;min-height:20px;font-size:13px;color:#275d77;font-weight:650}
.names-existing-risk{background:#fff7ea;border:1px solid #efd9ad;color:#76521d;border-radius:10px;padding:11px 12px;font-size:12px;line-height:1.5;margin:10px 0}.names-existing-risk label{display:flex;gap:7px;align-items:center;margin-top:7px;font-weight:700}.names-import-subtitle{font-size:17px;margin:14px 0 8px;color:#203f54}
.names-table-scroll{max-height:310px;overflow:auto;border:1px solid #dce7ee;border-radius:9px}
.names-import-table{border-collapse:collapse;width:100%;font-size:13px}
.names-import-table th{background:#e8f2f7;color:#1b445a;position:sticky;top:0;text-align:left;padding:9px 11px}
.names-import-table td{border-top:1px solid #e4edf2;padding:7px 11px}
.names-import-table input[type="text"]{width:100%;min-width:130px;height:36px;border:1px solid #cfdde6;border-radius:7px;padding:4px 9px;font-size:13px}
.names-import-table input[type="checkbox"]{width:17px;height:17px;accent-color:#216b87}
.names-import-dialog .dialog-actions{position:sticky;bottom:0;background:#fff;padding:15px 0 0}
@media(max-width:680px){.names-import-grid{grid-template-columns:1fr}.names-import-table td,.names-import-table th{padding:6px}.name-import-launch{font-size:12px}}


/* V3.53: Tydeligere lagringshandling uten layoutendringer. */
.mast-actions #saveJsonBtn{background:#57dfb1;border-color:#57dfb1;color:#123748;box-shadow:0 3px 10px rgba(12,49,58,.18)}
.mast-actions #saveJsonBtn:hover{background:#84edc6;border-color:#84edc6;color:#092f3c}
.mast-actions #saveJsonBtn:focus-visible{outline:3px solid #fff;outline-offset:2px}

/* V3.54: Kompakt logg for arbeidsvaner/fremdrift med skille fra kompetansevurdering. */
.work-impact-panel{margin:16px 0 4px;border:1px solid #cbdde6;background:#f6fafc;border-radius:13px;overflow:hidden}
.work-impact-panel>summary{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;color:#193e56}
.work-impact-summary{display:flex;flex-direction:column;gap:3px;min-width:0}.work-impact-summary strong{font-size:14px}.work-impact-summary small{font-size:11px;color:#557286}
.work-impact-body{padding:6px 16px 16px;border-top:1px solid #dbe8ee}.work-impact-body p{margin:9px 0 12px;line-height:1.4}
.work-impact-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:10px 0 14px}
.work-impact-columns fieldset{min-width:0;margin:0;padding:11px 12px;border:1px solid #d7e5eb;border-radius:10px;background:white}
.work-impact-columns legend{font-weight:800;font-size:12px;color:#204a61;padding:0 5px}
.work-impact-choices{display:grid;gap:7px}
.work-impact-check{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.4;cursor:pointer;color:#254659}
.work-impact-check input{flex:0 0 auto;margin-top:2px;accent-color:#1d6c86}
.work-impact-body .field{margin:9px 0}.work-impact-body textarea{width:100%;min-height:56px;resize:vertical}
.work-impact-body select{width:100%;min-height:39px}
.work-history-note{border-left:3px solid #dfbd76;padding:11px 13px;background:#fbfcfd;border-radius:0 9px 9px 0;margin-top:8px}
.work-history-note>div{margin-top:5px;font-size:12px}
@media(max-width:660px){.work-impact-columns{grid-template-columns:1fr}.work-impact-panel>summary{padding:12px}.work-impact-body{padding:5px 12px 13px}}

/* V3.54: To uavhengige registreringsspor. */
.work-impact-track{padding:13px 14px;margin:12px 0;background:#fff;border:1px solid #d7e5eb;border-radius:12px}
.work-impact-track h4{font-size:14px;color:#1b4b65;margin:0 0 7px;font-weight:850}
.work-impact-track>.small-muted{font-size:12px;line-height:1.5}
.work-environment-track{background:#fffdf8;border-color:#e9dcc7}
.work-environment-track h4{color:#674c2e}
.work-progress-label{font-size:12px;font-weight:850;color:#21475f;margin:12px 0 -3px}
.work-progress-options{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:12px 0}
.work-progress-options label{font-size:12px;font-weight:750;color:#30576d;cursor:pointer;display:flex;align-items:center;gap:6px;background:#f3f8fb;border:1px solid #d6e5ee;border-radius:8px;padding:8px 10px;min-height:35px}
.work-progress-options label:has(input:checked){color:#12455a;background:#dceef5;border-color:#83b5c9}
.work-progress-options input{accent-color:#1e7490}
.work-impact-policy{padding:6px 6px 0}
.work-impact-body{padding:6px 12px 14px}
@media(max-width:660px){.work-impact-track{padding:10px}.work-progress-options{flex-direction:column}}


/* V3.56: Kort og oversiktlig registrering i stedet for lange avkryssingslister. */
.work-simple-body{padding:13px 16px 16px!important}
.work-simple-intro{font-size:12px;color:#536b7a;margin:0 0 12px!important;line-height:1.45}
.work-simple-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-bottom:13px}
.work-simple-status .field{margin:0!important;gap:4px}
.work-simple-status label{font-size:12px;font-weight:800;color:#234e65}
.work-simple-status select{min-width:0;width:100%;height:41px;min-height:41px;border:1px solid #cbdce6;border-radius:9px;background:#fff;color:#163c54;font-size:12px;font-weight:650;padding:6px 9px}
.work-simple-pair{display:grid;grid-template-columns:1.35fr 1fr;gap:12px;align-items:stretch}
.work-simple-pair fieldset{min-width:0;margin:0;padding:11px 12px 13px;border:1px solid #d4e2e9;border-radius:10px;background:#fff}
.work-simple-pair legend{padding:0 4px;font-size:13px;font-weight:850;color:#22465a}
.work-simple-choices{display:grid;grid-template-columns:1fr;gap:5px}
.work-simple-check{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.3;min-height:25px;padding:3px 0;color:#294d61;cursor:pointer}
.work-simple-check input{flex:0 0 15px;width:15px;height:15px;margin:0;accent-color:#1a7191}
.work-simple-note{margin:10px 0 0!important}
.work-simple-note label{font-size:12px;font-weight:800;color:#21475f}
.work-simple-note textarea{margin-top:5px;min-height:48px;line-height:1.4}
.work-simple-more{border:1px solid #d7e5ec;border-radius:10px;background:#fff;margin-top:11px;overflow:hidden}
.work-simple-more>summary{padding:10px 12px;font-size:12px;font-weight:780;color:#21516d;cursor:pointer;background:#eff6f9}
.work-simple-more-inner{padding:11px 13px 12px;display:grid;gap:9px}
.work-simple-more-title{font-size:12px;font-weight:800;color:#22485e}
.work-simple-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px}
.work-simple-more-inner .field{margin:2px 0!important}
.work-simple-more-inner select{min-height:38px}
.work-simple-policy{font-size:11px;line-height:1.4;color:#677c89;margin:10px 0 0!important}
@media(max-width:800px){.work-simple-status{grid-template-columns:1fr 1fr}.work-simple-pair{grid-template-columns:1fr}}
@media(max-width:520px){.work-simple-body{padding:10px!important}.work-simple-status{grid-template-columns:1fr}.work-simple-actions{grid-template-columns:1fr}}


/* V3.57: alltid synlig inngang til eksisterende detaljvurdering. */
.work-simple-detail-link{display:flex;justify-content:flex-start;margin:11px 0 0}
.work-simple-detail-link .btn{font-weight:750;min-height:38px;border:1px solid #b9d2e0;color:#174c67;background:#eef6fa;border-radius:8px}


/* V3.59: Treffsikker hurtigvurdering – område først, ett nivå per område. */
.quick-focused-form{gap:10px;padding:14px 16px}
.quick-focused-form .quick-heading{font-size:15px;color:#173e57}
.quick-focused-form .quick-subheading{font-size:12px;line-height:1.4;color:#647e8f;margin-top:-4px}
.quick-area-count{font-size:11px;font-weight:750;color:#236c82;background:#eaf4f8;border-radius:12px;padding:4px 10px;align-self:flex-start}
.quick-focused-rows{display:flex;flex-direction:column;gap:9px}
.quick-area-row{border:1px solid #d9e5eb;background:white;border-radius:11px;padding:11px 12px;display:flex;flex-direction:column;gap:8px}
.quick-area-label{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.quick-area-label strong{font-size:13px;color:#173e56}
.quick-area-label span{font-size:11px;color:#687f8f}
.quick-area-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.quick-area-button{min-width:0;min-height:58px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;text-align:left;padding:9px 10px;border:1px solid #d5e2e9;border-radius:8px;background:#f9fbfc;color:#31546b;cursor:pointer;font-family:inherit;transition:border-color .12s,background .12s}
.quick-area-button strong{font-size:11px;line-height:1.2}
.quick-area-button span{font-size:11px;line-height:1.32;font-weight:500}
.quick-area-button:hover{background:#eff7fa;border-color:#7faac1}
.quick-area-button:focus-visible{outline:2px solid #11749e;outline-offset:2px}
.quick-area-button.selected{box-shadow:inset 0 0 0 1px currentColor}
.quick-area-button.selected.level-under{background:#fff1e9;border-color:#d89b80;color:#8d4d34}
.quick-area-button.selected.level-expected{background:#e7f2fa;border-color:#7fb4d4;color:#125b83}
.quick-area-button.selected.level-over{background:#e8f6ef;border-color:#7bbd9c;color:#226b4b}
.quick-focused-form #quickNote{min-height:56px;height:64px}
.quick-extra-choices{border:1px solid #e0eaf0;border-radius:9px;background:#fff}
.quick-extra-choices>summary{font-size:12px;font-weight:750;color:#43667d;cursor:pointer;padding:10px 12px}
.quick-extra-content{border-top:1px solid #e6edf1;padding:12px}
.quick-extra-content .quick-rated-layout{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:760px){.quick-focused-form{padding:11px}.quick-area-choices{gap:5px}.quick-area-button{padding:8px;min-height:70px}.quick-area-label{gap:4px}.quick-extra-content .quick-rated-layout{grid-template-columns:1fr}}
@media(max-width:430px){.quick-area-button strong{font-size:10px}.quick-area-button span{font-size:10px}.quick-area-row{padding:9px}}

/* V3.60: lesbart kompetansegrunnlag i rapport / PDF og tydelig ferdig-knapp. */
.quick-complete-button{white-space:nowrap;min-height:38px;background:#e3f1e7;border-color:#9fc6af;color:#1e6043}
.quick-complete-button:hover{background:#d6ebdf}
.quick-documentation{background:#f7fafb;border:1px solid #d9e5eb;border-radius:12px;padding:14px 17px;margin:15px 0}
.quick-documentation h3{font-size:15px;margin:0 0 4px;color:#163f59}
.quick-document-note{color:#607a8b;font-size:12px;margin:0 0 10px;line-height:1.5}
.quick-doc-session{background:#fff;border-top:1px solid #e4edf1;padding:9px 0;font-size:12px;line-height:1.45}
.quick-doc-session strong{color:#1c4e68}
.quick-doc-session ul{padding-left:18px;margin:5px 0 0}
.quick-doc-session li{margin:2px 0;color:#355369}
@media(max-width:720px){.quick-complete-button{width:100%;order:4}.quick-documentation{padding:12px}}
@media print{.quick-documentation{background:white;border:1px solid #c9d3db;break-inside:auto;page-break-inside:auto}.quick-doc-session{break-inside:avoid;page-break-inside:avoid}.quick-document-note{color:#475569}}

/* V3.61: Avsluttende lagring i elevhistorikk, lærerside og prøvemodul. */
.section-save-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:20px;padding:13px 0 2px;border-top:1px solid #e0e9ef}
.section-save-status{font-size:11px;color:#557589;flex:1 1 160px}
.btn.section-save{background:#c7f2e1;color:#104f42;border:1px solid #86ccb4;font-size:12px;font-weight:800}
.btn.section-save:hover{background:#a9ead3;border-color:#51af8b}
.history-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#logoutBook{background:#f2f6f8;color:#24485d;border-color:#cbd9e2}
.teacher-grade-term{grid-column:1/-1;font-size:13px;font-weight:850;color:#1a4a61;margin-bottom:3px}
.report-documentation{margin:18px 0 0;padding-top:7px;border-top:1px solid #dae6ec}
.report-documentation h3{font-size:14px;color:#163e55;margin:8px 0 9px}
.report-evidence-row{font-size:12px;line-height:1.5;padding:8px 10px;margin:6px 0;background:#f8fbfc;border:1px solid #e3edf2;border-radius:7px;overflow-wrap:anywhere}
.report-evidence-row ul{margin:5px 0 0;padding-left:18px}
.term-basis-row{font-size:12px;line-height:1.5;margin:6px 0;padding:8px 10px;background:#f1f7fa;border:1px solid #ddeaf0;border-radius:7px}
.teacher-student-feedback + .teacher-student-feedback{margin-top:12px}
#summaryView .sidefilters>.field:has(#summaryTerm){background:#f5f9fb;border:1px solid #e3edf2;border-radius:9px;padding:9px}
@media print{
 #print-view .report-documentation{border:0;margin-top:4mm;padding:0}
 #print-view .report-documentation h3{font-size:11pt;margin:5mm 0 2mm;padding-bottom:1mm;border-bottom:1px solid #bed0da}
 #print-view .report-evidence-row,#print-view .term-basis-row{background:white!important;border:1px solid #e0e8ed;margin:2mm 0;padding:2mm 3mm;font-size:9pt;break-inside:avoid-page}
 #print-view .teacher-student-feedback{border:1px solid #d5e2eb;padding:3mm;margin:4mm 0;break-inside:avoid-page}
 #print-view .quick-documentation{break-inside:auto!important}
 #print-view .quick-doc-session{break-inside:avoid-page}
}

/* V3.62: Lukkede, ryddige grupper for historikk og vurderingsgrunnlag. */
.history-master-fold,.report-source-fold{margin:12px 0;border-radius:13px;overflow:hidden}
.history-master-fold > .bookfold-body,.report-source-fold > .bookfold-body{display:flex;flex-direction:column;gap:8px;padding:12px}
.history-master-fold .history-accordion{margin:0}
.report-source-fold > .bookfold-body{display:block}
.report-source-fold .quick-documentation,.report-source-fold .report-documentation{margin-top:12px}
@media print{
 .report-source-fold{display:none!important}
 #print-view .teacher-student-feedback{padding:2mm;margin:2mm 0;font-size:8.5pt;line-height:1.25}
 #print-view .teacher-student-feedback h3{margin:1mm 0 2mm}
 #print-view .footerprint{margin-top:2mm;padding-top:1mm;font-size:7pt;line-height:1.15}
}


/* V3.63: Bevisst innlasting av lagrede data, uten nye store paneler. */
.shelf-load-choices{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:3px}
.shelf-load-choices .btn{min-height:31px;padding:6px 11px;border-radius:9px;font-size:12px;font-weight:750;background:#fff;color:#234e67;border:1px solid #d3e2e9;box-shadow:none}
.shelf-load-choices button[hidden]{display:none!important}
@media(max-width:650px){.shelf-load-choices{gap:5px}}

/* V3.64: Tydelig datastatus uten å vise navn eller åpne eldre opplysninger ved oppstart. */
.loaded-file-status{font-size:12px;color:#32556b;line-height:1.45;max-width:550px}
.loaded-file-status.has-data{border:1px solid #b7dfd3;background:#effaf5;border-radius:9px;padding:8px 10px;color:#165944}

/* V3.65: Filinnlasting finnes bare inne i åpen fagbok. */
.inside-data-tools{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;padding:4px 16px 10px}
.inside-data-tools .btn{font-size:12px;min-height:36px;background:#f7fafc;border:1px solid #d4e2ea;color:#244c64}
@media(max-width:640px){.inside-data-tools{justify-content:flex-start;padding:6px 12px 12px}.inside-data-tools .btn{flex:1 1 200px}}

/* V3.66: One clear open path and compact assessment evidence. */
.inside-data-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.inside-data-tools .local-copy-options{font-size:12px;color:#4b6678;margin:0;min-width:160px}
.inside-data-tools .local-copy-options summary{cursor:pointer;padding:7px 4px;font-weight:700}
.inside-data-tools .local-copy-options p{max-width:320px;font-size:11px;line-height:1.4;margin:6px 0 0}
.report-tests-compact .term-basis-row{font-size:12px;line-height:1.5}
.report-filter-notice{font-size:12px;color:#705026;background:#fff9eb;border:1px solid #eadcb4;border-radius:8px;padding:9px 12px;margin:10px 0}
@media print {.report-filter-notice{display:none!important}}
