/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid transparent;
  background: rgba(7, 13, 22, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--violet) 50%, transparent 70%);
  opacity: 0.5;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.85;
}

.brand .slash {
  color: var(--text-faint);
  margin: 0 5px;
  font-weight: 400;
}

.brand .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 7px;
  align-self: center;
  box-shadow: 0 0 10px 1px var(--cyan-glow);
  animation: dotGlow 3s ease-in-out infinite;
}

@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 8px 1px var(--cyan-glow); }
  50% { box-shadow: 0 0 14px 3px var(--violet-glow); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-sep {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, var(--hairline-strong), transparent);
  margin: 0 4px;
  flex: none;
}

.site-header .btn {
  height: 38px;
}

.site-header .btn-primary {
  box-shadow: var(--glow-accent);
}

.site-header .btn-primary:hover {
  box-shadow: 0 10px 34px -8px var(--cyan-glow);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--hairline);
  background: var(--panel);
  border-radius: var(--radius-pill);
  padding: 4px 12px 4px 5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), box-shadow var(--t-med);
}

a.user-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--panel-raised);
  box-shadow: var(--glow-accent);
}

.user-chip[hidden] {
  display: none;
}

.user-chip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--bg);
}

.user-chip .avatar[hidden] {
  display: none;
}

.admin-tag {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-med), box-shadow var(--t-med);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.btn[hidden] {
  display: none;
}

.btn:hover {
  border-color: var(--hairline-strong);
  color: var(--text);
  transform: translateY(-1px);
}

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

.btn-primary {
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-bright);
  font-weight: 600;
  box-shadow: var(--glow-accent);
}

.btn-primary:hover {
  border-color: var(--accent);
  color: #e6faff;
  box-shadow: 0 10px 34px -8px var(--cyan-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: transparent;
  background: var(--bg-elevated);
}

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

/* ---------- Support (Buy Me A Coffee) ---------- */
.bmc-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  transition: color 0.15s ease;
}

.bmc-btn:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .bmc-btn {
    display: none;
  }
  .header-actions {
    gap: 8px;
  }
  .header-sep {
    margin: 0 2px;
  }
}

@media (max-width: 640px) {
  .site-header .inner {
    gap: 12px;
  }
  .site-header .btn,
  .notif-btn {
    height: 34px;
    padding: 6px 10px;
    font-size: 11.5px;
  }
  .site-header .user-chip {
    padding: 2px 9px 2px 3px;
    font-size: 11.5px;
  }
  .site-header .user-chip .avatar {
    width: 22px;
    height: 22px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid transparent;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 212, 232, 0.35), transparent);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--cyan-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 24ch;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lede {
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 60ch;
  margin: 0 0 28px;
}

.hero p.lede-sub {
  color: var(--text-faint);
  font-size: 13.5px;
  max-width: 60ch;
  margin: -16px 0 28px;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

.hero-stats > div {
  animation: fadeUp 0.5s var(--ease) both;
}

.hero-stats > div:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-stats > div:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-stats > div {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 20px;
  min-width: 130px;
}

.hero-stats > div::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-stats .stat-value {
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-stats .stat-label {
  font-size: 10.5px;
  color: var(--text-tertiary, var(--text-faint));
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ---------- Toolbar ---------- */
.toolbar {
  padding: 24px 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

#search-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 13.5px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

#search-input::placeholder {
  color: var(--text-faint);
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
}

#sort-select {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

#sort-select:hover {
  border-color: var(--hairline-strong);
}

/* Tag chips */
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0 0;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-med);
}

.chip:hover {
  border-color: var(--hairline-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 14px -4px var(--cyan-glow);
}

/* ---------- Gallery grid ---------- */
.gallery {
  padding: 28px 0 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  color: var(--text);
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-med), box-shadow var(--t-med);
  animation: cardIn 0.45s var(--ease) both;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent 70%);
  opacity: 0;
  transition: opacity var(--t-med);
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(95, 212, 232, 0.12), 0 12px 30px -18px var(--cyan-glow);
}

.card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  transition: color var(--t-fast);
}

.card:hover .card-title {
  color: var(--accent-bright);
}

.card-author {
  color: var(--text-faint);
  font-size: 12.5px;
  margin: 2px 0 0;
}

.card-desc {
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 10px 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--hairline);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
}

.card-stats {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}

