/* Member auth — news_tgn_0003 (cream / dark-red) */
body.n1-login-open {
  overflow: hidden;
}

.n1-login-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.n1-login-modal.is-open {
  display: flex;
}

.n1-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.n1-login-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(92vh, 40rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem 1.35rem 1.6rem;
  color: #0f172a;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  animation: n1-modal-in 0.22s ease-out;
}

@keyframes n1-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .n1-login-modal__panel {
    animation: none;
  }
}

.n1-auth-panel {
  display: none;
}

.n1-auth-panel.active {
  display: block;
}

.n1-auth-tab.active {
  color: #8b0000;
  border-bottom-color: #8b0000;
}

.n1-auth-alert {
  display: none;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.n1-auth-alert.show {
  display: block;
}

.n1-auth-alert.error {
  background: #fdf2f2;
  color: #6b0000;
  border: 1px solid #e8b4b4;
}

.n1-auth-alert.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.n1-form-group .n1-form-error {
  display: none;
  color: #8b0000;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.n1-form-group.has-error .n1-form-error {
  display: block;
}

.n1-form-group.has-error .n1-form-input {
  border-color: #ef4444;
}

.n1-btn-auth.loading {
  opacity: 0.7;
  pointer-events: none;
}

.n1-btn-auth.loading .n1-btn-auth-text::after {
  content: '…';
}

.n1-nav-user {
  gap: 0.625rem;
}

.n1-nav-user-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 10.5rem;
  min-width: 0;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.n1-nav-user-profile:hover {
  background: rgba(15, 23, 42, 0.06);
}

.n1-nav-user-profile:hover .n1-nav-user-name {
  color: #8b0000;
}

.n1-nav-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.n1-nav-user-divider {
  width: 1px;
  height: 1rem;
  background: #e2e8f0;
  flex-shrink: 0;
}

.n1-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.n1-nav-logout i {
  font-size: 0.7rem;
  opacity: 0.9;
}

.n1-nav-logout:hover {
  color: #8b0000;
  background: #fdf2f2;
  border-color: #e8b4b4;
}

.n1-nav-user--mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0.125rem;
}

.n1-nav-user--mobile .n1-nav-user-profile {
  flex: 1;
  min-width: 0;
  max-width: none;
  padding: 0.375rem 0.625rem 0.375rem 0.25rem;
}

.n1-nav-logout--mobile {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.n1-nav-logout--mobile:hover {
  color: #fff;
  background: #8b0000;
  border-color: #8b0000;
}

.n1-nav-avatar {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
}

.n1-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n1-profile-panel {
  display: none;
}

.n1-profile-panel.active {
  display: block;
}

.n1-profile-nav-item.active {
  color: #8b0000;
  border-bottom-color: #8b0000;
}

.n1-avatar-preview {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}

.n1-avatar-preview--header {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
  border-width: 1.5px;
}

@media (min-width: 640px) {
  .n1-avatar-preview--header {
    width: 5rem;
    height: 5rem;
    font-size: 1.5rem;
    border-width: 2px;
  }
}

.n1-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n1-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 110;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: 90vw;
}

.n1-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.n1-toast.success {
  background: #166534;
  color: #dcfce7;
}

.n1-toast.error {
  background: #991b1b;
  color: #fee2e2;
}

/* Profile lists */
.n1-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.n1-loading[hidden],
.n1-empty-state[hidden],
.n1-btn-load-more[hidden] {
  display: none !important;
}

.n1-loading-spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid #e8b4b4;
  border-top-color: #8b0000;
  border-radius: 9999px;
  animation: n1-spin 0.7s linear infinite;
}

@keyframes n1-spin {
  to { transform: rotate(360deg); }
}

.n1-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
  padding: 1.5rem 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(139, 0, 0, 0.06), transparent 65%),
    #f8fafc;
}

.n1-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: #fdf2f2;
  border: 1px solid #e8b4b4;
  color: #8b0000;
  font-size: 1.125rem;
}

.n1-empty-state__title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.n1-empty-state__desc {
  margin: 0.375rem 0 0;
  max-width: 22rem;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.n1-empty-state__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.75rem;
  background: #8b0000;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.n1-empty-state__cta:hover {
  background: #6b0000;
}

.n1-empty-state__cta i {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.n1-empty-state__cta:hover i {
  transform: translateX(2px);
}

@media (min-width: 640px) {
  .n1-empty-state {
    padding: 2.75rem 2rem;
  }

  .n1-empty-state__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }

  .n1-empty-state__title {
    font-size: 1.25rem;
  }

  .n1-empty-state__desc {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.55;
  }

  .n1-empty-state__cta {
    margin-top: 1.25rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

.n1-article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .n1-article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .n1-article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.n1-article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.n1-article-card:hover {
  border-color: #e8b4b4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.n1-article-card__thumb {
  display: block;
  height: 8.5rem;
  overflow: hidden;
  background: #e2e8f0;
}

.n1-article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.n1-article-card:hover .n1-article-card__thumb img {
  transform: scale(1.03);
}

.n1-article-card__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 1.5rem;
}

.n1-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.875rem 1rem 1rem;
  min-width: 0;
  flex: 1;
}

