/* ===========================================================================
 * /all-nickname/_core/style.css
 * =========================================================================== */

.vipns-bar [hidden], .vipns-notice[hidden], .vipns-clear[hidden] { display: none !important; }

.vipns-bar {
  --vipns-bar-bg: #feffff;
  --vipns-input-bg: #f9fafc;
  --vipns-input-border: #e1e8f0;
  --vipns-placeholder: #757575;
  --vipns-counter-color: #cbd5e1;
  --vipns-clear-color: #94a3b8;
  --vipns-sticky-border: #cbd5e1;
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  /* The separate backdrop below paints the reference's near-white bar
     without changing the input row's width, spacing or sticky position. */
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  padding: 8px 0 10px;
  margin-bottom: 6px;
  transition: background-color .2s ease, box-shadow .2s ease;
}
/* A reserved border on the backdrop avoids any jump when .is-stuck is
   toggled by the existing IntersectionObserver. On mobile the backdrop
   and its bottom border extend to both viewport edges. */
.vipns-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  box-sizing: border-box;
  background: var(--vipns-bar-bg);
  border-bottom: 2px solid transparent;
  pointer-events: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
/* Continue the input surface through the small gap below the header.
   The measured extension paints only; every control and card stays put. */
.vipns-bar:not(.is-stuck)::before {
  top: calc(-1 * var(--vipns-header-gap, 0px));
  border-top: 1px solid rgba(15, 23, 42, .10);
}
.vipns-bar.is-stuck::before {
  border-bottom-color: var(--vipns-sticky-border);
  box-shadow: 0 6px 12px -8px rgba(31, 41, 55, .28);
}
@media (max-width: 767px) {
  .vipns-bar::before {
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
  }
  /* One continuous header/toolbar surface on phones. The bar already
     supplies 8px above its controls; do not double it with page padding.
     A fixed host header still receives any missing space, and lead ads
     remain in normal flow. All overrides are limited to this tool shell. */
  .page[data-nickname-shell] {
    padding-top: var(--vipns-header-reserve, 0px) !important;
  }
  [data-nickname-layout] .vipns-bar,
  html[data-theme="dark"] [data-nickname-layout] .vipns-bar {
    --vipns-bar-bg: var(--c-surface, #fff);
    --vipns-sticky-border: var(--c-line, #e1e8f0);
    top: var(--vipns-mobile-sticky-top, 0px) !important;
    border-radius: 0;
  }
  [data-nickname-layout] .vipns-bar::before,
  [data-nickname-layout] .vipns-bar:not(.is-stuck)::before,
  [data-nickname-layout] .vipns-bar.is-stuck::before {
    /* The host header owns the top divider: adding another one makes
       that seam look heavy. Only the toolbar's lower edge gets a hairline. */
    border: 0;
    border-bottom: 1px solid var(--vipns-sticky-border);
    border-radius: 0;
    box-shadow: none;
  }
}
html[data-theme="dark"] .vipns-bar {
  --vipns-bar-bg: var(--c-bg);
  --vipns-input-bg: var(--c-surface);
  --vipns-input-border: var(--c-line);
  --vipns-placeholder: var(--c-muted);
  --vipns-counter-color: var(--c-faint);
  --vipns-clear-color: var(--c-muted);
  --vipns-sticky-border: #64748b;
}
/* Zero-height marker used purely to detect the sticky/pinned transition;
   never visible, never affects layout. */
[data-vipns-sticky-sentinel] {
  height: 1px;
  margin-bottom: -1px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.vipns-field { display: flex; gap: 8px; align-items: center; }
.vipns-inputwrap { position: relative; flex: 1 1 auto; min-width: 0; }
.vipns-input {
  display: block; width: 100%; height: 46px;
  padding: 0 70px 0 13px; /* ডানদিকের কাউন্টারের জন্য জায়গা করা হলো */
  border: 1.5px solid var(--vipns-input-border, #e1e8f0); border-radius: var(--r-md);
  background: var(--vipns-input-bg, #f9fafc); color: var(--c-text);
  font-size: 16px; font-weight: 700; outline: none;
  -webkit-appearance: none; appearance: none;
}
.vipns-input:focus { border-color: var(--c-green); }
.vipns-input::placeholder { color: var(--vipns-placeholder, #757575); opacity: 1; }

.vipns-char-count {
  position: absolute; right: 42px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 700; color: var(--vipns-counter-color, #cbd5e1); pointer-events: none;
}
.vipns-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; padding: 0; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--vipns-clear-color, #94a3b8); font-size: 15px; line-height: 1; cursor: pointer;
}
.vipns-clear:active { transform: translateY(-50%) scale(.9); }

.vipns-regen .vipns-dice { display: inline-flex; align-items: center; line-height: 0; }
.vipns-regen .vipns-dice.is-spinning { animation: vipnsRotate .5s var(--ease); }
@keyframes vipnsRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.vipns-regen {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 14px;
  font-size: 14px; white-space: nowrap;
}
/* Sampled reference gradient; scoped here so other brand buttons keep
   their existing colors. The button's label, icon and dimensions stay. */
.vipns-bar .vipns-regen {
  background: linear-gradient(135deg, #b43a0f 0%, #6f2107 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 8px rgba(180, 58, 15, .10);
}

.vipns-status {
  margin-top: 10px; text-align: center; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 42px;
}
.vipns-status:empty { display: none; margin: 0; min-height: 0; }
.vipns-status-title {
  font-size: 17.5px; font-weight: 800; color: var(--c-text);
  line-height: 1.3; letter-spacing: -0.2px; text-align: center;
}
.vipns-status-title b { color: var(--c-green); font-weight: 800; }
.vipns-status-sub {
  font-size: 12.5px; font-weight: 500; color: var(--c-muted);
  line-height: 1.5; text-align: center;
}

.vipns-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  font-size: 15px; font-weight: 800;
  color: var(--c-text); opacity: 1; text-transform: none;
  letter-spacing: 0; margin: 16px 2px 4px;
  transition: opacity .13s ease;
}
/* Decorative dots fill only the space remaining after each category name. */
.vipns-divider:not(.vipns-skel-divider)::after {
  content: '';
  display: block;
  flex: 1 0 20px;
  border-top: 2px dotted currentColor;
  opacity: .35;
}
.vipns-divider:first-child { margin-top: 8px; }
/* "Load More" swaps a slot's category in place: the heading text fades
   out, gets replaced, then fades back in — same timing as a card's own
   .is-swapping fade (CFG.swapMs in tool.js), so the whole slot (divider +
   every card in it) reads as one smooth, synchronized change. */
.vipns-divider.is-swapping { opacity: 0; }

/* Screenshot proportions: 1472px-wide cards, 210px high, 35px gaps and
   40px diagonal corner radii in the 1536px reference. At a 384px viewport
   these become 368 x 52.6px cards, 8.75px gaps and 10px radii. */
.vipns-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8.75px;
  margin-top: 2px;
  container-type: inline-size;
  container-name: vipns-feed;
  --vipns-card-surface: #fff;
  --vipns-card-shadow: 0 2px 3px rgba(135, 119, 75, .12);
}

/* Match the reference's slim, equal gutters independently of the host
   page's padding. The card itself uses the entire available row. */
@media (max-width: 767px) {
  .vipns-feed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 2.083333vw;
    padding-right: 2.083333vw;
    gap: 2.278646vw;
    box-sizing: border-box;
  }
}

/* This page alone gets the sampled card backdrop. The input bar has its
   own surface above. The :has() rule covers the host site's dynamically
   inserted tool view. */
html:not([data-theme="dark"]) body[data-nickname-active] {
  --c-bg: #ecf0f9;
  background-color: #ecf0f9;
}
@supports selector(body:has([data-vipns])) {
  html:not([data-theme="dark"]) body:has([data-vipns]) {
    --c-bg: #ecf0f9;
    background-color: #ecf0f9;
  }
}
html:not([data-theme="dark"]) [data-vipns] {
  --c-bg: #ecf0f9;
}
html:not([data-theme="dark"]) .vipns-feed {
  background: #ecf0f9;
}
html[data-theme="dark"] .vipns-feed {
  --vipns-card-surface: var(--c-soft);
  --vipns-card-shadow: 0 2px 3px rgba(0, 0, 0, .18);
}

.vipns-card,
.vipns-skel {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  aspect-ratio: 7 / 1;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--vipns-card-surface, #fff);
  border: 1px solid transparent;
  /* Only top-left and bottom-right are rounded. */
  border-radius: 10px 0 10px 0;
  box-shadow: var(--vipns-card-shadow, 0 2px 3px rgba(135, 119, 75, .12));
}
@supports (border-radius: 1cqi) {
  .vipns-card,
  .vipns-skel {
    border-radius: 2.717391cqi 0 2.717391cqi 0;
  }
}
.vipns-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px 19px;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Interaction feedback adds a little elevation; white cards stay white. */
.vipns-card:active {
  box-shadow: 0 1px 2px rgba(135, 119, 75, .14);
}
@media (hover: hover) and (pointer: fine) {
  .vipns-card:hover {
    box-shadow: 0 3px 5px rgba(135, 119, 75, .15);
  }
}
.vipns-card.is-open {
  border-color: var(--c-green);
  box-shadow: 0 3px 5px rgba(135, 119, 75, .15);
}
.vipns-name {
  min-width: 0; 
  font-size: clamp(15px, 4.1vw, 17.2px); 
  line-height: 1.34; 
  text-align: center; 
  max-width: 84%; 
  margin: 0 auto;
  color: var(--c-text); 
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  font-family: 'Times New Roman', Times, serif, system-ui, sans-serif;
  transition: opacity .13s ease;
}

.vipns-style {
  position: absolute; bottom: 3px; left: 14px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 8px; font-weight: 400; color: var(--c-text, #000000); white-space: nowrap;
  text-transform: uppercase; letter-spacing: .3px; opacity: 1;
  transition: opacity .13s ease;
}

.vipns-count {
  position: absolute; bottom: 3px; right: 14px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 8px; font-weight: 400; color: var(--c-text, #000000); opacity: 1;
  transition: opacity .13s ease;
}

/* Regenerate swap: only the text inside a card fades out/in — the card's
   own box (background, border, radius, shadow, size, position) is never
   part of this rule, so the grid never reflows and nothing jumps. */
.vipns-card.is-swapping .vipns-name  { opacity: 0; }
.vipns-card.is-swapping .vipns-style { opacity: 0; }
.vipns-card.is-swapping .vipns-count { opacity: 0; }

.vipns-skel { overflow: hidden; }
.vipns-skel::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 42%; height: 16px; border-radius: 999px; background: var(--c-soft);
}
/* Static placeholder for a category heading in the pre-render skeleton
   (see index.html). Shares .vipns-divider for sizing/margin/:first-child
   so it takes up the same vertical space as a real heading, then swaps
   its content for a plain bar shape since there's no label to show yet. */
.vipns-skel-divider {
  height: 15px; width: 44%; max-width: 190px;
  border-radius: 4px; background: var(--c-soft); opacity: .8;
}

/* Mobile refresh fix: keep the category-heading slot in the skeleton so
   the real heading can replace it without a layout jump, but do not paint
   the narrow placeholder strip that looked like a stray border on phones. */
@media (max-width: 767px) {
  .vipns-skel-divider {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
    opacity: 1;
  }
}

/* Mobile preview sizing: the example reference makes the generated name the
   clear focal point. Four fit tiers let short frames render noticeably
   larger while progressively protecting longer decorated strings from
   crowding. Desktop/tablet sizing is intentionally untouched. */
@media (max-width: 767px) {
  .vipns-name {
    max-width: calc(100% - 10px);
    font-size: clamp(19px, 5.25vw, 20.5px);
    line-height: 1.30;
  }
  .vipns-name.vipns-fit-1 { font-size: clamp(19px, 5.25vw, 20.5px); }
  .vipns-name.vipns-fit-2 { font-size: clamp(18px, 4.90vw, 19.5px); }
  .vipns-name.vipns-fit-3 { font-size: clamp(15px, 4.45vw, 18px); }
  .vipns-name.vipns-fit-4 { font-size: clamp(14px, 4.05vw, 16.5px); }
}

@keyframes vipnsIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.vipns-card.is-new { animation: vipnsIn .16s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 8ms); }

/* ------------------------------ Load More ------------------------------ */
/* Lives as the last child of .vipns-feed (grid) — sits right after whichever
   category page is currently on screen. Full-width block button (not a
   small pill) so it reads as a primary action matching the Regenerate
   button's solid brand-accent treatment, just laid out wide instead of
   inline in the bar. */
.vipns-loadmore {
  grid-column: 1 / -1;
  margin: 20px 0 4px;
}

.vipns-loadmore-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 98%;
  margin: 0 auto;
  box-sizing: border-box;
  height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-green, #b43a0f);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1px;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none; appearance: none;
  box-shadow: 0 6px 16px -8px rgba(180, 58, 15, 0.45);
  transition: filter .15s ease, box-shadow .15s ease, transform .1s ease, gap .18s ease;
}
.vipns-loadmore-btn:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .vipns-loadmore-btn:hover:not([disabled]) {
    filter: brightness(1.06);
    box-shadow: 0 8px 20px -8px rgba(180, 58, 15, 0.55);
  }
}
.vipns-loadmore-btn[disabled] { cursor: default; }
/* Slight touch/active feedback only while "loading" — no spinner, no
   width/gap animation, no label hiding. The button's own box never
   changes size, so nothing in the layout shifts. The real spinner is the
   viewport overlay below. */
.vipns-loadmore-btn.is-loading { filter: brightness(.94); }

.vipns-loadmore-text { white-space: nowrap; }

/* ------------------------- Loading overlay (viewport) ------------------------- */
/* Appended to document.body by tool.js (not left nested in the page's own
   markup) so position:fixed centers on the real visible viewport no
   matter how far the user has scrolled, and regardless of any ancestor
   page-transition wrapper that might carry its own CSS transform. Dims
   the page with a translucent backdrop; the cards underneath stay fully
   painted and untouched — nothing hides, flickers or resizes. */
.vipns-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease;
}
@supports (backdrop-filter: blur(1px)) {
  .vipns-loading-overlay { backdrop-filter: blur(1.5px); }
}
.vipns-loading-overlay.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.vipns-loading-spin {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  box-sizing: border-box;
  animation: vipnsSpin .7s linear infinite;
}
@keyframes vipnsSpin { to { transform: rotate(360deg); } }

.vipns-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 8px);
  background: var(--c-text); color: var(--c-bg); padding: 9px 17px; border-radius: 999px;
  font-size: 13px; font-weight: 700; z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s var(--ease);
}
.vipns-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Container-based sizing keeps embedded tools fluid as the host sidebar
   changes width. The fallback above works without container queries. */
