/* Visual system taken from the teacher's lesson files ("Unique People"):
   off-white paper with a fading dot grid, Inter Tight display type set tight and heavy,
   navy as the working colour, cobalt for the one word that matters, hand-drawn circle + sparkle. */
:root {
  --bg: #f5f5f3;
  --paper: #ffffff;
  --ink: #1d1f24;
  --ink2: #3a3d45;
  --muted: #80848d;
  --line: #e4e4e0;
  --navy: #1b2a4a;
  --navy2: #2f4a7f;
  --cobalt: #2443c6;
  --navy-soft: #eaeef5;
  --ok: #2e7a58;
  --ok-soft: #e6f2ec;
  --bad: #b4483f;
  --bad-soft: #fbf1f0;
  --on-navy: #ffffff;
  --on-navy-muted: rgba(255, 255, 255, 0.62);

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 12px 32px -20px rgba(27, 42, 74, 0.18);
  --shadow-deep: 0 30px 60px -30px rgba(27, 42, 74, 0.6);
  --dur: 250ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: rgba(245, 245, 243, 0.95); }
.grid-lines { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(29, 31, 36, 0.09) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -0.04em; }
.h2 { font-size: 22px; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cobalt); }
:focus-visible { outline: 3px solid var(--navy2); outline-offset: 2px; }
.mono { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.85em; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
mark { background: var(--navy-soft); color: var(--navy); padding: 0.05em 0.35em; border-radius: 6px; font-weight: 700; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding-block: 32px 120px; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.narrow { max-width: 600px; }
.align-start { align-self: flex-start; }
.boot { padding: 64px 20px; text-align: center; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(245, 245, 243, 0.88); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.brand-mark { color: var(--cobalt); }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 4px; }
@media (max-width: 560px) { .who-name { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--navy); border-radius: 12px; padding: 11px 20px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--navy); color: var(--on-navy); text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.sm { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--navy); color: var(--on-navy); }
.btn.primary:hover:not(:disabled) { box-shadow: var(--shadow-deep); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn.soft { background: var(--navy-soft); color: var(--navy); border-color: transparent; }
.btn.done { background: transparent; color: var(--ok); border-color: transparent; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.btn.warn-btn { background: var(--bad); border-color: var(--bad); color: var(--on-navy); flex-shrink: 0; }
.link-back { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--cobalt); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.link-back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.field-hint { font-size: 13px; color: var(--muted); }
input:not([type="file"]):not([type="checkbox"]), textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-weight: 500; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
input:focus, textarea:focus { border-color: var(--navy); background: var(--paper); outline: none; }
input[type="file"] { font-size: 14px; max-width: 100%; }
textarea { resize: vertical; }
.form-error { color: var(--bad); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }
.form-grid .span { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding-bottom: 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }

/* ---------- hand-drawn details ---------- */
.circ { position: relative; display: inline-block; padding-inline: 0.06em; }
.circ svg { position: absolute; left: -12%; top: -18%; width: 124%; height: 136%; overflow: visible; pointer-events: none; }
.circ path { fill: none; stroke: var(--cobalt); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: drawc 1.3s 0.3s cubic-bezier(0.6, 0.1, 0.3, 1) forwards; }
@keyframes drawc { to { stroke-dashoffset: 0; } }
.sparkle { position: absolute; right: 2%; top: 4%; width: min(110px, 18vw); fill: var(--cobalt); animation: twinkle 3.4s ease-in-out infinite; pointer-events: none; }
@keyframes twinkle { 50% { transform: scale(0.86) rotate(12deg); } }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.floaters span { position: absolute; font-family: var(--display); font-weight: 800; font-size: clamp(48px, 9vw, 110px); color: rgba(27, 42, 74, 0.05); letter-spacing: -0.04em; white-space: nowrap; animation: drift 18s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-22px); } }

/* ---------- section heads (rule + number, like the lesson files) ---------- */
.sec-head { display: flex; align-items: flex-start; gap: 20px; padding-top: 18px; border-top: 1px solid var(--ink); }
.sec-num { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--muted); letter-spacing: 0.04em; padding-top: 6px; min-width: 30px; font-variant-numeric: tabular-nums; }
.kicker { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 4px; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.sec-head .count { margin-left: 8px; vertical-align: middle; }

/* ---------- login ---------- */
.login-page { position: relative; min-height: 100vh; display: grid; align-content: center; justify-items: center; padding-block: 48px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.login-card { position: relative; width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 36px 30px; box-shadow: var(--shadow-deep); }
.login-title { font-size: clamp(44px, 9vw, 60px); line-height: 0.95; letter-spacing: -0.045em; }
.login-title .hl { color: var(--cobalt); font-style: italic; font-weight: 300; }
.login-card .sparkle { right: -36px; top: -40px; width: 84px; }

/* ---------- home hero ---------- */
.hello { display: flex; flex-direction: column; gap: 8px; }
.hero-home { position: relative; isolation: isolate; padding-block: 28px 8px; }
.hero-home .tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 13px; color: var(--ink2); width: max-content; max-width: 100%; margin-bottom: 18px; }
.hero-home .tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.hero-home h1 { font-size: clamp(52px, 10vw, 112px); line-height: 0.95; letter-spacing: -0.045em; }
.hero-home h1 .ln { display: block; }
.hero-home h1 .hl { color: var(--cobalt); font-style: italic; font-weight: 300; }
.hero-home .lede { max-width: 540px; color: var(--ink2); font-size: 19px; margin-top: 22px; }

/* ---------- tabs (pill steps) ---------- */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-in { display: flex; gap: 6px; min-width: max-content; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; width: max-content; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--on-navy); background: var(--navy); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--navy-soft); color: var(--navy); font-variant-numeric: tabular-nums; }
.tab.on .count { background: rgba(255, 255, 255, 0.16); color: var(--on-navy); }

