/* ── Home extras: word of the day, first-visit tip ── */

.wotd-inner {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.wotd-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #a78bfa;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.wotd-word {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 4px;
}
.wotd-pos {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 8px;
}
.wotd-phonetic {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
}
.wotd-def {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 10px;
}
.wotd-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.tip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  animation: polishOverlayIn 0.25s ease;
}
.tip-card {
  max-width: 360px;
  width: 100%;
  background: #1e1b2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  animation: polishModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tip-title {
  font-family: var(--font-serif), Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.tip-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 16px;
}
.tip-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #1a4de8;
  color: #fff;
  font-family: var(--font-mono), monospace;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Small tag on flashcard fronts (part of speech / "Question") */
.fc-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Keyboard focus ring for clickable cards */
.unit-card:focus-visible,
.theme-swatch:focus-visible,
.flashcard:focus-visible {
  outline: 3px solid #a78bfa;
  outline-offset: 3px;
}

/* ── Announcement: follows the theme (card colours, accent bar, line icon) ── */
#home-announcement.home-announcement {
  background: var(--card-bg); color: var(--text);
  border: 1px solid var(--card-border); border-left: 4px solid var(--blue);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); backdrop-filter: none; z-index: 45; /* above seasonal decorations */
  max-width: 260px; padding: 10px 12px; gap: 10px; align-items: flex-start;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: 1.45;
}
#home-announcement.home-announcement:hover { background: var(--card-bg); border-color: var(--card-border); border-left-color: var(--blue); box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34); }
.home-announcement-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--blue);
}
.home-announcement-icon svg { width: 16px; height: 16px; }
.home-announcement-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-announcement-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
#home-announcement .home-announcement-toggle { color: var(--text-secondary); font-size: 12px; }
#home-announcement.home-announcement.collapsed {
  width: auto; height: auto; padding: 5px; border-radius: 12px; border-left-width: 1px; align-items: center;
}
#home-announcement.collapsed .home-announcement-icon { animation: annNudge 2.4s ease-in-out 1s 2; }
@keyframes annNudge { 0%, 100% { transform: none; } 10% { transform: rotate(-12deg); } 20% { transform: rotate(10deg); } 30% { transform: none; } }
@media (max-width: 480px) {
  #home-announcement.home-announcement { max-width: none; font-size: 13px; }
  #home-announcement.home-announcement.collapsed { width: fit-content; }
}

