/* Nahang floating-ui.css */
/* Nahang temporary refinement / site-wide, narrowly scoped mobile controls.
   Keep the existing accessibility and catalog buttons functional and tappable. */
@media (max-width: 767px) {
  :root {
    --nh-refine-dock-left: max(5px, env(safe-area-inset-left, 0px));
    --nh-refine-dock-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  /* A vertical edge dock occupies one 44px column, not two adjacent columns. */
  .nh-accessibility[data-nh-a11y] {
    left: var(--nh-refine-dock-left) !important;
    right: auto !important;
    bottom: calc(var(--nh-refine-dock-bottom) + 52px) !important;
  }
  .nhc-explorer-launch[data-nhc-toggle] {
    left: var(--nh-refine-dock-left) !important;
    right: auto !important;
    bottom: var(--nh-refine-dock-bottom) !important;
  }

  .nh-accessibility-toggle,
  .nhc-explorer-launch[data-nhc-toggle] {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  /* The settings dialog opens inward into the viewport, never off-screen. */
  .nh-accessibility[data-nh-a11y] > section {
    left: 0 !important;
    right: auto !important;
    width: min(325px, calc(100vw - 12px)) !important;
    max-height: calc(100dvh - 152px);
  }

  /* Anchor targets near the end of a page clear the fixed mobile dock. */
  html { scroll-padding-bottom: 104px; }
}

/* Stage 05 / Windows-inspired glass entrance. No network request or forced hold;
   blur lives on a short-lived compositor layer. Every click passes through. */
#nhr-startup {
  position: fixed;
  z-index: 2147482000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(15px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px));
  color: #f4f9ff;
  background: rgb(5 15 30 / .38);
  --nhr-startup-blur: 7px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s cubic-bezier(.18,.8,.22,1), visibility .28s;
  -webkit-backdrop-filter: blur(var(--nhr-startup-blur));
  backdrop-filter: blur(var(--nhr-startup-blur));
}
#nhr-startup[data-blur="off"] { --nhr-startup-blur: 0px; }
#nhr-startup[data-blur="soft"] { --nhr-startup-blur: 3px; }
#nhr-startup[data-blur="strong"] { --nhr-startup-blur: 10px; }
html.nhr-booting #nhr-startup {
  visibility: visible;
  opacity: 1;
}
#nhr-startup .nhr-startup-panel {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 13px;
  width: min(440px, calc(100vw - 32px));
  min-height: 260px;
  padding: 28px 28px 34px;
  overflow: hidden;
  border: 1px solid rgb(140 200 255 / .28);
  border-radius: clamp(20px, 4.2vw, 30px);
  background: linear-gradient(147deg, rgb(25 57 98 / .94), rgb(7 23 45 / .96) 78%);
  box-shadow: 0 30px 85px rgb(0 8 26 / .27), inset 0 1px 0 rgb(220 242 255 / .12);
  text-align: center;
  font-family: inherit;
}
#nhr-startup .nhr-startup-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 90px;
  background: radial-gradient(ellipse at 50% 0, rgb(76 166 255 / .21), transparent 72%);
  pointer-events: none;
}
#nhr-startup .nhr-startup-badge { position: relative; display: grid; place-items: center; width: 62px; height: 62px; }
#nhr-startup .nhr-startup-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(135 206 255 / .46);
  border-radius: 17px;
  color: #a4ddff;
  background: linear-gradient(140deg, rgb(33 123 244 / .27), rgb(22 82 177 / .11));
  box-shadow: inset 0 1px 0 rgb(220 242 255 / .2);
  font: 850 23px/1 system-ui,sans-serif;
  letter-spacing: -.08em;
}
#nhr-startup .nhr-startup-orbit {
  position: absolute;
  inset: -2px;
  border: 2px solid rgb(113 194 255 / .16);
  border-block-start-color: #65c7ff;
  border-radius: 50%;
  animation: nhr-spin 1.4s linear infinite;
}
#nhr-startup .nhr-startup-label {
  color: #91c7fa;
  font: 700 10px/1.5 system-ui,sans-serif;
  letter-spacing: .18em;
  direction: ltr;
}
#nhr-startup .nhr-startup-label i { display: inline-block; width: 4px; height: 4px; margin: 0 5px 2px; border-radius: 50%; background: #6ee0ff; }
#nhr-startup .nhr-startup-copy { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#nhr-startup .nhr-startup-copy strong {
  font-size: clamp(19px, 5.6vw, 25px);
  font-weight: 800;
  line-height: 1.35;
}
#nhr-startup .nhr-startup-copy small {
  color: #c0d6ef;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1.8;
  max-width: 34ch;
}
#nhr-startup .nhr-startup-state { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: #91b9dc; font-size: 10px; }
#nhr-startup .nhr-startup-dots { display: flex; align-items: center; gap: 4px; direction: ltr; }
#nhr-startup .nhr-startup-dots b { width: 4px; height: 4px; border-radius: 50%; background: #68c9ff; animation: nhr-dot .8s ease-in-out infinite alternate; }
#nhr-startup .nhr-startup-dots b:nth-child(2) { animation-delay: .15s; }
#nhr-startup .nhr-startup-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes nhr-dot { to { opacity: .24; transform: translateY(-3px); } }
#nhr-startup .nhr-startup-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1877fa, #69ccff 60%, #2978ea);
  transform: scaleX(.04);
  transform-origin: right;
}
html.nhr-booting #nhr-startup .nhr-startup-progress {
  animation: nhr-startup-progress 1.3s ease-out both;
}
@keyframes nhr-startup-progress {
  from { transform: scaleX(.04); }
  to { transform: scaleX(1); }
}
html.nhr-arrived .nhp-app .nhp-hero { animation: nhr-hero-arrive .45s ease-out both; }
@keyframes nhr-hero-arrive { from { opacity: .82; } to { opacity: 1; } }

