/* NocniManga (cz_portal) - Layout E: Tabbed Media Hub Stylesheet (Berry Violet) */

:root {
  --brand-50: #f5f3ff;
  --brand-600: #7c3aed;
  --brand-700: #6d28d9;
  --neutral-50: #f7f6fb;
  --neutral-100: #ffffff;
  --neutral-600: #524b69;
  --neutral-900: #1b1530;
  --line-200: #e2dcf2;
  --rad-2: 12px;
  --font-head: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Work Sans', system-ui, -apple-system, sans-serif;
  --shadow-1: 0 2px 10px rgba(27, 21, 48, 0.05);
  --shadow-2: 0 10px 26px rgba(109, 40, 217, 0.12);
  --target-size: 24px;
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  scroll-padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

body.nm_page {
  margin: 0;
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.58;
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  min-block-size: 100dvh;
}

img,
video {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

:where(a, code) {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--neutral-900);
  line-height: 1.24;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-top: 0;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

a:hover {
  color: var(--brand-700);
}

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

:where(button, select, textarea, input:not([type="checkbox"], [type="radio"]), [role="button"], nav a, label:has(input[type="checkbox"], input[type="radio"])) {
  min-block-size: var(--target-size);
  min-inline-size: var(--target-size);
}

.hidden {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Native Dialog & Age Gate Containment */
dialog:not([open]),
dialog#age-verify-modal:not([open]) {
  display: none !important;
}

dialog:modal,
dialog#age-verify-modal:modal {
  overscroll-behavior: contain;
}

dialog::backdrop,
dialog#age-verify-modal::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(27, 21, 48, 0.72);
  backdrop-filter: blur(5px);
}

/* Shared Primitives */
.nm_icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.nm_icon_sm {
  width: 0.98rem;
  height: 0.98rem;
}

.nm_shell {
  width: min(1320px, calc(100% - 2rem));
  margin-inline: auto;
}

.nm_main {
  flex: 1 0 auto;
  padding-block: 1.45rem 3.2rem;
}

.nm_section_title {
  font-size: 1.2rem;
  margin: 0 0 0.85rem;
}

.nm_muted_text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--neutral-600);
}

/* Buttons (Soft Pill-Elevated Violet Style) */
.nm_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 2.65rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nm_btn:active:not(:disabled) {
  transform: translateY(1px);
}

.nm_btn:disabled,
.nm_btn.is_disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

.nm_btn_primary {
  background-color: var(--brand-600);
  color: #ffffff;
  border-color: var(--brand-600);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.22);
}

.nm_btn_primary:hover {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.28);
}

.nm_btn_outline {
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  border-color: var(--line-200);
}

.nm_btn_outline:hover {
  background-color: var(--brand-50);
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.nm_btn_soft {
  background-color: var(--brand-50);
  color: var(--brand-700);
  border-color: #ddd6fe;
}

.nm_btn_soft:hover {
  background-color: #ede9fe;
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.nm_btn_soft.is_favorited {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_btn_danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.nm_btn_danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.nm_btn_sm {
  min-block-size: 2.35rem;
  padding: 0.42rem 0.92rem;
  font-size: 0.83rem;
}

.nm_btn_lg {
  min-block-size: 2.95rem;
  font-size: 0.94rem;
}

.nm_btn_full {
  width: 100%;
}

/* Header: Twilight Violet Accent Top Bar + Pinned Scrollable Category Pill Strip */
.nm_header {
  background-color: var(--neutral-100);
  border-bottom: 1px solid var(--line-200);
  box-shadow: 0 4px 18px rgba(27, 21, 48, 0.05);
  position: sticky;
  top: 0;
  z-index: 60;
}

.nm_topbar {
  border-top: 4px solid var(--brand-600);
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.06) 0%, rgba(255, 255, 255, 1) 38%, rgba(245, 243, 255, 0.55) 100%);
  border-bottom: 1px solid var(--line-200);
}

.nm_topbar_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.78rem;
}

.nm_brand_wrap {
  flex: 0 0 auto;
}

.nm_brand_link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--neutral-900);
}

.nm_brand_mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #ffffff;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  flex-shrink: 0;
}