@container vipns-feed (max-width: 480px) {
  .vipns-name { font-size: clamp(15px, 4.278075cqi, 17.2px); }
}
.vipns-name::-webkit-scrollbar { display: none; }
.vipns-regen:disabled { cursor: wait; opacity: .7; }
.vipns-card:focus-visible { outline: 2px solid var(--c-green, #b43a0f); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .vipns-card.is-new, .vipns-dice.is-spinning { animation: none; }
  .vipns-name, .vipns-style, .vipns-count, .vipns-divider { transition: none; }
}

/* Shared SEO article presentation; prose remains in each content.html. */
.vipns-article {
  --vipns-brand: var(--c-green, #b43a0f);
  --vipns-brand-t: var(--c-green-t, rgba(180, 58, 15, 0.09));
  --vipns-grad: linear-gradient(135deg, #b43a0f, #d9531e);
  font-weight: 400;
}
.vipns-article p,
.vipns-article li,
.vipns-article span {
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--c-muted, #52525b);
  font-weight: 400;
}
.vipns-article strong,
.vipns-article b { font-weight: 500; }
.vipns-article h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-text, #18181b);
  margin: 0 0 12px;
  letter-spacing: -.3px;
}
.vipns-article h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text, #18181b);
  margin: 0 0 10px;
  letter-spacing: -.2px;
}

.vipns-head { text-align: center; padding-bottom: 22px; }
.vipns-kicker {
  display: inline-block; margin-bottom: 12px; padding: 6px 16px;
  border-radius: 999px; background: var(--vipns-grad); color: var(--c-surface, #ffffff);
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
}
.vipns-head h1 {
  font-size: clamp(23px, 5.2vw, 29px);
  font-weight: 600;
  line-height: 1.28;
  color: var(--c-text, #18181b);
  margin: 0 0 10px;
  letter-spacing: -.3px;
}
.vipns-lede { font-size: 16px; color: var(--c-faint, #71717a); margin: 0; line-height: 1.6; }

.vipns-rule {
  height: 2px; border: 0; margin: 26px 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--vipns-brand), transparent); opacity: .5;
}

.vipns-sec { margin-top: 30px; }
.vipns-sec > h2, .vipns-sec > h3 { position: relative; padding-left: 16px; }
.vipns-sec > h2::before, .vipns-sec > h3::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 5px;
  border-radius: 3px; background: var(--vipns-grad);
}

.vipns-steps { list-style: none; margin: 16px 0 4px; padding: 0 0 0 30px; position: relative; }
.vipns-steps::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 12px; width: 2px; background: var(--c-line, rgba(0,0,0,0.1)); }
.vipns-steps li { position: relative; margin-bottom: 18px; }
.vipns-steps li:last-child { margin-bottom: 0; }
.vipns-steps li::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-surface, #ffffff); border: 3px solid var(--vipns-brand);
}
.vipns-steps b { display: block; color: var(--c-text, #18181b); font-size: 16px; margin-bottom: 3px; font-weight: 500; }

.vipns-feats { display: grid; gap: 12px; margin: 18px 0 4px; }
.vipns-feat {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--c-surface, #ffffff); border: 1px solid var(--c-border, rgba(0,0,0,0.09));
  border-radius: var(--r-lg, 14px); padding: 15px 16px;
}
.vipns-feat-ico {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-sm, 8px);
  background: var(--vipns-brand-t); color: var(--vipns-brand); display: grid; place-items: center; font-size: 18px; font-weight: 800;
}
.vipns-feat b { display: block; color: var(--c-text, #18181b); font-size: 16px; margin-bottom: 3px; font-weight: 500; }
.vipns-feat span { display: block; font-size: 14.5px; line-height: 1.7; color: var(--c-muted, #52525b); }
@media (min-width: 640px) { .vipns-feats { grid-template-columns: 1fr 1fr; } }

.vipns-cats { display: grid; gap: 10px; margin: 18px 0 4px; grid-template-columns: repeat(2, 1fr); }
.vipns-cat {
  background: var(--c-surface, #ffffff); border: 1px solid var(--c-border, rgba(0,0,0,0.09));
  border-radius: var(--r-lg, 14px); padding: 12px 14px; text-align: center;
}
.vipns-cat b { display: block; color: var(--c-text, #18181b); font-size: 14.5px; font-weight: 500; }
.vipns-cat span { display: block; font-size: 12.5px; color: var(--c-muted, #52525b); margin-top: 2px; }

.vipns-faq { margin: 14px 0 6px; border-top: 1px solid var(--c-border, rgba(0, 0, 0, 0.08)); }
.vipns-faq details { border-top: 0 !important; border-bottom: 1px solid var(--c-border, rgba(0, 0, 0, 0.08)) !important; padding: 0 !important; margin: 0 !important; }
.vipns-faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0 !important; font-size: 14.8px !important; font-weight: 400 !important; line-height: 1.42 !important;
  color: var(--c-text, #18181b);
}
.vipns-faq summary::-webkit-details-marker { display: none; }
.vipns-faq summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-right: 2px solid var(--vipns-brand); border-bottom: 2px solid var(--vipns-brand);
  transform: rotate(45deg); transition: transform .2s ease;
}
.vipns-faq details[open] summary::after { transform: rotate(225deg); }
.vipns-faq details p {
  margin: 2px 0 10px !important;
  font-size: 14px !important;
  line-height: 1.58 !important;
  font-weight: 400 !important;
  color: var(--c-muted, #52525b);
}

/* Shared flat related/category link cards used by every custom content.html. */
.vipns-links {
  width: 100%;
  max-width: 100%;
  margin: 24px 0 4px;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.vipns-links > a,
.vipns-links > .vipns-link-btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 6px 14px;
  box-sizing: border-box;
  border: 1px solid var(--c-border, rgba(19, 35, 55, 0.16));
  border-radius: 14px;
  background: var(--c-surface, #ffffff);
  color: var(--c-text, #152238);
  font-family: inherit;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease;
}
.vipns-links > a:hover,
.vipns-links > .vipns-link-btn:hover {
  color: var(--c-text, #152238);
  background: var(--c-surface, #ffffff);
  border-color: rgba(19, 35, 55, 0.26);
  box-shadow: none;
  transform: none;
}
.vipns-links > a:active,
.vipns-links > .vipns-link-btn:active {
  transform: scale(.985);
  background: var(--c-soft, #f7f9fc);
  border-color: rgba(180, 58, 15, 0.34);
  box-shadow: none;
}
.vipns-links > a:focus-visible,
.vipns-links > .vipns-link-btn:focus-visible {
  outline: 2px solid var(--vipns-brand, #b43a0f);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .vipns-links { margin-top: 22px; gap: 9px; }
  .vipns-links > a,
  .vipns-links > .vipns-link-btn {
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 13px;
    font-size: clamp(15px, 4.2vw, 17px);
  }
}
@media (min-width: 601px) and (max-width: 1024px) {
  .vipns-links { margin-top: 24px; gap: 10px; }
  .vipns-links > a,
  .vipns-links > .vipns-link-btn {
    min-height: 44px;
    padding: 7px 14px;
    border-radius: 14px;
  }
}
@media (min-width: 1025px) {
  .vipns-links { margin-top: 26px; gap: 11px; }
  .vipns-links > a,
  .vipns-links > .vipns-link-btn {
    min-height: 46px;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 18px;
  }
}
@media (min-width: 1024px) {
  .vipns-article p, .vipns-article li { font-size: 16px; }
  .vipns-head h1 { font-size: 30px; }
  .vipns-sec > h2 { font-size: 23px; }
}

/* ================= Shared-tool desktop / tablet layout =================
   Every host-layout override requires our explicit scope. The stylesheet
   may stay cached in the SPA when a legacy tool opens; none of these
   selectors can change that tool's page, stack, sidebar, or cards.
   Mobile below 768px has its own surface rules above; card geometry stays. */
@media (min-width: 768px) {
  .page[data-nickname-shell] {
    width: 100% !important;
    max-width: 1280px !important;
    margin-inline: auto !important;
    padding: calc(24px + var(--vipns-header-reserve, 0px)) 24px 24px !important;
    box-sizing: border-box;
  }
  [data-nickname-layout].tool-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    --vipns-sticky-top: 12px;
  }
  [data-nickname-layout] > .stack {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 24px !important;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  [data-nickname-layout][data-vipns-sidebar] > .stack {
    grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 300px) !important;
  }
  [data-nickname-layout] > .stack > [data-tool-main] {
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  [data-nickname-layout] > .stack > .side[data-side] {
    align-self: start !important;
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  [data-nickname-layout] > .stack > .side[data-side]:empty {
    display: none !important;
  }
  [data-nickname-layout] > .stack > .side[data-vipns-sticky-side] {
    position: sticky !important;
    top: var(--vipns-sticky-top) !important;
  }
  [data-nickname-layout][data-vipns-sidebar] [data-side-mobile] {
    display: none !important;
  }

  [data-nickname-layout] [data-vipns] {
    min-width: 0;
    container-type: inline-size;
    container-name: vipns-tool;
  }
  [data-nickname-layout] .vipns-bar {
    top: var(--vipns-sticky-top) !important;
    padding: 14px;
    margin: 0 0 18px;
    border-radius: 14px;
    --vipns-bar-bg: var(--c-surface, #fff);
  }
  [data-nickname-layout] .vipns-bar::before,
  [data-nickname-layout] .vipns-bar:not(.is-stuck)::before {
    inset: 0;
    border: 1px solid var(--c-line, #e1e8f0);
    border-radius: inherit;
    background: var(--vipns-bar-bg);
    box-shadow: 0 3px 12px -6px rgba(31, 41, 55, .16);
  }
  [data-nickname-layout] .vipns-bar.is-stuck::before {
    border-color: var(--c-line, #e1e8f0);
    box-shadow: 0 8px 20px -12px rgba(31, 41, 55, .3);
  }
  [data-nickname-layout] .vipns-field { gap: 10px; }
  [data-nickname-layout] .vipns-input,
  [data-nickname-layout] .vipns-regen {
    height: 46px;
    box-sizing: border-box;
    border-radius: 10px;
  }
  [data-nickname-layout] .vipns-input { padding-left: 14px; }
  [data-nickname-layout] .vipns-regen {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  [data-nickname-layout] .vipns-char-count { color: var(--c-muted, #64748b); }
  [data-nickname-layout] .vipns-clear { color: var(--c-muted, #64748b); }

  [data-nickname-layout] .vipns-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  [data-nickname-layout] .vipns-divider {
    grid-column: 1 / -1;
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 1.4;
  }
  [data-nickname-layout] .vipns-divider:first-child { margin-top: 0; }
  [data-nickname-layout] .vipns-skel-divider { height: 21px; }
  [data-nickname-layout] .vipns-card,
  [data-nickname-layout] .vipns-skel {
    aspect-ratio: auto;
    height: 76px;
    min-height: 76px;
    border-radius: 12px 0 12px 0;
  }
  [data-nickname-layout] .vipns-card { padding: 8px 14px 22px; }
  [data-nickname-layout] .vipns-name {
    max-width: 100%;
    font-size: clamp(18px, 2.8cqi, 20px);
    line-height: 1.4;
  }
  [data-nickname-layout] .vipns-style,
  [data-nickname-layout] .vipns-count {
    bottom: 6px;
    font-size: 10px;
    line-height: 1.2;
    color: var(--c-muted, #52525b);
  }
  [data-nickname-layout] .vipns-style {
    max-width: calc(100% - 62px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  [data-nickname-layout] .vipns-loadmore { margin: 8px 0 4px; }
  [data-nickname-layout] .vipns-loadmore-btn { width: 100%; }
  html[data-theme="dark"] [data-nickname-layout] .vipns-bar {
    --vipns-bar-bg: var(--c-surface, #242428);
  }
}

/* A compact host/sidebar combination may leave insufficient space for two
   name cards. This also protects unusually narrow embedded tool containers. */
@container vipns-tool (max-width: 559px) {
  [data-nickname-layout] .vipns-feed { grid-template-columns: minmax(0, 1fr); }
}