/* Tiny action state beside a mouse; at the bottom on touch screens. */
#nhr-action-feedback {
  position: fixed;
  z-index: 2147482001;
  top: var(--nhr-pointer-y, 20px);
  left: var(--nhr-pointer-x, 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  width: max-content;
  max-width: min(250px, calc(100vw - 24px));
  padding: 8px 12px;
  direction: rtl;
  border: 1px solid rgb(111 181 255 / .25);
  border-radius: 12px;
  color: #f2f8ff;
  background: #0a1b33;
  box-shadow: 0 7px 22px rgb(0 0 0 / .14);
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .14s ease, visibility .14s ease;
}
#nhr-action-feedback[data-visible="true"] { opacity: 1; visibility: visible; }
#nhr-action-feedback .nhr-action-spinner {
  display: block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border: 2px solid rgb(129 199 255 / .22);
  border-top-color: #6eb6ff;
  border-radius: 50%;
  animation: nhr-spin .8s linear infinite;
}
@keyframes nhr-spin { to { rotate: 360deg; } }
#nhr-action-feedback:not([data-cursor="true"]) {
  top: auto;
  left: 50%;
  bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 72px));
  transform: translateX(-50%);
}
html[data-nh-theme="light"] #nhr-action-feedback {
  background: linear-gradient(135deg, #f9fcff, #eaf4ff);
  color: #123355;
  border-color: rgb(21 101 255 / .18);
  box-shadow: 0 9px 26px rgb(20 61 112 / .1);
}
html[data-nh-theme="light"] #nhr-startup { background: rgb(229 241 253 / .42); }
html[data-nh-theme="light"] #nhr-startup .nhr-startup-panel {
  color: #0b315b;
  border-color: rgb(38 119 201 / .21);
  background: linear-gradient(140deg, rgb(255 255 255 / .97), rgb(229 242 255 / .97));
  box-shadow: 0 22px 76px rgb(36 101 158 / .16), inset 0 1px 0 #fff;
}
html[data-nh-theme="light"] #nhr-startup .nhr-startup-copy small,
html[data-nh-theme="light"] #nhr-startup .nhr-startup-state { color: #52769a; }
html[data-nh-theme="light"] #nhr-startup .nhr-startup-mark { color: #246bc4; }
html[data-nh-theme="light"] #nhr-startup .nhr-startup-label { color: #3975b3; }
@media (hover: none), (pointer: coarse) {
  #nhr-action-feedback {
    top: auto;
    left: 50%;
    bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 72px));
    transform: translateX(-50%);
  }
}
@media (max-width: 767px) {
  #nhr-startup .nhr-startup-panel { min-height: 235px; padding: 24px 18px 28px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #nhr-startup, #nhr-action-feedback { transition: none; }
  #nhr-startup .nhr-startup-progress, #nhr-startup .nhr-startup-orbit,
  #nhr-startup .nhr-startup-dots b, #nhr-action-feedback .nhr-action-spinner {
    animation: none !important;
  }
  html.nhr-arrived .nhp-app .nhp-hero { animation: none !important; }
}

