/* Kelrodis look (spec 014): the tokens and component values as they are. Phone first (390px),
   no framework. The brief's rules: text never below 15px, inputs 16px, tap targets at least 44px. */

/* --- Font: Inter (variable, latin + latin-ext for Lithuanian), self-hosted; licence in fonts/OFL.txt. --- */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens: one place for colour, radius and shadow (a brand colour setting can later override --brand*). --- */
:root {
  --bg: #f4f5f9; --surface: #ffffff; --ink: #14161f; --ink-2: #5d6275; --line: #e6e8ef;
  --brand: #2f8f7a; --brand-2: #1f6f5e; --brand-soft: #e3f3ef; --brand-light: #4fb39c; /* --brand-light: the brand mark's gradient end */
  --danger: #d1453b; --danger-soft: #fde9e7; --warn: #b7790b; --warn-soft: #fdf3df; --info: #4a63e0; --info-soft: #e8ecfd;
  /* Text shades (Danielius 2026-10-29: easier to read for older instructors): the green, yellow and red
     one step darker wherever they carry text, so every text/background pair is >= 4.5:1. The shades above
     stay for fills that carry no text (brand mark, borders, focus rings, left bars). */
  --brand-ink: #2a7f6c; --danger-ink: #b42f26; --warn-ink: #7a5208; --info-ink: #3b50c4;
  --radius: 14px; --radius-sm: 12px; --radius-xs: 10px; --radius-pill: 999px; --radius-round: 50%;
  --on-fill: #ffffff; /* text on a coloured fill (main button, chosen chip, toast) */
  --neutral-soft: #eef0f4; /* the grey fill: Neatvyko pill, a closed time */
  --avatar-from: #5b5fc7; --avatar-to: #8b8fe6;
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent), 0 4px 16px color-mix(in srgb, var(--ink) 6%, transparent);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --tap: 44px;
}

/* --- Base: page background, type, headings. --- */
*, *::before, *::after { box-sizing: border-box; }
/* D 2026-11-15: no browser tap flash (the blue box Android draws over a tapped link — over the whole screen for a
   pop-up's dimmed background); it is inherited, so this covers every link, button and field. What is pressed shows it
   itself (:active below and on the buttons). */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.ph-tabs a:active, .dchip:active, a.ev:active, .nav-item:active, .btn:active { filter: brightness(.94); }
