:root {
  --nl-gift-accent: #0665d0;
  --nl-gift-accent-soft: rgba(6, 101, 208, 0.1);
  --nl-gift-ink: #1f2937;
  --nl-gift-muted: #667085;
  --nl-gift-line: #e5ebf3;
  --nl-gift-surface: #ffffff;
  --nl-gift-canvas: #f5f6fb;
}

#nl-gift-card-menu {
  cursor: pointer;
}

#nl-gift-card-menu:focus-visible .n-menu-item-content {
  outline: 2px solid rgba(6, 101, 208, 0.45);
  outline-offset: -2px;
}

#nl-gift-card-root {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 85% 4%, rgba(6, 101, 208, 0.07), transparent 23rem),
    var(--nl-gift-canvas);
}

body.nl-gift-card-active article > section:not(#nl-gift-card-root) {
  display: none !important;
}

body.nl-gift-card-active #nl-gift-card-root {
  display: block;
}

.nl-gift-shell {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--nl-gift-ink);
}

.nl-gift-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.nl-gift-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--nl-gift-accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.nl-gift-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}

.nl-gift-subtitle {
  max-width: 40rem;
  margin: 0.7rem 0 0;
  color: var(--nl-gift-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.nl-gift-back {
  flex: 0 0 auto;
  min-height: 2.45rem;
  padding: 0 1rem;
  border: 1px solid var(--nl-gift-line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.82);
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 560;
  transition: border-color 180ms ease, color 180ms ease, transform 160ms ease;
}

.nl-gift-back:hover {
  border-color: rgba(6, 101, 208, 0.42);
  color: var(--nl-gift-accent);
}

.nl-gift-back:active {
  transform: translateY(1px);
}

.nl-gift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
  gap: 1.35rem;
  align-items: start;
}

.nl-gift-card {
  border: 1px solid var(--nl-gift-line);
  border-radius: 1rem;
  background: var(--nl-gift-surface);
  box-shadow: 0 0.8rem 2.4rem rgba(30, 64, 112, 0.07);
}

.nl-gift-card-main {
  padding: 1.6rem;
}

.nl-gift-card-side {
  padding: 1.45rem;
}

.nl-gift-card h2,
.nl-gift-card h3 {
  margin: 0;
  color: var(--nl-gift-ink);
  font-weight: 640;
  letter-spacing: -0.015em;
}

.nl-gift-card h2 {
  font-size: 1.2rem;
}

.nl-gift-card h3 {
  font-size: 1rem;
}

.nl-gift-card-copy {
  margin: 0.5rem 0 1.35rem;
  color: var(--nl-gift-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.nl-gift-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 620;
}

.nl-gift-input {
  width: 100%;
  height: 3rem;
  padding: 0 0.95rem;
  border: 1px solid #d8e0eb;
  border-radius: 0.62rem;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.nl-gift-input:hover {
  border-color: #b8c6d8;
}

.nl-gift-input:focus {
  border-color: var(--nl-gift-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(6, 101, 208, 0.13);
}

.nl-gift-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.nl-gift-button {
  min-height: 2.72rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.58rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 620;
  transition: transform 160ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.nl-gift-button:focus-visible,
.nl-gift-back:focus-visible {
  outline: 3px solid rgba(6, 101, 208, 0.22);
  outline-offset: 2px;
}

.nl-gift-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

.nl-gift-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.nl-gift-button-primary {
  flex: 1 1 auto;
  background: var(--nl-gift-accent);
  color: #fff;
  box-shadow: 0 0.45rem 1rem rgba(6, 101, 208, 0.19);
}

.nl-gift-button-primary:hover:not(:disabled) {
  background: #0056b8;
  box-shadow: 0 0.6rem 1.25rem rgba(6, 101, 208, 0.25);
}

.nl-gift-button-secondary {
  flex: 0 0 auto;
  border-color: #cfd9e6;
  background: #fff;
  color: #344054;
}

.nl-gift-button-secondary:hover:not(:disabled) {
  border-color: rgba(6, 101, 208, 0.46);
  color: var(--nl-gift-accent);
}

.nl-gift-status {
  min-height: 1.5rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.nl-gift-status[data-kind="muted"] {
  color: var(--nl-gift-muted);
}

.nl-gift-status[data-kind="success"] {
  color: #087443;
}

.nl-gift-status[data-kind="error"] {
  color: #b42318;
}

.nl-gift-preview {
  display: none;
  margin-top: 1.2rem;
  padding: 1.15rem;
  border: 1px solid rgba(6, 101, 208, 0.2);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, rgba(6, 101, 208, 0.07), rgba(6, 101, 208, 0.025));
}

.nl-gift-preview[data-visible="true"] {
  display: block;
}

.nl-gift-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.nl-gift-preview-name {
  font-size: 1.05rem;
  font-weight: 650;
}

.nl-gift-preview-type {
  flex: 0 0 auto;
  padding: 0.25rem 0.55rem;
  border-radius: 0.35rem;
  background: rgba(6, 101, 208, 0.1);
  color: var(--nl-gift-accent);
  font-size: 0.76rem;
  font-weight: 650;
}

.nl-gift-preview-description {
  margin: 0 0 0.85rem;
  color: var(--nl-gift-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.nl-gift-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nl-gift-reward {
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(6, 101, 208, 0.17);
  border-radius: 0.48rem;
  background: #fff;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 570;
}

.nl-gift-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.nl-gift-meta-item {
  padding: 0.65rem 0.72rem;
  border-radius: 0.52rem;
  background: rgba(255, 255, 255, 0.68);
}

.nl-gift-meta-label {
  display: block;
  margin-bottom: 0.2rem;
  color: #7a8699;
  font-size: 0.72rem;
}

.nl-gift-meta-value {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 600;
}

.nl-gift-tips {
  display: grid;
  gap: 1rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.nl-gift-tip {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
}

.nl-gift-tip-index {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.5rem;
  background: var(--nl-gift-accent-soft);
  color: var(--nl-gift-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.nl-gift-tip strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #344054;
  font-size: 0.9rem;
}

.nl-gift-tip span:last-child {
  color: var(--nl-gift-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.nl-gift-history {
  margin-top: 1.35rem;
  overflow: hidden;
}

.nl-gift-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--nl-gift-line);
}

.nl-gift-history-refresh {
  border: 0;
  background: transparent;
  color: var(--nl-gift-accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 620;
}

.nl-gift-history-scroll {
  overflow-x: auto;
}

.nl-gift-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.nl-gift-table th,
.nl-gift-table td {
  padding: 0.9rem 1.35rem;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  vertical-align: middle;
}

.nl-gift-table th {
  background: #fbfcfe;
  color: #7a8699;
  font-size: 0.76rem;
  font-weight: 650;
}

.nl-gift-table td {
  color: #475467;
}

.nl-gift-table tbody tr:last-child td {
  border-bottom: 0;
}

.nl-gift-code-mask {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.nl-gift-empty {
  padding: 2.4rem 1.25rem;
  color: #7a8699;
  text-align: center;
  font-size: 0.88rem;
}

html.dark {
  --nl-gift-ink: #eef2f7;
  --nl-gift-muted: #aeb9c9;
  --nl-gift-line: rgba(148, 163, 184, 0.18);
  --nl-gift-surface: #1a1b20;
  --nl-gift-canvas: #101014;
}

html.dark #nl-gift-card-root {
  background:
    radial-gradient(circle at 85% 4%, rgba(42, 132, 222, 0.1), transparent 23rem),
    var(--nl-gift-canvas);
}

html.dark .nl-gift-back,
html.dark .nl-gift-input,
html.dark .nl-gift-button-secondary,
html.dark .nl-gift-reward {
  border-color: rgba(148, 163, 184, 0.2);
  background: #22242a;
  color: #e4e9f0;
}

html.dark .nl-gift-input:focus {
  border-color: #2a84de;
  background: #25282f;
}

html.dark .nl-gift-card h2,
html.dark .nl-gift-card h3,
html.dark .nl-gift-label,
html.dark .nl-gift-preview-name,
html.dark .nl-gift-meta-value,
html.dark .nl-gift-tip strong {
  color: #eef2f7;
}

html.dark .nl-gift-preview {
  background: linear-gradient(145deg, rgba(42, 132, 222, 0.12), rgba(42, 132, 222, 0.035));
}

html.dark .nl-gift-meta-item,
html.dark .nl-gift-table th {
  background: rgba(255, 255, 255, 0.035);
}

html.dark .nl-gift-table td,
html.dark .nl-gift-table th {
  border-color: rgba(148, 163, 184, 0.13);
}

@media (max-width: 68.75rem) {
  .nl-gift-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 44rem) {
  .nl-gift-shell {
    width: min(100% - 1.2rem, 72rem);
    padding: 1.2rem 0 2rem;
  }

  .nl-gift-hero {
    display: block;
  }

  .nl-gift-back {
    margin-top: 1rem;
  }

  .nl-gift-card-main,
  .nl-gift-card-side {
    padding: 1.15rem;
  }

  .nl-gift-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nl-gift-button-secondary,
  .nl-gift-button-primary {
    width: 100%;
  }

  .nl-gift-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nl-gift-back,
  .nl-gift-button,
  .nl-gift-input {
    transition: none;
  }
}
