/* «🏫 Ranch» — the school's own colours (owner 22.10.2026): «Ранчо классика» by day (cream, barn red, a slab-serif
   heading) and «Тёмное ранчо» in Telegram's dark theme (`data-scheme`, set from `Telegram.WebApp.colorScheme`; in a
   plain browser the system's scheme). Telegram's own palette is not used: the app looks the same for everyone.
   Phone first: 360 px base, 16 px side padding, 14 px cards. */

:root {
  --bg: #FFFDF9;
  --bg2: #F4ECE1;
  --section: #FFFDF9;
  --text: #2B211C;
  --hint: #8C7867;
  --subtle: #8C7867;
  --link: #A3262A;
  --accent: #A3262A;
  --accent-text: #FFFFFF;
  --accent-soft: rgba(163, 38, 42, .10);
  --danger: #C0392B;
  --sep: rgba(120, 85, 55, .16);
  --fill: rgba(120, 85, 55, .09);
  --ok: #3B8B5A;
  --warn: #C98A1B;
  --seg-on: var(--section);
  --hero: linear-gradient(135deg, #A3262A 0%, #7B1B1F 100%);
  --hero-text: #FFF6EC;
  --hero-shadow: 0 8px 22px rgba(123, 27, 31, .25);
  --icon-bg: #F6E3DA;
  --edge: rgba(163, 38, 42, .08);
  --radius: 14px;
  --pad: 16px;
  --shadow: 0 1px 2px rgba(70, 35, 15, .06), 0 6px 16px rgba(70, 35, 15, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head-font: "Rockwell", "Roboto Slab", "Georgia", "Noto Serif", serif;
  color-scheme: light;
}

/* «Тёмное ранчо»: the same tokens, dark leather and ember red */
html[data-scheme="dark"] {
  --bg: #211915;
  --bg2: #15100D;
  --section: #241B17;
  --text: #F4EADF;
  --hint: #A8968A;
  --subtle: #A8968A;
  --link: #F06A5E;
  --accent: #D9483C;
  --accent-text: #FFFFFF;
  --accent-soft: rgba(217, 72, 60, .16);
  --danger: #F06A5E;
  --sep: rgba(244, 234, 223, .08);
  --fill: rgba(244, 234, 223, .06);
  --ok: #5CBF83;
  --warn: #E6A63A;
  --seg-on: rgba(244, 234, 223, .10);
  --hero: linear-gradient(135deg, #6E1D18 0%, #3A1411 100%);
  --hero-text: #F7EBDD;
  --hero-shadow: none;
  --icon-bg: rgba(217, 72, 60, .18);
  --edge: rgba(244, 234, 223, .06);
  --shadow: none;
  color-scheme: dark;
}

/* a plain browser (the Mac, the tablet's contract form) follows the system until Telegram says otherwise */
@media (prefers-color-scheme: dark) {
  html:not([data-scheme]) {
    --bg: #211915; --bg2: #15100D; --section: #241B17; --text: #F4EADF; --hint: #A8968A; --subtle: #A8968A;
    --link: #F06A5E; --accent: #D9483C; --accent-soft: rgba(217, 72, 60, .16); --danger: #F06A5E;
    --sep: rgba(244, 234, 223, .08); --fill: rgba(244, 234, 223, .06); --ok: #5CBF83; --warn: #E6A63A;
    --seg-on: rgba(244, 234, 223, .10); --hero: linear-gradient(135deg, #6E1D18 0%, #3A1411 100%);
    --hero-text: #F7EBDD; --hero-shadow: none; --icon-bg: rgba(217, 72, 60, .18); --edge: rgba(244, 234, 223, .06);
    --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; } /* over a class's own display */

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg2);
  color: var(--text);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
h1 { font-family: var(--head-font); letter-spacing: 0; } /* every screen's title, like the greeting's */
a { color: var(--link); text-decoration: none; }
img { display: block; }

#app { max-width: 600px; margin: 0 auto; min-height: 100vh; }

/* ---------------------------------------------------------------- shell */

.boot { display: grid; place-items: center; min-height: 70vh; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--fill); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 8px;
  background: var(--bg2);
  border-bottom: 1px solid var(--sep);
}
.topbar .brand { font-weight: 600; font-size: 16px; }
.topbar .back {
  border: 0; background: none; color: var(--link); font-size: 16px;
  padding: 8px; border-radius: 10px; cursor: pointer;
}
.topbar .back:hover { background: var(--fill); }

.screen { padding: 12px var(--pad) 32px; animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.head { padding: 8px 2px 14px; }
.head h1 {
  margin: 0; font-family: var(--head-font); font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: 0;
}
.head .sub { margin-top: 4px; color: var(--hint); font-size: 14px; }

h2.label {
  margin: 22px 4px 8px; font-size: 13px; font-weight: 600; color: var(--hint);
  text-transform: uppercase; letter-spacing: .04em;
}

.card {
  background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 12px; }
.pad { padding: 14px var(--pad); }

/* ---------------------------------------------------------------- home */

.hello {
  position: relative; overflow: hidden; margin: 6px 0 14px; padding: 18px 18px 20px; border-radius: 18px;
  background: var(--hero); color: var(--hero-text); box-shadow: var(--hero-shadow);
}
.hello::after { /* a lasso's loop in the corner */
  content: ""; position: absolute; right: -20px; bottom: -28px; width: 140px; height: 140px; border-radius: 50%;
  border: 10px solid rgba(255, 246, 236, .10); pointer-events: none;
}
.hello h1 {
  margin: 0; font-family: var(--head-font); font-size: 24px; font-weight: 700; letter-spacing: 0;
}
.hello .sub { color: var(--hero-text); opacity: .82; margin-top: 2px; }

.stats { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 8px; margin-bottom: 16px; }
.stat {
  min-width: 0; padding: 12px 14px;
  background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat b {
  display: block; font-family: var(--head-font); font-size: 22px; line-height: 1.1; font-weight: 700;
  color: var(--accent);
}
.stat span { display: block; margin-top: 2px; font-size: 12px; color: var(--hint); }
.stat.warn b { color: var(--warn); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 104px; padding: 14px;
  background: var(--section); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); cursor: pointer; transition: transform .12s ease;
}
.tile:active { transform: scale(.97); }
.tile .icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 21px; background: var(--icon-bg);
}
.tile .name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.tile .meta { font-size: 12px; color: var(--hint); margin-top: -6px; }
.tile.wide { grid-column: span 2; flex-direction: row; align-items: center; min-height: 0; }
.tile.wide .meta { margin-top: 0; }

.foot { margin-top: 22px; text-align: center; color: var(--hint); font-size: 13px; }

/* «📊 Неделя» (weekly dashboard spec): the owner's week above the tiles; its charts take the theme's colours */
.dash { margin-bottom: 14px; }
.dash-head { display: flex; align-items: center; gap: 8px; }
.dash-head > b { font-family: var(--head-font); font-size: 17px; white-space: nowrap; }
.dash-head .week { flex: 1; margin-bottom: 0; }
.dash-part { display: block; color: var(--text); margin-top: 12px; }
.dash-part + .dash-part { padding-top: 12px; border-top: 1px solid var(--sep); }
.dash-label {
  font-size: 12px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .04em;
}
.dash-part p { margin: 6px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; height: auto; margin-top: 4px; }
.chart .col { fill: var(--accent); } /* not `.bar`: that is the questionnaire's progress bar */
.chart .ghost { fill: var(--hint); opacity: .32; }
.chart .pip { fill: var(--hint); }
.chart .base { stroke: var(--sep); stroke-width: 1; }
.chart text { fill: var(--hint); font-size: 10px; text-anchor: middle; font-family: var(--font); }
.chart .top { fill: var(--text); font-weight: 600; }
.chart .note { font-size: 8px; }
.strip {
  display: flex; gap: 2px; margin-top: 8px; border-radius: 8px; overflow: hidden;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.strip span { flex: 1 1 0; padding: 3px 4px; text-align: center; white-space: nowrap; color: var(--accent-text); }
.strip .g5 { background: var(--ok); }
.strip .g4 { /* the 5s' green, lighter: the text stays as clear */
  background: var(--ok); background-image: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3));
}
.strip .g3 { background: var(--warn); }
.strip .g2 { background: var(--danger); }
/* the dark theme's pale greens: dark text */
html[data-scheme="dark"] .strip .g5, html[data-scheme="dark"] .strip .g4 { color: var(--bg2); }
@media (prefers-color-scheme: dark) {
  html:not([data-scheme]) .strip .g5, html:not([data-scheme]) .strip .g4 { color: var(--bg2); }
}

/* ---------------------------------------------------------------- lists */

.list { background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px var(--pad);
  color: var(--text); position: relative; cursor: pointer; background: none; border: 0; width: 100%; text-align: left;
}
.row + .row::before, .kv + .kv::before, .phone + .phone::before, .parent .phone::before, .pinrow::before,
.lesson + .lesson::before, .check + .check::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--pad); border-top: 1px solid var(--sep);
}
.row + .row::before { left: 64px; }
.row.plain + .row.plain::before { left: var(--pad); }
.lesson + .lesson::before { left: 58px; }
.row:active { background: var(--fill); }
.row .body { flex: 1; min-width: 0; }
.row .title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .chev { color: var(--hint); opacity: .6; font-size: 18px; }
.row.static { cursor: default; }
.row.static:active { background: none; }
.row.selected { background: var(--accent-soft); }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px var(--pad); position: relative; }
.kv .k { color: var(--hint); }
.kv .v { text-align: right; font-weight: 500; word-break: break-word; }

