/* PANDAMONIUM Admin Control Center: Midnight Neon (approved website theme tokens).
   Neon purple is used for accents and borders only, never for body text. */
:root {
  --midnight: #10071d;
  --plum: #2b1049;
  --neon: #a020f0;
  --magenta: #eb26f5;
  --text: #f8f4ff;
  --ember: #f45b36;
  --panel: #1a0d2e;
  --line: #4a2a73;
  --muted: #cbbde3;
  --ok: #6be3a4;
  --warn: #ffb27a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--midnight); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #f3a8ff; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: .5rem 0; }
code { font-size: .85em; background: var(--plum); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0 0 .25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--midnight); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* Shell */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: rgba(16, 7, 29, .96); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .04em; margin-right: auto; }
.brand span { font-weight: 500; color: var(--muted); }
.who { font-size: .85rem; text-align: right; }
.who-role { color: var(--text); }
.nav-toggle { display: none; }
.shell { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: calc(100vh - 3.25rem); }
.sidebar { border-right: 1px solid var(--line); background: var(--panel); padding: .75rem 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: flex; gap: .6rem; align-items: center; padding: .5rem 1rem; color: var(--text); text-decoration: none; font-size: .95rem; }
.sidebar a:hover { background: var(--plum); }
.sidebar a[aria-current="page"] { background: var(--plum); box-shadow: inset 3px 0 0 var(--magenta); }
.letter { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; border: 1px solid var(--neon); font-size: .8rem; font-weight: 700; flex: none; }
main { padding: 1.25rem clamp(1rem, 2vw, 2rem) 3rem; min-width: 0; }
main:focus { outline: none; }

