/* Number Target (w037) */
.nt { display: grid; gap: .5rem; width: 100%; max-width: 42rem; margin-inline: auto; }
.nt > *, .nt-board > * { min-width: 0; }
.nt button { -webkit-tap-highlight-color: transparent; }
.nt .kit-status:empty, .nt .nt-steps:empty, .nt .kit-note:empty { display: none; }

.nt-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; padding: .15rem; border: 1px solid var(--border); border-radius: .8rem; background: #0c1220; }
.nt-modes button { border: 0; background: transparent; }
.nt-modes button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Level tabs: the chosen one has a filled background and a thick bottom bar; ✔/✖ marks daily progress. */
.nt-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.nt-levels button { display: flex; align-items: center; justify-content: center; gap: .3rem; min-width: 0; padding: .35rem .3rem; font-size: .95rem; line-height: 1.2; overflow-wrap: normal; }
.nt .nt-levels button[aria-pressed="true"] { background: #24304a; border-color: var(--accent); box-shadow: inset 0 -4px 0 var(--accent); }
.nt-mark { font-weight: 800; }
.nt-mark:empty { display: none; }
.nt .nt-levels button[data-state="solved"] .nt-mark { color: var(--ok); }
.nt .nt-levels button[data-state="revealed"] .nt-mark { color: var(--danger); }

.nt-board { display: grid; gap: .5rem; }
.nt-target-box { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .3rem .9rem; border: 1px solid var(--border); border-radius: .9rem; background: #0c1220; }
.nt-target { display: flex; align-items: baseline; gap: .6rem; margin: 0; }
.nt-target-label { color: var(--muted); font-weight: 700; }
.nt-target strong { font: 800 clamp(2.1rem, 10vw, 3.2rem)/1 ui-monospace, "SF Mono", Menlo, monospace; color: #ffd36e; font-variant-numeric: tabular-nums; }
.nt-meta { display: grid; justify-items: end; gap: .1rem; min-width: 0; text-align: end; }
.nt-title { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; line-height: 1.3; }
.nt-meter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem .7rem; margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.nt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.nt-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-width: 0; min-height: 54px; padding: .2rem; border: 2px solid #41506b; border-radius: .8rem; background: var(--card); color: var(--text); font-weight: 800; }
.nt-value { font: 800 clamp(1.6rem, 7.5vw, 2rem)/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.nt-key { position: absolute; top: .2rem; inset-inline-start: .45rem; display: none; color: var(--muted); font-size: .75rem; font-weight: 700; }
.nt-made { color: var(--muted); font-size: .72rem; font-weight: 600; line-height: 1.1; }
.nt .nt-card.made { background: #1d2a42; }
.nt .nt-card.empty { border-style: dashed; border-color: #2c3850; background: transparent; }
/* Selected card: color + raised + thick yellow frame + ✓ badge, so the state never depends on color alone. */
.nt .nt-card[aria-pressed="true"] { border: 3px solid #ffd36e; background: var(--accent); color: var(--accent-ink); transform: translateY(-3px); box-shadow: 0 4px 0 #0008; }
.nt .nt-card[aria-pressed="true"] .nt-made, .nt .nt-card[aria-pressed="true"] .nt-key { color: var(--accent-ink); }
.nt .nt-card[aria-pressed="true"]::after { content: '✓'; position: absolute; top: -.55rem; inset-inline-end: -.4rem; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #ffd36e; color: #10151f; font-size: .85rem; }
.nt .nt-card.hit { border: 3px solid var(--ok); background: #173a2b; }
.nt .nt-card.hit::after { content: '🎯'; position: absolute; top: -.6rem; inset-inline-end: -.35rem; font-size: 1.1rem; }

.nt-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.nt-ops button { min-height: 48px; padding: 0; font-size: 1.7rem; line-height: 1; }
.nt .nt-ops button[aria-pressed="true"] { border: 3px solid #ffd36e; background: #ffd36e; color: #10151f; box-shadow: inset 0 -4px 0 #0005; }

.nt-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.nt-actions button { min-width: 0; padding: .35rem .4rem; font-size: .95rem; line-height: 1.2; overflow-wrap: normal; }

.nt-steps { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.nt-steps li { padding: .2rem .6rem; border-radius: .5rem; background: #0c1220; border: 1px solid var(--border); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-steps li.hit { border-color: var(--ok); color: var(--ok); }
.nt-solution { justify-content: center; }

.nt-result { display: grid; gap: .6rem; padding: 1rem; border: 2px solid var(--accent); border-radius: 1rem; background: #13231f; text-align: center; }
.nt-result[data-state="revealed"] { border-color: #ffd36e; background: #2a261a; }
.nt-result h2 { margin: 0; font-size: clamp(1.3rem, 5vw, 1.8rem); }
.nt-result-note { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nt .nt-record { color: #ffd36e; font-weight: 700; }
.nt-result-actions { justify-content: center; }
.nt-result-actions button { min-height: 52px; }

.nt-how { border: 1px solid var(--border); border-radius: .85rem; background: #0c1220; }
.nt-how summary { display: flex; align-items: center; min-height: 48px; padding: .5rem 1rem; cursor: pointer; font-weight: 700; }
.nt-how-body { display: grid; gap: .6rem; padding: 0 1rem 1rem; }
.nt-how-body p { margin: 0; }
.nt-example { display: grid; gap: .45rem; padding: .6rem .75rem; border-radius: .7rem; background: var(--card); }
.nt-example p { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-weight: 700; }
.nt-example-target { margin-inline-end: .4rem; color: #ffd36e; font-size: 1.2rem; }
.nt-mini { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .3rem; border: 2px solid #41506b; border-radius: .5rem; background: #0c1220; font-variant-numeric: tabular-nums; }
.nt-mini.sel { border-color: #ffd36e; background: var(--accent); color: var(--accent-ink); }
.nt-mini.made { background: #1d2a42; }
.nt-mini.hit { border-color: var(--ok); background: #173a2b; }

.nt-records { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--border); border-radius: .85rem; }
.nt-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0; text-align: center; }
.nt-stat-grid.nt-best { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nt-stat-grid dt { color: var(--muted); font-size: .85rem; overflow-wrap: break-word; hyphens: auto; }
.nt-stat-grid dd { margin: 0; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nt-best-title { margin: .25rem 0 0; font-size: 1rem; color: var(--muted); }
.nt-footer-actions { justify-content: flex-end; }

/* Keyboard hints (1–6) only where a hardware keyboard is likely. */
@media (hover: hover) and (pointer: fine) {
  .nt-key { display: block; }
}
@media (min-width: 640px) {
  .nt-card { min-height: 76px; }
  .nt-cards, .nt-ops { gap: .6rem; }
}
@media (max-width: 380px) {
  .nt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt-stat-grid.nt-best { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  .nt-card { transition: transform .12s ease, background-color .12s ease; }
}