.nm_brand_text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nm_brand_name {
  font-family: var(--font-head);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.nm_brand_sub {
  font-size: 0.72rem;
  color: var(--neutral-600);
  font-weight: 500;
}

.nm_search_wrap {
  flex: 1 1 420px;
  max-width: 560px;
}

.nm_search_form {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.nm_search_field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-inline: 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  box-shadow: inset 0 1px 2px rgba(27, 21, 48, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nm_search_field:focus-within {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.nm_search_ico {
  color: var(--brand-600);
}

.nm_search_input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.nm_search_submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--brand-600);
  background-color: var(--brand-600);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.nm_search_submit:hover {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
}

.nm_auth_bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.nm_logout_form {
  margin: 0;
}

.nm_menu_btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  cursor: pointer;
}

/* Scrollable Category Tab Strip Pinned Beneath Header */
.nm_catbar {
  background-color: var(--brand-50);
}

.nm_catbar_inner {
  padding-block: 0.52rem;
}

.nm_catbar_track {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nm_catbar_track::-webkit-scrollbar {
  display: none;
}

.nm_cat_tab {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background-color: transparent;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--neutral-600);
  white-space: nowrap;
  flex-shrink: 0;
}

.nm_cat_tab:hover {
  background-color: var(--neutral-100);
  color: var(--brand-700);
  border-color: var(--line-200);
}

.nm_cat_tab.is_active {
  background-color: var(--brand-600);
  color: #ffffff;
  border-color: var(--brand-600);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.24);
}

.nm_cat_tab_dir {
  color: var(--neutral-600);
}

.nm_catbar_sep {
  width: 1px;
  height: 1.2rem;
  background-color: #d5ccf0;
  margin-inline: 0.25rem;
  flex-shrink: 0;
}

/* Mobile Drawer */
.nm_drawer {
  display: none;
  background-color: var(--neutral-100);
  border-top: 1px solid var(--line-200);
  padding-block: 1rem 1.25rem;
}

.nm_drawer.is_open,
.nm_drawer.open {
  display: block;
}

.nm_drawer_inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nm_drawer_group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nm_drawer_label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-700);
}

.nm_drawer_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.nm_drawer_link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 0.85rem;
  font-weight: 600;
}

.nm_drawer_link.is_active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_drawer_auth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line-200);
}

.nm_drawer_logout {
  margin: 0;
}

@media (max-width: 768px) {
  .nm_topbar_inner {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-block: 0.65rem;
  }

  .nm_brand_wrap {
    order: 1;
  }

  .nm_brand_sub {
    display: none;
  }

  .nm_auth_bar {
    order: 2;
    margin-left: auto;
  }

  .nm_hide_mobile_reg {
    display: none;
  }

  .nm_menu_btn {
    display: inline-flex;
  }

  .nm_search_wrap {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .nm_search_input {
    font-size: 1rem;
  }
}

/* Breadcrumb */
.nm_crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.83rem;
  color: var(--neutral-600);
}

.nm_crumb a {
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_crumb a:hover {
  color: var(--brand-600);
}

.nm_crumb_work {
  max-width: 34ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm_crumb_current {
  color: var(--neutral-900);
  font-weight: 600;
}

/* Home Announcement Banner (Twilight Violet Elevation) */
.nm_banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--rad-2);
  border: 1px solid #d8ccfb;
  background: linear-gradient(125deg, #f5f3ff 0%, #ffffff 55%, #ede9fe 100%);
  box-shadow: var(--shadow-1);
}

.nm_banner_copy {
  flex: 1 1 420px;
}

.nm_banner_top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.nm_pill_badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background-color: var(--brand-600);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.nm_banner_total {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-700);
}

.nm_banner_title {
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  margin: 0 0 0.3rem;
}

.nm_banner_desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--neutral-600);
  max-width: 72ch;
}

.nm_banner_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Section Headers & Elevated Work Grid */
.nm_band {
  margin-bottom: 1.5rem;
}

.nm_band_cont {
  margin-top: 1.5rem;
}

.nm_band_head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.nm_band_title {
  font-size: 1.25rem;
  margin: 0;
}

.nm_band_sub {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--neutral-600);
}

.nm_band_more {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-600);
}

.nm_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

@media (max-width: 1080px) {
  .nm_grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nm_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
}

.nm_card {
  display: flex;
  flex-direction: column;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nm_card:hover {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
}

.nm_card_cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background-color: var(--brand-50);
  overflow: hidden;
}

.nm_card_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.nm_card:hover .nm_card_img {
  transform: scale(1.04);
}

.nm_card_cat_badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(27, 21, 48, 0.82);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
}

.nm_card_pages {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background-color: rgba(124, 58, 237, 0.92);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
}

.nm_card_body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.78rem 0.88rem 0.86rem;
  flex: 1 1 auto;
}

.nm_card_title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nm_card_title a {
  color: var(--neutral-900);
}

.nm_card_title a:hover {
  color: var(--brand-600);
}

.nm_card_meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--neutral-600);
  padding-top: 0.4rem;
  border-top: 1px solid var(--brand-50);
}

.nm_card_stats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nm_card_score {
  color: var(--brand-700);
  font-weight: 700;
}

/* Mid-Stream 24h Hot Ranking Band (Twilight Violet Showcase) */
.nm_mid_hot {
  margin-block: 1.65rem;
  padding: 1.35rem;
  border-radius: var(--rad-2);
  border: 1px solid #d8ccfb;
  background: linear-gradient(160deg, #ede9fe 0%, #f5f3ff 52%, #ffffff 100%);
  box-shadow: var(--shadow-1);
}

.nm_mid_hot_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.05rem;
}

.nm_mid_hot_title_wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nm_hot_dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.nm_mid_hot_title {
  font-size: 1.2rem;
  margin: 0;
}