/* Cards and layout */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 1rem; min-width: 0; }
details.card > summary { cursor: pointer; }
details.card[open] > summary { margin-bottom: .75rem; }
.card-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start; }
.grid .card { margin: 0; }
.marketplace-listing label { display: block; margin: .65rem 0 .25rem; }
.marketplace-listing .actions { margin: .75rem 0; }
.marketplace-listing .btn { max-width: 100%; }
.marketplace-listing p { overflow-wrap: anywhere; }
.notice { border: 1px solid var(--ember); background: rgba(244, 91, 54, .1); border-radius: 10px; padding: .75rem 1rem; }
.capability { border-left: 3px solid var(--neon); padding: .25rem 0 .25rem .9rem; margin: .5rem 0 1rem; font-size: .95rem; }
.capability p { margin: .25rem 0; }
.pending { margin: .25rem 0; padding-left: 1.2rem; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tabs a { padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; }
.tabs a[aria-current="page"] { border-color: var(--magenta); background: var(--plum); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: .3rem 0; border-bottom: 1px solid rgba(74, 42, 115, .5); overflow-wrap: anywhere; }
.columns { columns: 2 12rem; }
.activity li { font-size: .9rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid rgba(74, 42, 115, .6); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .45rem 1rem; border-radius: 8px; border: 1px solid var(--neon); background: transparent; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--plum); border-color: var(--magenta); }
.btn.primary:hover { background: #3b1763; }
.btn.ghost { border-color: var(--line); }
.btn.small { min-height: 2rem; padding: .2rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .7; cursor: not-allowed; border-style: dashed; }
input, select, textarea { width: 100%; max-width: 40rem; padding: .55rem .65rem; border-radius: 8px; border: 1px solid var(--line); background: var(--midnight); color: var(--text); font: inherit; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--magenta); }
input:disabled, select:disabled, textarea:disabled { opacity: .75; }
.field { margin: 0 0 .9rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field.check { display: flex; gap: .5rem; align-items: center; }
.field.check label { margin: 0; }
fieldset.picker { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; max-height: 16rem; overflow: auto; margin: 0 0 .75rem; }
fieldset.picker legend { font-weight: 600; padding: 0 .25rem; }
.pick { display: flex; gap: .4rem; align-items: center; padding: .2rem 0; }
.transitions { display: flex; flex-direction: column; gap: .6rem; }
.transition { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.transition input { max-width: 18rem; }

/* Badges and gates */
.badge { display: inline-block; max-width: 100%; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; overflow-wrap: anywhere; background: var(--midnight); }
.badge.s-approved, .badge.s-certified, .badge.s-released, .badge.s-passed, .badge.s-team_approved, .badge.s-canon, .badge.s-published, .badge.s-scheduled, .badge.s-active, .badge.s-named, .badge.s-confirmed, .badge.s-done, .badge.s-applied { border-color: var(--ok); color: var(--ok); }
.badge.s-awaiting_owner, .badge.s-review, .badge.s-in_review, .badge.s-needs_manual, .badge.s-team_reviewed { border-color: var(--warn); color: var(--warn); }
.badge.s-failed, .badge.s-rejected, .badge.s-rolled_back, .badge.s-blocked { border-color: var(--ember); color: #ff9b80; }
.badge.s-locked { border-color: var(--magenta); color: #f3a8ff; }
.gate { font-size: .8rem; padding: .1rem .5rem; border-radius: 6px; border: 1px solid var(--line); }
.gate.g-owner { border-color: var(--ember); color: #ffb39f; }
.gate.g-team { border-color: var(--neon); color: #e4b8ff; }
.result { font-weight: 700; text-transform: uppercase; font-size: .75rem; }
.r-pass { color: var(--ok); }
.r-fail { color: #ff9b80; }
.r-warn, .r-manual { color: var(--warn); }
.r-info { color: var(--muted); }
.avail { font-size: .85rem; }
.a-not_supplied { color: #ffb39f; }
.a-in_repository, .a-supplied { color: var(--ok); }
.a-contextual_only { color: var(--warn); }
details.qc { border-top: 1px solid var(--line); padding: .5rem 0; }
details.qc summary { cursor: pointer; }

/* Fields, images, comparison */
dl.fields { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
dl.fields dt { color: var(--muted); }
dl.fields dd { margin: 0; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; }
.meta { color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.thumbs.big .thumb img { width: 8rem; height: 8rem; }
.thumb-wrap { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.thumb { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; color: var(--muted); }
.thumb img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--plum); }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--plum); }
.compare figcaption { color: var(--muted); margin-top: .3rem; }

/* Creation modes, pipeline board, meters */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.mode { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.mode.public { border-color: var(--ok); }
.mode .btn { margin-top: auto; align-self: flex-start; }
.board { display: grid; grid-template-columns: repeat(7, minmax(9rem, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.col { background: var(--midnight); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; min-height: 6rem; }
.stages { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; list-style: none; }
.meter { margin: .5rem 0 1rem; }
.meter-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.meter-bar { height: .6rem; border-radius: 999px; background: var(--midnight); border: 1px solid var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--neon), var(--magenta)); }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Toast */
.toast { position: fixed; right: 1rem; bottom: 1rem; max-width: min(28rem, calc(100vw - 2rem)); padding: .75rem 1rem; border-radius: 10px; background: var(--plum); border: 1px solid var(--ok); z-index: 20; }
.toast.error { border-color: var(--ember); }

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card { width: min(100%, 26rem); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.login-card label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
.login-card .btn { width: 100%; margin-top: 1rem; }
.hint { font-size: .85rem; color: var(--muted); }
.error { color: #ff9b80; }

/* Small screens */
@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; min-height: 2.5rem; padding: .3rem .8rem; border-radius: 8px; border: 1px solid var(--neon); background: transparent; color: var(--text); font: inherit; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-open .sidebar { display: block; }
  .who { display: none; }
  .brand span { display: none; }
  dl.fields { grid-template-columns: minmax(0, 1fr); }
  dl.fields dd { margin-bottom: .5rem; }
}
.actions select { width: auto; }
@media (max-width: 24rem) {
  .topbar { gap: .4rem; padding: .5rem .65rem; }
  .topbar .brand { font-size: .8rem; letter-spacing: .02em; }
  .topbar .nav-toggle, .topbar .btn { padding: .35rem .5rem; white-space: nowrap; }
}
.boards .board-entry .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.boards .board-entry .btn { margin-top: 0; }
.prompt-list { display: grid; gap: 1rem; }
.prompt-continuity h4 { margin: 1rem 0 .25rem; }
.linked-workflow { margin-top: 1rem; padding-left: .75rem; border-left: 3px solid var(--line); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.pager p { margin: 0; }
.load-error { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.load-error p { margin: 0; }

/* Website Branding & Assets */
.ok { color: var(--ok); }
.brand-art { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 1rem; }
.brand-current { margin: 0; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: .85rem; }
.brand-current img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--midnight); border-radius: 6px; margin-bottom: .4rem; }
.ladder { padding-left: 1.2rem; }
.ladder li.done { color: var(--muted); }
.ladder li.current { color: var(--text); }
.ladder li.todo { color: var(--muted); }
.cmd { overflow-x: auto; padding: .6rem .8rem; background: var(--plum); border-radius: 8px; font-size: .85rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.assign-editor { margin-top: 1rem; }
.fit-report li { margin-bottom: .35rem; }
.pv-groups { display: grid; gap: 1.5rem; }
.pv-frames { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.pv-toggle { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.pv-toggle [aria-pressed="true"] { border-color: var(--magenta); background: var(--plum); }
.pv-frame { position: relative; margin: 0; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--midnight); font-size: .75rem; }
.pv-frame figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .2rem .4rem; background: rgb(16 7 29 / .85); color: var(--muted); }
.pv-desktop { max-width: 30rem; aspect-ratio: 16 / 9; }
.pv-tablet { max-width: 17rem; aspect-ratio: 3 / 4; }
.pv-phone { max-width: 9.5rem; aspect-ratio: 9 / 16; }
.pv-img { display: block; width: 100%; height: 100%; }
.fit-cover { object-fit: cover; }
.fit-contain { object-fit: contain; }
.pv-kind-background .pv-img, .pv-kind-section .pv-img { position: absolute; inset: 0; }
.pv-safe { position: absolute; inset: 20%; border: 1px dashed var(--magenta); border-radius: 6px; display: grid; place-items: center; color: var(--text); background: rgb(16 7 29 / .35); }
.pv-bar { height: 14%; background: rgb(255 255 255 / .08); border-bottom: 1px solid var(--line); }
.pv-bar-logo { height: 36%; display: flex; align-items: center; padding-left: 6%; }
.pv-bar-logo .pv-img { width: 40%; height: auto; object-fit: contain; }
.pv-logo-phone .pv-img { width: 70%; }
.pv-hero { height: 52%; }
.pv-banner { height: 26%; margin: 6% 6% 0; }
.pv-lines { height: 18%; margin: 6%; border-top: 3px solid var(--line); border-bottom: 3px solid var(--line); }
.pv-card { position: absolute; inset: 14% 22% 22%; display: flex; flex-direction: column; align-items: center; color: var(--muted); }
.pv-card .pv-img { height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.pv-none { position: absolute; inset: 0; display: grid; place-items: center; padding: .5rem; text-align: center; color: var(--muted); }
.pv-watermark { position: absolute; top: .3rem; right: .3rem; padding: .1rem .4rem; border-radius: 4px; background: var(--ember); color: #1a0d2e; font-weight: 700; font-size: .65rem; letter-spacing: .06em; }

/* Six-area sidebar (owner-approved 2026-10-26). */
.sidebar .area + .area { margin-top: .5rem; }
.sidebar .area-name { display: block; padding: .5rem 1rem .25rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.area-heading { margin-top: 1.5rem; }

/* Frozen instructions remain readable without widening a narrow operator page. */
.json-snapshot { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* ONI uses native progress values under the existing strict CSP. */
.oni-project {background:#101923;border:1px solid #415063;border-radius:20px;padding:clamp(16px,3vw,32px);margin:24px 0;color:#edf3fa;min-width:0}
.oni-project h2 {font-size:1.7rem;margin:0}.oni-project h3 {font-size:1.05rem;line-height:1.5}.oni-project .muted,.oni-project small {color:#bdcad8}
.oni-status {display:inline-block;background:#243346;color:#f0d69b;padding:8px 12px;border-radius:12px}
.oni-tiles {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}
.oni-tile {background:#182535;border:1px solid #415063;padding:20px;border-radius:16px;min-width:0}.oni-tile h3 {margin:0 0 12px}.oni-number {font-size:clamp(1.3rem,3vw,2.2rem);font-weight:700;margin:12px 0;overflow-wrap:anywhere}
.oni-progress {display:block;width:100%;height:10px;border:0;border-radius:8px;overflow:hidden;background:#334155;margin:12px 0;accent-color:#62dca2}.oni-deployed {accent-color:#78b8ff}.oni-progress::-webkit-progress-bar{background:#334155}.oni-local::-webkit-progress-value{background:#62dca2}.oni-deployed::-webkit-progress-value{background:#78b8ff}.oni-local::-moz-progress-bar{background:#62dca2}.oni-deployed::-moz-progress-bar{background:#78b8ff}
.oni-health {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.oni-health dt {font-size:.9rem;color:#bdcad8}.oni-health dd {margin:8px 0;font-weight:700;font-size:1.15rem}
.oni-provenance {font-size:.85rem;overflow-wrap:anywhere}.oni-comparison {display:grid;grid-template-columns:1fr auto;gap:0 12px}.oni-comparison progress{grid-column:1/-1}
.oni-pillars {display:flex;align-items:flex-end;justify-content:space-around;height:120px;padding:24px 12px 0;margin:16px 0;background:#0b1118;border:1px solid #2a394a;border-radius:14px}
.oni-pillar {display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end;flex:1;max-width:90px}
.oni-pillar-val {font-size:.85rem;font-weight:700;margin-bottom:6px;color:#d8b4fe}
.oni-pillar-bar {width:100%;max-width:44px;border-radius:8px 8px 0 0;background:linear-gradient(180deg, #c084fc 0%, #581c87 100%);min-height:4px}
.oni-pillar-99 {height:99%}
.oni-pillar-91 {height:91.3%}
.oni-pillar-100 {height:100%}
.oni-pillar-label {font-size:.72rem;color:#bdcad8;margin-top:6px;text-align:center;line-height:1.2}
.oni-screenshot-wrap {margin-top:12px;padding:12px;background:#0d1520;border:1px solid #334155;border-radius:12px;text-align:center}
.oni-ref-screenshot {max-width:100%;height:auto;border-radius:8px;border:1px solid #415063;box-shadow:0 4px 16px rgba(0,0,0,.5)}
.oni-ref-note {margin-top:8px;font-size:0.8rem}
.oni-table-wrap {width:100%;overflow:auto}.oni-breakdown {width:100%;table-layout:fixed;min-width:0!important}.oni-breakdown th,.oni-breakdown td {white-space:normal!important;overflow-wrap:anywhere;text-overflow:clip!important;max-width:none!important;padding:12px 8px}.oni-breakdown th:first-child {width:44%}.oni-breakdown tfoot {font-weight:700;border-top:2px solid #62748c}
.oni-stage-sub {display:block;font-weight:normal;font-size:0.82rem;margin-top:2px;color:#bdcad8}
.oni-stage-detail {font-size:0.82rem;color:#bdcad8;background:rgba(255,255,255,0.02);padding:6px 10px 10px}
.oni-banner-hold {background:rgba(127,29,29,0.35);border:1px solid #ef4444;border-radius:12px;padding:12px 16px;margin:16px 0;color:#fecaca;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.oni-badge-hold {background:#7f1d1d;color:#fee2e2;border:1px solid #f87171;padding:4px 10px;border-radius:6px;font-weight:700;font-size:0.82rem;letter-spacing:0.04em;text-transform:uppercase;display:inline-block}
.oni-preview-btn {background:linear-gradient(135deg,#10b981 0%,#059669 100%);color:#ffffff!important;text-decoration:none;padding:8px 16px;border-radius:8px;font-weight:700;font-size:0.9rem;display:inline-flex;align-items:center;gap:8px;border:0}
.oni-preview-btn:hover {opacity:0.9;text-decoration:none}
.oni-advanced-card {background:#0d1520;border:1px solid #2a394a;border-radius:12px;padding:14px;margin:12px 0}
.oni-advanced-card h4 {margin:0 0 10px;font-size:0.95rem;color:#f8f4ff;border-bottom:1px solid #243346;padding-bottom:6px}
.oni-advanced-card h5 {margin:10px 0 6px;font-size:0.85rem;color:#d8b4fe}
.oni-advanced-card ul {margin:0;padding-left:20px;font-size:0.85rem;color:#cbd5e1}
.oni-advanced-card li {margin-bottom:4px}
.oni-readiness-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:10px 0}
.oni-readiness-card {background:#182535;border:1px solid #415063;border-radius:8px;padding:8px 12px}
.oni-readiness-head {display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.oni-readiness-status-verified {color:#6be3a4;font-weight:700;font-size:0.78rem;background:rgba(107,227,164,0.1);padding:2px 6px;border-radius:4px}
.oni-readiness-status-pending {color:#f59e0b;font-weight:700;font-size:0.78rem;background:rgba(245,158,11,0.1);padding:2px 6px;border-radius:4px}
.oni-project details {margin-top:24px}.oni-project summary{cursor:pointer}.oni-project dd {overflow-wrap:anywhere}
@media(max-width:420px){.oni-tiles{gap:10px}.oni-tile{padding:12px}.oni-health{gap:10px}.oni-breakdown th,.oni-breakdown td{font-size:.85rem;padding:10px 4px}}

/* v5 personal studios: long identity labels and hashes stay inside mobile viewports. */
#sidebar .area > a { display:block; padding:.65rem .8rem; text-decoration:none; overflow-wrap:anywhere; }
#sidebar .area > a[aria-current="page"] { background:var(--panel); border-left:3px solid currentColor; }
.studio-form { display:grid; gap:.8rem; margin-block:1rem; max-width:44rem; }
.studio-form label { display:grid; gap:.3rem; }
.studio-form input, .studio-form textarea, .studio-form select { width:100%; min-width:0; }
.studio-hash { overflow-wrap:anywhere; font-family:monospace; }
.studio-preview { max-width:100%; max-height:25rem; object-fit:contain; }

/* Owner-locked categorized Admin Hub. Keep original theme and module identifiers. */
.nav-category { margin: 0 0 .6rem; }
.nav-category > summary { cursor: pointer; padding: .65rem .9rem .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); overflow-wrap: anywhere; }
.nav-category > summary::marker { color: var(--muted); }
.sidebar .nav-category a { font-size: .88rem; min-height: 2.75rem; }
.drawer-close, .nav-backdrop { display: none; }
@media (min-width: 60.001rem) {
  .sidebar { position: sticky; top: 3.75rem; align-self: start; max-height: calc(100dvh - 3.75rem); overflow-y: auto; }
}
@media (max-width: 60rem) {
  body.nav-open { overflow: hidden; }
  .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(21rem, 88vw); height: 100dvh; z-index: 12; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
  .nav-open .sidebar { display: block; }
  .drawer-close { display: block; margin: .35rem .9rem .75rem; }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 11; background: #0009; border: 0; padding: 0; cursor: pointer; }
}
/* Read-only CYPHER NFT selection reuses Portfolio's safe image and ownership APIs. */
.cypher-wallet-status { display:grid; gap:.8rem; margin:1rem 0 1.5rem; }
.cypher-wallet-group { min-width:0; padding:.8rem; border:1px solid var(--line); border-radius:.8rem; background:var(--panel); }
.cypher-wallet-group h3 { margin:.15rem 0 .45rem; }
.cypher-wallet-group p { margin:.35rem 0; overflow-wrap:anywhere; }
.cypher-controls { display:flex; align-items:end; flex-wrap:wrap; gap:.75rem; margin:.75rem 0 1rem; }
.cypher-controls label { display:grid; gap:.35rem; }
.cypher-controls select { min-width:12rem; }
.cypher-nft-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:1rem 0; }
.cypher-nft-card { display:block; min-width:0; padding:.8rem; border:1px solid var(--line); border-radius:.8rem; background:var(--panel); overflow-wrap:anywhere; cursor:pointer; }
.cypher-nft-card h3 { margin:.4rem 0; font-size:1rem; }
.cypher-nft-card p { margin:.35rem 0; }
.cypher-nft-art { position:relative; display:grid; place-items:center; aspect-ratio:1; overflow:hidden; border-radius:.6rem; background:var(--midnight); }
.cypher-nft-art img { width:100%; height:100%; object-fit:contain; }
.cypher-nft-no-image { padding:1rem; text-align:center; color:var(--muted); }
.cypher-nft-card .pick { display:inline-flex; align-items:center; gap:.5rem; margin-top:.5rem; }
.cypher-selection-summary { margin:1rem 0; }
@media(max-width:64rem) { .cypher-nft-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:40rem) { .cypher-nft-grid { grid-template-columns:1fr; } .cypher-nft-card { padding:.65rem; } }
/* Touch: bare links in table cells and fact lists, and the brand link, are targets of their own (WCAG 2.2 AA 2.5.8, 24px). Hit area only. */
@media (pointer:coarse), (max-width:64rem) { td a, dd a, .card > a, .topbar .brand, form > button[type=submit]:not(.btn) { display:inline-flex; align-items:center; min-height:1.6rem; min-width:1.6rem; } form > button[type=submit]:not(.btn) { justify-content:center; padding-inline:.6rem; } }