/* Context shortcuts, enabled explicitly per guest/customer audience in Tools. */
#nhr-context-menu {
  position: fixed;
  z-index: 2147482002;
  display: none;
  width: 190px;
  padding: 7px;
  background: #0e2039;
  border: 1px solid rgb(127 190 255 / .26);
  border-radius: 15px;
  box-shadow: 0 14px 42px rgb(0 5 17 / .24);
  color: #eff7ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
#nhr-context-menu[data-open="true"] { display: grid; gap: 3px; }
#nhr-context-menu a { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; color: inherit; border-radius: 9px; text-decoration: none; }
#nhr-context-menu a:hover, #nhr-context-menu a:focus-visible { color: #fff; background: rgb(46 129 239 / .29); outline: 1px solid #69b6ff; }
html[data-nh-theme="light"] #nhr-context-menu { background: #f4faff; color: #1b416b; box-shadow: 0 14px 42px rgb(25 83 145 / .15); }
html[data-nh-theme="light"] #nhr-context-menu a:hover, html[data-nh-theme="light"] #nhr-context-menu a:focus-visible { color: #13457f; }

/* Nahang hero.css */
/* Nahang PC / Stage 01: no styles outside the homepage hero. */
.nhp-app .nhp-hero .nhp-art .nhp-float-icon,
.nhp-app .nhp-hero .nhp-art .nhp-signal {
  pointer-events: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: color-mix(in srgb, var(--nhp-blue) 57%, transparent) !important;
  opacity: .43;
  filter: drop-shadow(0 3px 11px rgb(24 121 244 / .1));
}

@media (min-width: 768px) and (min-height: 760px) {
  .nhp-app .nhp-hero {
    min-height: calc(100svh - var(--nh-hero-header, 80px)) !important;
    display: flex;
    flex-direction: column;
  }
  .nhp-app .nhp-stage {
    width: 100%;
    flex: 1 0 auto;
    min-height: 0;
  }
  .nhp-app .nhp-hero-foot { flex: 0 0 auto; }
}

