.nwc-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nwc-btn {
  appearance: none;
  border: 1px solid var(--border, rgba(255,255,255,0.16));
  background: transparent;
  color: var(--text-primary, #fff);
  font: inherit;
  font-size: var(--text-sm, 13px);
  line-height: 1;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.nwc-btn:hover {
  background: var(--surface-2, rgba(255,255,255,0.08));
  border-color: var(--border-strong, rgba(255,255,255,0.28));
}

.nwc-btn:active { transform: scale(0.97); }

.nwc-btn:focus-visible {
  outline: 2px solid var(--accent, #4f9d78);
  outline-offset: 2px;
}

.nwc-btn--primary {
  background: var(--invert-bg, #fff);
  border-color: var(--invert-bg, #fff);
  color: var(--invert-fg, #000);
  font-weight: 600;
}

.nwc-btn--primary:hover {
  background: var(--invert-bg, #fff);
  border-color: var(--invert-bg, #fff);
  filter: brightness(0.92);
}

.nwc-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  animation: nwc-rise 260ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.nwc-banner.is-going {
  animation: nwc-sink 200ms ease forwards;
}

.nwc-banner__panel {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  width: min(920px, 100%);
  padding: 16px 20px;
  border: 1px solid var(--border, rgba(255,255,255,0.16));
  border-radius: 14px;
  background: var(--surface-3, #282828);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.nwc-banner__text { flex: 1 1 380px; min-width: 0; }

.nwc-banner__title {
  display: block;
  font-size: var(--text-sm, 13px);
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
}

.nwc-banner__body {
  margin: 0;
  font-size: var(--text-xs, 12px);
  line-height: 1.55;
  color: var(--text-secondary, #b3b3b3);
}

.nwc-banner__acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@keyframes nwc-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes nwc-sink {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(16px); }
}

.nwc-locked { overflow: hidden; }

.nwc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.nwc-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  animation: nwc-fade 180ms ease;
}

.nwc-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(86vh, 780px);
  border: 1px solid var(--border, rgba(255,255,255,0.16));
  border-radius: 16px;
  background: var(--surface-2, #181818);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: nwc-pop 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
  overflow: hidden;
}

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

@keyframes nwc-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.nwc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.nwc-modal__title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.nwc-modal__sub {
  margin: 4px 0 0;
  font-size: var(--text-xs, 12px);
  color: var(--text-secondary, #b3b3b3);
}

.nwc-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary, #b3b3b3);
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 8px;
}

.nwc-modal__close:hover { color: var(--text-primary, #fff); background: var(--surface-3, #282828); }
.nwc-modal__close:focus-visible { outline: 2px solid var(--accent, #4f9d78); outline-offset: 2px; }

.nwc-modal__body {
  padding: 4px 24px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.nwc-cat {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.nwc-cat:last-of-type { border-bottom: 0; }

.nwc-cat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.nwc-cat__lead { min-width: 0; }

.nwc-cat__title {
  margin: 0 0 4px;
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.nwc-cat__note {
  margin: 0;
  font-size: var(--text-xs, 12px);
  line-height: 1.55;
  color: var(--text-secondary, #b3b3b3);
}

.nwc-always {
  flex: none;
  font-size: 11px;
  color: var(--text-quaternary, #6a6a6a);
  padding: 5px 10px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 999px;
  white-space: nowrap;
}

.nwc-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.nwc-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nwc-switch__track {
  display: block;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: var(--surface-3, #282828);
  border: 1px solid var(--border, rgba(255,255,255,0.16));
  transition: background 140ms ease, border-color 140ms ease;
}

.nwc-switch__dot {
  display: block;
  width: 15px;
  height: 15px;
  margin: 3px;
  border-radius: 50%;
  background: var(--text-quaternary, #6a6a6a);
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1), background 140ms ease;
}

.nwc-switch input:checked ~ .nwc-switch__track {
  background: var(--accent, #1db954);
  border-color: var(--accent, #1db954);
}

.nwc-switch input:checked ~ .nwc-switch__track .nwc-switch__dot {
  transform: translateX(17px);
  background: #fff;
}

.nwc-switch input:focus-visible ~ .nwc-switch__track {
  outline: 2px solid var(--accent, #4f9d78);
  outline-offset: 2px;
}

.nwc-t {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary, #b3b3b3);
}

.nwc-t th {
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-quaternary, #6a6a6a);
  padding: 0 12px 7px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.nwc-t td {
  padding: 9px 12px 9px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.nwc-t tr:last-child td { border-bottom: 0; }

.nwc-t__name {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: var(--text-primary, #fff);
  white-space: nowrap;
}

.nwc-t__life { white-space: nowrap; color: var(--text-quaternary, #6a6a6a); }

.nwc-fine {
  margin: 18px 0 0;
  font-size: var(--text-xs, 12px);
  line-height: 1.6;
  color: var(--text-quaternary, #6a6a6a);
}

.nwc-fine a { color: var(--text-secondary, #b3b3b3); }

.nwc-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  background: var(--surface-1, rgba(255,255,255,0.03));
}

.nwc-modal__foot-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .nwc-banner__panel { padding: 14px 16px; gap: 14px; }
  .nwc-banner__acts { width: 100%; }
  .nwc-banner__acts .nwc-btn { flex: 1 1 auto; }
  .nwc-modal__panel { max-height: 92vh; }
  .nwc-modal__head, .nwc-modal__body, .nwc-modal__foot { padding-left: 16px; padding-right: 16px; }
  .nwc-t thead { display: none; }
  .nwc-t, .nwc-t tbody, .nwc-t tr, .nwc-t td { display: block; width: 100%; }
  .nwc-t tr { padding: 10px 0; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08)); }
  .nwc-t td { border: 0; padding: 1px 0; }
  .nwc-t__life { color: var(--text-quaternary, #6a6a6a); }
  .nwc-modal__foot { flex-direction: column-reverse; align-items: stretch; }
  .nwc-modal__foot-right { justify-content: stretch; }
  .nwc-modal__foot .nwc-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .nwc-banner, .nwc-banner.is-going, .nwc-modal__scrim, .nwc-modal__panel { animation: none; }
  .nwc-switch__dot, .nwc-btn { transition: none; }
}
