@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

/* New Social Reddit Image Viewer — WordPress-scoped */
.nsriv {width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -8px;
--nsriv-ink: #f7f4ef;
  --nsriv-muted: #b8aea3;
  --nsriv-dim: #8a8178;
  --nsriv-panel: rgba(28, 24, 22, 0.88);
  --nsriv-panel-soft: rgba(255, 248, 240, 0.06);
  --nsriv-line: rgba(255, 140, 66, 0.28);
  --nsriv-accent: #ff5c1a;
  --nsriv-accent-deep: #e0450a;
  --nsriv-accent-soft: rgba(255, 92, 26, 0.16);
  --nsriv-cool: #3ecfbf;
  --nsriv-cool-deep: #259e91;
  --nsriv-danger: #ff6b7a;
  --nsriv-success: #3dd68c;
  --nsriv-radius: 18px;
  --nsriv-shadow: 0 18px 42px rgba(8, 4, 2, 0.38);
  --nsriv-font: "Outfit", "Segoe UI", sans-serif;
  --nsriv-gap: 14px;
  --nsriv-pad: 14px;

  box-sizing: border-box !important;
  font-family: var(--nsriv-font);
  color: var(--nsriv-ink);
  line-height: 1.5;
  display: block;
  min-width: 0 !important;
  background:
    radial-gradient(ellipse 70% 48% at 14% 0%, rgba(255, 92, 26, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 40% at 92% 8%, rgba(62, 207, 191, 0.12), transparent 52%),
    linear-gradient(158deg, #14110f 0%, #221a16 42%, #2c1e18 100%);
  position: relative;
  isolation: isolate;
  text-align: left;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.nsriv *,
.nsriv *::before,
.nsriv *::after {
  box-sizing: border-box;
}

.nsriv :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, label, span) {
  margin: 0;  border: 0;
  font-weight: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.nsriv h3 { color: var(--nsriv-ink) !important; }
.nsriv h2 { color: var(--nsriv-ink) !important; }
.nsriv :where(ul, ol) {
  list-style: none;
}

.nsriv img,
.nsriv video {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.nsriv a {
  color: var(--nsriv-cool);
  text-decoration: none;
}

.nsriv a:hover {
  text-decoration: underline;
}

.nsriv-shell {width: 100%; max-width: min(1200px, 100%); margin-left: auto; margin-right: auto; padding: 65px clamp(8px, 2vw, 16px); min-width: 0; 
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--nsriv-gap);
  min-width: 0;
  container-type: inline-size;
  container-name: nsriv;
}

/* ——— Tool / hero ——— */
.nsriv-hero {
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(18px, 3.5vw, 28px) clamp(14px, 3vw, 22px);
  text-align: center;
  backdrop-filter: blur(14px);
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 92, 26, 0.95), rgba(255, 140, 66, 0.75));
  box-shadow:
    0 10px 24px rgba(255, 92, 26, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.45rem;
}

.nsriv .nsriv-hero__title {
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--nsriv-ink) !important;
}

.nsriv-hero__mark {
  color: var(--nsriv-accent);
  background-image: linear-gradient(90deg, var(--nsriv-accent), #ff9a4a);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  padding-bottom: 2px;
}

.nsriv .nsriv-hero__lead {
  max-width: 36rem;
  margin: 0 auto 20px;
  color: var(--nsriv-muted);
  font-size: clamp(0.9rem, 2.4vw, 1rem);
  line-height: 1.55;
}

.nsriv-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background: var(--nsriv-panel-soft);
  border: 1px solid rgba(255, 248, 240, 0.08);
  border-radius: 14px;
  padding: clamp(12px, 2.4vw, 16px);
}

.nsriv .nsriv-tool__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--nsriv-muted);
}

