/* Sync indicator */
.sync-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.sync-dot.online  { background: var(--green); box-shadow: 0 0 0 3px var(--sage); }
.sync-dot.offline { background: var(--muted); }
.sync-dot.syncing { background: var(--yellow); animation: syncPulse 1s infinite; }
@keyframes syncPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
#sync-status { display: flex; align-items: center; gap: 6px; height: 30px; font-size: 12px; color: var(--muted); padding: 0 10px; border-radius: var(--r-pill);
  background: transparent; border: 1px solid var(--line); cursor: pointer; transition: background-color var(--dur-1); white-space: nowrap; }
#sync-status:hover { background: var(--surface-2); }

/* ── LOGIN SCREEN — split: the app's story on the left, the form on the right ── */
#login-screen { position: fixed; inset: 0; z-index: 2000; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--paper); overflow: auto; }
#login-screen.hidden { display: none; }
.login-art { position: relative; overflow: hidden; background: #1F1B16; color: #FAF6EF; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
:root[data-theme="dark"] .login-art { background: #0E0C09; border-right: 1px solid var(--line); }
:root[data-account="school"] .login-art { background: var(--brand-art, #1F1B16); }
:root[data-account="school"] .login-art h2 em { color: var(--brand-on-art, #EE7B52); }
:root[data-account="school"] .login-art .brand-mark img { width: 86%; max-height: 86%; object-fit: contain; }
.login-art .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; position: relative; z-index: 1; }
.login-art .brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--logo-tile); color: var(--on-accent); display: flex; align-items: center; justify-content: center; border: 1.5px solid #000; box-shadow: 2px 2px 0 #000; }
.login-art .brand-mark img { width: 80%; height: auto; display: block; }
.login-art .brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.login-art .brand small { font-family: var(--font-ui); font-weight: 400; font-size: 12px; opacity: .65; letter-spacing: 0; margin-top: 2px; }
.login-art h2 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.04; letter-spacing: -.03em; max-width: 12ch; position: relative; z-index: 1; animation: rise var(--dur-4) var(--ease-out) both; animation-delay: 80ms; }
.login-art h2 em { font-style: normal; color: #EE7B52; }
.login-features { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; position: relative; z-index: 1; }
.login-feature { display: flex; gap: 14px; align-items: flex-start; max-width: 380px; animation: rise var(--dur-4) var(--ease-out) both; }
.login-feature:nth-child(1) { animation-delay: 160ms; } .login-feature:nth-child(2) { animation-delay: 220ms; } .login-feature:nth-child(3) { animation-delay: 280ms; }
.login-feature .fi { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-feature .fi svg { width: 18px; height: 18px; }
.login-feature b { font-size: 14px; font-weight: 600; }
.login-feature p { font-size: 13px; opacity: .7; margin-top: 2px; line-height: 1.45; }
.login-foot { font-size: 11px; opacity: .55; position: relative; z-index: 1; }
.mini-seats { position: absolute; right: -30px; top: 56px; display: grid; grid-template-columns: repeat(5, 52px); gap: 8px; transform: rotate(-8deg); animation: fade-in 900ms var(--ease-out) both; }
.mini-seats span { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.22); }
.mini-seats span.m { background: #DCEAF8; border-color: #A3C4E8; } .mini-seats span.f { background: #F8DDE7; border-color: #E6A7BF; }
.mini-seats span.a { background: transparent; border-style: dashed; }
.login-pane { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 380px; max-width: 100%; animation: rise var(--dur-4) var(--ease-out) both; animation-delay: 120ms; }
.login-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.login-card .btn-primary { height: 44px; border-radius: var(--r-md); font-size: 14px; }
.login-error { background: var(--rose); color: var(--rose-ink); border: 1px solid var(--rose-line); font-size: 12px; font-weight: 500; padding: 9px 12px; border-radius: var(--r-sm); margin-bottom: 14px; display: none; }
.login-error.show { display: block; animation: shake 320ms var(--ease-out); }
/* Accounts remembered on this device (src/auth/recent-accounts.js). */
.recent-accounts { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.recent-account { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--dur-1), background-color var(--dur-1); }
.recent-account:hover { border-color: var(--line-strong, var(--muted)); background: var(--surface-2); }
.recent-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: var(--r-md); }
.recent-pick:focus-visible, .recent-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.recent-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--accent-soft, #FBE4D9); color: var(--accent-ink, #8A3517); }
.recent-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.recent-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-how { font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); flex-shrink: 0; }
.recent-remove { width: 36px; height: 36px; margin-right: 4px; flex-shrink: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.recent-remove:hover { background: var(--rose); color: var(--rose-ink); }
.recent-account.confirming { gap: 8px; padding: 10px 12px; flex-wrap: wrap; background: var(--surface-2); }
.recent-confirm { flex: 1 1 180px; font-size: 13px; }
.remember-me { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); margin: -4px 0 12px; cursor: pointer; }
.remember-me input { margin: 0; }
@media (max-width: 860px) {
  #login-screen { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 24px; gap: 16px; }
  .login-art h2 { font-size: 28px; }
  .login-features, .mini-seats, .login-foot { display: none; }
}

/* User pill and account rows */
.user-pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border-radius: var(--r-pill); background: transparent; border: 1px solid var(--line);
  font-size: 12px; cursor: pointer; transition: background-color var(--dur-1); white-space: nowrap; }
.user-pill:hover { background: var(--surface-2); }
.user-pill .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--blush); color: var(--blush-ink); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.role-badge { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .04em; }
.role-badge.master { background: var(--butter); color: var(--butter-ink); }
.role-badge.teacher { background: var(--sky); color: var(--sky-ink); }
.account-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); margin-bottom: 8px; background: var(--surface); }
.account-row .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--sky-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.account-row.archived { opacity: .55; }

/* Privacy Policy / Terms: what changed since the version someone agreed to (src/core/consent.js). */
.policy-changes { background: var(--accent-soft, #FBE4D9); border: 1px solid var(--accent, #C4532D); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }
.policy-new { background: var(--butter, #FBF1D6); box-shadow: inset 3px 0 0 var(--accent, #C4532D); border-radius: 4px; padding: 2px 6px; }
li.policy-new { margin-left: -6px; }

/* PIN lock (src/auth/pin-lock.js): covers the whole app until the PIN is entered. */
.pin-lock { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--paper, #FAF6EF); }
.pin-card { width: 100%; max-width: 340px; padding: 28px 24px; text-align: center; }
.pin-avatar { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; background: var(--accent-soft, #FBE4D9); color: var(--accent-ink, #8A3517); overflow: hidden; }
.pin-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-input { text-align: center; font-size: 22px; letter-spacing: 8px; }
.pin-error { min-height: 18px; margin-top: 8px; font-size: 12.5px; color: var(--red, #B93A30); }
