/* Lightweight language + day/night controls for NAS Market.
   No third-party framework is required; the early head script applies the theme
   before page CSS is painted to avoid flashing. */
.nm-ui-switcher{
  position:fixed;
  top:10px;
  right:10px;
  z-index:50000;
  display:flex;
  align-items:center;
  gap:8px;
  font-family:Arial,"Microsoft YaHei",sans-serif;
  pointer-events:auto;
}
.nm-lang-wrap{position:relative;display:inline-flex}
.nm-ui-btn{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(17,24,39,.18);
  border-radius:6px;
  background:rgba(255,255,255,.92);
  color:#111827;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  cursor:pointer;
  outline:none;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
  -webkit-tap-highlight-color:transparent;
}
.nm-ui-btn:hover{background:#f3f4f6;transform:translateY(-1px);box-shadow:0 12px 26px rgba(15,23,42,.12)}
.nm-ui-btn:focus-visible{box-shadow:0 0 0 3px rgba(59,130,246,.32),0 8px 24px rgba(15,23,42,.08)}
.nm-icon{width:18px;height:18px;display:block;flex:0 0 auto}
.nm-theme-btn{position:relative;overflow:hidden}
.nm-theme-btn .nm-icon{position:absolute;transition:transform .22s ease,opacity .22s ease}
.nm-theme-btn .nm-icon-sun{opacity:1;transform:scale(1) rotate(0)}
.nm-theme-btn .nm-icon-moon{opacity:0;transform:scale(.2) rotate(90deg)}
html.nm-theme-dark .nm-theme-btn .nm-icon-sun{opacity:0;transform:scale(.2) rotate(-90deg)}
html.nm-theme-dark .nm-theme-btn .nm-icon-moon{opacity:1;transform:scale(1) rotate(0)}
.nm-lang-menu{
  position:absolute;
  top:44px;
  right:0;
  display:none;
  min-width:138px;
  padding:6px;
  border:1px solid rgba(17,24,39,.14);
  border-radius:10px;
  background:rgba(255,255,255,.98);
  color:#111827;
  box-shadow:0 18px 38px rgba(15,23,42,.18);
}
.nm-lang-wrap.nm-open .nm-lang-menu{display:block}
.nm-lang-menu button{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 9px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:inherit;
  font-size:13px;
  line-height:1.2;
  text-align:left;
  cursor:pointer;
}
.nm-lang-menu button:hover{background:#f3f4f6}
.nm-lang-menu strong{display:none;color:#2563eb;font-size:13px}
html[data-nm-lang="zh-CN"] [data-nm-lang-check="zh-CN"],
html[data-nm-lang="en-US"] [data-nm-lang-check="en-US"]{display:inline}
html.nm-theme-dark{
  --bg:#0f172a;
  --card:#111827;
  --text:#e5e7eb;
  --ink:#e5e7eb;
  --muted:#9ca3af;
  --line:#374151;
  --dark:#2563eb;
  --btn:#2563eb;
  color-scheme:dark;
}
html.nm-theme-dark body{
  background:var(--bg)!important;
  color:var(--text)!important;
}
html.nm-theme-dark .nm-ui-btn{
  background:rgba(17,24,39,.92);
  color:#f9fafb;
  border-color:rgba(255,255,255,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.30);
}
html.nm-theme-dark .nm-ui-btn:hover{background:#1f2937;box-shadow:0 12px 30px rgba(0,0,0,.38)}
html.nm-theme-dark .nm-lang-menu{background:#111827;color:#f9fafb;border-color:#374151;box-shadow:0 18px 40px rgba(0,0,0,.55)}
html.nm-theme-dark .nm-lang-menu button:hover{background:#1f2937}
html.nm-theme-dark .page,
html.nm-theme-dark .wrap,
html.nm-theme-dark .shell,
html.nm-theme-dark .box,
html.nm-theme-dark .card,
html.nm-theme-dark .seo-summary,
html.nm-theme-dark .seo-intro,
html.nm-theme-dark .seo-detail-text,
html.nm-theme-dark .top,
html.nm-theme-dark .preview,
html.nm-theme-dark .paybox,
html.nm-theme-dark .modal,
html.nm-theme-dark .loading-card,
html.nm-theme-dark .archive-card,
html.nm-theme-dark .textbox,
html.nm-theme-dark .group,
html.nm-theme-dark .switchcard,
html.nm-theme-dark .summary-box,
html.nm-theme-dark .hot-rank-panel,
html.nm-theme-dark .job-card,
html.nm-theme-dark .job-row,
html.nm-theme-dark .nas-panel{
  background:var(--card)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
html.nm-theme-dark .home-sticky-stack,
html.nm-theme-dark .admin-sticky-header{
  background:rgba(15,23,42,.94)!important;
  border-color:var(--line)!important;
}
html.nm-theme-dark h1,
html.nm-theme-dark h2,
html.nm-theme-dark h3,
html.nm-theme-dark h4,
html.nm-theme-dark .site-title,
html.nm-theme-dark .section-title,
html.nm-theme-dark .title,
html.nm-theme-dark .detail-summary h1,
html.nm-theme-dark .seo-detail-text h2,
html.nm-theme-dark th,
html.nm-theme-dark .header,
html.nm-theme-dark .setting-title,
html.nm-theme-dark .summary-label,
html.nm-theme-dark .job-title{
  color:#f9fafb!important;
}
html.nm-theme-dark p,
html.nm-theme-dark .muted,
html.nm-theme-dark .help,
html.nm-theme-dark .small,
html.nm-theme-dark .seo-introline,
html.nm-theme-dark .seo-intro p,
html.nm-theme-dark .intro,
html.nm-theme-dark .detail-summary,
html.nm-theme-dark .detail-summary p,
html.nm-theme-dark .desc1,
html.nm-theme-dark .desc2,
html.nm-theme-dark .meta,
html.nm-theme-dark .download-mini,
html.nm-theme-dark .section-count,
html.nm-theme-dark .page-summary,
html.nm-theme-dark .notice,
html.nm-theme-dark .tip,
html.nm-theme-dark .setting-desc,
html.nm-theme-dark .job-meta,
html.nm-theme-dark .seo-footer,
html.nm-theme-dark .footer,
html.nm-theme-dark .count,
html.nm-theme-dark .archive-list,
html.nm-theme-dark .archive-caption,
html.nm-theme-dark .archive-empty{
  color:var(--muted)!important;
}
html.nm-theme-dark a,
html.nm-theme-dark .back,
html.nm-theme-dark .links a,
html.nm-theme-dark .seo-footer a,
html.nm-theme-dark .footer a,
html.nm-theme-dark .seo-chip,
html.nm-theme-dark .seo-label{
  color:#e5e7eb!important;
}
html.nm-theme-dark .seo-chip,
html.nm-theme-dark .category-chip,
html.nm-theme-dark .tag-chip,
html.nm-theme-dark .page-link,
html.nm-theme-dark .tag-option,
html.nm-theme-dark .searchbar,
html.nm-theme-dark .tag-toggle,
html.nm-theme-dark input,
html.nm-theme-dark textarea,
html.nm-theme-dark select,
html.nm-theme-dark .cell input,
html.nm-theme-dark .cell textarea,
html.nm-theme-dark .nas-picker-field,
html.nm-theme-dark .archive-list{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border-color:var(--line)!important;
}
html.nm-theme-dark input::placeholder,
html.nm-theme-dark textarea::placeholder{color:#94a3b8!important}
html.nm-theme-dark .search-combo,
html.nm-theme-dark .tag-menu,
html.nm-theme-dark .nas-list,
html.nm-theme-dark table,
html.nm-theme-dark .table-row{
  background:#0b1220!important;
  border-color:var(--line)!important;
  color:#e5e7eb!important;
}
html.nm-theme-dark tr,
html.nm-theme-dark th,
html.nm-theme-dark td,
html.nm-theme-dark .hot-item,
html.nm-theme-dark .divider,
html.nm-theme-dark hr{border-color:var(--line)!important;background-color:transparent!important}
html.nm-theme-dark .searchbtn,
html.nm-theme-dark .paybtn,
html.nm-theme-dark a.btn,
html.nm-theme-dark button.btn,
html.nm-theme-dark button,
html.nm-theme-dark .btn,
html.nm-theme-dark .pickbtn{
  background:#2563eb!important;
  color:#fff!important;
  border-color:#2563eb!important;
}
html.nm-theme-dark button.lightbtn,
html.nm-theme-dark .lightbtn,
html.nm-theme-dark .tag-toggle,
html.nm-theme-dark .tag-option,
html.nm-theme-dark .nas-picker-field button,
html.nm-theme-dark .modal-close{
  background:#1f2937!important;
  color:#e5e7eb!important;
  border-color:var(--line)!important;
}
html.nm-theme-dark button:disabled,
html.nm-theme-dark input:disabled{opacity:.55!important}
html.nm-theme-dark .toggle span,
html.nm-theme-dark .switch .slider{background:#4b5563!important}
html.nm-theme-dark .toggle input:checked + span,
html.nm-theme-dark .switch input:checked + .slider{background:#2563eb!important}
html.nm-theme-dark .err{color:#f87171!important}
html.nm-theme-dark .warn,
html.nm-theme-dark .pay-warning{background:#422006!important;border-color:#92400e!important;color:#fde68a!important}
html.nm-theme-dark .lock{background:#450a0a!important;border-color:#991b1b!important;color:#fecaca!important}
html.nm-theme-dark .spinner{border-color:#334155!important;border-top-color:#e5e7eb!important}
html.nm-theme-dark .inline-preview-frame,
html.nm-theme-dark .page,
html.nm-theme-dark img.page,
html.nm-theme-dark .archive-img,
html.nm-theme-dark .media,
html.nm-theme-dark .pdf-frame{background:#0b1220!important;border-color:var(--line)!important}

html.nm-theme-dark .nm-lang-menu button{
  background:transparent!important;
  color:#f9fafb!important;
  border-color:transparent!important;
}
html.nm-theme-dark .nm-lang-menu button:hover{background:#1f2937!important}

body.nm-product-detail-page .nm-ui-switcher{top:auto;right:16px;bottom:16px}
@media (max-width:560px){
  .nm-ui-switcher{top:6px;right:6px;gap:6px;transform:scale(.92);transform-origin:top right}
  .nm-ui-btn{width:36px;height:36px}
  .nm-lang-menu{top:42px;right:0}
  body.nm-product-detail-page .nm-ui-switcher{top:auto;right:8px;bottom:10px;transform:scale(.90);transform-origin:bottom right}
}
@media print{.nm-ui-switcher{display:none!important}}


/* Desktop pagination dark-mode refinements. */
html.nm-theme-dark .pagination .page-link{
  background:#1f2937!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
html.nm-theme-dark .pagination .page-link:hover{
  background:#273449!important;
  color:#fff!important;
}
html.nm-theme-dark .pagination .page-link.current{
  background:#0ea5d8!important;
  color:#fff!important;
  border-color:#0ea5d8!important;
}
html.nm-theme-dark .pagination .page-link.disabled{
  background:#111827!important;
  color:#64748b!important;
  border-color:#374151!important;
}
html.nm-theme-dark .pagination .page-jump{
  color:#9ca3af!important;
}
html.nm-theme-dark .pagination .page-jump-select{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border-color:#64748b!important;
}

/* Language/theme switcher docking refinement: when controls are moved to the
   product-detail bottom-right corner, keep the footprint smaller and open the
   language menu upward so options stay visible above the viewport edge. */
.nm-ui-switcher{gap:6px}
.nm-ui-btn{width:36px;height:36px;border-radius:7px}
.nm-icon{width:17px;height:17px}
.nm-lang-menu{top:42px;max-height:calc(100vh - 62px);overflow-y:auto;overscroll-behavior:contain}
.nm-ui-switcher.nm-ui-bottom-docked{top:auto!important;right:10px!important;bottom:10px!important;gap:5px;transform:none!important;transform-origin:bottom right}
.nm-ui-switcher.nm-ui-bottom-docked .nm-ui-btn{width:34px;height:34px;border-radius:7px}
.nm-ui-switcher.nm-ui-bottom-docked .nm-icon{width:16px;height:16px}
.nm-ui-switcher.nm-ui-bottom-docked .nm-lang-menu{top:auto!important;bottom:calc(100% + 6px);right:0;max-height:240px;max-height:calc(100vh - 76px);overflow-y:auto}
@media (max-width:560px){
  .nm-ui-switcher{top:6px;right:6px;gap:5px;transform:none;transform-origin:top right}
  .nm-ui-btn{width:34px;height:34px}
  .nm-icon{width:16px;height:16px}
  .nm-lang-menu{top:40px}
  .nm-ui-switcher.nm-ui-bottom-docked{right:8px!important;bottom:8px!important;gap:4px;transform:none!important}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-ui-btn{width:32px;height:32px;border-radius:7px}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-icon{width:15px;height:15px}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-lang-menu{bottom:calc(100% + 6px);max-height:220px;max-height:calc(100vh - 72px)}
}

/* Admin product-list header contrast fix for night mode.
   The product list uses .sort-th-link buttons in <th>. The generic dark-mode
   anchor rule intentionally makes links light, but with the old pale header
   background it could look like blank white boxes. Keep sortable headers dark
   and high-contrast in night mode. */
html.nm-theme-dark .sort-th-link,
html.nm-theme-dark th .sort-th-link,
html.nm-theme-dark table th .sort-th-link{
  background:#1e3a8a!important;
  color:#f8fafc!important;
  border-color:#3b82f6!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10),0 1px 2px rgba(0,0,0,.25)!important;
}
html.nm-theme-dark .sort-th-link:hover,
html.nm-theme-dark th .sort-th-link:hover{
  background:#1d4ed8!important;
  color:#ffffff!important;
  border-color:#60a5fa!important;
}
html.nm-theme-dark .sort-th-link.active,
html.nm-theme-dark th .sort-th-link.active{
  background:#2563eb!important;
  color:#ffffff!important;
  border-color:#93c5fd!important;
}
html.nm-theme-dark .sort-th-link:focus-visible{
  outline:2px solid #93c5fd!important;
  outline-offset:2px!important;
}
html.nm-theme-dark .table-wrap th{
  color:#f9fafb!important;
}


/* Admin/night-mode file and selected-path visibility hardening.
   Native file inputs can render the selected filename with browser default
   colors; explicitly style both the control and upload button, and show a
   readable JS-enhanced filename line after selection. */
input[type="file"],
.nm-file-input{
  color:#111827;
  background:#ffffff;
  border-color:#d1d5db;
  color-scheme:light;
}
input[type="file"]::file-selector-button,
.nm-file-input::file-selector-button{
  margin-right:10px;
  padding:6px 10px;
  border:1px solid #9ca3af;
  border-radius:6px;
  background:#f3f4f6;
  color:#111827;
  cursor:pointer;
}
input[type="file"]::-webkit-file-upload-button,
.nm-file-input::-webkit-file-upload-button{
  margin-right:10px;
  padding:6px 10px;
  border:1px solid #9ca3af;
  border-radius:6px;
  background:#f3f4f6;
  color:#111827;
  cursor:pointer;
}
.nm-selected-file-name{
  display:block;
  width:100%;
  margin-top:6px;
  padding:7px 9px;
  border:1px solid rgba(17,24,39,.10);
  border-radius:8px;
  background:#f9fafb;
  color:#111827;
  font-size:12px;
  line-height:1.45;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nm-selected-file-name.nm-empty{display:none}
html.nm-theme-dark input[type="file"],
html.nm-theme-dark .nm-file-input,
html.nm-theme-dark .cell input[type="file"],
html.nm-theme-dark input[type="file"][style]{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
  color-scheme:dark!important;
}
html.nm-theme-dark input[type="file"]::file-selector-button,
html.nm-theme-dark .nm-file-input::file-selector-button{
  background:#1f2937!important;
  color:#f9fafb!important;
  border-color:#4b5563!important;
}
html.nm-theme-dark input[type="file"]::-webkit-file-upload-button,
html.nm-theme-dark .nm-file-input::-webkit-file-upload-button{
  background:#1f2937!important;
  color:#f9fafb!important;
  border-color:#4b5563!important;
}
html.nm-theme-dark input[type="file"]:hover::file-selector-button,
html.nm-theme-dark .nm-file-input:hover::file-selector-button,
html.nm-theme-dark input[type="file"]:hover::-webkit-file-upload-button,
html.nm-theme-dark .nm-file-input:hover::-webkit-file-upload-button{
  background:#2563eb!important;
  color:#ffffff!important;
  border-color:#60a5fa!important;
}
html.nm-theme-dark .nm-selected-file-name{
  background:#111827!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
html.nm-theme-dark .nas-picker-text,
html.nm-theme-dark .nas-path,
html.nm-theme-dark .file-muted,
html.nm-theme-dark .nas-item,
html.nm-theme-dark .nas-item span,
html.nm-theme-dark #reward_qr_path_display,
html.nm-theme-dark #rewardNasCurrentPath,
html.nm-theme-dark #rewardNasList,
html.nm-theme-dark #rewardNasList span{
  color:#e5e7eb!important;
}
html.nm-theme-dark .nas-item:hover,
html.nm-theme-dark .nas-item.selected{
  background:#1f2937!important;
}
html.nm-theme-dark .reward-path-picker,
html.nm-theme-dark #rewardNasList{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
html.nm-theme-dark #rewardNasModal > div{
  background:#111827!important;
  color:#e5e7eb!important;
  border:1px solid #374151!important;
}
html.nm-theme-dark .reward-nas-dir,
html.nm-theme-dark .reward-nas-file{
  color:#e5e7eb!important;
  border-bottom-color:#374151!important;
}
html.nm-theme-dark .reward-nas-dir:hover,
html.nm-theme-dark .reward-nas-file:hover{
  background:#1f2937!important;
}

/* Front public dark-mode hardening: homepage SEO hub, crawl hub and new quick actions. */
html.nm-theme-dark body{background:#0b1220!important;color:#f8fafc!important}
html.nm-theme-dark .home-sticky-stack{background:rgba(11,18,32,.96)!important;border-bottom-color:#293548!important}
html.nm-theme-dark .seo-summary,html.nm-theme-dark .seo-intro{background:#111827!important;border-color:#293548!important;color:#f8fafc!important}
html.nm-theme-dark .site-title,html.nm-theme-dark .seo-intro h1,html.nm-theme-dark .section-title{color:#f8fafc!important}
html.nm-theme-dark .seo-introline,html.nm-theme-dark .seo-introline strong,html.nm-theme-dark .seo-label,html.nm-theme-dark .tag-label,html.nm-theme-dark .section-count{color:#cbd5e1!important}
html.nm-theme-dark .seo-chip{background:#0f172a!important;border-color:#293548!important;color:#e5e7eb!important}
html.nm-theme-dark .seo-chip small{color:#cbd5e1!important}
html.nm-theme-dark .seo-chip.active{background:#2563eb!important;border-color:#60a5fa!important;color:#fff!important}
html.nm-theme-dark .searchbar,html.nm-theme-dark .tag-toggle,html.nm-theme-dark .tag-menu,html.nm-theme-dark .tag-option{background:#0f172a!important;color:#f8fafc!important;border-color:#293548!important}
html.nm-theme-dark .searchbtn{background:#2563eb!important;color:#fff!important}
html.nm-theme-dark .divider{background:#293548!important}
html.nm-theme-dark .home-action-btn{background:#0f172a!important;border-color:#293548!important;color:#e5e7eb!important}
html.nm-theme-dark .home-action-btn.primary{background:#2563eb!important;border-color:#60a5fa!important;color:#fff!important}
html.nm-theme-dark .page-link{background:#111827!important;border-color:#293548!important;color:#e5e7eb!important}
html.nm-theme-dark .page-link.current{background:#2563eb!important;border-color:#60a5fa!important;color:#fff!important}
html.nm-theme-dark .page-jump,html.nm-theme-dark .page-jump-select{color:#e5e7eb!important}
html.nm-theme-dark .page-jump-select{background:#0f172a!important;border-color:#475569!important}

/* 20260707: compact integrated public action icons (favorites/upload/donate + language/theme). */
.nm-ui-switcher{gap:5px;max-width:calc(100vw - 12px);flex-wrap:nowrap}
.nm-ui-action{text-decoration:none}
.nm-ui-action svg{stroke-width:2.25}
@media (max-width:560px){
  .nm-ui-switcher{top:6px;right:6px;gap:4px}
  .nm-ui-switcher .nm-ui-btn{width:32px;height:32px;border-radius:8px}
  .nm-ui-switcher .nm-icon{width:15px;height:15px}
}
.nm-ui-switcher.nm-ui-bottom-docked{right:10px!important;bottom:14px!important;gap:4px}
.nm-ui-switcher.nm-ui-bottom-docked .nm-ui-btn{width:31px!important;height:31px!important;border-radius:8px!important}
.nm-ui-switcher.nm-ui-bottom-docked .nm-icon{width:14px!important;height:14px!important}
body.nm-product-detail-page .nm-public-footer{padding-bottom:96px!important}
@media (max-width:560px){
  .nm-ui-switcher.nm-ui-bottom-docked{right:8px!important;bottom:12px!important;gap:3px}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-ui-btn{width:28px!important;height:28px!important;border-radius:7px!important}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-icon{width:13px!important;height:13px!important}
  body.nm-product-detail-page .nm-public-footer{padding-bottom:106px!important}
}
html.nm-theme-dark .nm-ui-action{background:rgba(17,24,39,.92)!important;color:#f9fafb!important;border-color:rgba(255,255,255,.18)!important}

/* 20260707-2: broad day/night contrast hardening for all front/admin pages. */
html.nm-theme-dark .form-card,
html.nm-theme-dark .upload-item,
html.nm-theme-dark .toolbar,
html.nm-theme-dark .intro,
html.nm-theme-dark .empty,
html.nm-theme-dark .box,
html.nm-theme-dark .table-wrap,
html.nm-theme-dark .settings-grid,
html.nm-theme-dark .setting-card,
html.nm-theme-dark .metric-card,
html.nm-theme-dark .admin-bulkbar{
  background:#111827!important;
  color:#f8fafc!important;
  border-color:#293548!important;
  box-shadow:none!important;
}
html.nm-theme-dark .input,
html.nm-theme-dark .select,
html.nm-theme-dark textarea,
html.nm-theme-dark select,
html.nm-theme-dark option,
html.nm-theme-dark input:not([type="checkbox"]):not([type="radio"]),
html.nm-theme-dark .category-select{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
  color-scheme:dark!important;
}
html.nm-theme-dark .pill,
html.nm-theme-dark .fav-tool,
html.nm-theme-dark .meta span,
html.nm-theme-dark .admin-product-title-link,
html.nm-theme-dark .product-link{
  background:#0b1220!important;
  border-color:#334155!important;
  color:#dbeafe!important;
}
html.nm-theme-dark ::selection{background:#2563eb;color:#fff}
html.nm-theme-dark .notice.ok{background:#052e2b!important;border-color:#0f766e!important;color:#99f6e4!important}
html.nm-theme-dark .notice.err{background:#431407!important;border-color:#9a3412!important;color:#fed7aa!important}
html.nm-theme-dark .danger{background:#b91c1c!important;border-color:#ef4444!important;color:#fff!important}

/* Keep floating icon group compact and away from ICP/footer in mobile portrait. */
@media (max-width:560px) and (orientation:portrait){
  .nm-ui-switcher{top:6px!important;right:6px!important;gap:3px!important;transform:none!important}
  .nm-ui-switcher .nm-ui-btn{width:30px!important;height:30px!important;border-radius:8px!important}
  .nm-ui-switcher .nm-icon{width:14px!important;height:14px!important}
  .nm-ui-switcher.nm-ui-bottom-docked{bottom:10px!important;right:8px!important;max-width:40vw!important;flex-wrap:wrap!important;justify-content:flex-end!important}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-ui-btn{width:27px!important;height:27px!important}
  .nm-ui-switcher.nm-ui-bottom-docked .nm-icon{width:12px!important;height:12px!important}
  body.nm-product-detail-page .nm-public-footer{padding-bottom:118px!important}
}

/* SEO audit mobile accessibility and rendering containment */
@media (max-width:760px){
  body{font-size:14px!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .nm-ui-btn{width:40px;height:40px}
  .page-link,.home-action-btn,.seo-chip,.fav-tool,.back{min-height:36px}
  button,a,input,select{touch-action:manipulation}
}

/* 2026-07-15 mobile Speed Index tuning: paint above-the-fold cards immediately,
   avoid delayed visual completion from content-visibility and expensive blur/shadows. */
@media (max-width:760px){
  .home-sticky-stack{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#f3f4f6!important}
  .resource-card{box-shadow:0 2px 8px rgba(15,23,42,.045)!important;transform:none!important}
  .resource-card:hover{transform:none!important;box-shadow:0 2px 8px rgba(15,23,42,.045)!important}
}
html.nm-theme-dark .home-sticky-stack{background:#0b1220!important}


/* Accessible text utility used by icon links and compact form labels. */
.nm-visually-hidden{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

/* Public mobile controls participate in document flow instead of covering the
   page title/category chips. Product-detail controls keep their bottom dock. */
@media (max-width:1100px), (orientation:landscape) and (max-height:600px) and (max-width:1200px){
  body:not(.nm-product-detail-page):not(.nm-home-page) .nm-ui-switcher.nm-ui-public-actions:not(.nm-ui-bottom-docked){
    position:relative;top:auto;right:auto;bottom:auto;z-index:45000;
    width:auto;max-width:calc(100% - 16px);margin:6px 8px 0;
    justify-content:flex-end;flex-wrap:wrap;transform:none;transform-origin:center;
  }
  body:not(.nm-product-detail-page):not(.nm-home-page) .nm-ui-switcher.nm-ui-public-actions:not(.nm-ui-bottom-docked) .nm-lang-menu{
    top:calc(100% + 6px);right:0;max-height:min(260px,calc(100vh - 72px));
  }
}
@media (max-width:420px){
  body:not(.nm-product-detail-page):not(.nm-home-page) .nm-ui-switcher.nm-ui-public-actions:not(.nm-ui-bottom-docked){gap:4px;margin-top:5px}
  body:not(.nm-product-detail-page):not(.nm-home-page) .nm-ui-switcher.nm-ui-public-actions:not(.nm-ui-bottom-docked) .nm-ui-btn{width:32px;height:32px}
}

html.nm-theme-dark .site-keyword{color:#cbd5e1!important}

/* 2026-11-12: cross-page night-mode contrast guard for content panels and controls. */
html.nm-theme-dark .feature-box,html.nm-theme-dark .download-facts,html.nm-theme-dark .standard-box,html.nm-theme-dark .upload-item,html.nm-theme-dark .upload-drop,html.nm-theme-dark .form-card,html.nm-theme-dark .download-card{background:#111827!important;color:#e5e7eb!important;border-color:#334155!important}
html.nm-theme-dark .feature-box h3,html.nm-theme-dark .download-fact strong,html.nm-theme-dark .standard-box h3,html.nm-theme-dark .upload-item strong{color:#f8fafc!important}
html.nm-theme-dark .feature-box ul,html.nm-theme-dark .feature-box li,html.nm-theme-dark .download-fact,html.nm-theme-dark .standard-grid span,html.nm-theme-dark .standard-grid b,html.nm-theme-dark .upload-item .status{color:#cbd5e1!important}
html.nm-theme-dark .standard-box h3{background:#1e293b!important}
html.nm-theme-dark .standard-grid div{border-color:#334155!important}
html.nm-theme-dark button:focus-visible,html.nm-theme-dark a:focus-visible,html.nm-theme-dark input:focus-visible,html.nm-theme-dark select:focus-visible{outline:2px solid #93c5fd!important;outline-offset:2px}
html.nm-theme-dark button:disabled{color:#e2e8f0!important;opacity:.72!important}

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

/* Package 18 Round 21: popup must paint above adjacent sticky/search content. */
.nm-home-page .seo-titlebar .nm-lang-wrap{position:relative!important;z-index:150!important;overflow:visible!important}
.nm-home-page .seo-titlebar .nm-lang-menu{z-index:1000!important;top:calc(100% + 6px)!important;right:0!important;bottom:auto!important}


/* Package 18 Round 47: global dark-theme readability hardening.
   Keep admin toggle labels, inline helper text and dynamically generated NAS
   browser rows readable even when older templates contain light-theme colors. */
html.nm-theme-dark .job-clear-label,
html.nm-theme-dark .section-toggle-label,
html.nm-theme-dark label:not(.switch):not(.toggle),
html.nm-theme-dark .setting-meta,
html.nm-theme-dark .setting-row,
html.nm-theme-dark .section-actions,
html.nm-theme-dark .admin-pagination,
html.nm-theme-dark .reward-path-picker,
html.nm-theme-dark .reward-path-picker span,
html.nm-theme-dark #reward_qr_path_display,
html.nm-theme-dark #rewardNasCurrentPath,
html.nm-theme-dark #rewardNasList,
html.nm-theme-dark #rewardNasList span,
html.nm-theme-dark .job-clear-label,
html.nm-theme-dark .section-toggle-label{
  color:#e5e7eb!important;
}
html.nm-theme-dark .hidden-hint,
html.nm-theme-dark .setting-desc,
html.nm-theme-dark .muted,
html.nm-theme-dark .help,
html.nm-theme-dark .small{
  color:#cbd5e1!important;
}
html.nm-theme-dark [style*="background:#fff"],
html.nm-theme-dark [style*="background: #fff"],
html.nm-theme-dark [style*="background:white"],
html.nm-theme-dark [style*="background: white"]{
  background:#111827!important;
}
html.nm-theme-dark [style*="color:#111827"],
html.nm-theme-dark [style*="color: #111827"],
html.nm-theme-dark [style*="color:#222"],
html.nm-theme-dark [style*="color: #222"]{
  color:#e5e7eb!important;
}
html.nm-theme-dark [style*="border-bottom:1px solid #f0f0f0"],
html.nm-theme-dark [style*="border-bottom: 1px solid #f0f0f0"]{
  border-bottom-color:#374151!important;
}
html.nm-theme-dark .nas-modal > div,
html.nm-theme-dark #rewardNasModal > div{
  background:#111827!important;
  color:#e5e7eb!important;
  border:1px solid #374151!important;
}
html.nm-theme-dark .nas-list > div,
html.nm-theme-dark #rewardNasList > div{
  border-color:#374151!important;
  color:#e5e7eb!important;
}
/* Prevent native autofill and browser form styling from creating unreadable
   light text/light background combinations in dark mode. */
html.nm-theme-dark input:-webkit-autofill,
html.nm-theme-dark textarea:-webkit-autofill,
html.nm-theme-dark select:-webkit-autofill{
  -webkit-text-fill-color:#e5e7eb!important;
  box-shadow:0 0 0 1000px #0b1220 inset!important;
}