.n1-article-card__cat {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b0000;
  background: #fdf2f2;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.n1-article-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
}

.n1-article-card__title a {
  color: #0f172a;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.n1-article-card__title a:hover {
  color: #8b0000;
}

.n1-article-card__meta {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.n1-btn-remove {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.25rem 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.n1-btn-remove:hover {
  color: #8b0000;
}

.n1-btn-load-more {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.n1-btn-load-more:hover {
  border-color: #e8b4b4;
  color: #8b0000;
  background: #fdf2f2;
}

.n1-btn-load-more.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.n1-btn-load-more:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  filter: none;
}

.n1-btn-load-more.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: profile-load-more-spin 0.7s linear infinite;
}

@keyframes profile-load-more-spin {
  to { transform: rotate(360deg); }
}


/* Confirm dialog */
.n1-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.n1-confirm-overlay.show {
  display: flex;
}

.n1-confirm-modal {
  width: 100%;
  max-width: 22rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.n1-confirm-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.n1-confirm-desc {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.n1-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
}

.n1-confirm-cancel,
.n1-confirm-ok {
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.n1-confirm-cancel {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}

.n1-confirm-cancel:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

.n1-confirm-ok {
  border: none;
  background: #8b0000;
  color: #fff;
}

.n1-confirm-ok:hover {
  background: #6b0000;
}

/* Detail favorite button */
.detail-favorite-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.detail-favorite-btn__icon,
.detail-favorite-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.detail-favorite-btn:not(.is-active) .detail-favorite-btn__icon,
.detail-favorite-btn:not(.is-active) svg {
  fill: none;
}

.detail-favorite-btn.is-active {
  color: #8b0000;
  border-color: #e8b4b4;
  background: #fdf2f2;
}

.detail-favorite-btn.is-active .detail-favorite-btn__icon,
.detail-favorite-btn.is-active svg {
  fill: currentColor;
  stroke: currentColor;
}

.detail-favorite-btn__spinner {
  display: none;
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: detail-fav-spin 0.7s linear infinite;
}

.detail-favorite-btn.is-toggling {
  color: #8b0000;
  border-color: #e8b4b4;
  background: #fdf2f2;
  cursor: wait;
  pointer-events: none;
  animation: detail-fav-pulse 1.2s ease-in-out infinite;
}

.detail-favorite-btn.is-toggling .detail-favorite-btn__icon {
  display: none;
}

.detail-favorite-btn.is-toggling .detail-favorite-btn__spinner {
  display: inline-block;
}

@keyframes detail-fav-spin {
  to { transform: rotate(360deg); }
}

@keyframes detail-fav-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0); }
  50% { box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.18); }
}

.detail-favorite-btn:hover {
  border-color: #e8b4b4;
  color: #8b0000;
  background: #fdf2f2;
}

.detail-favorite-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  z-index: 30000;
  max-width: min(92vw, 22.5rem);
  padding: 0.75rem 1.125rem;
  border-radius: 0.625rem;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.detail-favorite-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .detail-favorite-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .detail-favorite-btn {
    padding: 0;
    width: 2.5rem;
  }
}

/* ===== Auth form visuals — cream / dark-red (matches site) ===== */
.n1-auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(var(--site-header-h, 120px) - 56px);
  padding: 3rem 1rem;
  min-height: 60vh;
  box-sizing: border-box;
}

.n1-auth-card {
  width: 100%;
  max-width: 26rem;
  padding: 1.6rem 1.75rem 1.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  box-sizing: border-box;
}