/* ---------------------------------------------------------------- avatars */

.avatar {
  flex: 0 0 auto; position: relative; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 600; letter-spacing: .02em;
  background: linear-gradient(160deg, var(--a1, #72d5fd), var(--a2, #2a9ef1));
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- classes */

.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.klass {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; min-height: 96px;
  background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text);
  cursor: pointer; transition: transform .12s ease;
}
.klass:active { transform: scale(.97); }
.klass .lbl { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.klass .who {
  font-size: 12px; color: var(--hint); line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.klass .num { margin-top: auto; font-size: 12px; color: var(--subtle); }
.bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }

.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick {
  display: grid; place-items: center; height: 48px; border-radius: 10px; background: var(--section);
  box-shadow: var(--shadow); color: var(--text); font-weight: 700; font-size: 16px;
}
.pick:active { transform: scale(.96); }
.caption { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; font-size: 17px; font-weight: 600; }

/* ---------------------------------------------------------------- class: photo grid */

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; padding-top: 4px; }
.pupil {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  color: var(--text); cursor: pointer; min-width: 0;
}
.pupil:active .avatar { transform: scale(.95); }
.pupil .avatar { transition: transform .12s ease; box-shadow: var(--shadow); }
.pupil .nm { font-size: 13px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.pupil .nm small { display: block; color: var(--hint); font-size: 12px; }

/* ---------------------------------------------------------------- controls */

.seg {
  display: flex; gap: 2px; padding: 2px; margin-bottom: 14px;
  background: var(--fill); border-radius: 10px;
}
.seg button {
  flex: 1 1 auto; border: 0; background: none; padding: 7px 8px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.seg button.on {
  background: var(--seg-on, var(--section)); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600;
}

.search {
  position: relative; display: flex; align-items: center; height: 40px; padding: 0 12px 0 36px; margin-bottom: 14px;
  background: var(--fill); border-radius: 10px;
}
.search::before {
  content: ""; position: absolute; left: 13px; top: 12px; width: 10px; height: 10px;
  border: 2px solid var(--hint); border-radius: 50%;
}
.search::after {
  content: ""; position: absolute; left: 24px; top: 25px; width: 6px; height: 2px; border-radius: 1px;
  background: var(--hint); transform: rotate(45deg);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.search input::placeholder { color: var(--hint); }

.input {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--sep);
  background: var(--bg); font-size: 17px; letter-spacing: .06em; outline: 0;
}
.input:focus { border-color: var(--accent); }
.input.bad { border-color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 15px;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn[aria-disabled="true"] { opacity: .45; } /* not ready yet, still tapped: the tap says why (the contract's form) */
.btn.block { display: flex; width: 100%; }
.btn.soft { background: var(--accent-soft); color: var(--link); }
.btn.ghost { background: none; color: var(--link); padding: 0 8px; height: 36px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.danger { background: none; color: var(--danger); }
.btns { display: flex; gap: 10px; margin-top: 14px; }
.btns.sticky {
  position: sticky; bottom: 0; z-index: 5; margin: 14px calc(var(--pad) * -1) 0;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: var(--bg2);
  border-top: 1px solid var(--sep);
}
.btns .btn { flex: 1; }

.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px;
  background: var(--fill); font-size: 12px; font-weight: 600; color: var(--subtle); white-space: nowrap;
}
.chip.ok { background: rgba(47, 166, 106, .14); color: var(--ok); }
.chip.warn { background: rgba(224, 155, 0, .16); color: var(--warn); }
.chip.bad { background: rgba(229, 72, 77, .13); color: var(--danger); }
.chip.accent { background: var(--accent-soft); color: var(--link); }

/* ---------------------------------------------------------------- student card */

.profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 16px; }
.profile .avatar { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
.profile h1 { margin: 14px 0 6px; font-family: var(--head-font); font-size: 21px; line-height: 1.2; font-weight: 700; }
.profile .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.profile .curator { margin-top: 8px; font-size: 13px; color: var(--hint); }
.profile .btn { margin-top: 10px; }

.parent { position: relative; }
.parent .who { font-weight: 600; }
.parent .rel { font-size: 13px; color: var(--hint); }
.phone { display: flex; align-items: center; gap: 12px; padding: 10px var(--pad); position: relative; }
.phone .num { flex: 1; font-size: 16px; font-variant-numeric: tabular-nums; }
.phone .num small { display: block; font-size: 12px; color: var(--hint); }
.pinrow { display: flex; align-items: center; gap: 8px; padding: 8px var(--pad) 10px; position: relative; }
.pinrow .body { flex: 1; min-width: 0; }
.pinrow small { display: block; font-size: 12px; color: var(--hint); }
.pinrow .acts { display: flex; gap: 2px; }
.pinfl {
  font-variant-numeric: tabular-nums; letter-spacing: .06em; font-weight: 600; font-size: 16px; white-space: nowrap;
}
.pinfl.hidden { color: var(--hint); letter-spacing: .02em; }
.pinfl-form, .birth-form { padding: 0 var(--pad) 14px; }
.pinfl-form .hint, .birth-form .hint { font-size: 12px; color: var(--hint); margin-top: 6px; }
.pinfl-form .hint.bad, .birth-form .hint.bad { color: var(--danger); }

.secure { position: relative; overflow: hidden; } /* the turned watermark of a tall tab never widens the page */
.watermark {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; user-select: none;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 34px 26px; padding: 10px;
  transform: rotate(-24deg) scale(1.4); opacity: .085; font-size: 13px; font-weight: 700; color: var(--text);
}
.watermark span { white-space: nowrap; }

/* ---------------------------------------------------------------- timetable */

.week { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.week .range { font-weight: 600; font-variant-numeric: tabular-nums; }
.week .nav {
  width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--fill); cursor: pointer;
  font-size: 18px; color: var(--text);
}
.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 14px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0;
  border: 0; border-radius: 10px; background: var(--section); box-shadow: var(--shadow); cursor: pointer;
}
.day small { font-size: 11px; color: var(--hint); text-transform: uppercase; }
.day b { font-size: 16px; font-variant-numeric: tabular-nums; }
.day.today b { color: var(--link); }
.day.off { opacity: .5; }
.day.on { background: var(--accent); color: var(--accent-text); }
.day.on small, .day.on b { color: var(--accent-text); }

.lesson { display: flex; gap: 12px; padding: 12px var(--pad); position: relative; align-items: flex-start; }
.lesson .no {
  flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: 14px;
}
.lesson .body { flex: 1; min-width: 0; }
.lesson .subj { font-weight: 600; }
.lesson .meta { font-size: 13px; color: var(--hint); margin-top: 1px; }
.lesson .meta a { color: var(--link); }
.lesson .time { font-size: 13px; color: var(--subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lesson.now { background: var(--accent-soft); }
button.lesson { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
button.lesson:active { background: var(--fill); }
button.lesson.now { background: var(--accent-soft); }

/* ---------------------------------------------------------------- imports and the picker */

.kinds .row .icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 21px; background: var(--icon-bg);
}
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.counts .stat { min-width: 0; }
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.lines { margin: 0; padding: 10px var(--pad) 12px 34px; font-size: 14px; }
.lines li + li { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 12px var(--pad); cursor: pointer; position: relative; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.check span { flex: 1; }

.picker { display: grid; grid-template-columns: 2fr 3fr; gap: 10px; align-items: start; }
.picker h3 {
  margin: 0 2px 8px; font-size: 13px; color: var(--hint); font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
}
.shots { display: grid; gap: 8px; }
.shot {
  position: relative; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--fill); aspect-ratio: 3 / 4; box-shadow: var(--shadow); outline: 3px solid transparent;
  outline-offset: -3px; transition: outline-color .15s ease;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
  font-size: 11px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.shot.on { outline-color: var(--accent); }
.picker .search { margin-bottom: 8px; }
.picker .row { min-height: 48px; gap: 10px; padding: 6px 10px; }
.picker .row + .row::before { left: 52px; }

/* ---------------------------------------------------------------- staff list and card */

.seg.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1) 14px; border-radius: 0;
  padding: 2px var(--pad); background: none; gap: 6px; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: 0 0 auto; background: var(--fill); padding: 7px 12px; }
.seg.scroll button.on { background: var(--accent); color: var(--accent-text); box-shadow: none; }

.filters {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: -4px calc(var(--pad) * -1) 12px; padding: 2px var(--pad);
}
.filters::-webkit-scrollbar { display: none; }
.chip.tap { height: 32px; padding: 0 12px; border-radius: 16px; border: 0; font-size: 13px; cursor: pointer;
  background: var(--section); box-shadow: var(--shadow); color: var(--text); font-weight: 500; }
.chip.tap.on { background: var(--accent); color: var(--accent-text); }

.row .badges { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 15px; }

.photo34 { border-radius: 14px; }
.staffhead .chips { margin-top: 8px; }
.acts-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -4px 0 16px; }
.acts-row .btn { flex: 1 1 140px; }
.foot.tight { margin: -8px 0 14px; font-size: 12px; }

.kv.block { flex-direction: column; gap: 2px; }
.kv.block .v { text-align: left; font-weight: 400; white-space: pre-wrap; }
.kv.block .btn { align-self: flex-start; }  /* «💳 Оплата»: «Копировать» under a requisite */
.kv.col { flex-direction: column; gap: 6px; }
.kv .v.muted { color: var(--hint); font-weight: 400; }
.kv .btn.ghost { height: 24px; padding: 0; margin: -2px 0; }
.chips.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.ctitle { font-weight: 600; }

.review .rhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review .when { font-size: 13px; color: var(--hint); font-variant-numeric: tabular-nums; }
.review .meta { font-size: 13px; color: var(--hint); margin-top: 6px; }
.remark { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fill); flex: 0 0 auto; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--danger); }

/* ---------------------------------------------------------------- «My questionnaire» */

.field { display: block; position: relative; }
.field + .field { margin-top: 14px; }
.flabel { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--subtle); }
.flabel b { color: var(--danger); font-weight: 600; }
.fhint { display: block; margin-top: 4px; font-size: 12px; color: var(--hint); }
.fhint:empty { display: none; }
.field.bad .fhint { color: var(--danger); }
.field.bad .input { border-color: var(--danger); }
.input.text { letter-spacing: normal; font-size: 16px; }
textarea.input.long { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.4; resize: vertical;
  font: inherit; font-size: 16px; }
input.input[type="date"] { appearance: none; -webkit-appearance: none; display: flex; align-items: center; }
.seg.choice { margin-bottom: 0; }

.meter { margin-bottom: 12px; }
.meter .mhead { display: flex; justify-content: space-between; margin-bottom: 8px; }
.bar.big { height: 8px; border-radius: 4px; }
.bar.big i { border-radius: 4px; background: var(--accent); transition: width .3s ease; }
.bar.big.done i { background: var(--ok); }
.foot.req { margin: 12px 0 0; font-size: 12px; }

.photo-edit {
  display: flex; gap: 14px; align-items: center; padding: 12px var(--pad); margin-bottom: 12px;
  background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow);
}
.photo-edit .body { flex: 1; min-width: 0; }
.picker-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.step {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  border: 2px solid var(--sep); color: #fff; font-size: 14px; font-weight: 700;
}
.step.done { background: var(--ok); border-color: var(--ok); }
.head .sub .chip { vertical-align: 1px; margin-left: 4px; }