@media (max-width: 767px) {
  .nhp-app .nhp-hero {
    --nh-hero-edge: clamp(14px, 4.4vw, 24px);
    height: calc(100svh - var(--nh-hero-header, 74px));
    min-height: 0 !important;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 70px;
    overflow: hidden;
  }

  .nhp-app .nhp-stage {
    display: grid !important;
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(120px, 1fr);
    align-items: stretch !important;
    gap: clamp(2px, 1.25svh, 12px) !important;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0 !important;
    padding: clamp(7px, 1.6svh, 16px) var(--nh-hero-edge) 0 !important;
    margin: 0 auto;
  }

  .nhp-app .nhp-copy { width: 100%; min-height: 0; }
  .nhp-app .nhp-copy .nhp-eyebrow {
    margin: 0 0 clamp(4px, .8svh, 9px);
    font-size: 9px;
  }
  .nhp-app .nhp-copy :is(h1, h2) {
    font-size: clamp(26px, 7.25vw, 38px) !important;
    line-height: 1.18 !important;
    margin-bottom: clamp(5px, 1svh, 12px) !important;
    max-width: 100%;
  }
  .nhp-app .nhp-copy .nhp-description {
    font-size: clamp(11px, 2.9vw, 13px);
    line-height: 1.65;
    max-width: 56ch;
    margin: 0;
    min-height: 0 !important;
  }

  .nhp-app .nhp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
    margin-top: clamp(7px, 1.4svh, 14px) !important;
  }
  .nhp-app .nhp-actions .nhp-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 6px;
    font-size: 11px;
    text-align: center;
  }
  .nhp-app .nhp-actions .nhp-icon { width: 14px; height: 14px; flex: 0 0 14px; }

  /* Mobile hero advances automatically. Remove its visual controller entirely,
     including on real touch devices where browser UI reduces available height. */
  .nhp-app .nhp-hero .nhp-controls { display: none !important; }

  .nhp-app .nhp-art {
    width: 100% !important;
    height: min(100%, clamp(165px, 32svh, 250px)) !important;
    max-width: min(78vw, 355px) !important;
    min-height: 0;
    justify-self: center;
    align-self: start;
    overflow: visible;
    transform: translate3d(0, -6px, 0) !important;
  }
  .nhp-app .nhp-art .nhp-layer--whale { inset-block-start: 5%; }
  .nhp-app .nhp-art .nhp-layer--hardware { inset-block-start: 38%; }
  .nhp-app .nhp-art .nhp-layer--network { inset-block-start: -8%; }
  .nhp-app .nhp-art .nhp-layer--solution { inset-block-start: 0; }
  .nhp-app .nhp-art .nhp-layer--code { inset-block-start: 32%; }
  .nhp-app .nhp-art .nhp-float-icon { opacity: .3; scale: .76; }
  .nhp-app .nhp-pointer-light { opacity: .15; }

  /* Data Saver intentionally omits decoration; keep the headline complete. */
  .nhp-app .nhp-hero[data-lite="true"] .nhp-type-reserve {
    visibility: visible !important;
  }
  .nhp-app .nhp-hero[data-lite="true"] .nhp-type-text {
    display: none !important;
  }

  /* All three value statements and the Services link remain within the hero. */
  .nhp-app .nhp-hero-foot {
    width: calc(100% - var(--nh-hero-edge) * 2) !important;
    min-width: 0;
    height: 70px;
    margin-inline: auto;
    padding: 3px 0 6px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
    align-items: center;
    justify-items: start;
    gap: 0 10px !important;
    font-size: clamp(10px, 2.75vw, 12px) !important;
    line-height: 1.2;
  }
  .nhp-app .nhp-hero-foot > :is(span, a) {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: normal;
    min-width: 0;
    margin: 0;
  }
  .nhp-app .nhp-hero-foot .nhp-icon { width: 14px; height: 14px; flex: 0 0 14px; }
}

@media (max-width: 390px) {
  .nhp-app .nhp-copy :is(h1, h2) { font-size: clamp(25px, 7vw, 31px) !important; }
  .nhp-app .nhp-actions .nhp-button { font-size: 10px; }
}

/* Tablet and mobile-landscape: preserve the original art while avoiding text
   or button clipping when browser chrome reduces the usable viewport. */