body { margin: 0; min-height: 100vh; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: 22px; letter-spacing: -.01em; }
h2 { font-size: 19px; }
p { margin: 0; }
ul, ol { margin: 0; }
small { font-size: 15px; }
a { color: var(--brand-2); }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; } /* components with their own display (buttons, rows) still hide */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Brand mark: rounded square with the school's first letter, next to the school name. --- */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: var(--radius-xs); display: grid; place-items: center; flex: none; font-weight: 700; color: var(--on-fill); background: linear-gradient(135deg, var(--brand), var(--brand-light)); }
.brand-text { min-width: 0; font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-text > span, .brand-text small { display: block; overflow-wrap: anywhere; } /* F1a: a long school name wraps at 360px, never cut with "…" */
.brand-text small { font-weight: 400; color: var(--ink-2); }

/* --- Top bar (instructor, student): school on the left, "Atsijungti" on the right. --- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logout { margin: 0; flex: none; }

/* --- Page content column: phone padding, centred; wider for the admin. --- */
.content { width: 100%; max-width: 40rem; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.narrow { width: 100%; max-width: 48rem; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; } /* centred in the page (D 2026-11-13) */

/* --- Admin shell: phone = top bar + scrolling pill tabs; desktop (>= 64rem) = the left sidebar. --- */
.adm { min-height: 100vh; }
.adm-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand user" "links links"; align-items: center; gap: 8px 12px; padding: 8px 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.adm-nav .brand { grid-area: brand; }
.nav-user { grid-area: user; display: flex; align-items: center; gap: 10px; }
.nav-user-name { display: none; }
.adm-links { grid-area: links; display: flex; gap: 6px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.nav-item { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 10px 14px; border-radius: var(--radius-pill); white-space: nowrap; color: var(--ink-2); background: var(--bg); font-weight: 500; text-decoration: none; }
.nav-item:hover { color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.adm-main { max-width: 72rem; }
.adm-main:has(> .admin-cal) { max-width: none; } /* the Kalendorius takes the whole width (D 2026-11-12) */
@media (min-width: 48rem) { .adm-main:has(table.instructors, .students-table) { max-width: none; } } /* so do Instruktoriai and Mokiniai on a computer */
.adm-nav .nav-toggle { display: none; } /* phone: no folding */
.adm-top { display: none; } /* phone: the school stays in the top bar */
@media (min-width: 64rem) {
  .adm { display: grid; grid-template-columns: 220px minmax(0, 1fr); transition: grid-template-columns .22s ease; }
  .adm-nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 12px; border-bottom: 0; border-right: 1px solid var(--line); overflow: hidden; }
  .adm-nav .brand { display: none; } /* D 2026-11-12: the school sits top right of the page (.adm-top) */
  .adm-links, .nav-user { width: 196px; transition: opacity .18s, visibility .18s; } /* fixed width: nothing reflows while the menu slides */
  .adm-links { flex-direction: column; gap: 4px; overflow: visible; }
  .nav-item { border-radius: var(--radius-xs); padding: 10px 12px; background: transparent; }
  .nav-item:hover { background: var(--bg); color: var(--ink); }
  .nav-item[aria-current="page"] { background: var(--brand-soft); }
  .adm-links { flex: 1; }
  .adm-links [data-note-open] { margin-top: auto; } /* D 2026-11-12: Pastaba at the menu's foot, over the account's line */
  .nav-user { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
  .nav-user-name { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
  .nav-user .logout button { width: 100%; justify-content: flex-start; }
  .adm-main { margin: 0; padding: 24px 28px 40px; }
  /* D 2026-11-12: ☰ at the menu's top slides it shut and open. Folded: a narrow strip with ☰ only
     (static/core/nav.js remembers it). */
  .adm-nav .nav-toggle { display: inline-flex; align-self: flex-start; margin: -8px 0 4px 2px; }
  .nav-closed .adm { grid-template-columns: 64px minmax(0, 1fr); }
  .nav-closed .adm-nav > :not(.nav-toggle) { opacity: 0; visibility: hidden; }
  /* the school, top right on every admin screen; on the Kalendorius it shares the row with Šiandien ‹ › */
  .adm-top { display: flex; justify-content: flex-end; margin: -8px 0 -4px; }
  .adm-top .brand-text { text-align: right; }
  .adm-main:has(> .admin-cal) { position: relative; }
  .adm-main:has(> .admin-cal) > .adm-top { position: absolute; top: 18px; right: 20px; margin: 0; }
  /* Mokiniai / Instruktoriai: the school on the title's row (D 2026-11-13) */
  .adm-main:has(> .list-tools) { position: relative; }
  .adm-main:has(> .list-tools) > .adm-top { position: absolute; top: 24px; right: 28px; margin: 0; }
  /* a profile / form page (.narrow, centred): the school on the name's row, its right edge on the column's (D 2026-11-13) */
  /* D 2026-11-13: the column centred in the whole screen (the menu's width + the page's padding = --side), as wide
     as fits; the school on the name's row, its right edge on the column's */
  .adm { --side: 248px; }
  .nav-closed .adm { --side: 92px; }
  .adm-main:has(> .narrow) { position: relative; max-width: none; --w: min(56rem, calc(100vw - 2 * var(--side))); }
  .adm-main > .narrow { max-width: var(--w); margin: 0 0 0 calc(50vw - var(--w) / 2 - var(--side)); }
  .adm-main:has(> .narrow) > .adm-top { position: absolute; top: 20px; right: calc(50vw - var(--w) / 2); margin: 0; }
}

/* --- Page header: h1 + optional sub line on the left, the main action on the right. --- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1::first-letter { text-transform: uppercase; }
.page-head > div { min-width: 0; }
.sub { margin: 2px 0 0; color: var(--ink-2); }

/* --- Card: white surface, rounded, soft shadow. --- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2 { margin: 0; }

/* --- Buttons: primary (brand fill) by default; .secondary, .danger, .link; all at least 44px tall. --- */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 8px 14px; border: 1px solid var(--brand-ink); border-radius: var(--radius-xs); background: var(--brand-ink); color: var(--on-fill); font: inherit; font-size: 15px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 28%, transparent); transition: background .15s, transform .1s; }
button:hover, .button:hover { background: var(--brand-2); }
button:active, .button:active { transform: scale(.98); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 500; box-shadow: none; }
button.secondary:hover, .button.secondary:hover { background: var(--bg); }
button.danger, .button.danger { background: var(--danger-ink); border-color: var(--danger-ink); color: var(--on-fill); box-shadow: none; }
button.danger:hover, .button.danger:hover { background: var(--danger-ink); filter: brightness(.9); }
button.link, a.link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0; background: transparent; color: var(--brand-2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
button.link:hover, a.link:hover { background: transparent; color: var(--ink); }
a.link.danger, button.link.danger { color: var(--danger-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Phone: the form's actions stack full width, primary first. */
@media (max-width: 47.99rem) {
  .actions > button, .actions > .button { flex: 1 1 100%; padding: 13px; border-radius: var(--radius-sm); }
}

/* --- Form field: label, input, help, error; the live-validation states come from validate.js. --- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; }
.field label .muted { font-weight: 400; }
input:where(:not([type=hidden], [type=checkbox], [type=radio])), select, textarea {
  width: 100%; min-height: var(--tap); padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}
/* D 2026-11-13: our own ▾, 14px in from the edge (the browser's sat on the border) */
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235d6275' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:where(input, select, textarea):focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:where([readonly]) { background: var(--bg); }
::placeholder { color: var(--ink-2); opacity: 1; } /* D 2026-11-15: the browser's light grey failed contrast (e2e/ux.py) */
.help { display: block; color: var(--ink-2); }
.error { color: var(--danger-ink); font-weight: 500; }
.has-error input, .has-error select, .has-error textarea, [aria-invalid="true"] { border-color: var(--danger); }
.has-error input:focus, .has-error select:focus, [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field-static { margin: 0; }
/* Spec 030: a checkbox with its words, the whole line a 44px tap target. */
.field-check label.chk { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 500; cursor: pointer; }
.field-check input[type=checkbox] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--brand-ink); }
.field[hidden] { display: none; }
/* Duplicate contract number: the field is a warning box until fixed or "Išsaugoti vis tiek". */
.field.is-warning.has-error { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); border-left: 4px solid var(--warn); }
.field.is-warning.has-error input { border-color: var(--warn); }
.field.is-warning.has-error .error { color: var(--warn-ink); font-weight: 600; }
/* Phone: the primary submit of a form is full width. */
@media (max-width: 47.99rem) {
  .stack > button[type=submit] { width: 100%; padding: 13px; border-radius: var(--radius-sm); }
}

/* --- Message / warning box: soft background + 4px left border by kind. --- */
.notice { padding: 10px 12px; border-radius: var(--radius-sm); border-left: 4px solid var(--info); background: var(--info-soft); color: var(--ink); overflow-wrap: anywhere; }
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger-ink); }
.notice ul { list-style: none; padding: 0; }
.confirm-step p { margin: 0; } /* spec 030: the no-email confirm */
.confirm-step p + p { margin-top: 6px; font-weight: 600; }

/* --- Status pill: the .badge; colour by invite status (.b-done / .b-pending / .b-cancelled). --- */
.status { display: inline-block; font-size: 15px; font-weight: 600; white-space: nowrap; color: var(--ink-2); } /* coloured text, no pill (D 2026-11-13) */
.status-joined { color: var(--brand-ink); }
.status-invited { color: var(--warn-ink); }
.status-none, .status-archived { color: var(--ink-2); }

/* --- Search bar: the search field + branch + "Ieškoti"; one line on desktop, wraps on a phone. --- */
.searchbar { display: flex; flex-wrap: wrap; gap: 8px; }
.searchbar input[type=search] { flex: 1 1 12rem; width: auto; min-width: 0; max-width: 420px; box-shadow: var(--shadow); }
.searchbar input[type=search]:focus { box-shadow: 0 0 0 4px var(--brand-soft); }
.searchbar select { flex: 0 1 14rem; width: auto; min-width: 0; }
.searchbar button { flex: 0 0 auto; }
@media (max-width: 47.99rem) {
  .searchbar input[type=search] { max-width: none; }
  .searchbar select { flex: 1 1 100%; }
  .searchbar button { flex: 1 1 100%; }
}
/* Mokiniai / Instruktoriai (D 2026-11-13): the search on the left, "Sukurti naują …" on the right of the same row,
   its right edge on the table's; on a phone it goes under the search, full width. */
.list-tools { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.list-tools > .searchbar { flex: 1 1 auto; min-width: 0; }
/* D 2026-11-16: the button is as tall as one field (16px text x 1.5 + 22px padding + the border), never as tall as a
   search that wrapped onto two rows ("Sukurti naują instruktorių" at 1280px) */
.list-tools > .button { flex: 0 0 auto; align-self: flex-start; min-height: 48px; }
@media (max-width: 47.99rem) { .list-tools > .button { flex: 1 1 100%; min-height: var(--tap); } }
/* Links under the search ("Išvalyti paiešką", "Rodyti archyvuotus"). */
.list-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: -8px 0 0; }
.list-links:empty { display: none; }
.list-links a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* --- People list (table.people): one card with divided rows. Desktop = the table; phone (< 48rem) =
   the tight rows: bold name + phone and one muted line on the left, status on the right. --- */
.table-scroll { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.people { width: 100%; border-collapse: separate; border-spacing: 0; }
table.people th, table.people td { text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
table.people td.name a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; color: var(--ink); text-decoration: none; }
table.people td.name a:hover { color: var(--brand-2); text-decoration: underline; }
table.people td.name .sub-line { display: block; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 47.99rem) {
  table.people:not(.lessons) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.people:not(.lessons), table.people:not(.lessons) tbody { display: block; width: 100%; }
  table.people:not(.lessons) tr { position: relative; display: grid; column-gap: 0; align-items: center; padding: 10px 16px 11px; border-bottom: 1px solid var(--line); }
  table.people:not(.lessons) tbody tr:last-child { border-bottom: 0; }
  table.students tr { grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; grid-template-areas: "name name status" "meta1 meta2 status"; }
  table.instructors tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "meta1 status"; }
  table.people:not(.lessons) td { display: block; padding: 0; min-width: 0; }
  table.people:not(.lessons) td.name { grid-area: name; overflow-wrap: break-word; }
  table.people:not(.lessons) td.name a { align-items: flex-end; } /* 44px tall link, name sits on top of the phone line */
  table.people:not(.lessons) td.name a::after { content: ""; position: absolute; inset: 0; } /* the whole row opens the person */
  table.people:not(.lessons) .phone, table.students .col-branch { display: none; }
  table.instructors .col-branch { grid-area: meta1; }
  table.instructors .col-branch { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.people:not(.lessons) .col-status { grid-area: status; padding-left: 12px; text-align: right; }
  table.people:not(.lessons) .col-status .muted { display: block; }
}
@media (max-width: 24rem) { /* smallest phones: package on its own line rather than cut or squeezed */
  table.students tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "meta1 status" "meta2 status"; }
}
@media (min-width: 48rem) {
  /* On a narrow desktop a wide table scrolls inside its card, never the page. */
  table.people th, table.people td { overflow-wrap: break-word; }
  table.people th { padding: 11px 16px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
  table.people td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
  table.people td.name { padding-top: 0; }
  table.people td.name a { display: flex; align-items: flex-end; } /* 44px tap target, name sits on the phone line */
  table.people .phone { display: none; }
  table.people tbody tr:last-child td { border-bottom: 0; }
  table.people tbody tr:hover { background: var(--bg); }
}

/* --- Empty state: a card with muted, centred text. --- */
.empty { padding: 24px 16px; text-align: center; color: var(--ink-2); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* --- Details: the label-and-value list (label / value pairs on a soft background). --- */
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; padding: 14px 16px; font-size: 15px; background: var(--bg); border-radius: var(--radius-sm); }
.details dt { color: var(--ink-2); }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* --- Invite link box: brand-soft card; the copy row stays one line. --- */

/* --- Confirm page (archive / erase): one card with the question, the person and the consequences. --- */

/* --- Danger zone on the person form: archive / restore / erase. --- */
.danger-zone { border-top: 4px solid var(--line); }

/* --- Auth and error pages (login, invite, 403/404/500): a centred card under the brand. --- */
.auth { width: 100%; max-width: 26rem; margin: 0 auto; padding: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 18px; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: var(--radius-sm); font-size: 22px; }
.auth .card { padding: 20px; gap: 16px; }
.auth .stack > button[type=submit], .auth .card > .button { width: 100%; }
.error-code { font-family: var(--mono); font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 48rem) { .auth { padding-top: 48px; } }
/* Spec 023 (R-18): the data notice (and its public copy) on the login page's card; the login page links it. */
.notice-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.auth-foot { text-align: center; }
.auth-logout button { width: 100%; }

/* --- Instructor phone shell + Kalendorius (spec 015 v2): the .ph / .ph-head / .ph-tabs / .legend /
   .day-chips / .frow / .sheet / .toast / .scard values as they are; text >= 15px and taps >= 44px win
   over the smaller sizes. The real page is the phone: the shell fills the screen (a centred column on
   desktop) one screen tall, its body scrolls like the phone; overlay, sheet and toast are fixed. --- */
.content.ph-page { max-width: 30rem; padding: 0; gap: 0; }
.ph { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.ph-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ph-head h2 { font-size: 21px; letter-spacing: -.01em; }
.day-title::first-letter { text-transform: uppercase; }
.ph-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.ph-body > * { flex-shrink: 0; }
.ph-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px 18px; }
.ph-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: var(--tap); padding: 6px 0; border-radius: var(--radius-xs); font-size: 15px; color: var(--ink-2); text-decoration: none; }
.ph-tabs a span { font-size: 19px; }
.ph-tabs a.active { color: var(--brand-2); font-weight: 600; background: var(--brand-soft); }
.ph-alert { background: var(--warn-soft); color: var(--warn-ink); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; }
.ph-list { display: flex; flex-direction: column; gap: 10px; }
.cal { display: flex; flex-direction: column; gap: 12px; }

/* Buttons inside the shell (.btn): white, line border; .wide = full-width sheet buttons. */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--radius-xs); font: inherit; font-weight: 500; font-size: 15px; text-decoration: none; color: var(--ink); box-shadow: none; transition: background .15s, transform .1s; }
.btn:hover, button.btn:hover { background: var(--bg); }
.btn.wide { width: 100%; padding: 13px; border-radius: var(--radius-sm); }
.btn.btn-danger { color: var(--danger-ink); }

