/* Name sign preview test page (staging only, 2026-10-17) */
@font-face { font-family: "LamassuMelthoAdiabene"; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 163.381%; ascent-override: 143.14%; descent-override: 155.113%; src: url("fonts/SyrCOMAdiabene.otf") format("opentype"); unicode-range: U+0700-074F; }
@font-face { font-family: "LamassuMelthoNisibin"; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 166.085%; ascent-override: 143.14%; descent-override: 171.144%; src: url("fonts/SyrCOMNisibin.otf") format("opentype"); unicode-range: U+0700-074F; }

.ns-page { max-width: 40rem; margin: 0 auto; padding-bottom: 2rem; }
.ns-page h1 { font-size: 1.35rem; margin: 0.25rem 0 0.5rem; }
.ns-page .ns-lede { margin: 0 0 1rem; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.45; }
.ns-page [hidden] { display: none !important; }

.ns-stage { position: relative; display: grid; gap: 0.55rem; }
.ns-frame { position: relative; z-index: 2; background: #e7dccb; box-shadow: 0 18px 40px rgba(62, 46, 28, 0.1); }
.ns-preview {
  background: radial-gradient(circle at 48% 40%, #f4eee4 0%, #e7dccb 55%, #d4c4b0 100%);
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  display: block;
  position: relative;
  padding: 0;
}
.ns-preview .ns-svg { width: 100%; height: 100%; display: block; }
.ns-preview .ns-meta {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #5c5348;
}
.ns-preview .ns-back { opacity: 1; }

.ns-ov-row {
  position: absolute; z-index: 2;
  top: 0.5rem; left: 0.5rem; right: 0.5rem;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 0.22rem; pointer-events: none;
}
.ns-ov-row > .ns-ov { pointer-events: auto; }
.ns-ov { position: absolute; z-index: 2; display: flex; width: max-content; max-width: 46%; }
.ns-ov-row .ns-ov {
  position: relative; top: auto; left: auto; right: auto; transform: none;
  flex: 0 1 33%; max-width: 33%; min-width: 0; justify-content: center;
}
.ns-ov-row .ns-ov--font { justify-content: flex-start; }
.ns-ov-row .ns-ov--join { justify-content: flex-end; }
.ns-ov.is-open { z-index: 6; }
.ns-ov--cut { bottom: 0.5rem; left: 0.5rem; }
.ns-ov--stack { bottom: 0.5rem; right: 0.5rem; flex-direction: column; align-items: flex-end; gap: 0.4rem; max-width: 48%; }
.ns-chip--font { padding-right: 0.8rem; }
.ns-chip--helper { padding: 0.3rem 0.8rem 0.3rem 0.3rem; gap: 0.3rem; }

.ns-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; max-width: 100%; min-width: 44px;
  padding: 0.3rem 0.55rem 0.3rem 0.35rem;
  border: 0; border-radius: 8px;
  background: rgba(28, 22, 18, 0.78); color: #f7f1e8;
  font: 600 0.75rem/1.15 var(--font-body), "Montserrat", sans-serif;
  cursor: pointer; text-align: start;
  box-shadow: 0 2px 8px rgba(28, 22, 18, 0.18);
  touch-action: manipulation;
}
.ns-chip--end { flex-direction: row; padding: 0.3rem 0.35rem 0.3rem 0.55rem; }
.ns-chip__label { min-width: 0; white-space: normal; }
.ns-chip:disabled { opacity: 0.45; cursor: default; }
.ns-chip:focus-visible,
.ns-menu button:focus-visible,
.ns-cats button:focus-visible,
.ns-opts button:focus-visible,
.ns-pop input:focus-visible,
.ns-helper-pick button:focus-visible,
.ns-foot select:focus-visible {
  outline: 2px solid #f7f1e8; outline-offset: 2px;
}

.ns-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.ns-ico--font, .ns-ico--join, .ns-ico--helper, .ns-ico--mat {
  height: 28px; border-radius: 4px; background: rgba(255, 255, 255, 0.14);
}
.ns-ico--font, .ns-ico--join, .ns-ico--mat { width: 28px; position: relative; }
.ns-ico--font { gap: 0; }
.ns-ico--font .ns-alaph { font-size: 18px; }
.ns-ico--helper { min-width: 28px; padding: 0 2px; gap: 1px; align-items: center; }
.ns-ico--helper .ns-latin { font-weight: 700; font-size: 13px; line-height: 1; }
.ns-ico--helper .ns-arrow { font-size: 9px; line-height: 1; opacity: 0.9; display: inline-block; transform: scaleX(0.55); transform-origin: center; }
.ns-ico--helper .ns-alaph--east {
  font-size: 13px; line-height: 1; display: inline-block;
  transform: scale(1.72); transform-origin: center center;
}
.ns-alaph { font-size: 16px; line-height: 1; color: #f7f1e8; }
.ns-alaph--east, .ns-ico--join { font-family: "LamassuMelthoAdiabene", "LamassuSyriacIdiqlat", sans-serif; }
.ns-alaph--estr { font-family: "LamassuMelthoNisibin", "LamassuSyriacIdiqlat", sans-serif; }
.ns-latin { font-weight: 700; font-size: 13px; line-height: 1; }
.ns-arrow { font-size: 11px; line-height: 1; opacity: 0.9; }
.ns-ico--join { font-size: 17px; line-height: 1; overflow: hidden; }
.ns-ab--pair, .ns-ab--split { display: flex; align-items: center; }
.ns-ab--pair { gap: 0; }
.ns-ab--pair span + span { margin-inline-start: -0.06em; }
.ns-ab--split { display: none; gap: 0.28rem; }
.ns-chip[aria-pressed="false"] .ns-ab--pair { display: none; }
.ns-chip[aria-pressed="false"] .ns-ab--split { display: flex; }
.ns-sq { position: absolute; width: 15px; height: 15px; border-radius: 2px; border: 1px solid rgba(247, 241, 232, 0.7); }
.ns-sq--white { right: 2px; top: 2px; background: #fff; }
.ns-sq--wood {
  left: 2px; bottom: 2px; z-index: 1;
  background: repeating-linear-gradient(90deg, #c4a574 0 2px, #8d6844 2px 3px, #e0c79a 3px 5px);
}
.ns-ico--mirror .ns-sq--white { left: 2px; right: auto; top: 2px; }
.ns-ico--mirror .ns-sq--wood { right: 2px; left: auto; bottom: 2px; }
.ns-check { display: inline-flex; width: 22px; height: 22px; flex: 0 0 auto; }
.ns-check svg { display: block; }
.ns-chip[aria-pressed="false"] .ns-check__tick { display: none; }

.ns-menu, .ns-cats, .ns-opts, .ns-pop {
  background: rgba(28, 22, 18, 0.92); color: #f7f1e8;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(28, 22, 18, 0.28);
}
.ns-menu {
  position: absolute; top: calc(100% + 0.35rem); left: 0;
  margin: 0; padding: 0.25rem; list-style: none;
  min-width: 13rem; max-width: min(18rem, 78vw);
  max-height: min(16rem, 40vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b5aea4 transparent;
}
.ns-menu::-webkit-scrollbar { width: 8px; height: 8px; }
.ns-menu::-webkit-scrollbar-thumb { background: #b5aea4; border-radius: 3px; }
.ns-menu button, .ns-cats button, .ns-opts button, .ns-helper-pick button {
  display: flex; align-items: center; gap: 0.45rem;
  width: 100%; min-height: 44px; padding: 0.35rem 0.6rem;
  border: 0; border-radius: 6px; background: transparent; color: inherit;
  font: 500 0.9rem/1.25 var(--font-body), "Montserrat", sans-serif;
  text-align: start; cursor: pointer; touch-action: manipulation;
}
.ns-menu button:hover, .ns-cats button:hover, .ns-opts button:hover, .ns-helper-pick button:hover,
.ns-menu button[aria-current="true"], .ns-opts button[aria-current="true"],
.ns-cats button[aria-expanded="true"] { background: rgba(247, 241, 232, 0.14); }
.ns-opts button.is-priced[aria-current="true"]::after,
.ns-menu button.is-priced[aria-current="true"]::after {
  content: "";
  width: 0.55rem;
  height: 0.32rem;
  margin-inline-start: auto;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}
.ns-chip.is-priced[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #e7d3a4, 0 2px 8px rgba(28, 22, 18, 0.18); }
.ns-cats button:disabled { opacity: 0.4; cursor: default; }
.ns-tri { width: 0; height: 0; border-style: solid; flex: 0 0 auto; }
.ns-fly--right .ns-tri { margin-inline-start: auto; border-width: 5px 0 5px 7px; border-color: transparent transparent transparent currentColor; }
.ns-fly--left .ns-tri { margin-inline-end: 0.35rem; border-width: 5px 7px 5px 0; border-color: transparent currentColor transparent transparent; }

.ns-fly {
  position: absolute; bottom: calc(100% + 0.35rem);
  display: flex; align-items: flex-end; gap: 0.35rem;
}
.ns-fly--right { left: 0; }
.ns-fly--left { right: 0; }
.ns-cats, .ns-opts {
  margin: 0; padding: 0.25rem; list-style: none;
  min-width: 8.5rem; max-width: 12rem;
}
.ns-opts-wrap { position: relative; flex: 0 0 auto; min-width: 8.5rem; max-width: 12rem; }
.ns-opts-wrap .ns-opts {
  margin: 0; width: 100%; max-width: none;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ns-opts-wrap .ns-opts::-webkit-scrollbar { display: none; width: 0; height: 0; }
.ns-scrollbar {
  position: absolute; top: 0.3rem; bottom: 0.3rem; right: 0.15rem;
  width: 5px; pointer-events: auto; touch-action: none; cursor: pointer;
}
.ns-scrollbar::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -7px; right: -7px;
}
.ns-scrollbar[hidden] { display: none !important; }
.ns-scrollbar__track {
  position: absolute; inset: 0;
  background: rgba(247, 241, 232, 0.2); border-radius: 3px;
}
.ns-scrollbar__thumb {
  position: absolute; left: 0; right: 0; top: 0;
  min-height: 1.25rem; border-radius: 3px; background: #b5aea4;
  will-change: transform;
}
.ns-swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid rgba(247, 241, 232, 0.75); flex: 0 0 auto; }

.ns-pop {
  position: absolute; top: calc(100% + 0.35rem); left: 50%; transform: translateX(-50%);
  width: min(16rem, 86vw); padding: 0.6rem; display: grid; gap: 0.35rem;
  overflow: visible;
}
.ns-pop__x {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  z-index: 3;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(247, 241, 232, 0.75);
  border-radius: 50%;
  background: #1f2426;
  color: #f7f1e8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.ns-pop label { font-size: 0.75rem; font-weight: 600; }
.ns-en-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem; }
.ns-ai-status { color: #fff; font-size: 0.68rem; font-weight: 600; line-height: 1.2; text-align: right; }
.ns-ai-status.is-done { color: #3dce7a; }
.ns-ai-status.is-fade { opacity: 0; transition: opacity 0.8s ease; }
.ns-en-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.35rem; }
.ns-pop input {
  flex: 1 1 8rem; width: auto; min-width: 0; min-height: 44px; padding: 0.4rem 0.55rem;
  border: 0; border-radius: 6px; font-size: 1rem; background: #fff; color: #1f2426;
}
.ns-en-submit {
  flex: 0 0 auto; min-height: 44px; padding: 0 0.7rem;
  border: 0; border-radius: 6px; background: #fff; color: #1f2426;
  font: 600 0.78rem/1 var(--font-body), "Montserrat", sans-serif;
  cursor: pointer; touch-action: manipulation;
}
.ns-pop .ns-note { margin: 0; color: #f7f1e8; font-size: 0.8rem; line-height: 1.35; }
.ns-helper-pick { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.ns-pop .ns-opts-wrap { width: 100%; min-width: 0; max-width: none; }
.ns-pop .ns-scrollbar { left: 0.15rem; right: auto; }
.ns-opts-wrap .ns-helper-pick {
  width: 100%;
  max-height: calc(44px * 2 + 0.25rem - 12px);
  padding-left: 0.7rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ns-opts-wrap .ns-helper-pick::-webkit-scrollbar { display: none; width: 0; height: 0; }
.ns-helper-pick button {
  background: rgba(247, 241, 232, 0.12);
  font-family: "LamassuSyriacIdiqlat", "LamassuMelthoAdiabene", sans-serif;
  font-size: 1.15rem;
  touch-action: none;
}

.ns-kbd-slot { position: relative; z-index: 1; margin: 0; }
.ns-page .sk-keyboard { --sk-font: "LamassuSyriacIdiqlat", "LamassuMelthoAdiabene", sans-serif; margin: 0; padding: 6px; max-width: none; width: 100%; }
.ns-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; font-size: 0.92rem; }
.ns-size { font-weight: 600; }
.ns-foot select { min-height: 44px; min-width: 4.5rem; padding: 0 0.45rem; border: 1px solid var(--sand); border-radius: 6px; background: #fff; font-size: 1rem; }
.ns-size-unit { color: var(--text-secondary); }
.ns-price { margin: 0; font-weight: 600; }
.ns-foot .ns-meta { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }

@media (max-width: 720px) {
  .ns-ov-row .ns-ov--font .ns-chip__label, .ns-ov-row .ns-ov--join .ns-chip__label { max-width: 4.85rem; }
  .ns-ov-row .ns-ov--helper .ns-chip__label { max-width: 4.65rem; }
}
@media (max-width: 420px) {
  .ns-ov-row { gap: 0.14rem; }
  .ns-ov-row .ns-ov { flex-basis: 32%; max-width: 32%; }
  .ns-ov-row .ns-ov--font .ns-chip__label, .ns-ov-row .ns-ov--join .ns-chip__label { max-width: 3.65rem; }
  .ns-ov-row .ns-ov--helper .ns-chip__label { max-width: 3.55rem; }
  .ns-ov--cut, .ns-ov--stack { max-width: 50%; }
  .ns-ov--cut .ns-chip__label, .ns-ov--stack .ns-chip__label { max-width: 7.4rem; }
  .ns-cats, .ns-opts-wrap { min-width: 7.6rem; }
}
@media (min-width: 960px) {
  .ns-page { max-width: 52rem; }
  .ns-page h1 { font-size: 1.75rem; }
}