/* ---------- rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rows > li + li { border-top: 1px solid var(--line); }
.row { width: 100%; display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 18px; padding: 18px 22px; background: none; border: 0; text-align: left; cursor: pointer; transition: background var(--dur) var(--ease); }
.row:hover { background: var(--navy-soft); }
.row-date { color: var(--muted); }
.row-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.row-title { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-go { color: var(--muted); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.row:hover .row-go { transform: translateX(4px); color: var(--cobalt); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px; }
  .row-date { grid-column: 1 / -1; }
}

.pill { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.empty { text-align: center; padding: 52px 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- home cards ---------- */
.home { gap: 26px; }
.overdue { background: var(--bad-soft); border: 1px solid rgba(180, 72, 63, 0.22); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.overdue-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; color: var(--bad); }
.overdue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.overdue-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--paper); border-radius: 12px; padding: 12px 16px; border: 1px solid var(--line); }
.overdue-list .row-sub { color: var(--bad); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
.home-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border-radius: 22px; padding: 28px; min-width: 0; }
.home-card .btn { margin-top: 8px; }
.home-card-title { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; }
.hw-card { background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-deep); }
.hw-card .eyebrow, .hw-card .muted { color: var(--on-navy-muted); }
.hw-card .btn.primary { background: var(--paper); color: var(--navy); border-color: var(--paper); }
.hw-card .btn.ghost { background: transparent; color: var(--on-navy); border-color: rgba(255, 255, 255, 0.3); }
.hw-card .link-back { color: var(--on-navy); }
.lesson-card { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lesson-time { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 7vw, 72px); line-height: 0.95; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.lesson-day { color: var(--ink2); font-weight: 500; }
.home-card .link-back { margin-top: auto; padding-top: 10px; font-size: 14px; text-align: left; }
.quick-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .quick-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 16px 40px 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tile:hover { transform: translateY(-3px); border-color: var(--navy); }
.tile-title { font-family: var(--display); font-weight: 700; font-size: 16px; }
.tile-sub { font-size: 13px; color: var(--muted); }
.tile-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.tile.hot { background: var(--navy-soft); border-color: #d6deec; }
.tile.hot .tile-sub { color: var(--navy2); font-weight: 600; }
.tile.hot .tile-go { color: var(--cobalt); }

.group { display: flex; flex-direction: column; gap: 14px; }

/* ---------- lesson / homework detail ---------- */
.detail-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.detail-head h1 { font-size: clamp(34px, 5.5vw, 56px); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
@media (max-width: 880px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.frame { display: block; width: 100%; height: 600px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.frame-external { height: 80vh; }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); display: flex; flex-direction: column; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-title { font-size: 18px; }
.kw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.kw-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; }
.kw-row > span { min-width: 0; overflow-wrap: anywhere; }
.tip { font-size: 13px; color: var(--ink2); background: var(--navy-soft); border-radius: 10px; padding: 10px 12px; }

.quick { position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(640px, calc(100% - 32px)); background: var(--navy); color: var(--on-navy); border-radius: 20px; box-shadow: var(--shadow-deep); padding: 18px 20px; animation: rise var(--dur) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } }
.quick-form { display: flex; flex-direction: column; gap: 12px; }
.quick-title { font-family: var(--display); font-weight: 700; font-size: 18px; }
.quick-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-fields .field:last-child { grid-column: 1 / -1; }
.quick .field-label { color: var(--on-navy-muted); }
.quick input:not([type="file"]) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: var(--on-navy); }
.quick input:focus { background: rgba(255, 255, 255, 0.14); border-color: var(--on-navy); }
.quick-actions { display: flex; justify-content: flex-end; gap: 8px; }
.quick .btn.ghost { background: transparent; color: var(--on-navy); border-color: rgba(255, 255, 255, 0.3); }
.quick .btn.primary { background: var(--paper); color: var(--navy); border-color: var(--paper); }

.submit-bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.score { display: flex; flex-direction: column; align-items: flex-end; }
.score-big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--navy); }
.table-scroll { overflow-x: auto; }
.answers { width: 100%; border-collapse: collapse; font-size: 15px; }
.answers th, .answers td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.answers th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.answers td:last-child { font-weight: 600; }
.feedback { margin-top: 18px; padding: 16px 18px; background: var(--navy); color: var(--on-navy); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; }
.feedback .eyebrow { color: var(--on-navy-muted); }
.hw-item { display: flex; flex-direction: column; gap: 16px; }
.hw-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* ---------- words ---------- */
.add-word { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .add-word { grid-template-columns: 1fr 1fr; } .add-word .field:nth-child(3) { grid-column: 1 / -1; } .add-word .btn { grid-column: 1 / -1; } }
.words-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.words-head input { max-width: 280px; }
.words { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.word { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; }
.word + .word { border-top: 1px solid var(--line); }
.word-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.word-en { font-family: var(--display); font-size: 18px; }
.word-ru { color: var(--ink2); }
.word-ex { flex-basis: 100%; font-size: 14px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.word-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tag { font-size: 12px; color: var(--muted); max-width: 14rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .word { flex-direction: column; align-items: flex-start; gap: 8px; } .tag { max-width: 10rem; } }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--cobalt); }
.pad { padding: 22px 20px; }