.day-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
/* F1a: the Kalendorius chips stay pinned at the top of the scrolling area (the phone
   shell's .ph-body, the window on desktop / the admin's page); the bg pad hides the rows scrolling under them */
.cal > .day-chips { position: sticky; top: 0; z-index: 2; margin-top: -8px; padding-top: 8px; background: var(--bg); }
.ph-page .ph-body > .cal > .day-chips { top: -14px; margin-top: -14px; padding-top: 14px; } /* the phone shell's .ph-body: its 14px pad */
.dchip { flex: none; width: 62px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; }
.dchip b { font-size: 18px; }
.dchip small { font-size: 15px; color: var(--ink-2); }
.dchip.on { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--on-fill); } /* --brand is 3.9:1 on white text */
.dchip.on small { color: var(--on-fill); }
.day-title { font-size: 17px; margin: 4px 0 -2px; }
@media (max-width: 47.99rem) {
  /* the shell is exactly one screen (100dvh) and only its .ph-body scrolls. body's min-height 100vh was taller than
     that while the browser's bars show, so the page could be dragged and the bottom tabs lifted over an empty strip:
     the body is now no taller than the shell. Nothing blocks the page's own overscroll, so pull-to-refresh works. */
  body:has(.ph-page) { min-height: 0; }
}

.frow { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 48px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 13px 14px; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); text-decoration: none; box-shadow: none; }
.frow b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.frow span { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; } /* one line at 390px; wraps on narrower phones, never cut with "…" */
.frow em { font-style: normal; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.frow.on { background: var(--brand-soft); border-color: var(--brand); }
.frow.on em { color: var(--brand-2); }
.frow.off { background: var(--neutral-soft); border-style: dashed; }
.frow.off b { color: var(--ink-2); font-weight: 500; }
.frow.off em { color: var(--brand-2); }
button.frow, a.frow { cursor: pointer; }
button.frow:hover, a.frow:hover { background: inherit; filter: brightness(.98); }
button.frow:active, a.frow:active { transform: scale(.99); }

.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.set-row small { display: block; color: var(--ink-2); }
.set-row form { margin: 0; flex: none; }
/* The switch: the 50x30 track, in a 44px-tall tap target. */

.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 35%, transparent); z-index: 20; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 30rem; z-index: 21; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 18px 26px; max-height: 88%; overflow: auto; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -20px 50px color-mix(in srgb, var(--ink) 20%, transparent); animation: sheetup .22s ease; }
@keyframes sheetup { from { transform: translate(-50%, 40px); opacity: 0; } }
.sheet form { margin: 0; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.sheet h3 { font-size: 18px; }
.sheet .sub { font-size: 15px; }

/* Toast: the dark pill above the tabs; fades out by itself (no JS). */
/* Toast (D 2026-11-13): a coloured box over the page, mark + black words + ✕; gone by itself after 5 s. */
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); background: var(--info-soft); color: var(--ink); padding: 4px 4px 4px 14px; border-radius: var(--radius); font-size: 15px; box-shadow: 0 16px 40px color-mix(in srgb, var(--ink) 22%, transparent); animation: up .25s ease, toast-out .4s ease 5s forwards; }
.toast-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--radius-round); background: var(--info-ink); color: var(--on-fill); font-weight: 700; }
.toast-timer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; color: var(--info-ink); } /* the line running round it: the time left */
.toast-timer rect { x: 1px; y: 1px; width: calc(100% - 2px); height: calc(100% - 2px); rx: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 100; animation: toast-timer 5s linear forwards; }
@keyframes toast-timer { to { stroke-dashoffset: 100; } }
.toast-success .toast-timer { color: var(--brand-ink); } .toast-warning .toast-timer { color: var(--warn-ink); } .toast-error .toast-timer { color: var(--danger-ink); }
.toast-success { background: var(--brand-soft); } .toast-success .toast-mark { background: var(--brand-ink); }
.toast-warning { background: var(--warn-soft); } .toast-warning .toast-mark { background: var(--warn-ink); }
.toast-error { background: var(--danger-soft); } .toast-error .toast-mark { background: var(--danger-ink); }
@keyframes up { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }


