@font-face {
  font-family: 'Crypt Of Tomorrow';
  src: url('fonts/CryptOfTomorrow.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Determination Mono';
  src: url('fonts/DeterminationMono.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Familia combinada: el @ (U+0040) se buggea en Crypt, asi que ese unico
   glifo se sirve desde Determination Mono y todo lo demas desde Crypt. */
@font-face {
  font-family: 'Crypt Mix';
  src: url('fonts/DeterminationMono.ttf') format('truetype');
  unicode-range: U+0040; /* solo la arroba */
}
@font-face {
  font-family: 'Crypt Mix';
  src: url('fonts/CryptOfTomorrow.ttf') format('truetype');
  unicode-range: U+0-3F, U+41-10FFFF; /* todo menos la arroba */
}

:root {
  --bg: #000000;
  --fg: #ffffff;
  --yellow: #ffff00; /* amarillo Undertale para hover */
  --logo-h: 40px; /* altura de los sprites de letras */
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Determination Mono', monospace;
  min-height: 100vh;
}
.no-heart-motion .home::before { animation: none; }
.reduce-interface-motion * { animation-duration: .35s !important; transition-duration: .12s !important; }
.no-interface-motion *, .no-interface-motion *::before, .no-interface-motion *::after { animation: none !important; transition: none !important; }
.no-update-flash .version-badge.update-available { animation: none !important; }
.soft-update-flash .version-badge.update-available { animation-duration: 2.8s !important; }
[data-text-effects="off"] .ut-char { transform: none !important; }
body { font-size: calc(1em * var(--user-text-scale, 1)); }

/* ---- Fondo de la home: patron de corazones en diagonal ---- */
.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('assets/mainpage/heart_tile.png');
  background-repeat: repeat;
  background-size: 96px 168px;
  image-rendering: pixelated;
  opacity: 0.55;
  /* slide en diagonal hacia arriba-derecha (loop sin cortes) */
  animation: heart-drift 9s linear infinite;
}

@keyframes heart-drift {
  from { background-position: 0 0; }
  to   { background-position: 96px -168px; }
}

/* ---- Navbar ---- */
.navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  /* negro solido: el patron del fondo no pasa por debajo */
  background: #000;
  position: relative;
  z-index: 1;
  /* linea que aterriza todo el header como una sola barra */
  border-bottom: 5px solid var(--fg);
}

/* ---- Logo estatico (izquierda) ---- */
.logo {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  user-select: none;
  flex: 0 0 auto;
  margin-right: 48px; /* separacion con la navegacion */
}

.version-badge-shell {
  position: absolute;
  left: 50%;
  top: calc(100% + 25px);
  width: max-content;
  max-width: min(330px, 82vw);
  overflow: hidden;
  transform: translateX(-50%);
  pointer-events: auto;
  z-index: 3;
}
.version-badge {
  position: relative;
  width: max-content;
  max-width: 100%;
  padding: 9px 14px 8px;
  border: 5px solid var(--fg);
  border-top: 0;
  background: #000;
  color: var(--yellow);
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
  -webkit-font-smoothing: none;
  transform: translateY(-100%);
  opacity: 1;
  pointer-events: auto;
  /* Movimiento rapido y nitido: pasos suficientes para no deformar la pixel-font. */
  transition: transform 0.21s steps(14, end);
  will-change: transform;
}
.logo:hover .version-badge,
.logo:focus-visible .version-badge,
.version-badge:hover,
.version-badge.update-available {
  transform: translateY(0);
}
.version-badge.update-available {
  color: #000;
  background: var(--yellow);
  border-color: var(--yellow);
  z-index: 5;
  animation: version-alert 1.6s ease-in-out infinite;
}
@keyframes version-alert {
  0%, 100% { color: #000; background: var(--yellow); box-shadow: 0 0 0 rgba(255,255,0,0); }
  50% { color: #111; background: #b8b800; box-shadow: 0 0 12px rgba(255,255,0,0.32); }
}

.logo .letter {
  height: var(--logo-h);
  width: auto;
  display: block;
  margin-left: 6px; /* 6px de separacion entre letras */
  /* sin suavizado: sprite nitido, sin blur al escalar */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: center;
  transition: transform 0.14s ease-out;
  -webkit-user-drag: none;
  user-select: none;
}

.logo .letter:first-child { margin-left: 0; }
.logo .letter:hover { transform: scale(1.075); }
.logo .letter.logo-letter-bounce { animation: logo-letter-bounce 0.22s ease-out; }
@keyframes logo-letter-bounce {
  0%   { transform: scale(1.075) translateY(0); }
  35%  { transform: scale(0.96) translateY(2px); }
  68%  { transform: scale(1.09) translateY(-2px); }
  100% { transform: scale(1.075) translateY(0); }
}

/* Mantiene el hover mientras el cursor baja desde el logo al cartel. */
.logo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 25px;
}

/* ---- Navegacion (al lado del logo) ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* En la home, el selector de feed queda centrado contra el viewport.
   El wrap a fila propia (media query mas abajo) salta ANTES de que el logo
   alcance la nav, asi que nunca se solapan y el logo conserva su ancho real
   (el cartel de version sigue centrado sobre las letras). */
.main-navbar .nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.main-navbar .nav-links .nav-link {
  position: relative;
}

.main-navbar .nav-links .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -20px;
  width: 100%;
  height: 5px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.main-navbar .nav-links .nav-link.active {
  color: var(--yellow);
}

.main-navbar .nav-links .nav-link.active::after {
  transform: scaleX(1);
}

.nav-link {
  display: flex;
  align-items: center;
  line-height: 1;        /* sin interlineado extra que lo suba/baje */
  color: var(--fg);
  text-decoration: none;
  /* tamaño multiplo de la grilla de la pixel-font -> letras parejas */
  font-size: 32px;
  letter-spacing: 0;
  /* sin suavizado: la pixel-font se ve nitida y uniforme */
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: geometricPrecision;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.nav-link.active { opacity: 1; }

/* hover: el texto pasa a amarillo (color de la font de Undertale) */
.nav-link:hover {
  opacity: 1;
  color: var(--yellow);
}

/* 1240px: la nav baja a su fila ANTES de que el logo la alcance (~1175px con
   centrado absoluto), dejando un margen de aire. Asi nunca se solapan. */
@media (max-width: 1240px) {
  .main-navbar {
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .main-navbar .logo { margin-right: 0; }
  .main-navbar .nav-links {
    position: relative;
    left: auto;
    order: 3;
    width: 100%;
    justify-content: center;
    padding: 13px 0 15px;
    border-top: 3px solid #222;
    transform: none;
  }
  .main-navbar .nav-links .nav-link { font-size: 27px; }
  .main-navbar .nav-links .nav-link::after { bottom: -15px; }
  /* Con la nav en su fila bajo el logo, el cartel de version (absolute) queda
     encima de HOME/FOLLOWING y roba los toques. Es un efecto hover (inutil en
     touch) y no tiene click, asi que dejamos pasar los toques a la nav. */
  .main-navbar .version-badge-shell,
  .main-navbar .version-badge { pointer-events: none; }
}

@media (max-width: 620px) {
  .main-navbar { --logo-h: 27px; gap: 8px; padding: 14px 12px 0; }
  .main-navbar .nav-links { gap: 18px; padding-top: 12px; }
  .main-navbar .nav-links .nav-link { font-size: 23px; }
  .main-navbar .join-link { font-size: 24px; }
  .navbar:not(.main-navbar) {
    --logo-h: 22px;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 10px;
  }
  .navbar:not(.main-navbar) .logo { min-width: 0; margin-right: 0; }
  .navbar:not(.main-navbar) .logo .letter { margin-left: 3px; }
  .navbar:not(.main-navbar) .back-link { flex: 0 0 auto; font-size: 20px; white-space: nowrap; }
}

@media (max-width: 400px) {
  .navbar:not(.main-navbar) { --logo-h: 19px; }
  .navbar:not(.main-navbar) .back-link { font-size: 18px; }
}

/* ---- Stabilized 404 ---- */
.error-page {
  display: grid;
  width: 100%;
  min-height: calc(100dvh - 85px);
  margin: 0 auto;
  place-items: center;
  padding: clamp(32px, 7vh, 80px) 16px;
  text-align: center;
}
.error-card {
  width: min(600px, 100%);
  padding: clamp(28px, 5vw, 48px);
  border: 5px solid var(--fg);
  background: #000;
  box-shadow: 12px 12px 0 rgba(255,255,255,.12);
}
.error-code { margin: 2px 0 8px; color: var(--yellow); font: clamp(70px, 16vw, 150px)/.8 'Crypt Mix', monospace; }
.error-card h1 { margin: 0 0 12px; font-size: clamp(32px, 6vw, 56px); font-weight: normal; }
.error-card p { margin: 0 auto 24px; max-width: 520px; color: #aaa; font-size: 20px; line-height: 1.25; }
.error-home { display: inline-grid; width: 100%; min-height: 58px; place-items: center; text-decoration: none; }

@media (max-width: 620px) {
  .error-page { min-height: calc(100dvh - 52px); padding: 24px 12px; }
  .error-card { padding: 28px 20px; box-shadow: none; }
  .error-card p { font-size: 17px; }
}

/* ==================================================================
   Navbar activity center: chat, notifications, update log and profile
   ================================================================== */
.icons { gap: 10px; }
.nav-action-wrap { position: relative; flex: 0 0 auto; }
.nav-action-btn {
  width: 40px;
  height: 40px;
  color: #bdbdbd;
  border: 0;
  opacity: 1;
  transition: color .13s ease, transform .13s ease;
}
.nav-system-icon { width: 34px; height: 34px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; transition: transform .14s ease-out; }
.nav-notes-icon { stroke-width: 2.7; }
.nav-action-btn:hover .nav-system-icon { transform: scale(1.08) translateY(-1px); }
.nav-action-btn:active .nav-system-icon { transform: scale(.94) translateY(1px); }
.nav-action-btn:hover, .nav-action-wrap.open > .nav-action-btn { color: var(--yellow); transform: translateY(-1px); }
.activity-unread-mark {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 9px;
  height: 9px;
  background: var(--yellow);
  border: 0;
  box-shadow: 0 0 0 2px #000;
  z-index: 4;
  pointer-events: none;
}
.nav-drop-shell {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: min(390px, calc(100vw - 24px));
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .16s;
}
.chat-wrap .nav-drop-shell { width: min(300px, calc(100vw - 24px)); }
.pfp-wrap .nav-drop-shell { width: 210px; }
.nav-drop {
  position: relative;
  width: 100%;
  border: 5px solid var(--fg);
  border-top: 0;
  background: #000;
  color: var(--fg);
  transform: translateY(-100%);
  transition: transform .16s ease-out;
  will-change: transform;
}
.nav-action-wrap.open > .nav-drop-shell {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-action-wrap.open > .nav-drop-shell > .nav-drop {
  transform: translateY(0);
}
.chat-drop { padding: 22px; text-align: center; }
.chat-drop h2 { margin: 8px 0; color: var(--yellow); font-size: 25px; font-weight: normal; }
.chat-drop > p:last-child { color: #888; font-size: 15px; line-height: 1.25; }
.nav-drop-kicker { color: var(--yellow); font: 10px 'Crypt Mix', monospace; letter-spacing: 2px; }
.nav-drop-head, .updates-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 18px;
  border-bottom: 4px solid var(--fg);
}
.nav-drop-head h2, .updates-modal-head h2 { margin-top: 4px; font-size: 23px; font-weight: normal; }
.nav-drop-close, .updates-close {
  width: 36px;
  height: 36px;
  border: 3px solid var(--fg);
  background: #000;
  color: var(--fg);
  font: 25px 'Determination Mono', monospace;
  line-height: 1;
  cursor: pointer;
}
.nav-drop-close:hover, .updates-close:hover { color: var(--yellow); border-color: var(--yellow); }
.notifications-list { max-height: min(430px, calc(100vh - 150px)); overflow-y: auto; scrollbar-color: var(--yellow) #111; }
.notifications-empty { padding: 32px 18px; color: #777; font: 12px 'Crypt Mix', monospace; letter-spacing: 1px; text-align: center; }
.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  min-height: 76px;
  padding: 13px 15px;
  border-bottom: 3px solid #252525;
  color: var(--fg);
  text-decoration: none;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--yellow); }
.notification-item:hover { background: #111; }
.notification-item:hover b { color: var(--yellow); }
.notification-item img { width: 46px; height: 46px; border: 3px solid var(--fg); object-fit: cover; image-rendering: pixelated; }
.notification-item > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notification-item b { font-size: 15px; font-weight: normal; line-height: 1.12; }
.notification-item small { overflow: hidden; color: #888; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item time { color: #666; font: 9px 'Crypt Mix', monospace; }

/* El menu del avatar comparte exactamente el mismo despliegue. */
.pfp-menu.nav-drop { position: relative; top: auto; right: auto; min-width: 0; width: 100%; }
.pfp-menu.nav-drop .pfp-menu-item { padding: 13px 17px; }
.nav-action-wrap.open .nav-pfp { border-color: var(--yellow); }

.updates-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.82);
  opacity: 0;
  transition: opacity .18s ease;
}
.updates-overlay.open { opacity: 1; }
.updates-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 5px solid var(--fg);
  background: #000;
  box-shadow: 12px 12px 0 rgba(255,255,255,.14);
  transform: translateY(-22px);
  transition: transform .18s ease-out;
}
.updates-overlay.open .updates-modal { transform: translateY(0); }
.updates-modal::before { content: ""; position: absolute; top: -5px; right: 65px; width: 90px; height: 5px; background: var(--yellow); }
.update-current { display: flex; justify-content: space-between; padding: 16px 19px; border-bottom: 3px solid #292929; color: var(--yellow); font: 12px 'Crypt Mix', monospace; letter-spacing: 1px; }
.update-current strong { font-weight: normal; }
.update-entry { padding: 21px 23px 24px; }
.update-entry-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.update-entry-title b { color: var(--yellow); font-size: 26px; font-weight: normal; }
.update-version-line { display: flex; align-items: center; gap: 11px; }
.update-type { padding: 4px 7px 3px; border: 2px solid var(--yellow); color: var(--yellow); font: 9px 'Crypt Mix', monospace; letter-spacing: 1px; line-height: 1; }
.update-entry-title h3 { margin-top: 5px; color: var(--fg); font-size: 18px; font-weight: normal; }
.update-entry-title time { color: #777; font: 10px 'Crypt Mix', monospace; }
.update-entry ul { list-style: none; display: grid; gap: 12px; }
.update-entry li { position: relative; padding-left: 20px; color: #bbb; font-size: 16px; line-height: 1.25; }
.update-entry li::before { content: "*"; position: absolute; left: 0; color: var(--yellow); }
.updates-loading { min-height: 210px; display: grid; place-items: center; padding: 25px; color: #777; font: 11px 'Crypt Mix', monospace; letter-spacing: 1px; }
.updates-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 4px solid var(--fg); }
.updates-pagination button { min-height: 44px; padding: 0 16px; border: 0; background: #000; color: var(--fg); font: 11px 'Crypt Mix', monospace; cursor: pointer; }
.updates-pagination button:first-child { text-align: left; border-right: 3px solid #292929; }
.updates-pagination button:last-child { text-align: right; border-left: 3px solid #292929; }
.updates-pagination button:hover:not(:disabled) { color: #000; background: var(--yellow); }
.updates-pagination button:disabled { color: #444; cursor: default; }
.updates-page { padding: 0 14px; color: var(--yellow); font: 10px 'Crypt Mix', monospace; white-space: nowrap; }
.update-refresh { padding: 13px 18px; border-top: 4px solid var(--fg); color: #000; background: var(--yellow); font: 10px 'Crypt Mix', monospace; letter-spacing: 1px; text-align: center; }

@media (max-width: 1100px) {
  .navbar:not(.main-navbar):has(.icons) { flex-wrap: wrap; padding-bottom: 0; }
  .navbar:not(.main-navbar):has(.icons) .logo { margin-right: 0; }
  .navbar:not(.main-navbar):has(.icons) .nav-links { order: 3; width: 100%; justify-content: center; padding: 13px 0 15px; border-top: 3px solid #222; }
}
@media (max-width: 620px) {
  .navbar:has(.icons) { --logo-h: 22px; gap: 6px; padding: 13px 10px 0; }
  .navbar:has(.icons) .icons { gap: 5px; }
  .nav-action-btn { width: 29px; height: 29px; }
  .nav-system-icon { width: 27px; height: 27px; }
  .navbar:has(.icons) .nav-pfp { width: 31px; height: 31px; border-width: 3px; }
  .navbar:has(.icons) .nav-links { gap: 17px; }
  .navbar:has(.icons) .nav-links .nav-link { font-size: 22px; }
  .navbar:has(.icons) .join-link { font-size: 22px; }
  .updates-modal { box-shadow: 7px 7px 0 rgba(255,255,255,.14); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-drop, .nav-drop-shell, .updates-overlay, .updates-modal { transition: none; }
}

/* ---- Iconos (placeholder) ---- */
.icons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.icon-btn:hover { opacity: 1; }

/* Sprites de iconos hechos a mano: nitidos, sin blur */
.icon-sprite {
  height: 36px;
  width: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Marco de perfil (se rellena con el avatar real cuando exista) */
.pfp-sprite {
  height: 40px; /* mismo tamaño que el logo */
}

/* ---- Join! (usuario sin sesion): mismo estilo que los demas links ---- */

/* [hidden] debe ganar sobre display:flex de .icon-btn / .nav-link */
[hidden] { display: none !important; }

/* ========== Pagina de Sign Up ========== */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 460px;
  padding: 30px 36px;
  border: 5px solid var(--fg);
}

.auth-title {
  font-family: 'Determination Mono', monospace;
  font-size: 32px;
  font-weight: normal;
  letter-spacing: 2px;
  text-align: center;
  white-space: nowrap;
  margin: 0 0 8px;
  -webkit-font-smoothing: none;
}

/* ---- Campos ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field span {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}

.field input {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--fg);
  background: #111;
  border: 5px solid var(--fg);
  height: 46px;          /* misma altura en todos los inputs */
  padding: 0 14px;
  outline: none;
  -webkit-font-smoothing: none;
}

.field input:focus {
  border-color: var(--yellow);
}

.field input::placeholder {
  color: #5a5a5a;
}

/* ---- Boton principal ---- */
.auth-submit {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: 5px solid var(--fg);
  height: 52px;
  margin-top: 2px;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-submit:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

/* ---- Mensaje de error ---- */
.auth-error {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: #ff5555;
  text-align: center;
  margin: -4px 0 2px;
  -webkit-font-smoothing: none;
}

/* ---- Separador OR ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0;
  color: #6a6a6a;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 3px;
  background: #333;
}

.auth-divider span {
  font-family: 'Crypt Mix', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  -webkit-font-smoothing: none;
}

/* ---- Boton Sign in with Google ---- */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: 5px solid var(--fg);
  height: 52px;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.google-btn img {
  height: 28px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

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

/* ---- Footer: FUERA de la caja, debajo ---- */
.auth-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.auth-alt span {
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: #8a8a8a;
  -webkit-font-smoothing: none;
}

.auth-alt a {
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--yellow);
  text-decoration: none;
  -webkit-font-smoothing: none;
}

.auth-alt a:hover {
  color: var(--fg);
}


/* ==================================================================
   Pagina de Perfil  (escala tipografica consistente)
   name 26 / section 20 / body 18 / label 15 / small 13 / tag 12
   ================================================================== */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

.profile-card {
  border: 5px solid var(--fg);
  padding: 28px;
}

/* ---------- Preview ---------- */
.preview-card {
  display: flex;
  align-items: center;
  gap: 26px;
}

/* Foto cuadrada + overlay del lapiz al hover */
.pfp-frame {
  position: relative;
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  padding: 0;
  border: 5px solid var(--fg);
  background: #111;
  overflow: hidden;
  cursor: pointer;
}

.pfp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.pfp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);   /* oscurece la foto al hover */
  opacity: 0;
  transition: opacity 0.15s ease;
}

.pfp-frame:hover .pfp-overlay { opacity: 1; }

.pfp-pencil {
  width: 26%;
  height: auto;
  transform: rotate(-45deg);         /* el sprite viene vertical -> diagonal */
  image-rendering: pixelated;
}

.preview-info { display: flex; flex-direction: column; gap: 8px; }

.preview-name {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}

.preview-tag {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--yellow);
  -webkit-font-smoothing: none;
}

.preview-about {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: #bdbdbd;
  -webkit-font-smoothing: none;
}

.preview-tags { display: flex; gap: 10px; margin-top: 6px; }

.tag {
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 6px 12px;
  border: 3px solid var(--fg);
  -webkit-font-smoothing: none;
}

.tag-status { color: var(--yellow); border-color: var(--yellow); }

/* ---------- Editor ---------- */
.edit-title {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}

.edit-sub {
  font-family: 'Crypt Mix', monospace;
  font-size: 9px;
  letter-spacing: 0;
  color: #8a8a8a;
  margin: 10px 0 22px;
  -webkit-font-smoothing: none;
}

.edit-form { display: flex; flex-direction: column; gap: 18px; }

.edit-form textarea {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--fg);
  background: #111;
  border: 5px solid var(--fg);
  padding: 10px 14px;
  outline: none;
  resize: vertical;
  min-height: 90px;
  -webkit-font-smoothing: none;
}

.edit-form textarea:focus { border-color: var(--yellow); }
.edit-form textarea::placeholder { color: #5a5a5a; }

.field-hint {
  font-family: 'Crypt Mix', monospace;
  font-size: 9px;
  letter-spacing: 0;
  color: #6a6a6a;
  -webkit-font-smoothing: none;
}

.edit-form input[name="tag"] { text-transform: lowercase; }

/* ---------- Nav: avatar dentro del marco ---------- */
.nav-pfp {
  display: block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--fg);
  background: #111;
  overflow: hidden;
}
.nav-pfp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

/* ==================================================================
   Cropper modal  (pfp cuadrado, no circular)
   ================================================================== */
.cropper {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.cropper-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #000;
  border: 5px solid var(--fg);
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.cropper-title {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 1px;
  text-align: center;
  -webkit-font-smoothing: none;
}

.cropper-stage {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  background: #111;
  overflow: hidden;
  touch-action: none;
}

.cropper-canvas { display: block; cursor: grab; }
.cropper-canvas:active { cursor: grabbing; }

/* Guia cuadrada (recorte cuadrado) */
.cropper-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  outline: 3px solid var(--fg);
  outline-offset: -3px;
}

.cropper-controls { display: flex; flex-direction: column; gap: 12px; }

.ctrl-row { display: flex; align-items: center; gap: 12px; }

.ctrl-row > span {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  width: 72px;
  -webkit-font-smoothing: none;
}

.ctrl-row input[type="range"] { flex: 1; accent-color: var(--yellow); }

.rot-90 {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--fg);
  background: none;
  border: 3px solid var(--fg);
  padding: 4px 8px;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.rot-90:hover { color: var(--yellow); border-color: var(--yellow); }

.cropper-actions { display: flex; gap: 12px; }
.cropper-actions .auth-submit {
  flex: 1;
  height: 46px;
  font-size: 18px;
  margin-top: 0;
}

/* ==================================================================
   Home: feed + composer
   ================================================================== */
.feed-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- Composer ---- */
.composer {
  background: #000;
  border: 5px solid var(--fg);
  padding: 20px;
}

.composer-top { display: flex; gap: 14px; }

.composer-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 4px solid var(--fg);
  object-fit: cover;
  image-rendering: pixelated;
  background: #111;
}

.composer-input {
  flex: 1;
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  line-height: 1.35;
  color: var(--fg);
  background: none;
  border: none;
  outline: none;
  resize: none;
  min-height: 52px;
  overflow: hidden;
  -webkit-font-smoothing: none;
}
.composer-input::placeholder { color: #6a6a6a; }
.composer-input[contenteditable] {
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}
.composer-input[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: #6a6a6a;
  pointer-events: none;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.char-count {
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #8a8a8a;
  -webkit-font-smoothing: none;
}

.post-btn {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: 5px solid var(--fg);
  padding: 8px 24px;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.post-btn:hover:not(:disabled) { color: var(--yellow); border-color: var(--yellow); }
.post-btn:disabled { opacity: 0.4; cursor: default; }

/* ---- Aviso invitado ---- */
.feed-guest, .feed-empty {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: #8a8a8a;
  text-align: center;
  background: #000;
  border: 5px solid var(--fg);
  padding: 24px;
  -webkit-font-smoothing: none;
}
.feed-guest a { color: var(--yellow); text-decoration: none; }
.feed-guest a:hover { text-decoration: underline; }

/* ---- Feed ---- */
.feed { display: flex; flex-direction: column; gap: 16px; }

.post {
  display: flex;
  gap: 16px;
  background: #000;
  border: 5px solid var(--fg);
  padding: 20px;
}

.post-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 4px solid var(--fg);
  object-fit: cover;
  image-rendering: pixelated;
  background: #111;
}

.post-body { flex: 1; min-width: 0; }

.post-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.post-name {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}

.post-user, .post-dot, .post-time {
  font-family: 'Determination Mono', monospace;
  font-size: 12px;
  color: #7a7a7a;
  -webkit-font-smoothing: none;
}

.post-text {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 1px;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-font-smoothing: none;
}

/* ---- Acciones del post ---- */
.post-actions { display: flex; gap: 22px; margin-top: 12px; }

.act {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8a8a8a;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease;
}
.act:hover { color: var(--fg); }

/* corazon: opacidad CONSTANTE (sin transition en la imagen) -> no parpadea.
   El feedback de hover va por el color del texto, no por la imagen. */
.act img {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
  opacity: 0.85;
}
.like-btn.liked { color: #ff3b3b; }
.like-btn.liked img { opacity: 1; }

.act-ic { text-transform: uppercase; letter-spacing: 1px; }

/* ---- Menu de 3 puntos ---- */
.post-menu { margin-left: auto; position: relative; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 27px;
  min-height: 21px;
  color: #8a8a8a;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease;
}
.menu-btn i { display: block; width: 6px; height: 6px; background: currentColor; image-rendering: pixelated; }
.menu-btn:hover { color: var(--fg); }

.menu-drop {
  position: absolute;
  right: 0;
  top: 130%;
  display: flex;
  flex-direction: column;
  background: #000;
  min-width: 155px;
  border: 4px solid var(--fg);
  box-shadow: 6px 6px 0 rgba(255,255,255,.15);
  z-index: 5;
}
.menu-drop button {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: none;
  padding: 12px 17px;
  border-bottom: 3px solid #252525;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.12s ease;
}
.menu-drop button:last-child { border-bottom: 0; }
.menu-edit:hover { color: var(--yellow); }
.menu-del:hover { color: #ff3b3b; }

/* "(edited)" en gris */
.post-edited {
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6a6a6a;
  -webkit-font-smoothing: none;
}

/* ---- Editar post inline ---- */
.post-edit { margin-top: 4px; }
.edit-label { margin-bottom: 8px; color: var(--yellow); font: 9px 'Crypt Mix', monospace; letter-spacing: 2px; }
.gif-load { width: 100%; min-height: 100px; margin-top: 10px; border: 4px solid var(--fg); background: #080808; color: var(--yellow); font: 12px 'Crypt Mix', monospace; cursor: pointer; }
.gif-load:hover { background: var(--yellow); color: #000; }

.edit-area {
  width: 100%;
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 1px;
  color: var(--fg);
  background: #111;
  border: 5px solid var(--fg);
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  min-height: 72px;
  -webkit-font-smoothing: none;
}
.edit-area:focus { border-color: var(--yellow); }

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.edit-actions button {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: 5px solid var(--fg);
  padding: 6px 18px;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.edit-actions button:hover { color: var(--yellow); border-color: var(--yellow); }

/* ==================================================================
   Micro-interacciones (vida)
   ================================================================== */

/* Posts: entran con una animacion y se elevan al hover */
@keyframes post-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post {
  animation: post-in 0.22s ease both;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 0 rgba(255,255,255,0.10), 0 0 18px rgba(255,255,255,0.06);
}

/* Composer: leve glow al enfocar */
.composer { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.composer:focus-within {
  box-shadow: 0 0 18px rgba(255,255,0,0.08);
  border-color: var(--yellow);
}

/* Botones "apretables": bajan al presionar */
.post-btn:active:not(:disabled),
.auth-submit:active,
.google-btn:active,
.edit-actions button:active,
.file-btn:active,
.rot-90:active,
.menu-drop button:active,
.join-link:active {
  transform: translateY(2px);
}
.post-btn, .auth-submit, .google-btn, .edit-actions button,
.file-btn, .rot-90, .join-link {
  transition: color 0.15s ease, border-color 0.15s ease,
              transform 0.06s ease, box-shadow 0.15s ease;
}
/* glow amarillo al hover en los botones principales */
.post-btn:hover:not(:disabled),
.auth-submit:hover,
.google-btn:hover {
  box-shadow: 0 0 16px rgba(255,255,0,0.15);
}

/* Acciones del post: leve pop al presionar */
.act { transition: color 0.15s ease, transform 0.08s ease; }
.act:active { transform: scale(0.88); }

/* Corazon: latido sutil al likear */
@keyframes heart-beat {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.like-btn img.beat { animation: heart-beat 0.22s ease; }

/* Menu: cada opcion resalta */
.menu-drop button { transition: color 0.12s ease, background 0.12s ease; }
.menu-edit:hover { background: rgba(255,255,0,0.08); }
.menu-del:hover  { background: rgba(255,59,59,0.10); }

/* Links de nav / acciones: un pelin de vida al hover ya existente */
.nav-link { transition: opacity 0.15s ease, color 0.15s ease, transform 0.1s ease; }
.nav-link:active { transform: translateY(1px); }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .post, .like-btn img.beat, .version-badge.update-available { animation: none; }
  .post:hover { transform: none; }
}

/* ==================================================================
   Perfiles publicos + reply + media
   ================================================================== */

/* Elementos clickeables (nombre / @tag / avatar -> perfil) */
.clickable { cursor: pointer; transition: color 0.12s ease, opacity 0.12s ease; }
.post-name.clickable:hover { color: var(--yellow); }
.post-user.clickable:hover { color: var(--fg); }
.post-avatar.clickable:hover { opacity: 0.85; }

/* "replying to @user" */
.reply-to {
  display: inline-block;
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6a6a6a;
  text-decoration: none;
  margin-bottom: 6px;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.reply-to:hover { color: var(--yellow); }

/* Caja de reply inline */
.reply-box { margin-top: 12px; }
.reply-area {
  width: 100%;
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 1px;
  color: var(--fg);
  background: #111;
  border: 5px solid var(--fg);
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  min-height: 64px;
  -webkit-font-smoothing: none;
}
.reply-area:focus { border-color: var(--yellow); }
.reply-area::placeholder { color: #5a5a5a; }
.reply-area[contenteditable], .edit-area[contenteditable] {
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}
.reply-area[contenteditable]:empty::before,
.edit-area[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: #5a5a5a;
  pointer-events: none;
}

/* ---- Cabecera de perfil publico ---- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #000;
  border: 5px solid var(--fg);
  padding: 24px;
}
.hero-pfp { width: 96px; height: 96px; cursor: default; }
.hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hero-name {
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}
.hero-tag {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--yellow);
  -webkit-font-smoothing: none;
}
.hero-about {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: #bdbdbd;
  margin-top: 2px;
  -webkit-font-smoothing: none;
}
.hero-edit {
  flex: 0 0 auto;
  height: 44px;
  font-size: 16px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-top: 0;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0;
  border: 5px solid var(--fg);
  background: #000;
}
.tab {
  flex: 1;
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: #8a8a8a;
  background: none;
  border: none;
  padding: 14px 0;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab + .tab { border-left: 5px solid var(--fg); }
.tab:hover { color: var(--fg); }
.tab.active { color: #000; background: var(--fg); }

.tab-panel { display: flex; flex-direction: column; gap: 16px; }

/* ---- Media grid ---- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.media-item {
  display: block;
  aspect-ratio: 1 / 1;
  border: 4px solid var(--fg);
  overflow: hidden;
  background: #111;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.media-item:hover { transform: translateY(-2px); box-shadow: 0 0 14px rgba(255,255,255,0.10); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==================================================================
   Composer: imagen / gif / emojis  +  comentarios anidados
   ================================================================== */
.composer-main { flex: 1; display: flex; flex-direction: column; gap: 10px; }

/* Preview de imagen adjunta */
.composer-preview { position: relative; align-self: stretch; max-width: 100%; }
.composer-preview img {
  display: block;
  max-width: 100%;
  border: 5px solid var(--fg);
  image-rendering: auto;
}
.preview-remove {
  position: absolute;
  top: -12px; right: -12px;
  width: 30px; height: 30px;
  font-family: 'Determination Mono', monospace;
  font-size: 18px;
  color: #000;
  background: var(--fg);
  border: 3px solid #000;
  cursor: pointer;
  line-height: 1;
}
.preview-remove:hover { background: #ff3b3b; color: var(--fg); }

/* Barra de herramientas */
.composer-tools { display: flex; align-items: center; gap: 10px; }
.composer-right { display: flex; align-items: center; gap: 16px; }

.tool-btn {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  line-height: 1;
  color: var(--fg);
  background: none;
  border: 4px solid var(--fg);
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}
.tool-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.tool-btn:active { transform: translateY(2px); }
.img-btn { font-size: 22px; }

/* Panel de emojis */
.emoji-panel {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  border: 5px solid var(--fg);
  background: #000;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}
.emoji {
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s ease, transform 0.06s ease;
}
.emoji:hover { background: rgba(255,255,255,0.12); }
.emoji:active { transform: scale(0.85); }

/* Imagen dentro de un post */
.post-image {
  display: block;
  max-width: 100%;
  margin-top: 12px;
  border: 5px solid var(--fg);
  image-rendering: auto;
}

/* ---- Comentarios anidados ---- */
.comments { margin-top: 14px; }
.comment-list { display: flex; flex-direction: column; }

.comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 3px solid #1e1e1e;
}
.comment-avatar {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border: 4px solid var(--fg);
  object-fit: cover;
  image-rendering: pixelated;
  background: #111;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.comment-name {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}
.comment-user, .comment-time {
  font-family: 'Determination Mono', monospace;
  font-size: 12px;
  color: #7a7a7a;
  -webkit-font-smoothing: none;
}
.comment-text { font-size: 16px !important; line-height: 1.4 !important; }
.comment-actions { display: flex; gap: 18px; margin-top: 8px; }

/* Reply dentro de un comentario: mas compacto */
.comment-reply-box { margin-top: 10px; }
.comment-reply-box .reply-area { font-size: 16px; min-height: 48px; }
.comment .reply-to { margin-bottom: 4px; }

/* ---- Panel de GIFs (Klipy) ---- */
.gif-panel {
  margin-top: 12px;
  border: 5px solid var(--fg);
  background: #000;
  padding: 12px;
}
.gif-search {
  width: 100%;
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--fg);
  background: #111;
  border: 4px solid var(--fg);
  padding: 8px 12px;
  outline: none;
  margin-bottom: 10px;
  -webkit-font-smoothing: none;
}
.gif-search:focus { border-color: var(--yellow); }
.gif-search::placeholder { color: #5a5a5a; }

.gif-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.gif-item {
  padding: 0;
  border: 3px solid transparent;
  background: #111;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: border-color 0.1s ease, transform 0.06s ease;
}
.gif-item:hover { border-color: var(--yellow); }
.gif-item:active { transform: scale(0.96); }
.gif-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gif-status {
  grid-column: 1 / -1;
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: #8a8a8a;
  text-align: center;
  padding: 20px 0;
  -webkit-font-smoothing: none;
}

/* ==================================================================
   Follow / hamburguesa / menciones / reposts
   ================================================================== */

/* Post ahora es columna: banner de repost arriba + contenido */
.post { display: block; }
.post-main { display: flex; gap: 16px; }

/* Banner de repost */
.repost-banner {
  display: block;
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8a8a8a;
  text-decoration: none;
  margin-bottom: 10px;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.repost-banner:hover { color: var(--yellow); }
.repost-btn.reposted { color: #4ad14a; }

/* Menciones en el texto */
.mention {
  color: var(--yellow);
  text-decoration: none;
  cursor: pointer;
}
.mention:hover { text-decoration: underline; }

/* Dropdown de autocompletado de menciones */
.mention-drop {
  margin-top: 6px;
  border: 4px solid var(--fg);
  background: #000;
  max-height: 220px;
  overflow-y: auto;
}
.mention-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 3px solid #1e1e1e;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}
.mention-opt:last-child { border-bottom: none; }
.mention-opt:hover { background: rgba(255,255,255,0.08); }
.mention-opt img {
  width: 30px; height: 30px;
  border: 3px solid var(--fg);
  object-fit: cover;
  image-rendering: pixelated;
  background: #111;
}
.mo-name {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--fg);
  -webkit-font-smoothing: none;
}
.mo-user {
  font-family: 'Determination Mono', monospace;
  font-size: 12px;
  color: #7a7a7a;
  -webkit-font-smoothing: none;
}

/* ---- Menu hamburguesa del avatar ---- */
.pfp-wrap { position: relative; }
.pfp-menu {
  position: absolute;
  right: 0;
  top: 130%;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  background: #000;
  border: 5px solid var(--fg);
  z-index: 20;
}
.pfp-menu-item {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--fg);
  background: none;
  border: none;
  border-bottom: 3px solid #1e1e1e;
  padding: 12px 18px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-font-smoothing: none;
  transition: color 0.12s ease, background 0.12s ease;
}
.pfp-menu-item:last-child { border-bottom: none; }
.pfp-menu-item:hover { color: var(--yellow); background: rgba(255,255,0,0.06); }
.menu-logout:hover { color: #ff3b3b; background: rgba(255,59,59,0.08); }

/* ---- Hero: stats + follow ---- */
.hero-stats { display: flex; gap: 20px; margin-top: 8px; }
.stat {
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8a8a8a;
  -webkit-font-smoothing: none;
}
button.stat {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
button.stat:hover, button.stat:focus-visible { color: var(--yellow); outline: none; }
button.stat:hover b, button.stat:focus-visible b { color: var(--yellow); }
.stat b {
  font-family: 'Determination Mono', monospace;
  font-size: 16px;
  color: var(--fg);
  font-weight: normal;
  margin-right: 2px;
}
.hero-actions { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.hero-follow {
  height: 44px;
  font-size: 16px;
  padding: 0 24px;
  margin-top: 0;
}
.hero-follow.following { color: #4ad14a; border-color: #4ad14a; }
.hero-follow.following:hover { color: #ff3b3b; border-color: #ff3b3b; }

/* ---- Listas de followers / following ---- */
.modal-open { overflow: hidden; }
.connections-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.82);
}
.connections-card {
  width: min(460px, 100%);
  max-height: min(620px, 82vh);
  display: flex;
  flex-direction: column;
  border: 5px solid var(--fg);
  background: #000;
  box-shadow: 8px 8px 0 rgba(255,255,255,0.13);
}
.connections-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--fg);
}
.connections-head h2 {
  padding: 14px 16px;
  font-family: 'Determination Mono', monospace;
  font-size: 20px;
  font-weight: normal;
  color: var(--yellow);
  -webkit-font-smoothing: none;
}
.connections-close {
  align-self: stretch;
  min-width: 52px;
  border: 0;
  border-left: 4px solid var(--fg);
  background: #000;
  color: var(--fg);
  font-family: 'Determination Mono', monospace;
  font-size: 24px;
  cursor: pointer;
}
.connections-close:hover { color: #ff3b3b; background: rgba(255,59,59,0.08); }
.connections-list { overflow-y: auto; }
.connection-user { color: inherit; text-decoration: none; }
.connection-user img { width: 44px; height: 44px; }
.connection-details { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.connection-details b, .connection-details small, .connections-loading, .connections-empty {
  font-family: 'Determination Mono', monospace;
  font-weight: normal;
  -webkit-font-smoothing: none;
}
.connection-details b { color: var(--fg); font-size: 17px; }
.connection-details small { color: #7a7a7a; font-size: 13px; }
.connection-user:hover .connection-details b { color: var(--yellow); }
.connections-loading, .connections-empty { padding: 24px; text-align: center; color: #7a7a7a; font-size: 15px; }

/* ---- Ajustes de privacidad ---- */
.privacy-settings {
  margin-top: 18px;
  border: 5px solid var(--fg);
  background: #000;
}
.privacy-settings h2 {
  font-family: 'Determination Mono', monospace;
  font-size: 18px;
  font-weight: normal;
  padding: 12px 16px;
  border-bottom: 4px solid var(--fg);
}
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  cursor: pointer;
}
.setting-toggle + .setting-toggle { border-top: 3px solid #1e1e1e; }
.setting-toggle span { display: flex; flex-direction: column; gap: 4px; }
.setting-toggle b, .setting-toggle small, .settings-status {
  font-family: 'Determination Mono', monospace;
  font-weight: normal;
  -webkit-font-smoothing: none;
}
.setting-toggle b { font-size: 16px; }
.setting-toggle small { font-size: 13px; color: #8a8a8a; }
.setting-toggle input { width: 22px; height: 22px; accent-color: var(--yellow); cursor: pointer; }
.settings-status { min-height: 18px; padding: 0 16px 12px; color: var(--yellow); font-size: 13px; }

/* ---- Busqueda global ---- */
.search-panel {
  background: #000;
  border: 5px solid var(--fg);
  padding: 18px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.search-panel:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 18px rgba(255,255,0,0.08);
}
.search-label {
  display: block;
  margin-bottom: 10px;
  font-family: 'Crypt Mix', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--yellow);
  -webkit-font-smoothing: none;
}
.search-input {
  width: 100%;
  font-family: 'Determination Mono', monospace;
  font-size: 22px;
  color: var(--fg);
  background: #111;
  border: 4px solid var(--fg);
  padding: 10px 12px;
  outline: none;
  -webkit-font-smoothing: none;
}
.search-input:focus { border-color: var(--yellow); }
.search-input::placeholder { color: #5a5a5a; }
.search-hint, .search-status {
  font-family: 'Determination Mono', monospace;
  font-size: 13px;
  color: #7a7a7a;
  -webkit-font-smoothing: none;
}
.search-hint { margin-top: 8px; }
.search-users {
  margin-top: 14px;
  border: 4px solid var(--fg);
  background: #000;
}
.search-user { color: inherit; text-decoration: none; }
.search-status { padding: 18px; text-align: center; }

/* ---- Formato de texto y efectos por caracter ---- */
.text-effect-menu {
  position: fixed;
  right: auto;
  top: auto;
  z-index: 100;
  min-width: 210px;
  box-shadow: 6px 6px 0 rgba(255,255,255,0.12);
}
.text-effect-menu .pfp-menu-item:hover {
  color: var(--yellow);
  background: rgba(255,255,0,0.06);
}
.color-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.color-option input[type="color"] {
  width: 42px;
  height: 28px;
  padding: 0;
  border: 3px solid var(--fg);
  background: #000;
  cursor: pointer;
}
.ut-char {
  display: inline-block;
  transition: none !important;
}
.effects-visible .ut-char[data-effect] { will-change: transform; }

/* ---- Paleta pixelada del editor ---- */
.palette-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  cursor: default;
}
.color-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.color-swatch {
  height: 25px;
  padding: 0;
  border: 3px solid var(--fg);
  background: var(--swatch);
  cursor: pointer;
  image-rendering: pixelated;
}
.color-swatch:hover { border-color: var(--yellow); transform: translateY(-1px); }
.custom-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8a8a8a;
  font-size: 12px;
  cursor: pointer;
}
.custom-color i {
  position: relative;
  display: block;
  width: 42px;
  height: 30px;
  border: 3px solid var(--fg);
  background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.custom-color input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ---- Reproductor audiovisual de UNDERNET ---- */
.post-media { margin-top: 12px; }
.preview-media { width: min(100%, 460px); }
.preview-media .attachment-image { max-width: 100%; border: 5px solid var(--fg); display: block; }
.undernet-player {
  width: 100%;
  border: 5px solid var(--fg);
  background: #050505;
  overflow: hidden;
  image-rendering: pixelated;
}
.undernet-player video {
  display: block;
  width: 100%;
  max-height: 430px;
  background: #000;
  object-fit: contain;
  cursor: pointer;
  image-rendering: auto;
}
.player-native-audio { display: none; }
.audio-visual {
  height: 82px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-bottom: 4px solid var(--fg);
  background: repeating-linear-gradient(0deg, #050505 0 7px, #101010 7px 8px);
}
.audio-visual i {
  display: block;
  width: 6px;
  height: 12px;
  background: var(--yellow);
  box-shadow: 0 0 7px rgba(255,255,0,0.22);
}
.audio-visual i:nth-child(3n) { height: 34px; }
.audio-visual i:nth-child(3n + 1) { height: 22px; }
.player-controls {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto minmax(52px, 72px) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: #000;
}
.player-controls button {
  font-family: 'Crypt Mix', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--fg);
  background: #000;
  border: 3px solid var(--fg);
  padding: 7px 9px;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.player-controls button:hover { color: var(--yellow); border-color: var(--yellow); }
.player-time {
  font-family: 'Determination Mono', monospace;
  font-size: 13px;
  color: #aaa;
  white-space: nowrap;
  -webkit-font-smoothing: none;
}
.player-progress, .player-volume {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}
.player-progress { grid-column: 1 / -1; grid-row: 1; }
.player-play { grid-column: 1; grid-row: 2; }
.player-time { grid-column: 2; grid-row: 2; }
.player-mute { grid-column: 4; grid-row: 2; }
.player-volume { grid-column: 5; grid-row: 2; }
.player-full { grid-column: 6; grid-row: 2; }
.player-progress::-webkit-slider-runnable-track,
.player-volume::-webkit-slider-runnable-track { height: 6px; background: #333; border: 2px solid var(--fg); }
.player-progress::-webkit-slider-thumb,
.player-volume::-webkit-slider-thumb { margin-top: -6px; width: 14px; height: 14px; border-radius: 0; background: var(--yellow); }
.player-progress::-moz-range-track,
.player-volume::-moz-range-track { height: 4px; background: #333; border: 2px solid var(--fg); }
.player-progress::-moz-range-thumb,
.player-volume::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 0; background: var(--yellow); }
.media-player-item { grid-column: 1 / -1; }
.media-player-item.video-item { grid-column: span 2; }

/* ---- Rich link embeds (Discord-like, framed as UNDERNET panels) ---- */
.external-link { color: var(--yellow); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.external-link:hover { color: var(--fg); }
.link-embeds { display: grid; gap: 12px; margin-top: 13px; }
.link-embed {
  width: 100%;
  overflow: hidden;
  border: 5px solid var(--fg);
  background: #030303;
  image-rendering: pixelated;
}
.link-embed-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px 7px;
  border-bottom: 4px solid var(--fg);
  background: #000;
  font: 10px 'Crypt Mix', monospace;
  letter-spacing: 1px;
}
.link-embed-head span { min-width: 0; overflow: hidden; color: var(--yellow); text-overflow: ellipsis; white-space: nowrap; }
.link-embed-head a { flex: 0 0 auto; color: var(--fg); text-decoration: none; }
.link-embed-head a:hover { color: var(--yellow); }
.link-embed iframe { display: block; width: 100%; border: 0; background: #080808; }
.link-embed-loading { display: grid; min-height: inherit; place-items: center; background: #080808; color: #666; font: 10px 'Crypt Mix', monospace; letter-spacing: 1px; }
.link-embed-loading.manual { color: var(--yellow); cursor: pointer; }
.link-embed-loading.manual:hover { background: var(--yellow); color: #000; }
.link-embed-wide iframe { aspect-ratio: 16 / 9; min-height: 240px; }
.link-embed-wide .link-embed-loading { aspect-ratio: 16 / 9; min-height: 240px; }
.link-embed-tweet { max-width: 560px; }
.link-embed-tweet iframe { height: 510px; }
.link-embed-tweet .link-embed-loading { height: 510px; }
.link-embed-portrait { max-width: 410px; }
.link-embed-portrait iframe { height: 620px; }
.link-embed-portrait .link-embed-loading { height: 620px; }
.link-embed-audio iframe { height: 160px; }
.link-embed-audio .link-embed-loading { height: 160px; }
.link-embed-image img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #000; image-rendering: auto; }
.link-embed-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px;
  color: var(--fg);
  text-decoration: none;
  background: repeating-linear-gradient(0deg, #030303 0 11px, #0c0c0c 11px 12px);
}
.link-embed-card b { color: var(--yellow); font-size: 19px; font-weight: normal; }
.link-embed-card small { color: #888; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.link-embed-card:hover { background: #111; }
.comment-link-embeds .link-embed-head { font-size: 9px; }

@media (max-width: 620px) {
  .link-embed { border-width: 4px; }
  .link-embed-head { border-bottom-width: 3px; }
  .link-embed-wide iframe, .link-embed-wide .link-embed-loading { min-height: 200px; }
  .link-embed-portrait iframe, .link-embed-tweet iframe, .link-embed-portrait .link-embed-loading, .link-embed-tweet .link-embed-loading { height: 520px; }
}

.undernet-player:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #000;
}
.undernet-player:fullscreen video {
  flex: 1 1 auto;
  width: 100%;
  height: 0;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}
.undernet-player:fullscreen .player-controls {
  flex: 0 0 auto;
  width: 100%;
  border-top: 4px solid var(--fg);
}

@media (max-width: 620px) {
  .composer-tools { flex-wrap: wrap; }
  .player-controls { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .player-volume { display: none; }
  .player-mute { grid-column: 4; }
  .player-full { grid-column: 5; }
  .media-player-item.video-item { grid-column: 1 / -1; }
}

/* ==================================================================
   MOBILE — Home / feed: ergonomia tactil (no afecta al desktop)
   Todo vive dentro de media queries: el layout de PC queda intacto.
   ================================================================== */
@media (max-width: 620px) {
  /* Recuperar ancho: menos padding en la pagina y en las cajas */
  .feed-page { padding: 20px 12px 48px; gap: 16px; }
  .composer { padding: 15px 14px; }
  .post { padding: 16px 14px; gap: 12px; }

  /* Avatares algo mas chicos -> mas aire para el texto */
  .composer-avatar { width: 46px; height: 46px; }
  .post-avatar { width: 42px; height: 42px; }

  /* 24px es enorme en una columna angosta: bajada suave */
  .composer-input, .post-text, .edit-area { font-size: 21px; }
  .post-name { font-size: 22px; }

  /* Areas de toque comodas para pulgar (like / reply / menu) */
  .post-actions { gap: 16px; }
  .act { padding: 7px 3px; min-height: 36px; }
  .act img { width: 16px; height: 16px; }
  .menu-btn { min-height: 36px; min-width: 36px; padding: 6px; }
  .menu-drop button { padding: 14px 18px; }

  /* Herramientas del composer con toque comodo */
  .tool-btn { min-width: 40px; height: 40px; }

  /* El cartel de version no debe colgar fuera del viewport */
  .version-badge-shell { max-width: 92vw; }
}

@media (max-width: 400px) {
  .composer-input, .post-text, .edit-area { font-size: 19px; }
  .post-name { font-size: 20px; }
  .composer { padding: 13px 11px; }
  .post { padding: 14px 11px; gap: 10px; }
  .post-actions { gap: 12px; }
}

/* ==================================================================
   MOBILE — Vista de perfil publico (user.html): hero + tabs
   ================================================================== */
@media (max-width: 620px) {
  /* El boton (EDIT/FOLLOW) baja a una fila propia a todo el ancho */
  .profile-hero { flex-wrap: wrap; gap: 16px; padding: 18px 14px; }
  .hero-pfp { width: 74px; height: 74px; }
  .hero-name { font-size: 22px; }
  .hero-actions { flex-direction: row; width: 100%; }
  .hero-actions .auth-submit { flex: 1; }
  .tab { font-size: 15px; padding: 13px 0; }
}
@media (max-width: 400px) {
  .profile-hero { padding: 15px 12px; }
  .hero-pfp { width: 64px; height: 64px; }
  .media-grid { gap: 6px; }
}

/* ==================================================================
   Account, settings and profile editor — unified UNDERNET shell
   ================================================================== */
.account-shell, .settings-shell, .profile-editor-shell { min-height: 100vh; }

.account-page,
.settings-page,
.profile-editor-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.account-page {
  min-height: calc(100vh - 85px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: center;
  gap: clamp(45px, 8vw, 110px);
  padding: 58px 0 70px;
}

.account-intro {
  position: relative;
  padding: 34px 0 34px 35px;
  border-left: 5px solid var(--fg);
}
.account-intro::before,
.account-intro::after {
  content: "";
  position: absolute;
  left: -5px;
  width: 34px;
  height: 5px;
  background: var(--fg);
}
.account-intro::before { top: 0; }
.account-intro::after { bottom: 0; }
.panel-kicker {
  color: var(--yellow);
  font-family: 'Crypt Mix', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  -webkit-font-smoothing: none;
}
.account-intro h1 {
  margin: 16px 0 20px;
  font-size: clamp(48px, 7vw, 82px);
  font-weight: normal;
  line-height: .86;
  letter-spacing: -2px;
  -webkit-font-smoothing: none;
}
.account-intro h1 span { color: var(--yellow); }
.account-copy {
  max-width: 560px;
  color: #bdbdbd;
  font-size: 20px;
  line-height: 1.4;
}
.account-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.account-points span {
  padding: 7px 10px;
  border: 3px solid #555;
  color: #aaa;
  font-family: 'Crypt Mix', monospace;
  font-size: 10px;
  letter-spacing: 1px;
}
.account-signal { display: flex; align-items: center; gap: 12px; margin-top: 30px; color: #aaa; }
.account-signal i { width: 12px; height: 12px; background: var(--yellow); box-shadow: 0 0 12px rgba(255,255,0,.5); animation: signal-pulse 1.5s steps(2,end) infinite; }
.account-signal span { font-family: 'Crypt Mix', monospace; font-size: 12px; letter-spacing: 2px; }
@keyframes signal-pulse { 50% { opacity: .35; } }

.auth-card-modern {
  position: relative;
  max-width: none;
  padding: 34px;
  gap: 17px;
  background: #000;
  box-shadow: 12px 12px 0 rgba(255,255,255,.12);
}
.auth-card-modern::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 26px;
  width: 62px;
  height: 5px;
  background: var(--yellow);
}
.card-heading { display: flex; align-items: stretch; gap: 15px; margin-bottom: 5px; }
.card-heading > span {
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 48px;
  border: 4px solid var(--yellow);
  color: var(--yellow);
  font-family: 'Crypt Mix', monospace;
  font-size: 13px;
}
.card-heading p { color: #888; font-family: 'Crypt Mix', monospace; font-size: 10px; letter-spacing: 2px; margin-bottom: 4px; }
.card-heading h2 { font-size: 27px; font-weight: normal; line-height: 1; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-card-modern .field input,
.auth-card-modern .field textarea,
.edit-card .field input,
.edit-card .field textarea {
  width: 100%;
  color: var(--fg);
  background: #090909;
  border: 4px solid #777;
  outline: 0;
  font: 16px 'Determination Mono', monospace;
  padding: 11px 13px;
  resize: vertical;
}
.auth-card-modern .field input:focus,
.auth-card-modern .field textarea:focus,
.edit-card .field input:focus,
.edit-card .field textarea:focus {
  border-color: var(--yellow);
  box-shadow: 5px 5px 0 #313100;
}
.auth-card-modern .field input { height: 48px; }
.field-hint { color: #777; font-size: 13px; line-height: 1.15; }
.auth-card-modern .auth-submit { width: 100%; background: var(--fg); color: #000; }
.auth-card-modern .auth-submit:hover { background: var(--yellow); color: #000; }
.auth-card-modern button:disabled { opacity: .5; cursor: wait; }
.auth-alt-inline { flex-direction: row; justify-content: center; gap: 10px; margin-top: 3px; }
.auth-alt-inline span, .auth-alt-inline a { font-size: 11px; }

.settings-page,
.profile-editor-page { padding: 48px 0 74px; }
.settings-page-wide { width: min(1180px, calc(100% - 32px)); max-width: none; padding-bottom: 120px; }
.profile-editor-page { max-width: 1050px; }
.page-heading { max-width: 760px; margin-bottom: 30px; padding-left: 20px; border-left: 5px solid var(--yellow); }
.page-heading h1 { margin: 8px 0 5px; font-size: clamp(38px, 6vw, 62px); font-weight: normal; line-height: .95; }
.page-heading > p:last-child { color: #aaa; font-size: 18px; }

.settings-grid { display: grid; grid-template-columns: .85fr 1.35fr; gap: 20px; align-items: start; }
.settings-grid-full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid-full .settings-card:nth-child(2) { grid-row: auto; }
.settings-card { position: relative; padding: 25px; border: 5px solid var(--fg); background: #000; }
.settings-card:nth-child(2) { grid-row: span 2; }
.settings-section-head { display: flex; align-items: flex-start; gap: 15px; min-height: 65px; }
.settings-number { color: var(--yellow); font-family: 'Crypt Mix', monospace; font-size: 13px; padding-top: 5px; }
.settings-section-head h2 { font-size: 25px; font-weight: normal; }
.settings-section-head p { margin-top: 5px; color: #888; font-size: 15px; line-height: 1.25; }
.settings-action {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 0 15px;
  border: 4px solid var(--fg);
  background: #000;
  color: var(--fg);
  font: 18px 'Determination Mono', monospace;
  text-decoration: none;
  cursor: pointer;
}
.settings-action b { color: var(--yellow); font-size: 27px; font-weight: normal; }
.settings-action:hover { color: #000; border-color: var(--yellow); background: var(--yellow); }
.settings-action:hover b { color: #000; }
.danger-action:hover { color: #fff; background: #c91414; border-color: #ff4545; }
.danger-action:hover b { color: #fff; }

.settings-card.privacy-settings { margin-top: 0; padding: 25px; border: 5px solid var(--fg); }
.settings-card.privacy-settings h2 { padding: 0; border: 0; }
.settings-card .setting-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 18px;
  align-items: center;
  min-height: 88px;
  padding: 18px 0;
  cursor: pointer;
}
.settings-card .setting-toggle + .setting-toggle { border-top: 3px solid #292929; }
.settings-card .setting-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.settings-card .setting-toggle i {
  position: relative;
  width: 54px;
  height: 30px;
  border: 4px solid #777;
  background: #111;
}
.settings-card .setting-toggle i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  background: #777;
  transition: transform .14s steps(4,end), background-color .14s steps(2,end);
}
.settings-card .setting-toggle input:checked + i { border-color: var(--yellow); }
.settings-card .setting-toggle input:checked + i::after { transform: translateX(24px); background: var(--yellow); }
.settings-card .setting-toggle:focus-within i { outline: 3px solid var(--fg); outline-offset: 3px; }
.settings-card .setting-toggle b { color: var(--fg); }
.settings-card .settings-status { min-height: 18px; padding: 0; color: var(--yellow); text-align: right; }
.setting-toggle small, .setting-select small, .setting-text small { display: block; margin-top: 5px; color: #777; font-size: 13px; line-height: 1.15; }
.setting-range, .setting-select, .setting-text { display: grid; gap: 12px; padding: 18px 0; border-top: 3px solid #292929; }
.setting-range > span, .setting-select { grid-template-columns: 1fr auto; align-items: center; }
.setting-range > span { display: grid; }
.setting-range output { color: var(--yellow); text-align: right; }
.setting-range input { width: 100%; accent-color: var(--yellow); }
.setting-select select { min-width: 180px; padding: 10px 34px 10px 12px; border: 3px solid #777; border-radius: 0; background: #080808; color: var(--yellow); font: 12px 'Crypt Mix', monospace; }
.setting-text textarea { width: 100%; padding: 11px; border: 3px solid #777; background: #080808; color: var(--fg); resize: vertical; font: 15px 'Determination Mono', monospace; }
.setting-select select:focus, .setting-text textarea:focus { border-color: var(--yellow); outline: 0; }
.setting-mini-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.settings-card .compact-toggle { min-height: 69px; padding: 12px 0; }
.settings-savebar { position: fixed; left: 50%; bottom: 16px; z-index: 80; width: min(720px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 13px 11px 17px; border: 5px solid var(--fg); background: #000; box-shadow: 8px 8px 0 rgba(255,255,255,.14); transform: translateX(-50%); }
.settings-savebar .settings-status { color: #888; font: 10px 'Crypt Mix', monospace; letter-spacing: 1px; }
.settings-save { min-height: 42px; padding: 0 18px; border: 3px solid var(--fg); background: var(--fg); color: #000; font: 12px 'Crypt Mix', monospace; cursor: pointer; }
.settings-save.dirty, .settings-save:hover { border-color: var(--yellow); background: var(--yellow); }
.settings-save:disabled { opacity: .5; }
.compact-feed .post { padding-top: 12px; padding-bottom: 12px; }
.compact-feed .post-text { margin-top: 4px; line-height: 1.15; }
.compact-feed .comments { margin-top: 6px; }

/* Custom destructive-action dialog */
.delete-overlay { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.84); opacity: 0; transition: opacity .14s ease; }
.delete-overlay.open { opacity: 1; }
.delete-dialog { width: min(470px, 100%); border: 5px solid var(--fg); background: #000; box-shadow: 10px 10px 0 rgba(255,50,50,.25); transform: translateY(-12px); transition: transform .14s ease; }
.delete-overlay.open .delete-dialog { transform: none; }
.delete-dialog-head { padding: 18px 20px; border-bottom: 4px solid #ff3b3b; color: #ff3b3b; }
.delete-dialog-head small { display: block; margin-bottom: 5px; font: 9px 'Crypt Mix', monospace; letter-spacing: 2px; }
.delete-dialog h2 { font-size: 28px; font-weight: normal; }
.delete-dialog p { padding: 20px; color: #aaa; font-size: 17px; line-height: 1.25; }
.delete-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 4px solid var(--fg); }
.delete-dialog-actions button { min-height: 52px; border: 0; background: #000; color: var(--fg); font: 13px 'Crypt Mix', monospace; cursor: pointer; }
.delete-dialog-actions button + button { border-left: 4px solid var(--fg); }
.delete-dialog-cancel:hover { background: var(--yellow); color: #000; }
.delete-dialog-confirm:hover { background: #d51e1e; color: #fff; }

.profile-page.profile-editor-page { gap: 0; }
.profile-editor-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); gap: 20px; align-items: start; }
.profile-editor-grid .profile-card { background: #000; }
.profile-editor-grid .preview-card { position: sticky; top: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 390px; }
.card-index { align-self: stretch; margin: -8px 0 20px; padding-bottom: 12px; border-bottom: 3px solid #292929; color: var(--yellow); font: 11px 'Crypt Mix', monospace; letter-spacing: 2px; text-align: left; }
.profile-editor-grid .pfp-frame { width: 130px; height: 130px; }
.profile-editor-grid .preview-info { align-items: center; width: 100%; margin-top: 10px; }
.profile-editor-grid .preview-about { max-width: 290px; overflow-wrap: anywhere; }
.profile-editor-grid .edit-card { padding: 30px; }
.compact-heading { display: block; padding-bottom: 17px; border-bottom: 3px solid #292929; }
.compact-heading .panel-kicker { margin-bottom: 8px; color: var(--yellow); }
.compact-heading h2 { font-size: 29px; }
.compact-heading .edit-sub { margin-top: 7px; }
.profile-editor-grid .edit-form { margin-top: 22px; }
.profile-editor-grid .auth-submit { width: 100%; background: var(--fg); color: #000; }
.profile-editor-grid .auth-submit:hover { background: var(--yellow); }

@media (max-width: 900px) {
  .account-page { grid-template-columns: 1fr; max-width: 620px; gap: 34px; padding-top: 38px; }
  .account-intro h1 { font-size: clamp(50px, 12vw, 76px); }
  .settings-grid, .settings-grid-full, .profile-editor-grid { grid-template-columns: 1fr; }
  .settings-card:nth-child(2) { grid-row: auto; }
  .profile-editor-grid .preview-card { position: static; }
}
@media (max-width: 620px) {
  .account-shell, .settings-shell, .profile-editor-shell { --logo-h: 30px; overflow-x: hidden; }
  .account-shell .navbar, .settings-shell .navbar, .profile-editor-shell .navbar { gap: 10px; padding: 16px 12px; }
  .account-shell .logo, .settings-shell .logo, .profile-editor-shell .logo { margin-right: 0; }
  .account-shell .back-link, .settings-shell .back-link, .profile-editor-shell .back-link { margin-left: auto; font-size: 0; }
  .account-shell .back-link::after, .settings-shell .back-link::after, .profile-editor-shell .back-link::after { content: "<-"; font-size: 24px; }
  .account-page, .settings-page, .profile-editor-page { width: min(100% - 24px, 560px); }
  .account-page { padding-top: 28px; }
  .account-intro { padding: 24px 0 24px 20px; }
  .account-intro h1 { font-size: clamp(42px, 14vw, 62px); }
  .account-copy { font-size: 17px; }
  .auth-card-modern, .settings-card, .profile-editor-grid .edit-card { padding: 21px; box-shadow: none; }
  .field-grid { grid-template-columns: 1fr; }
  .card-heading h2 { font-size: 23px; }
  .auth-alt-inline { flex-direction: column; }
  .page-heading > p:last-child { font-size: 16px; }
  .profile-editor-grid .preview-card { padding: 22px; }
  .settings-card .setting-toggle { grid-template-columns: 1fr 50px; gap: 10px; }
  .setting-mini-grid { grid-template-columns: 1fr; }
  .setting-select { grid-template-columns: 1fr; }
  .setting-select select { width: 100%; }
  .settings-savebar { bottom: 8px; }
}