@media (min-width: 768px) and (max-width: 1100px) {
  .nhp-app .nhp-hero .nhp-copy { min-width: 0; }
  .nhp-app .nhp-hero .nhp-copy :is(h1,h2) { font-size: clamp(29px, 4.3vw, 49px); line-height: 1.22; }
  .nhp-app .nhp-hero .nhp-description { max-width: 55ch; }
  .nhp-app .nhp-hero .nhp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .nhp-app .nhp-hero .nhp-art { max-width: 100%; min-width: 0; }
}
@media (max-width: 767px) {
  .nhp-app .nhp-hero .nhp-art img,
  .nhp-app .nhp-hero .nhp-art picture { max-width: 100%; object-fit: contain; }
  .nhp-app .nhp-hero .nhp-actions .nhp-button { line-height: 1.3; overflow-wrap: normal; }
}

/* Short devices and landscape must never silently crop primary content. */
@media (max-width: 767px) and (max-height: 630px) {
  .nhp-app .nhp-hero {
    height: auto !important;
    min-height: calc(100svh - var(--nh-hero-header, 74px)) !important;
    grid-template-rows: auto auto;
    overflow: visible;
  }
  .nhp-app .nhp-stage {
    height: auto;
    min-height: 420px !important;
    grid-template-rows: auto minmax(150px, 1fr);
  }
  .nhp-app .nhp-copy :is(h1, h2) { font-size: 25px !important; }
  .nhp-app .nhp-art { height: 170px !important; }
  .nhp-app .nhp-hero-foot { height: auto; min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .nhp-app .nhp-hero .nhp-float-icon,
  .nhp-app .nhp-hero .nhp-signal { animation: none !important; }
  .nhp-app .nhp-hero .nhp-type-reserve { visibility: visible !important; }
  .nhp-app .nhp-hero .nhp-type-text { display: none !important; }
}

/* Nahang services.css */
/* Stage 02 — only the existing homepage Services / 02 chapter. */
.nhp-app #services.nhp-services {
  --nh-services-accent: var(--nhp-brand, #1565ff);
  --nh-services-radius: 14px;
  scroll-margin-top: 96px;
}

.nhp-app #services .nhp-service-layout,
.nhp-app #services .nhp-service-stage,
.nhp-app #services .nhp-service-tabs,
.nhp-app #services .nhp-service-panel {
  min-width: 0;
}

/* Improve tap and keyboard clarity without replacing the theme's tab logic. */
.nhp-app #services .nhp-service-tabs > a {
  position: relative;
  border-radius: var(--nh-services-radius);
  outline-offset: 3px;
  transition: border-color .18s ease, background-color .18s ease,
    box-shadow .18s ease, translate .18s ease;
}

.nhp-app #services .nhp-service-tabs > a:focus-visible,
.nhp-app #services .nhp-text-link:focus-visible {
  outline: 2px solid var(--nh-services-accent);
  outline-offset: 3px;
}

.nhp-app #services .nhp-service-tabs > a[aria-selected="true"] {
  border-color: var(--nh-services-accent);
  background: color-mix(in srgb, var(--nh-services-accent) 10%, var(--nhp-panel));
  box-shadow: inset -3px 0 0 var(--nh-services-accent);
}

.nhp-app #services .nhp-service-stage[aria-busy="true"] {
  cursor: progress;
}

.nhp-app #services .nhp-service-art > .nhp-media,
.nhp-app #services .nhp-service-art > .nhp-media img {
  max-width: 100%;
  min-width: 0;
}

.nhp-app #services .nhp-service-art > .nhp-media img {
  object-fit: contain !important;
  object-position: center;
}

.nhp-app #services .nhp-service-summary {
  min-height: 0;
}

.nhp-app #services .nhp-service-summary p {
  min-height: 0;
  max-width: 64ch;
  overflow-wrap: anywhere;
}

.nhp-app #services .nhp-service-error {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Mid-size screens retain the native side-by-side layout. */
@media (min-width: 768px) {
  .nhp-app #services .nhp-service-layout {
    column-gap: clamp(18px, 2.6vw, 36px);
    row-gap: clamp(18px, 2.4vw, 28px);
  }

  .nhp-app #services .nhp-chapter-inner {
    padding-block: clamp(42px, 4.6vw, 64px);
  }

  .nhp-app #services .nhp-service-tabs > a {
    min-height: 68px;
    padding: 10px 12px;
  }

  .nhp-app #services .nhp-service-art {
    height: clamp(230px, 23vw, 290px);
  }

  .nhp-app #services .nhp-service-summary {
    padding-top: 13px;
  }
}