.scard { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.scard > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.scard small { color: var(--ink-2); }
.scard .link-btn { align-self: flex-start; justify-content: flex-start; padding-left: 0; margin: 0; } /* the student's number: tap to call */
.avatar { width: 36px; height: 36px; border-radius: var(--radius-round); display: inline-grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--avatar-from), var(--avatar-to)); color: var(--on-fill); font-size: 15px; font-weight: 600; }

@media (max-width: 47.99rem) {
  table.instructors tr { grid-template-areas: "name edit" "meta1 edit"; }
  table.instructors tr > :nth-child(3) { display: none; } /* the e-mail column: computer only */
  table.instructors .col-edit { grid-area: edit; position: relative; z-index: 1; justify-self: end; } /* spec 030: Redaguoti (✎) */
}
@media (min-width: 48rem) { /* Instruktoriai on a computer: phone and e-mail in their own columns (D 2026-11-12) */
  table.instructors .phone { display: table-cell; }
  table.instructors td.name .sub-line { display: none; }
  table.instructors td.name a { align-items: center; }
  table.instructors td.name { padding-bottom: 0; }
  table.instructors td.col-edit { width: 1%; padding-top: 0; padding-bottom: 0; }
}
table.instructors .col-edit { text-align: right; white-space: nowrap; }

/* --- Student phone (spec 016): the .ph.stu / .progress-card / .ring / .ucard / .slots / .slot / .hcard /
   .badge / .details values as they are; text >= 15px, taps >= 44px and >= 4.5:1 contrast win over the sizes
   and shades. Same shell as the instructor's (.ph, .ph-head, .ph-body, .ph-tabs, .sheet, .toast). --- */
.ph-head small { display: block; color: var(--ink-2); }
.ph-head h1 { font-size: 21px; letter-spacing: -.01em; } /* the student's greeting: the page's heading */
.stu-main, .stu-book { display: flex; flex-direction: column; gap: 12px; }
.stu-main > * { flex-shrink: 0; }
.btn.btn-primary, button.btn.btn-primary { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--on-fill); font-weight: 600; }
.btn.btn-primary:hover, button.btn.btn-primary:hover { background: var(--brand-2); }
.btn[disabled], button.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small-btn { padding: 5px 12px; flex: none; }
.ucard .btn.small-btn { border-color: transparent; box-shadow: none; background: transparent; } /* Mano pamokos: Atšaukti without a frame (D 2026-11-14) */

.pad { padding: 16px; }
.card.progress-card { flex-direction: row; align-items: center; gap: 16px; }
.progress-card > div { min-width: 0; }
.progress-card b { font-size: 17px; }
.ring { width: 100px; height: 100px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--brand-soft); }
.ring-fg { stroke: var(--brand); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray .5s ease; }
.ring-n { font-size: 26px; font-weight: 700; fill: var(--ink); }
.ring-t { font-size: 15px; fill: var(--ink-2); }

.ph-h { margin: 4px 0 0; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; justify-content: space-between; }
.ph-h small { font-weight: 600; }
.ucard, .who-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.ucard > div, .who-card > div { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.ucard small, .who-card small { color: var(--ink-2); }
.ucard small.warn-t { color: var(--warn-ink); font-weight: 600; }  /* darker ink: contrast */
.who-card .link-btn { margin: 0; padding: 0 6px; white-space: nowrap; } /* Pagrindinis: the instructor's number, where Atšaukti sits on a lesson card (D 2026-11-17) */

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slots .muted { grid-column: 1 / -1; }
.slot, button.slot { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 0; font: inherit; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; box-shadow: none; }
.slot.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); }
a.slot:hover { background: var(--bg); }
a.slot.on:hover { background: var(--brand-soft); }
.slot[disabled], button.slot[disabled] { opacity: .35; cursor: not-allowed; }

.hcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; } /* the status stays top right (D 2026-11-14) */
.hc-line, .pl-line { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.l-state .pl-line { display: block; margin: 2px 0 0; color: var(--ink-2); }
.badge { font-size: 15px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; display: inline-block; }
.b-pending { background: var(--warn-soft); color: var(--warn-ink); }

.details.compact { padding: 12px; }

/* Kalendorius lesson row — the student's name + "Pamoka". */

/* Admin Nustatymai: .set-card with .set-row lines and the − / + stepper. */
.card.set-card { padding: 4px 18px; max-width: 640px; gap: 0; }
.narrow > .card.set-card { max-width: none; } /* admin Nustatymai: the centred column's full width (D 2026-11-13) */
.set-card .set-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-card .set-row:last-child { border-bottom: 0; }
.set-card .set-row > div:first-child { min-width: 0; }
.stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper form { margin: 0; }
.stepper span { min-width: 64px; text-align: center; } /* the section's own text (D 2026-11-13) */
.stepper .btn { width: var(--tap); height: var(--tap); padding: 0; font-size: 22px; border: 0; background: transparent; color: var(--brand-ink); } /* − / +: no box */
.stepper .btn:hover { background: var(--bg); }

/* --- Instructor Šiandien + lesson / cancel / book sheets (spec 017): the
   .badge b-* / .frow.pick / .details.compact values as they are; text >= 15px,
   taps >= 44px and >= 4.5:1 contrast win (no faded cards: the opacity on marked cards drops the contrast). */
.today { display: flex; flex-direction: column; gap: 12px; }
.today > * { flex-shrink: 0; }
.b-booked { background: var(--info-soft); color: var(--info-ink); }
.b-done { background: var(--brand-soft); color: var(--brand-2); }
.b-no_show { background: var(--neutral-soft); color: var(--ink-2); }
.b-cancelled { background: var(--danger-soft); color: var(--danger-ink); }
.sheet > .badge { align-self: flex-start; }
.frow.pick { grid-template-columns: 1fr auto 20px; }
.frow.pick b { white-space: normal; overflow-wrap: anywhere; }
.frow.pick em { color: var(--brand-2); text-align: center; }
.frow.pick.off { cursor: not-allowed; }
.frow.pick.off b { color: var(--ink-2); }
.pick-why { grid-column: 1 / -1; color: var(--ink-2); font-size: 15px; }
.frow.pick.on, a.frow.pick.on:hover { background: var(--brand-soft); }

/* --- Admin Mokiniai + student panel (spec 019): the .card.table / .tr / .th / .click / .meter / .panel /
   .panel-head / .details / .panel-actions / .ph-alert / .plist / .pl-row / .badge b-done / .link-btn, values as they
   are; text >= 15px, taps >= 44px and >= 4.5:1 contrast win (the 12px header and badge text, its --warn). --- */
.mono { font-variant-numeric: tabular-nums; }
.warn-t { color: var(--warn-ink); }
.card.table { padding: 0; gap: 0; }
.tr { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr .9fr 1fr; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.tr > * { min-width: 0; overflow-wrap: anywhere; }
.tr:last-child { border-bottom: 0; }
.tr small { display: block; color: var(--ink-2); }
.tr.th { color: var(--ink-2); font-size: 15px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.click { cursor: pointer; } /* a row that opens its person's profile (static/core/rows.js; both lists, D 2026-11-14) */
.tr.click:hover, tr.click:hover > td { background: var(--bg); }
.tr-name a { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.tr-name a b { font-weight: 700; }
.tr-name a:hover b { color: var(--brand-2); text-decoration: underline; }
.tr-name .status { padding: 0 8px; margin-left: 4px; }
.tr-left.warn-t small { color: var(--warn-ink); }
.tr-act form { margin: 0; }
.row-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; } /* a row's ✎; the Likutis block's − / + */
.card:not(.set-card) > .set-row .stepper span { min-width: 9.5rem; } /* Pamokų paketas: both + in one column */
/* The profile's Pamokos table (D 2026-11-13): roomy columns at every width; a narrow screen scrolls it sideways. */
.card .table-scroll { box-shadow: none; margin: 0 -16px; }
table.people.lessons { min-width: 46rem; }
table.people.lessons th, table.people.lessons td { padding: 11px 16px; white-space: nowrap; border-bottom: 1px solid var(--line); text-align: left; }
table.people.lessons th { color: var(--ink-2); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
table.people.lessons tbody tr:last-child td { border-bottom: 0; }
table.people.lessons td.l-note { color: var(--ink-2); } /* one line: the table scrolls rather than break a date */
table.people.lessons .badge { display: inline-block; min-width: 8.5rem; text-align: center; } /* every pill one width */
@media (max-width: 47.99rem) { /* a phone: the label wraps, the − value + keeps its column */
  .card:not(.set-card) > .set-row { gap: 8px; }
  .card:not(.set-card) > .set-row .stepper { gap: 0; }
  .card:not(.set-card) > .set-row .stepper span { min-width: 7.5rem; }
}
.narrow > .day-chips { flex-wrap: wrap; } /* the profile's tabs: all three in view on a phone */
.save-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } /* a profile tab's "Atšaukti pakeitimus" | Išsaugoti */
.save-bar > * { width: 100%; }
.acct-actions { display: flex; flex-direction: column; gap: 10px; } /* Paskyros valdymas: buttons only, card-wide */
.acct-actions form { margin: 0; }
.acct-actions .btn, .acct-actions .button { width: 100%; }
.panel.pop .pop-close { position: absolute; top: 10px; right: 10px; box-shadow: none; } /* ✕: close, keep the changes */
@media (max-width: 47.99rem) { /* the profile's lessons table and Veiksmų istorija as tight rows */
  table.actions-log tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date who" "state state"; column-gap: 10px; padding: 10px 0; }
  table.people .l-date { grid-area: date; font-weight: 600; }
  table.people .l-time { grid-area: time; }
  table.people .l-who { grid-area: who; color: var(--ink-2); }
  table.people .l-state { grid-area: state; }
}
.meter { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--brand-soft); overflow: hidden; margin-top: 4px; max-width: 160px; }
.students-table .tr-left { text-align: center; } /* Pamokos: the hours centred over the bar (D 2026-11-12) */
.students-table .tr-left .meter { margin-left: auto; margin-right: auto; }
.meter-fg { fill: var(--brand); } /* an SVG bar: its width is an attribute (templates carry no inline style) */
@media (max-width: 47.99rem) {
  .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tr > :nth-child(2), .tr > :nth-child(3), .tr > :nth-child(4), .tr > :nth-child(5) { display: none; } /* name + Pamokos */
  .tr > .row-acts { grid-column: 1 / -1; flex-wrap: nowrap; } /* the row's ✎ on its own line */
  .row-acts .btn.small-btn { padding: 5px 8px; }
  .students-table .tr-left small:empty::before { content: "\00a0"; } /* the "papild." line keeps its room: +1 never moves the buttons */
}
@media (min-width: 48rem) { /* the buttons hold the row's top: "+1 pamoka" adding the "papild." line never moves them */
  /* phone and e-mail in their own columns; a window too narrow for them scrolls the table sideways, never squeezes it */
  .students-table { overflow-x: auto; position: relative; } /* relative: the ✎ links' hidden words scroll with it */
  /* the smallest widths add up to ~980px, so at 1280 with the menu open the row's ✎ is on the page (D 2026-11-16) */
  .students-table .tr { grid-template-columns: minmax(9rem, 1.4fr) 8.5rem minmax(10rem, 1.4fr) minmax(8.5rem, .7fr) minmax(7.5rem, .9fr) 8rem 3rem; min-width: min-content; }
  .students-table .tr > :nth-child(2) { white-space: nowrap; } /* the phone number never breaks */
  .students-table .tr-name small, .students-table .tr-left small:empty { display: none; }
  .students-table .tr-act { align-self: start; }
}

.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 21; background: var(--surface); padding: 22px; overflow: auto; box-shadow: -20px 0 50px color-mix(in srgb, var(--ink) 20%, transparent); animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.panel-head h2 { font-size: 19px; }
.panel-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); border: 0; background: transparent; font-size: 18px; padding: 4px 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.details dd small { display: block; color: var(--ink-2); }
.details dd form { display: inline; margin: 0; }
.link-btn, button.link-btn { display: inline-flex; align-items: center; min-height: var(--tap); border: 0; background: transparent; box-shadow: none; color: var(--brand-2); font: inherit; font-weight: 600; text-decoration: underline; padding: 0 0 0 6px; min-width: var(--tap); justify-content: center; cursor: pointer; margin: -11px 0; vertical-align: middle; }
.details dd > .link-btn:first-child, .details dd form .link-btn { padding-left: 0; }
.link-btn:hover, button.link-btn:hover { background: transparent; color: var(--ink); }
.panel-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.panel-actions form { margin: 0; }
.panel-actions .btn { white-space: normal; text-align: left; }
.panel .ph-alert { margin-top: 16px; }
.panel .lbl { margin-top: 18px; margin-bottom: 8px; }
.lbl { font-size: 15px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.progress-card .extras-line { font-weight: 600; color: var(--brand-2); }
.progress-card .badge, .scard .badge { align-self: flex-start; margin-top: 6px; }

/* --- Admin Kalendorius + lesson panel (spec 020): the .toolbar / .date-nav / .date-label /
   .agenda-m / .am-ins / .am-row / .grid-wrap / .tgrid / .tg-* / .blk / .now-line values as they are (--c = the
   instructor's colour); text >= 15px, taps >= 44px and >= 4.5:1 contrast win (no faded blocks, text wraps instead of
   "…"). Phone (< 48rem): the agenda instead of the grid. --- */
.admin-cal { display: flex; flex-direction: column; gap: 16px; }
.cal-side { min-width: 0; }
.cal-filter { display: flex; flex-direction: column; gap: 8px; }
.cal-filter select { width: 100%; min-height: var(--tap); padding: 8px 40px 8px 10px; font-size: 16px; }
.cal-who { margin: 8px 0 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; }
.cal-who .lbl { padding: 0; margin-bottom: 4px; }
.cal-pick { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 4px; border-radius: var(--radius-xs); cursor: pointer; overflow-wrap: anywhere; }
.cal-pick:hover { background: var(--bg); }
.cal-pick input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-2); }
.cal-dot { flex: none; width: 12px; height: 12px; border-radius: var(--radius-round); background: var(--c); }
.cal-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.toolbar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.date-nav { display: flex; align-items: center; gap: 4px; }
.date-nav .btn { border-radius: var(--radius-pill); padding: 8px 18px; margin-right: 8px; }
.date-nav .icon-btn { border-radius: var(--radius-round); font-size: 22px; color: var(--ink); }
.date-label { margin-left: 12px; font-size: 22px; font-weight: 400; }
/* Desktop: the side list on the left, the week fills the rest of the window and scrolls inside its card. */
@media (min-width: 64rem) {
  .adm-main:has(> .admin-cal) { padding: 16px 20px; gap: 0; }
  .admin-cal { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 16px; height: calc(100vh - 32px); }
  .cal-side { padding-top: 64px; overflow: auto; }
  .cal-main { min-height: 0; }
  .grid-wrap { flex: 1; min-height: 0; }
  .tgrid { flex: 1 0 auto; } /* the week fills its card top to bottom (D 2026-11-12) */
}