.nm_hot_strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 1020px) {
  .nm_hot_strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .nm_hot_strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_hot_card {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.65rem;
  border-radius: var(--rad-2);
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  box-shadow: var(--shadow-1);
}

.nm_hot_card:hover {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-2);
}

.nm_hot_rank {
  font-family: var(--font-head);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--neutral-600);
  min-width: 2.05rem;
  text-align: center;
  flex-shrink: 0;
}

.nm_hot_rank.is_top {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  border-radius: 8px;
  padding: 0.2rem 0.28rem;
}

.nm_hot_thumb {
  width: 3.2rem;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--brand-50);
}

.nm_hot_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm_hot_info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
}

.nm_hot_name {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nm_hot_meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--neutral-600);
}

.nm_hot_cat {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm_hot_views {
  font-weight: 700;
  color: var(--brand-700);
  flex-shrink: 0;
}

/* Home Bottom CTA */
.nm_cta {
  margin-top: 1.8rem;
  padding: 1.45rem 1.6rem;
  border-radius: var(--rad-2);
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
}

.nm_cta_title {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

.nm_cta_desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

@media (max-width: 640px) {
  .nm_cta {
    flex-direction: column;
    align-items: stretch;
  }

  .nm_cta_btn {
    align-self: center;
  }
}

/* Detail Page: 3-Column Dashboard (.nm_trio) */
.nm_trio {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 265px;
  gap: 1.3rem;
  align-items: start;
  margin-bottom: 1.3rem;
}

@media (max-width: 1080px) {
  .nm_trio {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .nm_trio_panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .nm_trio {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_trio_cover,
.nm_trio_meta,
.nm_trio_panel {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.2rem;
  box-shadow: var(--shadow-1);
}

.nm_cover_frame {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-200);
  background-color: var(--brand-50);
}

.nm_cover_frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.nm_cover_pages {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(27, 21, 48, 0.86);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
}

.nm_cover_foot {
  margin-top: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_work_title {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  margin: 0 0 0.35rem;
}

.nm_work_alt {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_badge_row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 0.95rem;
}

.nm_chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.66rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-600);
  font-size: 0.78rem;
  font-weight: 600;
}

.nm_chip_brand {
  background-color: var(--brand-50);
  border-color: #d8ccfb;
  color: var(--brand-700);
}

.nm_meta_grid {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem 1rem;
}

@media (max-width: 520px) {
  .nm_meta_grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_meta_row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.44rem;
  border-bottom: 1px solid var(--brand-50);
}

.nm_meta_row dt {
  font-size: 0.8rem;
  color: var(--neutral-600);
  font-weight: 500;
}

.nm_meta_row dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-900);
  text-align: right;
}

.nm_rating_box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--brand-50);
}

.nm_rating_summary {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.nm_rating_label {
  font-size: 0.76rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_rating_avg {
  font-size: 0.9rem;
  color: var(--neutral-900);
}

.nm_rating_controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.nm_stars {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.nm_star_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cec5e4;
  cursor: pointer;
}

.nm_star_btn.is_filled,
.nm_star_btn:hover {
  color: var(--brand-600);
}

.nm_rating_mine {
  font-size: 0.8rem;
  color: var(--neutral-600);
}

.nm_rating_mine strong {
  color: var(--brand-700);
}

.nm_trio_panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nm_panel_pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.nm_panel_divider {
  height: 1px;
  background-color: var(--line-200);
  margin-block: 0.25rem;
}

.nm_panel_utils {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nm_util_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.4rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-600);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.nm_util_btn:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
  background-color: var(--brand-50);
}

/* Standalone Tag Aggregation Card */
.nm_tags_card {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.25rem;
  box-shadow: var(--shadow-1);
  margin-bottom: 1.3rem;
}

.nm_tags_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.nm_tags_head .nm_section_title {
  margin: 0;
}

.nm_tags_toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.nm_tags_matrix {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 220px;
  overflow: hidden;
}

.nm_tags_matrix.is_expanded,
.nm_tags_matrix.expanded {
  max-height: none;
}

.nm_tags_row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
}

@media (max-width: 560px) {
  .nm_tags_row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
}

.nm_tags_type {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neutral-600);
}

.nm_tags_list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.nm_tag_chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.35;
}

.nm_tag_chip.is_selected,
.nm_tag_chip.selected {
  outline: 2px solid var(--brand-600);
  outline-offset: 1px;
}

.nm_tags_bar {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-200);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nm_tags_selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 220px;
}

.nm_tags_sel_pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background-color: var(--brand-50);
  border: 1px solid var(--brand-600);
  color: var(--brand-700);
  font-size: 0.78rem;
  font-weight: 600;
}

.nm_tags_sel_remove {
  border: 0;
  background: transparent;
  color: var(--brand-700);
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.15rem;
}

/* Detail Thumbnail Pager & Sprite Grid */
.nm_preview_section {
  margin-block: 1.4rem;
}

