/* Next Finish Carpentry — owner shell and public site.
   Visuals come from tokens.css. Wave overlay is not used. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: var(--leading);
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }

/* ——— chrome ——— */
.sidebar { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 64px;
  padding: 14px 20px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand h1 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.top-actions { display: flex; gap: 8px; }

.view {
  padding: 8px 20px calc(var(--nav) + 28px);
  max-width: var(--measure);
  margin: 0 auto;
}

.page-head { margin: 8px 0 28px; }
.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h2.page-title,
.view h2 {
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--text-2xl);
  letter-spacing: -0.038em;
  line-height: 1.12;
  margin: 0;
}
.dash-hello {
  font-size: 2.15rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 6px 0 8px;
}
.dash-sub,
.lede {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 1.02rem;
  max-width: 36rem;
}
.section-label {
  margin: 36px 0 12px;
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.muted, .help { color: var(--muted); }
.help { font-size: var(--text-sm); margin: 6px 0 0; }

/* ——— actions ——— */
.btn, .btn-line, .ghost, .icon-btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn.secondary, .btn-line, .ghost, .icon-btn {
  background: transparent;
  color: var(--ink);
}
.btn.secondary {
  border: 1px solid var(--line-strong);
  font-weight: 500;
}
.btn.warn { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn-line { width: 100%; border: 1px dashed var(--line-strong); font-weight: 500; }
.icon-btn { padding: 8px 10px; font-weight: 500; }
.ghost { padding: 8px 0; }
a.btn:hover, button.btn:hover { opacity: 0.92; }
.primary-row { margin: 0 0 28px; }
.row-actions, .filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters { flex-direction: column; align-items: stretch; }
.filters select { width: 100%; }
.row-actions { margin-top: 16px; }
.row-actions .btn.secondary { background: transparent; }

/* ——— navigation ——— */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
}
.bottomnav a, .bottomnav button.nav-more {
  appearance: none;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 8px 2px 6px;
  min-height: 44px;
  font-weight: 500;
}
.bottomnav a.active, .bottomnav button.nav-more.active {
  color: var(--ink);
  font-weight: 600;
}
.bottomnav a.active svg, .bottomnav button.nav-more.active svg { color: var(--ink); }
.bottomnav a.active span, .bottomnav button.nav-more.active span {
  box-shadow: inset 0 -1.5px 0 var(--gold);
  padding-bottom: 1px;
}
.sheet a, .side-link {
  text-decoration: none;
  color: var(--ink-soft);
}

/* ——— tabs, inputs ——— */
.tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}
.tabs button, .chip {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 10px 0 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tabs button.on {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -1.5px 0 var(--gold);
}

.search, .filters select, .field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.search:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field { margin: 0 0 16px; }
.field label, .check span { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.92rem; }
.check span { margin: 0; font-weight: 500; }
input[type="file"] { font-size: var(--text-sm); color: var(--muted); }
input[type="color"] { height: 44px; padding: 4px; background: var(--surface); }

/* ——— lists: space and hairline, not a box per row ——— */
.list { display: flex; flex-direction: column; }
.list-card, .product-row, .link-list a, .metric-row, .sheet a.list-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 16px 2px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.list-card h3, .product-row h3 { margin: 0 0 3px; font-size: 1.02rem; font-weight: 500; letter-spacing: -0.02em; }
button.list-card { width: 100%; text-align: left; }
.job-row > div { flex: 1; min-width: 0; }
.job-row .row-actions { margin: 0; flex: 0 0 auto; }
.search { margin-bottom: 8px; }

.price { font-weight: 500; white-space: nowrap; letter-spacing: -0.02em; }
.link-list { display: flex; flex-direction: column; }
.link-list a small, .link-list span small { display: block; color: var(--muted); font-size: var(--text-sm); font-weight: 400; margin-top: 3px; }
.chev { color: var(--faint); font-size: 1.2rem; }
.alpha {
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 22px 2px 4px;
  margin: 0;
}

.empty {
  text-align: left;
  padding: 28px 0 8px;
  margin-top: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.empty h3 {
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.empty p { color: var(--muted); margin: 0; max-width: 28rem; }
.empty.error h3 { color: var(--ink); }

/* ——— dashboard ——— */
.today-list { margin-top: 4px; }
.metric-row .label { font-size: 1rem; }
.metric-row .value {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
}
.metric-row .value.due { color: var(--danger); }
.metric-row .value.quiet { color: var(--faint); font-weight: 500; }
.quick-actions { display: flex; flex-direction: column; }
.quick-actions .btn { align-self: flex-start; }
.quiet-link {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.chart {
  margin-top: 8px;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.chart-key { display: flex; gap: 16px; color: var(--muted); font-size: var(--text-sm); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.income { background: var(--ink); }
.dot.expense { background: var(--gold); }
.bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 128px;
  margin-top: 18px;
}
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; gap: 2px; align-items: flex-end; height: 100px; width: 100%; justify-content: center; }
.bar { width: 6px; border-radius: 2px 2px 0 0; min-height: 2px; }
.bar.in { background: var(--ink); }
.bar.ex { background: var(--gold); }
.bar-col span { font-size: 0.62rem; color: var(--faint); letter-spacing: 0.04em; }

.grid-2, .grid-stats, .sales-grid, .theme-grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }

/* ——— documents editor ——— */
.editor { display: grid; gap: 28px; }
.panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.panel h3 {
  margin: 28px 0 12px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.sticky-save {
  position: sticky;
  bottom: calc(var(--nav) + 8px);
  display: flex;
  gap: 8px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  z-index: 15;
}
.preview-wrap { overflow: auto; }
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin: 4px 0 18px;
}
.preview-toolbar .page-title { margin: 0; }
.preview-toolbar a { color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.paper {
  background: var(--paper-2);
  padding: 10px;
  border-radius: var(--radius-md);
}
.suggestion {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--gold);
  border-radius: 0;
  padding: 4px 0 4px 12px;
  margin: 12px 0;
}
.suggestion strong { display: block; }
.store-card {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.color-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 8px 0 16px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; }
.theme-grid { grid-template-columns: 1fr 1fr; }
.theme-card {
  padding: 8px 8px 12px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}
.theme-card.on { outline: 1px solid var(--gold); background: var(--gold-soft); }
.mini {
  height: 64px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}

/* ——— sheets and toasts ——— */
.modal-back {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet, .modal {
  background: var(--paper);
  width: min(640px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 10px 22px 32px;
  box-shadow: var(--shadow-sheet);
}
.sheet::before, .modal::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 6px auto 16px;
}
.sheet h3, .modal h3 {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  margin: 0 0 16px;
}
.composer .paper { margin-top: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav) + 16px);
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--on-ink);
  padding: 13px 16px;
  border-radius: var(--radius-md);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  max-width: min(420px, 90vw);
  font-size: 0.92rem;
  box-shadow: var(--shadow-lift);
  border-left: 2px solid var(--gold);
}
.toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.toast.err {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 2px solid var(--danger);
}

.warn-note {
  background: transparent;
  border-left: 2px solid var(--gold);
  border-radius: 0;
  padding: 2px 0 2px 12px;
  color: var(--ink-soft);
}
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ——— projects / share ——— */
.share-block {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  align-items: center;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--line);
}
.qr-box { display: flex; gap: 16px; align-items: center; }
.qr-frame, .qr-box img {
  width: 148px;
  height: 148px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: contain;
}
.share-url { word-break: break-all; margin: 6px 0; }
.job-row { align-items: center; }
.job-thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-2);
}