.grid-wrap { overflow: auto; padding: 0; gap: 0; }
/* Time grid, laid out like the common calendar apps (Agata 2026-11-11): weekday over a big day number, today's number in
   a filled circle; hour labels in a wider gutter, centred on their line, with a short tick into the gutter. */
.tgrid { display: grid; grid-template-columns: 60px repeat(7, minmax(var(--day-min, 0px), 1fr)); grid-template-rows: auto 1fr; position: relative; } /* D 2026-11-12: seven equal days, each at least --day-min (the busiest day's side-by-side blocks stay 44px) */
.tg-corner, .tg-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.tg-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 8px 6px; line-height: 1.2; text-align: center; }
.tg-wd { color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tg-day { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-round); font-size: 22px; font-weight: 400; }
.tg-head.today .tg-wd { color: var(--brand-2); }
.tg-head.today .tg-day { background: var(--brand-2); color: var(--on-fill); font-weight: 600; }
/* D 2026-11-12: the hours share the height the window gives (--hours of them), each at least --hour-min; the blocks
   sit in shares of the day, so they move with it. */
.tg-times, .tg-col { grid-row: 2; position: relative; border-top: 14px solid transparent; min-height: calc(var(--hours) * var(--hour-min) + 14px); } /* room for the first hour's label */
.tg-times { background: linear-gradient(to bottom, var(--line) 0 1px, transparent 1px) right top / 8px calc(100% / var(--hours)) repeat-y; background-origin: padding-box; background-clip: padding-box; }
.tg-times span { position: absolute; right: 14px; color: var(--ink-2); line-height: 1; transform: translateY(-50%); }
.tg-col { background: linear-gradient(var(--line), var(--line)) left top / 1px 100% no-repeat border-box, linear-gradient(to bottom, var(--line) 0 1px, transparent 1px) left top / 100% calc(100% / var(--hours)) repeat-y padding-box; } /* day line runs to the header; hour lines start under the strip */
.blk { position: absolute; margin-top: 2px; border: 0; border-left: 4px solid var(--c); border-radius: 9px; background: color-mix(in srgb, var(--c) 13%, white); text-align: left; padding: 6px 4px; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.blk:hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--ink) 12%, transparent); z-index: 2; }
.blk b, .blk span { overflow-wrap: break-word; hyphens: auto; min-width: 0; } /* whole words; a word wider than the card breaks (with a hyphen where the browser knows the language) */
.blk b { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* D 2026-11-16: the name on one line, never broken inside a word; cut with "…" when it doesn't fit */
.blk span { color: var(--ink-2); }
.blk [data-short] { white-space: nowrap; overflow-wrap: normal; } /* one word or nothing (admin-cal.js) */
/* side by side (2+ at once): the name and the status shortened ("Reg.", "Įv.", "Neatv."), dropped by admin-cal.js when
   even that doesn't fit (D 2026-11-12) */
.blk.side { padding: 6px 5px; } /* D 2026-11-12: lines and edges a little apart */
.blk.side[data-narrow] { padding: 6px 1px; } /* D 2026-11-16: 3+ at once, the narrowest: the room goes to the first name */
/* Neatvyko (D 2026-11-12, option A): stripes in the instructor's colour, the bar stays theirs, the word in red */
.blk.s-no_show { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 18%, white) 0 6px, var(--surface) 6px 12px); }
.blk.s-no_show span { color: var(--danger-ink); }
.blk.s-done { background: color-mix(in srgb, var(--c) 7%, white); }
.blk.free { border: 1px dashed var(--line); background: transparent; color: var(--ink-2); justify-content: center; align-items: center; text-align: center; }
.blk.free:hover { background: var(--brand-soft); color: var(--brand-2); }
.blk.closed { border: 1px dashed var(--line); background: repeating-linear-gradient(45deg, var(--bg) 0 6px, transparent 6px 12px); color: var(--ink-2); justify-content: center; align-items: center; text-align: center; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }

.agenda-m { display: none; flex-direction: column; gap: 10px; }
.am-ins { padding: 12px 14px; gap: 0; }
.am-ins h4 { margin: 0 0 4px; font-size: 15px; }
.am-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); border-top: 1px solid var(--line); border-left: 4px solid var(--c, transparent); padding: 9px 0 9px 10px; text-align: left; color: var(--ink); text-decoration: none; }
.am-row:hover { background: var(--bg); }
.am-row b { font-variant-numeric: tabular-nums; min-width: 44px; }
.am-row span:not(.badge) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.am-row > b + span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* the short name on one line, cut with "…" (D 2026-11-17) */
.am-row.free { color: var(--ink-2); border-left-style: dashed; }
.am-row.closed { color: var(--ink-2); border-left-style: dotted; background: var(--bg); }
.am-row .badge { padding: 2px 8px; }
@media (max-width: 47.99rem) {
  .grid-wrap { display: none; } /* time grid -> agenda list on narrow screens */
  .agenda-m { display: flex; padding-bottom: 96px; } /* room under the list: a cancel that removes a row near the end doesn't pull the page up */
  .date-label { margin-left: 4px; font-size: 19px; }
}

