:root {
  color-scheme: dark;
  --bg: #0b0e16;
  --bg-glow: #141a2b;
  --card: rgba(24, 29, 44, 0.78);
  --card-solid: #181d2c;
  --field: rgba(10, 13, 21, 0.7);
  --text: #e8ebf3;
  --muted: #98a1b7;
  --accent: #4f7dff;
  --accent-hover: #6b91ff;
  --border: rgba(255, 255, 255, 0.09);
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, var(--bg-glow), var(--bg) 70%) fixed;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Falling dots canvas (snow.js) sits behind everything. */
.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.view {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
}

[hidden] { display: none !important; }

/* Landing page */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.logo {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 8px 24px rgba(79, 125, 255, 0.35));
}

.greeting {
  margin: 1.25rem 0 0;
  color: var(--accent-hover);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0.25rem 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
}

.today { margin: 0; color: var(--muted); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(6px);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.tile:hover, a.tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.tile-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-hover);
  margin-bottom: 0.4rem;
}

.tile-title { font-weight: 600; font-size: 1.05rem; }
.tile-sub { color: var(--muted); font-size: 0.92rem; }
.tile-soon { opacity: 0.55; }

/* Inner pages */
.view-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
}

.view-header h1 { margin: 0; font-size: 1.5rem; }

.back {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  white-space: nowrap;
}

.back:hover { color: var(--text); border-color: var(--accent); }