.nsriv-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.nsriv .nsriv-field__input {
  width: 100%;
  min-width: 0 !important;
  height: 52px;
  min-height: 52px;
  padding: 0 52px 0 16px !important;
  border: 1px solid rgba(255, 248, 240, 0.12) !important;
  border-radius: 12px;
  background: rgba(10, 8, 7, 0.55) !important;
  color: var(--nsriv-ink) !important;
  font-family: var(--nsriv-font);
  font-size: 16px !important;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nsriv .nsriv-field__input::placeholder {
  color: var(--nsriv-dim);
}

.nsriv .nsriv-field__input:focus {
  border-color: rgba(255, 92, 26, 0.55) !important;
  background: rgba(10, 8, 7, 0.72) !important;
  box-shadow: 0 0 0 3px var(--nsriv-accent-soft);
}

.nsriv .nsriv-field__paste {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: var(--nsriv-muted) !important;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.nsriv .nsriv-field__paste:hover {
  color: var(--nsriv-accent) !important;
  background: var(--nsriv-accent-soft) !important;
}

.nsriv .nsriv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  min-height: 50px;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 12px;
  font-family: var(--nsriv-font);
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.nsriv .nsriv-btn--primary {
  background: linear-gradient(135deg, var(--nsriv-accent) 0%, #ff7a3d 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(255, 92, 26, 0.32);
}

.nsriv .nsriv-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 92, 26, 0.4);
}

.nsriv .nsriv-btn--primary:active {
  transform: translateY(0);
  opacity: 0.94;
}

.nsriv .nsriv-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none !important;
}

.nsriv .nsriv-btn--ghost {
  background: rgba(255, 248, 240, 0.06) !important;
  color: var(--nsriv-ink) !important;
  border: 1px solid rgba(255, 248, 240, 0.12) !important;
}

.nsriv .nsriv-btn--ghost:hover {
  background: rgba(255, 248, 240, 0.1) !important;
  transform: translateY(-1px);
}

.nsriv .nsriv-btn--cool {
  background: linear-gradient(135deg, var(--nsriv-cool), var(--nsriv-cool-deep)) !important;
  color: #041716 !important;
}

.nsriv .nsriv-btn i {
  font-size: 0.95em;
}

.nsriv-alert {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
}

.nsriv-alert.is-visible {
  display: flex;
}

.nsriv-alert--error {
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.35);
  color: #ffb4bc;
}

.nsriv-alert--ok {
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.35);
  color: #9aecc0;
}

.nsriv-hint {
  font-size: 0.8rem;
  color: var(--nsriv-dim);
  text-align: center;
}

/* ——— Skeleton ——— */
.nsriv-skeleton {
  display: none;
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  padding: var(--nsriv-pad);
  box-shadow: var(--nsriv-shadow);
}

.nsriv-skeleton.is-active {
  display: block;
  animation: nsriv-rise 0.35s ease both;
}

.nsriv-sk {
  background: linear-gradient(
    90deg,
    rgba(255, 248, 240, 0.06) 0%,
    rgba(255, 140, 66, 0.14) 50%,
    rgba(255, 248, 240, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: nsriv-shimmer 1.2s ease infinite;
  border-radius: 10px;
}

.nsriv-skeleton__preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  margin-bottom: 14px;
}

.nsriv-skeleton__line {
  height: 14px;
  margin-bottom: 10px;
}

.nsriv-skeleton__line--lg { width: 72%; }
.nsriv-skeleton__line--md { width: 48%; }
.nsriv-skeleton__line--sm { width: 32%; height: 12px; }

/* ——— Result ——— */
.nsriv-result {
  display: none;
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-result.is-visible {
  display: block;
}

.nsriv-panel {
  background: var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(14px, 3vw, 20px);
  backdrop-filter: blur(14px);
}

.nsriv-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nsriv .nsriv-meta__title {
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--nsriv-ink) !important;
}

.nsriv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.06);
  border: 1px solid rgba(255, 248, 240, 0.1);
  color: var(--nsriv-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.nsriv-chip i {
  color: var(--nsriv-accent);
  font-size: 0.85em;
}

.nsriv-chip--type {
  background: var(--nsriv-accent-soft);
  border-color: rgba(255, 92, 26, 0.35);
  color: #ffc4a8;
}

.nsriv-featured {
  position: relative;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 248, 240, 0.08);
  min-height: 180px;
}