.panel-name { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.panel-name:hover { color: var(--brand-2); text-decoration: underline; }
/* The lesson card (D 2026-11-12): a card beside the tapped block, as in the common calendar apps (admin-cal.js places
   it; without JS, or on a phone, it sits in the middle of the window). The page stays undimmed; a tap outside closes
   it. Its actions are red links under a grey line; the mark already given reads as plain text. */
.overlay:has(+ .panel.pop[role="dialog"]) { background: transparent; animation: none; }
.panel.pop { top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: max-content; min-width: min(360px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); padding: 14px 18px 8px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px color-mix(in srgb, var(--ink) 22%, transparent); animation: fadein .12s; }
.panel.pop[data-placed] { transform: none; }
.panel.pop .panel-head { margin-bottom: 8px; }
.panel.pop .panel-actions { margin: 12px -18px 0; padding: 4px 18px; border-top: 1px solid var(--line); gap: 0 20px; }
.panel.pop .panel-actions button { min-width: var(--tap); }
.panel.pop .details dd { white-space: nowrap; } /* D 2026-11-12: the card widens rather than wrap a line */
/* The free-time card (D 2026-11-12): the lesson card's look; the student is picked from a dropdown with a search box,
   the list scrolls inside the card; the time's own actions are red links under the grey line. */
.panel.pop.book-pop { width: min(380px, calc(100vw - 32px)); min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.panel.pop.book-pop .panel-head { margin-bottom: 0; }
.book-pop .panel-head h3 { font-size: 19px; margin-top: 8px; }
.book-pop .nowrap { white-space: nowrap; }
.book-pop .sub { margin: 0; font-size: 15px; }
.book-pop .sheet-note { margin: 0; color: var(--ink-2); font-size: 15px; }
.book-pop form { margin: 0; }
.panel.pop.book-pop .panel-actions { margin-top: 2px; padding-top: 10px; padding-bottom: 6px; align-items: center; }
.book-actions { justify-content: center; }
.book-save { flex: 1 0 100%; margin: 0 0 4px; } /* Įrašyti spans the card above the links, like a roof */
.book-save .btn { width: 100%; }
/* The student field: one search field; the list drops down under it (admin-cal.js; without JS it just shows). Rows as
   when adding guests in the common calendar apps: name over phone, no picture; Liko on the right. */
.combo-input { width: 100%; min-height: var(--tap); padding: 8px 12px; font-size: 16px; }
.combo-list { margin-top: 4px; max-height: min(264px, 40vh); overflow: auto; display: flex; flex-direction: column; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.combo.js .combo-list:not(.open) { display: none; }
.opt { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 12px; color: var(--ink); text-decoration: none; }
.opt[hidden] { display: none; }
a.opt:hover, .opt.hl { background: var(--bg); }
.opt.on { background: var(--brand-soft); }
.opt-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.opt-who b { font-weight: 500; overflow-wrap: anywhere; }
.opt-who small, .opt-left { color: var(--ink-2); font-size: 15px; }
.opt-left { flex: none; white-space: nowrap; text-align: right; }
.opt.off { cursor: not-allowed; }
.opt.off b { color: var(--ink-2); }
.combo-none { padding: 8px 12px; margin: 0; }
/* the cancel question (D 2026-11-12): the card in the middle of the dimmed page — centred: a red warning mark, the question,
   a grey line on what it costs, then Grįžti and the red button side by side, the same size */
.panel.pop[role="alertdialog"] { width: min(420px, calc(100vw - 32px)); min-width: 0; padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.alert-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: var(--radius-round); background: var(--danger-soft); color: var(--danger-ink); font-size: 22px; font-weight: 700; box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger-soft) 50%, transparent); }
.alert-mark.is-info { background: var(--info-soft); color: var(--info-ink); box-shadow: 0 0 0 8px color-mix(in srgb, var(--info-soft) 50%, transparent); } /* a question, not a warning: adding hours (D 2026-11-13) */
.panel.pop[role="alertdialog"] .sub { margin: 6px 0 24px; color: var(--ink-2); }
.panel.pop[role="alertdialog"] .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.panel.pop[role="alertdialog"] .actions .btn, .panel.pop[role="alertdialog"] .actions button { width: 100%; height: 100%; padding: 8px 10px; }
.panel.pop[role="alertdialog"] form { margin: 0; }
.panel.pop[role="alertdialog"] .actions > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* a third / fifth button: the whole row */
.panel.pop[role="alertdialog"].alert-left { align-items: flex-start; text-align: left; } /* Ištrinti visam laikui, as his example */
.panel.pop.alert-left form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.panel.pop.alert-left .alert-mark, .panel.pop.alert-left h2 { align-self: center; } /* the mark and the question centred */
.panel.pop.alert-left label.chk { margin-top: 12px; } /* a clear gap under the text (D 2026-11-13) */
.panel.pop.alert-left .sub { margin-bottom: 4px; }
.panel.pop.alert-left ul.sub { margin: 12px 0 0; padding-left: 20px; } /* the archive question's student lines, bullets (D 2026-11-14) */
.panel.pop.alert-left > .actions { margin-top: 24px; } /* the archive question: buttons straight under the text */
.panel.pop.alert-left label.chk { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.panel.pop.alert-left label.chk input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.panel.pop > .badge { display: block; margin: 0 0 8px; padding: 6px 12px; border-radius: var(--radius-sm); text-align: center; } /* as wide as the grey list, its corners */

/* --- "💬 Pastaba" (spec 023, slice 9): the .note-fab (text >= 15px and a 44px tap win over its 12px
   chip). Phone: bottom-right of the shell, just above the tab bar; the shell's body keeps a free strip at its end so
   the chip never lies over a button or the last row (e2e/ux.py `covered`). The sheet is the shell's .sheet
   (a dialog on desktop, 3b); the admin's is the side .panel, opened from the sidebar item. --- */
.note-dock { position: relative; height: 0; flex: none; } /* at the tab bar's top edge, whatever its height */
.note-fab { position: absolute; right: 12px; bottom: 10px; z-index: 15; min-height: var(--tap); white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--radius-pill); padding: 8px 14px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
.note-fab:hover { background: var(--bg); color: var(--ink); }
.ph.has-note .ph-body { padding-bottom: 76px; }
.note .sheet .field, .note .panel .field { margin: 4px 0; }
.note textarea { resize: vertical; min-height: 6.5em; }
.note .panel .sub { display: block; }
button.nav-item { border: 0; box-shadow: none; font: inherit; font-weight: 500; cursor: pointer; }
button.nav-item:hover { background: var(--bg); color: var(--ink); }
button.icon-btn { box-shadow: none; }
button.icon-btn:hover { background: var(--bg); color: var(--ink); }
@media (min-width: 48rem) {
  /* desktop (3b column): the chip at the column's bottom-right corner, the window scrolls past it */
  .ph-page .note-fab { position: fixed; right: max(16px, calc((100vw - 44rem) / 2 + 16px)); bottom: 24px; }
  .ph-page .ph.has-note .ph-body { padding-bottom: 96px; }
}

/* 2c — lesson times editor (instructor Nustatymai + admin); .tgap / .tinfo
   15px (the 12 / 14px are under the 15px text rule). */
.ted { margin: 0; display: flex; flex-direction: column; }
.tlist-ed { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.trow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 44px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; background: var(--surface); }
.trow select { font: inherit; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); background-color: var(--surface); color: inherit; min-height: 44px; min-width: 0; appearance: auto; -webkit-appearance: auto; background-image: none; } /* the time picker keeps the browser's arrow */
.trow select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tnum { font-weight: 700; color: var(--ink-2); }
.tend { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trow .icon-btn { min-width: 44px; min-height: 44px; }
.trow .icon-btn:disabled { opacity: .3; }
.tgap { font-size: 15px; color: var(--ink-2); padding-left: 40px; }
.tlist { font-weight: 700; font-variant-numeric: tabular-nums; margin: 8px 0; }
.tinfo { margin: 8px 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 15px; display: grid; gap: 6px; }
.tsum .btn { flex: none; }
.tsum .icon-btn, .col-edit .icon-btn, .tr-act .icon-btn { font-size: 32px; color: var(--ink); -webkit-text-stroke: 1px currentColor; } /* D 2026-11-15: every ✎ almost twice as big (18 -> 32px) and bold (the glyph has no bold face, so a stroke) */
.ted .ph-alert { margin-bottom: 8px; }
.ted .btn.wide, .tconfirm .btn.wide { margin-top: 8px; }
.ted .muted { margin: 6px 0 0; }
.ted .link-btn { display: flex; margin: 12px auto 0; }
.tconfirm { margin: 0; display: flex; flex-direction: column; }
.panel .ted-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel .ted-head h3 { font-size: 19px; margin-top: 8px; }

/* Desktop (spec 022, slice 3b): the same instructor / student screens, laid out for a computer — a centred
   ~44rem column 24px from the top, the window scrolls (no inner .ph-body scroll), header + tabs one card on
   top (tabs horizontal, icon and label on one line), sheets as centred dialogs, headings a step bigger.
   Phone (< 48rem) is the reference and is untouched. Scoped to .ph-page (the instructor / student shell) so
   admin pages that reuse .ph-body, .sheet and .toast stay as they are; last in the file so it wins. */
@media (min-width: 48rem) {
  .content.ph-page { max-width: 44rem; padding: 24px 16px; }
  .ph-page .ph { height: auto; min-height: 0; }
  .ph-page .ph-head { order: 0; border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 20px 24px; }
  .ph-page .ph-head h1, .ph-page .ph-head h2 { font-size: 24px; }
  .ph-page .ph-tabs { order: 1; display: flex; gap: 6px; justify-content: flex-start; padding: 8px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; box-shadow: var(--shadow); }
  .ph-page .ph-tabs a { flex-direction: row; gap: 8px; padding: 8px 16px; }
  .ph-page .ph-tabs a span { font-size: 17px; }
  .ph-page .ph-body { order: 2; overflow: visible; padding: 20px 0 40px; gap: 14px; }
  .ph-page .ph-body > .cal > .day-chips { top: 0; margin-top: -8px; padding-top: 8px; } /* the window scrolls: pinned at its top */
  .ph-page .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 22px; max-width: 30rem; max-height: 88vh; padding: 20px 22px 22px; box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 25%, transparent); animation-name: dialogin; }
  .ph-page .sheet-grip { display: none; }
}
@keyframes dialogin { from { transform: translate(-50%, calc(-50% + 24px)); opacity: 0; } }