.nm_pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  box-shadow: var(--shadow-1);
  margin-bottom: 1.05rem;
}

.nm_pager_links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.nm_pager_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.72rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 0.83rem;
  font-weight: 600;
}

.nm_pager_btn.is_active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_pager_btn.is_disabled {
  opacity: 0.42;
  pointer-events: none;
}

.nm_pager_jump {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nm_pager_jump_label {
  font-size: 0.82rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_pager_input {
  width: 4.1rem;
  min-height: 2.35rem;
  padding: 0.3rem 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: center;
}

.nm_pager_total {
  display: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-600);
}

.nm_pager_info {
  font-size: 0.81rem;
  color: var(--neutral-600);
}

@media (max-width: 640px) {
  .nm_pager {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.3rem;
    padding: 0.62rem 0.72rem;
  }

  .nm_pager_links {
    display: contents;
  }

  .nm_pager_first { order: 1; }
  .nm_pager_prev { order: 2; margin-right: auto; }
  .nm_pager_jump { order: 3; gap: 0.25rem; }
  .nm_pager_next { order: 4; margin-left: auto; }
  .nm_pager_last { order: 5; }

  .nm_pager_label,
  .nm_pager_num,
  .nm_pager_info,
  .nm_pager_jump_label,
  #jump-page-btn,
  .nm_pager_jump_btn {
    display: none !important;
  }

  .nm_pager_total {
    display: inline;
    white-space: nowrap;
  }

  .nm_pager_nav {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
    overflow: hidden;
  }

  .nm_pager_input {
    width: 3.4rem;
    font-size: 1rem;
  }
}

@media (max-width: 374px) {
  .nm_pager_nav {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    min-height: 2rem;
  }
}

.nm_thumbs {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.2rem;
  box-shadow: var(--shadow-1);
}

.nm_thumbs_grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.comic-thumbnail {
  width: 200px;
  height: 292px;
  position: relative;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--brand-50);
  background-repeat: no-repeat;
  overflow: hidden;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.comic-thumbnail:hover {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.nm_thumb_num {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.15rem 0.52rem;
  border-radius: 999px;
  background-color: rgba(27, 21, 48, 0.86);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  .nm_thumbs {
    padding: 0.8rem 0.5rem;
  }

  .comic-thumbnail {
    zoom: 0.76;
  }
}

/* Horizontal Related Strip & Comments */
.nm_related,
.nm_comments {
  margin-top: 1.5rem;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.3rem;
  box-shadow: var(--shadow-1);
}

.nm_related_strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(154px, 170px);
  gap: 0.95rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.nm_related_card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--neutral-900);
}

.nm_related_cover {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-200);
  background-color: var(--brand-50);
}

.nm_related_cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm_related_name {
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nm_comments_form {
  margin-bottom: 1.15rem;
}

.nm_comments_textarea {
  min-height: 6rem;
  resize: vertical;
  margin-bottom: 0.6rem;
}

.nm_guest_hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: var(--neutral-600);
}

.nm_comments_submit {
  display: flex;
  justify-content: flex-end;
}

.nm_comments_list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.nm_comment_item {
  padding: 0.95rem 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
}

.nm_comment_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.nm_comment_author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nm_comment_avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86rem;
}

.nm_comment_name {
  display: block;
  font-size: 0.88rem;
}

.nm_comment_date {
  font-size: 0.76rem;
  color: var(--neutral-600);
}

