:root {
  --bg: #f3f4f6; --panel: #ffffff; --line: #d6d9de; --text: #1f2933; --muted: #6b7280;
  --accent: #2563eb; --accent-d: #1d4ed8; --ok: #15803d; --warn: #b91c1c;
  --desk: #fffdf6; --desk-line: #8a7a55; --table-bg: #dbeafe; --sel: #f59e0b;
  --topbar-h: 48px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button {
  padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer;
}
button:hover:not(:disabled) { background: #eef2ff; border-color: #c7d2fe; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--accent-d); }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
button.ok:hover:not(:disabled) { background: #166534; }
button.big { padding: 9px 18px; font-weight: 600; }
button.small { padding: 2px 8px; font-size: 12px; }
input[type=text], input[type=number], select, textarea {
  padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
input[type=number] { width: 70px; }
textarea { width: 100%; resize: vertical; margin: 6px 0; }

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #1e293b; color: #fff; flex-wrap: nowrap; height: var(--topbar-h); white-space: nowrap;
}
.brand { font-weight: 700; font-size: 18px; }
.badge-web { font-size: 11px; background: var(--accent); padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.listitem.current { background: #eef6ff; }
.topbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.topbtns button { background: #334155; color: #fff; border-color: #475569; }
.topbtns button:hover { background: #475569; }

.layout { display: grid; grid-template-columns: 450px 1fr; height: calc(100% - var(--topbar-h)); min-height: 0; }
.panel { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding-bottom: 20px; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.tab { border: none; border-radius: 0; border-bottom: 3px solid transparent; padding: 10px 7px; background: none; font-size: 13px; }
.tab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.tabpane { display: none; padding: 12px 14px; }
.tabpane.active { display: block; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px 10px; }
legend { font-weight: 600; padding: 0 4px; }
.row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.row.wrap { flex-wrap: wrap; }
.row.space { justify-content: space-between; }
.row label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
label.check { display: flex; align-items: center; gap: 6px; margin: 5px 0; cursor: pointer; }
label.check.big { align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
label.check.big.disabled { opacity: .45; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
details { margin: 6px 0 12px; }
summary { cursor: pointer; color: var(--accent); }
h4 { margin: 6px 0; }

.stulist { border: 1px solid var(--line); border-radius: 8px; max-height: calc(100vh - 330px); overflow-y: auto; }
.sturow { display: grid; grid-template-columns: 1fr 64px 76px auto 26px; gap: 4px; align-items: center; padding: 4px 6px; border-bottom: 1px solid #eef0f3; }
.sturow:last-child { border-bottom: none; }
.sturow.sel { background: #fef3c7; }
.sturow input[type=text] { border-color: transparent; padding: 3px 5px; width: 100%; }
.sturow input[type=text]:focus { border-color: var(--line); }
.sturow select { padding: 3px; font-size: 12px; }
.pinlbl { font-size: 11px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.del { color: var(--warn); border: none; background: none; font-size: 16px; padding: 0 4px; }

.listbox { border: 1px solid var(--line); border-radius: 8px; min-height: 120px; max-height: 260px; overflow-y: auto; margin-bottom: 6px; }
.listitem { padding: 6px 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px; border-bottom: 1px solid #f0f1f4; }
.listitem:hover { background: #f5f7ff; }
.listitem.sel { background: #dbeafe; }
.listitem .kind { font-size: 11px; padding: 1px 6px; border-radius: 4px; color: #fff; }
.kind.spre { background: #dc2626; } .kind.sammen { background: #16a34a; }
.flaggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.empty { padding: 10px; color: var(--muted); font-style: italic; }
.gendergrp { margin: 6px 0; } .gendergrp > span { font-weight: 600; }

.status { white-space: pre-wrap; font-size: 13px; padding: 8px 10px; border-radius: 8px; margin: 8px 0 12px; display: none; }
.status.show { display: block; }
.status.good { background: #dcfce7; color: #14532d; }
.status.bad { background: #fee2e2; color: var(--warn); }
.status.busy { background: #e0e7ff; color: #312e81; }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stagebar { padding: 8px 14px; display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); background: #fff; }
#mapTitle { font-weight: 700; }
#mapTitle.proposal { color: var(--warn); }
.roomwrap { flex: 1; overflow: auto; padding: 14px; min-height: 0; }
.room { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; transform-origin: 0 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.board { position: absolute; left: 50%; transform: translateX(-50%); width: 46%; height: 34px; background: #334155; color: #fff;
  border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 600; letter-spacing: .5px; pointer-events: none; }
.tablebg { position: absolute; background: var(--table-bg); border-radius: 8px; pointer-events: none; }
.desk { position: absolute; background: var(--desk); border: 1.5px solid var(--desk-line); border-radius: 4px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: grab; user-select: none; touch-action: none; overflow: hidden; }
.desk.sel { outline: 3px solid var(--sel); z-index: 3; }
.desk.dragging { cursor: grabbing; opacity: .85; z-index: 4; }
.desk.pinned { border-color: var(--ok); border-width: 2.5px; }
.desk .nm { font-weight: 700; font-size: 15px; line-height: 1.1; text-align: center; padding: 0 3px; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.desk .nm.wrap { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.desk .lb { position: absolute; left: 3px; top: 1px; font-size: 9px; color: var(--muted); }
.desk .tags { position: absolute; right: 2px; top: 1px; display: flex; gap: 2px; }
.desk .tag { font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 3px; color: #fff; }
.tag.s { background: #dc2626; } .tag.t { background: #16a34a; } .tag.fast { background: var(--ok); }
.desk .bd { position: absolute; bottom: 1px; font-size: 10px; color: #6d28d9; font-weight: 600; }
.desk.empty .nm { color: #c0c4cc; font-weight: 400; font-size: 12px; }
.room.proposal { box-shadow: 0 0 0 3px #fca5a5; }

.ctxmenu { position: fixed; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); z-index: 50; min-width: 200px; padding: 4px 0; }
.ctxmenu button { display: block; width: 100%; text-align: left; border: none; border-radius: 0; padding: 7px 14px; background: none; }
.ctxmenu button:hover:not(:disabled) { background: #eef2ff; }
.ctxmenu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 9px 16px; border-radius: 8px; z-index: 60; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
dialog { border: none; border-radius: 12px; max-width: 640px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,23,42,.4); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; height: auto; }
  .panel { border-right: none; border-bottom: 1px solid var(--line); }
  .roomwrap { min-height: 60vh; }
}
@media print {
  .topbar, .panel, .stagebar #mapHint, .ctxmenu, .toast { display: none !important; }
  .layout { display: block; height: auto; }
  .roomwrap { overflow: visible; padding: 0; }
  .room { box-shadow: none !important; border: none; }
  .desk .bd, .desk .lb { display: none; }
  .desk.sel { outline: none; }
  body { background: #fff; }
}
.sizer { position: relative; }
.printonly { display: none; }
@media print { .printonly { display: block; font-size: 20px; font-weight: 700; margin-bottom: 8px; } }
.panel { overflow-x: hidden; }
#tab-elever fieldset .row, #tab-flagg fieldset .row { flex-wrap: wrap; }
#stuName, #flagName { flex: 1 1 100% !important; }
.sturow { grid-template-columns: minmax(0, 1fr) 78px 76px auto 26px; }
.flaggrid .row { flex-wrap: wrap; }
.flaggrid .row select { flex: 1 1 100%; }
.row label.check { flex-direction: row; font-size: 14px; color: inherit; }

/* --- 1.2: sitteside, skjulte innstillinger, bytt to elever --- */
.desk .sit { position: absolute; background: #1e3a8a; pointer-events: none; }
.desk .sit::after { content: ''; position: absolute; width: 0; height: 0; border: 6px solid transparent; }
.desk .sit-north { left: 2px; right: 2px; top: 2px; height: 4px; }
.desk .sit-north::after { left: 50%; top: 4px; margin-left: -6px; border-top-color: #1e3a8a; }
.desk .sit-south { left: 2px; right: 2px; bottom: 2px; height: 4px; }
.desk .sit-south::after { left: 50%; bottom: 4px; margin-left: -6px; border-bottom-color: #1e3a8a; }
.desk .sit-west { top: 2px; bottom: 2px; left: 2px; width: 4px; }
.desk .sit-west::after { top: 50%; left: 4px; margin-top: -6px; border-left-color: #1e3a8a; }
.desk .sit-east { top: 2px; bottom: 2px; right: 2px; width: 4px; }
.desk .sit-east::after { top: 50%; right: 4px; margin-top: -6px; border-right-color: #1e3a8a; }
.desk.side-west .lb { left: 9px; }
.desk.side-north .lb { top: 6px; }
.desk.side-north .tags { top: 6px; }
.desk.side-east .tags { right: 8px; }
.desk.side-south .bd { bottom: 6px; }
.desk.swapfirst { outline: 3px solid var(--warn); outline-offset: 1px; z-index: 3; }
.room.swapping .desk { cursor: pointer; }
.swapbar { margin-left: auto; color: var(--warn); font-weight: 600; font-size: 13px; }
#btnSwap.active { background: #fef3c7; border-color: var(--sel); font-weight: 600; }
.hiddenopts { margin: 0 0 10px 24px; }
@media print { .desk .sit { background: #555; } .swapbar { display: none !important; } }
/* 1.3: språkvelger, flagg-/fast-merker, stående pulter, sitteretning bare for grupper */
.langsel { background: #334155; color: #fff; border-color: #475569; padding: 4px 6px; }
.tag.s { background: #ea580c; } .tag.t { background: #16a34a; } .tag.fast { background: #dc2626; }
.desk.pinned { border-color: #dc2626; }
.desk.portrait .nm { font-size: 13px; }
.desk.portrait .tags { flex-direction: column; align-items: flex-end; }
label.disabled { opacity: .5; }
@media print { .desk .tags, .desk .bd { display: none !important; } .desk.pinned { border-color: var(--desk-line); border-width: 1.5px; } }
.desk.side-south .bd { bottom: 10px; } .desk.side-west .bd { left: 10px; }
.desk.side-west .nm { padding-left: 10px; } .desk.side-east .nm { padding-right: 10px; } .desk.portrait .nm { padding-left: 8px; padding-right: 8px; }
.desk.portrait.side-west .nm { padding-left: 11px; padding-right: 2px; } .desk.portrait.side-east .nm { padding-right: 11px; padding-left: 2px; }

.stagebar .oldsize { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; border-radius: 4px; padding: 1px 8px; font-size: 12px; }
@media print { .stagebar .oldsize { display: none; } }

/* ---------------- toppfaner og vurdering (1.4.0) ---------------- */
[hidden] { display: none !important; }
.abar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.abar .asep { width: 10px; }
.asubj select { min-width: 200px; margin-left: 4px; }
#aInfo { margin-left: 10px; }
.aempty { padding: 30px; color: var(--muted); font-size: 15px; }
.atabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.atab { border: none; border-radius: 0; border-bottom: 3px solid transparent; background: none; padding: 8px 14px; }
.atab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.apane { display: none; } .apane.active { display: block; }
.gridwrap { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid var(--line); border-radius: 8px; }
table.agrid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.agrid th, .agrid td { border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 0; white-space: nowrap; }
.agrid thead th { position: sticky; background: #f1f5f9; z-index: 2; font-weight: 600; padding: 5px 6px; }
.agrid thead tr.trow th { top: 0; height: 28px; }
.agrid thead tr.hrow th { top: 28px; max-width: 150px; white-space: normal; vertical-align: bottom; font-size: 12px; line-height: 1.25; }
.agrid th.topic { text-align: center; }
.agrid th.topic.c0 { background: #dbeafe; } .agrid th.topic.c1 { background: #e0e7ff; }
.agrid th.planned { color: var(--muted); font-style: italic; }
.agrid .namecol { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 3px 8px; min-width: 120px; cursor: pointer; }
.agrid thead .namecol { z-index: 3; background: #f1f5f9; }
.agrid tbody tr:nth-child(even) td { background: #fafafa; } .agrid tbody tr:nth-child(even) td.namecol { background: #fafafa; }
.agrid tbody tr:hover td { background: #eff6ff; }
.agrid td.cell { position: relative; }
.agrid td.cell input { width: 64px; border: none; background: transparent; text-align: center; padding: 4px 2px; font: inherit; border-radius: 0; }
.agrid td.cell input:focus { outline: 2px solid var(--accent); background: #fff; }
.agrid td.cell input.bad { background: #fee2e2; }
.agrid td.cell.hascom::after { content: ''; position: absolute; right: 0; top: 0; border-left: 7px solid transparent; border-top: 7px solid #f59e0b; }
.agrid td.calc { text-align: center; padding: 3px 8px; color: #334155; } .agrid td.calc.prel { font-weight: 600; }
.agrid td.cell.qual input { color: var(--muted); }
.agrid th.sum, .agrid td.sum { background: #f8fafc; }
.stgrid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.stleft input { width: 100%; margin-bottom: 6px; }
.stlist { border: 1px solid var(--line); border-radius: 8px; max-height: calc(100vh - 300px); overflow-y: auto; }
.stlist div { padding: 5px 8px; cursor: pointer; border-bottom: 1px solid #f0f1f4; }
.stlist div:hover { background: #f5f7ff; } .stlist div.sel { background: #dbeafe; font-weight: 600; }
.sttitle { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.sttwo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fgrid { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }
.fgrid input[type=text] { width: 100%; }
.calcline { font-weight: 600; line-height: 1.6; }
.reasons { margin: 6px 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.teacher { color: #92400e; background: #fef3c7; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; }
table.alist { border-collapse: collapse; width: 100%; font-size: 13px; }
.alist th { text-align: left; background: #f1f5f9; padding: 5px 6px; position: sticky; top: 0; }
.alist td { padding: 4px 6px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.alist tr.planned td { color: var(--muted); font-style: italic; }
.alist tr.sel td { background: #dbeafe; }
.alist tr.clickable { cursor: pointer; }
.aim0 td { background: #fbdada; } .aim1 td { background: #fdf0b5; } .aim2 td { background: #ccefcc; }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0; font-size: 13px; }
.legend span.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid #ccc; }
.aimwrap { max-height: calc(100vh - 330px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.topiclist { min-height: 90px; max-height: 180px; }
dialog.adlg { min-width: 420px; max-width: 760px; border: 1px solid var(--line); border-radius: 10px; }
dialog.adlg h3 { margin: 0 0 10px; }
.aimchecks { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin: 4px 0 8px; }
.aimchecks label { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; padding: 3px 0; }
.dlgbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.grpchecks { max-height: 360px; overflow-y: auto; columns: 2; }
.grpchecks label { display: block; padding: 2px 0; }
.ver { font-size: 11px; opacity: .7; font-weight: 400; }

/* 1.5: varsler, Vurderinger (tidl. registreringsmodus), mål-dekning, fagplan, observasjoner */
.awarns { margin: 0 0 8px; display: grid; gap: 4px; }
.awarn { padding: 6px 10px; border-radius: 6px; font-size: 13px; border: 1px solid; }
.awarn.error { background: #fee2e2; border-color: #f87171; color: #7f1d1d; font-weight: 600; }
.awarn.warn { background: #fef9c3; border-color: #facc15; color: #713f12; }
.awarn.info { background: #e0f2fe; border-color: #7dd3fc; color: #0c4a6e; }
.agrid td.cover { font-variant-numeric: tabular-nums; }
.agrid td.cover.cov0 { background: #fbdada !important; } .agrid td.cover.cov1 { background: #fdf0b5 !important; } .agrid td.cover.cov2 { background: #ccefcc !important; }
.modebar { align-items: center; gap: 6px; margin-bottom: 8px; } .modebar select { min-width: 280px; max-width: 520px; }
.modeinfo { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; display: grid; gap: 3px; font-size: 13px; }
.modehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.modecount { padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.modecount.none { background: #fbdada; } .modecount.part { background: #fdf0b5; } .modecount.full { background: #ccefcc; }
.modewrap { max-height: calc(100vh - 360px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table.modetable td { vertical-align: middle; padding: 2px 6px; }
.modetable td.mname { cursor: pointer; white-space: nowrap; min-width: 140px; }
.modetable input.mval { width: 70px; text-align: center; } .modetable td.mcomcell { width: 60%; } .modetable input.mcom { width: 100%; }
.modetable tr.done td.mname::before { content: '✓ '; color: #16a34a; }
.modetable td.mprel { color: #334155; white-space: nowrap; }
.modetable input.bad { background: #fee2e2; }
.alist tr.excluded td { color: #9ca3af; text-decoration: line-through; } .alist td.exc { text-decoration: none; color: #b91c1c; }
.alist tr.prevrow td { color: #475569; font-style: italic; background: #f8fafc; }
.alist td.share { font-weight: 600; white-space: nowrap; }
.periodrow { gap: 6px; } .periodrow input { width: 90px; }
.obsbadge { background: #ede9fe; color: #4c1d95; border-radius: 999px; padding: 1px 10px; }
.alist td.obsc { background: #ede9fe; color: #4c1d95; font-weight: 600; text-align: center; }
#aObsTable td.obscom { white-space: pre-wrap; } .nowrap { white-space: nowrap; }
dialog.adlg textarea { width: 100%; font: inherit; }
#sAssTable td:nth-child(3) { white-space: nowrap; }
.fgrid input#sPrevP { width: 70px; }
/* 1.5.1: kun denne klassen */
.agrid th.onlycls { background: #fef3c7 !important; }
.alist tr.onlycls td:nth-child(2) { color: #92400e; font-weight: 600; }

/* ================= 2.0: arbeidsområde ================= */
.maintabs { display: flex; gap: 2px; align-self: stretch; align-items: stretch; margin-left: 8px; }
.mtab { border: none; border-radius: 0; background: none; color: #cbd5e1; padding: 0 14px; font-weight: 600; font-size: 14.5px; border-bottom: 3px solid transparent; position: relative; }
.mtab:hover:not(:disabled) { background: #334155; color: #fff; border-color: transparent; }
.mtab.active { color: #fff; border-bottom-color: #60a5fa; background: #0f172a; }
.mtab .dot { position: absolute; top: 7px; right: 2px; background: #f59e0b; color: #1e293b; border-radius: 999px; font-size: 10px; font-weight: 800; width: 15px; height: 15px; line-height: 15px; text-align: center; }
.savestate { color: #86efac; font-size: 12.5px; }
.savestate.bad { color: #fca5a5; font-weight: 700; }
.topbtns { flex-wrap: nowrap; align-items: center; }
.view.page { height: calc(100% - var(--topbar-h)); overflow: auto; padding: 14px 18px 30px; }
.assess { height: calc(100% - var(--topbar-h)); overflow: auto; padding: 10px 14px 20px; background: var(--panel); }
.homebar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.homebar h2 { margin: 0; font-size: 20px; }
.grow { flex: 1; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h3 .count { background: #e2e8f0; color: #334155; border-radius: 999px; font-size: 12px; padding: 1px 9px; }
.homegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.classgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cards .item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); min-width: 0; }
.cards .item:hover { background: #eef2ff; border-color: #a5b4fc; }
.item .iname { font-weight: 700; font-size: 15px; }
.imeta { color: #334155; font-size: 12.5px; }
.isub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.homefoot { margin-top: 4px; }
.emptystate { max-width: 640px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 26px; }
.emptystate h3 { margin-top: 0; font-size: 19px; }
.emptystate ol { line-height: 1.7; padding-left: 20px; }
.notice { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; border: 1px solid; font-size: 13.5px; line-height: 1.5; }
.notice.info { background: #e0f2fe; border-color: #7dd3fc; color: #0c4a6e; }
.notice.warn { background: #fef3c7; border-color: #fbbf24; color: #78350f; }
.notice.bad { background: #fee2e2; border-color: #f87171; color: #7f1d1d; }
.notice.ok { background: #dcfce7; border-color: #86efac; color: #14532d; }
.stutable td { vertical-align: middle; padding: 2px 6px; }
.stutable input.nameinp { width: 100%; border-color: transparent; }
.stutable input.nameinp:focus, .stutable input.nameinp:hover { border-color: var(--line); }
.tablewrap { max-height: calc(100vh - 330px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.kartcls { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.kartcls select { font-weight: 700; min-width: 150px; margin-left: 4px; }
.kartempty { grid-column: 1 / -1; }
.stagebtns { margin-left: auto; display: flex; gap: 6px; }
.oldsizebox { padding: 4px 14px 0; }
.clschecks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.clschecks label.check { margin: 2px 0; }
.forrow { display: grid; gap: 2px; }
.forrow .clschecks { padding-left: 24px; }
.agrid .clscol { padding: 3px 8px; color: #334155; text-align: center; }
.agrid td.cell.na { text-align: center; color: #cbd5e1; background: #f8fafc !important; }
.agrid tbody tr.clsbreak td { border-top: 2px solid #94a3b8; }
.stgrid { grid-template-columns: 260px 1fr; }
.stleft .row input { flex: 1; margin: 0; } .stleft .row select { max-width: 90px; }
.stlist div { display: flex; justify-content: space-between; gap: 6px; }
.stlist .stcls { color: var(--muted); font-size: 12px; }
.profhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profhead h2 { margin: 0; font-size: 21px; }
.profhead label.row { flex-direction: row; font-size: 13px; color: inherit; margin: 0; }
.linkbtn { background: none; border: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
#eSubjects td.prel, #eSubjects td.fin { font-weight: 700; }
#eAssTable input.eval { width: 60px; text-align: center; } #eAssTable input.ecom { width: 100%; }
#eAssTable td { vertical-align: middle; }
#eObsTable td.obscom { white-space: pre-wrap; }
.sttwo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grphead { column-span: all; display: block; margin: 6px 0 2px; }
dialog.adlg.wide { max-width: 900px; }
#dlgNewSubject .fgrid { grid-template-columns: auto minmax(300px, 1fr); }
/* 1366×768: kompakt topplinje */
@media (max-width: 1400px) {
  .mtab { padding: 0 11px; }
  .layout { grid-template-columns: 410px 1fr; }
  .brand .ver { display: none; }
}
@media (max-width: 1100px) {
  .homegrid, .classgrid, .setgrid, .sttwo { grid-template-columns: 1fr; }
  .mtab { padding: 0 8px; font-size: 13.5px; }
  .savestate { display: none; }
}
@media print {
  .topbar, .view.page, .assess, .kartcls, .stagebtns { display: none !important; }
  #viewKart { display: block !important; height: auto; }
}
.stage > .oldsize { margin: 6px 14px 0; align-self: flex-start; background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; border-radius: 4px; padding: 1px 8px; font-size: 12px; }
.kartempty { padding: 40px; font-size: 15px; color: var(--muted); }
@media print { .stage > .oldsize { display: none !important; } }
.stgrid { grid-template-columns: 290px 1fr; }
.stleft .row select { max-width: 120px; }
.finbtns { justify-content: flex-end; }
#eDetail .fgrid input#ePrev { width: 60px; }

/* ---------- 2.1: DLA – navn, autolagring, statistikk, semestre ---------- */
.brand .brand-short { color: #93c5fd; letter-spacing: .5px; }
.brand .brand-long { font-weight: 600; font-size: 14px; color: #e2e8f0; }
@media (max-width: 1300px) { .brand .brand-long { display: none; } }
.savednote { position: fixed; bottom: 10px; right: 14px; background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; font-size: 12.5px;
  padding: 3px 10px; border-radius: 999px; z-index: 55; opacity: 0; transition: opacity .25s; pointer-events: none; }
.savednote.show { opacity: .95; }
@media print { .savednote { display: none !important; } }
#sErr { margin: 6px 0; }
input.bad, select.bad { background: #fee2e2 !important; border-color: #f87171 !important; }
/* statistikkrader nederst i oversikten */
.agrid tfoot td { background: #f8fafc; color: #334155; padding: 3px 6px; text-align: center; font-size: 12.5px; border-bottom: 1px solid #e5e7eb; }
.agrid tfoot tr.statrow td.namecol { text-align: left; font-weight: 600; background: #f1f5f9; position: sticky; left: 0; z-index: 1; }
.agrid tfoot tr.statrow.first td { border-top: 2px solid #94a3b8; }
.agrid tfoot tr.statrow.median td { color: #475569; font-style: italic; }
.agrid tfoot tr.statrow.median td.namecol { font-style: normal; }
.agrid tfoot tr[data-cid="alle"] td { font-weight: 600; }
/* semestre / progresjon */
.semchips, .semline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.semline { margin-top: 3px; font-size: 11.5px; }
.semchip { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; line-height: 1.5; cursor: pointer; }
.semchip.cur { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; font-weight: 600; cursor: default; }
.semchip.old:hover { background: #eef2ff; }
.semarrow { color: #94a3b8; font-size: 11px; }
.semnext { color: var(--muted, #64748b); font-size: 11.5px; margin-left: 4px; }
.termrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 12.5px; }
.termrow input.terminp { width: 52px; padding: 1px 4px; font-size: 12.5px; text-align: center; }
.cards .item.oldsem { opacity: .8; background: #fff; }
.cards div.item { cursor: pointer; }
.levelrow select { padding: 2px 4px; }
.oldsem.awarn { margin-bottom: 8px; }
/* flere temaer per vurdering */
.topicchecks { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; max-width: 520px; }
.topicchecks .newtopic { gap: 4px; flex-wrap: nowrap; }
.topicchecks .newtopic button { white-space: nowrap; }
#sAssTable td.topics { max-width: 180px; white-space: normal; }

/* ---------- 2.2: halvårplan (uke-tidslinje), temaer med mål, statistikkvalg ---------- */
.hphead { margin-bottom: 4px; gap: 12px; }
.gantt { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; user-select: none; }
.gantt .grow { display: grid; grid-template-columns: 200px repeat(var(--n), minmax(0, 1fr)); min-height: 30px; }
.gantt .grow + .grow { border-top: 1px solid #eef0f3; }
.gantt .ghead { background: #f1f5f9; min-height: 22px; font-size: 12px; color: #334155; }
.gantt .gmonth { text-align: center; font-weight: 600; border-left: 1px solid #cbd5e1; padding: 2px 0; text-transform: capitalize; overflow: hidden; white-space: nowrap; }
.gantt .gwk { text-align: center; border-left: 1px solid #e2e8f0; padding: 2px 0; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.gantt .gwk.hol, .gantt .gcell.hol { background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 4px, #e2e8f0 4px, #e2e8f0 6px); }
.gantt .gwk.now { background: #2563eb; color: #fff; font-weight: 700; }
.gantt .gcell.now { box-shadow: inset 2px 0 0 #2563eb; }
.gantt .glabel { padding: 3px 8px; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-right: 1px solid #cbd5e1; cursor: pointer; }
.gantt .ghead .glabel { cursor: default; font-weight: 600; }
.gantt .trow .glabel:hover { background: #eef2ff; }
.gantt .gname { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt .gmeta { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt .gcell { border-left: 1px solid #f1f5f9; }
.gantt .unplanned .gcell { cursor: copy; } .gantt .unplanned .gcell:hover { background: #e0f2fe; }
.gantt .gbar { position: relative; z-index: 1; margin: 4px 1px; border-radius: 6px; border: 1px solid rgba(15,23,42,.25); display: flex; align-items: center;
  cursor: grab; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.08); touch-action: none; }
.gantt .gbar.drag { cursor: grabbing; box-shadow: 0 3px 10px rgba(0,0,0,.25); opacity: .9; }
.gantt .gbtext { flex: 1; font-size: 12px; font-weight: 600; color: #0f172a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; text-align: center; }
.gantt .gh { width: 7px; align-self: stretch; cursor: ew-resize; flex: none; border-radius: 6px; }
.gantt .gh:hover { background: rgba(15,23,42,.18); }
.gantt .gempty { padding: 12px; }
.legend .sw.hol { background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 4px, #cbd5e1 4px, #cbd5e1 6px); }
.legend .sw.now { background: #2563eb; }
.hplegend { margin: 6px 0 2px; flex-wrap: wrap; }
.hpcov { margin-top: 10px; }
.aimprev td { background: #dbeafe; }
td.earlier { color: #1e3a8a; font-size: 12.5px; }
.listitem .tmeta { color: var(--muted); font-size: 12px; }
#eaAims label.auto { background: #eff6ff; border-radius: 4px; }
#eaAims .autotag { color: #1d4ed8; font-size: 11.5px; font-style: italic; }
.statopt { margin: 6px 0 0; gap: 10px; flex-wrap: wrap; font-size: 13px; }

/* ---------------- 2.3: logo, kalender, dagens time, lag grupper, timeplanlegger, timeskjerm ---------------- */
.brand { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.brand .logo { width: 26px; height: 26px; flex: none; display: block; }
.copyright { color: var(--muted); font-size: 11.5px; }
.homefoot .copyright { margin-left: 10px; }
#helpDlg .copyright { margin-top: 10px; }
.todaybar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #c7d2fe; border-left: 4px solid var(--accent); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.todaybar.now { background: #eff6ff; }
.todayic svg { display: block; }
.todaylbl { color: #1e3a8a; }
.todaystate { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 1px 8px; border-radius: 999px; background: #e2e8f0; color: #334155; }
.todaystate.now { background: #16a34a; color: #fff; }
.todayname { font-weight: 700; font-size: 15px; }
.todaytxt { color: #475569; }
.todaybar .grow { flex: 1; }
.semchip.future { border-style: dashed; background: #f8fafc; }
#homeCalendar h3 .hint { font-weight: 400; font-size: 12px; }
.caled .calterms { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.caled .calterms b { margin-left: 10px; } .caled .calterms b:first-child { margin-left: 0; }
.caled input[type=date] { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.caltable td, .caltable th { padding: 3px 6px; }
.caltable input[type=text] { padding: 3px 6px; }
dialog#dlgCalendar { max-width: 780px; }
/* kompetansemål: ingen gul i 2.3 */
.legend .sw { border: 1px solid rgba(0,0,0,.08); }
/* lag grupper */
.ggrid { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 14px; align-items: start; }
.gset .fgrid { grid-template-columns: 120px 1fr; }
.gby label.check { margin: 3px 0; }
.gby .gsub { margin: 0 0 4px 24px; }
.gresult { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.gcard { border: 1px solid #c7d2fe; background: #f8faff; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.gcard .gtitle { font-weight: 700; font-size: 12.5px; color: #1e3a8a; margin-bottom: 2px; }
.gstu { text-align: left; padding: 3px 8px; font-size: 13px; }
.gstu.pick { background: #fef3c7; border-color: var(--sel); font-weight: 600; }
.gcards.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.gcards.small .gname { font-size: 12.5px; }
.gsaved { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
tr.gopen td { background: #f8fafc; }
/* timeplanlegger */
#viewTimeplan .homebar h2 { margin-right: 10px; }
.tptabs { border: none; margin: 0; }
.btnic svg, .ic svg { width: 18px; height: 18px; display: block; }
.ic { display: inline-flex; vertical-align: middle; }
button .btnic { margin-right: 6px; display: inline-flex; vertical-align: -3px; }
.tptable { border-collapse: collapse; width: 100%; }
.tptable th, .tptable td { border: 1px solid #e5e7eb; padding: 4px 6px; text-align: left; vertical-align: middle; }
.tptable th { background: #f1f5f9; font-size: 12.5px; }
.tptable th.today { background: #dbeafe; color: #1e3a8a; }
.tptable .tpsel { width: 100%; min-width: 110px; }
.tptable td.tpcell.filled select { background: #eff6ff; border-color: #bfdbfe; font-weight: 600; }
.tptable input.tptime { padding: 2px 4px; border: 1px solid var(--line); border-radius: 5px; font-size: 12.5px; }
.tptable input.tplabel { padding: 2px 5px; }
.tpbreakrow td { background: #fafaf9; }
.tptable td.tpbreak { text-align: center; color: #78716c; font-style: italic; background: repeating-linear-gradient(135deg, #fafaf9, #fafaf9 6px, #f5f5f4 6px, #f5f5f4 9px); }
.tpgrov { display: grid; grid-template-columns: 1fr 380px; gap: 14px; align-items: start; }
.tpweeknav { gap: 10px; }
.tphol { background: #fef3c7; color: #92400e; border-radius: 999px; padding: 1px 10px; font-size: 12.5px; }
.tpweek td.tplesson { cursor: pointer; background: #fff; min-width: 120px; height: 46px; }
.tpweek td.tplesson:hover { background: #eef2ff; }
.tpweek td.tplesson.planned { box-shadow: inset 3px 0 0 #16a34a; }
.tpweek td.tplesson.sel { background: #dbeafe; outline: 2px solid var(--accent); outline-offset: -2px; }
.tpweek td.tpempty { background: #fcfcfd; }
.tpname { font-weight: 700; font-size: 13px; }
.tptitle { font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.tpmarks { font-size: 11px; color: #15803d; }
.tpslot { white-space: nowrap; width: 80px; }
.tpeditor h3 { margin-bottom: 2px; }
.tpfield { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 0; font-size: 12.5px; color: #475569; }
.tpfield input, .tpfield textarea { margin: 0; }
.tptopic { margin-top: 6px; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 6px; padding: 4px 8px; font-size: 12.5px; }
.tplinks { display: flex; flex-direction: column; gap: 2px; font-size: 12px; margin-top: 4px; word-break: break-all; }
/* timeskjerm (eget uttrykk innenfor DLA-paletten) */
.ts { position: fixed; inset: 0; z-index: 1000; background: linear-gradient(160deg, #0f1e3a 0%, #13305f 55%, #1d4ed8 130%); color: #f8fafc; display: flex; flex-direction: column; padding: 14px 18px 18px; gap: 14px; font-size: 16px; }
.ts .grow { flex: 1; }
.tshead { display: flex; align-items: center; gap: 14px; }
.tslogo { width: 40px; height: 40px; }
.tstitle { font-size: 30px; font-weight: 800; letter-spacing: .2px; }
.tssub { font-size: 16px; color: #bfdbfe; }
.tsbtn { background: rgba(255,255,255,.1); color: #f8fafc; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.tsbtn:hover:not(:disabled) { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.tsbtn.primary { background: #fbbf24; color: #1f2937; border-color: #fbbf24; font-weight: 700; }
.tsbtn.primary:hover:not(:disabled) { background: #f59e0b; }
.tsbtn.small { padding: 2px 9px; font-size: 13px; }
.tsbtn.close { background: rgba(0,0,0,.25); }
.tsgrid { flex: 1; display: grid; grid-template-columns: minmax(330px, 1fr) 1.7fr; gap: 14px; min-height: 0; }
.tscol { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.tscard { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 12px 16px; }
.tscard h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: #bfdbfe; }
.tsclock { font-size: 84px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tsclock::after { content: attr(data-sec); font-size: 30px; color: #93c5fd; margin-left: 6px; font-weight: 600; }
.tsdate { font-size: 18px; color: #dbeafe; text-transform: capitalize; margin: 4px 0 8px; }
.tsprog { height: 10px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.tsbar { height: 100%; width: 0; background: linear-gradient(90deg, #34d399, #fbbf24); border-radius: 999px; transition: width .5s; }
.tsprogtxt { font-size: 15px; color: #e2e8f0; margin-top: 4px; }
.tstimer { font-size: 76px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.05; color: #fde68a; }
.tstimer.run { color: #fff; }
.tstimer.done { color: #f87171; animation: tsblink 1s steps(2) 4; }
@keyframes tsblink { 50% { opacity: .2; } }
.tspresets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.tscard .row { justify-content: center; }
.tssignal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tsmode { display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(255,255,255,.06); color: #e2e8f0; border: 2px solid rgba(255,255,255,.18); border-radius: 14px; padding: 8px 4px; font-size: 14px; }
.tsmode .ic.big svg { width: 34px; height: 34px; }
.tsmode.on.quiet { background: #1d4ed8; border-color: #93c5fd; color: #fff; }
.tsmode.on.whisper { background: #b45309; border-color: #fcd34d; color: #fff; }
.tsmode.on.team { background: #15803d; border-color: #86efac; color: #fff; }
.tsmode.on { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.tsinstrcard { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tsinstr { flex: 1; background: rgba(255,255,255,.95); color: #0f172a; border: none; border-radius: 12px; padding: 14px 18px; margin: 0; line-height: 1.35; resize: none; font-weight: 500; }
.tsname { font-size: 56px; font-weight: 800; text-align: center; padding: 6px 0 2px; color: #fff; min-height: 76px; }
.tsname.pop { animation: tspop .45s ease-out; }
@keyframes tspop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.ts select { background: #fff; }
.ts label.check { color: #e2e8f0; font-size: 14px; }
@media (max-width: 1100px) { .ggrid, .tpgrov { grid-template-columns: 1fr; } }
.stabs { display: flex; }
.stab { border: none; border-radius: 0; border-bottom: 3px solid transparent; background: none; padding: 8px 14px; }
.stab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
/* 2.3: gruppeskjema skal ikke flyte over i resultatpanelet */
fieldset.gset { min-width: 0; overflow: hidden; }
.gset .fgrid { grid-template-columns: 120px minmax(0, 1fr); }
.gset select, .gset textarea, .gset input[type=text] { max-width: 100%; min-width: 0; box-sizing: border-box; }
.gset .gsub select { width: 100%; }
.gset .check { white-space: normal; }

/* ---------- 2.4: hvem og hvor (klassekart) ---------- */
.wishes .wsec { margin: 6px 0 10px; }
.wishes h5 { margin: 4px 0; display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.wishes h5 .kind { font-size: 11px; padding: 1px 7px; border-radius: 4px; color: #fff; }
.kind.zone { background: #7c3aed; }
.wgroup { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; margin: 3px 0; background: #fafbfc; }
.wgroup.new { border-style: dashed; background: transparent; }
.wgroup .wname { font-weight: 600; font-size: 12px; min-width: 70px; }
.wgroup .wname.hint { font-weight: 400; }
.wgroup .wadd { font-size: 12px; padding: 2px 4px; max-width: 150px; }
.wgroup .wdel { margin-left: auto; }
.wchip { display: inline-flex; align-items: center; gap: 2px; background: #e0e7ff; border-radius: 12px; padding: 1px 2px 1px 8px; font-size: 12px; }
.wgroup[data-kind=spre] .wchip { background: #fee2e2; }
.wgroup[data-kind=sammen] .wchip { background: #dcfce7; }
.wzone .wchip { background: #ede9fe; }
.wchip .wx { border: 0; background: transparent; padding: 0 5px; font-size: 13px; line-height: 1; color: #6b7280; }
.wchip .wx:hover { color: #b91c1c; background: transparent; }
.tag.z { background: #7c3aed; }

/* ---------- 2.4: Min timeplan (dra rader, klasse per time) ---------- */
.tptable td.tpdrag { cursor: grab; color: #94a3b8; text-align: center; width: 22px; font-size: 16px; user-select: none; touch-action: none; padding: 0 2px; }
.tptable td.tpdrag:hover { color: var(--accent); background: #eff6ff; }
.tptable th.tpdragh { width: 22px; }
.tptable tr.tpdragging { position: relative; z-index: 5; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.18); opacity: .95; }
.tptable tr.tpdragging td.tpdrag { cursor: grabbing; color: var(--accent); }
.tptable tr.dropbefore td { box-shadow: inset 0 3px 0 var(--accent); }
.tptable tr.dropafter td { box-shadow: inset 0 -3px 0 var(--accent); }
body.tpdragbody { cursor: grabbing; user-select: none; }
.tptable .tpcls { display: block; width: 100%; margin-top: 3px; font-size: 12px; padding: 2px 4px; }
.tptable .tpcls.need { border-color: #f59e0b; background: #fffbeb; }
.tpshow { margin-top: 4px; font-size: 12.5px; }
/* ---------- 2.4: timeskjerm – mål, én nedtelling/lydmåler og arbeidsro i nedtrekkslister ---------- */
.tsgoal { display: flex; align-items: center; gap: 12px; background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.55); border-radius: 14px; padding: 8px 16px; }
.tsgoal .ic svg { width: 26px; height: 26px; color: #fbbf24; }
.tsgoallbl { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: #fde68a; white-space: nowrap; }
.tsgoaltxt { font-size: 26px; font-weight: 700; color: #fff; }
.ts .tssel { font-size: 14px; padding: 3px 6px; border-radius: 8px; text-transform: none; letter-spacing: 0; color: #0f172a; }
.tstoolic .ic svg, .tscard h4 .ic svg { width: 18px; height: 18px; }
.tstimerbtns { gap: 8px; margin-top: 6px; }
.tssignal { display: block; }
.tsmode.none { font-style: italic; color: #94a3b8; padding: 14px; }
.tsmode.on { flex-direction: row; justify-content: center; gap: 14px; font-size: 22px; font-weight: 700; padding: 12px; transform: none; }
.tsmeter { position: relative; height: 34px; background: rgba(255,255,255,.12); border-radius: 10px; overflow: hidden; margin: 6px 0 4px; }
.tsmeterbar { height: 100%; width: 0; background: #34d399; transition: width .1s linear, background .3s; }
.tsmeterbar.warn { background: #fbbf24; } .tsmeterbar.loud { background: #f87171; }
.tsmeterpeak { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; opacity: .7; }
.tsmeterlimit { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 3px dashed #fde68a; }
.tsmetertxt { text-align: center; font-size: 26px; font-weight: 800; min-height: 32px; }
.tsmetertxt.ok { color: #6ee7b7; } .tsmetertxt.warn { color: #fde68a; } .tsmetertxt.loud { color: #fca5a5; animation: tsblink 1s steps(2) 2; }
.tsmeterctl { gap: 12px; align-items: center; }
.tslimit { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #bfdbfe; }
.tsmetermsg { font-size: 14px; color: #dbeafe; text-align: center; min-height: 18px; margin-top: 4px; }
.tsmetermsg.err { color: #fecaca; background: rgba(220,38,38,.18); border-radius: 8px; padding: 4px 8px; }
.tsmeternote { font-size: 11.5px; color: #93c5fd; text-align: center; margin-top: 4px; }
/* 2.4: slett skoleår */
button.danger { color: #b91c1c; border-color: #fecaca; }
button.danger:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; }
.warnbox { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 6px; padding: 6px 10px; font-weight: 600; }
/* 2.4: «Skriv ut klassekart» – bare kartet, stående A4 (arket lages av kart.js) */
#printSheet { display: none; }
@media print {
  body.print-map > *:not(#printSheet) { display: none !important; }
  body.print-map { background: #fff; height: auto; }
  html:has(body.print-map) { background: #fff; }
  body.print-map #printSheet { display: block !important; }
  #printSheet img { display: block; width: 100%; height: auto; max-height: 265mm; object-fit: contain; }
  #printSheet .printfoot { font-size: 10pt; color: #555; margin-top: 4mm; }
}
/* 2.5: lydmåleren i arbeidsro-kortet, «Tema» på timeskjermen, Planlegg time (fag/klasse, Mål/Tema) */
.tsmeterbox { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 8px; }
.tsmeterhead { justify-content: flex-start !important; gap: 8px; align-items: center; color: #bfdbfe; font-size: 14px; }
.tsmeterhead .ic svg { width: 18px; height: 18px; }
.tsmeterhead .tsmetertxt { font-size: 16px; min-height: 0; text-align: left; }
.tsmeterbox .tsmeter { height: 24px; margin: 6px 0 2px; }
.tsmeterbox .tsmeterctl { justify-content: space-between !important; flex-wrap: wrap; gap: 8px; }
.tsmeterdiag { font-size: 11.5px; color: #93c5fd; font-variant-numeric: tabular-nums; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.tsmeterbox .tsmeternote { font-size: 10.5px; }
.tsgoal.topic { background: rgba(147,197,253,.14); border-color: rgba(147,197,253,.55); }
.tsgoal.topic .ic svg { color: #93c5fd; } .tsgoal.topic .tsgoallbl { color: #bfdbfe; }
.tpwho { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 6px 0 8px; padding: 6px 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.tpwho select { max-width: 190px; }
.tpfieldhead { justify-content: space-between; gap: 8px; }
.tpfieldhead select { font-size: 12px; padding: 2px 4px; }
/* 2.5: vurderinger i halvårplanens tidslinje */
/* 2.6: vurderinger lagt over hele ukekolonnen i halvårplanen, farget som temaet */
.gantt { position: relative; }
.gassover { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; display: grid; grid-template-columns: 200px repeat(var(--n), minmax(0, 1fr));
  grid-template-rows: 1fr; pointer-events: none; z-index: 2; }
/* farget bånd via ::before (virker også i eldre nettlesere uten color-mix) */
/* 2.6.1: ingen farget bakgrunn over ukekolonnen – bare symbolene (farget som temaet); .gaband er bare en usynlig plassholder */
.gaband { position: relative; display: flex; align-items: center; justify-content: center; min-height: 24px; background: none; border: none; }
.gamarks { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; }
/* 2.6.1: symbolene i temaets rad – over fargebåndet, midt i ukecella */
.gantt .gamarks.inrow { flex-direction: row; gap: 7px; justify-content: center; align-self: center; justify-self: center; z-index: 3; pointer-events: none; }
.gass { --c: #fff; pointer-events: auto; border: none; padding: 0; width: 15px; height: 15px; transform: rotate(45deg); border-radius: 3px; background: var(--c); cursor: pointer;
  box-shadow: 0 0 0 1.5px #0f172a, 0 0 0 3px #fff; }
.gass.notopic { background: #fff; }
.gass.planned { background: repeating-linear-gradient(45deg, var(--c), var(--c) 3px, #fff 3px, #fff 5px); }
.gass.notopic.planned { background: #fff; box-shadow: 0 0 0 1.5px #64748b, 0 0 0 3px #fff; }
.gass:hover, .gass:focus-visible { outline: none; box-shadow: 0 0 0 2px #f59e0b, 0 0 0 4px #fff; }
tr.flash > td { animation: assflash 2.4s ease-out 1; }
@keyframes assflash { 0%, 40% { background: #fde68a; } 100% { background: transparent; } }
/* 2.5: elevlista i Klassekart – første trykk velger (pekefinger), andre trykk på valgt elev redigerer navnet (tekstmarkør) */
.sturow { cursor: pointer; }
.sturow input.stuname[readonly] { cursor: pointer; background: transparent; }
.sturow input.stuname:not([readonly]) { cursor: text; border-color: var(--accent, #2563eb); background: #fff; }
#roomWrap { cursor: default; }
/* 2.5: venstre kolonne på timeskjermen får plass til lydmåleren i arbeidsro-kortet (1366×768) */
.ts { gap: 10px; }
.tsgrid { gap: 10px; }
.tscol { gap: 10px; overflow-y: auto; scrollbar-width: thin; }
.tscard { padding: 9px 14px; }
.tsclock { font-size: 68px; }
.tsclock::after { font-size: 26px; }
.tsdate { font-size: 16px; margin: 2px 0 6px; }
.tstimer { font-size: 62px; }
#tsSigCard .tsmode.on { padding: 6px; font-size: 19px; }
#tsSigCard .tsmode .ic.big svg { width: 26px; height: 26px; }
#tsSigCard .tsmode.none { padding: 8px; }
.tsmeterbox { margin-top: 8px; padding-top: 6px; }
.tsmeterbox .tsmeter { height: 20px; margin: 4px 0 2px; }
.tsmeterhead .tsbtn { padding: 3px 10px; font-size: 13px; }
.tsmeterbox .tsmetermsg { min-height: 0; margin-top: 2px; }
.tsmeterbox .tsmeternote { margin-top: 2px; }
.tsclock { font-size: 62px; }
.tsmeterbox .tslimit, .tsmeterbox .tslimit span { display: inline-flex; flex-direction: row; align-items: center; }
.tsmeterbox .tslimit input { width: 110px; }
.esemrow { gap: 10px; align-items: center; margin-bottom: 6px; }
.esemrow label.row { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
.esemrow label.row span { display: inline; }

/* ---------- 2.6 ---------- */
/* Min timeplan: egne klokkeslett per dag */
.tpdayh { cursor: pointer; user-select: none; }
.tpdayh:hover { background: #e0ecff; }
.tpdayh.sel { background: #dbeafe; color: #1d4ed8; box-shadow: inset 0 -3px 0 #2563eb; }
.tpdayh .tpowntag { font-size: 12px; }
.tptimeday { color: #1d4ed8; }
.tptime.own { background: #fef3c7; border-color: #f59e0b; }
td.tpdaysel { background: #f0f7ff; }
.tpdevtime { display: block; font-size: 11px; font-weight: 600; color: #dc2626; margin-top: 2px; white-space: nowrap; text-align: center; }
.tptable td.tpbreakdev { font-style: normal; vertical-align: middle; }
.tptable td.tpbreakdev .tpdevtime { margin-top: 0; }
.tpbreaklbl { font-size: 11px; }
.tpdaybar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tslessonsel { max-width: 360px; }
.tslessonsel option.past { color: #94a3b8; }
/* Timeskjerm: egendefinert nedtelling */
.tscustombox { justify-content: center; gap: 6px; margin-bottom: 4px; }
.tscustom { width: 120px; text-align: center; font-size: 18px; padding: 3px 6px; border-radius: 6px; border: 1px solid #94a3b8; }
.tscustom.bad { outline: 2px solid #ef4444; }
.tscustomerr { color: #fca5a5; font-size: 12px; }
/* forrige karakter: bare informasjon */
.prevmiss { color: #b45309; font-size: 12px; font-weight: 600; }
td.prevmiss input::placeholder { color: #b45309; font-weight: 700; }
td.prevauto { color: #475569; font-style: italic; }
.eprevauto { gap: 8px; align-items: baseline; }
.eprevauto b { font-size: 16px; }
.eprev.miss { color: #b45309; }
td.share.none { color: #94a3b8; }
/* klasseliste til Word */
.cldlg .clheads { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 4px 12px; }
.cldlg .clheads label { gap: 4px; }
.cldlg .clnum { width: 24px; color: #64748b; text-align: right; }

/* ---------- 2.7 ---------- */
.eghosthint { margin: 4px 0 10px; padding: 10px 12px; border: 1px dashed #9aa7b8; border-radius: 6px; background: #f4f7fb; color: #33475b; }
.eghosthint b { font-size: 1.05em; }
.eghost { opacity: .5; filter: grayscale(1); pointer-events: none; user-select: none; }
.eghost .ghostname { color: #8a94a3; font-style: italic; }
.deldlg ul { margin: 4px 0 6px 18px; padding: 0; }
.deldlg .delscope { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.delwhat { margin: 8px 0; }
.nsdlg { display: flex; flex-direction: column; gap: 6px; min-width: 460px; }
.nsdlg .nsbox { margin: 0 0 6px 24px; padding: 6px 10px; border-left: 3px solid #cfd8e3; }
.nsdlg .nsbox p { margin: 4px 0; }
#nsEarlyInfo { font-weight: 600; }
#aDelSubject { margin-left: 4px; }
.adlg button.primary.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.diffstate { margin: 2px 0 4px; color: #64748b; } .diffstate.on { color: #15803d; font-weight: 600; }
/* 2.7: kompass i kartet */
.room .compass { position: absolute; right: 6px; bottom: 6px; width: 56px; height: 56px; opacity: .75; pointer-events: none; z-index: 1; }
.room .compass svg { position: absolute; left: 0; top: 0; }
.room .compass .cl { position: absolute; font: 600 10px/1 "Segoe UI", Arial, sans-serif; color: #64748b; }
.room .compass .cn { left: 50%; top: 0; transform: translateX(-50%); }
.room .compass .cs { left: 50%; bottom: 0; transform: translateX(-50%); }
.room .compass .ce { right: 0; top: 50%; transform: translateY(-50%); }
.room .compass .cw { left: 0; top: 50%; transform: translateY(-50%); }
.wchip select.wdir { font-size: 11px; padding: 0 2px; margin-left: 4px; height: 20px; }
/* 2.7: elevlista i Klassekart – fast kolonne for «Fast»-merket (til venstre for nivå), så kolonnene står likt */
.sturow { grid-template-columns: minmax(0, 1fr) 72px 78px 76px 26px; }
.sturow .pinbadge { width: 72px; padding: 2px 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sturow .pinslot { width: 72px; }
/* 2.7: påminnelse om nytt klassekart */
.kartdue { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin: 0 0 8px; padding: 7px 12px; border: 1px solid #c7d2fe; border-left: 4px solid #6366f1; border-radius: 6px; background: #eef2ff; color: #3730a3; font-size: 13px; cursor: pointer; }
.kartdue:hover { background: #e0e7ff; }
.kartdue .kdicon { font-size: 14px; }
.remindrow { margin-top: 6px; gap: 8px; align-items: center; }
/* 2.7: timeskjerm – instruks som punktliste / nummerert liste, følsomhet for lydmåleren */
.tsinstrlist { flex: 1; background: rgba(255,255,255,.95); color: #0f172a; border-radius: 12px; padding: 14px 18px; margin: 0; line-height: 1.35; font-weight: 500; overflow: auto; cursor: text; }
.tsinstrlist ul, .tsinstrlist ol { margin: 0; padding-left: 1.4em; }
.tsinstrlist li { margin: .15em 0; }
.tsinstrlist[hidden], .tsinstr[hidden] { display: none; }
.tsbtn.small.on { background: rgba(255,255,255,.85); color: #0f172a; border-color: #fff; }
.tssens input[type=range] { width: 110px; }
.tssensval { min-width: 1.4em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- 2.8: verktøytips (ⓘ), «Mer…»-menyer, sammenleggbare kort ---------------- */
.infoi { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; font-size: 12px; line-height: 1; font-weight: 600;
  color: #475569; background: #e2e8f0; cursor: help; vertical-align: middle; user-select: none; flex: none; text-transform: none; letter-spacing: 0; }
.infoi:hover, .infoi:focus { background: var(--accent); color: #fff; outline: none; }
.hastip { cursor: help; }
td.hastip, .eaims.hastip, #aCoverage.hastip { text-decoration: underline dotted #94a3b8; text-underline-offset: 3px; }
.tipbox { position: fixed; z-index: 3000; max-width: 380px; background: #0f172a; color: #f8fafc; font-size: 12.5px; line-height: 1.45; padding: 8px 11px; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15,23,42,.35); white-space: pre-line; pointer-events: none; }
details.more { position: relative; display: inline-block; margin: 0; }
details.more > summary { list-style: none; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--text); user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { background: #eef2ff; border-color: #c7d2fe; }
details.more[open] > summary { background: #eef2ff; }
.moremenu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.18);
  padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.moremenu button { text-align: left; border-color: transparent; white-space: nowrap; }
.moremenu button.danger { color: var(--warn); }
.abar details.more > summary { padding: 4px 10px; }
.tiplabel { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; margin-right: 12px; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h3 { margin: 0; color: var(--text); }
details.card > summary h3::before { content: '▸'; color: var(--muted); font-size: 13px; margin-right: 2px; transition: transform .15s; display: inline-block; }
details.card[open] > summary h3::before { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 10px; }
.calcard > summary h3 .hint { font-weight: 400; }
.advcard > summary { display: flex; align-items: baseline; gap: 10px; }
.advgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.subcard { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #f8fafc; }
.subcard h4 { margin: 0 0 6px; font-size: 14px; }
.fsdetails { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 10px 0; background: #fff; }
.fsdetails > summary { color: var(--text); font-weight: 600; }
.fsdetails[open] > summary { margin-bottom: 8px; }
.addstu > summary { font-weight: 600; margin-top: 8px; }
.addstubox { margin: 8px 0; }
legend .infoi, h3 .infoi, h4 .infoi, summary .infoi { margin-left: 4px; }

/* ---------------- 2.8: korktavle ---------------- */
.corkwrap { margin-bottom: 14px; }
.corkhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.corkhead .count { background: #e2e8f0; color: #334155; border-radius: 999px; font-size: 12px; padding: 1px 9px; }
.corkhead .grow { flex: 1; }
.corkadd { display: inline-flex; align-items: center; gap: 5px; }
.corkwrap.folded .corkadd { display: none; }
.cork { --nw: 168px; --nh: 116px; position: relative; height: 196px; border-radius: 10px; overflow: hidden;
  border: 9px solid #8a5a2b; box-shadow: inset 0 0 18px rgba(60,30,5,.45), 0 1px 3px rgba(0,0,0,.25);
  background-color: #c9925a;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(90,50,15,.35) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 70% 60%, rgba(255,230,190,.35) 0 1px, transparent 1.4px),
    radial-gradient(circle at 45% 80%, rgba(110,60,20,.3) 0 1.6px, transparent 2px),
    radial-gradient(circle at 85% 15%, rgba(80,40,10,.3) 0 0.9px, transparent 1.3px),
    radial-gradient(ellipse at 30% 40%, rgba(255,220,170,.25), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(100,55,20,.25), transparent 55%);
  background-size: 9px 9px, 13px 13px, 17px 17px, 7px 7px, 100% 100%, 100% 100%; }
.corkempty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #fff7ed; font-size: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.note { position: absolute; width: var(--nw); height: var(--nh); padding: 4px 8px 8px; border-radius: 2px; transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 4px 8px rgba(0,0,0,.28); cursor: grab; touch-action: none; display: flex; flex-direction: column; user-select: none; }
.note::before { content: ''; position: absolute; top: -5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fca5a5, #b91c1c 70%); box-shadow: 0 2px 2px rgba(0,0,0,.35); }
.note.dragging { cursor: grabbing; box-shadow: 0 10px 18px rgba(0,0,0,.35); transform: rotate(0deg) scale(1.04); z-index: 5; }
.note.n-gul, .notedot.n-gul { background: #fef08a; }
.note.n-rosa, .notedot.n-rosa { background: #fbcfe8; }
.note.n-grønn, .notedot.n-grønn { background: #bbf7d0; }
.note.n-blå, .notedot.n-blå { background: #bfdbfe; }
.note.n-oransje, .notedot.n-oransje { background: #fed7aa; }
.notebar { display: flex; align-items: center; gap: 3px; height: 18px; opacity: 0; transition: opacity .15s; }
.note:hover .notebar, .note:focus-within .notebar, .note.editing .notebar { opacity: 1; }
.notedot { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); cursor: pointer; }
.notedot:hover:not(:disabled) { border-color: #1e293b; transform: scale(1.12); }
.notedot.small { width: 12px; height: 12px; }
.notedot.on { outline: 2px solid #1e293b; outline-offset: 1px; }
.noteact { padding: 0 4px; border: none; background: transparent; font-size: 13px; line-height: 1; color: #334155; }
.noteact:hover:not(:disabled) { background: rgba(255,255,255,.6); }
.noteact.del:hover:not(:disabled) { color: var(--warn); }
.notetext { flex: 1; overflow: hidden; white-space: pre-wrap; word-break: break-word; font: 15px/1.3 "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", cursive; color: #1f2937; }
.notetext.empty { color: rgba(31,41,55,.45); font-style: italic; }
.noteedit { flex: 1; margin: 0; padding: 2px; border: 1px dashed rgba(0,0,0,.3); background: rgba(255,255,255,.4); resize: none; font: 15px/1.3 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; }

/* ---------------- 2.8: plusspoeng og Boblekamp (timeskjermen) ---------------- */
.tsplus h4 { flex-wrap: wrap; }
.tspluscount { font-size: 13px; color: #fde68a; text-transform: none; letter-spacing: 0; font-weight: 600; }
.tsplussearch { width: 150px; font-size: 13px; padding: 3px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.95); text-transform: none; letter-spacing: 0; }
.tsplusgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 5px; max-height: 210px; overflow-y: auto; scrollbar-width: thin; }
.tschip { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #e2e8f0; font-size: 13px; text-align: left; }
.tschip:hover:not(:disabled) { background: rgba(251,191,36,.25); border-color: #fbbf24; }
.tschip.has { border-color: rgba(251,191,36,.6); }
.tschipname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tschipn { font-size: 11px; font-weight: 700; color: #fde68a; min-width: 18px; text-align: right; }
.tschip.pop { animation: tschippop .35s ease-out; }
@keyframes tschippop { 0% { transform: scale(1); } 40% { transform: scale(1.1); background: rgba(251,191,36,.45); } 100% { transform: scale(1); } }
.tsplusempty { color: #cbd5e1; margin: 4px 0; }
.bk { position: absolute; inset: 0; z-index: 20; background: #050b1c; display: flex; flex-direction: column; padding: 12px 18px; gap: 10px; }
.bkbar { display: flex; align-items: center; gap: 10px; }
.bktitle { font-size: 22px; color: #fde68a; }
.bkstatus { color: #cbd5e1; font-size: 16px; }
.bkstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.bkstage canvas { border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* ======================= 2.9 ======================= */
/* Forside: to kolonner – venstre (Klasser, Fag, Min timeplan, skoleårskalender), høyre: korktavla */
.homelayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.homeleft { min-width: 0; }
.homeright { min-width: 0; position: sticky; top: 8px; }
.homeright .corkwrap { margin-bottom: 0; }
.homeright .cork { height: auto; aspect-ratio: 4 / 3; max-height: calc(100vh - 150px); min-height: 280px; }
@media (max-width: 900px) { .homelayout { grid-template-columns: 1fr; } .homeright { position: static; } .homeright .cork { aspect-ratio: 3 / 2; } }
/* korktavla: samme ramme, men glatt lysebrun flate uten tekstur – litt mørkere ved rammen, lysere mot midten */
.cork { background-color: #d2a877; background-image: radial-gradient(ellipse at center, #e6c597 0%, #dcb684 45%, #c99a64 85%, #b98955 100%); background-size: 100% 100%;
  box-shadow: inset 0 0 22px rgba(90,50,15,.35), 0 1px 3px rgba(0,0,0,.25); }
/* Min timeplan på Forsiden (sammenlagt som standard) */
.ttcard > summary, .calcard > summary { cursor: pointer; list-style: none; }
.ttcard > summary::-webkit-details-marker { display: none; }
.ttcard > summary h3 { margin: 0; }
.ttcard > summary h3::before { content: '▸'; color: #64748b; font-size: 13px; transition: transform .15s; display: inline-block; }
.ttcard[open] > summary h3::before { transform: rotate(90deg); }
.ttcard[open] > summary { margin-bottom: 10px; }
.ttcard > summary h3 .hint { font-weight: 400; }
.ttbody .tptable { font-size: 12.5px; }
.ttbody .tptable select.tpsel, .ttbody .tptable select.tpcls { max-width: 96px; font-size: 12px; padding: 2px 3px; }
.ttbody .tptable input.tptime { width: 74px; font-size: 12px; padding: 2px 3px; }
.ttbody .tptable input.tplabel { font-size: 12px; }
.ttbody .tablewrap { overflow-x: auto; }
/* Timeskjerm-fanen (forberedelser) */
.bigbtn { font-size: 17px; padding: 10px 22px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.bigbtn .btnic svg { width: 20px; height: 20px; }
.tsprepcard .tsprepwhat { margin-top: 8px; font-size: 15px; }
.tsprepgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .tsprepgrid { grid-template-columns: 1fr; } }
.tsprepcol .card textarea { width: 100%; box-sizing: border-box; font-size: 15px; margin-bottom: 8px; }
.tsprepfoot { margin-top: 4px; }
.tsprepplus .tscard { background: none; border: none; padding: 0; border-radius: 0; color: inherit; }
.tsprepplus .tscard h4 { color: #334155; text-transform: none; letter-spacing: 0; font-size: 13px; }
.tsprepplus .tsbtn { background: #f1f5f9; color: #0f172a; border-color: var(--line); }
.tsprepplus .tsbtn:hover:not(:disabled) { background: #e2e8f0; border-color: #94a3b8; }
.tsprepplus .tsbtn:disabled { opacity: .5; }
.tsprepplus .tschip { background: #f8fafc; border-color: var(--line); color: #0f172a; }
.tsprepplus .tschip:hover:not(:disabled) { background: #fef3c7; border-color: #f59e0b; }
.tsprepplus .tschip.has { border-color: #f59e0b; background: #fffbeb; }
.tsprepplus .tschipn, .tsprepplus .tspluscount { color: #b45309; }
.tsprepplus .tsplusgrid { max-height: 360px; }
.tsprepplus .tsplussearch { border-color: var(--line); }
/* Timeskjerm: «Trekk en elev» og «Plusspoeng» som sammenlagte knapper som åpner et stort panel */
.tsfolds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tsfold { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px; border-radius: 16px; font-size: 20px; font-weight: 700;
  background: rgba(255,255,255,.1); color: #f8fafc; border: 1px solid rgba(255,255,255,.22); cursor: pointer; }
.tsfold .ic svg { width: 26px; height: 26px; }
.tsfold .ic { color: #fde68a; font-size: 22px; }
.tsfold:hover, .tsfold.on { background: rgba(255,255,255,.2); border-color: #fbbf24; }
.tsfoldn { font-size: 15px; color: #1f2937; background: #fde68a; border-radius: 999px; padding: 1px 9px; }
.tsfoldn:empty { display: none; }
.tspanel { position: absolute; left: 7%; right: 7%; top: 96px; bottom: 5%; z-index: 30; display: flex; flex-direction: column; padding: 18px 22px;
  background: rgba(10,24,52,.97); border: 1px solid rgba(255,255,255,.28); border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.tspanel[hidden] { display: none; }
.tspanelclose { position: absolute; top: 14px; right: 16px; }
.tspanel > .tscard { flex: 1; display: flex; flex-direction: column; min-height: 0; background: none; border: none; padding: 0; }
.tspanel > .tscard h4 { font-size: 20px; padding-right: 110px; }
.tspanel .tsname { font-size: clamp(64px, 11vw, 150px); min-height: 1.4em; display: flex; align-items: center; justify-content: center; flex: 1; }
.tspanel .row select, .tspanel .row .tsbtn { font-size: 20px; }
.tspanel .row .tsbtn.primary { padding: 10px 28px; font-size: 24px; }
.tspanel label.check { font-size: 18px; }
.tspanel .tsplusgrid { flex: 1; max-height: none; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; align-content: start; }
.tspanel .tschip { font-size: 21px; padding: 10px 14px; border-radius: 12px; }
.tspanel .tschipn { font-size: 18px; min-width: 30px; }
.tspanel .tsplussearch { width: 220px; font-size: 17px; padding: 6px 10px; }
.tspanel .tspluscount { font-size: 18px; }
.ts.panelopen .tsgrid { filter: blur(2px) brightness(.7); }
/* Boblekamp utenfor timeskjermen (sikkerhet): dekk hele vinduet */
body > .bk { position: fixed; z-index: 1100; }
/* Halvårplan: vurdering med flere temaer – symbol i hvert temas rad, forbundet med en strek */
.gaw { position: relative; display: inline-flex; pointer-events: none; }
.gaw .gass { pointer-events: auto; }
.gaw.linkdown::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0; height: var(--link, 30px); border-left: 2px dashed rgba(51,65,85,.55); transform: translateX(-1px); z-index: -1; }
.gass.multi { box-shadow: 0 0 0 1.5px rgba(15,23,42,.45); }
/* Elevprofil: plusspoeng og kommentar */
.eplus { margin: 8px 0 4px; padding: 6px 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; font-size: 13px; }
.eplus b { color: #92400e; }
.eplus .eplusday { display: inline-block; margin-right: 8px; white-space: nowrap; }
input.ecom { text-overflow: ellipsis; }
.ttbody .tablewrap { max-height: none; }
.ttbody .tptable .tpsel { min-width: 0; }
.ttbody .tptable th, .ttbody .tptable td { padding: 3px 4px; }
.ttbody .tptable input.tptime { width: 82px; padding: 1px 2px; }
.ttbody .tptable input.tplabel { width: 46px; }
.homelayout.ttopen { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.homeright .corkempty { color: #6b4423; text-shadow: none; }
.tspanel .tsbtn.small { font-size: 15px; padding: 5px 12px; }
.tsprepcol label.row { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: inherit; }
.ts > .bk { z-index: 50; }

/* ---- 2.10: Boblekamp-innstillinger ---- */
.bkset { position: absolute; top: 62px; right: 18px; z-index: 3; width: 500px; max-width: calc(100% - 36px); background: rgba(15,23,42,.96); border: 1px solid #334155;
  border-radius: 12px; padding: 14px 16px 12px; box-shadow: 0 14px 40px rgba(0,0,0,.55); color: #e2e8f0; display: flex; flex-direction: column; gap: 10px; }
.bkset[hidden] { display: none; }
.bksetrow { display: grid; grid-template-columns: 1fr 150px 110px; align-items: center; gap: 10px; font-size: 14px; }
.bksetrow input[type=range] { width: 100%; accent-color: #fbbf24; }
.bksetv { font-variant-numeric: tabular-nums; color: #fde68a; font-weight: 700; text-align: right; font-size: 13.5px; }
.bksetfoot { display: flex; align-items: center; gap: 10px; justify-content: space-between; border-top: 1px solid #1e293b; padding-top: 8px; }
.bksetnote { font-size: 12px; color: #94a3b8; }
.bk .tsbtn.on { background: #334155; border-color: #fbbf24; }
/* 2.10: «Vises på timeskjermen» på samme linje som «Overskrift» */
.tpfield .tpfieldhead { justify-content: flex-start; flex-wrap: wrap; row-gap: 2px; margin: 0; }
.tpfieldhead > label[for] { font-size: inherit; color: inherit; }
.tpfieldhead .tpshow { margin: 0 0 0 auto; display: inline-flex; flex-direction: row; align-items: center; gap: 5px; font-size: 12.5px; color: inherit; white-space: nowrap; }
.tpgrov { grid-template-columns: 1fr 435px; }
.tpfield .tpfieldhead { flex-wrap: nowrap; gap: 6px; }
.tpfieldhead .tpshow { font-size: 12px; gap: 4px; }
.tpfieldhead #tpTitleKind { flex: 0 0 auto; }

/* ======================= 3.0 ======================= */
.toast { z-index: 3000; font-size: 15px; max-width: min(92vw, 640px); text-align: center; }
.toast.ok { background: #166534; }
.toast.ok::before { content: '✓ '; font-weight: 700; }
.toast.info { background: #1e3a8a; }
.ts .toast, body:has(.ts) .toast { font-size: 18px; padding: 12px 22px; }
.tsbtn.saved { background: #166534 !important; border-color: #22c55e !important; color: #fff !important; }

/* ---- 3.0: Min timeplan og Planlegg time – luftigere, tydelige dager/tider, farger per fag og kategori ---- */
.tptopbar { gap: 12px; align-items: center; margin-bottom: 10px; }
.tpab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.tpab.on { border-color: #c7d2fe; background: #eef2ff; }
.tpab .check { font-weight: 600; }
.tpabodd { gap: 6px; font-size: 13px; }
.tpweektype { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .2px; }
.tpweektype.wkA { background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }
.tpweektype.wkB { background: #fce7f3; color: #831843; border: 1px solid #f9a8d4; }
.todaybar .tpweektype { margin-right: 4px; }
.tpsection { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px 10px; margin: 0 0 14px; background: #fff; }
.tpsection.group { border-left: 5px solid #6366f1; background: #fbfbff; }
.tpsechead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.tpsectitle { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.tpapplies { font-weight: 600; font-size: 13.5px; color: #1e3a8a; background: #e0e7ff; border-radius: 999px; padding: 2px 10px; }
.tpsection.group .tpapplies { color: #3730a3; background: #e0e7ff; }
.tpdaychips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tpdaychip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: #eef2ff; border: 1px solid #c7d2fe; font-size: 13px; font-weight: 600; color: #312e81; }
.tpdaychip .tpback { padding: 0 7px; line-height: 20px; border-radius: 999px; }
.tpsecbtns { gap: 8px; margin-top: 10px; }
.spdays { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0; }
.spdays .check.off { color: #94a3b8; }

/* tabellene */
.tptable.tpmal, .tptable.tpweek { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tptable.tpmal th, .tptable.tpweek th { background: #1e293b; color: #f8fafc; font-size: 13px; font-weight: 700; padding: 8px 8px; border-color: #1e293b; letter-spacing: .2px; }
.tptable.tpmal th:first-child, .tptable.tpweek th:first-child { border-top-left-radius: 8px; }
.tptable.tpmal th:last-child, .tptable.tpweek th:last-child { border-top-right-radius: 8px; }
.tptable.tpmal th.tpdayh { text-align: center; font-size: 14px; }
.tptable.tpmal th.tpdayh:hover { background: #334155; }
.tptable.tpmal th.tpdayh.sel { background: #2563eb; color: #fff; box-shadow: inset 0 -3px 0 #93c5fd; }
.tptable.tpweek th.today { background: #2563eb; color: #fff; }
.tptable.tpmal td, .tptable.tpweek td { border-color: #e2e8f0; padding: 6px 8px; }
.tptable.tpmal tr.tplessonrow:nth-child(even) td.tplabelcell, .tptable.tpmal tr.tplessonrow:nth-child(even) td.tptimecell { background: #f8fafc; }
.tptable.tpmal td.tplabelcell input.tplabel { font-weight: 700; text-align: center; }
.tptable.tpmal td.tptimecell { white-space: nowrap; }
.tptable.tpmal .tpdash { color: #64748b; margin: 0 2px; }
.tptable td.tpcell { min-width: 112px; }
.tptable td.tpcell.filled { background: var(--cbg, #eff6ff); box-shadow: inset 4px 0 0 var(--cbar, #2563eb); }
.tptable td.tpcell.filled select.tpsel { background: rgba(255,255,255,.75); border-color: rgba(15,23,42,.18); font-weight: 600; color: #0f172a; }
.tptable td.tpcell.nonext select.tpsel { font-style: italic; }
.tptable .tpnote { display: block; width: 100%; margin-top: 4px; font-size: 12px; padding: 2px 5px; border: 1px solid rgba(15,23,42,.2); border-radius: 5px; background: rgba(255,255,255,.8); box-sizing: border-box; }
.tptable .tpnext { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; color: #334155; white-space: nowrap; cursor: pointer; }
.tptable .tpnext input { margin: 0; }
.tptable td.tpcell.nonext .tpnext { color: #64748b; }
.tptable tr.tpbreakrow td { background: #f5f5f4; }
.tptable td.tpbreak { font-size: 13px; color: #57534e; letter-spacing: .3px; }

/* Planlegg time (ukevisning) */
.tpweekcard .tpweekwrap { margin-top: 10px; }
.tpweekcap { font-size: 13.5px; color: #312e81; background: #eef2ff; border: 1px solid #c7d2fe; border-bottom: none; border-radius: 8px 8px 0 0; padding: 5px 10px; display: inline-block; }
.tptable.tpweek td.tpslot { background: #f8fafc; text-align: center; min-width: 74px; }
.tptable.tpweek td.tpslot b { font-size: 15px; color: #0f172a; }
.tptable.tpweek .tpslottime { font-size: 12.5px; color: #334155; font-variant-numeric: tabular-nums; }
.tpweek td.tplesson { height: 56px; min-width: 130px; background: var(--cbg, #fff); box-shadow: inset 4px 0 0 var(--cbar, transparent); transition: filter .1s; }
.tpweek td.tplesson:hover { background: var(--cbg, #eef2ff); filter: brightness(.96); }
.tpweek td.tplesson.planned { box-shadow: inset 4px 0 0 var(--cbar, #16a34a), inset -4px 0 0 #16a34a; }
.tpweek td.tplesson.sel { outline: 3px solid #1d4ed8; outline-offset: -3px; filter: none; }
.tpweek td.tplesson .tpname { font-weight: 700; color: #0f172a; font-size: 14px; }
.tpweek td.tplesson.nonext .tpname { font-weight: 600; color: #334155; }
.tpweek td.tplesson .tptitle { color: #1e293b; font-size: 12.5px; }
.tpweek td.tpempty { background: #fff; }

/* forklaring */
.tplegend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; font-size: 12.5px; }
.tpchip { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid; border-left-width: 4px; color: #0f172a; font-weight: 600; }
.tpchip.subj { background: linear-gradient(90deg, hsl(212 70% 94%), hsl(146 70% 94%), hsl(350 70% 94%)); border-color: #94a3b8; }

/* timeskjermen: neste time */
.tsnext { margin-top: 10px; font-size: 1.05em; font-weight: 600; color: #e0f2fe; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 6px 12px; }

/* Fag: + Legg til klasse */
#aAddClass { white-space: nowrap; }
.acnew { gap: 10px; margin-top: 10px; align-items: center; }
/* 3.0: åpen timeplan får mer plass; start/slutt står under hverandre (smalere tidskolonne) */
.homelayout.ttopen { grid-template-columns: minmax(0, 2.6fr) minmax(260px, 1fr); }
.tptable.tpmal td.tptimecell input.tptime { display: block; width: 92px; margin: 1px 0; }
.tptable.tpmal td.tptimecell .tpdash { display: none; }
.tptable.tpmal td.tpcell { min-width: 104px; }
.ttbody .tptable select.tpsel, .ttbody .tptable select.tpcls { max-width: 110px; }
.corkempty { padding: 0 18px; text-align: center; }

/* ======================= 3.1 ======================= */
/* «Rediger vurdering»: «%» på samme linje, rett til høyre for prosentfeltet */
.pctbox { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: 0 0 auto; }
.pctbox[hidden] { display: none; }
.pctbox input { width: 5.5em; min-width: 0; flex: 0 0 auto; }
.pctbox .pctsign { font-weight: 600; }
/* 3.1: instruks med punktlister og tekststørrelse */
.rtbox { position: relative; }
.rtedit { --rtbase: 15px; font-size: var(--rtbase); min-height: 4.5em; padding: 8px 10px; border: 1px solid var(--line, #cbd5e1); border-radius: 8px; background: #fff; color: #0f172a; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; cursor: text; }
.rtedit:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.rtedit.empty::before { content: attr(data-placeholder); color: #94a3b8; position: absolute; pointer-events: none; }
.rtedit ul, .rtedit ol { margin: .15em 0; padding-left: 1.4em; }
.rtedit li { margin: .1em 0; }
.rtedit .rt-s { font-size: calc(var(--rtbase) * .75); }
.rtedit .rt-n { font-size: var(--rtbase); }
.rtedit .rt-l { font-size: calc(var(--rtbase) * 1.35); }
.rtedit .rt-xl { font-size: calc(var(--rtbase) * 1.7); }
.rtedit .rt-xxl { font-size: calc(var(--rtbase) * 2.2); }
.rtbar { display: inline-flex; gap: 4px; align-items: center; }
.rtbar select { max-width: 9em; }
/* 3.1: timeskjermen i eget vindu og «Alltid øverst» */
body.tswin { margin: 0; background: #0f1e3a; overflow: hidden; }
.ts .rtedit.tsinstr { flex: 1; overflow-y: auto; border: none; border-radius: 12px; padding: 14px 18px; background: rgba(255,255,255,.95); color: #0f172a; font-weight: 500; box-shadow: none; }
.ts .rtedit.tsinstr:focus { box-shadow: 0 0 0 3px rgba(147,197,253,.6); }
.ts .rtbox { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ts .rtbar .tssel.rtsize { font-size: 13px; padding: 3px 4px; border-radius: 6px; }
.tsbtn.off { opacity: .55; cursor: not-allowed; }
.ts.pip { padding: 8px 10px; gap: 8px; font-size: 14px; }
.ts.pip .tslogo, .ts.pip #tsLesson, .ts.pip #tsFull, .ts.pip .tssub, .ts.pip #tsSigCard, .ts.pip .tsfolds, .ts.pip .tsprog, .ts.pip .tsprogtxt, .ts.pip .tsdate { display: none !important; }
.ts.pip .tshead { gap: 6px; flex-wrap: wrap; }
.ts.pip .tstitle { font-size: 18px; }
.ts.pip .tsgrid { grid-template-columns: minmax(170px, 0.8fr) 1.5fr; gap: 8px; }
.ts.pip .tscol { gap: 8px; }
.ts.pip .tscard { padding: 8px 10px; }
.ts.pip .tsclock { font-size: 34px; }
.ts.pip .tsgoal { font-size: 15px; padding: 6px 10px; }
.ts.pip .tsbtn { padding: 4px 8px; font-size: 12px; }
.ts.pip .tsnext { font-size: 13px; padding: 4px 8px; margin-top: 6px; }
@media (max-width: 460px) { .ts.pip .tsgrid { grid-template-columns: 1fr; } }
/* 3: «Planlegg timen…» like stor som tidsvelgeren til venstre */
.tsprepcard .row.wrap { align-items: center; }
.tsprepcard #tpScreenLesson, #tsPrepPlan.tsprepplan { box-sizing: border-box; height: 34px; font-size: 14px; line-height: 1.2; }
#tsPrepPlan.tsprepplan { padding: 0 14px; white-space: nowrap; }
.tsprepinstr { min-height: 9em; margin: 6px 0 8px; }
.rtrow { gap: 6px; }
/* 3.1: temaer per time i Planlegg time */
.tptopic { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 8px 10px; background: #f8fafc; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; }
.tptopicrow { gap: 6px; align-items: center; }
.tptlabel { font-weight: 600; font-size: 13px; }
.tptchips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tptchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; font-size: 13px; background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.tptchip.own { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.tptchip.off { background: #f1f5f9; color: #94a3b8; border-style: dashed; text-decoration: line-through; }
.tptchip .tptx { border: none; background: none; padding: 0 6px; font-size: 15px; line-height: 1; cursor: pointer; color: inherit; border-radius: 999px; min-height: 0; }
.tptchip .tptx:hover { background: rgba(0,0,0,.08); }
#tpTopicAdd { flex: 1; min-width: 160px; max-width: 280px; }
.tpinstr { min-height: 4.5em; }
/* 3.1: navn på tabellene og visningsmodus for «Min timeplan» */
.tpnameinp { font: inherit; font-weight: 700; font-size: 15px; border: 1px dashed transparent; background: transparent; padding: 2px 6px; border-radius: 6px; min-width: 9em; }
.tpnameinp:hover { border-color: #cbd5e1; background: #fff; }
.tpnameinp:focus { border-color: var(--accent, #2563eb); border-style: solid; background: #fff; outline: none; }
.tpnameinp::placeholder { color: #0f172a; opacity: 1; }
.tpview td.tplesson { cursor: default; }
.tpview td.tplesson:hover { filter: none; }
.tpviewsec { margin-bottom: 12px; }
.tpviewcap { margin: 4px 0 6px; }
#tpEditMal { white-space: nowrap; }
/* 3.1: kompetansemål som koder i «Registrer resultater» */
.aimcodes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.aimcode { font: inherit; font-size: 12px; padding: 1px 8px; min-height: 0; border-radius: 999px; border: 1px solid #cbd5e1; background: #f8fafc; color: #1e3a8a; cursor: pointer; }
.aimcode:hover { background: #eef2ff; }
.aimcode.on { background: #dbeafe; border-color: #60a5fa; }
.aimfull { flex-basis: 100%; margin-top: 4px; padding: 6px 10px; background: #f1f5f9; border-radius: 6px; color: #0f172a; font-size: 13px; }
/* 3.1: Ctrl + klikk tar bort et plusspoeng */
.tschip.drop { animation: tschipdrop .35s ease-out; }
@keyframes tschipdrop { 0% { transform: scale(1); } 40% { transform: scale(.92); background: rgba(148,163,184,.45); } 100% { transform: scale(1); } }
.tsprepcard label.row { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: inherit; }
/* 3.1: kompakt «Alltid øverst» uten rullefelt */
.ts.pip .tscol { overflow: hidden; }
.ts.pip .tscard h4 { flex-wrap: wrap; gap: 4px; font-size: 11px; }
.ts.pip .tscard h4 select { max-width: 84px; font-size: 12px; padding: 2px 4px; }
.ts.pip #tsTimer { font-size: 46px; }
.ts.pip .tsbtn { white-space: nowrap; }
.ts.pip .tsgrid { grid-template-columns: minmax(150px, .75fr) 1.6fr; }
.ts.pip .rtbar .tssel.rtsize { max-width: 7em; }
.ts.pip #tsToolCard .tsbtn { padding: 3px 6px; font-size: 11px; }
.ts.pip #tsToolCard .row, .ts.pip #tsToolCard .tsrow { gap: 4px; flex-wrap: wrap; justify-content: center; }
/* 3.1: ny logo (kula) og liten undertittel «Digital lærerassistent» under DLA */
.brand .logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.brand .brandtext { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand .brand-short { font-size: 17px; }
.brand .brand-long { font-weight: 400; font-size: 10.5px; color: #94a3b8; letter-spacing: .2px; white-space: nowrap; }
@media (max-width: 1300px) { .brand .brand-long { display: inline; } }
@media (max-width: 980px) { .brand .brand-long { display: none; } }
img.tslogo { border-radius: 50%; object-fit: cover; }
/* 3.1: vurderingssymbolene i Halvårsplan dekker ikke lenger temateksten – halvgjennomsiktig fyll i temaets farge,
   rammen (full farge) ligger foran teksten */
.gass { box-sizing: border-box; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2.5px solid var(--c); box-shadow: 0 0 0 1px rgba(15,23,42,.85); }
.gass.planned { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 35%, transparent) 0 3px, transparent 3px 5px); border-style: dashed; }
.gass.notopic { background: rgba(255,255,255,.25); border-color: #475569; box-shadow: 0 0 0 1px #fff; }
.gass.notopic.planned { background: transparent; border-color: #64748b; box-shadow: 0 0 0 1px #fff; }
.gass.multi { box-shadow: 0 0 0 1px rgba(15,23,42,.85); }
.gass:hover, .gass:focus-visible { background: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 0 2px #f59e0b; }
/* 3.1: fargene følger den nye logoen litt – klarere blå aksent og en dempet marineblå topplinje.
   Ingen glød, ingen mørk modus; kontrasten holder på projektor (hvit tekst på aksent ≈ 5:1). Kategori- og fagfargene er uendret. */
:root { --accent: #1769d1; --accent-d: #0f55ad; --navy: #0b1a33; --navy-2: #13284a; --sky: #38bdf8; }
.topbar { background: var(--navy); }
.mtab { color: #c7d5ea; }
.mtab:hover:not(:disabled) { background: var(--navy-2); }
.mtab.active { background: #06101f; border-bottom-color: var(--sky); }
.brand .brand-short { color: #7cc4fa; }
.brand .brand-long { color: #9fb3cf; }
button:hover:not(:disabled) { background: #eaf3fe; border-color: #b9d7fb; }
button.primary:hover:not(:disabled) { background: var(--accent-d); border-color: var(--accent-d); }
a { color: var(--accent); }
a:hover { color: var(--accent-d); }
.toast { background: var(--navy); }
/* 3.1: én klasse valgt i «Vis»: vurderinger for bare andre klasser dempes i Halvårsplan */
.gass.other { opacity: .3; }
.gass.other:hover, .gass.other:focus-visible { opacity: .85; }
.hpallcls { margin: 4px 0 8px; font-size: 13px; padding: 5px 10px; }


/* ===== 3.2 ===== */
/* topplinja: bare kula (den har «DLA» i seg) + liten undertittel ved siden av, midt på kula */
.brand { align-items: center; gap: 8px; }
.brand .logo { width: 34px; height: 34px; }
.brand .brandtext { display: inline-flex; flex-direction: row; align-items: center; align-self: center; line-height: 1; height: 34px; }
.brand .brand-long { display: inline-block; font-weight: 500; font-size: 12px; line-height: 1; color: #b6c6dd; }
.brand .ver { align-self: center; line-height: 1; }
@media (max-width: 980px) { .brand .brand-long { display: none; } }

/* 3.2: notat i timeplancella */
.tpmemo { width: 100%; box-sizing: border-box; font-size: 11.5px; padding: 2px 4px; margin-top: 3px; border: 1px dashed #b8c4d4; border-radius: 4px; background: rgba(255,255,255,.75); }
.tpmemo:focus { border-style: solid; background: #fff; }
.tpmemotxt { font-size: 11.5px; color: #475569; font-style: italic; margin-top: 1px; overflow-wrap: anywhere; line-height: 1.25; }
/* 3.2: like brede dagkolonner i alle timeplantabeller */
table.tptable, table.tpweek { table-layout: fixed; width: 100%; }
table.tptable th.tpslothead, table.tptable td.tpslot, table.tpweek th.tpslothead, table.tpweek td.tpslot { width: 92px; }
table.tptable td, table.tptable th, table.tpweek td, table.tpweek th { overflow-wrap: anywhere; }
table.tpmal { table-layout: fixed; width: 100%; }
table.tpmal th.tpdragh { width: 22px; }
table.tpmal th.tplabh { width: 64px; }
table.tpmal th.tptimeh { width: 112px; }
table.tpmal th.tpctlh { width: 86px; }
table.tpmal td.tpcell select, table.tpmal td.tpcell input.tpnote, table.tpmal td.tpcell input.tpmemo { max-width: 100%; }
table.tpmal td.tpcell select { width: 100%; box-sizing: border-box; }

/* 3.2: plusspoeng i elevprofilen – kan foldes ut */
details.eplusbox > summary { cursor: pointer; list-style: revert; }
details.eplusbox .epluslist { margin-top: 6px; }
details.eplusbox .epluslist td.num { text-align: right; font-weight: 600; color: #15803d; }
details.eplusbox tr.nolesson td { color: #64748b; }

/* ===== 3.2: Innstillinger ===== */
.setnav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: 13.5px; }
.setnav a { color: var(--accent); text-decoration: none; }
.setnav a:hover { text-decoration: underline; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 14px; align-items: start; }
.setcard { margin: 0; scroll-margin-top: 60px; }
.setcard h3 { margin-top: 0; }
.setrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.setrow .setl { min-width: 210px; color: #334155; }
.setrow input[type=text], .setrow textarea { flex: 1 1 200px; min-width: 160px; }
.setrow output { min-width: 70px; font-variant-numeric: tabular-nums; color: #475569; }
.setcheck { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
#setDanger { border-color: #fecaca; }
#setDanger h3 { color: #b91c1c; }
button.danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
button.danger:hover { background: #fef2f2; }
button.linkbtn { background: none; border: none; color: var(--accent); padding: 4px 2px; box-shadow: none; text-decoration: underline; cursor: pointer; }
.codebox { margin: 8px 0; }
.backupcode { font: 700 26px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 2px; padding: 10px 14px; background: #f1f5f9; border: 2px dashed #94a3b8; border-radius: 8px; display: inline-block; user-select: all; }
.lockbtn { font-size: 15px; padding: 3px 8px; }

/* ===== 3.2: låseskjermen – dekker alt ===== */
body.locked > *:not(#lockDlg):not(script) { visibility: hidden !important; }
dialog.lockdlg { border: none; border-radius: 16px; padding: 28px 32px; width: min(460px, 92vw); box-shadow: 0 30px 80px rgba(0,0,0,.45); text-align: center; }
dialog.lockdlg::backdrop { background: var(--navy, #0b1a33); }
.lockhead { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lockhead h2 { margin: 4px 0 0; }
.locklogo { width: 72px; height: 72px; border-radius: 50%; }
.lockrow { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.lockpin { font-size: 26px; letter-spacing: 8px; width: 7.5em; text-align: center; padding: 6px 8px; }
.lockmsg { color: #b91c1c; min-height: 1.2em; margin: 4px 0; }
.lockbtns { justify-content: center; gap: 10px; margin-top: 10px; }
dialog.lockdlg p { text-align: left; }
dialog.lockdlg p.hint, dialog.lockdlg .lockmsg { text-align: center; }

/* ===== 3.2: fargetema ===== */
html[data-theme=green] { --accent: #15803d; --accent-d: #166534; --navy: #0f2a1d; --navy-2: #173d2a; --sky: #4ade80; }
html[data-theme=purple] { --accent: #7c3aed; --accent-d: #6d28d9; --navy: #1e1238; --navy-2: #2c1b52; --sky: #c084fc; }
html[data-theme=red] { --accent: #b91c1c; --accent-d: #991b1b; --navy: #2a0c0f; --navy-2: #45151a; --sky: #fca5a5; }
html[data-theme=slate] { --accent: #475569; --accent-d: #334155; --navy: #1e293b; --navy-2: #334155; --sky: #94a3b8; }

/* ===== 3.2: mørk modus – hele siden snus (lys ↔ mørk) med samme fargetoner; bilder, lerret og video snus tilbake ===== */
html.dark { background: #fff; filter: invert(.9) hue-rotate(180deg); }
html.dark img, html.dark canvas, html.dark video, html.dark .backupcode { filter: invert(1) hue-rotate(180deg); }
html.dark .topbar { filter: invert(1) hue-rotate(180deg); }
html.dark .topbar img { filter: none; }
@media print { html.dark { filter: none; } html.dark img, html.dark canvas, html.dark .topbar { filter: none; } }

/* ===== 3.2: landssnitt fra SSB ved endelig karakter ===== */
.ssbline { margin: 4px 0 6px; font-size: 13.5px; color: #334155; }
.ssbline .ssbtxt { background: #eef6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 10px; display: inline-block; cursor: help; }
.ssbline .ssbstale { color: #92400e; font-size: 12.5px; }

/* ===== 3.2.1: Halvårsplan – heltrukken strek mellom symbolene (samme farge som symbolets ytre ramme; hvit i mørk modus via fargesnuingen) ===== */
.gaw.linkdown::after { border-left: 2px solid rgba(15,23,42,.85); }

/* ===== 3.2.1: Post-it-tavle – rolig: lys nøytral bakgrunn, myke lappfarger, svak skygge, litt skrå, ingen nål ===== */
.cork, .homeright .cork { border: 1px solid #e2e8f0; border-radius: 12px; background: #f7f7f4; background-image: none; box-shadow: inset 0 1px 2px rgba(15,23,42,.04); }
.corkempty, .homeright .corkempty { color: #64748b; text-shadow: none; }
.note { border-radius: 3px; box-shadow: 0 2px 6px rgba(15,23,42,.12), 0 1px 1px rgba(15,23,42,.06); }
.note::before { display: none; }
.note.dragging { box-shadow: 0 10px 22px rgba(15,23,42,.2); }
.note.n-gul, .notedot.n-gul { background: #fff4b3; }
.note.n-rosa, .notedot.n-rosa { background: #fde1ea; }
.note.n-grønn, .notedot.n-grønn { background: #d3f4e2; }
.note.n-blå, .notedot.n-blå { background: #d9eafc; }
.note.n-lilla, .notedot.n-lilla { background: #e8e0fb; }
.note.n-oransje, .notedot.n-oransje { background: #ffe5cf; }
.noteact { min-width: 26px; min-height: 26px; }
.noteact.del { font-size: 22px; font-weight: 600; line-height: 22px; padding: 0 6px; border-radius: 6px; }
.notebar { height: 26px; }
.corktrash { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%) scale(.9); width: 52px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(255,255,255,.92); border: 1.5px dashed #94a3b8; color: #475569; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s, background .15s; z-index: 1000; }
.cork.trashon .corktrash { opacity: 1; transform: translateX(-50%) scale(1); }
.corktrash.hot { background: #fee2e2; border-color: #dc2626; border-style: solid; transform: translateX(-50%) scale(1.15) !important; }

/* ===== 3.2.1: PIN som fire sifferbokser (mobilstil) ===== */
.pinboxes { display: inline-flex; gap: 10px; justify-content: center; }
.pinbox { width: 48px; height: 56px; box-sizing: border-box; text-align: center; font-size: 30px; line-height: 1; padding: 0; border: 2px solid #cbd5e1; border-radius: 10px;
  background: #f8fafc; caret-color: transparent; color: #0f172a; -webkit-text-security: disc; transition: border-color .12s, box-shadow .12s, background .12s; }
.pinbox:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pinbox::selection { background: transparent; }
.pinboxes.shake { animation: pinshake .35s; }
.pinboxes.shake .pinbox { border-color: #dc2626; }
@keyframes pinshake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pinpair { display: grid; grid-template-columns: auto auto; align-items: center; gap: 10px 14px; justify-content: center; margin: 10px 0; }
.pinlbl { color: #475569; font-size: 14px; text-align: right; }
.lockalt { font: 600 18px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; width: 12em; text-align: center; padding: 6px 8px; }
#setCurPin { margin: 6px 0 4px; }

/* ================= 3.3 ================= */
/* halvårsplan: forbindelsesstreken stopper ved kanten (spissen) av symbolene */
.gaw.linkdown::after { top: var(--link-top, 50%); height: var(--link, 30px); z-index: 0; }
/* ny logo: kula med «DLA» og «Digital lærerassistent» sentrert under; høyere mørkeblå topplinje bak fanene */
:root { --topbar-h: 62px; }
.topbar { padding-left: 6px; }
.brand { position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 2px; align-self: stretch; padding: 3px 12px 4px 10px; min-width: 132px; }
.brand .logo { width: 38px; height: 38px; border-radius: 50%; }
.brand .brandtext { height: auto; display: block; }
.brand .brand-long { display: block !important; font-size: 11px; font-weight: 500; letter-spacing: .3px; color: #dbe6f6; text-align: center; line-height: 1.1; }
.brand .ver { position: absolute; top: 4px; right: 2px; font-size: 9.5px; display: inline !important; }
.mtab { font-size: 14px; padding: 0 12px; }
.mtabsok::before { content: '⌕ '; font-weight: 700; }
@media (max-width: 1300px) { .mtab { padding: 0 9px; font-size: 13.5px; } .topbar { gap: 8px; } }
@media (max-width: 1100px) { .mtab { padding: 0 6px; font-size: 12.5px; } .brand { min-width: 112px; padding: 3px 6px; } .brand .brand-long { font-size: 10px; } .topbtns .savestate { display: none; } }
/* Fag-linja: «Eksporter…» helt til høyre, ingen linjeskift på små skjermer */
.abar { flex-wrap: nowrap; }
.abar .abargrow { flex: 1 1 0; min-width: 0; }
.abar #aInfo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.abar select { max-width: 220px; }
@media (max-width: 1320px) { .abar #aInfo { display: none; } .abar { gap: 4px; } .abar button, .abar summary { padding-left: 8px; padding-right: 8px; } }
@media (max-width: 1100px) { .abar select { max-width: 150px; } .abar .asubj { font-size: 13px; } .abar button, .abar summary { font-size: 13px; padding-left: 6px; padding-right: 6px; } }
.abar details.more .moremenu { right: 0; left: auto; }
/* klasseavkrysning (bare der det trengs) */
.clsfilter { gap: 12px; margin: 2px 0 8px; flex-wrap: wrap; align-items: center; }
.clsfilter label.check { font-weight: 600; }
/* Fagoppsett og Vurderingsplanlegger */
.oppgrid { grid-template-columns: minmax(420px, 1.1fr) 1fr; }
#ap-plan fieldset { width: 100%; box-sizing: border-box; }
.planlist { width: 100%; }
.planlist td.rowact { white-space: nowrap; text-align: right; }
.planlist td.rowact button { margin-left: 4px; }
tr.aeditrow > td { background: #f1f6ff; padding: 10px 12px; border-top: 2px solid var(--accent, #2563eb); border-bottom: 2px solid var(--accent, #2563eb); }
.aedit .aedithead { font-size: 15px; }
.aedit .fgrid { margin: 6px 0; }
.aedit .aimchecks { max-height: 220px; overflow: auto; }
.aedit > .row:last-child { margin-top: 8px; }
/* halvårsplan per klassegruppe */
.hpplans { margin: 2px 0 8px; gap: 6px; align-items: center; }
/* deling */
.sharedlg h4 { margin: 12px 0 4px; }
.shlist { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }
.shrow { display: flex; flex-direction: column; gap: 2px; }
.shrow .row { gap: 14px; }
.shnames { margin-left: 22px; }
.shprivacy { margin-top: 8px; font-weight: 600; }
.shpreview { margin: 6px 0 10px 18px; }
.hint.indent { margin: 0 0 8px 26px; }
/* vekter */
.wvals { gap: 12px; margin: 2px 0 8px; }
.wval { display: inline-flex; gap: 4px; align-items: center; }
/* Søk */
.sokbar { gap: 10px; align-items: center; margin-bottom: 12px; }
#sokQ { font-size: 17px; padding: 8px 12px; width: min(560px, 70vw); border-radius: 10px; border: 1.5px solid #94a3b8; }
#sokQ:focus { outline: none; border-color: var(--accent, #2563eb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2563eb) 25%, transparent); }
.sokgroup { margin: 0 0 14px; max-width: 900px; }
.sokgroup h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .4px; color: #475569; margin: 0 0 4px; }
.sokhit { display: flex; width: 100%; justify-content: space-between; gap: 14px; text-align: left; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 7px 12px; margin: 0 0 4px; cursor: pointer; }
.sokhit:hover, .sokhit:focus-visible { border-color: var(--accent, #2563eb); background: #f1f6ff; }
.sokhit .sokt { font-weight: 600; }
.sokhit .soks { color: #64748b; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note.flash { animation: assflash 2.4s ease-out 1; }
.abar .asubj { display: inline-flex; align-items: center; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.abar .asubj select { min-width: 120px; }
.abar > button, .abar summary { white-space: nowrap; flex: none; }
.abar details.more { flex: none; }
@media (max-width: 1100px) { .abar .asubj select { min-width: 0; max-width: 150px; } .abar .asubj { gap: 0; } }
.shrow label.check.shnames { margin-left: 24px; }

/* ================= 4.0: innlogging, oppstartsveiviser, lagringsvalg ================= */
body.loginwall > *:not(dialog) { filter: blur(3px); }
.logindlg { border: none; border-radius: 16px; padding: 28px 32px 18px; width: min(460px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.logindlg::backdrop { background: linear-gradient(160deg, var(--navy, #0b1a3a), var(--navy-2, #13284f)); }
.loginhead { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; }
.loginhead h2 { margin: 0; font-size: 22px; }
.loginlogo { width: 84px; height: 84px; }
.loginlead { font-size: 16px; font-weight: 600; margin: 8px 0; }
.loginrow { justify-content: center; margin: 14px 0; gap: 8px; }
.loginbtn { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; padding: 10px 18px; }
.gmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; font-size: 14px; }
.loginmsg { color: #b91c1c; min-height: 1.2em; margin: 6px 0; }
.loginlang { margin-top: 8px; font-size: 13px; }
.mocknote { background: #fff7d6; border: 1px solid #f0d36b; color: #6b5200; border-radius: 8px; padding: 6px 10px; font-size: 13px; text-align: left; }
.mockbadge { background: #f59e0b; color: #1f1300; font-weight: 700; font-size: 12px; border-radius: 10px; padding: 2px 8px; margin-right: 6px; cursor: help; white-space: nowrap; }
.dlabanner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 900; display: flex; flex-direction: column; gap: 6px; max-width: min(760px, 94vw); }
.dlabanner .bnrow { display: flex; align-items: center; gap: 10px; background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; border-radius: 10px; padding: 8px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.12); font-size: 14px; }
.dlabanner .bnrow span { flex: 1; }
.stchooser { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.stopt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #d6dbe4); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--card, #fff); }
.stopt.on { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #2563eb) 25%, transparent); }
.stopt.off { opacity: .7; cursor: default; }
.stopt input { margin-top: 4px; }
.stbody { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.stbody .hint.warn { color: #9a3412; }
.stbody .hint.privacy { color: #1e3a8a; background: #eef2ff; border-radius: 6px; padding: 4px 8px; }
.ststatus { font-size: 13px; color: var(--muted, #556); margin: 2px 0 0; }
.setupdlg { width: min(680px, 94vw); }
.setupdlg .wzlead { font-weight: 600; }
.setupdlg .dlgbtns #wzSkip { margin-right: auto; }
.wzdots { display: flex; gap: 6px; justify-content: center; margin-bottom: 4px; }
.wzdots span { width: 9px; height: 9px; border-radius: 50%; background: #cfd6e2; }
.wzdots span.on { background: var(--accent, #2563eb); }
.wzdots span.done { background: color-mix(in srgb, var(--accent, #2563eb) 50%, #fff); }
.savestate[data-sync="file"]::after { content: " · fil"; opacity: .75; }
.savestate[data-sync="drive"]::after { content: " · Disk"; opacity: .75; }
html[lang="en"] .savestate[data-sync="file"]::after { content: " · file"; }
html[lang="en"] .savestate[data-sync="drive"]::after { content: " · Drive"; }