/* Small screens: all four service choices stay visible without horizontal scrolling. */
@media (max-width: 767px) {
  .nhp-app #services .nhp-chapter-inner {
    width: calc(100% - 36px) !important;
    max-width: 560px;
    padding-block: clamp(27px, 5svh, 42px) !important;
  }

  .nhp-app #services .nhp-service-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "tabs" "scene";
    align-items: start;
    gap: clamp(12px, 2svh, 17px) !important;
  }

  .nhp-app #services .nhp-chapter-intro .nhp-eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .nhp-app #services .nhp-chapter-intro h2 {
    font-size: clamp(27px, 7.1vw, 34px);
    line-height: 1.32;
    margin: 0 0 8px;
  }

  .nhp-app #services .nhp-chapter-intro > p:not(.nhp-eyebrow) {
    margin: 0 0 5px;
    font-size: clamp(11.5px, 3vw, 13px);
    line-height: 1.8;
    max-width: 52ch;
  }

  .nhp-app #services .nhp-chapter-intro .nhp-text-link {
    min-height: 38px;
    font-size: 12px;
    gap: 7px;
  }

  .nhp-app #services .nhp-service-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nhp-app #services .nhp-service-tabs > a {
    min-width: 0;
    min-height: 50px;
    gap: 7px;
    padding: 8px 10px;
    font-size: clamp(10.5px, 2.75vw, 12px);
    line-height: 1.5;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: none;
  }

  .nhp-app #services .nhp-service-tabs > a > .nhp-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .nhp-app #services .nhp-service-tabs > a[aria-selected="true"] {
    box-shadow: inset 0 -2px 0 var(--nh-services-accent);
  }

  .nhp-app #services .nhp-service-art {
    height: clamp(175px, 48vw, 235px);
    min-height: 0;
  }

  .nhp-app #services .nhp-art-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    opacity: .75;
    pointer-events: none;
  }

  .nhp-app #services .nhp-art-mark .nhp-icon {
    width: 17px;
    height: 17px;
  }

  .nhp-app #services .nhp-service-summary {
    min-height: 0;
    padding-top: 10px;
  }

  .nhp-app #services .nhp-service-summary h3 {
    font-size: clamp(17px, 4.5vw, 20px);
    line-height: 1.55;
    margin-bottom: 5px;
  }

  .nhp-app #services .nhp-service-summary p {
    margin: 0 0 5px;
    font-size: clamp(11px, 2.95vw, 13px);
    line-height: 1.75;
  }

  .nhp-app #services .nhp-service-summary .nhp-text-link {
    min-height: 40px;
    gap: 7px;
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  .nhp-app #services .nhp-chapter-inner {
    width: calc(100% - 28px) !important;
  }

  .nhp-app #services .nhp-service-tabs > a {
    padding-inline: 7px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nhp-app #services .nhp-service-tabs > a {
    transition: none !important;
  }
}

/* Nahang loops.css */
/* Stage 03: existing Nahang content, no new data queries or image assets. */
.nhp-app .nhr-loop-viewport {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}
.nhp-app .nhr-loop-track {
  display: flex !important;
  direction: rtl;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 3px 1px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1px;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}