.card {
  background: var(--card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card h2 { margin-top: 0; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.contact-form input[name="email"] { grid-column: 1 / -1; }
.contact-form button { grid-column: 1 / -1; }

input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--field);
  color: var(--text);
}

input::placeholder { color: #6c7488; }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

button:hover { background: var(--accent-hover); }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.contact-info { min-width: 0; }
.contact-name { font-weight: 600; }
.contact-subject { color: var(--muted); font-weight: normal; }
.contact-info a { color: var(--accent-hover); word-break: break-all; }

.remove-btn {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.remove-btn:hover { background: var(--danger); color: #fff; }

.empty { color: var(--muted); font-style: italic; }

@media (max-width: 480px) {
  .contact-form { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; }
}

/* Accounts */
.hero-compact { padding: 2.5rem 0 1.5rem; }
.hero-compact .logo { width: 64px; height: 64px; }
.hero-compact h1 { margin-top: 1rem; font-size: clamp(1.5rem, 4vw, 2rem); }

.auth-card { max-width: 420px; margin: 0 auto; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  background: var(--field);
  border: 1px solid var(--border);
}

.tab {
  background: transparent;
  color: var(--muted);
  padding: 0.5rem;
  font-size: 0.95rem;
}

.tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }

#auth-form { display: grid; gap: 0.75rem; }

.field { display: grid; gap: 0.3rem; }
.field span { font-size: 0.9rem; color: var(--muted); }

.form-message { margin: 0; font-size: 0.92rem; min-height: 0; }
.form-message:empty { display: none; }
.form-message.error { color: var(--danger); }
.form-message.success { color: #5fd38d; }
.card .form-message { margin-top: 0.75rem; }

button:disabled { opacity: 0.6; cursor: default; }

.link-btn {
  display: block;
  margin: 0.9rem auto 0;
  background: none;
  color: var(--accent-hover);
  padding: 0.2rem;
  font-size: 0.92rem;
}

.link-btn:hover { background: none; text-decoration: underline; }

.account-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.account-email {
  color: var(--muted);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghost-btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.ghost-btn:hover { background: var(--card); border-color: var(--accent); }
.account-bar + .hero { padding-top: 2rem; }

/* First-time setup */
.setup-intro h1 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.setup-intro p { margin: 0; color: var(--muted); }
.setup-done { display: grid; gap: 0.5rem; }
.setup-done button { padding: 0.75rem 1rem; font-size: 1.05rem; }
.section-hint { margin: -0.4rem 0 0.9rem; color: var(--muted); font-size: 0.92rem; }
.section-hint.warning { color: #ffb84d; }
.optional {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  vertical-align: middle;
}

.report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
}
.report-toggle input { accent-color: var(--accent); width: 1rem; height: 1rem; margin: 0; }

/* Home */
.tile-primary { border-color: rgba(79, 125, 255, 0.45); background: linear-gradient(160deg, rgba(79, 125, 255, 0.22), var(--card) 65%); }

/* Log study time */
.study-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field-wide { grid-column: 1 / -1; }
.study-form button[type="submit"] { padding: 0.7rem 1rem; }

textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--field);
  color: var(--text);
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

.quick-times { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: -0.25rem; }
.chip-btn {
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}
.chip-btn:hover { background: var(--field); border-color: var(--accent); }

.week-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.week-header h2 { margin: 0 0 0.6rem; }
.week-total { color: var(--accent-hover); font-weight: 600; }

.session-list { list-style: none; padding: 0; margin: 0; }
.session-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.session-info { min-width: 0; }
.session-title { font-weight: 600; overflow-wrap: anywhere; }
.session-minutes { color: var(--accent-hover); font-weight: 500; }
.session-meta { color: var(--muted); font-size: 0.9rem; }
.session-notes { color: var(--muted); font-size: 0.9rem; font-style: italic; overflow-wrap: anywhere; }

/* Toasts (UI.toast) */
#toasts { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 10; display: grid; gap: 0.5rem; }
.toast { background: var(--card-solid); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 1rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.toast.error { border-color: var(--danger); color: var(--danger); }

@media (max-width: 480px) {
  .study-form { grid-template-columns: 1fr; }
}

/* Send the weekly report */
select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--field);
  color: var(--text);
}
select:focus { outline: 2px solid var(--accent); border-color: transparent; }

.send-card h2 { margin: 0 0 0.6rem; }
.send-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: end; }
.send-row button { padding: 0.65rem 1.1rem; }

.email-preview { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.email-preview summary { cursor: pointer; color: var(--muted); font-size: 0.92rem; }
.copy-field {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
  margin-top: 0.75rem;
}
.copy-field > span { color: var(--muted); font-size: 0.9rem; padding-top: 0.2rem; }
.copy-field code,
.copy-field pre {
  margin: 0;
  padding: 0.4rem 0.6rem;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy-field pre { max-height: 16rem; overflow: auto; }

@media (max-width: 480px) {
  .send-row { grid-template-columns: 1fr; }
  .copy-field { grid-template-columns: 1fr auto; }
  .copy-field > span { grid-column: 1 / -1; }
}

/* ---------- Console home screen ---------- */
.view.console {
  max-width: 1100px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.console-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.profile { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(135deg, #4f7dff, #9b5cff);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(79, 125, 255, 0.35);
}
.profile-text { display: grid; min-width: 0; }
.profile-text .greeting { margin: 0; color: var(--text); font-weight: 600; font-size: 1.05rem; }

.console-status { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.clock-block { display: grid; text-align: right; }
.clock { font-size: 1.6rem; font-weight: 300; letter-spacing: 0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.clock-block .today { font-size: 0.8rem; }

/* Two rows of three. The selected icon's name shows in the gap under it. */
.console-row {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  align-items: center;
  column-gap: clamp(1.4rem, 3vw, 2.6rem);
  row-gap: clamp(3.6rem, 7.5vh, 4.4rem);
  margin-top: auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.console-tile {
  --from: #4f7dff;
  --to: #2b4fd8;
  position: relative;
  /* Shrinks on smaller (or shorter) windows so both rows fit. */
  width: clamp(84px, min(13vw, 17vh), 150px);
  height: clamp(84px, min(13vw, 17vh), 150px);
  border-radius: clamp(22px, 2.6vw, 30px);
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(145deg, var(--from), var(--to));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.22s cubic-bezier(.2, .9, .3, 1.3), box-shadow 0.22s ease, filter 0.22s ease;
  filter: saturate(0.75) brightness(0.8);
  cursor: pointer;
  outline: none;
}
.console-tile[data-color="green"] { --from: #2fd18b; --to: #0e9a6a; }
.console-tile[data-color="purple"] { --from: #a970ff; --to: #6a3df0; }
.console-tile[data-color="gray"] { --from: #4a5268; --to: #2c3242; }

.console-tile svg {
  width: 43%;
  height: 43%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.console-tile.selected {
  transform: scale(1.12);
  filter: none;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 9px rgba(255, 255, 255, 0.15),
    0 18px 50px color-mix(in srgb, var(--from) 55%, transparent);
  z-index: 1;
}

.console-label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.console-tile.selected .console-label { opacity: 1; }
.console-stat { display: none; }

.console-tile.locked { cursor: not-allowed; }
.console-tile.locked svg { opacity: 0.7; }
.console-tile.nope { animation: nope 0.35s ease; }
@keyframes nope {
  0%, 100% { translate: 0; }
  25% { translate: -8px; }
  75% { translate: 8px; }
}

.console-info {
  text-align: center;
  max-width: 560px;
  margin: 0.5rem auto 0;
  min-height: 7.5rem;
}
.console-info h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.console-info p { margin: 0.35rem 0 0; color: var(--muted); }
.console-info .console-info-stat { color: var(--accent-hover); font-weight: 600; }

.console-hints {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 1.5rem;
}
.console-hints kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.1rem 0.4rem;
  margin-right: 0.2rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .console-tile, .console-label { transition: none; }
  .console-tile.nope { animation: none; }
}

@media (max-width: 640px) {
  .console-row { column-gap: 1.1rem; row-gap: 3.4rem; padding: 2rem 0.5rem 3rem; }
  .console-tile.selected { transform: scale(1.08); }
  .profile-text .greeting { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .avatar { width: 40px; height: 40px; font-size: 1.1rem; }
  .console-tile { width: clamp(84px, 24vw, 112px); height: clamp(84px, 24vw, 112px); border-radius: 24px; }
  .console-hints { display: none; }
  .clock { font-size: 1.25rem; }
  .clock-block .today { display: none; }
  .profile-text .account-email { display: none; }
  .console-status { gap: 0.5rem; }
  .settings-btn .btn-label { display: none; }
}
@media (max-width: 420px) {
  .clock-block { display: none; }
}

/* Sending early */
.sent-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(79, 125, 255, 0.45);
  border-radius: 10px;
  background: rgba(79, 125, 255, 0.1);
}
.sent-confirm span { font-weight: 600; margin-right: auto; }
.sent-status { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9rem; }
.link-btn.inline { display: inline; margin: 0 0 0 0.4rem; padding: 0; }

/* Donate */
.console-tile[data-color="pink"] { --from: #ff6fa8; --to: #e0306f; }

.donate-intro { margin: 0 0 1rem; color: var(--muted); }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pay-method {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.4rem 1rem;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--field);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pay-method:hover { background: var(--field); transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.pay-method.selected { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.4); }
.pay-logo { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.pay-name { font-weight: 700; font-size: 1.15rem; }
.pay-handle { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }

.amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.6rem; }
.amount-btn {
  padding: 0.75rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
}
.amount-btn:hover { background: var(--accent); border-color: var(--accent); }
#amount-card h2 { margin: 0 0 0.9rem; font-size: 1.15rem; overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .pay-methods { grid-template-columns: 1fr; }
}

/* PDF drop box (Quick submit) */
.drop-zone {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 2rem 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: var(--field);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop-zone svg { width: 48px; height: 48px; fill: none; stroke: #ffa94d; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { font-size: 1.1rem; }
.drop-zone span { color: var(--muted); font-size: 0.9rem; }
.drop-zone:hover, .drop-zone:focus-visible { border-color: #ffa94d; outline: none; }
.drop-zone.dragging { border-color: #ffa94d; background: rgba(255, 169, 77, 0.12); }

.files-privacy { margin: 0.9rem 0 0; }
.shared-actions { display: flex; gap: 0.5rem; flex-shrink: 0; align-items: center; }

/* Quick submit */
.console-tile[data-color="teal"] { --from: #22d3ee; --to: #0e7490; }
.quick-card .drop-zone { padding: 2.4rem 1rem; }
.quick-card .drop-zone svg { stroke: #22d3ee; }
.quick-card .drop-zone:hover, .quick-card .drop-zone:focus-visible, .quick-card .drop-zone.dragging { border-color: #22d3ee; }
.quick-card .drop-zone.dragging { background: rgba(34, 211, 238, 0.12); }
.drop-zone.has-files { border-style: solid; border-color: rgba(34, 211, 238, 0.6); }
.quick-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.1rem 0 0.5rem; }
.quick-fields .field { display: grid; gap: 0.3rem; }
.quick-preview { margin: 0.25rem 0 1rem; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; min-height: 1.35em; }
.quick-btn { background: linear-gradient(135deg, #22d3ee, #0e7490); font-weight: 700; padding: 0.7rem 1.4rem; }
.quick-btn:hover { background: linear-gradient(135deg, #67e8f9, #0e7490); }
@media (max-width: 480px) {
  .quick-fields { grid-template-columns: 1fr; }
}

/* Email setup */
.email-setup-card h2 { margin: 1.4rem 0 0.4rem; font-size: 1.15rem; }
.email-setup-card h2:first-child { margin-top: 0; }
.email-setup-card .field { display: grid; gap: 0.3rem; margin-bottom: 0.75rem; }
.email-setup-card > button { margin-top: 1rem; width: 100%; padding: 0.75rem; font-size: 1.05rem; }
.profile-list { display: grid; gap: 0.5rem; }
.profile-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--field);
  cursor: pointer;
}
.profile-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.2); }
.profile-option input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }
.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #4f7dff, #9b5cff);
  color: #fff;
  flex-shrink: 0;
}
.profile-option.is-school .profile-avatar { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.profile-text { display: grid; min-width: 0; }
.profile-text span { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
a.ghost-btn { text-decoration: none; display: inline-block; }

/* Quick submit: the PDF to drag into the email (desktop app) */
.attach-box { margin-top: 0.75rem; }
.drag-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px dashed rgba(34, 211, 238, 0.6);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.08);
  cursor: grab;
  user-select: none;
}
.drag-chip:active { cursor: grabbing; }
.drag-chip-icon { font-size: 1.8rem; }
.drag-chip-text { display: grid; min-width: 0; }
.drag-chip-text strong { overflow-wrap: anywhere; }
.drag-chip-text span { color: var(--muted); font-size: 0.9rem; }

/* The PDF and the arrow pointing at the email window on the right (desktop app) */
.drag-guide { display: flex; align-items: center; gap: 1rem; }
.drag-guide .drag-chip { flex: 0 1 auto; min-width: 0; }
.drag-arrow-wrap { flex: 1 1 auto; display: grid; justify-items: center; gap: 0.2rem; min-width: 140px; color: #22d3ee; }
.drag-arrow { width: 100%; max-width: 240px; animation: drag-nudge 1.1s ease-in-out infinite; }
.drag-arrow svg { width: 100%; height: 44px; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.55)); }
.drag-arrow-text { font-size: 1.05rem; text-align: center; letter-spacing: 0.01em; }
@keyframes drag-nudge { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .drag-arrow { animation: none; } }
@media (max-width: 520px) {
  .drag-guide { flex-direction: column; }
  .drag-arrow { transform: rotate(90deg); max-width: 120px; animation: none; }
}

/* Full-window drag guide (desktop app), shown until the student says they sent it */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(ellipse at top, rgba(20, 26, 43, 0.97), rgba(11, 14, 22, 0.98) 70%);
  backdrop-filter: blur(6px);
}
.drag-overlay[hidden] { display: none; }
.drag-overlay-inner { width: 100%; max-width: 900px; display: grid; gap: 1.6rem; text-align: center; }
.drag-overlay h2 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2.2rem); }
.drag-overlay-note { margin: 0; color: var(--muted); }
.drag-overlay .drag-guide { flex-direction: column; gap: 1.6rem; }
.drag-overlay .drag-chip { padding: 1.4rem 1.8rem; border-width: 3px; border-radius: 18px; align-self: center; }
.drag-overlay .drag-chip-icon { font-size: 3.2rem; }
.drag-overlay .drag-chip-text strong { font-size: 1.3rem; }
.drag-overlay .drag-arrow-wrap { width: 100%; }
.drag-overlay .drag-arrow { max-width: none; width: 100%; }
.drag-overlay .drag-arrow svg { height: clamp(70px, 14vh, 140px); stroke-width: 7; }
.drag-overlay .drag-arrow-text { font-size: clamp(1.6rem, 4.5vw, 3rem); text-transform: uppercase; letter-spacing: 0.03em;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.6); }
.drag-overlay-hint { margin: 0; color: var(--muted); font-size: 1.05rem; }
.drag-overlay-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.drag-overlay .drag-done { font-size: 1.15rem; padding: 0.85rem 1.8rem; }
