.nn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.nn-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 60%, #fffdf8 0%, #f3e6d3 100%);
  border: 1px solid var(--border);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}
.nn-stage.is-nice {
  background: radial-gradient(circle at 50% 55%, #fff9e6 0%, #f4e2b8 100%);
  border-color: var(--accent);
}
.nn-stage.is-naughty {
  background: radial-gradient(circle at 50% 55%, #fff0eb 0%, #f3d2c8 100%);
  border-color: var(--primary);
}
.nn-3d-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  cursor: grab;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.nn-3d-wrap:active { cursor: grabbing; }
.nn-3d-wrap.is-hop { animation: nnHop 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.nn-3d-wrap.is-shake { animation: nnShake 0.45s ease; }
@keyframes nnHop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-16px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes nnShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
  75% { transform: rotate(-5deg); }
}
.nn-3d-sprite {
  width: 100%;
  height: 100%;
  background-image: url('/_a/santa-ledger-360.55ef25b45d.webp');
  background-size: 600% 600%;
  background-repeat: no-repeat;
  background-position: 40% 80%;
  filter: drop-shadow(0 12px 16px rgba(43, 33, 24, 0.18));
}
.nn-3d-hint {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nn-spark {
  position: absolute;
  pointer-events: none;
  font-size: 18px;
  animation: nnSpark 0.8s ease-out forwards;
}
@keyframes nnSpark {
  0% { opacity: 1; transform: translate(0, 0) scale(0.7); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); }
}
.nn-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.nn-mode-btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.nn-mode-btn small { font-size: 12px; font-weight: 400; color: var(--muted); }
.nn-mode-btn.is-active {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.nn-form {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.nn-input {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
.nn-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.nn-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.nn-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.nn-error { color: var(--primary-dark); font-size: 14px; margin: 8px 0 0; font-weight: 600; }
.nn-loading {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px dashed var(--accent);
  text-align: center;
}
.nn-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  max-width: 320px;
  margin: 12px auto 0;
}
.nn-bar-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.35s ease;
}
.nn-result {
  margin-top: 24px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 2px solid var(--accent);
  padding: 24px;
  position: relative;
}
.nn-result.is-naughty { border-color: var(--primary); }
.nn-res-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.nn-kicker { font-size: 12px; font-weight: 600; color: var(--primary-dark); letter-spacing: 0.05em; }
.nn-res-name { font-family: 'Fraunces', Georgia, serif; font-size: 32px; color: var(--text); margin: 4px 0; }
.nn-res-status { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; }
.nn-seal {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px dashed var(--accent);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  animation: nnStamp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nn-seal strong { font-size: 18px; font-family: 'Fraunces', Georgia, serif; }
@keyframes nnStamp {
  0% { transform: scale(1.6) rotate(-14deg); opacity: 0; }
  100% { transform: scale(1) rotate(-6deg); opacity: 1; }
}
.nn-meter { margin: 16px 0; }
.nn-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.nn-meter-track {
  height: 12px;
  border-radius: 999px;
  background: #ebd8c8;
  overflow: hidden;
}
.nn-meter-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.nn-notes {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: grid;
  gap: 8px;
}
.nn-notes li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
}
.nn-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nn-appeal {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nn-appeal p { margin: 4px 0 0; font-size: 14px; }
.nn-cert-preview { margin-top: 16px; text-align: center; }
.nn-cert-preview canvas {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .nn-form { flex-direction: column; }
  .nn-modes { grid-template-columns: 1fr; }
  .nn-res-head { flex-direction: column; }
  .nn-appeal { flex-direction: column; align-items: stretch; }
  .nn-3d-wrap { width: 176px; height: 176px; }
}