/* ---------- flashcards ---------- */
.cards-start { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; padding: 32px; }
.big-num { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-weight: 600; color: var(--ink2); }
.big-num .num { font-family: var(--display); font-weight: 800; font-size: clamp(72px, 12vw, 120px); line-height: 0.85; letter-spacing: -0.05em; color: var(--navy); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; background: var(--bg); }
.seg-b { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg-b.on { background: var(--navy); color: var(--on-navy); }
.flash { max-width: 580px; margin: 0 auto; width: 100%; }
.flash-top { display: flex; justify-content: space-between; align-items: center; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cobalt); transform-origin: left; transition: transform var(--dur) var(--ease); }
.card { perspective: 1200px; cursor: pointer; border-radius: 22px; }
.card-inner { position: relative; display: grid; min-height: 300px; transition: transform 520ms var(--ease); transform-style: preserve-3d; }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-face { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 34px 26px; text-align: center; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-front { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-back { background: var(--navy); color: var(--on-navy); transform: rotateY(180deg); box-shadow: var(--shadow-deep); }
.card-word { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 6vw, 52px); letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.card-front .card-word { color: var(--ink); }
.card-hint { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-ex { color: var(--on-navy-muted); font-style: italic; max-width: 40ch; }
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn.again { background: var(--paper); color: var(--bad); border-color: var(--line); }
.btn.good { background: var(--ok); color: var(--on-navy); border-color: var(--ok); }
kbd { font-family: var(--body); font-size: 11px; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; opacity: 0.6; }

/* ---------- teacher ---------- */
.student-row .row { grid-template-columns: 1fr auto auto; }
.creds { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-weight: 600; }
.creds b { color: var(--ink); }
.preview { display: flex; flex-direction: column; gap: 10px; padding: 0 22px 22px; }
.lesson-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; flex-wrap: wrap; }
.reveal { background: var(--navy); color: var(--on-navy); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-deep); }
.reveal .eyebrow { color: var(--on-navy-muted); }
.reveal-text { margin: 0; font-family: var(--body); font-weight: 600; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.reveal .btn.ghost { background: transparent; color: var(--on-navy); border-color: rgba(255, 255, 255, 0.3); }

.toast { position: fixed; z-index: 70; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 76px); transform: translateX(-50%); background: var(--navy); color: var(--on-navy); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-deep); max-width: calc(100% - 32px); animation: drop var(--dur) var(--ease); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }

@media (max-width: 640px) {
  .panel { padding: 20px; }
  .home-card { padding: 22px; }
  .sparkle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .circ path { stroke-dashoffset: 0; }
}

/* ---------- account menu ---------- */
.account { position: relative; }
.account-btn { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 3px 3px 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); transition: border-color var(--dur) var(--ease); }
.account-btn::-webkit-details-marker { display: none; }
.account-btn:hover, .account[open] .account-btn { border-color: var(--navy); }
.account-btn .who-name { margin: 0; color: var(--ink); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--on-navy); font-family: var(--display); font-weight: 800; font-size: 14px; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-deep); padding: 8px; display: flex; flex-direction: column; animation: drop var(--dur) var(--ease); }
.account-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-head span { font-size: 13px; color: var(--muted); }
.menu-item { text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.menu-item:hover { background: var(--navy-soft); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover { background: var(--bad-soft); }
@media (max-width: 560px) { .account-btn { padding-left: 3px; } }

/* ---------- compact home hero: the to-do cards stay above the fold ---------- */
.hero-home.compact { padding-block: 12px 0; }
.hero-home.compact h1 { font-size: clamp(44px, 7.5vw, 88px); }
.hero-home.compact .hl { color: var(--cobalt); font-style: italic; font-weight: 300; }
.hero-home.compact .lede { margin-top: 14px; font-size: 18px; }
.hero-home.compact .tag { margin-bottom: 14px; }
.hero-home.compact .sparkle { width: min(84px, 14vw); top: 0; }
.late-pill { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; background: var(--bad); color: var(--on-navy); }
.hw-card.is-late { background: linear-gradient(160deg, #3a2230 0%, var(--navy) 60%); }

/* ---------- phone bottom navigation ---------- */
.ic { width: 22px; height: 22px; display: block; }
.bottom-nav { display: none; }
@media (max-width: 640px) {
  .has-bottom-nav > .tabs { display: none; }
  .main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
  .bn.on { color: var(--navy); }
  .bn.on .bn-ic { background: var(--navy-soft); }
  .bn-ic { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background var(--dur) var(--ease); }
  .bn-badge { position: absolute; top: -3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--cobalt); color: var(--on-navy); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
  .toast { top: auto; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  /* lesson page: key words first, so they are not lost under a long lesson */
  .detail-grid .side { position: static; order: -1; }
}

/* ---------- answers marked right / wrong ---------- */
.answers .mark-col { width: 36px; text-align: center; font-weight: 800; }
.answers tr.is-ok .mark-col { color: var(--ok); }
.answers tr.is-bad td { background: var(--bad-soft); }
.answers tr.is-bad .mark-col { color: var(--bad); }
.mistake-note { margin-top: 6px; font-weight: 700; color: var(--bad); font-size: 14px; }

/* ---------- teacher: activity ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -0.035em; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-sub { font-size: 13px; color: var(--ink2); }
.stat.warn { background: var(--bad-soft); border-color: rgba(180, 72, 63, 0.22); }
.stat.warn .stat-value { color: var(--bad); }
.hard-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hard-words li { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.tl-days { display: flex; flex-direction: column; gap: 10px; }
.tl-day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tl-day > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 17px; }
.tl-day > summary::-webkit-details-marker { display: none; }
.tl-day > summary::after { content: "+"; color: var(--muted); font-weight: 500; margin-left: 4px; }
.tl-day[open] > summary::after { content: "–"; }
.tl-day[open] > summary { border-bottom: 1px solid var(--line); }
.tl-day-label { flex: 1; min-width: 0; }
.tl { list-style: none; margin: 0; padding: 8px 20px 14px; }
.tl-item { position: relative; display: grid; grid-template-columns: 48px 14px minmax(0, 1fr); gap: 10px; padding: 9px 0; align-items: start; }
.tl-item + .tl-item::before { content: ""; position: absolute; left: 64px; top: -9px; height: 18px; border-left: 1px dashed var(--line); }
.tl-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--line); }
.tl-item.read .tl-dot { background: var(--navy2); }
.tl-item.work .tl-dot { background: var(--cobalt); }
.tl-item.done .tl-dot { background: var(--ok); }
.tl-item.bad .tl-dot { background: var(--bad); }
.tl-item.cards .tl-dot { background: var(--navy); }
.tl-item.added .tl-dot { background: #8aa0d6; }
.tl-item.quiet .tl-text { color: var(--muted); }
.tl-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-text { font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-words { font-weight: 600; color: var(--navy); }
.tl-sub { font-size: 14px; color: var(--ink2); }
.badge-score, .badge-bad, .badge-ok { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.badge-score { background: var(--navy); color: var(--on-navy); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.tl-details > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cobalt); width: max-content; }
.tl-details[open] > summary { margin-bottom: 8px; }

/* ---------- invites ---------- */
.manual > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); width: max-content; max-width: 100%; padding: 4px 0; }
.manual > summary:hover { color: var(--ink); }
.manual[open] > summary { margin-bottom: 12px; }
.creds .btn { margin-left: 4px; }
.join-card { width: min(460px, 100%); }
.join-card .login-title { font-size: clamp(40px, 8vw, 54px); }

/* ---------- skyline backgrounds (teacher's images; white areas melt into the paper via multiply) ---------- */
.login-page { overflow: hidden; padding-bottom: clamp(120px, 22vh, 260px); }
.login-page > * { position: relative; z-index: 1; }
.login-page::after { content: ""; position: absolute; z-index: 0; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1180px, 100%); height: clamp(200px, 46vh, 680px);
  background: url("/img/skyline-collage.jpg") bottom center / contain no-repeat; mix-blend-mode: multiply; opacity: 0.85; pointer-events: none; }
.shell::before { content: ""; position: fixed; z-index: -1; left: 0; right: 0; bottom: 0; height: clamp(160px, 38vh, 420px);
  background: url("/img/skyline-nyc.jpg") bottom center / auto 100% repeat-x; mix-blend-mode: multiply; opacity: 0.12; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%); }
@media (max-width: 640px) {
  .login-page { padding-bottom: 150px; }
  .login-page::after { height: 190px; opacity: 0.7; }
  .shell::before { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: 150px; opacity: 0.1; }
}
@media print { .login-page::after, .shell::before { display: none; } }

/* ===== Refresh: same system, more contrast. Cobalt carries the emphasis, as in the lesson files ===== */
:root {
  --ink2: #2c2f36;
  --muted: #646872;
  --line: #dcdcd5;
  --cobalt-soft: #e3e8fb;
  --cobalt-deep: #1a33a3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 34px -18px rgba(27, 42, 74, 0.28);
}
.eyebrow, .kicker, .hero-home .tag { color: var(--cobalt); }
.hero-home .tag { border-color: #cfd7f5; background: var(--cobalt-soft); color: var(--cobalt-deep); }
.field-label { color: var(--ink2); }
.sec-head { border-top-width: 2px; }
.sec-head h2, .h2, .side-title { font-weight: 800; letter-spacing: -0.03em; }
.row-title { font-weight: 800; }
mark { background: var(--cobalt-soft); color: var(--cobalt-deep); }

/* buttons: the main action is cobalt, navy stays for big surfaces */
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); }
.btn.primary:hover:not(:disabled) { background: var(--cobalt-deep); border-color: var(--cobalt-deep); box-shadow: 0 14px 30px -14px rgba(36, 67, 198, 0.7); }
.btn.soft { background: var(--cobalt-soft); color: var(--cobalt-deep); }
.link-back { color: var(--cobalt); }