.nhp-app .nhr-loop-track::-webkit-scrollbar { display: none; }
.nhp-app .nhr-loop-track > * {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  min-width: 0;
  box-sizing: border-box;
}
.nhp-app .nhr-loop-track:focus-visible {
  outline: 2px solid var(--nhp-brand, #1565ff);
  outline-offset: -3px;
  border-radius: 12px;
}
.nhp-app .nhr-loop-copy { pointer-events: none !important; }
.nhp-app .nhr-native-hint { display: none; }

.nhp-app .nhr-loop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-block: 3px 7px;
  color: var(--nhp-muted);
}
.nhp-app .nhr-loop-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.7;
  opacity: .85;
  white-space: normal;
}
.nhp-app .nhr-loop-gesture {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--nhp-brand) 10%, var(--nhp-panel));
  border: 1px solid var(--nhp-border);
  color: var(--nhp-blue);
  font: 600 17px/1 system-ui,sans-serif;
}
.nhp-app .nhr-loop-buttons { display: flex; align-items: center; gap: 6px; }
.nhp-app .nhr-loop-buttons button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--nhp-border);
  border-radius: 11px;
  color: var(--nhp-blue);
  background: var(--nhp-panel);
  font: 600 25px/1 system-ui,sans-serif;
  transition: background .15s ease, border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .nhp-app .nhr-loop-buttons button:hover {
    border-color: var(--nhp-brand);
    background: color-mix(in srgb, var(--nhp-brand) 9%, var(--nhp-panel));
  }
}

/* Journal: turn the same three real articles into compact, swipeable cards. */
.nhp-app #magazine .nhp-journal-list { min-width: 0; }
.nhp-app #magazine .nhp-journal-list .nhr-loop-track > .nhp-journal-card {
  flex: 0 0 calc(100% - 24px);
  margin: 0 !important;
  padding: clamp(13px, 1.7vw, 18px) !important;
  display: grid;
  grid-template-columns: minmax(115px, .78fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(12px, 1.8vw, 20px);
  min-height: 266px;
  border: 1px solid var(--nhp-border);
  border-radius: 16px;
  background: var(--nhp-panel);
  overflow: hidden;
}
.nhp-app #magazine .nhp-journal-card .nhp-journal-image {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 12px;
}
.nhp-app #magazine .nhp-journal-card h3 {
  margin: 6px 0;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.nhp-app #magazine .nhp-journal-card p {
  font-size: 11.5px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.nhp-app #magazine .nhp-journal-list > .nhp-text-link {
  display: inline-flex;
  margin-top: 5px;
}
.nhp-app #magazine .nhp-academy-card { align-self: stretch; }

/* Product catalog: retain the real product links and create a lightweight rail. */
.nhp-app #store .nhp-live-catalog { min-width: 0; overflow: hidden; }
.nhp-app #store .nhp-live-products.nhr-loop-track {
  display: flex !important;
  gap: 12px;
  padding-block: 3px 9px;
}
.nhp-app #store .nhp-live-products.nhr-loop-track > a {
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 100px;
  padding: 13px 15px;
  border: 1px solid var(--nhp-border);
  border-radius: 12px;
  background: var(--nhp-panel);
  box-shadow: 0 5px 16px var(--nhp-shadow);
  font-size: 12px;
  line-height: 1.7;
}
.nhp-app #store .nhp-live-products.nhr-loop-track > a > span:first-child {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.nhp-app #store .nhp-live-products.nhr-loop-track > a > span:last-child {
  white-space: nowrap;
  font-size: 10px;
}

/* Existing native product-category and Academy rails keep their autoplay.
   The partial next card and quiet gesture hint make finger interaction clear. */
