:root {
  color-scheme: dark;
  --bg: #0d0f13;
  --panel: #151821;
  --card: #1b1f2a;
  --ink: #e6e8ee;
  --muted: #9aa3b2;
  --label: #d5dbe6;
  --line: rgba(255, 255, 255, 0.06);
  --accent: #00ae42;
  --accent-2: #3dcc73;
  --ink-on: #07140c;
  --bad: #ffb4a8;
  --bad-bg: #3a221c;
  --ok: #b7f0c8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  --radius: 12px;
  --ease: 150ms ease;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 1.02rem;
  line-height: 1.5;
}

body.in { padding-bottom: 4.4rem; }

a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-2); }

img, svg, canvas, video { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.6rem; }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  background: rgba(21, 24, 33, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.logo { width: 1.45rem; height: 1.45rem; }

.tabs {
  display: flex;
  flex: 1 1 16rem;
  gap: 0.15rem;
  min-width: 0;
  overflow-x: auto;
}

.tabs a {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
}

.tabs a[aria-current="page"] {
  color: var(--ink);
  background: rgba(0, 174, 66, 0.16);
}

.add, button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.55rem 0.95rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink-on);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), color var(--ease);
}

.add:hover, button:hover, .button:hover { background: var(--accent-2); color: var(--ink-on); }

button.text, .text, a.text {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  padding: 0.3rem 0.4rem;
}

.button.ghost, a.button.ghost {
  background: #242a38;
  color: var(--ink);
}

button.danger, .button.danger, a.danger {
  background: #8f3b32;
  color: #fff;
}

.user-menu { position: relative; margin-left: auto; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }

.menu {
  position: absolute;
  right: 0;
  z-index: 40;
  min-width: 12rem;
  margin-top: 0.35rem;
  padding: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.menu a, .menu button { display: block; width: 100%; text-align: left; }
.who { margin: 0 0 0.4rem; color: var(--muted); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: var(--ink-on);
  font-size: 0.72rem;
  font-weight: 750;
}

.hue-0 { background: #7dcea0; }
.hue-1 { background: #85c1e9; }
.hue-2 { background: #f7dc6f; }
.hue-3 { background: #f5b7b1; }
.hue-4 { background: #d2b4de; }
.hue-5 { background: #f0b27a; }
.hue-6 { background: #aed6f1; }
.hue-7 { background: #abebc6; }

main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 0.85rem 0.9rem 1.6rem;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.side {
  position: sticky;
  top: 4.2rem;
  width: 260px;
  max-height: calc(100vh - 5.4rem);
  overflow: auto;
  padding: 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.side-label {
  margin: 0.85rem 0 0.3rem;
  color: var(--label);
  font-size: 1.05rem;
  font-weight: 650;
}

.side-list { list-style: none; margin: 0 0 0.4rem; padding: 0; }
.side-list a, .side-list .inline {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  color: var(--ink);
}
.side-list a.on, .side-list a:hover { background: rgba(0, 174, 66, 0.12); color: var(--ink); }
.side-list span { color: var(--muted); }
.side-list li.with-x { display: flex; align-items: center; gap: 0.15rem; }
.side-list li.with-x a { flex: 1; min-width: 0; }
.side-list li.with-x form { margin: 0; }
.side-list li.with-x button.text { padding: 0.1rem 0.35rem; line-height: 1; font-size: 1rem; }

.cloud { display: flex; flex-wrap: wrap; gap: 0.35rem 0.55rem; }
.cloud a { color: var(--muted); }
.cloud a.on, .cloud a:hover { color: var(--accent); }
.cloud span { font-size: 0.8rem; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.55);
}

.board { min-width: 0; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.toolbar .chips { margin: 0; }

.seg {
  display: inline-flex;
  padding: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.toolbar button, .seg button, .viewer-tools button, .tabrow button, .film button, .gallery button, .plate-switch button {
  background: #242a38;
  color: var(--ink);
  font-weight: 650;
}

.seg button { padding: 0.32rem 0.7rem; border-radius: 999px; }
.seg button.on, .tabrow button.on, .modes button.on, .film button.on, .plate-switch button.on {
  background: var(--accent);
  color: var(--ink-on);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.75rem; }
.chip {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #242a38;
  color: var(--ink);
}
.chip.on { border-color: var(--accent); }
.chip a { color: inherit; }
.chip form.inline { margin: 0; }
.chip button.text { padding: 0 0.15rem; color: inherit; line-height: 1; font-size: 1rem; }

.cards {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board.size-s .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.board.size-m .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.board.size-l .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover, .card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-link { color: inherit; }
.pick {
  position: absolute;
  z-index: 2;
  top: 0.45rem;
  left: 0.45rem;
  width: auto;
  margin: 0;
  padding: 0.15rem;
  background: rgba(13, 15, 19, 0.72);
  border-radius: 8px;
}
.pick input { width: 1.15rem; height: 1.15rem; }
.bulk { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.8rem 0 1.2rem; }
.bulk[hidden] { display: none; }
.bulk .check { width: auto; }
.card-link:hover { color: inherit; }

.shot-wrap {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #151821;
}

.shot, .shot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viewer .source-cover {
  display: block;
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: contain;
  margin: 0 0 0.7rem;
  background: #151821;
  border-radius: var(--radius);
}

.ph { width: 38%; color: var(--muted); }
.ph svg { width: 100%; height: auto; }

.waiting {
  background: linear-gradient(90deg, #151821 0%, #2a3142 45%, #151821 100%);
  background-size: 220% 100%;
  animation: shimmer 1.1s linear infinite;
}

.waiting img { opacity: 0; }

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.pad { padding: 0.65rem 0.75rem 0.85rem; }
.card h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.by { display: flex; gap: 0.4rem; align-items: center; margin: 0; color: var(--muted); font-size: 0.92rem; }
.pills { margin: 0.35rem 0 0; }
.pill {
  display: inline-block;
  margin: 0.1rem 0.25rem 0.1rem 0;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #242a38;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}
.line { margin: 0.35rem 0 0; font-size: 0.92rem; }
.whisper { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.pill.warn { background: var(--bad-bg); color: var(--bad); }
.pill.fresh { background: rgba(0, 174, 66, 0.18); color: var(--ok); }

.star {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 15, 19, 0.82);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}
.star.on { color: #f5c542; border-color: #c9a227; }
.card .star {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
}
.card .quick { right: 2.8rem; }

.quick {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0.35rem 0.6rem;
  background: rgba(13, 15, 19, 0.82);
  color: var(--ink);
  border: 1px solid var(--line);
  opacity: 0;
}

.card:hover .quick, .card:focus-within .quick, .quick:focus { opacity: 1; }

.board.layout-list .cards { display: flex; flex-direction: column; }
.board.layout-list .card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
}
.board.layout-list .card:hover,
.board.layout-list .card:focus-within { transform: none; }
.board.layout-list .pick {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  order: 0;
  padding: 0;
  background: transparent;
}
.board.layout-list .card-link {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  flex: 1 1 auto;
  order: 1;
  align-items: center;
  min-width: 0;
}
.board.layout-list .shot-wrap { width: 4.5rem; aspect-ratio: 1; }
.board.layout-list .pad { padding: 0.35rem 0.65rem; }
.board.layout-list .card .star,
.board.layout-list .quick {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  margin: 0;
  opacity: 1;
}
.board.layout-list .card .star { order: 2; }
.board.layout-list .quick { order: 3; grid-column: auto; justify-self: auto; }
.board.layout-list.size-s .card-link { grid-template-columns: 3.25rem minmax(0, 1fr); }
.board.layout-list.size-s .shot-wrap { width: 3.25rem; }
.board.layout-list.size-s .pad { padding: 0.15rem 0.45rem; }
.board.layout-list.size-s .card h2 { margin: 0; font-size: 0.95rem; }
.board.layout-list.size-s .by,
.board.layout-list.size-s .line { margin-top: 0.1rem; }
.board.layout-list.size-s .tag-pills { display: none; }
.board.layout-list.size-m .card-link { grid-template-columns: 4.5rem minmax(0, 1fr); }
.board.layout-list.size-m .shot-wrap { width: 4.5rem; }
.board.layout-list.size-l .card-link { grid-template-columns: 6.25rem minmax(0, 1fr); }
.board.layout-list.size-l .shot-wrap { width: 6.25rem; }

.empty { padding: 1.5rem 0.2rem; }
.empty .add, .empty .button { margin-top: 0.4rem; }

.quick-dialog {
  width: min(960px, calc(100vw - 1.2rem));
  max-height: calc(100vh - 1.2rem);
  overflow: auto;
  padding: 0.8rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
.dialog-bar { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; }
.dialog-bar h2 { margin: 0; font-size: 1.15rem; }

.project { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.85fr); gap: 1rem; align-items: start; }
.project-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.project-head h1 { margin: 0.15rem 0; }

.info {
  padding: 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.7rem 0; }
.tile { padding: 0.5rem 0.6rem; background: var(--panel); border-radius: 10px; }
.tile span { display: block; color: var(--muted); font-size: 0.82rem; }
.tile strong { font-size: 0.98rem; }

.viewer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.viewer-tools label { display: flex; gap: 0.4rem; align-items: center; }
.viewer-tools select { width: auto; max-width: 100%; min-width: 8rem; }
.modes { display: inline-flex; gap: 0.25rem; }
.plate-switch { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.plate-switch[hidden] { display: none; }
.plate-switch button { display: inline-flex; align-items: center; gap: 0.35rem; }
.plate-switch img { width: 2rem; height: 2rem; object-fit: contain; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin: 0;
}

.legend span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.swatch { width: 0.8rem; height: 0.8rem; display: block; }
.dots { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin: 0.35rem 0 0; }
.dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
}

.stage {
  position: relative;
  width: 100%;
  height: min(60vh, 640px);
  max-height: 60vh;
  overflow: hidden;
  background: #1b1f2a;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

.stage.armed { box-shadow: 0 0 0 3px rgba(0, 174, 66, 0.45); }

.stage canvas, .stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1b1f2a;
}

.stage:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: #0d0f13;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: rgba(13, 15, 19, 0.45);
  font-weight: 700;
  pointer-events: none;
}

.stage-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  display: flex;
  gap: 0.3rem;
}

.stage-actions button {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(13, 15, 19, 0.82);
  color: var(--ink);
}

.stage-actions button svg { width: 1.1rem; height: 1.1rem; }
.stage-actions button[aria-pressed="true"] { color: var(--accent); }
.stage-actions button[aria-pressed="false"] { color: var(--muted); }
.stage-actions button:hover { background: rgba(21, 24, 33, 0.95); color: var(--ink); }
.stage-actions button[aria-pressed="true"]:hover { color: var(--accent); }

.film, .tabrow {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.45rem 0;
}

.film button {
  flex: 0 0 4.4rem;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0.15rem;
  overflow: hidden;
}

.film img, .gallery img { width: 100%; height: 100%; object-fit: contain; }
.film button span {
  display: block;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.2;
}

.tabrow button { flex: 0 0 auto; border-radius: 999px; }
.layer-row { display: flex; gap: 0.5rem; align-items: center; }
.layer-row input { flex: 1; }
.hint { margin: 0.25rem 0; color: var(--muted); font-size: 0.92rem; }

.files, .notes, .plates, .plain, .picked { margin: 0.4rem 0; padding: 0; }
.picked { list-style: none; }
.picked li { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.12rem 0; }
.files, .notes, .plates { list-style: none; }
.files li, .notes li {
  margin: 0.45rem 0;
  padding: 0.7rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.file-head { display: flex; gap: 0.7rem; align-items: flex-start; }
.file-head img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  background: #151821;
  border-radius: 8px;
}
.file-head h3 { margin: 0; font-size: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.inline { display: flex; gap: 0.35rem; align-items: center; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 0.45rem;
  margin: 0.4rem 0;
  padding: 0;
  list-style: none;
}
.gallery li { display: flex; flex-direction: column; gap: 0.2rem; }
.gallery button { width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; }
.gallery .meta { margin: 0; }
.gallery .row { margin: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.pill-row form { margin: 0; }
.pill-row .pill { display: inline-flex; align-items: center; gap: 0.15rem; }
.pill-row button.text { padding: 0 0.1rem; line-height: 1; }
.fold { margin: 0.7rem 0 0; }
.fold > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { margin-bottom: 0.45rem; }
.bunch { margin: 0.55rem 0; }
.bunch summary { cursor: pointer; font-weight: 650; }

.badge {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #243028;
  color: var(--ok);
  font-size: 0.82rem;
  font-weight: 650;
}
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.danger-zone {
  margin-top: 2.4rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 180, 168, 0.35);
  border-radius: var(--radius);
}

.narrow { width: min(40rem, 100%); margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.tight { gap: 0.4rem; }
.lead { color: var(--ink); }
.meta, .stats { color: var(--muted); }
.meta { margin: 0.2rem 0; }

label, legend {
  color: var(--label);
  font-size: 1.05rem;
  font-weight: 650;
}

label { display: flex; flex-direction: column; gap: 0.28rem; }
.check { flex-direction: row; align-items: center; font-size: 1rem; font-weight: 550; }

input, select, textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  background: #0d0f13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font: inherit;
}

fieldset {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.printer-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.printer-pick .choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-weight: 550;
  white-space: nowrap;
  background: #0d0f13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.printer-pick .choice span { white-space: nowrap; }

.printer-pick .choice input {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.printer-pick .choice:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 174, 66, 0.12);
}

.drop {
  padding: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  transition: border-color var(--ease), background var(--ease);
}
.drop.hot { background: rgba(0, 174, 66, 0.08); border-color: var(--accent); }
.drop h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.file-label input { margin-top: 0.3rem; }

.alert {
  margin: 0.4rem 0;
  padding: 0.6rem 0.75rem;
  color: var(--bad);
  background: var(--bad-bg);
  border-radius: var(--radius);
}
.notice {
  margin: 0.4rem 0;
  padding: 0.6rem 0.75rem;
  color: var(--ok);
  background: rgba(0, 174, 66, 0.14);
  border-radius: var(--radius);
}
.field-error { color: var(--bad); font-size: 0.92rem; }

.address {
  padding: 0.7rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.address span { display: block; color: var(--label); font-size: 1.05rem; font-weight: 650; }
.address strong { font-size: 1.05rem; word-break: break-all; }

.progress-row { display: grid; gap: 0.2rem; margin: 0.35rem 0; }
.progress-row.bad span { color: var(--bad); }
.bar {
  height: 0.4rem;
  overflow: hidden;
  background: #0d0f13;
  border-radius: 999px;
}
.bar .fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width var(--ease);
}
.bar .fill.s0 { width: 0%; }
.bar .fill.s5 { width: 5%; }
.bar .fill.s10 { width: 10%; }
.bar .fill.s15 { width: 15%; }
.bar .fill.s20 { width: 20%; }
.bar .fill.s25 { width: 25%; }
.bar .fill.s30 { width: 30%; }
.bar .fill.s35 { width: 35%; }
.bar .fill.s40 { width: 40%; }
.bar .fill.s45 { width: 45%; }
.bar .fill.s50 { width: 50%; }
.bar .fill.s55 { width: 55%; }
.bar .fill.s60 { width: 60%; }
.bar .fill.s65 { width: 65%; }
.bar .fill.s70 { width: 70%; }
.bar .fill.s75 { width: 75%; }
.bar .fill.s80 { width: 80%; }
.bar .fill.s85 { width: 85%; }
.bar .fill.s90 { width: 90%; }
.bar .fill.s95 { width: 95%; }
.bar .fill.s100 { width: 100%; }

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  gap: 0.2rem;
  padding: 0.35rem 0.3rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(21, 24, 33, 0.96);
  border-top: 1px solid var(--line);
}

.tabbar a, .tabbar button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

@media (hover: none) {
  .quick { opacity: 1; }
}

@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; }
  header.top nav.tabs,
  header.top .add { display: none; }
}

@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(86vw, 320px);
    max-height: none;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform var(--ease);
  }
  body.filters-open .side { transform: translateX(0); }
  .add { padding: 0.45rem 0.7rem; }
}

@media (min-width: 801px) {
  body.in { padding-bottom: 0; }
  .tabbar, .filter-open { display: none; }
  .scrim { display: none !important; }
}

.stats-page { width: min(64rem, 100%); margin: 0 auto; }
.stats-page h1 { margin-top: 0.2rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  margin: 0.6rem 0 1rem;
}
.sheet-wrap { overflow-x: auto; margin: 0 0 1.2rem; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.sheet th { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.sheet .num { text-align: right; white-space: nowrap; }
.sheet .bar { min-width: 4.5rem; }

.copy-sink {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.shots { display: flex; gap: 0.5rem; overflow-x: auto; margin: 0 0 0.8rem; }
.shots img { width: 4.6rem; height: 4.6rem; object-fit: cover; border-radius: 8px; background: var(--panel); }
.fresh-shots h2 { margin: 0 0 0.4rem; font-size: 1rem; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue li { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }

@media (max-width: 420px) {
  .tabbar { overflow-x: auto; }
  .tabbar a, .tabbar button { flex: 1 0 auto; font-size: 0.72rem; padding: 0.35rem 0.45rem; }
  .tabs a { padding: 0.35rem 0.5rem; }
}