.gate { margin-bottom: 12px; }
.gate .q { font-weight: 600; margin-bottom: 10px; }
.rowcard { margin-bottom: 12px; }
.card + .rowcard, .notice + .card { margin-top: 0; }
.rowcard .rtop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rowcard .ctitle + .field { margin-top: 12px; }
.rowcard .btn.danger.small { height: 28px; padding: 0 4px; }
.scan { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sep); }
.scan .shead { display: flex; align-items: center; justify-content: space-between; }
.scan .flabel { margin: 0; }
.card.pad + .card.pad { margin-top: 12px; }
.card.pad + .rowcard { margin-top: 12px; }

.consent { text-align: center; margin-bottom: 12px; }
.consent .big { font-size: 40px; }
.consent h2 { margin: 6px 0 8px; font-size: 18px; }
.consent p { margin: 0; color: var(--subtle); text-align: left; line-height: 1.45; }
label.check.card { margin-bottom: 4px; }
.sheet .ask { margin: 4px 2px 6px; font-size: 16px; line-height: 1.4; }

/* ---------------------------------------------------------------- roll-call, reconciliation, movements */

.classes.rc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.klass.rc { min-width: 0; padding: 10px; }
.klass.rc .who { display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; }
.klass.rc .chip {
  height: auto; min-height: 20px; padding: 2px 6px; font-size: 11px; white-space: normal; line-height: 1.2;
}
.klass.rc .tick { color: var(--ok); font-size: 16px; }
.photos.rc { padding-bottom: 8px; }
.photos.rc .span { grid-column: 1 / -1; }
.photos.rc .pupil { position: relative; cursor: default; }
.pupil .face { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.pupil .face[disabled] { cursor: default; }
.pupil .mark {
  position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; background: var(--section); box-shadow: var(--shadow);
}
.pupil .mark:empty { display: none; }
.pupil.mark-absent .avatar { opacity: .55; }
.pupil.mark-none .avatar { filter: grayscale(.7); opacity: .8; }
.pupil .why { font-size: 11px; color: var(--danger); margin-top: -4px; }
.pupil .why:empty { display: none; }
.pupil .badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.pupil .badges .chip { height: 18px; padding: 0 6px; font-size: 10px; }
.pupil .more {
  position: absolute; top: -4px; right: 2px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: var(--section); box-shadow: var(--shadow); color: var(--hint); font-size: 16px; cursor: pointer;
}
.chips.choices .chip.tap { height: 34px; }
.who-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.who-head h2 { margin: 0; }
a.notice { color: var(--text); }
.rcp .rtop { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rcp .rtop .body { flex: 1; min-width: 0; }
.rcp .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--hint); }
.mk { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--sep); }
.mk small { color: var(--hint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rcp .seg { margin: 10px 0 0; }
.rcp .chips.choices { margin-top: 8px; }
.rcp .flabel { margin: 10px 0 6px; }
.chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg {
  align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--section);
  box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word;
}
.msg.mine { align-self: flex-end; background: var(--accent-soft); }
.msg small { display: block; margin-bottom: 2px; color: var(--hint); font-size: 12px; }
.mvrow + .mvrow { border-top: 1px solid var(--sep); }
.mvrow .row .meta.wrap { white-space: normal; }
.mvrow .acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--pad) 12px; }
.row.leaver .meta { white-space: normal; }  /* «🚪 Ушедшие»: the reason and who recorded it in full */
.row.leaver .body .chip { margin-top: 4px; }
.lib-row a { display: block; color: var(--text); }  /* «📚 Библиотека»: a book's card by its title, */
.lib-row .body > .btn { margin-top: 6px; }           /* its button under it */
.lib-books { padding: 0 0 6px 14px; }               /* an author's books under him */
.lib-shelf, .lib-shelf > .acts-row { margin-top: 12px; }  /* a shelf under its choices, its button under it */
.lib-card { margin-bottom: 16px; }                  /* a book's card above its buttons */