/* ── Next vocab test countdown (home, vocabulary only) ── */
#next-test-card[hidden] { display: none; }
.next-test {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px;
  backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.next-test-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: #7a3aee; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}
.next-test-icon .ico { width: 22px; height: 22px; }
.next-test-text { flex: 1; min-width: 0; }
.next-test-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 2px; color: #a78bfa; text-transform: uppercase; }
.next-test-date { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: #fff; line-height: 1.25; }
.next-test-note { font-family: var(--font-mono); font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 1px; }
.next-test-cum { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, 0.72); margin-top: 3px; }
.next-test-cum.on { display: inline-block; color: #fde68a; background: rgba(253, 230, 138, 0.12); border: 1px solid rgba(253, 230, 138, 0.35); border-radius: 999px; padding: 2px 8px; }
.next-test-count { flex-shrink: 0; text-align: right; font-family: var(--font-mono); color: #fff; }
.next-test-count strong { display: block; font-size: 30px; line-height: 1; font-weight: 800; }
.next-test-count span { font-size: 10px; color: rgba(255, 255, 255, 0.55); }
.next-test.soon { border-color: rgba(167, 139, 250, 0.6); box-shadow: 0 6px 24px rgba(122, 58, 238, 0.3); }
.next-test.soon .next-test-count strong { font-size: 20px; color: #c4b5fd; }

/* ── Top-left corner (wide screens): announcement + next test, above the decorations ── */
#home-corner {
  position: fixed; top: 20px; left: 20px; z-index: 60; width: 300px;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
#home-corner > * { pointer-events: auto; }
html:not(.boot-home) #home-corner, html.booting #home-corner { display: none; }
#home-corner #home-announcement.home-announcement { position: static !important; max-width: none; width: 100%; box-sizing: border-box; animation: none; }
#home-corner #home-announcement.home-announcement.collapsed { width: auto; align-self: flex-start; }
#home-corner .next-test { margin: 0; padding: 12px 14px; gap: 12px; }
#home-corner .next-test-icon { width: 36px; height: 36px; border-radius: 10px; }
#home-corner .next-test-date { font-size: 16px; white-space: nowrap; }
#home-corner .next-test-count strong { font-size: 24px; }
#home-corner .next-test.soon .next-test-count strong { font-size: 16px; }

/* Readable over busy backgrounds: solid card, a little larger text */
#home-announcement.home-announcement { font-size: 14px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
#home-announcement .home-announcement-text { color: var(--text); }

/* Unit cards without a picture: the word count sits on the right */
.unit-card-top.plain { justify-content: flex-end; margin-bottom: 4px; }

/* ── Student accounts: sign-in window and "My progress" (js/account.js) ── */
.account-btn.signed-in { background: rgba(255, 255, 255, 0.92); color: #1c1430; border-color: transparent; }
.acct-intro { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.5; }
.acct-form { display: flex; flex-direction: column; gap: 6px; }
.acct-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-top: 4px; }
.acct-input { width: 100%; box-sizing: border-box; }
.acct-submit { margin-top: 8px; align-self: flex-start; }
.acct-error { min-height: 16px; font-family: var(--font-mono); font-size: 12px; color: #e11d48; }
.acct-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.acct-or::before, .acct-or::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }
.acct-google-btn { display: flex; justify-content: center; min-height: 44px; }
.acct-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); margin: 12px 0 0; line-height: 1.5; }
.acct-who { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.acct-who strong { font-family: var(--font-serif); font-size: 22px; color: var(--text); }
.acct-who span { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.acct-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acct-tile { padding: 10px 12px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); }
.acct-tile-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); }
.acct-tile-value { font-size: 20px; font-weight: 700; color: var(--text); }
.acct-section { margin-top: 18px; }
.acct-h { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 8px; }
.acct-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.acct-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.acct-bar span { width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--blue); }
.acct-bar em { font-style: normal; font-family: var(--font-mono); font-size: 9px; color: var(--text-secondary); }
.acct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.acct-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--card-border); font-size: 14px; color: var(--text); }
.acct-list strong { font-family: var(--font-mono); }
.acct-unit + .acct-unit { margin-top: 10px; }
.acct-unit-name { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.acct-pin summary { cursor: pointer; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.acct-pin .acct-form { margin-top: 8px; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.acct-actions .home-lb-btn { color: var(--text); border-color: var(--card-border); background: var(--card-bg); }
.acct-actions .acct-danger { color: #e11d48; }
.acct-note a { color: var(--blue); }
.acct-ask { font-size: 13px; line-height: 1.5; color: var(--text); margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); }
.acct-link { all: unset; cursor: pointer; color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.acct-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ── My Lists: own word lists (js/mylists.js) ── */
.mylists-signin {
  text-align: center; padding: 28px 22px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff;
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mylists-signin-icon { width: 34px; height: 34px; opacity: 0.85; }
.mylists-signin h2 { font-family: var(--font-serif); font-size: 22px; margin: 8px 0 6px; }
.mylists-signin p { font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, 0.7); margin: 0 auto 16px; max-width: 360px; }
.unit-card-top.plain.has-edit { justify-content: space-between; align-items: center; }
.mylist-edit {
  appearance: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 5px 10px;
}
.mylist-edit:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.mylist-edit .ico { width: 13px; height: 13px; }
.mylist-new {
  appearance: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; cursor: pointer;
  padding: 22px; border-radius: 20px; border: 2px dashed rgba(255, 255, 255, 0.25); background: transparent; color: #fff;
  font: inherit; transition: background 0.2s, border-color 0.2s;
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mylist-new:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.45); }
.mylist-new:disabled { opacity: 0.5; cursor: default; }
.mylist-new-icon { width: 26px; height: 26px; }
.mylist-new-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.mylist-new-desc { font-family: var(--font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.6); }

/* List editor */
.ml-modal { max-width: 640px; width: calc(100% - 32px); }
.ml-editor { display: flex; flex-direction: column; gap: 6px; }
.ml-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.ml-tools .home-lb-btn, .ml-add, .ml-actions .home-lb-btn { color: var(--text); border-color: var(--card-border); background: var(--card-bg); }
.ml-tools .home-lb-btn[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); }
.ml-paste { display: flex; flex-direction: column; gap: 6px; }
.ml-paste[hidden] { display: none; }
.ml-paste textarea { width: 100%; box-sizing: border-box; resize: vertical; font-family: var(--font-mono); font-size: 13px; }
.ml-paste .name-submit-btn { align-self: flex-start; }
.ml-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ml-row { padding: 8px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); }
.ml-main { display: grid; grid-template-columns: minmax(0, 1fr) 76px 34px; gap: 6px; }
.ml-main .ml-def { grid-column: 1 / -1; }
.ml-row .name-input { width: 100%; box-sizing: border-box; min-width: 0; }
.ml-def { resize: none; overflow: hidden; font: inherit; font-size: 14px; line-height: 1.4; }
.ml-pos { padding-left: 6px; padding-right: 4px; }
.ml-remove { appearance: none; display: grid; place-items: center; border: 1px solid var(--card-border); background: transparent; color: var(--text-secondary); border-radius: 10px; cursor: pointer; }
.ml-remove:hover { color: #e11d48; border-color: #e11d48; }
.ml-remove .ico { width: 14px; height: 14px; }
.ml-extra { display: none; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.ml-editor.show-extra .ml-extra { display: grid; }
.ml-add { align-self: flex-start; margin-top: 4px; }
@media (min-width: 560px) {
  .ml-main { grid-template-columns: minmax(0, 0.8fr) 76px minmax(0, 1.6fr) 34px; }
  .ml-main .ml-def { grid-column: 3; grid-row: 1; }
  .ml-main .ml-remove { grid-column: 4; grid-row: 1; }
}
@media (max-width: 420px) { .ml-extra { grid-template-columns: 1fr; } }

/* My Lists sharing */
.mylist-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mylist-from { font-family: var(--font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.55); margin: -4px 0 6px; }
.mylist-new-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mylist-new-row .mylist-new { height: 100%; box-sizing: border-box; text-align: center; }
.ml-code {
  font-family: var(--font-mono); font-size: 40px; font-weight: 700; letter-spacing: 0.25em; text-align: center;
  padding: 14px 0 14px 0.25em; margin: 4px 0 10px; border-radius: 14px; color: var(--text);
  background: var(--card-bg); border: 2px dashed var(--card-border); user-select: all;
}
.ml-share-actions { margin-top: 0; }
.ml-share-actions .home-lb-btn { color: var(--text); border-color: var(--card-border); background: var(--card-bg); }
.ml-share .acct-link { font-size: 11px; margin-left: 4px; }
.ml-import .name-submit-row { display: flex; gap: 8px; }
.ml-import .name-input { flex: 1; min-width: 0; }
.ml-preview { margin: 6px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); }
.ml-preview-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--text); }
.ml-preview-by { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); margin: 2px 0 8px; }
.ml-preview-words { font-size: 13px; line-height: 1.5; color: var(--text); }
#ml-import-add, #ml-copy-code { white-space: nowrap; padding-left: 18px; padding-right: 18px; }
.mylist-new-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .mylist-new-row { grid-template-columns: 1fr 1fr; } .mylist-new-row .mylist-new:first-child { grid-column: 1 / -1; } }
.mylist-new-row .mylist-new { padding: 18px 12px; }
.ml-public { margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); }
.ml-public-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ml-public-title .ico { width: 16px; height: 16px; }
.ml-public .acct-intro { margin-bottom: 8px; }
.ml-public-btn { color: var(--text); border-color: var(--card-border); background: var(--bg, transparent); }
.pl-list { display: flex; flex-direction: column; gap: 10px; }
.pl-item { margin: 0; }
.pl-item .name-submit-btn { margin-top: 10px; white-space: nowrap; }