.nsriv-featured__media {
  width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  margin-left: auto; margin-right: auto;
  background: #0a0807;
  cursor: zoom-in;
}

.nsriv-featured__media--video {
  cursor: default;
}

.nsriv-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(8, 4, 2, 0.85));
}

.nsriv-featured__actions .nsriv-btn {
  flex: 1 1 140px;
  height: 44px;
  min-height: 44px;
  font-size: 0.9rem !important;
}

.nsriv-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nsriv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsriv-section-label span {
  color: var(--nsriv-dim);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.nsriv-media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@container nsriv (min-width: 560px) {
  .nsriv-media-list {
    grid-template-columns: 1fr 1fr;
  }
}

.nsriv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 248, 240, 0.04);
  border: 1px solid rgba(255, 248, 240, 0.08);
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nsriv-card:hover {
  border-color: rgba(255, 92, 26, 0.35);
  transform: translateY(-1px);
}

.nsriv-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: #0a0807;
  cursor: zoom-in;
}

.nsriv-card__thumb--video {
  object-fit: contain;
  background: #000;
  cursor: default;
}

.nsriv-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nsriv-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nsriv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-card__actions .nsriv-btn {
  flex: 1 1 auto;
  height: 40px;
  min-height: 40px;
  font-size: 0.84rem !important;
}

.nsriv-empty {
  display: none;
  text-align: center;
  padding: 28px 16px;
  color: var(--nsriv-muted);
}

.nsriv-empty.is-visible {
  display: block;
}

.nsriv-empty i {
  display: block;
  font-size: 2rem;
  margin: 0 auto 10px;
  opacity: 0.45;
  color: var(--nsriv-accent);
}

.nsriv-empty p {
  max-width: 34ch;
  margin-left: auto; margin-right: auto;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ——— Modal ——— */
.nsriv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 3, 0.86);
  backdrop-filter: blur(8px);
}

.nsriv-modal.is-open {
  display: flex;
  animation: nsriv-fade 0.2s ease both;
}

.nsriv-modal__dialog {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.nsriv-modal__media {
  max-height: 82vh;
  width: auto;
  margin-left: auto; margin-right: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nsriv .nsriv-modal__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(20, 16, 14, 0.92) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

@keyframes nsriv-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nsriv-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nsriv-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 480px) {
  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    flex: 1 1 100%;
  }
}