/* ——— public portfolio ——— */
.site {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 22px 72px;
  background: var(--paper);
  min-height: 100vh;
}
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 18px 0 36px;
}
.site-mark {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  margin-bottom: 22px;
}
.site-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
}
.site-trade { margin: 14px 0 0; color: var(--muted); max-width: 28rem; }
.site-lang {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold);
  padding: 0 0 2px;
  color: var(--ink);
  font-size: var(--text-sm);
}
.job {
  margin: 0 0 72px;
}
.job-photo, .job img.hero {
  width: 100%;
  display: block;
  max-height: 78vh;
  object-fit: cover;
  background: var(--paper-2);
}
.job-copy { padding: 18px 0 0; max-width: 38rem; }
.job-copy h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.job-copy p { margin: 0 0 6px; color: var(--ink-soft); }
.job-loc {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-empty { padding: 48px 0; color: var(--muted); font-size: 1.15rem; }
.site-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.site-foot a { color: var(--ink); text-decoration: none; }

.ba-slider {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  touch-action: none;
}
.ba-slider img { width: 100%; display: block; max-height: 78vh; object-fit: cover; pointer-events: none; user-select: none; }
.ba-after { display: block; }
.ba-before-clip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
}
.ba-before-clip img { height: 100%; width: auto; min-width: 100%; max-width: none; max-height: none; object-fit: cover; }
.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--on-ink);
  box-shadow: 0 0 0 1px rgba(20, 19, 17, 0.25);
  pointer-events: none;
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.ba-cap {
  position: absolute;
  top: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink);
  text-shadow: 0 1px 8px rgba(20, 19, 17, 0.45);
}
.ba-cap.before { left: 14px; }
.ba-cap.after { right: 14px; }