.n1-auth-card--modal {
  max-width: none;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.n1-auth-card .n1-auth-eyebrow {
  margin: 0 0 0.35rem;
  color: #8b0000;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.n1-auth-card h1,
.n1-auth-card h2,
.n1-auth-card .n1-auth-title {
  margin: 0 2rem 1.15rem 0;
  color: #0f172a;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.n1-auth-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.15rem;
}

.n1-auth-tab {
  flex: 1;
  padding: 0.55rem 0.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.n1-auth-tab:hover { color: #0f172a; }

.n1-form-group { margin-bottom: 1rem; }

.n1-form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.n1-form-input-wrap {
  position: relative;
}

.n1-form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.n1-form-input::placeholder {
  color: #94a3b8;
}

.n1-form-input.has-toggle { padding-right: 2.5rem; }

.n1-form-input:focus {
  outline: none;
  border-color: #8b0000;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.12);
}

.n1-form-group.has-error .n1-form-input {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.n1-pwd-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.n1-pwd-toggle:hover { color: #8b0000; }

.n1-btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: #8b0000;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.n1-btn-auth:hover { background: #6b0000; }

.n1-btn-auth:active { transform: translateY(1px); }

.n1-login-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.n1-login-modal__close:hover {
  color: #8b0000;
  border-color: #e8b4b4;
  background: #fdf2f2;
}

.n1-social-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.n1-social-row::before,
.n1-social-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.n1-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.n1-social-btn {
  padding: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.n1-social-btn:hover {
  color: #8b0000;
  border-color: #e8b4b4;
  background: #fdf2f2;
}

@media (max-width: 480px) {
  .n1-login-modal {
    align-items: flex-end;
    padding: 0;
  }

  .n1-login-modal__panel {
    max-width: none;
    max-height: min(92vh, 100%);
    border-radius: 1rem 1rem 0 0;
    padding: 1.35rem 1.15rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
    animation: n1-modal-sheet-in 0.24s ease-out;
  }

  @keyframes n1-modal-sheet-in {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .n1-auth-card h1,
  .n1-auth-card h2,
  .n1-auth-card .n1-auth-title {
    font-size: 1.25rem;
  }
}

/* Light-theme friendly nav member UI */
.n1-nav-user {
  display: none;
  align-items: center;
}

.n1-nav-signin {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}

.n1-nav-signin:hover { opacity: 1; }

/* Top bar keeps auth on all viewports; drawer also has mobile auth. */
@media (min-width: 1025px) {
  #loginBtnMob,
  #userInfoMob {
    display: none !important;
  }
}

/* ===== Profile page — cream / dark-red (matches site) ===== */
.n1-profile-page {
  max-width: 64rem;
  /* body already has padding-top: 56px; only add the remainder of fixed header */
  margin: calc(var(--site-header-h, 120px) - 56px) auto 0;
  padding: 1.5rem 1rem 3rem;
  box-sizing: border-box;
}

.n1-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

.n1-profile-header__meta {
  min-width: 0;
  flex: 1;
}

.n1-profile-header .n1-auth-eyebrow {
  margin: 0 0 0.2rem;
  color: #8b0000;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.n1-profile-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.n1-profile-header p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.n1-profile-stats {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
  text-align: center;
}

.n1-profile-stats > div {
  min-width: 4.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.n1-profile-stats strong {
  display: block;
  color: #0f172a;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
}

.n1-profile-stats span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.n1-profile-nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.n1-profile-nav-item {
  flex-shrink: 0;
  padding: 0.65rem 0.85rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.n1-profile-nav-item:hover {
  color: #0f172a;
}

.n1-profile-panel {
  display: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.35rem 1.5rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.n1-profile-panel.active {
  display: block;
}

.n1-profile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.n1-profile-panel__head h2,
.n1-profile-panel > h2 {
  margin: 0 0 1rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.n1-profile-panel__head h2 {
  margin: 0;
}

.n1-profile-panel__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.n1-profile-text-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.n1-profile-text-btn:hover {
  color: #0f172a;
}

.n1-profile-text-btn--danger {
  display: block;
  margin-top: 0.5rem;
  color: #8b0000;
}

.n1-profile-text-btn--danger:hover {
  color: #6b0000;
}

.n1-profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.n1-profile-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.n1-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.n1-btn-secondary:hover {
  color: #8b0000;
  border-color: #e8b4b4;
  background: #fdf2f2;
}

.n1-btn-secondary--file {
  cursor: pointer;
}

.n1-profile-panel .n1-form-group {
  margin-bottom: 1rem;
}

.n1-profile-panel .n1-form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.n1-profile-panel .n1-form-input,
.n1-profile-panel input[type="text"],
.n1-profile-panel input[type="email"],
.n1-profile-panel input[type="password"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.n1-profile-panel .n1-form-input:focus,
.n1-profile-panel input[type="text"]:focus,
.n1-profile-panel input[type="email"]:focus,
.n1-profile-panel input[type="password"]:focus {
  outline: none;
  border-color: #8b0000;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.12);
}

.n1-profile-panel .n1-form-input:disabled,
.n1-profile-panel input:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.n1-profile-panel button[type="submit"],
.n1-profile-panel .n1-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.7rem 1.35rem;
  border: none;
  border-radius: 0.75rem;
  background: #8b0000;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.n1-profile-panel .n1-btn-primary:hover,
.n1-profile-panel button[type="submit"]:hover {
  background: #6b0000;
}

.n1-profile-panel .n1-btn-primary:active,
.n1-profile-panel button[type="submit"]:active {
  transform: translateY(1px);
}

@media (max-width: 640px) {
  .n1-profile-header {
    flex-wrap: wrap;
    padding: 1.15rem 1.15rem;
  }

  .n1-profile-stats {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .n1-profile-stats > div {
    flex: 1;
  }

  .n1-profile-panel {
    padding: 1.15rem;
  }
}


.n1-confirm-ok {
  position: relative;
}

.n1-confirm-ok:disabled,
.n1-confirm-cancel:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.n1-confirm-ok.is-loading {
  color: transparent;
  pointer-events: none;
}

.n1-confirm-ok.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: n1-confirm-spin 0.7s linear infinite;
}

@keyframes n1-confirm-spin {
  to { transform: rotate(360deg); }
}
