/* Nook admin panel: layout on top of j4m5.css (J4M5 Design System). */
body { min-height: 100vh; }
.n-blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.n-blobs svg { position: absolute; display: block; opacity: .85; }
.n-blobs .b1 { width: 440px; right: -170px; top: -170px; }
.n-blobs .b2 { width: 250px; right: 70px; top: -120px; mix-blend-mode: var(--overprint-blend); }

.n-head { gap: 6px; padding: 6px 6px 6px 16px; }
.n-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--foreground); text-decoration: none; margin-right: auto; }
.n-desk { display: none; gap: 2px; }
.n-me { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--shape-pebble); }
.n-me:hover { box-shadow: none; background: transparent; }
@media (min-width: 768px) { .n-desk { display: flex; } }

.n-main { width: min(720px, 100%); margin: 0 auto; padding: 18px 16px 120px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .n-main { padding-bottom: 48px; } }
.n-bare .n-main { padding-top: 32px; padding-bottom: 48px; }
.n-narrow { width: min(480px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.n-flash { margin-bottom: 2px; }

.n-pagehead { display: flex; align-items: flex-end; gap: 10px; margin-top: 6px; }
.n-pagehead > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.n-pagehead h1 { margin: 0; font-size: clamp(30px, 8vw, 40px); line-height: 1.05; }
.n-pagehead .j-slab { font-size: 12px; }
.n-back { align-self: center; }

.n-stack { display: flex; flex-direction: column; gap: 14px; }
.n-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.n-form h1 { margin: 0; font-size: 34px; line-height: 1.05; }
.n-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.n-code { margin: 0; padding: 12px 14px; border-radius: var(--shape-control); background: var(--muted); font-family: var(--font-mono); font-size: 13px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.n-h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.n-foot { text-align: center; }

.n-login { padding-top: 6vh; }
.n-login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 38px; }
.n-qr { align-self: center; width: 208px; height: 208px; padding: 12px; border-radius: var(--shape-tile); background: #f4f3ef; display: grid; place-items: center; }
.n-qr img, .n-qr svg { width: 100%; height: auto; image-rendering: pixelated; }
.n-secret { font-size: 14px; letter-spacing: .04em; word-break: break-all; }
.n-code-input { font-size: 24px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

.n-person { display: flex; align-items: center; gap: 12px; }
.n-person > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.n-person > div span { font-size: 13px; }
.n-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--shape-pebble); background: var(--av, var(--gem-amethyst)); color: var(--on-gem); font-weight: 800; }

.n-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.n-toggle > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.n-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.n-inline { display: inline-flex; margin: 0; }
.n-sticky { position: sticky; bottom: 92px; z-index: 5; padding: 10px; border-radius: var(--shape-pill); background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
@media (min-width: 768px) { .n-sticky { bottom: 12px; } }

.n-kid-nums { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.n-bar { display: flex; height: 12px; gap: 2px; border-radius: 6px; overflow: hidden; background: var(--secondary); }
.n-bar span { height: 100%; }
.n-legends { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.n-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.n-legend i { width: 10px; height: 10px; border-radius: 40% 60% 52% 48%; display: inline-block; }
.n-request { color: var(--gem-topaz-deep); }
.n-request .n-person > div span { color: inherit; }

.n-cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.n-cardhead a { font-size: 13px; font-weight: 650; }
.n-listrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.n-listrow:first-of-type { border-top: 0; }
.n-listrow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.n-listrow > div span { font-size: 12px; }
.n-linkrow { color: var(--foreground); text-decoration: none; }
.n-linkcard { color: var(--foreground); text-decoration: none; transition: transform .15s; }
.n-linkcard:hover { transform: translateY(-1px); }
.n-linkcard .n-person > div span { font-size: 12.5px; }

.n-menu { position: relative; }
.n-menu summary { list-style: none; cursor: pointer; }
.n-menu summary::-webkit-details-marker { display: none; }
.n-menu > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 10px; border-radius: var(--shape-tile); display: flex; flex-direction: column; gap: 6px; }
.n-menu > div .j-btn { width: 100%; justify-content: flex-start; }

.n-fieldset { border: 0; padding: 0; margin: 0; }
.n-fieldset legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.n-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.n-swatch { position: relative; cursor: pointer; }
.n-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.n-swatch > span:first-of-type { display: block; width: 40px; height: 40px; border-radius: var(--shape-pebble); background: var(--sw); }
.n-swatch input:checked + span { outline: 3px solid var(--foreground); outline-offset: 3px; }
.n-swatch input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 3px; }
.n-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.n-cats { display: flex; flex-direction: column; }
.n-catrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.n-catrow > span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.n-seg { display: inline-flex; gap: 3px; padding: 4px; border-radius: var(--shape-pill); }
.n-seg label { position: relative; cursor: pointer; }
.n-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.n-seg span { display: block; padding: 7px 12px; border-radius: var(--shape-pill); font-size: 13px; font-weight: 600; color: var(--muted-foreground); white-space: nowrap; }
.n-seg input:checked + span { background: var(--background); color: var(--foreground); box-shadow: 2px 3px 0 var(--overprint); }
.n-seg input:focus-visible + span { outline: 3px solid var(--ring); }
.n-seg input:disabled + span { opacity: .7; }
.n-seg-wide { display: flex; }
.n-seg-wide label { flex: 1; text-align: center; }

.n-domains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.n-domains li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; overflow-wrap: anywhere; }
.n-domains li[hidden] { display: none; }

.n-tabs { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.n-tabs a { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: var(--shape-pill); font: 600 14px var(--font-sans); color: var(--muted-foreground); text-decoration: none; white-space: nowrap; }
.n-tabs a[aria-selected="true"] { background: var(--background); color: var(--foreground); box-shadow: 2px 3px 0 var(--overprint); }

.n-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; }
.n-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; text-align: center; }
.n-col b { font-size: 12px; font-variant-numeric: tabular-nums; }
.n-colbar { position: relative; width: 100%; max-width: 44px; height: 150px; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 10px 14px 6px 6px; overflow: hidden; background: var(--secondary); }
.n-colbar span { width: 100%; flex: none; }
.n-limit { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--foreground); opacity: .55; z-index: 1; }
.n-legend .n-limit-key { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--foreground); opacity: .55; }

.n-roleline { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.n-copy { display: flex; gap: 8px; }
.n-copy input { flex: 1; min-width: 0; font-size: 13px; }
.n-paircode { font-family: var(--font-mono); font-size: 40px; font-weight: 700; letter-spacing: .12em; }

dialog.n-confirm { width: min(420px, calc(100% - 32px)); padding: 24px; border-radius: var(--shape-card); }
dialog.n-confirm p { margin: 0 0 18px; font-size: 16px; }
dialog.n-confirm .n-actions { justify-content: flex-end; }