/* --- Codex CSS updates --- */
/* New Social Reddit Image Viewer — WordPress-scoped */
.nsriv {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -8px;

  --nsriv-ink: #f8fafc;
  --nsriv-muted: #c7d2df;
  --nsriv-dim: #90a1b5;
  --nsriv-panel: rgba(15, 23, 42, 0.82);
  --nsriv-panel-soft: rgba(255, 255, 255, 0.075);
  --nsriv-line: rgba(148, 163, 184, 0.22);
  --nsriv-accent: #ff5a3d;
  --nsriv-accent-deep: #dc3d23;
  --nsriv-accent-soft: rgba(255, 90, 61, 0.18);
  --nsriv-cool: #22d3ee;
  --nsriv-cool-deep: #0891b2;
  --nsriv-danger: #fb7185;
  --nsriv-success: #34d399;
  --nsriv-radius: 18px;
  --nsriv-shadow: 0 22px 60px rgba(2, 6, 23, 0.36);
  --nsriv-shadow-soft: 0 12px 30px rgba(2, 6, 23, 0.22);
  --nsriv-font: "Outfit", "Segoe UI", Arial, sans-serif;
  --nsriv-gap: 16px;
  --nsriv-pad: 16px;

  box-sizing: border-box !important;
  font-family: var(--nsriv-font);
  color: var(--nsriv-ink);
  line-height: 1.5;
  display: block;
  min-width: 0 !important;
  background:
    radial-gradient(ellipse 72% 48% at 13% 0%, rgba(255, 90, 61, 0.34), transparent 58%),
    radial-gradient(ellipse 60% 42% at 90% 8%, rgba(34, 211, 238, 0.22), transparent 54%),
    linear-gradient(145deg, #07111f 0%, #101827 44%, #1b1b2f 100%);
  position: relative;
  isolation: isolate;
  text-align: left;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.nsriv *,
.nsriv *::before,
.nsriv *::after {
  box-sizing: border-box;
}

.nsriv :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, label, span) {
  margin: 0;
  border: 0;
  font-weight: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.nsriv h3 {
  color: var(--nsriv-ink) !important;
}

.nsriv h2 {
  color: var(--nsriv-ink) !important;
}

.nsriv :where(ul, ol) {
  list-style: none;
}

.nsriv img,
.nsriv video {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.nsriv a {
  color: var(--nsriv-cool);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.nsriv a:hover {
  color: #67e8f9;
  text-decoration: underline;
}

.nsriv .fa-brands,
.nsriv .fa-regular,
.nsriv .fa-solid,
.nsriv .fa-clipboard,
.nsriv .fa-image,
.nsriv .fa-magnifying-glass,
.nsriv .fa-reddit-alien,
.nsriv .fa-xmark {
  display: inline-block;
  width: 1em;
  min-width: 1em;
  line-height: 1;
  text-align: center;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nsriv .fa-brands {
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif;
  font-weight: 400;
}

.nsriv .fa-regular {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
  font-weight: 400;
}

.nsriv .fa-solid,
.nsriv .fa-clipboard,
.nsriv .fa-image,
.nsriv .fa-magnifying-glass,
.nsriv .fa-reddit-alien,
.nsriv .fa-xmark {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
}

.nsriv-shell {
  width: 100%;
  max-width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(28px, 6vw, 64px) clamp(12px, 3vw, 22px);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--nsriv-gap);
  min-width: 0;
  container-type: inline-size;
  container-name: nsriv;
}

/* ——— Tool / hero ——— */
.nsriv-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.052)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(20px, 4vw, 34px);
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background:
    linear-gradient(135deg, #ff7a3d 0%, #ff3d6e 55%, #7c3aed 100%);
  box-shadow:
    0 16px 32px rgba(255, 90, 61, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.35rem;
}

.nsriv .nsriv-hero__title {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.22;
  margin: 0 0 10px;
  color: var(--nsriv-ink) !important;
  text-transform: capitalize !important;
}

.nsriv-hero__mark {
  color: #fff;
  background-image: linear-gradient(90deg, #ff7a3d, #ff3d6e, #22d3ee);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  padding-bottom: 3px;
}

.nsriv .nsriv-hero__lead {
  max-width: 42rem;
  margin: 0 auto 22px;
  color: var(--nsriv-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.65;
  text-transform: capitalize !important;
}

.nsriv-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 16px;
  padding: clamp(14px, 2.5vw, 18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nsriv .nsriv-tool__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--nsriv-muted);
}

.nsriv-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

.nsriv .nsriv-field__input {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  padding: 0 54px 0 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.18) !important;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.58) !important;
  color: var(--nsriv-ink) !important;
  font-family: var(--nsriv-font);
  font-size: 16px !important;
  font-weight: 600;
  line-height: 54px !important;
  outline: none;
  resize: none !important;
  overflow: hidden !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.nsriv .nsriv-field__input::placeholder {
  color: #91a3b7;
}

.nsriv .nsriv-field__input:focus {
  border-color: rgba(34, 211, 238, 0.62) !important;
  background: rgba(2, 6, 23, 0.76) !important;
  box-shadow:
    0 0 0 4px rgba(34, 211, 238, 0.14),
    0 10px 28px rgba(2, 6, 23, 0.22);
}

.nsriv .nsriv-field__paste {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 0 !important;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--nsriv-muted) !important;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.nsriv .nsriv-field__paste:hover {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(255, 90, 61, 0.9), rgba(255, 61, 110, 0.82)) !important;
}

.nsriv .nsriv-field__paste:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.32);
  outline-offset: 2px;
}

.nsriv .nsriv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 50px;
  min-height: 50px;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 13px;
  font-family: var(--nsriv-font);
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.nsriv .nsriv-btn--primary {
  background: linear-gradient(135deg, #ff7a3d 0%, #ff3d6e 54%, #7c3aed 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(255, 61, 110, 0.3);
}

.nsriv .nsriv-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(255, 61, 110, 0.38);
}

.nsriv .nsriv-btn--primary:active {
  transform: translateY(0);
  opacity: 0.94;
}

.nsriv .nsriv-btn:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.34);
  outline-offset: 3px;
}