@media (max-width: 1100px) {
  .nhp-app #store [data-body-carousel] { --rail-items: 2.4; }
  .nhp-app #store .nhp-live-products.nhr-loop-track > a { flex-basis: 61%; }
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .nhp-app .nhr-loop-hint { opacity: .65; }
}
@media (max-width: 767px) {
  .nhp-app .nhr-native-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-block: 3px;
    font-size: 10px;
    line-height: 1.65;
    color: var(--nhp-muted);
    opacity: .82;
  }
  .nhp-app .nhr-native-hint > span {
    color: var(--nhp-blue);
    font: 600 18px/1 system-ui,sans-serif;
  }
  .nhp-app #store [data-body-carousel] { --rail-items: 1.28; --rail-gap: 10px; }
  .nhp-app #store [data-carousel-track] { scrollbar-width: none; }
  .nhp-app #store [data-carousel-track]::-webkit-scrollbar { display: none; }
  .nhp-app #store [data-carousel-controls] [data-carousel-prev],
  .nhp-app #store [data-carousel-controls] [data-carousel-next],
  .nhp-app #magazine [data-carousel-controls] [data-carousel-prev],
  .nhp-app #magazine [data-carousel-controls] [data-carousel-next] { display: none !important; }
  .nhp-app #store [data-carousel-controls] button[data-carousel-pause],
  .nhp-app #magazine [data-carousel-controls] button[data-carousel-pause] {
    min-width: 0;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: 8px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
  }
  .nhp-app #store [data-body-carousel] [data-carousel-controls],
  .nhp-app #magazine [data-body-carousel] [data-carousel-controls] {
    min-height: 32px;
    gap: 6px;
    margin-block: 0 5px;
  }
  .nhp-app .nhr-loop-buttons { display: none; }
  .nhp-app .nhr-loop-meta { min-height: 29px; margin-block: 2px 6px; }
  .nhp-app .nhr-loop-hint { font-size: 10px; }
  .nhp-app .nhr-loop-gesture { flex-basis: 23px; height: 23px; font-size: 15px; }

  .nhp-app #magazine .nhp-journal-list .nhr-loop-track > .nhp-journal-card {
    flex-basis: calc(100% - 35px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 12px !important;
    border-radius: 14px;
  }
  .nhp-app #magazine .nhp-journal-card .nhp-journal-image {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
  .nhp-app #magazine .nhp-journal-card h3 {
    margin: 5px 0;
    font-size: clamp(14px, 3.9vw, 17px);
    line-height: 1.65;
    -webkit-line-clamp: 2;
  }
  .nhp-app #magazine .nhp-journal-card p {
    font-size: 11px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
  }
  .nhp-app #magazine .nhp-journal-card .nhp-text-link {
    min-height: 35px;
    margin-top: 4px;
    font-size: 11px;
  }
  .nhp-app #store .nhp-live-products.nhr-loop-track > a {
    flex-basis: calc(100% - 33px);
    min-height: 95px;
    padding: 12px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nhp-app .nhr-loop-track { scroll-behavior: auto !important; }
  .nhp-app .nhr-loop-buttons button { transition: none !important; }
}

/* Physical touch devices can report a wide layout viewport (browser zoom,
   desktop-site mode, or hybrid tablets). The visual sliders stay control-free
   there too; touch, keyboard and native autoplay still work. */
@media (max-width: 767px), (max-width: 1024px) and (pointer: coarse) {
  html body .nhp-app .nhp-hero .nhp-controls,
  html body .nhp-app #store [data-carousel-controls],
  html body .nhp-app #magazine [data-carousel-controls] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .nhp-app .nhr-loop-buttons { display: none !important; }
  .nhp-app .nhr-native-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-block: 3px;
    font-size: 10px;
    color: var(--nhp-muted);
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .nhp-app .nhp-hero .nhp-copy :is(h1, h2) {
    font-size: clamp(34px, 4.45vw, 56px);
    line-height: 1.22;
    overflow-wrap: normal;
  }
  .nhp-app .nhp-hero .nhp-art { min-width: 0; max-width: 100%; }
  .nhp-app #magazine .nhp-journal-card .nhp-journal-image { aspect-ratio: 16 / 10; }
}
@media (max-width: 767px) and (max-height: 740px) {
  .nhp-app .nhp-hero .nhp-art {
    height: min(100%, clamp(148px, 26svh, 215px)) !important;
    max-width: min(74vw, 310px) !important;
  }
  .nhp-app .nhp-hero .nhp-copy :is(h1, h2) {
    font-size: clamp(24px, 6.8vw, 32px) !important;
    line-height: 1.22 !important;
  }
}
