:root {
  --bg: #0c0c0c;
  --panel: #101010;
  --ink: #dcdcdc;
  --muted: #858585;
  --dim: #5a5a5a;
  --line: #2e2e2e;
  --line2: #1f1f1f;
  --shell-width: 1100px;
  --header-h: 88px;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  padding-top: var(--header-h);
}
body.dome-page {
  display: block;
}
h1, h2, h3, .logo, .footlogo, .dome-card__title {
  font-weight: 600;
  letter-spacing: -0.03em;
}
input, textarea, select, button, code, kbd, samp, pre { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
#wireframe-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
body > header, body > main, body > footer { position: relative; z-index: 1; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: var(--header-h);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  background: rgb(12 12 12 / 55%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.site-header__bar, .brand, .footbrand, .footrow, .foot-top {
  display: flex;
  align-items: center;
}
.site-header__bar, .foot-top, .footrow { justify-content: space-between; gap: 16px; }
.site-header__bar {
  width: min(var(--shell-width), calc(100% - 16px));
  margin-left: auto;
  margin-right: auto;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
  min-width: 0;
  flex-wrap: nowrap;
}
.footbrand { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
.logo, .footlogo {
  color: #f4f4f4;
  font-size: clamp(22px, 6.2vw, 32px);
  line-height: 1;
  flex: 0 0 auto;
}
.version, .foottag {
  color: var(--muted);
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.45;
  letter-spacing: 0.3px;
  flex: 0 0 auto;
}
.foottag {
  display: block;
  white-space: nowrap;
}
.avatar {
  margin-left: auto;
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111111;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-header--shell {
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  background: rgb(12 12 12 / 55%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.site-header--shell .site-header__bar {
  width: min(var(--shell-width), calc(100% - 16px));
  margin-left: auto;
  margin-right: auto;
  min-height: var(--header-h);
}
.site-header--shell .brand {
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
}
.site-header--shell .avatar {
  margin-left: auto;
}
main {
  width: min(var(--shell-width), calc(100% - 16px));
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 28px;
  flex: 1 0 auto;
}
body.dome-page > main {
  flex: none;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 40px 0 32px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1.4px;
}
.eyebrow span {
  color: #cfcfcf;
  margin-right: 7px;
}
.intro h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -1.2px;
  line-height: 1.05;
}
.introaside { max-width: 440px; }
.introaside p {
  margin: 0;
  color: #a9a9a9;
  font-size: 14px;
  line-height: 1.9;
}
.board {
  border: 1px solid #404040;
  background: transparent;
}
.sectionheading {
  min-height: 45px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgb(19 19 19 / 92%);
}
.sectionheading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  color: #a6a6a6;
}
.sectionheading span {
  color: var(--dim);
  font-size: 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
  padding: 8px;
}
.card, .note-panel, .panel, .site-footer {
  background: var(--panel);
  border: 1px solid var(--line);
}
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 170px;
  padding: clamp(10px, 2vw, 22px);
  color: var(--ink);
}
.card:hover {
  background: #1c1c1c;
  border-color: #404040;
}
.kicker {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.4px;
}
.card h2 {
  margin: 0;
  font-size: clamp(13px, 2.4vw, 18px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
.card p, .lede {
  margin: 0;
  color: #a3a3a3;
  font-size: clamp(11px, 2.35vw, 13px);
  line-height: 1.55;
}
.card .more {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.4px;
}
.card:hover .more { color: var(--ink); }
.empty { margin: 0; padding: 28px 16px; color: var(--muted); }
.note, .note-panel {
  max-width: 780px;
  padding: 36px 0 8px;
}
.note-panel {
  margin: 28px 0 12px;
  padding: clamp(18px, 3.2vw, 34px) clamp(16px, 3vw, 32px) clamp(22px, 3vw, 36px);
  border-color: #404040;
  background: rgb(12 12 12 / 94%);
}
.back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}
.back:hover { color: var(--ink); }
.note h1 {
  margin: 0 0 14px;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.03em;
}
.meta {
  margin: 0 0 26px;
  color: var(--dim);
  font-size: 12px;
}
.note-body p {
  margin: 0 0 18px;
  color: #a3a3a3;
  font-size: 15px;
  line-height: 1.9;
}
.note-body h2, .note-body h3 { margin: 22px 0 10px; line-height: 1.25; }
.note-body a { color: #fff; }
.note-body img { display: block; margin: 1em 0; }
.site-footer {
  width: min(var(--shell-width), calc(100% - 16px));
  margin: 12px auto 28px;
  padding: clamp(14px, 2.2vw, 22px) clamp(14px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #6d6d6d;
  font-size: 12px;
  flex-shrink: 0;
}
.footrow {
  width: 100%;
  align-items: center;
  gap: 12px;
}
.footcopy { margin: 0; }
.footsocial {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  transition: color 160ms ease;
}
.footsocial:hover { color: var(--ink); }
.footsocial__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.footsocial__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.footsocial__label {
  letter-spacing: 0.2px;
}

html:has(body.dome-page), body.dome-page {
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  color: #fff;
}
main.dome-stage {
  position: fixed;
  inset: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  background: #000;
}
.dome-stage:focus { outline: none; }
.dome-stage[data-ready] {
  overflow: clip;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.dome-stage.is-dragging, .dome-stage.is-dragging .dome-card { cursor: grabbing; }
.dome-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 22px);
  padding: clamp(8px, 1.4vw, 22px);
}
.dome-stage[data-ready] .dome-list {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}
.dome-card {
  --radius: clamp(10px, 1.35vw, 22px);
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: 1;
  background: #08090a;
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  -webkit-user-drag: none;
}
.dome-stage[data-ready] .dome-card {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tile-size);
  height: var(--tile-size);
  will-change: transform;
  backface-visibility: hidden;
}
.dome-card__panel, .dome-card__media {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.dome-card__panel {
  background: #141518;
  border: 1px solid #363a3e;
}
.dome-card__media {
  inset: 1px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px);
  background: #08090a;
}
.dome-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: translate(var(--media-x, 0), var(--media-y, 0)) scale(var(--media-scale, 1.12));
  pointer-events: none;
}
.dome-card__dim, .dome-card__media::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dome-card__dim {
  z-index: 1;
  background: #000;
  opacity: var(--shade, 0);
}
.dome-card__media::after {
  content: "";
  z-index: 2;
  background: linear-gradient(0deg, #000 0%, #0009 12%, transparent 36%);
}
.dome-card__title {
  position: relative;
  z-index: 3;
  padding: clamp(9px, 1.18vw, 20px);
  font-size: clamp(12px, 1.45vw, 26px);
  line-height: 1.15;
  text-shadow: 0 1px 5px #000;
}
.dome-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.dome-shade, .dome-cover {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dome-shade {
  display: none;
  z-index: 200;
  background: radial-gradient(circle var(--torch-radius, 48vmin) at var(--torch-x, 50%) var(--torch-y, 50%),
      transparent 18%, rgb(0 0 0 / 15%) 67%, rgb(0 0 0 / 46%) 100%);
}
.dome-stage[data-ready] .dome-shade { display: block; }
.dome-cover {
  z-index: 201;
  background: #000;
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.dome-stage[data-loading] .dome-cover { opacity: 1; transition: none; }
@media (hover: hover) {
  .dome-stage:not(.is-dragging) .dome-card:hover .dome-card__panel { border-color: #9298a0; }
}
@media (pointer: coarse) {
  .dome-shade { opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) {
  .dome-cover { transition: none; }
}
@media (width < 767px) {
  .dome-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dome-card__title { font-size: clamp(12px, 3.1vw, 21px); }
}

body.admin { background: var(--bg); color: var(--ink); }
.panel {
  max-width: 720px;
  margin: 32px 0 12px;
  padding: clamp(14px, 3vw, 26px);
  background: #111111;
  color: var(--ink);
  border-color: #404040;
}
.panel h1, .panel h2 {
  color: var(--ink);
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
label { display: block; margin: 14px 0 6px; font-size: 12px; }
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #3b3b3b;
  background: #181818;
  color: #cbcbcb;
  font: inherit;
}
.row, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #4d4d4d;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.btn.solid, button.solid { background: #fff; border-color: #fff; color: #000; }
.btn.solid:hover, button.solid:hover { background: #fff; border-color: #fff; color: #000; }
.btn:hover { border-color: #d7d7d7; }
.flash { margin: 0 0 14px; color: #efefef; }
.err { color: #ffffff; margin: 0 0 8px; }
.ok { color: #efefef; }
.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.admin-list { list-style: none; padding: 0; margin: 18px 0 0; }
.admin-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line2);
}
.admin-list .title { font-size: 18px; text-decoration: none; }
.admin-list .title { flex: 1 1 180px; min-width: 0; overflow-wrap: break-word; }
#body-editor { background: #111; min-height: 240px; border: 1px solid #2a2a2a; }
.ql-toolbar, .ql-container,
.ql-snow .ql-tooltip,
.ql-editor .ql-font-serif, .ql-editor .ql-font-monospace,
.ql-snow .ql-picker.ql-font [data-value]::before { font-family: var(--mono); }
.ql-toolbar.ql-snow {
  border: 1px solid #2a2a2a;
  border-bottom: 0;
  background: #161616;
}
.ql-container.ql-snow { border: 1px solid #2a2a2a; }
.ql-snow .ql-stroke { stroke: #cfcfcf; }
.ql-snow .ql-fill { fill: #cfcfcf; }
.ql-snow .ql-picker { color: #cfcfcf; }
.ql-snow .ql-picker-options {
  background: #161616;
  border-color: #2a2a2a;
}
.slug-preview {
  margin: -6px 0 16px;
  color: #9a9a9a;
  font-size: 13px;
  word-break: break-all;
}
.slug-preview a {
  color: #cfcfcf;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 740px) {
  html, body { -ms-overflow-style: none; scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
  :root { --header-h: 72px; }
  .site-header--shell {
    inset: 0 0 auto 0;
    padding: 0;
  }
  .site-header--shell .site-header__bar {
    width: calc(100% - 16px);
    gap: 10px;
  }
  .site-header--shell .brand {
    min-width: 0;
    flex: 1 1 auto;
  }
  .site-header--shell .logo {
    font-size: clamp(20px, 6vw, 26px);
  }
  .site-header--shell .version {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
  }
  .site-header--shell .avatar {
    display: block;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .intro { display: block; padding: 26px 0 22px; }
  .introaside { margin-top: 16px; }
  .introaside p { font-size: 13px; line-height: 1.7; }
  .site-footer {
    gap: 8px;
    margin: 8px auto 14px;
    padding: 12px 14px;
  }
  .footbrand { gap: 2px; }
  .footlogo { font-size: clamp(18px, 5.4vw, 24px); }
  .foottag {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .footrow {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }
  .footsocial { gap: 6px; flex-shrink: 0; }
  .footsocial__label { font-size: 11px; }
  .note, .note-panel { padding-top: 26px; }
  .note-panel { padding-left: 14px; padding-right: 14px; }
  .note-body p { font-size: 14px; }
}
h1, .card h2, .dome-card__title { text-wrap: balance; }
.card p, .note-body { text-wrap: pretty; }

/* section card image admin — dark nmjb-like shell */
.section-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.section-image-card {
  border: 1px solid #404040;
  background: #111111;
  color: var(--ink);
}
.section-image-card__preview {
  aspect-ratio: 1;
  background: #0a0a0a;
  overflow: hidden;
  border-bottom: 1px solid #2e2e2e;
}
.section-image-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.section-image-card__body {
  padding: 16px;
  color: var(--ink);
}
.section-image-card__body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
}
.section-image-card__body .slug-preview,
.section-image-card .slug-preview {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.section-image-card__state {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.section-image-card label {
  color: var(--ink);
}
.section-image-form .row {
  flex-wrap: wrap;
}
.section-image-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.section-image-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #4d4d4d;
  background: #181818;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.section-image-form .btn,
.section-image-form button.btn {
  color: var(--ink);
  border-color: #4d4d4d;
  background: transparent;
}
.section-image-form .btn.solid,
.section-image-form button.solid {
  background: #fff;
  border-color: #fff;
  color: #000;
}
body.admin label { color: var(--ink); }
body.admin .panel a { color: #cfcfcf; }
body.admin .panel a:hover { color: #fff; }
body.admin .panel a.btn.solid,
body.admin .panel a.btn.solid:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}
#body-editor { background: #111; min-height: 240px; border: 1px solid #2a2a2a; color: var(--ink); }
.ql-editor { color: var(--ink); }
.slug-preview { color: #9a9a9a; font-size: 12px; }

@media (max-width: 740px) {
  html, body { -ms-overflow-style: none; scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
  main { padding: 16px; }
  .cards { grid-template-columns: 1fr; gap: 8px; }
  .card { min-height: 150px; padding: 12px; }
  .card h2 { font-size: 16px; }
}
h1, .card h2, .dome-card__title { text-wrap: balance; }
.card p, .note-body { text-wrap: pretty; }