.nsriv .nsriv-btn:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none !important;
  box-shadow: none !important;
}

.nsriv .nsriv-btn--ghost {
  background: rgba(255, 255, 255, 0.075) !important;
  color: var(--nsriv-ink) !important;
  border: 1px solid rgba(226, 232, 240, 0.16) !important;
  box-shadow: var(--nsriv-shadow-soft);
}

.nsriv .nsriv-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(34, 211, 238, 0.32) !important;
  transform: translateY(-1px);
}

.nsriv .nsriv-btn--cool {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9) !important;
  color: #02111b !important;
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.25);
}

.nsriv .nsriv-btn--cool:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.32);
}

.nsriv .nsriv-btn i {
  font-size: 0.95em;
  line-height: 1;
}

.nsriv-alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.nsriv-alert.is-visible {
  display: flex;
}

.nsriv-alert--error {
  background: rgba(251, 113, 133, 0.13);
  border: 1px solid rgba(251, 113, 133, 0.38);
  color: #fecdd3;
  box-shadow: 0 10px 24px rgba(251, 113, 133, 0.08);
}

.nsriv-alert--ok {
  background: rgba(52, 211, 153, 0.13);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #bbf7d0;
  box-shadow: 0 10px 24px rgba(52, 211, 153, 0.08);
}

.nsriv-hint {
  font-size: 0.82rem;
  color: var(--nsriv-dim);
  text-align: center;
}

/* ——— Skeleton ——— */
.nsriv-skeleton {
  display: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.048)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  padding: var(--nsriv-pad);
  box-shadow: var(--nsriv-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nsriv-skeleton.is-active {
  display: block;
  animation: nsriv-rise 0.35s ease both;
}

.nsriv-sk {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(34, 211, 238, 0.18) 45%,
    rgba(255, 90, 61, 0.14) 55%,
    rgba(255, 255, 255, 0.07) 100%
  );
  background-size: 220% 100%;
  animation: nsriv-shimmer 1.25s ease infinite;
  border-radius: 12px;
}

.nsriv-skeleton__preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  margin-bottom: 14px;
}

.nsriv-skeleton__line {
  height: 14px;
  margin-bottom: 10px;
}

.nsriv-skeleton__line--lg {
  width: 72%;
}

.nsriv-skeleton__line--md {
  width: 48%;
}

.nsriv-skeleton__line--sm {
  width: 32%;
  height: 12px;
}

/* ——— Result ——— */
.nsriv-result {
  display: none;
  animation: nsriv-rise 0.45s ease both;
}

.nsriv-result.is-visible {
  display: block;
}