/* ── Friends (js/friends.js) ── */
.friends-btn { position: relative; }
.friends-online { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 10px; opacity: 0.85; }
.friends-online i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25); }
.friends-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.fr-mycode { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); margin-bottom: 12px; }
.fr-mycode .home-lb-btn, .fr-row .home-lb-btn { color: var(--text); border-color: var(--card-border); background: var(--card-bg); }
.fr-code { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: 0.18em; color: var(--text); user-select: all; }
.fr-add { display: flex; gap: 8px; }
.fr-add .name-input { flex: 1; min-width: 0; }
#fr-msg.ok { color: #16a34a; }
.fr-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.fr-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text); }
.fr-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-seen { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.fr-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex: none; }
.fr-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); }
.fr-remove { appearance: none; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.fr-remove:hover { color: #e11d48; }
.fr-remove .ico { width: 14px; height: 14px; }
.name-submit-btn.small, .home-lb-btn.small { font-size: 11px; padding: 6px 10px; margin: 0; }

/* Pop-up cards (chess challenges, friend requests) */
.social-toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.social-toast {
  pointer-events: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center;
  padding: 12px 14px; border-radius: 16px; background: var(--card-bg, #fff); color: var(--text, #1c1430);
  border: 1px solid var(--card-border, #e5e7eb); border-left: 4px solid #22c55e; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  animation: stIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.social-toast.out { animation: stOut 0.25s ease both; }
@keyframes stIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes stOut { to { opacity: 0; transform: translateY(10px); } }
.st-icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.st-icon .ico, .st-icon svg { width: 22px; height: 22px; }
.st-text { font-size: 14px; line-height: 1.35; }
.st-error { color: #e11d48; font-size: 12px; }
.st-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.st-btns .home-lb-btn { color: var(--text); border-color: var(--card-border); background: transparent; }

/* My progress: questions you miss most */
.acct-misses li.acct-miss { flex-direction: column; gap: 6px; align-items: stretch; }
.acct-miss-main { display: flex; flex-direction: column; gap: 2px; }
.acct-miss-main strong { font-family: var(--font-serif); font-size: 16px; }
.acct-miss-def { font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.acct-miss-stat { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.acct-miss-count { color: #e11d48; font-weight: 700; }
.acct-miss-unit { text-align: right; }
.acct-miss-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--card-border); overflow: hidden; }
.acct-miss-bar i { display: block; height: 100%; background: #e11d48; border-radius: 3px; }

/* List editor: vocabulary words or questions */
.ml-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
@media (max-width: 460px) { .ml-kind { grid-template-columns: 1fr; } }
.ml-kind-btn {
  appearance: none; display: flex; align-items: flex-start; gap: 8px; text-align: left; cursor: pointer; font: inherit;
  padding: 10px 12px; border-radius: 12px; border: 2px solid var(--card-border); background: var(--card-bg); color: var(--text);
}
.ml-kind-btn .ico { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ml-kind-btn span { display: flex; flex-direction: column; gap: 2px; }
.ml-kind-btn strong { font-size: 14px; }
.ml-kind-btn small { font-family: var(--font-mono); font-size: 10px; line-height: 1.4; color: var(--text-secondary); }
.ml-kind-btn.on { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.ml-kind-btn.on .ico { color: var(--blue); }
.ml-paste-help { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin: 0; }
.ml-paste-help code { font-family: var(--font-mono); font-size: 11px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 1px 5px; }
.ml-wrongs { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
@media (max-width: 520px) { .ml-wrongs { grid-template-columns: 1fr; } }
/* Question sets: question first (full width), then the answer; no part of speech or synonyms */
.kind-questions .ml-wrongs { display: grid; }
.kind-questions .ml-pos, .kind-questions .ml-extra, .kind-questions .ml-vocab-only { display: none !important; }
.kind-questions .ml-main { grid-template-columns: minmax(0, 1fr) 34px !important; }
.kind-questions .ml-main .ml-def { grid-column: 1 / 2 !important; grid-row: 1 !important; }
.kind-questions .ml-main .ml-remove { grid-column: 2 !important; grid-row: 1 !important; }
.kind-questions .ml-main .ml-word { grid-column: 1 / -1 !important; grid-row: 2 !important; }
.acct-miss-main strong.acct-miss-q { font-family: inherit; font-size: 14px; line-height: 1.4; }

/* Practice mode (questions you miss most) */
.acct-practice-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.pr-top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.pr-bar { height: 5px; border-radius: 3px; background: var(--card-border); margin: 6px 0 14px; overflow: hidden; }
.pr-bar i { display: block; height: 100%; background: var(--blue); transition: width 0.3s; }
.pr-card { padding: 18px 16px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); text-align: center; margin-bottom: 12px; }
.pr-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 8px; }
.pr-word { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--text); }
.pr-question { font-size: 18px; line-height: 1.45; color: var(--text); }
.pr-choices { display: flex; flex-direction: column; gap: 8px; }
.pr-next { display: flex; justify-content: flex-end; margin-top: 12px; }
.pr-next .next-btn { width: auto; }
.pr-done { text-align: center; padding: 8px 0; }
.pr-done .final-score { font-size: 40px; font-weight: 800; color: var(--text); }
.pr-done .msg { color: var(--text-secondary); margin: 6px 0 16px; }

/* Home screen notifications (friend requests) */
.home-notifs { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.home-notifs[hidden] { display: none; }
.home-notif {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px;
  padding: 12px 14px; border-radius: 16px; background: var(--card-bg); color: var(--text);
  border: 1px solid var(--card-border); border-left: 4px solid #22c55e; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.home-notif.new { animation: stIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.home-notif.out { animation: stOut 0.25s ease both; }
.home-notif-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.home-notif-icon .ico { width: 20px; height: 20px; }
.home-notif-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; min-width: 0; }
.home-notif-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #16a34a; }
.home-notif-btns { display: flex; gap: 6px; }
.home-notif-btns .home-lb-btn { color: var(--text); border-color: var(--card-border); background: transparent; }
@media (max-width: 480px) {
  .home-notif { grid-template-columns: auto 1fr; }
  .home-notif-btns { grid-column: 1 / -1; justify-content: flex-end; }
}
#home-corner .home-notif { grid-template-columns: auto 1fr; }
#home-corner .home-notif-btns { grid-column: 1 / -1; justify-content: flex-end; }

/* Log in / Create an account (the prompt when the site opens, and the sign-in window) */
.tip-backdrop:has(.acct-prompt) { align-items: center; }
.acct-prompt { text-align: center; max-width: 380px; }
.acct-prompt-icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: rgba(26, 77, 232, 0.2); color: #8fb0ff; }
.acct-prompt-icon .ico { width: 28px; height: 28px; }
.acct-prompt .tip-title { font-size: 22px; }
.acct-prompt-btns { display: flex; flex-direction: column; gap: 8px; }
.tip-btn.alt { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.acct-prompt-skip { appearance: none; border: 0; background: none; color: rgba(255, 255, 255, 0.55); font-family: var(--font-mono); font-size: 12px; margin-top: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--card-border); margin-bottom: 14px; }
.acct-tab { appearance: none; border: 0; border-radius: 9px; padding: 9px 6px; background: transparent; color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; font-weight: 700; cursor: pointer; }
.acct-tab.on { background: var(--blue); color: #fff; }
.acct-hint { font-weight: 400; opacity: 0.8; }
#acct-form[data-mode="login"] .acct-create-only, #acct-form[data-mode="create"] ~ .acct-login-only { display: none; }
.modal-body:has(#acct-form[data-mode="create"]) .acct-login-only { display: none; }
.acct-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-top: 8px; cursor: pointer; }
.acct-check input { width: 16px; height: 16px; accent-color: var(--blue); }
#acct-profile-msg.ok { color: #16a34a; }
.lb-row.lb-me { outline: 2px solid var(--blue); outline-offset: -2px; }
.studiers-note { text-align: center; }
.acct-submit { white-space: nowrap; padding-left: 20px; padding-right: 20px; }

/* List editor: true / false questions (question sets) */
.ml-tfrow { display: none; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.kind-questions .ml-tfrow { display: flex; }
.ml-tf-toggle { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--font-mono); color: var(--text-secondary); cursor: pointer; }
.ml-tf-toggle input { width: 16px; height: 16px; accent-color: var(--blue); }
.ml-tf-pick, .ml-fix { display: none; }
.ml-row.is-tf .ml-tf-pick { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--body-bg); }
.ml-tf-btn { appearance: none; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: 700 12px var(--font-mono); color: var(--text-secondary); background: transparent; }
.ml-tf-btn .ico { width: 14px; height: 14px; }
.ml-tf-btn.on[data-v="True"] { background: #16a34a; color: #fff; }
.ml-tf-btn.on[data-v="False"] { background: #dc2626; color: #fff; }
.ml-row.is-tf[data-tfv="False"] .ml-fix { display: block; flex: 1 1 100%; }
.kind-questions .ml-row.is-tf .ml-word, .kind-questions .ml-row.is-tf .ml-wrongs { display: none !important; }
.kind-questions .ml-row.is-tf .ml-main .ml-def { grid-column: 1 / 2 !important; }
