/* ============================================================
   SEU Campus Board — light "Same"-inspired theme
   Clean white surface, violet accent, glassy sticky nav, soft pills.
   ============================================================ */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --ink: #1a1d29;
  --ink-muted: #667085;
  --ink-faint: #98a2b3;

  --brand: #7c3aed;
  --brand-hover: #6d28d9;
  --brand-tint: #f3effe;

  --feeling: #2e90fa;
  --feeling-tint: #eaf4ff;
  --compliment: #12b76a;
  --compliment-tint: #e7f8ef;
  --confession: #7a5af8;
  --confession-tint: #f1edfe;

  --pending: #f79009;
  --pending-tint: #fef3e2;
  --rejected: #f04438;
  --rejected-tint: #feecea;

  --radius-card: 16px;
  --radius-control: 10px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.1), 0 4px 6px -2px rgba(16, 24, 40, 0.05);

  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-links a {
  color: var(--ink-muted);
  padding: 7px 14px;
  border-radius: var(--radius-control);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--ink);
  background: var(--bg);
}

.nav-links a.primary {
  background: linear-gradient(135deg, var(--brand) 0%, #6d5cf0 100%);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.nav-links a.primary:hover {
  background: linear-gradient(135deg, var(--brand-hover) 0%, #6d5cf0 100%);
  color: #fff;
  text-decoration: none;
}

.nav-links form {
  margin: 0;
}

.nav-links button.link-button {
  background: none;
  border: none;
  padding: 7px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: var(--radius-control);
}

.nav-links button.link-button:hover {
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
}

/* ---------- Page shell ---------- */
main {
  padding: 32px 0 72px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.btn.btn-share {
  width: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, #6d5cf0 100%);
  box-shadow: 0 4px 16px -2px rgba(139, 92, 246, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn.btn-share svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn.btn-share:hover {
  background: linear-gradient(135deg, var(--brand-hover) 0%, #6d5cf0 100%);
  box-shadow: 0 6px 20px -2px rgba(139, 92, 246, 0.65);
  transform: translateY(-1px);
}

.btn.btn-share:active {
  transform: translateY(0);
}

/* ---------- Feed section header ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head .section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- Feed toolbar: filter tabs + sort ---------- */
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-tab:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--brand) 0%, #6d5cf0 100%);
  border-color: var(--brand);
  color: #fff;
}

.sort-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.sort-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sort-btn:hover {
  color: var(--ink);
}

.sort-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

/* ---------- Trending strip ---------- */
.trending-strip {
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--surface) 100%);
  border: 1px solid #ddd0fb;
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.trending-strip[hidden] {
  display: none;
}

.trending-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.87rem;
  color: var(--ink);
}

.trending-rank {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
  min-width: 20px;
  flex-shrink: 0;
}

.trending-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trending-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Tag pill filter ---------- */
.tag-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.tag-pills[hidden] {
  display: none;
}

.tag-pill {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tag-pill:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.tag-pill.active {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-control);
  margin-bottom: 20px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--rejected-tint);
  color: #b42318;
  border-color: #fda29b;
}

.alert-success {
  background: var(--compliment-tint);
  color: #067647;
  border-color: #6ce9a6;
}

/* ---------- Post cards ---------- */
@keyframes noteEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  padding: 18px 20px 16px;
  margin: 0 0 12px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  animation: noteEnter 0.4s ease both;
}

.note[hidden] {
  display: none;
}

.note:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.note.note-pinned {
  border-color: var(--pending);
}

.note.note-flash {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.note[data-type="FEELING"] { border-left: 3px solid var(--feeling); }
.note[data-type="COMPLIMENT"] { border-left: 3px solid var(--compliment); }
.note[data-type="CONFESSION"] { border-left: 3px solid var(--confession); }

.pin-flag {
  position: absolute;
  top: -1px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pending);
  color: #1a1205;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
  margin: 0;
}