.nsriv-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.05)),
    var(--nsriv-panel);
  border: 1px solid var(--nsriv-line);
  border-radius: var(--nsriv-radius);
  box-shadow: var(--nsriv-shadow);
  padding: clamp(14px, 3vw, 22px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nsriv-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nsriv .nsriv-meta__title {
  font-size: clamp(1.08rem, 2.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.32;
  color: var(--nsriv-ink) !important;
  text-transform: capitalize !important;
}

.nsriv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(226, 232, 240, 0.14);
  color: var(--nsriv-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.nsriv-chip i {
  color: #ff8a5f;
  font-size: 0.85em;
}

.nsriv-chip--type {
  background: linear-gradient(135deg, rgba(255, 90, 61, 0.2), rgba(255, 61, 110, 0.16));
  border-color: rgba(255, 90, 61, 0.38);
  color: #fed7c7;
}

.nsriv-featured {
  position: relative;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(226, 232, 240, 0.12);
  min-height: 180px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nsriv-featured__media {
  width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  background: #020617;
  cursor: zoom-in;
}

.nsriv-featured__media--video {
  cursor: default;
}

.nsriv-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.nsriv-featured__actions .nsriv-btn {
  flex: 1 1 140px;
  height: 44px;
  min-height: 44px;
  font-size: 0.9rem !important;
}

.nsriv-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--nsriv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsriv-section-label span {
  color: var(--nsriv-dim);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.nsriv-media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@container nsriv (min-width: 560px) {
  .nsriv-media-list {
    grid-template-columns: 1fr 1fr;
  }
}

.nsriv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(226, 232, 240, 0.13);
  min-width: 0;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nsriv-card:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(34, 211, 238, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
}

.nsriv-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #020617;
  cursor: zoom-in;
}

.nsriv-card__thumb--video {
  object-fit: contain;
  background: #000;
  cursor: default;
}

.nsriv-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nsriv-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nsriv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nsriv-card__actions .nsriv-btn {
  flex: 1 1 auto;
  height: 40px;
  min-height: 40px;
  font-size: 0.84rem !important;
}

.nsriv-empty {
  display: none;
  text-align: center;
  padding: 28px 16px;
  color: var(--nsriv-muted);
}

.nsriv-empty.is-visible {
  display: block;
}

.nsriv-empty i {
  display: block;
  font-size: 2rem;
  margin: 0 auto 10px;
  opacity: 0.65;
  color: #ff7a3d;
}

.nsriv-empty p {
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.94rem;
  line-height: 1.6;
}

/* ——— Modal ——— */
.nsriv-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nsriv-modal.is-open {
  display: flex;
  animation: nsriv-fade 0.2s ease both;
}

.nsriv-modal__dialog {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.nsriv-modal__media {
  max-height: 82vh;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.nsriv .nsriv-modal__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nsriv .nsriv-modal__close:hover {
  transform: scale(1.04);
  background: rgba(255, 90, 61, 0.94) !important;
}

@keyframes nsriv-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nsriv-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes nsriv-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 768px) {
  .nsriv {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .nsriv-shell {
    padding: 28px 12px;
    gap: 14px;
  }

  .nsriv-hero {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .nsriv-brand {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.25rem;
  }

  .nsriv .nsriv-hero__title {
    font-size: clamp(1.45rem, 6vw, 1.8rem);
    line-height: 1.25;
  }

  .nsriv .nsriv-hero__lead {
    font-size: 0.95rem;
    margin-bottom: 18px;
  }

  .nsriv-tool {
    align-items: stretch;
    gap: 11px;
    padding: 14px;
  }

  .nsriv-field {
    width: 100%;
    max-width: 100%;
  }

  .nsriv .nsriv-field__input {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    line-height: 52px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .nsriv .nsriv-btn {
    width: 100%;
    height: 50px;
    min-height: 50px;
  }

  .nsriv-featured__actions,
  .nsriv-card__actions {
    flex-direction: column;
  }

  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    flex: 0 0 auto;
    width: 100%;
  }

  .nsriv-section-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .nsriv-shell {
    padding: 22px 10px;
  }

  .nsriv-hero,
  .nsriv-panel,
  .nsriv-skeleton {
    border-radius: 14px;
  }

  .nsriv-tool {
    border-radius: 13px;
  }

  .nsriv .nsriv-hero__title {
    font-size: 1.45rem;
  }

  .nsriv .nsriv-hero__lead {
    font-size: 0.92rem;
  }

  .nsriv .nsriv-field__input {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    line-height: 50px !important;
    font-size: 16px !important;
  }

  .nsriv .nsriv-field__paste {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .nsriv-featured {
    min-height: 150px;
  }

  .nsriv-featured__actions .nsriv-btn,
  .nsriv-card__actions .nsriv-btn {
    flex: 0 0 auto;
  }

  .nsriv-modal {
    padding: 12px;
  }

  .nsriv-modal__media {
    max-height: 78vh;
    border-radius: 12px;
  }

  .nsriv .nsriv-modal__close {
    top: 8px;
    right: 8px;
  }
}