* {
  box-sizing: border-box;
}
html {
  background: #0a1218;
  color: #f5f3e8;
  font-family: Arial, Helvetica, sans-serif;
}
body {
  margin: 0;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a {
  color: #d4e98c;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e9ffc1;
  outline-offset: 3px;
}
.city,
.shade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.city {
  object-fit: cover;
  object-position: 60% center;
}
.shade {
  z-index: -1;
  background:
    linear-gradient(90deg, #051019ed, #05101990),
    linear-gradient(0deg, #051019a0, transparent);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 5vw;
}
.brand {
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
}
.brand span {
  color: #c2d974;
}
.topnav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.topnav a,
.quiet {
  font-size: 13px;
  border: 1px solid #ffffff40;
  background: #111e28d9;
  color: #e8eedf;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 5vw;
  min-height: 0;
}
.panel {
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid #ffffff29;
  border-radius: 14px;
  background: #09151eed;
  box-shadow: 0 14px 50px #0005;
}
.wide {
  width: min(100%, 640px);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  color: #c2d974;
  margin: 0 0 9px;
}
h1 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 12px;
}
h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
p {
  line-height: 1.45;
  font-size: 14px;
  margin: 10px 0;
}
.muted {
  color: #b8c6ce;
}
.field {
  display: block;
  font-size: 13px;
  margin: 12px 0;
}
.field input,
.field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: #f4f6ed;
  background: #172732;
  border: 1px solid #5a6a74;
  border-radius: 6px;
  padding: 11px;
  min-height: 44px;
}
input:disabled {
  opacity: 0.65;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 10px 22px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .8px;
  position: relative;
  transition: color .15s ease, background .15s ease;
}
.primary:hover:not(:disabled) {
  color: #fff;
  background: rgba(255,255,255,.14);
}
/* Active/primary state: cyan underline glow, matching the bottom nav. */
.primary.active::after,
.primary.primary-active::after {
  content: "";position: absolute;left: 14px;right: 14px;bottom: 4px;height: 2px;
  border-radius: 2px;background: #38bdf8;
  box-shadow: 0 0 8px 2px rgba(56,189,248,.8), 0 0 20px 4px rgba(56,189,248,.4);
}
/* Plain buttons match too — no lime anywhere. */
button:not(.primary) {
  border-radius: 999px;
}
.full {
  width: 100%;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
}
.tabs button {
  flex: 1;
}
.active {
  border-color: #c2d974 !important;
  color: #d4e98c !important;
}
.message {
  font-size: 13px;
  color: #dfedbc;
  min-height: 19px;
  margin: 10px 0;
  line-height: 1.35;
}
.message.error {
  color: #ffbdb6;
}
.footer {
  padding: 12px 5vw;
  color: #aebec5;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.world {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #ffffff22;
}
.world h2 {
  font-size: 17px;
  margin: 0;
}
.world p {
  margin: 5px 0 0;
  font-size: 12px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.badge {
  font-size: 11px;
  color: #d4e98c;
}
.small {
  font-size: 12px;
}
.audit {
  border-bottom: 1px solid #ffffff22;
  padding: 8px 0;
  font-size: 12px;
}
.audit p {
  font-size: 12px;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (max-height: 700px) {
  header {
    padding-block: 12px;
  }
  .panel {
    padding: 18px;
  }
  h1 {
    font-size: 26px;
    margin-bottom: 9px;
  }
  .field {
    margin: 10px 0;
  }
  .actions {
    margin-top: 10px;
  }
  .tabs {
    margin-bottom: 12px;
  }
  .footer {
    padding-block: 10px;
  }
}
@media (max-width: 480px) {
  header {
    padding: 12px 4vw;
  }
  .brand {
    font-size: 20px;
  }
  .topnav {
    gap: 5px;
  }
  .topnav a,
  .quiet {
    padding: 10px 8px;
    font-size: 12px;
  }
  main {
    padding: 6px 4vw;
  }
  .panel {
    padding: 16px;
  }
  .footer {
    padding: 10px 4vw;
  }
  .footer .extra {
    display: none;
  }
  h1 {
    font-size: 26px;
  }
  .world {
    padding: 10px 0;
  }
  .world .primary {
    padding: 10px 12px;
  }
}
@media (max-height: 520px) {
  header {
    padding-block: 8px;
  }
  .panel {
    padding: 12px;
  }
  h1 {
    font-size: 23px;
  }
  .eyebrow {
    margin-bottom: 5px;
  }
  .field {
    margin: 8px 0;
  }
  .field input,
  .field select {
    padding: 8px;
    min-height: 40px;
  }
  .footer {
    padding-block: 8px;
  }
  .message {
    margin: 6px 0;
  }
}

/* ===== Plaque frame kit (Quiet Plaque, Phase 1 look rebuild 2026-10-21) =====
   One frame painting sliced into three reusable pieces: a top cap (corner
   brackets + top edge), a middle band of pure side rails that tiles
   vertically to any height, and the same cap flipped for the bottom.
   Corners never stretch; panels can be any height.
   Markup:
     <div class="plaque-frame">
       <div class="plaque-cap"></div>
       <div class="plaque-mid"><div class="plaque-content">…</div></div>
       <div class="plaque-cap plaque-cap--bottom"></div>
     </div>
   The rails sit ~13% in from each edge of the frame, so .plaque-content
   pads by percentage and clears them at any panel width. */
.plaque-frame {
  display: flex;
  flex-direction: column;
}
.plaque-cap {
  flex: none;
  height: 110px;
  background: url("/frame-kit/frame-kit-top.webp") center / 100% 100% no-repeat;
}
.plaque-cap--bottom {
  transform: scaleY(-1);
}
.plaque-frame--tall > .plaque-cap {
  height: 140px;
}
.plaque-frame--compact > .plaque-cap {
  height: 72px;
}
.plaque-mid {
  flex: 1;
  background: url("/frame-kit/frame-kit-mid.webp") center top / 100% auto repeat-y;
}
.plaque-content {
  padding: 4px 13.5% 6px;
}

/* ===== Bracket frame kit (owner-generated pieces, 2026-10-21) =====
   The owner's chosen crew design, assembled from small pieces GENERATED
   clean at his direction (the earlier screenshot-cut snips carried the
   source photo's banding and stray fragments, so he ordered generated
   pieces instead) and processed to transparent PNGs from white-background
   generations (~/workspace/dope-district-audit/process_kit.py). Assets in
   public/frame-kit/: kit-panel-corner.png is the TOP-LEFT master — CSS
   mirrors/flips make the other three corners, so all four are perfectly
   symmetric; kit-card-corner.png is the card-scale master, same trick;
   (The upkeep strip once used kit-strip-cap-l / -mid / -cap-r art;
   it is a slim ruled band now — see the upkeep block below.)
   Sizing contract (why the insets are what they are): the panel corner
   displayed 150px wide originally; the owner ordered the corners
   smaller on 2026-10-22 — now 96px wide desktop / 68px mobile (360x382
   art, aspect kept). Measured on the master art, the arm bands run
   ~6% of display size (≈6px thick at 96px) with the elbow mass ~14%
   (≈13px), so .bf-scroll pads 34px top/bottom and 32px sides desktop
   (26px/24px mobile) — the thickest opaque part of any corner stays
   ≥8px clear of text at every breakpoint, so NO text ever runs under
   a corner (footer links live inside the content flow, above the
   bottom arms).
   Panel interior is a calm near-black green (#0a110d), mostly opaque.
   Markup:
     <section class="bracket-frame">
       <i class="bf-corner bf-corner--tl"></i><i class="bf-corner bf-corner--tr"></i>
       <i class="bf-corner bf-corner--bl"></i><i class="bf-corner bf-corner--br"></i>
       <div class="bf-scroll">…</div>
     </section>
   Pairs with a height:100% panel rule on the page so the frame fits the
   viewport and only .bf-scroll scrolls. .plaque-* above stays as-is. */
.bracket-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0a110d;
  border: 1px solid #46543f;
  border-radius: 6px;
}
.bf-corner {
  position: absolute;
  width: 96px;
  aspect-ratio: 360 / 382;
  background: url("/frame-kit/kit-panel-corner.png") left top / contain no-repeat;
  pointer-events: none;
  z-index: 4;
}
.bf-corner--tl { top: -5px; left: -5px; }
.bf-corner--tr { top: -5px; right: -5px; transform: scaleX(-1); }
.bf-corner--bl { bottom: -5px; left: -5px; transform: scaleY(-1); }
.bf-corner--br { bottom: -5px; right: -5px; transform: scale(-1); }
.bf-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 34px 32px;
  scrollbar-width: thin;
}
@media (max-width: 760px) {
  .bf-corner { width: 68px; }
  .bf-scroll { padding: 26px 24px; }
}
/* Card-level mini brackets (same generated master, card scale;
   34px → 26px in the 2026-10-22 corner shrink). */
.bf-card { position: relative; }
.bf-cc {
  position: absolute;
  width: 26px;
  aspect-ratio: 144 / 141;
  background: url("/frame-kit/kit-card-corner.png") left top / contain no-repeat;
  pointer-events: none;
  z-index: 3;
}
.bf-cc--tl { top: -3px; left: -3px; }
.bf-cc--tr { top: -3px; right: -3px; transform: scaleX(-1); }
.bf-cc--bl { bottom: -3px; left: -3px; transform: scaleY(-1); }
.bf-cc--br { bottom: -3px; right: -3px; transform: scale(-1); }

/* ===== Simple frame kit (owner order 2026-10-22: "do a simple border
   design for now" — the chunky bracket corners and the painted plaque
   rails read as too busy) =====
   One thin line + one small GENERATED corner piece
   (public/frame-kit/simple-corner.png, parent-generated and keyed to
   transparency; 320px master: thin lime line arms running the full
   edge length with a small diamond at the corner point). The border
   colour is SAMPLED from the art's arm core — #d8e679 (mean of the arm
   centre band) — so the CSS line and the art's arms read as one
   continuous stroke. Geometry: in the master the arm centreline sits
   40/320 = 12.5% of the display size in from each edge, and corners
   are positioned relative to the frame's padding box, so each corner
   is offset by -(12.5% of its size) - (border width / 2) to land the
   art's centreline exactly on the border's centreline. The other
   three corners are flips of the one master (the piece is symmetric).
   Panel background is unchanged (#0a110d); content keeps the
   .bf-scroll inset discipline — the corners are small (40px desktop /
   30px mobile) and the scroll padding keeps text clear of them.
   Markup mirrors .bracket-frame:
     <section class="simple-frame">
       <i class="sf-corner sf-corner--tl"></i><i class="sf-corner sf-corner--tr"></i>
       <i class="sf-corner sf-corner--bl"></i><i class="sf-corner sf-corner--br"></i>
       <div class="bf-scroll">…</div>
     </section>
   Cards use .sf-card + .sf-cc (the same piece at card scale). The
   bracket and plaque kits above stay in the repo — unused, not
   deleted; this is a "for now" design. */
.simple-frame {
  --sf-line: #d8e679;
  --sf-corner: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0a110d;
  border: 2px solid var(--sf-line);
  border-radius: 4px;
}
.sf-corner {
  position: absolute;
  width: var(--sf-corner);
  aspect-ratio: 1;
  background: url("/frame-kit/simple-corner.png") left top / contain no-repeat;
  pointer-events: none;
  z-index: 4;
}
.sf-corner--tl { top: calc(-.125 * var(--sf-corner) - 1px); left: calc(-.125 * var(--sf-corner) - 1px); }
.sf-corner--tr { top: calc(-.125 * var(--sf-corner) - 1px); right: calc(-.125 * var(--sf-corner) - 1px); transform: scaleX(-1); }
.sf-corner--bl { bottom: calc(-.125 * var(--sf-corner) - 1px); left: calc(-.125 * var(--sf-corner) - 1px); transform: scaleY(-1); }
.sf-corner--br { bottom: calc(-.125 * var(--sf-corner) - 1px); right: calc(-.125 * var(--sf-corner) - 1px); transform: scale(-1); }
@media (max-width: 760px) {
  .simple-frame { --sf-corner: 30px; }
}
/* Card-scale corners: same piece at 22px. Card borders are 1px, so the
   offset is -(12.5% of 22px) - .5px ≈ -3px, matching the old .bf-cc
   placement. */
.sf-card { position: relative; }
.sf-cc {
  --sf-cc: 22px;
  position: absolute;
  width: var(--sf-cc);
  aspect-ratio: 1;
  background: url("/frame-kit/simple-corner.png") left top / contain no-repeat;
  pointer-events: none;
  z-index: 3;
}
.sf-cc--tl { top: calc(-.125 * var(--sf-cc) - 1px); left: calc(-.125 * var(--sf-cc) - 1px); }
.sf-cc--tr { top: calc(-.125 * var(--sf-cc) - 1px); right: calc(-.125 * var(--sf-cc) - 1px); transform: scaleX(-1); }
.sf-cc--bl { bottom: calc(-.125 * var(--sf-cc) - 1px); left: calc(-.125 * var(--sf-cc) - 1px); transform: scaleY(-1); }
.sf-cc--br { bottom: calc(-.125 * var(--sf-cc) - 1px); right: calc(-.125 * var(--sf-cc) - 1px); transform: scale(-1); }
/* Upkeep strip (owner order 2026-10-22, after the simple border):
   the cap/mid/cap trapezoid strip was the last chunky kit piece on
   the crew page, so it is slimmed to the simple-frame language —
   one nowrap line of live text between two thin #d8e679 rules (the
   --sf-line colour), no cap or mid art, no background plate. The
   strip carries the cost line on one nowrap line; the "Miss
   payroll…" warning rides as .us-caption directly under the strip
   (the full sentence never fit inside the strip at reading size).
   On mobile the crew-count parenthetical moves into the caption
   too (.us-capdetail) so the band stays a single line at phone
   widths. The kit-strip-*.png assets stay in public/frame-kit/ —
   unused, not deleted, like the bracket kit above. */
.upkeep-strip {
  display: flex;
  justify-content: center;
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-top: 2px solid var(--sf-line, #d8e679);
  border-bottom: 2px solid var(--sf-line, #d8e679);
}
.upkeep-strip .us-text {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 4px 7px;
  white-space: nowrap;
  font-size: 12px;
}
.us-text .us-label {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
}
.us-text strong { color: var(--accent); font-size: 13px; letter-spacing: .3px; }
.us-text .us-detail { color: var(--muted); }
.us-caption {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.us-capdetail { display: none; }
@media (max-width: 760px) {
  .upkeep-strip { padding: 6px; }
  .upkeep-strip .us-text { gap: 4px 5px; }
  .us-text .us-label { font-size: 10px; letter-spacing: .4px; }
  .us-text strong { font-size: 12.5px; }
  .us-text .us-detail { display: none; }
  .us-capdetail { display: inline; }
  .us-caption { font-size: 11.5px; margin-bottom: 10px; }
}