.nm_comment_body {
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.nm_remove_btn {
  border: 1px solid #fecaca;
  background-color: #fef2f2;
  color: #b91c1c;
  border-radius: 999px;
  padding: 0.25rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.nm_remove_btn:hover {
  background-color: #dc2626;
  color: #ffffff;
}

/* Reader: Symmetrical Bordered Reading Panels */
.nm_reader_panel {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow-1);
  margin-bottom: 1rem;
}

.nm_reader_panel_bottom {
  margin-top: 1rem;
  margin-bottom: 0;
}

.nm_reader_head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.nm_reader_heading {
  min-width: 0;
  flex: 1 1 280px;
}

.nm_reader_title {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 0 0 0.2rem;
}

.nm_reader_meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.nm_reader_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nm_reader_progress {
  height: 5px;
  border-radius: 999px;
  background-color: var(--brand-50);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.nm_reader_progress_fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
  border-radius: 999px;
}

.nm_reader_nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.nm_reader_prev,
.nm_reader_next {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nm_reader_center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.nm_reader_jump_label {
  font-size: 0.82rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_reader_select {
  min-height: 2.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
}

.nm_reader_counter {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.nm_rbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.nm_rbtn:hover:not(.is_disabled) {
  border-color: var(--brand-600);
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.nm_rbtn_primary {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_rbtn_primary:hover:not(.is_disabled) {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
  color: #ffffff;
}

.nm_rbtn.is_disabled {
  opacity: 0.42;
  pointer-events: none;
}

.nm_reader_stage {
  display: flex;
  justify-content: center;
  padding: 0.9rem;
  border-radius: var(--rad-2);
  border: 1px solid #2e244d;
  background-color: #151026;
}

.nm_reader_canvas {
  display: inline-block;
  max-width: 100%;
}

.nm_reader_img {
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 6px;
}

.nm_reader_quickbar {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-200);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .nm_reader_tip,
  .nm_reader_jump_label {
    display: none;
  }

  .nm_reader_actions {
    width: 100%;
  }

  .nm_reader_action_btn {
    flex: 1 1 auto;
    min-height: 2.5rem;
    white-space: nowrap;
  }

  .nm_reader_nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "center center"
      "prev next";
    gap: 0.6rem 0.4rem !important;
  }

  .nm_reader_center {
    grid-area: center;
    width: 100%;
  }

  .nm_reader_select {
    width: 100%;
    font-size: 1rem;
  }

  .nm_reader_prev {
    grid-area: prev;
  }

  .nm_reader_next {
    grid-area: next;
  }

  .nm_rbtn_edge .nm_rbtn_label {
    display: none;
  }

  .nm_rbtn_edge {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    flex-shrink: 0;
  }

  .nm_reader_prev .nm_rbtn:not(.nm_rbtn_edge),
  .nm_reader_next .nm_rbtn:not(.nm_rbtn_edge) {
    flex: 1 1 auto;
    min-height: 2.75rem;
    padding-inline: 0.55rem;
    white-space: nowrap;
  }
}

/* Search & Directory Pages */
.nm_search_box,
.nm_dir_controls {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.25rem;
  box-shadow: var(--shadow-1);
  margin-bottom: 1.3rem;
}

.nm_search_head,
.nm_dir_head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.nm_search_title,
.nm_dir_title {
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  margin: 0;
}

.nm_dir_desc {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_count_pill {
  padding: 0.26rem 0.78rem;
  border-radius: 999px;
  background-color: var(--brand-50);
  border: 1px solid #d8ccfb;
  color: var(--brand-700);
  font-size: 0.82rem;
  font-weight: 600;
}

.nm_filter_form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nm_filter_field {
  flex: 1 1 260px;
}

.nm_cat_pills {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-200);
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.nm_cat_pill {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 0.82rem;
  font-weight: 600;
}

.nm_cat_pill:hover {
  border-color: var(--brand-600);
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.nm_cat_pill.is_active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_dir_counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #d8ccfb;
  background-color: var(--brand-50);
}

.nm_dir_counter_num {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--brand-700);
  line-height: 1.1;
}

.nm_dir_counter_lbl {
  font-size: 0.75rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_dir_toolbar {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-200);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nm_dir_alpha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.nm_dir_alpha_lbl,
.nm_dir_sort_lbl {
  font-size: 0.8rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_dir_alpha_btn {
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 0.8rem;
  font-weight: 600;
}

.nm_dir_alpha_btn.is_active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_dir_sort {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nm_dir_sort_sel {
  min-height: 2.35rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
}

.nm_dir_blocks {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.nm_dir_group {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow-1);
}

.nm_dir_group_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.62rem;
  margin-bottom: 0.78rem;
  border-bottom: 1px solid var(--line-200);
}

.nm_dir_letter {
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding-inline: 0.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}

.nm_dir_group_count {
  font-size: 0.78rem;
  color: var(--neutral-600);
  font-weight: 600;
}

.nm_dir_list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 900px) {
  .nm_dir_list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nm_dir_list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_dir_link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.56rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
}

.nm_dir_link:hover {
  border-color: var(--brand-600);
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.nm_dir_name {
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nm_dir_badge {
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  color: var(--brand-700);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Download Progress Page */
.nm_dl_advisory {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.95rem;
  margin-bottom: 1rem;
  border-radius: var(--rad-2);
  border: 1px solid #d8ccfb;
  background-color: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.84rem;
  font-weight: 600;
}

.nm_dl_head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.nm_dl_title {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin: 0 0 0.25rem;
}

.nm_dl_sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_dl_work,
.nm_dl_panel,
.nm_dl_notes {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.25rem;
  box-shadow: var(--shadow-1);
  margin-bottom: 1.2rem;
}

.nm_dl_work {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nm_dl_cover {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-200);
  flex-shrink: 0;
}

.nm_dl_cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm_dl_work_title {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}

.nm_dl_work_alt {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  color: var(--neutral-600);
}

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

.nm_dl_panel_title_wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nm_dl_panel_title_wrap .nm_section_title {
  margin: 0;
}

.nm_dl_panel_sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.nm_dl_status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
}

.nm_dl_status_dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background-color: var(--brand-600);
}

.nm_dl_status.is_ready {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.nm_dl_status.is_ready .nm_dl_status_dot {
  background-color: #10b981;
}

.nm_dl_status.is_queued {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.nm_dl_status.is_queued .nm_dl_status_dot {
  background-color: #f59e0b;
}

.nm_dl_status.is_failed {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.nm_dl_status.is_failed .nm_dl_status_dot {
  background-color: #dc2626;
}

.nm_dl_progress {
  margin-bottom: 1rem;
}

.nm_dl_progress_meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.nm_dl_stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.nm_dl_stage_pill {
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background-color: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.76rem;
  font-weight: 700;
}

.nm_dl_stage_text {
  font-size: 0.86rem;
  font-weight: 600;
}

.nm_dl_percent {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--brand-700);
}

.nm_dl_track {
  height: 10px;
  border-radius: 999px;
  background-color: var(--neutral-50);
  border: 1px solid var(--line-200);
  overflow: hidden;
}

.nm_dl_bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
  transition: width 0.3s ease;
}

.nm_dl_bar.is_completed {
  background: #10b981;
}

.nm_dl_milestones {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--neutral-600);
  gap: 0.35rem;
}

@media (max-width: 600px) {
  .nm_dl_milestones {
    display: none;
  }
}

.nm_dl_steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (max-width: 820px) {
  .nm_dl_steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nm_dl_step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.72rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
}

.nm_dl_step.is_active {
  border-color: var(--brand-600);
  background-color: var(--brand-50);
}

.nm_dl_step.is_completed {
  border-color: #a7f3d0;
  background-color: #ecfdf5;
}

.nm_dl_step_badge {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nm_dl_step.is_active .nm_dl_step_badge {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_dl_step.is_completed .nm_dl_step_badge {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.nm_dl_step_title {
  display: block;
  font-size: 0.82rem;
}

.nm_dl_step_desc {
  display: block;
  font-size: 0.74rem;
  color: var(--neutral-600);
}

.nm_dl_alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid #f59e0b;
  background-color: #fffbeb;
  color: #92400e;
}

.nm_dl_alert.is_danger {
  border-color: #dc2626;
  background-color: #fef2f2;
  color: #b91c1c;
}

.nm_dl_alert_icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background-color: currentColor;
  color: #ffffff;
  font-weight: 700;
  flex-shrink: 0;
}

.nm_dl_alert_body {
  flex: 1 1 auto;
}

.nm_dl_alert_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nm_dl_alert_msg {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.85rem;
}

.nm_dl_alert_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nm_dl_split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

@media (max-width: 820px) {
  .nm_dl_split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_dl_turnstile {
  margin-bottom: 0.85rem;
}

.nm_dl_hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.nm_dl_perks {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: var(--neutral-600);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nm_dl_terminal {
  border-radius: 10px;
  border: 1px solid #2e244d;
  background-color: #161028;
  color: #e9e4f5;
  overflow: hidden;
}

.nm_dl_term_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background-color: #241b3d;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nm_dl_term_live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #c4b5fd;
  font-weight: 700;
}

.nm_dl_term_dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background-color: #a78bfa;
}

.nm_dl_term_body {
  padding: 0.8rem 0.85rem;
  max-height: 220px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.77rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nm_dl_term_time {
  color: #9e93bd;
  margin-right: 0.4rem;
}

.nm_dl_term_msg.is_info { color: #c4b5fd; }
.nm_dl_term_msg.is_success { color: #34d399; }
.nm_dl_term_msg.is_warning { color: #fbbf24; }

.nm_dl_notes_head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.nm_dl_notes_head .nm_section_title {
  margin: 0;
}

.nm_dl_notes_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

@media (max-width: 640px) {
  .nm_dl_notes_grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_dl_note {
  padding: 0.88rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
}

.nm_dl_note strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
}

.nm_dl_note p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

/* Forms, Controls, Alerts, Auth, Contact, Legal */
.nm_field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.nm_field_label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.nm_req {
  color: #dc2626;
}

.nm_control {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.82rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nm_control:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.nm_control[aria-invalid="true"],
.nm_control:user-invalid,
.nm_control.user-invalid-fallback {
  border-color: #dc2626;
}

.nm_field_err {
  display: none;
  font-size: 0.79rem;
  font-weight: 600;
  color: #b91c1c;
}

.nm_control:user-invalid + .nm_field_err,
.nm_control.user-invalid-fallback + .nm_field_err {
  display: block;
}

.nm_server_err {
  font-size: 0.8rem;
  font-weight: 600;
  color: #b91c1c;
}

.nm_alert {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.nm_alert_success {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.nm_alert_error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.nm_auth_wrap {
  max-width: 480px;
  padding-block: 1rem;
}

.nm_auth_card {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.55rem;
  box-shadow: var(--shadow-1);
}

.nm_auth_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.nm_auth_title {
  font-size: 1.35rem;
  margin: 0;
}

.nm_auth_hint,
.nm_auth_body {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_auth_fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nm_auth_remember {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--neutral-600);
}

.nm_auth_remember input[type="checkbox"] {
  accent-color: var(--brand-600);
}

.nm_auth_foot {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nm_auth_links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.nm_auth_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.nm_auth_actions .nm_btn {
  flex: 1 1 auto;
}

.nm_err_lead {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.nm_err_list {
  margin: 0;
  padding-left: 1.1rem;
}

/* Contact Page (Layout E Tabbed Panel Stack) */
.nm_contact_wrap {
  max-width: 880px;
}

.nm_contact_head {
  margin-bottom: 1rem;
}

.nm_contact_title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.3rem;
}

.nm_contact_intro {
  margin: 0;
  font-size: 0.92rem;
  color: var(--neutral-600);
}

.nm_contact_panel {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.4rem 1.55rem;
  box-shadow: var(--shadow-1);
}

.nm_contact_form_box {
  margin-top: 1.15rem;
}

.nm_contact_form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nm_contact_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 620px) {
  .nm_contact_grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nm_result_lead {
  margin: 0 0 0.4rem;
  font-weight: 700;
}

/* Legal Document Pages */
.nm_legal_wrap {
  max-width: 860px;
}

.nm_legal_box {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  padding: 1.7rem 1.9rem;
  box-shadow: var(--shadow-1);
}

.nm_legal_title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.5rem;
}

.nm_legal_intro {
  margin: 0 0 1.25rem;
  font-size: 0.94rem;
  color: var(--neutral-600);
}

.nm_legal_section {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line-200);
}

.nm_legal_head {
  font-size: 1.08rem;
  margin: 0 0 0.55rem;
}

.nm_legal_list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.92rem;
}

/* User Favorites Page */
.nm_fav_profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem;
  border-radius: var(--rad-2);
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  box-shadow: var(--shadow-1);
  margin-bottom: 1rem;
}

.nm_fav_identity {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.nm_fav_avatar {
  width: 3.55rem;
  height: 3.55rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #ffffff;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nm_fav_name {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}

.nm_fav_stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.nm_fav_tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.nm_fav_tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-600);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.nm_fav_tab.active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.nm_fav_toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.nm_fav_showing {
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_fav_toolbar_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nm_fav_capacity {
  padding: 1rem 1.15rem;
  border-radius: var(--rad-2);
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  box-shadow: var(--shadow-1);
  margin-bottom: 1.15rem;
}

.nm_fav_capacity_head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
}

.nm_fav_capacity_track {
  height: 8px;
  border-radius: 999px;
  background-color: var(--brand-50);
  overflow: hidden;
}

.nm_fav_capacity_fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
  border-radius: 999px;
}

.nm_fav_capacity_note {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--neutral-600);
}

.nm_fav_comment_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--neutral-600);
}

.nm_fav_modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(27, 21, 48, 0.65);
  place-items: center;
  padding: 1rem;
}

.nm_fav_modal.active {
  display: grid;
}

.nm_fav_modal_box {
  width: min(420px, 100%);
  background-color: var(--neutral-100);
  border-radius: var(--rad-2);
  padding: 1.55rem;
  box-shadow: 0 22px 48px rgba(27, 21, 48, 0.28);
}

/* Native <dialog class="nm_dialog"> */
dialog.nm_dialog[open] {
  display: block;
  width: min(480px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  box-shadow: 0 24px 56px rgba(27, 21, 48, 0.3);
  overflow: auto;
}

dialog.nm_dialog_result_shell[open] {
  width: min(400px, calc(100vw - 2rem));
}

.nm_dialog_panel {
  padding: 1.4rem 1.5rem;
}

.nm_dialog_head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nm_dialog_title {
  font-size: 1.22rem;
  margin: 0;
}

.nm_dialog_sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.nm_dialog_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-50);
  color: var(--neutral-900);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.nm_dialog_fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nm_dialog_alert {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.88rem;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 600;
}

.nm_dialog_alert.is_warning {
  display: flex;
  background-color: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.nm_dialog_alert.is_error {
  display: flex;
  background-color: #fef2f2;
  border: 1px solid #dc2626;
  color: #b91c1c;
}

.nm_dialog_foot {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.nm_dialog_result {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.nm_dialog_result .nm_dialog_close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
}

.nm_result_icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background-color: #166534;
}

.nm_dialog_result.is_error .nm_result_icon,
.nm_dialog_result.is-error .nm_result_icon {
  background-color: #b91c1c;
}

.nm_result_text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--neutral-600);
}

.nm_share_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

/* Top-Layer Popover Toast */
.nm_toast {
  position: fixed;
  inset: auto;
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  margin: 0;
  border: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
  max-width: min(440px, calc(100vw - 2rem));
  padding: 0.78rem 1.2rem;
  border-radius: var(--rad-2);
  background-color: var(--neutral-900);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.38;
  box-shadow: 0 16px 34px rgba(27, 21, 48, 0.36);
  opacity: 0;
  transform: translateX(-50%);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  .nm_toast {
    transform: translateX(-50%) translateY(10px);
  }
}

.nm_toast:is(:popover-open, .\:popover-open, .active) {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@starting-style {
  .nm_toast:is(:popover-open, .\:popover-open, .active) {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    .nm_toast:is(:popover-open, .\:popover-open, .active) {
      transform: translateX(-50%) translateY(10px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm_toast {
    transition-duration: 0.1s;
  }
}

.nm_toast_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 24px;
  min-inline-size: 24px;
  margin-inline-start: 0.25rem;
  padding: 0 0.2rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.85;
  cursor: pointer;
}

.nm_toast.toast-success { background-color: #166534; }
.nm_toast.toast-error { background-color: #b91c1c; }
.nm_toast.toast-warning { background-color: #92400e; }

/* Empty & Error Pages */
.nm_empty {
  grid-column: 1 / -1;
  padding: 2.75rem 1.25rem;
  text-align: center;
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-radius: var(--rad-2);
  color: var(--neutral-600);
  box-shadow: var(--shadow-1);
}

.nm_error_page {
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.nm_error_wrap {
  width: min(480px, 100%);
}

.nm_error_card {
  background-color: var(--neutral-100);
  border: 1px solid var(--line-200);
  border-top: 4px solid var(--brand-600);
  border-radius: var(--rad-2);
  padding: 2.2rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-2);
}

.nm_error_code {
  display: inline-block;
  padding: 0.2rem 0.72rem;
  border-radius: 999px;
  background-color: var(--brand-50);
  color: var(--brand-700);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.nm_error_title {
  font-size: 1.55rem;
  margin-bottom: 0.55rem;
}

.nm_error_body {
  margin: 0 0 1.25rem;
  color: var(--neutral-600);
}

/* Wide Portal Footer (Twilight Violet Accent) */
.nm_footer {
  margin-top: auto;
  background-color: var(--neutral-100);
  border-top: 3px solid var(--brand-600);
  padding-block: 2.35rem 1.45rem;
}

.nm_footer_grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 1.75rem;
  padding-bottom: 1.55rem;
  border-bottom: 1px solid var(--line-200);
}

@media (max-width: 960px) {
  .nm_footer_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .nm_footer_grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.nm_footer_brand {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.45rem;
}

.nm_footer_desc {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  color: var(--neutral-600);
}

.nm_footer_advisory {
  margin: 0;
  font-size: 0.78rem;
  color: var(--neutral-600);
}

.nm_footer_head {
  font-size: 0.96rem;
  margin: 0 0 0.65rem;
}

.nm_footer_links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem 0.75rem;
  font-size: 0.84rem;
}

.nm_footer_links_single {
  grid-template-columns: minmax(0, 1fr);
}

.nm_footer_links a {
  color: var(--neutral-600);
  font-weight: 500;
}

.nm_footer_links a:hover {
  color: var(--brand-600);
  text-decoration: underline;
}

.nm_footer_bar {
  padding-top: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--neutral-600);
}

.nm_footer_badges {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--brand-700);
}

/* Shared Component Styling: <x-site.pagination /> */
.ep-pagination {
  margin-top: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.ep-page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-1);
}

.ep-page-item:hover:not(.disabled):not(.active) {
  border-color: var(--brand-600);
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.ep-page-item.active {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.ep-page-item.disabled {
  opacity: 0.42;
  pointer-events: none;
}

.ep-page-nav-icon {
  display: none;
}

.ep-page-nav-svg {
  width: 1.1rem;
  height: 1.1rem;
}

@media (max-width: 640px) {
  .ep-pagination {
    flex-wrap: nowrap;
    justify-content: safe center;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.3rem;
    padding-bottom: 0.15rem;
  }

  .ep-pagination::-webkit-scrollbar {
    display: none;
  }

  .ep-page-item-prev { order: 0; }
  .ep-page-item-num { order: 1; }
  .ep-page-item-next { order: 2; }

  .ep-page-nav-label {
    display: none !important;
  }

  .ep-page-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ep-page-item-nav {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    flex-shrink: 0;
  }

  .ep-page-item-far {
    display: none !important;
  }

  .ep-page-item-dots {
    min-width: 1.15rem;
    width: 1.15rem;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 374px) {
  .ep-page-item,
  .ep-page-item-nav {
    min-width: 2.25rem;
    width: 2.25rem;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: 0;
    font-size: 0.8rem;
  }

  .ep-page-item-dots {
    min-width: 0.9rem;
    width: 0.9rem;
  }
}

/* Shared Component Styling: Ad Slots */
.site-ad-slot.site-ad-banner-320x50 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: 1rem;
  min-height: 50px;
}

.site-ad-banner-320x50__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.site-ad-slot.site-ad-banner-320x50.is-placeholder .site-ad-banner-320x50__inner {
  width: 320px;
  min-height: 50px;
  border-radius: 10px;
  border: 1px dashed var(--line-200);
  background-color: var(--brand-50);
  color: var(--neutral-600);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-ad-social-bar.is-placeholder {
  position: fixed;
  left: 1rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 8000;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  border: 1px dashed var(--line-200);
  background-color: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 0.72rem;
  font-weight: 600;
}