/* 2d rows (.frow: the book sheet's student picks and other lists). Text >= 15px, -ink colours for contrast. The
   Kalendorius rows' ▾ state pills (.spill, .fmid, .p-*) went with the D 2026-11-15 day grid below. */
.frow { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 6px; padding: 6px 8px 6px 12px; min-height: 56px; } /* the longest notes fit two lines at 390px: a state change keeps the row's height */
.frow b { line-height: 1.2; }
.frow b small { display: block; font-weight: 400; font-size: 15px; color: var(--ink-2); }
.frow.off b { color: var(--ink-2); font-weight: 600; }
.frow.done { background: var(--surface); }
.frow.past { background: transparent; border-style: dashed; } /* readable (contrast): not the opacity .45 */
.frow.past b, .frow.past b small, .frow.past em { color: var(--ink-2); }
.frow.past em { padding-right: 6px; }
.sheet .sheet-note { color: var(--ink-2); font-size: 15px; margin: -4px 0 4px; }
/* D 2026-11-15: Kalendorius' day as a time grid, like the common calendar apps' day view. Hour labels in a gutter,
   centred on their line; each time a block in its share of the day (schedule.views._day_grid: --hours, --hour). Lessons
   a filled block with a bar; a free time dotted green, a free time past the student deadline (can be reopened) dashed
   yellow, a closed time grey hatched; today's red now-line with a dot; a passed day greyed out (still tappable). */
.dgrid { display: grid; grid-template-columns: 56px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 0; }
.dg-times, .dg-col { position: relative; height: calc(var(--hours) * var(--hour)); }
.dg-times span { position: absolute; right: 8px; font-size: 15px; color: var(--ink-2); line-height: 1; transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.dg-col { border-left: 1px solid var(--line); margin-right: 6px; background: linear-gradient(to bottom, var(--line) 0 1px, transparent 1px) left top / 100% var(--hour) repeat-y; }
.ev { position: absolute; display: flex; flex-direction: column; gap: 1px; margin-top: 1.5px; padding: 5px 8px; border-radius: var(--radius-xs); overflow: hidden; font-size: 16px; line-height: 1.25; color: var(--ink); text-decoration: none; text-align: left; }
/* D 2026-11-15 (evening): bigger text, only the first line (the state) bold; every line stays on one row. D 2026-11-16:
   a name too long for the block stays on its one row too, cut with "…" (never broken, never cut through the letters) */
.ev span { color: var(--ink-2); white-space: nowrap; }
.ev .ev-what, .ev .ev-who { color: var(--ink); }
.ev .ev-what { font-weight: 600; }
.ev .ev-who { flex: none; overflow: hidden; text-overflow: ellipsis; }
a.ev:hover { filter: brightness(.97); }
.ev-lesson { background: var(--info-soft); border-left: 4px solid var(--info); }
.ev-lesson.s-done { background: color-mix(in srgb, var(--info) 7%, white); }
.ev-lesson.s-no_show { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--info) 14%, white) 0 6px, var(--surface) 6px 12px); }
.ev-lesson.s-no_show span { color: var(--danger-ink); }
/* D 2026-11-15: free times quieter than lessons — thin pale border, a faint fill; the text keeps its -ink contrast */
.ev-free { border: 1.5px dotted color-mix(in srgb, var(--brand) 50%, white); background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); }
.ev-free .ev-what { color: var(--brand-2); }
.ev-late { border: 1.5px dashed color-mix(in srgb, var(--warn) 50%, white); background: color-mix(in srgb, var(--warn-soft) 45%, var(--surface)); }
.ev-late .ev-what { color: var(--warn-ink); }
.ev-closed { border: 1px dashed var(--line); background: repeating-linear-gradient(45deg, var(--bg) 0 6px, var(--surface) 6px 12px); }
.ev-closed .ev-what { color: var(--ink-2); }
.dg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; transform: translateY(-1px); }
.dg-now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: var(--radius-round); background: var(--danger); }
.dgrid.past-day { background: var(--neutral-soft); }
.dgrid.past-day .ev { filter: grayscale(1); background: var(--neutral-soft); border-color: var(--ink-2); }
.dgrid.past-day .ev-lesson { background: var(--surface); }

.tsub { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 14px 0 8px; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wdchip, button.wdchip { min-width: 46px; min-height: var(--tap); padding: 0 8px; border-radius: var(--radius-xs); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: none; }
.wdchip.on, button.wdchip.on { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--on-fill); }