/* ---------------------------------------------------------------- attendance, Saturday, photos (stage 3) */

.week .nav[disabled] { opacity: .35; cursor: default; }
.week .range { flex: 1; min-width: 0; text-align: center; }
.week .range .input { height: 36px; max-width: 190px; margin: 0 auto; font-size: 15px; }
a.rtop { color: var(--text); }
.rcp .phone { padding: 8px 0; }
.mk.by span { flex: 0 0 auto; }
.mk.by small { white-space: normal; text-align: right; }
.mk.col { flex-direction: column; gap: 2px; }
.mk.col small { white-space: normal; }
.rcp .chips.wrap { margin-top: 6px; }
.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 14px; }
.cal .wd { text-align: center; font-size: 11px; color: var(--hint); text-transform: uppercase; }
.cal .cd {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 5px 0;
  border-radius: 9px; background: var(--section); box-shadow: var(--shadow); font-variant-numeric: tabular-nums;
}
.cal .cd b { font-size: 14px; font-weight: 600; }
.cal .cd small { font-size: 12px; line-height: 1; min-height: 12px; }
.cal .cd.none { background: none; box-shadow: none; color: var(--hint); }
.cal .cd.present { background: rgba(47, 166, 106, .14); }
.cal .cd.absent { background: rgba(229, 72, 77, .13); }
.cal .cd.late { background: rgba(224, 155, 0, .16); }
.cal .cd.saturday { background: var(--accent-soft); }
.cal .cd.day_off { background: none; box-shadow: none; color: var(--hint); }
.cal .cd.today b { color: var(--link); }
.mkday + .mkday { margin-top: 12px; }
.mkday .chips.choices { margin-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pair .field + .field { margin-top: 0; }
.search-pair { grid-template-columns: 2fr 1fr; margin: 10px 0 6px; }
.search-pair .search { margin: 0; }
.pick-pupils { max-height: 46vh; overflow-y: auto; }
.pick-pupils .pupil.mark-present .avatar { outline: 3px solid var(--accent); outline-offset: 1px; }
button.mk.plain {
  width: 100%; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.decide-ask { text-align: center; font-size: 17px; font-weight: 600; margin: 4px 0 12px; }

/* ---------------------------------------------------------------- finance: sums, payments, months */

.sum { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum.bad { color: var(--danger); }
.sum.ok { color: var(--ok); }
.row > .sum { flex: 0 0 auto; }
.kv .v .of { display: block; color: var(--hint); font-size: 13px; font-weight: 400; }
.struck .title, .struck .sum { text-decoration: line-through; opacity: .6; }
.mvrow .row .body .chip { margin-top: 4px; }
.mk-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk.dim { opacity: .55; }
.fin-months .mk:first-child { border-top: 0; }
.sheet .total { margin-top: 12px; font-weight: 600; }
.sheet .total:empty { display: none; }
.parts .field { margin-left: 8px; }
.acts-row.fin-acts { margin: 12px 0 4px; }
.fin-acts .btn { height: auto; min-height: 34px; padding: 7px 10px; line-height: 1.25; white-space: normal; }
.fin-found:not(:empty) { margin-bottom: 14px; }
.fin-form > .seg.choice { margin-bottom: 12px; }
.fin-btns { flex-wrap: wrap; }
.fin-btns .btn { flex: 1 1 30%; height: auto; min-height: 44px; padding: 8px 12px; line-height: 1.25; }

/* ---------------------------------------------------------------- e-contract */

.ctext { padding: 16px var(--pad); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ctext h2 { margin: 0 0 12px; font-size: 16px; text-align: center; line-height: 1.35; }
.ctext h3 { margin: 18px 0 8px; font-size: 15px; }
.ctext p { margin: 0 0 10px; white-space: pre-line; }
.ctext .sched { overflow-x: auto; margin: 4px 0 12px; }
.ctext table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ctext th, .ctext td { border: 1px solid var(--sep); padding: 6px 8px; text-align: left; }
.ctext th:last-child, .ctext td:last-child { text-align: right; white-space: nowrap; }
.ctext th, .ctext tfoot td { font-weight: 700; }
.ctext .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.cstep { display: flex; align-items: center; gap: 10px; margin: 22px 2px 10px; }
.cstep h2 { margin: 0; font-size: 17px; }
.cnum {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--fill); color: var(--subtle); font-size: 14px; font-weight: 700;
}
.cnum.done { background: var(--ok); color: #fff; }
.input.static { display: flex; align-items: center; letter-spacing: normal; color: var(--subtle); }
.doc-shot img { display: block; max-width: 100%; max-height: 200px; margin-bottom: 8px; border-radius: 10px; }
.field .flabel .chip { margin-left: 4px; vertical-align: 1px; }
.field > .btn.ghost.small { margin-top: 4px; }
.sig {
  display: block; width: 100%; height: 220px; border: 2px dashed var(--sep); border-radius: var(--radius);
  background: #fff; touch-action: none; cursor: crosshair;
}
.qr {
  display: block; width: min(260px, 72vw); height: auto; margin: 14px auto 6px; border-radius: 8px;
  image-rendering: pixelated;
}
.done { text-align: center; padding: 16px 0; }
.done .big { font-size: 48px; }
.done .claim { margin-top: 18px; text-align: center; }
.done .claim h2 { margin: 0 0 6px; font-size: 18px; }
.done .claim p { margin: 0; color: var(--subtle); }
.done .claim .btn { margin-top: 10px; }
.topbar .langs { display: flex; gap: 6px; margin-left: auto; }
.parent-link { margin: 12px 0; }
.parent-link summary { font-weight: 600; cursor: pointer; }
.parent-link .input { margin-top: 8px; font-size: 14px; letter-spacing: normal; }
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shots-grid figure { margin: 0; }
.shots-grid img { display: block; width: 100%; border-radius: 10px; background: #fff; }
.shots-grid figcaption { margin-top: 4px; font-size: 12px; color: var(--hint); }
.rowcard.discount { padding-bottom: 12px; border-bottom: 1px solid var(--sep); }
.checks .check { padding-left: 0; padding-right: 0; }
.pick-kind { margin-top: 14px; }

/* ---------------------------------------------------------------- grade journal: a lesson's page, a month, quarters */

.g5 { --g: var(--ok); } .g4 { --g: #2f86c9; } .g3 { --g: var(--warn); } .g2, .g1 { --g: var(--danger); }
.gv { color: var(--g, var(--text)); font-weight: 700; }
.jr-pupil { position: relative; padding: 8px var(--pad); }
.jr-pupil + .jr-pupil::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--pad); border-top: 1px solid var(--sep);
}
.jr-pupil > .input { margin-top: 6px; }
.jr-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.jr-row .body { flex: 1; min-width: 0; cursor: pointer; }
.jr-row .title { /* a pupil's whole name on two lines: brothers and namesakes differ at the end */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25;
}
.jr-row .meta { font-size: 12px; color: var(--hint); }
.gb { display: flex; flex: none; gap: 4px; }
.gb button {
  min-width: 34px; height: 34px; padding: 0 6px; border: 1px solid var(--sep); border-radius: 8px;
  background: var(--section); font-weight: 700; cursor: pointer;
}
.gb button.on { background: var(--g, #3b3f46); border-color: transparent; color: #fff; }
.gb button.nb { font-size: 12px; color: var(--hint); }
.gb button.nb.on { color: #fff; }
.jr-grid { overflow-x: auto; background: var(--section); border-radius: var(--radius); box-shadow: var(--shadow); }
.jr-grid table { border-collapse: collapse; font-size: 13px; }
.jr-grid th, .jr-grid td {
  padding: 7px 8px; border-bottom: 1px solid var(--sep); text-align: center; white-space: nowrap;
}
.jr-grid td .gv + .gv { margin-left: 4px; }
.jr-grid tbody th {
  position: sticky; left: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; text-align: left;
  font-weight: 500; background: var(--section);
}
.jr-grid thead th { font-size: 12px; font-weight: 600; color: var(--hint); }
.jr-grid td.nb { font-size: 11px; color: var(--hint); }
.jr-note { margin: 8px 2px; text-align: center; font-size: 12px; color: var(--hint); }
.jr-text, .jr-grid, .acts-row.jr-acts { margin-top: 12px; }
.jr-pick { margin-bottom: 16px; }
.gvs { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.gvs span { display: flex; flex-direction: column; align-items: center; }
.gvs small { font-size: 10px; color: var(--hint); }

/* ---------------------------------------------------------------- the parent diary: a week, a quarter */

.pd-marks { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 13px; }
.pd-text { margin-top: 3px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.pd-text b { font-weight: 500; color: var(--hint); }
.pd-head { display: flex; align-items: flex-start; gap: 10px; }
.pd-head .body { flex: 1; min-width: 0; }
.pd-head .meta { margin-top: 2px; font-size: 13px; color: var(--hint); }
.pd-final { flex: none; text-align: right; font-size: 12px; color: var(--hint); }
.pd-final .gv { display: block; font-size: 22px; line-height: 1.1; }
label.check.card.pd-notify { margin-top: 16px; }
.pd-notify .fhint { margin-top: 2px; }

/* ---------------------------------------------------------------- «🍽 Меню»: a week, a day's list */

.menu-meal { margin: 10px 2px 6px; font-size: 13px; font-weight: 600; color: var(--hint); }
.menu-total { margin: 8px 2px 14px; font-size: 13px; font-weight: 600; text-align: right; }
.menu-dish { padding: 8px 0; border-bottom: 1px solid var(--sep); }
.menu-name { display: flex; gap: 6px; }
.menu-nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.menu-nums .input { height: 38px; padding: 0 6px; font-size: 15px; letter-spacing: 0; }
.menu-head { margin: 0; font-size: 10px; line-height: 1.15; color: var(--hint); text-align: center; }
.menu-head:only-child { display: none; }

/* ---------------------------------------------------------------- «🌟 Успехи»: the files of a pupil */

.ach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.ach-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ach-tile small { color: var(--hint); font-size: 11px; overflow-wrap: anywhere; }
.ach-face { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 0; border: 0;
  border-radius: 10px; overflow: hidden; background: var(--fill); color: var(--text); font: inherit; }
.ach-face img { width: 100%; height: 100%; object-fit: cover; }
.ach-pdf { font-size: 13px; font-weight: 600; }
.ach-tile .btn { padding: 4px 6px; }

/* ---------------------------------------------------------------- the timetable planner: the plan's tabs */

.rowcard.bad { box-shadow: 0 0 0 2px var(--danger); }
.rowcard .why { margin: -4px 0 10px; font-size: 13px; color: var(--danger); }
.rowcard .check { padding: 10px 0 0; }
.rowcard .field + .pair { margin-top: 14px; }
.trio { display: grid; grid-template-columns: 72px 1fr 1fr; gap: 8px; }
.trio .field + .field { margin-top: 0; }
.notice .more { margin-top: 4px; color: var(--hint); }

/* ---------------------------------------------------------------- states */

.skel { background: var(--fill); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel.circle { border-radius: 50%; }
.skel-line { height: 12px; margin: 6px 0; }

.empty { text-align: center; padding: 40px 24px; color: var(--hint); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px;
  background: var(--accent-soft); font-size: 14px; line-height: 1.35;
}
.notice.bad { background: rgba(229, 72, 77, .1); }
.notice.warn { background: rgba(224, 155, 0, .12); }
.fail { text-align: center; padding: 48px 24px; }
.fail .big { font-size: 40px; }
.fail p { color: var(--hint); margin: 10px 0 18px; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: rgba(28, 28, 30, .92); color: #fff; font-size: 14px;
  transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sheet-bg {
  position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .38);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out;
}
.sheet {
  width: 100%; max-width: 600px; max-height: 86vh; overflow-y: auto;
  padding: 8px var(--pad) calc(20px + env(safe-area-inset-bottom));
  background: var(--bg2); border-radius: 16px 16px 0 0; animation: rise .22s ease-out;
}
.sheet .grip { width: 36px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 4px; font-size: 19px; }
.sheet .sub { color: var(--hint); margin-bottom: 12px; font-size: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }

.login { max-width: 360px; margin: 12vh auto 0; text-align: center; }
.login .big { font-size: 44px; }
.login p { color: var(--hint); }
.login .input { text-align: center; font-size: 24px; letter-spacing: .3em; margin: 8px 0 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 520px) {
  .classes { grid-template-columns: repeat(4, 1fr); }
  .classes.rc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photos { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile.wide { grid-column: span 3; }
}
