:root {
  --blue: #0057b8;
  --blue-dark: #0a4a99;
  --yellow: #ffd500;
  --ink: #10203a;
  --muted: #33415c;
  --soft: #eef4fb;
  --line: #e2e8f0;
  --footer: #10203a;
  --footer-text: #cbd5e1;
  --pad: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
/* Like an app: no zoom on a double tap. */
html { touch-action: manipulation; }
[hidden] { display: none !important; }
body { margin: 0; background: #ffffff; color: var(--ink); font-family: Montserrat, system-ui, sans-serif; }
a { color: var(--blue); }
a:hover { color: #003f86; }
h1, h2, .display { font-family: Unbounded, sans-serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Перший екран */
.hero { position: relative; background: var(--blue); color: #ffffff; }
/* Only the watermark is clipped to the blue header; the account menu may hang below it. */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.watermark { position: absolute; right: -170px; top: -130px; width: 760px; height: 760px; opacity: 0.12; pointer-events: none; }
.hero-inner { position: relative; padding-top: 20px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 56px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Unbounded, sans-serif; font-weight: 800; font-size: 22px; color: #ffffff; text-decoration: none; }
.brand-logo { flex-shrink: 0; width: 40px; height: 40px; }
.brand span:not(.brand-name), .brand-dot { color: var(--yellow); }
.brand:hover { color: #ffffff; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: #ffffff; text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 999px; }
.nav a:hover { background: rgba(255, 255, 255, 0.12); }
.nav a.active { background: rgba(255, 255, 255, 0.2); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.lang a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 999px; color: rgba(255, 255, 255, 0.75); text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }
.lang a:hover { color: #ffffff; }
.lang a.active { background: #ffffff; color: var(--blue, #1d4ed8); }
.hero-body { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.hero-text { display: flex; flex-direction: column; gap: 16px; flex: 1 1 520px; min-width: 0; }
.kicker { font-size: 15px; font-weight: 600; color: var(--yellow); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumb-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 16px 0 10px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.crumb-back:hover { color: var(--blue); background: #e2ecf8; }
.group-switch { appearance: none; min-height: 40px; padding: 0 36px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230057b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--blue); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.group-switch:hover { border-color: var(--blue); }
.group-switch:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.02em; }
.hero p { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.5; color: #dbeafe; }
.next { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 24px; background: var(--yellow); color: var(--ink); flex: 0 1 320px; }
.next-label { font-size: 14px; font-weight: 700; }
.next-subject { font-family: Unbounded, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.25; }
.next-meta { font-size: 14px; color: var(--muted); }
.next-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; margin-top: 10px; min-height: 48px; border-radius: 999px; background: var(--blue); color: #ffffff; text-decoration: none; font-weight: 700; font-size: 15px; }
.next-locked { display: flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 48px; padding: 0 16px; border: 2px dashed rgba(16, 32, 58, 0.35); border-radius: 999px; color: var(--ink); font-weight: 700; font-size: 15px; text-align: center; }
.next-btn:hover { color: #ffffff; background: #00469a; }
.next-btn[hidden] { display: none; }

/* Основна частина */
main { padding-top: 56px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 64px; }
section h2 { margin: 0; font-size: 30px; font-weight: 700; }
.sched { display: flex; flex-direction: column; gap: 24px; }
.sched-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.sched-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.badge { padding: 6px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 14px; font-weight: 700; }
.days { display: flex; margin-left: auto; gap: 6px; padding: 6px; max-width: 100%; border-radius: 999px; background: var(--soft); overflow-x: auto; }
.days button { flex-shrink: 0; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.days button[aria-pressed="true"] { background: var(--blue); color: #ffffff; }
.days button.today { box-shadow: inset 0 0 0 2px var(--blue); }
.days .short { display: none; }
/* Full day names stop fitting next to the title well before phone width: short ones on a row of their own. */
@media (max-width: 900px) {
  .days { width: 100%; }
  .days { gap: 2px; padding: 4px; }
  .days button { flex: 1 1 0; min-width: 0; padding: 0 2px; }
  .days .long { display: none; }
  .days .short { display: inline; }
}
.day-note { align-self: flex-start; padding: 8px 14px; border-radius: 12px; background: #fff4bf; color: var(--ink); font-size: 14px; font-weight: 600; }
.empty { display: flex; flex-direction: column; gap: 6px; padding: 32px; border-radius: 24px; background: var(--soft); }
.empty strong { font-family: Unbounded, sans-serif; font-size: 22px; font-weight: 700; }
.empty span { font-size: 15px; color: var(--muted); }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pair { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 24px; background: var(--soft); }
.pair-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pair-num { font-family: Unbounded, sans-serif; font-size: 34px; font-weight: 800; color: var(--blue); line-height: 1; }
.pair-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; }
.pair-week { padding: 4px 10px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 700; }
.pair-time { font-size: 14px; font-weight: 700; color: var(--muted); }
.pair h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.pair-meta { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.pair-bottom { display: flex; flex-direction: column; margin-top: auto; padding-top: 6px; }
.pair-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; background: var(--blue); color: #ffffff; text-decoration: none; font-weight: 700; font-size: 14px; }
.pair-btn:hover { color: #ffffff; background: #00469a; }
.pair-nolink { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; border: 2px dashed #8aa4c8; color: var(--muted); font-weight: 600; font-size: 14px; }

.news { display: flex; flex-direction: column; gap: 24px; }
.news-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.news-head a { font-weight: 700; font-size: 15px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 24px; border: 2px solid var(--line); }
.news-meta { display: flex; align-items: center; gap: 10px; }
.tag { padding: 5px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 700; }
.news-date { font-size: 14px; color: var(--muted); }
.news-author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.news-avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: #ffffff; font-size: 14px; font-weight: 700; }
.news-avatar-logo { background: transparent; object-fit: contain; }
.news-avatar.curator { background: var(--yellow); color: var(--ink); }
.news-author-text { display: flex; flex-direction: column; min-width: 0; }
.news-author-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.news-author-role { font-size: 13px; color: var(--muted); }
.news-all { color: var(--blue); font-weight: 700; text-decoration: none; }
.news-all:hover { text-decoration: underline; }
.news .crumbs { margin-bottom: 8px; }
.form-back { align-self: center; width: 100%; max-width: 640px; }
.news-card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; }
.news-link { color: var(--ink); text-decoration: none; }
.news-link:hover { color: var(--blue); }
.news-card .news-excerpt { white-space: normal; }
.news-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.news-foot .news-author { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; }
.news-open { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; margin-left: auto; border-radius: 50%; background: var(--soft); color: var(--ink); }
.news-open:hover { color: var(--blue); background: #e2ecf8; }
.news-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.news-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
/* One news item on its own page: a light card in the middle, long text set for reading. */
.post-page { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 820px; margin: 0 auto; padding: 40px 44px; border-radius: 28px; background: var(--soft); box-sizing: border-box; }
.post-title { margin: 0; font-family: Unbounded, sans-serif; font-size: clamp(26px, 4vw, 36px); font-weight: 800; line-height: 1.15; color: var(--ink); }
.post-page .news-author { margin-top: 0; padding-top: 0; border-top: 0; }
.post-body p { margin: 0 0 16px; font-size: 18px; line-height: 1.65; color: var(--ink); white-space: pre-line; }
.post-body p:last-child { margin-bottom: 0; }
@media (max-width: 720px) { .post-page { padding: 24px 20px; } .post-body p { font-size: 16px; } }

.about { display: flex; flex-wrap: wrap; gap: 32px; padding: clamp(24px, 4vw, 48px); border-radius: 32px; background: var(--blue); color: #ffffff; }
.about-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about-text p { margin: 0; font-size: 18px; line-height: 1.55; color: #dbeafe; }
.about dl { flex: 1 1 440px; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.about dl div { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 20px; background: var(--blue-dark); }
.about dt { font-size: 13px; font-weight: 700; color: var(--yellow); }
.about dd { margin: 0; font-size: 16px; font-weight: 700; }

/* Підвал */
footer { background: var(--footer); color: var(--footer-text); }
.foot { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px; font-size: 14px; }
.foot-left { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.foot-logos { display: flex; align-items: center; gap: 12px; }
.foot-logos .logo { display: block; width: 88px; height: 88px; flex-shrink: 0; }
.foot-info, .foot-right { display: flex; flex-direction: column; gap: 6px; }
.foot-name { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 18px; color: #ffffff; }
.foot-name span { color: var(--yellow); }
.foot-info .college { line-height: 1.5; }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--yellow); font-weight: 700; }
.foot-links a:hover { color: #ffffff; }
/* Footer in three columns: the college, its contacts (the contacts page moved here), social links. */
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: start; gap: 40px; padding-top: 44px; padding-bottom: 32px; font-size: 14px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-head { margin: 0 0 4px; font-family: Unbounded, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #93a4bd; }
.foot-line { display: inline-flex; align-items: flex-start; gap: 10px; align-self: flex-start; color: #ffffff; font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.foot-line svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--yellow); }
.foot-line:hover { color: var(--yellow); }
.foot-social { display: flex; gap: 10px; }
.foot-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.foot-social a:hover { background: var(--yellow); color: var(--ink); }
.foot-social svg { width: 20px; height: 20px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; color: #93a4bd; }
@media (max-width: 900px) {
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
  .foot-cols .foot-left { align-items: flex-start; }
  .foot-cols .foot-links { justify-content: flex-start; }
}
.unofficial { color: #94a3b8; }

/* Телефон */
@media (max-width: 720px) {
  .watermark { right: -190px; top: 14px; width: 460px; height: 460px; }
  .hero-inner { padding-top: 8px; padding-bottom: 32px; gap: 24px; }
  .topbar { gap: 8px; }
  .tools { order: 1; }
  .nav { order: 2; }
  /* Brand on its own line, the three menu links as one even row under it */
  .nav { flex: 1 1 100%; flex-wrap: nowrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
  .nav a { flex: 1 1 0; justify-content: center; min-height: 40px; padding: 0 6px; font-size: 14px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 16px; }
  .next { flex-basis: 100%; padding: 20px; }
  .next-subject { font-size: 19px; }
  .next-btn { min-height: 52px; font-size: 16px; }
  main { padding-top: 32px; padding-bottom: 48px; gap: 48px; }
  section h2 { font-size: 26px; }
  .sched { gap: 16px; }
  .pair { padding: 20px; gap: 10px; }
  .pair-num { font-size: 30px; }
  .pair-btn, .pair-nolink { min-height: 48px; font-size: 15px; }
  .about { padding: 24px 20px; border-radius: 28px; }
  .about-text p { font-size: 16px; }
  .foot { flex-direction: column; text-align: center; padding: 32px 20px; }
  .foot-left { flex-direction: column; }
  .foot-logos .logo { width: 80px; height: 80px; }
  .foot-links { justify-content: center; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-info .college br { display: none; }
}

/* Список груп на головній */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.group-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 24px; background: var(--soft); color: var(--ink); text-decoration: none; }
.group-card:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--blue); }
.group-card { overflow: hidden; }
/* Specialty icon: a big faint watermark on the right of the card */
.group-icon { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); opacity: 0.08; color: var(--blue); pointer-events: none; }
.group-icon svg { display: block; width: 170px; height: 170px; stroke-width: 1.2; }
.group-code, .group-spec { position: relative; }
.group-code { font-family: Unbounded, sans-serif; font-size: 34px; font-weight: 800; color: var(--blue); line-height: 1.1; }
.group-spec { font-size: 15px; line-height: 1.4; color: var(--muted); }
.group-card.mine { background: var(--blue); box-shadow: 0 0 0 4px var(--yellow); }
.group-card.mine:hover { box-shadow: 0 0 0 4px var(--yellow), inset 0 0 0 2px #ffffff; }
.group-card.mine .group-code, .group-card.mine .group-spec { color: #ffffff; }
.group-card.mine .group-icon { opacity: 0.18; color: #ffffff; }
.mine-badge { position: absolute; top: 16px; right: 16px; z-index: 1; padding: 5px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; }
.news-card p { white-space: pre-line; }


/* Фільтри викладачів */
.filters { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 24px; background: var(--soft); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-label { font-size: 14px; font-weight: 700; color: var(--muted); min-width: 140px; }
.select { flex: 1 1 auto; max-width: 100%; min-height: 48px; padding: 0 44px 0 18px; border: 2px solid var(--line); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230057b8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); appearance: none; cursor: pointer; }
.select:focus { outline: none; border-color: var(--blue); }
.filter-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.found { font-size: 14px; font-weight: 700; color: var(--muted); }
.reset { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--blue); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
@media (max-width: 720px) { .filter-label { min-width: 0; width: 100%; } .select { width: 100%; } }
.teachers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; gap: 16px; }
.teacher { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 24px; border: 2px solid var(--line); }
.teacher h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.teacher-subjects { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.teacher-subjects li { display: flex; flex-direction: column; gap: 6px; }
.teacher-subjects li:not([hidden]) ~ li:not([hidden]) { padding-top: 12px; border-top: 1px solid var(--line); }
.teacher-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.teacher-groups a { padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 700; }
.teacher-groups a:hover { background: var(--blue); color: #ffffff; }

/* Sign-in and sign-up */
.auth { display: flex; justify-content: center; }
.auth-card { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 520px; padding: 28px; border-radius: 24px; background: var(--soft); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.field .select { width: 100%; }
.input { min-height: 48px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; background: #ffffff; font: inherit; font-size: 15px; color: var(--ink); }
.input:focus { outline: none; border-color: var(--blue); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.field-value { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.name-fields { display: flex; flex-direction: column; gap: 18px; }
.field-error { font-size: 13px; font-weight: 600; color: #b42318; }
.auth-btn { min-height: 52px; margin-top: 4px; border: 0; border-radius: 999px; background: var(--blue); color: #ffffff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.auth-btn:hover { background: var(--blue-dark); }
.auth-alt { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--blue); font-weight: 700; }
.account-page { flex-direction: column; align-items: center; gap: 24px; }
.account-page .links-note { align-self: center; max-width: 520px; }
.auth-title { margin: 0; font-size: 22px; }
.account-status { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; width: 100%; max-width: 520px; font-size: 15px; }
.account-status a { color: var(--blue); font-weight: 700; }
.status-ok, .status-wait { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-ok { background: #dcfce7; color: #14532d; }
.status-wait { background: #fff4bf; color: var(--ink); }
.verify-note { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; max-width: 520px; padding: 16px 18px; border-radius: 18px; background: #fff4bf; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.45; }
a.field-hint { align-self: flex-start; color: var(--blue); font-weight: 700; }
.msg-unverified { align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: #fff4bf; color: var(--ink); font-size: 12px; font-weight: 700; }
.round-btn:disabled { opacity: 0.35; cursor: not-allowed; }
@media (max-width: 720px) { .auth-card { padding: 20px; } }

/* Account links in the header */
.account { display: flex; align-items: center; gap: 4px; }
.account a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #ffffff; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.account a.active { background: rgba(255, 255, 255, 0.28); }
.account a:hover { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
.account-menu { position: relative; z-index: 20; }
.account-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #ffffff; list-style: none; cursor: pointer; user-select: none; }
.account-btn::-webkit-details-marker { display: none; }
.account-btn:hover, .account-menu[open] .account-btn { background: rgba(255, 255, 255, 0.26); }
.account-btn.active .account-ava { box-shadow: 0 0 0 2px #ffffff; }
.account-ava { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: Unbounded, sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; }
.account-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.account-menu[open] .account-chev { transform: rotate(180deg); }
.account .account-list a { min-height: 0; color: var(--ink); background: transparent; font-weight: 600; }
.account .account-list a, .account .account-list button { display: flex; align-items: center; gap: 12px; }
.account-list svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-list .danger svg { stroke: currentColor; }
.account-out { margin: 4px 6px 6px; padding-top: 4px; border-top: 1px solid var(--line); }
.account .account-list a:hover { background: var(--soft); color: var(--ink); }
.account .account-list { top: calc(100% + 10px); min-width: 270px; max-width: calc(100vw - 32px); padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 18px 50px rgba(16, 32, 58, 0.3); }
.account .account-list > a { margin: 0 6px; }
.account .account-list > a:first-of-type { margin-top: 6px; }
/* The name on blue continues the site header, so the white menu never melts into the white page. */
.account-who { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px 18px; background: var(--blue-dark); text-align: center; }
.account-who-ava { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 3px #ffffff; font-family: Unbounded, sans-serif; font-size: 20px; font-weight: 800; }
.account-who strong { font-size: 15px; color: #ffffff; }
.account-who-mail { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 600; color: #bcd4f2; text-overflow: ellipsis; white-space: nowrap; }
.account .account-list .account-who-edit { display: inline-flex; align-items: center; justify-content: center; width: auto; align-self: center; min-height: 34px; margin: 8px 0 0; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #ffffff; font-size: 13px; font-weight: 700; }
.account .account-list .account-who-edit:hover { background: rgba(255, 255, 255, 0.28); color: #ffffff; }
/* Account profile: the photo in the middle with grey buttons under it. */
.profile-form { display: flex; flex-direction: column; gap: 18px; }
.photo-edit { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.photo-ava { display: inline-flex; align-items: center; justify-content: center; width: 104px; height: 104px; border-radius: 50%; background: var(--yellow); color: var(--ink); object-fit: cover; font-family: Unbounded, sans-serif; font-size: 32px; font-weight: 800; }
.photo-wrap { position: relative; display: inline-flex; }
.photo-group { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: var(--blue); color: #ffffff; box-shadow: 0 0 0 3px var(--soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.photo-menu summary { list-style: none; }
.photo-menu summary::-webkit-details-marker { display: none; }
.photo-menu .msg-menu-list { right: auto; left: 50%; transform: translateX(-50%); min-width: 200px; }
.photo-pick { position: relative; overflow: hidden; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.photo-pick:hover { background: var(--soft); }
.photo-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.photo-btn:hover, .photo-btn:focus-within { box-shadow: inset 0 0 0 2px #c3cfdd; }
.photo-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
img.account-ava, img.account-who-ava, img.news-avatar { object-fit: cover; }
.photo-state { position: absolute; right: 2px; top: 2px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 3px var(--soft); }
.photo-state svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.photo-state.ok { background: #16a34a; color: #ffffff; }
.photo-state.wait { background: var(--yellow); color: var(--ink); }
.photo-state.no { background: #dc2626; color: #ffffff; }
.photo-state.wait svg { stroke-width: 2.4; }
/* The round frame for a new photo (avatar-crop.js). */
.crop-open { overflow: hidden; }
.crop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 32, 58, 0.6); }
.crop-box { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 380px; padding: 22px; border-radius: 24px; background: #ffffff; box-sizing: border-box; }
.crop-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #10203a; touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(16, 32, 58, 0.55); outline: 2px solid rgba(255, 255, 255, 0.85); pointer-events: none; }
.crop-zoom { width: min(300px, 100%); accent-color: var(--blue); }
.crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.crop-actions .photo-btn, .crop-actions .auth-btn { min-height: 48px; margin: 0; font-size: 15px; }
/* «Сповіщення»: grouped rows with switches, as in phone settings. */
.notif-card { position: relative; gap: 14px; }
/* Telegram choices are kept while the chat isn't linked, but shown faded: nothing goes there yet. */
.set-col.idle .switch { opacity: 0.4; }
.set-list { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #ffffff; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; border-top: 1px solid var(--line); box-sizing: border-box; }
.set-row:first-child { border-top: 0; }
label.set-row { cursor: pointer; }
.set-head { min-height: 0; padding-top: 12px; padding-bottom: 6px; }
.set-head .set-col { font-size: 12px; font-weight: 800; color: var(--muted); }
.set-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.set-text small { font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.set-text small.ok { color: #15803d; }
.set-col { display: flex; justify-content: center; width: 64px; flex-shrink: 0; }
.set-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; color: #ffffff; }
.set-icon svg { width: 20px; height: 20px; }
.set-icon.tg { background: #229ed9; }
.set-icon.mail { background: var(--blue); }
.set-btn { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: #229ed9; color: #ffffff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.set-link { padding: 6px 4px; border: 0; background: none; color: var(--blue); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.set-link.danger { color: #b42318; }
.set-select { appearance: none; min-height: 36px; margin-right: 8px; padding: 0 34px 0 14px; border: 0; border-radius: 999px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310203a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch { appearance: none; position: relative; width: 48px; height: 28px; flex-shrink: 0; margin: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(16, 32, 58, 0.3); transition: transform 0.15s; }
.switch:checked { background: #16a34a; }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(0, 87, 183, 0.35); outline-offset: 2px; }
.tg-linked { margin: 0; font-size: 15px; }
.tg-prefs { display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.tg-title { display: flex; align-items: center; gap: 12px; }
.tg-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #229ed9; color: #ffffff; }
.tg-icon svg { width: 22px; height: 22px; }
.tg-unlink { display: flex; justify-content: center; }
.tg-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #229ed9; }
.tg-btn svg { width: 20px; height: 20px; }
.tg-btn:hover { background: #1b8bc0; }
.logout-btn { min-height: 44px; padding: 0 22px; border: 2px solid var(--line); border-radius: 999px; background: #ffffff; color: #b42318; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.logout-btn:hover { border-color: #b42318; }

/* Who can see the online-class links */
.links-note { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px; border-radius: 16px; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.links-note a { color: var(--blue); font-weight: 700; }
.links-note.pending { background: #fff4bf; }

/* Error pages */
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.error-actions .auth-btn, .error-actions .logout-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; text-decoration: none; }
.error-actions .logout-btn { color: var(--ink); }

/* Teacher's and curator's cabinet */
.staff-page .auth-card { max-width: 640px; }
.staff-page .account-status, .staff-page .links-note { max-width: 640px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.small-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--blue); color: #ffffff; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.small-btn:hover { background: var(--blue-dark); color: #ffffff; }
.small-btn.gray { background: #ffffff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.small-btn.gray:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.small-btn.danger { background: #ffffff; color: #b42318; box-shadow: inset 0 0 0 2px var(--line); }
.row-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 16px; background: #ffffff; color: var(--ink); text-decoration: none; }
.row-link:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.row-main { font-weight: 700; }
.row-meta { font-size: 13px; color: var(--muted); }
.row-group { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--soft); font-size: 12px; }
.student-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-radius: 16px; background: #ffffff; }
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.textarea { min-height: 140px; padding: 14px 18px; border-radius: 20px; resize: vertical; line-height: 1.5; }
fieldset.field { margin: 0; padding: 0; border: 0; }
fieldset.field legend { margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; cursor: pointer; }
.chip-check input:checked + span { background: var(--blue); color: #ffffff; box-shadow: none; }
.chip-check input:focus-visible + span { outline: 3px solid var(--yellow); }
.chip-check input:disabled + span { opacity: 0.4; cursor: default; }
.chip-college input:checked + span { background: var(--yellow); color: var(--ink); }
.en-fields summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.en-fields[open] { display: flex; flex-direction: column; gap: 14px; }

/* Cabinet tabs and the students page */
.cabinet-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); }
.cabinet-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border-radius: 999px; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.cabinet-tabs a.active { background: var(--blue); color: #ffffff; }
@media (max-width: 560px) { .cabinet-tabs { max-width: 100%; } .cabinet-tabs a { padding: 0 13px; font-size: 14px; } }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 800; }
.tab-count[hidden] { display: none; }
.student-list { display: flex; flex-direction: column; gap: 10px; }
.student-row.busy { opacity: 0.5; pointer-events: none; }
.row-status, .row-actions .small-btn { min-height: 36px; padding: 0 14px; font-size: 13px; font-weight: 700; border-radius: 999px; }
.row-status { display: inline-flex; align-items: center; }
.row-status.ok { background: #dcfce7; color: #14532d; }
.row-status.wait { background: #fff4bf; color: var(--ink); }
.row-password { margin-top: 4px; font-size: 13px; color: var(--ink); }
.chip { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.active { background: var(--blue); color: #ffffff; box-shadow: none; }
.taught-group { border-radius: 16px; background: #ffffff; }
.taught-group summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.taught-group summary::-webkit-details-marker { display: none; }
.taught-group summary:hover .row-group { background: #dbe7f5; }
.taught-chevron { margin-left: auto; color: var(--muted); transition: transform 0.15s; }
.taught-group[open] .taught-chevron { transform: rotate(180deg); }
.taught-group[data-empty] summary { opacity: 0.6; }
.taught-group[open] { padding-bottom: 8px; }

/* Page numbers */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.pager-item { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
a.pager-item:hover { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); }
.pager-item.active { background: var(--blue); color: #ffffff; box-shadow: none; }
.pager-item.disabled { opacity: 0.35; }
.pager-item.gap { background: transparent; box-shadow: none; }

/* News filters */
.news-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.news-filters .select { flex: 1 1 180px; min-height: 44px; }
.tag.small { padding: 3px 9px; font-size: 12px; margin-right: 4px; vertical-align: 2px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.tag-filter a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: #ffffff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.tag-filter a:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.tag-filter a.active { background: var(--blue); color: #ffffff; box-shadow: none; }

/* A block loading in the background (public/js/partial.js) */
[data-partial] { transition: opacity 0.15s; }
[data-partial].loading { opacity: 0.5; pointer-events: none; }
.news-region { display: flex; flex-direction: column; gap: 16px; }

/* Students in the cabinet: counters and a messenger-style list */
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.counter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 0; border-radius: 18px; background: #ffffff; color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.counter strong { font-family: Unbounded, sans-serif; font-size: 28px; line-height: 1.1; color: var(--ink); }
.counter.wait { background: #fff4bf; color: var(--ink); }
.counter:hover { box-shadow: inset 0 0 0 2px var(--line); }
.counter.active { box-shadow: inset 0 0 0 2px var(--blue); }
.msg-list { display: flex; flex-direction: column; border-radius: 22px; background: #ffffff; overflow: visible; }
.msg-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--line); }
.msg-list .msg-row:first-child { border-top: 0; }
.msg-row.busy { opacity: 0.5; pointer-events: none; }
.msg-avatar { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: #ffffff; font-size: 16px; font-weight: 700; }
.msg-avatar.pending { background: var(--yellow); color: var(--ink); }
.msg-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.msg-name { font-weight: 700; font-size: 17px; color: var(--ink); }
.msg-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.msg-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 6px; min-width: 0; }
.copy-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: copy; }
.copy-pill svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--blue); }
.copy-pill-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-pill:hover { background: #dbe7f5; }
.copy-pill.copied { background: #dcfce7; color: #14532d; }
.copy-pill.copied::after { content: 'Скопійовано'; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #ffffff; font-size: 12px; font-weight: 700; white-space: nowrap; }
/* «Мої пари»: the link on top, a month calendar, the day's pairs by group, the picked pair's students. */
.link-card { position: relative; gap: 10px; padding: 18px 20px; }
.link-title { font-size: 15px; font-weight: 800; }
.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1; min-width: 0; }
.link-row .auth-btn { margin: 0; min-height: 48px; padding: 0 20px; }
.cal-card { gap: 6px; padding: 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.cal-nav { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #ffffff; color: var(--ink); font-size: 20px; font-weight: 700; text-decoration: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; justify-items: center; }
.cal-wd { width: 100%; padding: 4px 0; font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); }
.cal-wd:nth-child(n+6):nth-child(-n+7) { color: #a3b1c4; }
.cal-day { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.cal-day:hover { background: #ffffff; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-day.picked { background: var(--blue); color: #ffffff; }
.cal-day i { position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--blue); }
.cal-day.picked i { background: var(--yellow); }
/* A quiet section caption: small grey capitals (as the day on «Мої пари»). */
.section-cap { margin: 0 0 -10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.day-title { margin: 0 4px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.day-empty { margin: 0; padding: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
/* The day's pairs: white rows that open to their group's students; the open one has a blue number and code. */
.pairs-card { gap: 8px; padding: 16px; }
.pair-item { border-radius: 18px; background: #ffffff; overflow: hidden; }
.pair-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; list-style: none; cursor: pointer; }
.pair-item summary::-webkit-details-marker { display: none; }
.pair-n { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: var(--soft); font-family: Unbounded, sans-serif; font-size: 16px; font-weight: 800; }
.pair-g { font-family: Unbounded, sans-serif; font-size: 22px; font-weight: 800; }
.pair-when { font-size: 14px; font-weight: 700; }
.pair-now { padding: 3px 9px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 800; }
/* The same width for 1 and 111 students, so the rows stay lined up. */
.pair-count { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 64px; flex-shrink: 0; margin-left: auto; padding: 5px 0; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pair-count svg { width: 16px; height: 16px; color: var(--blue); }
.pair-chev { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.pair-item[open] .pair-n { background: var(--blue); color: #ffffff; }
.pair-item[open] .pair-g { color: var(--blue); }
.pair-item[open] .pair-chev { stroke: var(--blue); transform: rotate(180deg); }
.pair-students { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pair-students .day-empty { padding: 12px 14px; }
.pair-student { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pair-student:first-child { border-top: 0; }
.pair-ava { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: #ffffff; object-fit: cover; font-size: 13px; font-weight: 800; }
.pair-who { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pair-who strong { font-size: 15px; }
.pair-mail { position: relative; max-width: 100%; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: copy; }
.pair-mail:hover { color: var(--blue); }
.pair-mail.copied { color: #15803d; }
.pair-mail.copied::after { content: ' · скопійовано'; }
.pair-tg { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; margin-left: auto; border: 0; border-radius: 50%; background: #e3f3fb; color: #229ed9; cursor: pointer; }
.pair-tg svg { width: 19px; height: 19px; }
.pair-tg:hover { background: #cfeaf7; }
img.msg-avatar { object-fit: cover; }
.msg-state { position: absolute; right: -1px; top: -1px; display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #ffffff; }
.msg-state svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.msg-state.ok { background: #16a34a; color: #ffffff; }
.msg-state.wait { background: var(--yellow); color: var(--ink); }
.msg-state.no { background: #dc2626; color: #ffffff; }
.msg-row[data-status="rejected"] .msg-avatar, .msg-row[data-status="rejected"] .msg-name { opacity: 0.55; }
.msg-state.wait svg { stroke-width: 2.4; }
/* Only the email copies (the «+» cursor); the phone calls and @nick writes, so the hand. */
a.copy-pill, .tg-pill { cursor: pointer; }
a.copy-pill { color: var(--ink); text-decoration: none; }
.tg-pill { background: #e3f3fb; color: #1b7fb3; }
.tg-pill svg { color: #229ed9; }
.tg-pill:hover { background: #cfeaf7; }
/* «Написати в Telegram» slides up from the bottom (in the middle on a wide screen). */
.sheet { width: 100%; max-width: 520px; margin: auto auto var(--keyboard, 0px); padding: 0; border: 0; border-radius: 20px 20px 0 0; background: #ffffff; color: var(--ink); box-shadow: 0 -8px 30px rgba(16, 32, 58, 0.2); }
.sheet[open] { animation: sheet-up 0.2s ease-out; }
.sheet::backdrop { background: rgba(16, 32, 58, 0.35); }
.sheet-body { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
.sheet form { display: flex; flex-direction: column; gap: 10px; }
.sheet form[hidden], .sheet-done[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.sheet-to { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.sheet-to svg { flex: none; width: 20px; height: 20px; color: #229ed9; }
.sheet-to span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sheet-x { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.sheet-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sheet-x:hover { background: var(--soft); }
.sheet-input { width: 100%; min-height: 128px; max-height: 40vh; padding: 12px 14px; border: 2px solid var(--line); border-radius: 18px; font: inherit; font-size: 16px; line-height: 1.35; color: var(--ink); resize: none; overflow-y: auto; }
.sheet-input:focus { outline: none; border-color: #229ed9; }
.sheet-send { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: #229ed9; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.sheet-send svg { width: 19px; height: 19px; }
.sheet-send:hover { background: #1b8bc0; }
.sheet-send:disabled { opacity: 0.6; }
.sheet .field-error { padding: 0 4px; }
.sheet-done { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.sheet-tick { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #dcfce7; color: #16a34a; }
.sheet-tick svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sheet-done-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; font-weight: 600; color: var(--muted); }
.sheet-done-text strong { font-size: 14px; color: var(--ink); }
.sheet-done-text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sheet-ok { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 20px; } }
.msg-avatar-wrap { position: relative; flex-shrink: 0; align-self: flex-start; }
.msg-group { position: absolute; left: 50%; transform: translateX(-50%); user-select: none; right: auto; bottom: -6px; padding: 2px 7px; border-radius: 999px; background: #ffffff; box-shadow: 0 0 0 2px var(--line); color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.msg-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.msg-actions form { margin: 0; }
.round-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--soft); color: var(--blue); font: inherit; font-size: 20px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; list-style: none; }
.round-btn::-webkit-details-marker { display: none; }
.round-btn:hover { background: #dbe7f5; }
.round-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn.primary { background: var(--blue); color: #ffffff; }
.round-btn.primary:hover { background: var(--blue-dark); }
.round-btn.danger { background: #fdecea; color: #b42318; }
.round-btn.ghost { background: transparent; color: var(--muted); }
.msg-menu { position: relative; }
.msg-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; flex-direction: column; min-width: 230px; padding: 6px; border-radius: 16px; background: #ffffff; box-shadow: 0 10px 30px rgba(16, 32, 58, 0.16); }
.msg-menu-list a, .msg-menu-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.msg-menu-list a:hover, .msg-menu-list button:hover { background: var(--soft); }
.msg-menu-list .danger { color: #b42318; }
.taught-group .msg-row { margin: 0 8px; padding: 12px 8px; }
.taught-empty { display: block; padding: 0 16px 8px; }
@media (max-width: 560px) { .counter strong { font-size: 22px; } .msg-avatar { width: 40px; height: 40px; font-size: 14px; } .msg-sub { font-size: 13px; } }


/* The site's one notice (toast.js): a small card at the top that leaves by itself. */
.toasts { position: fixed; left: 50%; top: 14px; z-index: 200; width: calc(100% - 32px); max-width: 420px; transform: translateX(-50%); pointer-events: none; }
.toast { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px 12px; overflow: hidden; border-radius: 16px; background: #ffffff; color: var(--ink); box-shadow: 0 14px 36px rgba(16, 32, 58, 0.22); font-size: 15px; font-weight: 700; pointer-events: auto; cursor: pointer; animation: toast-in 0.18s ease-out; }
.toast.leaving { opacity: 0; transform: translateY(-8px); transition: opacity 0.18s, transform 0.18s; }
.toast-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; }
.toast-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.toast.ok .toast-icon { background: #dcfce7; color: #16a34a; }
.toast.error .toast-icon { background: #fee2e2; color: #dc2626; }
.toast.info .toast-icon { background: var(--soft); color: var(--blue); }
.toast-text { line-height: 1.35; }
/* Time left: a thin line filling from left to right; when it reaches the end the notice leaves. */
.toast-time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; animation: toast-time linear forwards; }
.toast.ok .toast-time { background: #16a34a; }
.toast.error .toast-time { background: #dc2626; }
.toast.info .toast-time { background: var(--blue); }
@keyframes toast-time { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.toast.ok .toast.error .toast.info @keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* «Кураторські групи»: a field like the selects; open, a grid of ticks */
.multi-select { position: relative; }
.multi-select > summary { display: flex; align-items: center; width: 100%; list-style: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.multi-select > summary::-webkit-details-marker { display: none; }
.multi-select[open] > summary { border-color: var(--blue); }
.multi-select-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 8px; background: #fff; border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 12px 28px rgba(16, 32, 58, 0.12); }
.multi-select-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.multi-select-item:hover { background: var(--soft); }
.multi-select-item input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
@media (max-width: 480px) { .multi-select-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The one confirmation window (public/js/confirm.js) */
.confirm { width: min(340px, calc(100% - 32px)); padding: 22px 20px 20px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 20px 50px rgba(16, 32, 58, 0.25); }
.confirm::backdrop { background: rgba(16, 32, 58, 0.45); }
.confirm-q { margin: 0 0 18px; font-size: 18px; font-weight: 700; }
.confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-btns button { min-height: 46px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.confirm-no { border: 2px solid var(--line); background: #fff; color: var(--ink); }
.confirm-yes { border: 0; background: var(--blue); color: #fff; }
.confirm-yes:hover { background: var(--blue-dark); }
/* The page under an open sheet stays where it was (iPhone would scroll it to the field). */
body.sheet-lock { position: fixed; left: 0; right: 0; overflow: hidden; }

/* Safari on iPhone (iOS 26) and the home-screen app paint the bars around the page with the body's colour,
   so the body is blue like the header and the content below the header keeps its white. */
body { background: var(--blue); }
html.pwa .hero-inner { padding-top: calc(max(env(safe-area-inset-top), 10px) + 14px); }
main { background: #ffffff; box-shadow: 0 0 0 100vmax #ffffff; clip-path: inset(0 -100vmax); }
/* Safari on iPhone blurs the top edge under the clock: the logo and the account sit a little lower. */
@supports (-webkit-touch-callout: none) {
  html:not(.pwa) .hero-inner { padding-top: 30px; }
  @media (max-width: 720px) { html:not(.pwa) .hero-inner { padding-top: 18px; } }
}