.card-stats b {
  color: var(--text);
  font-weight: 500;
}

.card-uploader {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}

.card-votes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.vote-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease, transform var(--t-med);
}

.vote-btn:hover {
  color: var(--text);
  background: var(--panel-raised);
  transform: translateY(-1px);
}

.vote-btn:active {
  transform: none;
}

.vote-btn.up:hover {
  color: var(--c3);
  border-color: color-mix(in srgb, var(--c3) 35%, transparent);
}

.vote-btn.down:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.vote-btn.up.active {
  color: var(--c3);
  background: color-mix(in srgb, var(--c3) 14%, transparent);
  border-color: color-mix(in srgb, var(--c3) 55%, transparent);
  font-weight: 600;
}

.vote-btn.down.active {
  color: var(--danger);
  background: var(--danger-dim);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  font-weight: 600;
}

.vote-score {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vote-score.bump {
  animation: vote-bump 0.3s ease;
}

@keyframes vote-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); color: var(--accent-bright); }
  100% { transform: scale(1); }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 8px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 22, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

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

.modal {
  background: linear-gradient(160deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(95, 212, 232, 0.08);
  animation: modalIn 0.28s var(--ease) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 6px;
}

.modal p.hint {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 20px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.field .field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

.field input[type='text'],
.field input[type='password'],
.field textarea,
.field input[type='file'] {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.field textarea {
  resize: vertical;
  min-height: 70px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 1em;
}

/* ---------- Profiles section ---------- */
.profiles-section {
  padding-bottom: 8px;
}

.profiles-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 24px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profiles-title::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 3px;
  background: var(--grad-accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid transparent;
  position: relative;
  padding: 26px 0 56px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 212, 232, 0.3), transparent);
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--t-fast);
}

.site-footer a:hover {
  color: var(--accent-bright);
}

.footer-links {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .hero h1 {
    font-size: 28px;
  }
}

/* ---------- Notifications ---------- */
.notif-wrap {
  position: relative;
}

.notif-wrap[hidden] {
  display: none;
}

.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-soft);
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.notif-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.notif-btn.has-unread {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.notif-bell {
  width: 18px;
  height: 18px;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #070d16;
  background: var(--grad-accent);
  border: 2px solid var(--bg);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px var(--cyan-glow);
}

.notif-badge[hidden] {
  display: none;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  background: var(--panel-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(95, 212, 232, 0.06);
  overflow: hidden;
  z-index: 60;
  animation: modalIn 0.25s var(--ease) both;
  transform-origin: top right;
}

.notif-panel[hidden] {
  display: none;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.notif-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.notif-mark {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-bright);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--t-fast);
}

.notif-mark:hover {
  color: var(--text);
}

.notif-list {
  max-height: 420px;
  overflow-y: auto;
}

.notif-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--text-dim);
  transition: background 0.12s ease;
}

.notif-item:last-child {
  border-bottom: none;
}

a.notif-item:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.notif-item.unread {
  background: var(--accent-dim);
}

.notif-type {
  grid-row: 1;
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 1px;
}

.notif-type.t-new_profile,
.notif-type.t-profile_updated {
  color: var(--c4);
  border-color: color-mix(in srgb, var(--c4) 45%, transparent);
}

.notif-type.t-new_comment {
  color: var(--c3);
  border-color: color-mix(in srgb, var(--c3) 45%, transparent);
}

.notif-type.t-new_user {
  color: var(--c5);
  border-color: color-mix(in srgb, var(--c5) 45%, transparent);
}

.notif-text {
  grid-row: 1;
  grid-column: 2;
  font-size: 13px;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notif-time {
  grid-row: 1;
  grid-column: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}

.notif-empty {
  padding: 22px 16px;
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Realtime toasts ---------- */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
  max-width: min(360px, calc(100vw - 40px));
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 6px 10px;
  background: var(--panel-raised);
  border: 1px solid var(--hairline-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 34px 12px 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(95, 212, 232, 0.06);
  animation: toast-in 0.28s var(--ease);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.toast-label {
  grid-row: 1;
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-bright);
}

.toast-text {
  grid-row: 1;
  grid-column: 2;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-link {
  grid-row: 1;
  grid-column: 3;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-bright);
  text-decoration: none;
  white-space: nowrap;
}

.toast-link:hover {
  color: var(--text);
}

.toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

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