.public-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.public-bar strong {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ——— customer documents (themes stay distinct) ——— */
.doc { color: var(--ink); background: var(--paper); padding: 22px; position: relative; }
.doc .co-name { font-family: var(--font); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.doc .doc-kicker { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--accent); }
.doc .doc-num { font-size: 1.15rem; font-weight: 600; }
.doc .doc-title { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; margin: 8px 0 4px; }
.doc-top, .doc-meta { display: flex; justify-content: space-between; gap: 16px; }
.doc-meta { display: grid; grid-template-columns: 1.2fr .8fr auto; gap: 12px; margin: 12px 0; }
.doc h3 { margin: 0 0 6px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { text-align: left; padding: 8px 4px; vertical-align: top; }
.doc th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.doc .num { text-align: right; white-space: nowrap; }
.doc .item-desc, .doc .co-trade, .doc .co-addr, .doc .doc-summary { color: #5c564e; font-size: .92rem; }
.doc .totals { margin-left: auto; width: min(280px, 100%); }
.doc .totals div, .doc .dates { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.doc .grand { font-weight: 650; border-top: 2px solid var(--accent); padding-top: 8px; }
.doc .sign-row { display: grid; grid-template-columns: 1fr 140px; gap: 16px; margin-top: 10px; }
.doc .sign-row span { border-bottom: 1px solid #cfc4b4; min-height: 32px; color: #7a726a; }
.doc .doc-end { margin-top: 16px; font-size: .85rem; color: #6d665e; }
.logo-mark, .logo-img { width: 72px; height: 52px; object-fit: contain; background: #fff; }
.logo-mark {
  display: grid; place-items: center; background: var(--accent); color: white;
  font-family: var(--font); font-weight: 600;
}
.place-center { margin: 0 auto; }
.place-right { margin-left: auto; }
.place-seal { border-radius: 50%; }

.layout-letterhead { border-top: 8px solid var(--accent); }
.layout-letterhead .doc-top { align-items: flex-end; border-bottom: 1px solid #e4d3bc; padding-bottom: 10px; }
.layout-blueprint {
  background-image: linear-gradient(rgba(29,78,137,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(29,78,137,.08) 1px, transparent 1px);
  background-size: 16px 16px;
  font-family: "Avenir Next", sans-serif;
}
.layout-blueprint .doc-id { border: 1px solid var(--accent); padding: 8px; min-width: 130px; }
.layout-ticket { border: 2px dashed #c4b5a4; }
.layout-ticket .doc-num { font-family: ui-monospace, monospace; }
.layout-ticket:before, .layout-ticket:after {
  content: ""; position: absolute; width: 18px; height: 18px; background: #e7e0d6; border-radius: 50%; top: 46%;
}
.layout-ticket:before { left: -9px; }
.layout-ticket:after { right: -9px; }
.layout-board { border: 6px solid #111; }
.layout-board .doc-kicker { background: #e5c24b; display: inline-block; padding: 2px 6px; color: #111; }
.layout-postcard { border-radius: 22px; box-shadow: inset 0 0 0 1px #e7d8c8; }
.layout-postcard .logo-mark, .layout-postcard .logo-img { border-radius: 50%; border: 2px solid var(--accent); }
.layout-ledger { background: repeating-linear-gradient(#fffef8, #fffef8 27px, #efe4d2 28px); border-left: 12px solid #8f2d2d; }
.layout-clipboard { border-radius: 18px 18px 8px 8px; box-shadow: inset 0 18px 0 #3f6212; padding-top: 34px; }
.layout-rail { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.layout-rail .doc-top { flex-direction: column; }
.layout-rail .doc-title, .layout-rail .doc-summary, .layout-rail .doc-meta, .layout-rail .doc-items, .layout-rail .doc-foot, .layout-rail .doc-end { grid-column: 2; }
.layout-olive { border: 1px solid #3f5346; }
.layout-olive .doc-top { background: #3f5346; color: #f4f1ea; margin: -22px -22px 12px; padding: 16px; }
.layout-olive .doc-kicker, .layout-olive .co-trade, .layout-olive .co-addr { color: #e7d7bf; }
.layout-night .doc-top { background: #1c1916; color: #f6f1e8; margin: -22px -22px 14px; padding: 16px; }
.layout-night .doc-kicker { color: #d6b17a; }

.mini.hardwood { background: #fbf6ee; border-top: 6px solid #7a4e2d; }
.mini.blueprint { background: repeating-linear-gradient(0deg, #f4f7fb, #f4f7fb 6px, #d9e4f2 7px); }
.mini.ticket { background: #fffaf3; border-style: dashed; }
.mini.board { background: #fff; border: 4px solid #111; }
.mini.postcard { background: #f6efe4; border-radius: 16px; }
.mini.ledger { background: #fffef8; border-left: 8px solid #8f2d2d; }
.mini.clipboard { background: #f7f8f2; box-shadow: inset 0 10px 0 #3f6212; }
.mini.rail { background: linear-gradient(90deg, #243f36 16px, #f7f5f2 16px); }
.mini.olive { background: linear-gradient(#3f5346 22px, #f3f1ea 22px); }
.mini.night { background: linear-gradient(#1c1916 22px, #f6f3ee 22px); }

.skeleton { padding-top: 12px; }
.sk-title { height: 34px; width: 58%; margin-bottom: 14px; }
.sk-line { height: 12px; width: 100%; margin-bottom: 10px; }
.sk-line.short { width: 42%; }
.sk-block { height: 88px; width: 100%; margin-top: 22px; }

.portfolio-public { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
.job-card { background: transparent; border: 0; overflow: hidden; margin-bottom: 28px; }
.job-card img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.job-card .pad { padding: 14px 0; }

@media (min-width: 980px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    background: var(--paper);
    color: var(--ink);
    padding: 28px 18px 24px;
    z-index: 25;
    border-right: 1px solid var(--line);
  }
  .sidebar .brand { margin: 0 8px 28px; }
  .sidebar .brand h1, .sidebar .brand small { color: var(--ink); }
  .sidebar .brand small { opacity: 1; color: var(--muted); }
  .side-link {
    color: var(--muted);
    border-radius: var(--radius-sm);
    align-items: flex-start;
    padding: 11px 12px;
    font-size: 0.98rem;
    flex-direction: row;
  }
  .side-link.active {
    background: transparent;
    color: var(--ink);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--gold);
  }
  .side-link:hover { color: var(--ink); }
  .app-shell { padding-left: var(--sidebar); }
  .topbar { display: none; }
  .bottomnav { display: none; }
  .view { padding: 36px 48px 56px; }
  .sticky-save { bottom: 12px; }
  .editor.wide { grid-template-columns: minmax(320px, 480px) minmax(380px, 1fr); align-items: start; gap: 40px; }
  .modal-back { align-items: center; padding: 24px; }
  .sheet, .modal {
    border-radius: var(--radius-xl);
    max-height: 86vh;
  }
  .sheet::before, .modal::before { display: none; }
  .toast { bottom: 28px; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .share-block { grid-template-columns: 1fr; }
  .doc-meta, .doc-top { display: block; }
  .color-row { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .bottomnav, .sticky-save, .preview-toolbar, .no-print, .toast, .public-bar { display: none !important; }
  .app-shell { padding: 0; }
  .view, .site { max-width: none; padding: 0; }
  .paper { background: white; padding: 0; }
  .editor { display: block; }
  .editor .panel:not(.preview-panel) { display: none; }
}

.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px 48px; text-align: center; background: var(--bg, #faf6ef); }
.gate[hidden], .app-shell[hidden] { display: none !important; pointer-events: none !important; }

.gate-logo { width: 96px; height: 96px; border-radius: 22px; }
.gate h1 { margin: 18px 0 6px; font-size: 32px; }
.gate p { margin: 0 0 22px; color: var(--text-2, #6b645c); }
.gate form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gate label { font-size: 13px; }
.gate input { border: 1px solid rgba(28,25,22,.12); background: #fff; border-radius: 14px; padding: 14px 16px; font: inherit; }
.gate button { margin-top: 8px; border: 0; border-radius: 14px; padding: 14px 16px; background: #1c1916; color: #faf6ef; font: inherit; }
.gate-error { color: #8a3b2f; }
.gate-install { max-width: 320px; font-size: 13px; }

.btn:active, button.btn:active { transform: translateY(1px); }
.btn:focus-visible, a.btn:focus-visible, .nav-more:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .btn:active, button.btn:active { transform: none; }
}
