/* Helper — shared styles for hand-built tools (background remover, stamp typing, certificate maker).
   Light tokens only: on tool pages dark mode comes from the page-level colour filter. */
.nt { max-width: 1200px; margin: 0 auto; padding: 18px clamp(14px, 4vw, 32px) 40px; font-size: 16px; letter-spacing: -0.01em; }
html[lang="hi"] .nt { letter-spacing: 0; }
.nt h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }
html[lang="hi"] .nt h1 { line-height: 1.3; letter-spacing: 0; }
.nt-sub { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: #6e6e73; max-width: 70ch; }
.nt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: start; margin-top: 22px; }
.nt-grid.rev { grid-template-columns: 410px minmax(0, 1fr); }
.nt-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1000px) { .nt-grid, .nt-grid.rev { grid-template-columns: minmax(0, 1fr); } }
.nt-sticky { position: sticky; top: 74px; }
@media (max-width: 1000px) { .nt-sticky { position: static; } }

.nt-card { background: #fff; border-radius: 24px; padding: clamp(16px, 3vw, 24px); box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.14), 0 8px 28px rgba(0, 0, 0, 0.05); }
.nt-card > h2, .nt-step { margin: 0 0 14px; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; color: #1d1d1f; }
.nt-step i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #0071e3; color: #fff; font-style: normal; font-size: 14px; display: grid; place-items: center; }
.nt-help { margin: -6px 0 14px; font-size: 14px; color: #6e6e73; line-height: 1.5; }

.nt-drop { border: 1.5px dashed rgba(0, 113, 227, 0.5); border-radius: 24px; background: linear-gradient(180deg, #f6faff, #eaf3ff); padding: clamp(28px, 6vw, 56px) 20px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: background 0.2s, border-color 0.2s; }
.nt-drop:hover, .nt-drop.over { border-color: #0071e3; background: linear-gradient(180deg, #eef6ff, #dfecff); }
.nt-drop .big { width: 60px; height: 60px; border-radius: 18px; background: #fff; color: #0071e3; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 113, 227, 0.18); }
.nt-drop .big svg { width: 28px; height: 28px; }
.nt-drop b { font-size: 20px; letter-spacing: -0.02em; }
.nt-drop small { color: #6e6e73; font-size: 14px; }

.nt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 14px; min-height: 48px; padding: 0 20px; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; background: #0071e3; color: #fff; transition: filter 0.15s, transform 0.1s; text-decoration: none; }
.nt-btn:hover { filter: brightness(1.07); color: #fff; }
.nt-btn:active { transform: scale(0.985); }
.nt-btn:disabled, .nt-btn[aria-disabled="true"] { background: #b8c4dc; cursor: not-allowed; filter: none; transform: none; }
.nt-btn.soft { background: #e8f2fe; color: #0071e3; }
.nt-btn.soft:hover { background: #dbeafd; color: #0071e3; }
.nt-btn.ghost { background: rgba(118, 118, 128, 0.12); color: #1d1d1f; }
.nt-btn.ghost:hover { background: rgba(118, 118, 128, 0.2); color: #1d1d1f; }
.nt-btn.green { background: #248a3d; }
.nt-btn.red { background: #d70015; }
.nt-btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.nt-btn.block { width: 100%; }
.nt-btn svg { width: 18px; height: 18px; flex: none; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.nt-f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.nt-f > label, .nt-label { font-size: 13.5px; font-weight: 600; color: #6e6e73; }
.nt-f input[type=text], .nt-f input[type=number], .nt-f input[type=date], .nt-f input[type=search], .nt-f select, .nt-f textarea, .nt-input {
  width: 100%; min-height: 46px; border: 0; border-radius: 12px; background: rgba(118, 118, 128, 0.1); padding: 0 14px; font: inherit; font-size: 16px; color: #1d1d1f;
}
.nt-f textarea { padding: 12px 14px; min-height: 90px; resize: vertical; line-height: 1.5; }
.nt-f input:focus, .nt-f select:focus, .nt-f textarea:focus, .nt-input:focus { outline: 2px solid #0071e3; outline-offset: 0; background: #fff; }
.nt-f input[type=color] { width: 56px; height: 46px; padding: 3px; border: 0; border-radius: 12px; background: rgba(118, 118, 128, 0.1); cursor: pointer; }
.nt-f input[type=range] { width: 100%; accent-color: #0071e3; min-height: 30px; }
.nt-f .hint { font-size: 12.5px; color: #86868b; }
.nt-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.nt-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .nt-2, .nt-3 { grid-template-columns: 1fr; } .nt-3.keep { grid-template-columns: repeat(3, 1fr); } }
.nt-inline { display: flex; align-items: center; gap: 10px; }
.nt-val { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: #1d1d1f; font-size: 14px; }

.nt-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(118, 118, 128, 0.12); }
.nt-seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px 14px; min-height: 38px; font: inherit; font-size: 14.5px; font-weight: 600; color: #6e6e73; cursor: pointer; }
.nt-seg button[aria-pressed="true"] { background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.nt-seg.full { display: flex; } .nt-seg.full button { flex: 1; }

.nt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: #e8f2fe; color: #0a58b8; }
.nt-chip.green { background: #e5f6ea; color: #17702f; }
.nt-chip.orange { background: #fff1de; color: #a54b00; }
.nt-chip.red { background: #fde7ee; color: #b3194f; }
.nt-chip.gray { background: rgba(118, 118, 128, 0.12); color: #3a3a3c; }

.nt-note { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.55; background: #f2f2f7; color: #3a3a3c; }
.nt-note svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.nt-note.info { background: #e8f2fe; color: #0a4a99; }
.nt-note.warn { background: #fff4e0; color: #7a4100; }
.nt-note.danger { background: #fde7ee; color: #8f1236; }
.nt-note b { font-weight: 700; }
.nt-note ul { margin: 6px 0 0; padding-left: 18px; }
.nt-agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; cursor: pointer; margin-top: 12px; }
.nt-agree input { width: 22px; height: 22px; flex: none; accent-color: #0071e3; margin-top: 1px; }

.nt-checker { background-color: #fff; background-image: linear-gradient(45deg, #e5e5ea 25%, transparent 25%), linear-gradient(-45deg, #e5e5ea 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e5ea 75%), linear-gradient(-45deg, transparent 75%, #e5e5ea 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.nt-stage { border-radius: 18px; overflow: hidden; display: grid; place-items: center; min-height: 260px; position: relative; }
.nt-stage canvas, .nt-stage img { max-width: 100%; height: auto; display: block; }
.nt-progress { height: 8px; border-radius: 4px; background: rgba(118, 118, 128, 0.16); overflow: hidden; }
.nt-progress > i { display: block; height: 100%; width: 0; background: #0071e3; border-radius: 4px; transition: width 0.2s; }
.nt-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nt-sw { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(60, 60, 67, 0.25) inset; }
.nt-sw[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #0071e3; }
.nt-sw.none { background-color: #fff; background-image: linear-gradient(45deg, #d1d1d6 25%, transparent 25%, transparent 75%, #d1d1d6 75%), linear-gradient(45deg, #d1d1d6 25%, transparent 25%, transparent 75%, #d1d1d6 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.nt-list { display: flex; flex-direction: column; gap: 8px; }
.nt-pick { text-align: left; border: 0; background: #f5f5f7; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; display: flex; align-items: center; gap: 12px; color: #1d1d1f; transition: background 0.15s, box-shadow 0.15s; width: 100%; }
.nt-pick:hover { background: #ececf1; }
.nt-pick[aria-pressed="true"] { background: #e8f2fe; box-shadow: 0 0 0 1.5px #0071e3 inset; }
.nt-pick .ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.nt-pick b { display: block; font-size: 15.5px; line-height: 1.25; }
.nt-pick small { color: #6e6e73; font-size: 13px; line-height: 1.3; }
.nt-pick > span:last-child { min-width: 0; }
.nt-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.nt-tbl th, .nt-tbl td { padding: 7px 10px; border-bottom: 0.5px solid rgba(60, 60, 67, 0.14); text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.nt-tbl th { font-size: 12px; color: #6e6e73; background: #f5f5f7; position: sticky; top: 0; }
.nt-scroll { overflow: auto; max-height: 240px; border-radius: 12px; box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.2) inset; }
[hidden] { display: none !important; }

/* ---- photo tools (compress, resize, passport) ---- */
/* main action stays in reach on phones: sticks above the tab bar, safe-area aware */
.nt-dock { position: sticky; bottom: calc(var(--tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 10px); z-index: 20; margin-top: 16px; }
.nt-dock .nt-btn { box-shadow: 0 10px 28px rgba(0, 113, 227, 0.28); }
@media (min-width: 860px) { .nt-dock { position: static; } .nt-dock .nt-btn { box-shadow: none; } }
@media (max-width: 859px) { body.has-dock .qn-fab { display: none; } }
.nt-steps { display: flex; gap: 6px; margin: 18px 0 0; padding: 3px; border-radius: 12px; background: rgba(118, 118, 128, 0.12); max-width: 560px; }
.nt-steps span { flex: 1; text-align: center; padding: 7px 6px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-steps span[aria-current="step"] { background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.nt-steps span.done { color: #248a3d; }
.nt-safe { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #17702f; margin-top: 12px; }
.nt-safe svg { width: 16px; height: 16px; flex: none; }
.nt-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nt-file { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: #f5f5f7; }
.nt-file .th { width: 56px; height: 56px; border-radius: 12px; background: #ebebf0 center / cover no-repeat; }
.nt-file .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-file .mt { font-size: 13px; color: #6e6e73; font-variant-numeric: tabular-nums; }
.nt-file .bar { height: 5px; border-radius: 3px; background: rgba(118, 118, 128, 0.16); margin-top: 6px; overflow: hidden; }
.nt-file .bar i { display: block; height: 100%; border-radius: 3px; background: #d2d2d7; }
.nt-file .acts { display: flex; gap: 6px; align-items: center; }
.nt-ib { width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer; display: grid; place-items: center; background: #fff; color: #1d1d1f; box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.18); }
.nt-ib:hover { background: #ececf1; }
.nt-ib svg { width: 19px; height: 19px; }
.nt-ib.go { background: #248a3d; color: #fff; box-shadow: none; }
@media (max-width: 420px) { .nt-file { grid-template-columns: 48px minmax(0, 1fr); } .nt-file .th { width: 48px; height: 48px; } .nt-file .acts { grid-column: 1 / -1; justify-content: flex-end; } }
.nt-big { font-size: clamp(34px, 8vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: #17702f; }
.nt-compare { position: relative; border-radius: 16px; overflow: hidden; background: #f5f5f7; touch-action: pan-y; user-select: none; }
.nt-compare img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.nt-compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut, 50%)); }
.nt-compare .line { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); pointer-events: none; }
.nt-compare .tag { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(0, 0, 0, 0.6); color: #fff; }
.nt-compare .tag.l { left: 10px; } .nt-compare .tag.r { right: 10px; }
.nt-compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.nt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-pills button { border: 0; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(118, 118, 128, 0.12); color: #1d1d1f; }
.nt-pills button[aria-pressed="true"] { background: #0071e3; color: #fff; }
.nt-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nt-opts .nt-pick { min-height: 64px; }
.nt-toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 84px); transform: translateX(-50%); z-index: 130; max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 14px; background: #b3261e; color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.nt-toast.ok { background: #12805c; }
@media (min-width: 860px) { .nt-toast { bottom: 28px; } }