/* tabs */
.tab.on { background: var(--cobalt); }
.count { background: var(--cobalt-soft); color: var(--cobalt-deep); }
.pill { background: var(--cobalt-soft); color: var(--cobalt-deep); }
.pill.warn { background: var(--bad); color: #fff; }
.pill.ok { background: var(--ok); color: #fff; }

/* home cards */
.hw-card { background: var(--navy); }
.hw-card .eyebrow { color: #9fb4ff; }
.hw-card .btn.primary { background: #fff; color: var(--navy); border-color: #fff; }
.hw-card .btn.primary:hover:not(:disabled) { background: var(--cobalt-soft); border-color: var(--cobalt-soft); }
.lesson-card { background: var(--cobalt-soft); border-color: #cfd7f5; }
.lesson-time { color: var(--cobalt); }
.lesson-card .btn.primary { background: var(--cobalt); }
.overdue { background: #fff; border: 2px solid var(--bad); }

/* shortcut tiles with icons */
.tile { flex-direction: row; align-items: center; gap: 12px; padding: 14px 40px 14px 14px; }
.tile-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cobalt-soft); color: var(--cobalt); }
.tile-txt { display: flex; flex-direction: column; min-width: 0; }
.tile:hover { border-color: var(--cobalt); }
.tile:hover .tile-go { color: var(--cobalt); }
.tile.hot { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.tile.hot .tile-ic { background: rgba(255, 255, 255, 0.16); color: #fff; }
.tile.hot .tile-sub, .tile.hot .tile-go { color: rgba(255, 255, 255, 0.85); }

/* numbers */
.big-num .num, .score-big, .stat-value { color: var(--cobalt); }
.dots i.on { background: var(--cobalt); }
.progress i { background: var(--cobalt); }

/* phone nav */
@media (max-width: 640px) {
  .bn.on { color: var(--cobalt); }
  .bn.on .bn-ic { background: var(--cobalt-soft); }
}

/* ---------- full-screen reader for lessons and homework ---------- */
body.reading { overflow: hidden; }
body.reading .grid-lines { display: none; }
.reader { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--paper); }
.reader-bar { position: relative; z-index: 3; display: flex; align-items: center; gap: 14px; flex: none;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.reader-back { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 700; font-size: 15px; cursor: pointer; transition: border-color var(--dur) var(--ease); }
.reader-back:hover { border-color: var(--cobalt); color: var(--cobalt); }
.reader-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reader-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-name { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.reader-actions .count { margin-left: 2px; }
.reader-status { font-size: 13px; color: var(--muted); }
.reader-status:empty { display: none; }
.frame.frame-fill { flex: 1; width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }

.drawer { position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; width: min(360px, 100%); padding: calc(78px + env(safe-area-inset-top, 0px)) 20px 24px;
  display: flex; flex-direction: column; gap: 14px; overflow-y: auto; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -24px 0 48px -28px rgba(27, 42, 74, 0.45);
  transform: translateX(105%); transition: transform 320ms var(--ease); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.drawer-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 20px; line-height: 1; cursor: pointer; }
.drawer-close:hover { border-color: var(--ink); }

@media (max-width: 640px) {
  .reader-bar { gap: 10px; }
  .reader-back { padding: 0 12px; }
  .reader-back-txt, .hide-sm { display: none; }
  .reader-name { font-size: 16px; }
  .reader-kicker { font-size: 10px; }
  .reader-status { display: none; }
}
.drawer:not(.open) { box-shadow: none; visibility: hidden; transition: transform 320ms var(--ease), visibility 0s 320ms; }

/* ---------- word picker bubble (appears next to a selected word in a lesson / homework) ---------- */
.pick { position: fixed; z-index: 45; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 24px));
  padding: 8px 8px 8px 14px; background: var(--navy); color: #fff; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(27, 42, 74, 0.6); animation: pick-in 160ms var(--ease); }
.pick.below { transform: translate(-50%, 0); }
.pick::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: var(--navy); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.pick.below::after { bottom: auto; top: -6px; }
@keyframes pick-in { from { opacity: 0; } }
.pick-word { font-family: var(--display); font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.pick-tr { font-size: 14px; color: #c9d4ff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pick-tr.muted { color: rgba(255, 255, 255, 0.55); }
.pick-btns { display: flex; gap: 6px; flex: none; }
.pick-add, .pick-edit { position: relative; z-index: 1; border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pick-add { background: #fff; color: var(--cobalt-deep); }
.pick-add:hover:not(:disabled) { background: var(--cobalt-soft); }
.pick-add:disabled { background: rgba(255, 255, 255, 0.14); color: #fff; cursor: default; }
.pick-edit { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pick-edit:hover { background: rgba(255, 255, 255, 0.22); }
.drawer .eyebrow { margin-top: 4px; }
@media (max-width: 640px) { .pick { padding: 8px 8px 8px 12px; gap: 8px; } .pick-word { font-size: 15px; } }
.tag-teacher { color: var(--cobalt); font-weight: 700; }
.select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-weight: 500; }
.select:focus { border-color: var(--navy); background: var(--paper); outline: none; }
.pick[hidden], .quick[hidden] { display: none; }
.pick { min-width: 240px; }
.pick-word { max-width: 170px; }
.pick-tr { flex: 1 1 auto; min-width: 70px; max-width: 220px; }
.pick-word { flex: none; }
.pick::after { left: calc(50% + var(--arrow-shift, 0px)); }
.toast { width: max-content; text-align: center; }
@media (max-width: 640px) {
  .pick { min-width: 0; width: calc(100vw - 24px); }
  .pick-tr { white-space: normal; line-height: 1.25; max-width: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pick-add, .pick-edit { padding: 9px 11px; }
}

/* ---------- teacher: add a list of words ---------- */
.bulk > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bulk > summary::-webkit-details-marker { display: none; }
.bulk > summary::before { content: "+"; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--cobalt); width: 16px; }
.bulk[open] > summary::before { content: "–"; }
.bulk[open] > summary { margin-bottom: 16px; }
.small { font-size: 13px; }
.bulk-table td { vertical-align: middle; }
.bulk-table input { padding: 8px 10px; }
.bulk-table tr.is-dup td { opacity: 0.55; }
.auto-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }

/* bigger skyline collage on the login / sign-up pages */
.login-page { padding-bottom: clamp(160px, 30vh, 340px); }
.login-page::after { width: min(1600px, 112%); height: clamp(320px, 66vh, 900px); opacity: 0.95; }
@media (max-width: 640px) {
  .login-page { padding-bottom: 230px; }
  .login-page::after { width: 150%; height: 320px; opacity: 0.85; }
}

/* The collage is pinned to the bottom of the screen, so its base is always visible without scrolling. */
.login-page { padding-bottom: 48px; }
.login-page::after { position: fixed; bottom: 0; height: clamp(280px, 58vh, 820px); }
@media (max-width: 640px) {
  .login-page { padding-bottom: 32px; }
  .login-page::after { height: 280px; }
}