.pin-flag svg {
  width: 11px;
  height: 11px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-feeling { color: var(--feeling); background: var(--feeling-tint); }
.badge-confession { color: var(--confession); background: var(--confession-tint); }
.badge-compliment { color: var(--compliment); background: var(--compliment-tint); }
.badge-pending { color: #b54708; background: var(--pending-tint); }
.badge-approved { color: var(--compliment); background: var(--compliment-tint); }
.badge-rejected { color: var(--rejected); background: var(--rejected-tint); }

.post-teacher {
  font-weight: 600;
  color: var(--ink-muted);
}

.post-time {
  color: var(--ink-faint);
}

.post-content {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--ink);
  white-space: pre-wrap;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.post-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 10px;
  border-radius: 999px;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.relate-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.relate-btn .relate-icon {
  font-size: 1rem;
  line-height: 1;
}

.relate-btn:hover {
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.relate-btn.active {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}

.relate-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.relate-count {
  font-weight: 800;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-muted);
}

.empty-state-board {
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  padding: 56px 24px;
}

.empty-state-icon {
  width: 44px;
  height: 44px;
  color: var(--ink-faint);
  margin: 0 auto 16px;
}

.empty-state-board h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.empty-state-board p {
  margin: 0 auto 20px;
  max-width: 380px;
}

.empty-state-cta {
  width: auto;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px 28px;
  max-width: 440px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.87rem;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}

select option {
  background: var(--card);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.hint {
  font-size: 0.81rem;
  color: var(--ink-faint);
  margin-top: 5px;
}

.optional {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label-row label {
  margin-bottom: 0;
}

.char-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.char-count.warn {
  color: var(--pending);
}

.char-count.limit {
  color: var(--rejected);
}

.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.tag-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 6px 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-chip button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

.tag-input input {
  flex: 1;
  min-width: 90px;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  padding: 4px 2px;
  color: var(--ink);
}

.modal-step-indicator {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.btn:hover {
  background: var(--brand-hover);
}

.btn:disabled {
  background: var(--border-strong);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--card);
}

.form-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ---------- Share modal ---------- */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
  min-height: 1.5em;
  color: var(--ink);
}

.modal-type-badge:empty {
  display: none;
}

.modal-back {
  background: none;
  border: none;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

.modal-back:hover {
  color: var(--ink);
  text-decoration: underline;
}

.type-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 18px 10px 14px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.type-option:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.type-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.type-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

.type-desc {
  color: var(--ink-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

/* ---------- Admin ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 0.92rem;
  cursor: pointer;
}

.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

th, td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 6px 13px;
  font-size: 0.81rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--border-strong);
}

.icon-btn.approve {
  color: var(--compliment);
  border-color: #abefc6;
}

.icon-btn.reject {
  color: var(--rejected);
  border-color: #fda29b;
}

.icon-btn.disable {
  color: var(--ink-muted);
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 14px;
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 28px 0 40px;
  color: var(--ink-faint);
  font-size: 0.84rem;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--compliment);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-lg);
  padding: 13px 14px;
  font-size: 0.88rem;
  color: var(--ink);
  animation: toastIn 0.2s ease both;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-error {
  border-left-color: var(--rejected);
}

.toast-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.toast span {
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--ink);
}

/* ---------- Error pages ---------- */
.error-page {
  text-align: center;
  padding: 90px 20px;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0;
  line-height: 1;
}

.error-page p {
  color: var(--ink-muted);
  margin: 12px 0 26px;
  font-size: 1.02rem;
}

.error-page .btn {
  width: auto;
  padding: 12px 26px;
  display: inline-block;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .navbar-inner {
    justify-content: center;
    text-align: center;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .page-header h1 {
    font-size: 1.45rem;
  }
  .toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .sort-toggle {
    width: 100%;
    justify-content: stretch;
  }
  .sort-toggle .sort-btn {
    flex: 1;
    text-align: center;
  }
  .toast-container {
    left: 12px;
    right: 12px;
    max-width: none;
  }
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead {
    display: none;
  }
  td {
    padding: 8px 14px;
    border-bottom: none;
  }
  tr {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .note, .relate-btn, .toast {
    transition: none;
    animation: none;
  }
}
