/* Fieldfolio App . mobile-first . concrete / steel / copper */
:root {
  --bg: #EDEAE4;
  --ink: #121417;
  --steel: #2A3036;
  --panel: #FFFFFF;
  --muted: #5A6168;
  --accent: #C47A2C;
  --line: #C8C4BB;
  --btn-on-ink: #ffffff;
  --ok: #2F6B3A;
  --warn: #B42318;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(18, 20, 23, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --tap: 48px;
  --finish-h: 92px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--finish-h) + var(--safe-bottom) + 12px);
}
body.share-open { overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}
body.sample-modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
label { display: block; font-weight: 700; font-size: 0.92rem; margin: 0.65rem 0 0.3rem; }
.opt { font-weight: 500; color: var(--muted); font-size: 0.85em; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.35rem 0 0.6rem; }
.hint-inline { color: var(--muted); font-weight: 500; }

.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 0.75rem 0.85rem 1rem; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.65rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 800; text-decoration: none; color: var(--ink);
  font-size: 1.1rem; letter-spacing: -0.02em; min-height: var(--tap);
}
.brand img { border-radius: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; justify-content: flex-end; }
/* topbar Sample + Menu */
.topbar-actions #btn-sample,
.topbar-actions #btn-menu { display: inline-flex; flex-shrink: 0; }
.save-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.78rem;
  font-weight: 650; color: var(--steel); max-width: 46vw;
}
.save-pill.is-warn { border-color: var(--warn); color: var(--warn); }
.save-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); flex-shrink: 0;
}
.save-pill.is-warn .save-dot { background: var(--warn); }
#save-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Auth banner */
.auth-banner {
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 0.7rem 0.85rem;
  margin-bottom: 0.75rem; font-size: 0.9rem;
}
.auth-banner strong { margin-right: 0.25rem; }
.auth-banner-text { color: var(--muted); }

/* Auth form (Pro/Crew cloud) */
.auth-form-wrap .auth-form { margin-top: 0.65rem; display: grid; gap: 0.45rem; }
.auth-label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.auth-label input {
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.7rem; min-height: 44px;
}
.auth-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.auth-msg { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
.auth-msg.is-err { color: var(--warn, #b45309); }
.auth-upgrade-link { color: var(--accent, #C47A2C); font-weight: 600; }
.auth-connected .btn { margin-left: 0.35rem; vertical-align: middle; }

/* Panels */
.panel {
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 0.95rem 0.95rem 1.1rem;
  box-shadow: var(--shadow); margin-bottom: 0.85rem;
}
.profile-panel {
  padding: 1.15rem 1.1rem 1.25rem;
  border-color: #d4d0c6;
  background: #faf9f6;
  box-shadow: 0 2px 10px rgba(18, 20, 23, 0.05);
}
.profile-heading { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.profile-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 44px;
}
.profile-head .btn { flex-shrink: 0; min-height: 44px; }
.profile-save-hint {
  margin: 0.15rem 0 0.35rem !important;
  font-size: 0.8rem; color: var(--muted); line-height: 1.4;
}
.profile-panel .profile-summary { margin-top: 0.35rem; }
.profile-panel .profile-form { margin-top: 0.35rem; }
.profile-summary { display: block; min-height: 0; }
.profile-line { margin: 0; color: var(--muted); font-size: 0.92rem; }
.profile-form > label { margin-top: 0.85rem; margin-bottom: 0.28rem; font-size: 0.88rem; }
.profile-form > label:first-of-type { margin-top: 0.15rem; }
.profile-form input[type="text"],
.profile-form input[type="tel"],
.profile-form input[type="email"] {
  border: 1.5px solid #c4c0b6;
  border-radius: 10px;
  background: #fff;
  min-height: 44px;
}
.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; align-items: center; }
.profile-actions .btn { min-height: 44px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }

input[type="text"], input[type="tel"], input[type="email"],
input[type="search"], input[type="date"], input[type="datetime-local"],
textarea {
  width: 100%; min-height: var(--tap); padding: 0.65rem 0.75rem;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: #fff; appearance: none;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible {
  outline: 3px solid rgba(196, 122, 44, 0.45); outline-offset: 1px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; min-height: var(--tap); padding: 0.7rem 1rem;
  border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--ink); color: var(--btn-on-ink); font-weight: 750;
  cursor: pointer; text-decoration: none; letter-spacing: -0.01em;
}
.btn:hover { background: var(--steel); border-color: var(--steel); }
.btn-ghost { background: var(--panel); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0.4rem 0.7rem; font-size: 0.88rem; }
.btn-lg { min-height: 54px; font-size: 1.05rem; flex: 1; }
.btn-link {
  background: none; border: none; color: var(--accent); font-weight: 700;
  cursor: pointer; padding: 0.5rem 0; min-height: 44px;
}
.btn-share { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-share:hover { filter: brightness(0.95); }
.btn-finish { background: var(--ink); }
.btn.is-active, .btn-ghost.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.layout { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 920px) {
  .layout { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .preview-toggle { display: none !important; }
  .preview-col { display: block !important; position: sticky; top: 0.5rem; }
}
.preview-toggle { width: 100%; margin-top: 0.75rem; }
.preview-col { display: none; }
.preview-col.is-open { display: block; }
.preview-banner { display: flex; align-items: baseline; gap: 0.25rem; flex-wrap: wrap; }

.section-gap { margin-top: 1.15rem; }
.check-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap;
}
.check-head h2, .form-panel h2 { margin: 0; font-size: 1.12rem; }
.check-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* Chips */
.chip-fieldset { border: 0; padding: 0; margin: 0.5rem 0 0.75rem; }
.chip-fieldset legend { font-weight: 800; font-size: 0.95rem; padding: 0; margin-bottom: 0.35rem; }
.trade-filter-label { margin-top: 0; display: block; font-weight: 700; font-size: 0.92rem; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0; }
.chip {
  min-height: 44px; padding: 0.45rem 0.75rem; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; font-weight: 700;
  cursor: pointer; font-size: 0.9rem;
}
.chip-sm { min-height: 38px; font-size: 0.82rem; padding: 0.3rem 0.65rem; }
.chip.is-active, .chip:active {
  background: var(--ink); color: var(--btn-on-ink);
}

/* Photos */
.photo-proof-check {
  list-style: none; padding: 0; margin: 0 0 0.55rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.proof-item {
  font-size: 0.82rem; font-weight: 700; padding: 0.25rem 0.55rem;
  border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted);
}
.proof-item.is-done { background: #e7f2ea; border-color: var(--ok); color: var(--ok); }
.photo-grid { display: grid; gap: 0.55rem; }
.photo-grid-3 { grid-template-columns: repeat(3, 1fr); }
.photo-grid-docs { grid-template-columns: repeat(3, 1fr); }
.snap-wrap { position: relative; }
.snap-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.snap-target {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; min-height: 88px; border: 2px dashed var(--ink);
  border-radius: var(--radius); background: #f7f5f0; cursor: pointer;
  text-align: center; padding: 0.5rem; margin: 0;
}
.snap-target-sm { min-height: 64px; }
.snap-icon { font-size: 1.35rem; }
.snap-title { font-weight: 800; font-size: 0.92rem; }
.snap-sub { font-size: 0.75rem; color: var(--muted); }
.photo-slot {
  margin-top: 0.35rem; border: 1.5px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #f0eeea; min-height: 72px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.photo-slot .ph { color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.photo-slot img { width: 100%; height: 100px; object-fit: cover; display: none; }
.photo-slot.has-photo img, .photo-slot img.has-photo { display: block; }
.photo-slot.has-photo .ph { display: none; }

/* Checklist */
.check-list { list-style: none; padding: 0; margin: 0.35rem 0; }
.check-item { margin: 0.3rem 0; }
.check-toggle {
  width: 100%; display: flex; align-items: flex-start; gap: 0.65rem;
  text-align: left; min-height: var(--tap); padding: 0.65rem 0.7rem;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-weight: 650;
}
.check-item.is-done .check-toggle {
  border-color: var(--ok); background: #f3faf5;
}
.check-box {
  width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 5px;
  flex-shrink: 0; margin-top: 1px; position: relative;
}
.check-item.is-done .check-box {
  background: var(--ok); border-color: var(--ok);
}
.check-item.is-done .check-box::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Phases */
.phase-progress {
  font-weight: 800; font-size: 1.05rem; color: var(--accent);
  min-width: 3ch; text-align: right;
}
.phase-mode-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.55rem; }
.phase-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.phase-chip {
  min-height: 44px; padding: 0.45rem 0.7rem; border-radius: var(--radius);
  border: 2px solid var(--ink); background: #fff; font-weight: 700;
  font-size: 0.85rem; cursor: pointer; max-width: 100%;
}
.phase-chip.status-done { background: #e7f2ea; border-color: var(--ok); color: var(--ok); }
.phase-chip.status-na { background: #f0eeea; border-color: var(--line); color: var(--muted); text-decoration: line-through; }

/* Advanced / docs */
.more-advanced {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #faf9f6; padding: 0.25rem 0.75rem 0.75rem;
}
.more-advanced-summary {
  cursor: pointer; font-weight: 800; min-height: var(--tap);
  display: flex; align-items: center; list-style: none;
}
.more-advanced-summary::-webkit-details-marker { display: none; }
.docs-block {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0.2rem 0.7rem 0.7rem; margin: 0.55rem 0; background: #fff;
}
.docs-block > summary {
  cursor: pointer; font-weight: 750; min-height: 44px;
  display: flex; align-items: center;
}
.note-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0.45rem; }
.chip-add-row { display: flex; gap: 0.4rem; align-items: center; }
.chip-add-row input { flex: 1; }
.tag-list { list-style: none; padding: 0; margin: 0.4rem 0 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #f0eeea; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem; font-size: 0.85rem; font-weight: 650;
}
.tag-x {
  border: none; background: transparent; cursor: pointer;
  font-size: 1.1rem; line-height: 1; min-width: 32px; min-height: 32px;
  color: var(--muted);
}
.check-inline {
  display: flex; align-items: center; gap: 0.5rem; font-weight: 650;
  min-height: 44px; margin: 0.4rem 0;
}
.check-inline input { width: 20px; height: 20px; }
.sig-canvas {
  width: 100%; max-width: 560px; height: 140px; touch-action: none;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
  display: block;
}
.crew-invite-row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.4rem 0; }

/* Plans */
.plans-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0; }
.plans-upload-btn { margin: 0; cursor: pointer; }
.color-row { display: flex; gap: 0.4rem; margin: 0.35rem 0 0.55rem; }
.color-swatch {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ink); cursor: pointer; padding: 0;
}
.color-swatch.is-active { box-shadow: 0 0 0 3px var(--accent); }
.plan-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.45rem; }
.plan-tab {
  min-height: 40px; padding: 0.35rem 0.7rem; border-radius: var(--radius);
  border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer;
}
.plan-tab.is-active { border-color: var(--ink); background: var(--ink); color: var(--btn-on-ink); }
.plan-stage { margin-top: 0.35rem; }
.plan-canvas-wrap {
  position: relative; display: inline-block; max-width: 100%;
  border: 2px solid var(--ink); border-radius: var(--radius); overflow: auto;
  background: #ddd; touch-action: none;
}
#plan-bg { display: block; max-width: none; }
#plan-canvas {
  position: absolute; left: 0; top: 0; touch-action: none; cursor: crosshair;
}
.section-share-row { margin: 0.25rem 0 0.4rem; }

/* Notes / time */
.time-details { margin-top: 0.75rem; }
.time-details summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }

/* Folio preview */
#folio {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow);
}
.folio-head {
  display: flex; justify-content: space-between; gap: 1rem;
  border-bottom: 2px solid var(--line); padding-bottom: 0.75rem; margin-bottom: 0.85rem;
}
.folio-brand { font-weight: 800; letter-spacing: -0.02em; }
.folio-biz { text-align: right; font-size: 0.92rem; }
.folio-muted { color: var(--muted); font-size: 0.85rem; }
.folio-title { font-size: 1.35rem; margin: 0.15rem 0; letter-spacing: -0.02em; }
.folio-meta { color: var(--muted); margin: 0 0 0.85rem; }
.folio-photos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem; margin: 0.75rem 0;
}
.folio-photos img {
  width: 100%; height: 120px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 6px;
}
.folio-photos figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
#folio h2 { font-size: 1.02rem; margin: 0.95rem 0 0.35rem; }
.folio-checks { list-style: none; padding: 0; margin: 0; }
.folio-checks li { padding: 0.15rem 0; }
.folio-checks li.done { color: var(--ok); }
.folio-phases { margin: 0; padding-left: 1.1rem; }
.folio-phases small { color: var(--muted); }
.folio-dl {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.7rem; margin: 0;
}
.folio-dl dt { font-weight: 700; color: var(--muted); }
.folio-dl dd { margin: 0; }
.folio-sig { max-width: 260px; border: 1px solid var(--line); background: #fff; }
.folio-notes { white-space: pre-wrap; }
.folio-foot {
  margin-top: 1.15rem; font-size: 0.72rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 0.45rem;
}

/* Finish bar */
.finish-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(237, 234, 228, 0.97); border-top: 2px solid var(--line);
  padding: 0.55rem 0.75rem calc(0.55rem + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 0.4rem;
  backdrop-filter: blur(8px);
}
.finish-bar-primary, .finish-bar-secondary {
  display: flex; gap: 0.45rem; width: min(1100px, 100%); margin: 0 auto;
}
.finish-bar-secondary .btn { flex: 1; }
.finish-bar-hidden { display: none !important; }


/* Sample modal . folio preview mock */
.sample-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.sample-modal[hidden] { display: none !important; }
.sample-modal-backdrop {
  position: absolute; inset: 0; background: rgba(18, 20, 23, 0.5);
}
.sample-modal-panel {
  position: relative; width: min(440px, 100%);
  max-height: min(92vh, 780px); overflow: auto;
  background: var(--panel); border-radius: 16px 16px 0 0;
  padding: 1rem 1rem calc(1rem + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
}
@media (min-width: 640px) {
  .sample-modal { align-items: center; }
  .sample-modal-panel {
    border-radius: 16px; max-height: min(88vh, 760px);
  }
}
.sample-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.sample-modal-head h2 { margin: 0; font-size: 1.15rem; }
.sample-modal-lead { margin: 0.45rem 0 0.75rem; }
.sample-phone-frame {
  margin: 0 auto 0.9rem; width: min(280px, 100%);
  background: #1a1d21; border-radius: 28px; padding: 12px 10px 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.28); border: 2px solid #2e3338;
}
.sample-phone-notch {
  width: 88px; height: 8px; border-radius: 999px; background: #0d0f11;
  margin: 0 auto 10px;
}
.sample-folio-mock {
  background: #fff; border-radius: 12px; padding: 0.75rem 0.7rem 0.85rem;
  color: var(--ink); font-size: 0.82rem;
}
.sample-folio-head {
  display: flex; justify-content: space-between; gap: 0.5rem;
  border-bottom: 1.5px solid var(--line); padding-bottom: 0.5rem; margin-bottom: 0.55rem;
}
.sample-folio-brand { font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em; }
.sample-folio-biz { text-align: right; font-size: 0.72rem; line-height: 1.25; }
.sample-folio-muted { color: var(--muted); font-size: 0.68rem; }
.sample-folio-title { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.sample-folio-meta { margin: 0.15rem 0 0.55rem; color: var(--muted); font-size: 0.75rem; }
.sample-folio-photos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.55rem;
}
.sample-folio-photos figure { margin: 0; }
.sample-folio-photos figcaption {
  font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; font-weight: 650;
}
.sample-photo {
  height: 72px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.72rem; color: var(--btn-on-ink); letter-spacing: 0.02em;
}
.sample-photo-img {
  width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 6px; display: block; background: #4a5056;
}
.sample-photo-before { background: linear-gradient(145deg, #6a7178, #4a5056); }
.sample-photo-after { background: linear-gradient(145deg, #3d8a4c, #2F6B3A); }
.sample-folio-h { margin: 0.35rem 0 0.25rem; font-size: 0.82rem; }
.sample-folio-checks { list-style: none; padding: 0; margin: 0 0 0.65rem; }
.sample-folio-checks li { padding: 0.12rem 0; font-size: 0.78rem; }
.sample-folio-checks li.done { color: var(--ok); font-weight: 650; }
.sample-folio-cta {
  width: 100%; min-height: 40px; font-size: 0.88rem; pointer-events: none;
}
.sample-modal-actions {
  display: flex; flex-direction: column; gap: 0.45rem;
}
.sample-modal-actions .btn { width: 100%; min-height: 48px; }

/* Share sheet */
.share-sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.share-sheet[hidden] { display: none !important; }
.share-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(18, 20, 23, 0.45);
}
.share-sheet-panel {
  position: relative; width: min(520px, 100%);
  max-height: min(88vh, 720px); overflow: auto;
  background: var(--panel); border-radius: 16px 16px 0 0;
  padding: 1rem 1rem calc(1rem + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
}
.share-sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.share-sheet-head h2 { margin: 0; font-size: 1.15rem; }
.share-limits { color: var(--muted); font-size: 0.88rem; }
.share-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 0.75rem 0;
}
.share-grid .btn { width: 100%; font-size: 0.9rem; min-height: 48px; }
.share-compat { padding-left: 1.1rem; margin: 0.5rem 0 0; }
.share-compat code { font-size: 0.8em; }

@media (max-width: 420px) {
  .photo-grid-3 { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
  .save-pill { display: none; }
}


/* App nav menu */
.app-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.app-menu[hidden] { display: none !important; }
.app-menu-backdrop {
  position: absolute; inset: 0; background: rgba(18, 20, 23, 0.4);
}
.app-menu-panel {
  position: relative;
  width: min(320px, calc(100% - 1rem));
  margin: 0.5rem;
  margin-top: calc(0.5rem + env(safe-area-inset-top, 0px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.85rem 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  max-height: min(90vh, 640px);
  overflow: auto;
}
.app-menu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.app-menu-head h2 { margin: 0; font-size: 1.1rem; }
.app-menu-nav {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.app-menu-nav a:not(.btn) {
  display: flex; align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.app-menu-nav a:not(.btn):hover,
.app-menu-nav a:not(.btn):focus-visible {
  background: var(--bg);
  outline: none;
}
.app-menu-nav a[aria-current="page"] {
  background: var(--bg);
  box-shadow: inset 3px 0 0 var(--accent, #C47A2C);
}
.app-menu-cta {
  margin-top: 0.55rem;
  width: 100%;
  text-align: center;
  justify-content: center;
}
@media (max-width: 420px) {
  .app-menu {
    align-items: flex-end; justify-content: center;
  }
  .app-menu-panel {
    width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: min(88vh, 720px);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Print */
@media print {
  body { background: #fff; padding: 0; }
  .no-print, .finish-bar, .share-sheet, .app-menu, .sample-modal, .topbar, .auth-banner,
  .profile-panel, .form-panel, .preview-banner { display: none !important; }
  .preview-col, #preview-col { display: block !important; position: static !important; }
  .layout { display: block; }
  #folio {
    border: none; box-shadow: none; padding: 0;
  }
  .folio-photos img { height: auto; max-height: 220px; }
}

/* Install / A2HS affordance - quiet, dismissible */
.install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin: 0 0 0.75rem;
  box-shadow: var(--shadow);
}
.install-banner[hidden] { display: none !important; }
.install-banner-text {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--steel);
}
.install-banner-actions {
  display: inline-flex;
  gap: 0.4rem;
  flex-shrink: 0;
}


/* Synced light/dark with marketing site (ff-theme) */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
  --bg: #121417;
  --ink: #F2EFE8;
  --steel: #C5CBD1;
  --panel: #1C2128;
  --muted: #9AA3AB;
  --accent: #D4893A;
  --line: #3A424A;
  --btn-on-ink: #121417;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  --ok: #3D8F4A;
  --warn: #E24B3B;
}
.theme-toggle .theme-icon { font-size: 1rem; line-height: 1; }


/* Desktop: Sign up / Sign in as the page - not stacked on Create profile */
body.ff-auth-gate .profile-panel,
body.ff-auth-gate .layout {
  display: none !important;
}
body.ff-auth-gate #auth-root .auth-banner,
body.ff-auth-gate #auth-root .auth-form-wrap {
  max-width: 28rem;
  margin: 1.5rem auto;
  padding: 1.25rem 1.35rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
body.ff-auth-gate #auth-root .auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== t1158 . Desktop tab: save, job types, phases, unsaved warning, crew roles ===== */
.btn-save { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 700; }
.btn-save:hover { filter: brightness(0.95); }
.btn-save.is-saved { background: var(--panel); color: var(--ok); border-color: var(--ok); }
.btn-save.is-flash { background: var(--ok); color: #fff; }
.btn-danger-text { color: var(--warn); }

#job-type-filter { width: 100%; margin: 0.25rem 0 0.5rem; }
.job-type-groups { display: flex; flex-direction: column; gap: 0.55rem; }
.job-group-title {
  font-size: 0.74rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.3rem;
}
.chip-other { border-style: dashed; }
.job-type-other { margin-top: 0.55rem; }
.job-type-other label { display: block; font-weight: 650; margin-bottom: 0.25rem; }

.phase-summary { margin: 0.35rem 0 0.4rem; }
.phase-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.phase-bar-fill { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.2s var(--ff-ease); }
.phase-summary-text { margin: 0.35rem 0 0; font-size: 0.92rem; }
.phase-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.phase-card {
  border: 1.5px solid var(--line); border-radius: var(--radius, 12px);
  background: var(--panel); padding: 0.6rem 0.7rem;
}
.phase-card.status-active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.phase-card.status-done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.phase-card.status-na { opacity: 0.7; }
.phase-card.status-na .phase-title span:first-child { text-decoration: line-through; }
.phase-top { display: flex; gap: 0.6rem; align-items: flex-start; }
.phase-num {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; border: 2px solid var(--line); color: var(--muted);
}
.status-active .phase-num { border-color: var(--accent); color: var(--accent); }
.status-done .phase-num { border-color: var(--ok); background: var(--ok); color: #fff; }
.phase-body { flex: 1; min-width: 0; }
.phase-title { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-weight: 700; }
.phase-pill {
  font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.status-active .phase-pill { border-color: var(--accent); color: var(--accent); }
.status-done .phase-pill { border-color: var(--ok); color: var(--ok); }
.phase-help { margin: 0.15rem 0 0; font-size: 0.86rem; color: var(--muted); }
.phase-times { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--ink); }
.phase-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.4rem 2.5rem; }
.phase-actions .btn { min-height: 38px; min-width: 64px; }
.phase-done-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.phase-note { box-sizing: border-box; display: block; width: calc(100% - 2.5rem); max-width: calc(100% - 2.5rem); margin-left: 2.5rem; font-size: 0.86rem; }
@media (max-width: 480px) {
  .phase-actions { margin-left: 0; }
  .phase-note { width: 100%; max-width: 100%; margin-left: 0; }
}

.unsaved-modal {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.unsaved-modal[hidden] { display: none !important; }
.unsaved-backdrop { position: absolute; inset: 0; background: rgba(18, 20, 23, 0.55); }
.unsaved-panel {
  position: relative; width: min(420px, 100%); background: var(--panel); color: var(--ink);
  border-radius: 16px; padding: 1.1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border-top: 5px solid var(--warn);
}
.unsaved-panel h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.unsaved-panel p { margin: 0 0 0.9rem; }
.unsaved-actions { display: flex; flex-direction: column; gap: 0.45rem; }
.unsaved-actions .btn { width: 100%; min-height: 44px; }
body.modal-open { overflow: hidden; }

.crew-owner { border: 1.5px solid var(--accent); border-radius: var(--radius, 12px); padding: 0.55rem 0.7rem; margin: 0.5rem 0; }
.crew-role-pill {
  font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.crew-role-owner { background: var(--accent); border-color: var(--accent); color: #fff; }
.crew-add { border: 1px dashed var(--line); border-radius: var(--radius, 12px); padding: 0.6rem 0.7rem; margin: 0.5rem 0; }
.crew-add-grid, .crew-member-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.45rem; }
.crew-add-grid label, .crew-member-edit label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.82rem; font-weight: 650; }
.crew-list { list-style: none; padding: 0; margin: 0.5rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.crew-member { border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 0.55rem 0.7rem; background: var(--panel); }
.crew-member-top { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.35rem; }
.crew-contact { font-size: 0.8rem; color: var(--muted); }
.crew-can { margin: 0.35rem 0; }
.crew-member-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.crew-code { font-size: 0.8rem; color: var(--muted); margin-right: auto; }
@media print { .unsaved-modal, .crew-roles-wrap { display: none !important; } }

/* t1159 . custom phases */
.phase-tools { display: inline-flex; gap: 0.35rem; margin-left: auto; }
.phase-actions .phase-tool { min-width: 2.4rem; }
.phase-tool:disabled { opacity: 0.35; cursor: default; }
.phase-remove { color: #b3261e; }
.phase-pill-custom { background: color-mix(in srgb, var(--accent, #c47a2c) 16%, transparent); border-color: color-mix(in srgb, var(--accent, #c47a2c) 45%, transparent); }
.phase-add { margin-top: 0.75rem; padding: 0.75rem; border: 1px dashed color-mix(in srgb, currentColor 25%, transparent); border-radius: 12px; }
.phase-add-title { margin: 0 0 0.5rem; }
.phase-add-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.phase-add-row input { flex: 1 1 12rem; min-width: 0; box-sizing: border-box; }
.phase-remove:hover, .phase-remove:focus-visible { color: #fff; background: #b3261e; border-color: #b3261e; }

/* Sign-in page: no install prompt, no bottom action bar until signed in */
body.ff-auth-gate .finish-bar,
body.ff-auth-gate #install-banner,
body.ff-auth-gate .install-banner {
  display: none !important;
}

/* Legal footer centered at the bottom */
.app-legal-footer {
  text-align: center;
  width: 100%;
  margin: 1.5rem auto 0;
  padding: 0.75rem 1rem calc(6rem + var(--safe-bottom, 0px));
  font-size: 0.85rem;
}
body.ff-auth-gate .app-legal-footer { padding-bottom: 1.5rem; }

/* ===== 2026-09-30 finish, upsell ===== */
.ff-finish-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; align-items: center; }
.ff-done-pill { display: inline-block; padding: 0.3rem 0.7rem; border: 1.5px solid var(--ok); color: var(--ok); border-radius: 999px; font-weight: 750; font-size: 0.85rem; }
.ff-brand { display: grid; gap: 0.5rem; margin: 0.5rem 0; }
.ff-brand label { font-weight: 650; font-size: 0.9rem; }
.ff-logo-prev { max-height: 48px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); background: #fff; padding: 2px; border-radius: 4px; }
.ff-lock { border-left: 3px solid var(--accent); padding-left: 0.6rem; }
.ff-upsell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.85rem; padding: 0.75rem 0.9rem; background: var(--panel); border: 1.5px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.ff-upsell-text { margin: 0; font-size: 0.92rem; }
.ff-upsell-actions { display: flex; gap: 0.4rem; }
.ff-stub-note { border-left: 3px solid var(--accent); padding-left: 0.6rem; }
@media print { .ff-finish, .ff-upsell { display: none !important; } }

/* ===== 2026-09-30 light/dark QA fixes (colors only, no wording) ===== */
/* Text on copper and on green needs dark ink to reach AA. */
.btn-share, .crew-role-owner { color: #121417; }
html[data-theme="dark"] {
  --ok: #55B064;
  --warn: #F0705F;
  --field: #232A32;
  --field-2: #1A2027;
  --soft: #20262D;
  --done-bg: #1D2E22;
}
html[data-theme="dark"] .btn-save,
html[data-theme="dark"] .btn-save.is-flash,
html[data-theme="dark"] .phase-done-btn,
html[data-theme="dark"] .status-done .phase-num { color: #121417; }
html[data-theme="dark"] .auth-label input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .profile-form input[type="text"],
html[data-theme="dark"] .profile-form input[type="tel"],
html[data-theme="dark"] .profile-form input[type="email"] { background: var(--field); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--muted); opacity: 1; }
html[data-theme="dark"] .profile-panel { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
html[data-theme="dark"] .chip,
html[data-theme="dark"] .phase-chip,
html[data-theme="dark"] .plan-tab,
html[data-theme="dark"] .check-toggle,
html[data-theme="dark"] .docs-block { background: var(--field); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .chip.is-active,
html[data-theme="dark"] .chip:active,
html[data-theme="dark"] .plan-tab.is-active { background: var(--ink); color: var(--btn-on-ink); }
html[data-theme="dark"] .more-advanced,
html[data-theme="dark"] .snap-target { background: var(--soft); }
html[data-theme="dark"] .photo-slot,
html[data-theme="dark"] .tag-item,
html[data-theme="dark"] .phase-chip.status-na { background: var(--field-2); }
html[data-theme="dark"] .proof-item.is-done,
html[data-theme="dark"] .phase-chip.status-done,
html[data-theme="dark"] .check-item.is-done .check-toggle { background: var(--done-bg); }
html[data-theme="dark"] .plan-canvas-wrap { background: var(--field-2); }
html[data-theme="dark"] .phase-remove { color: var(--warn); }
/* Signature pad, plan sheets and the folio preview are paper: keep them light, with dark text. */
html[data-theme="dark"] .sig-canvas { background: #fff; }
html[data-theme="dark"] #folio { background: #fff; color: #121417; border-color: var(--line); }
html[data-theme="dark"] #folio .folio-muted,
html[data-theme="dark"] #folio .folio-meta,
html[data-theme="dark"] #folio .folio-phases small,
html[data-theme="dark"] #folio .folio-foot,
html[data-theme="dark"] #folio .folio-dl dt,
html[data-theme="dark"] #folio figcaption { color: #5A6168; }
html[data-theme="dark"] #folio .folio-checks li.done { color: #2F6B3A; }
html[data-theme="dark"] #folio h1,
html[data-theme="dark"] #folio h2 { color: #121417; }
/* Visible focus rings in both modes */
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
html[data-theme="dark"] .ff-logo-prev { background: #fff; }
/* Copper used as TEXT on light surfaces is too pale (3.4 to 1). Use a deeper copper for text only. */
:root { --accent-text: #9A5A17; }
html[data-theme="dark"] { --accent-text: #D4893A; }
.auth-upgrade-link, .btn-link, .status-active .phase-num, .status-active .phase-pill { color: var(--accent-text); }
.sample-folio-mock { color: #121417; }
html[data-theme="dark"] .sample-folio-mock .sample-folio-muted { color: #5A6168; }
html[data-theme="dark"] .sample-folio-checks li.done { color: #2F6B3A; }
html[data-theme="dark"] .sample-folio-meta, html[data-theme="dark"] .sample-folio-photos figcaption { color: #5A6168; }

/* ===== Round 3: account pages, trade packs, store-app mode ===== */
.acct-panel h1 { margin: 0 0 0.4rem; font-size: 1.35rem; letter-spacing: -0.02em; }
.acct-panel .auth-form { max-width: 34rem; }
.acct-panel select, .acct-panel input[type="text"] {
  font: inherit; color: var(--ink); background: var(--panel);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem; min-height: 44px; width: 100%;
}
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.ff-link-out a { word-break: break-all; }
.pack-view { margin-top: 1rem; }
.pack-title { font-size: 1.25rem; margin: 0 0 0.2rem; }
.pack-sub { color: var(--muted); margin: 0 0 1rem; }
.pack-group { margin: 1.4rem 0 0.6rem; font-size: 1.05rem; }
.pack-sheet { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 0.8rem 1rem; margin: 0 0 0.85rem; break-inside: avoid; }
.pack-sheet h3, .pack-sheet h4 { margin: 0 0 0.3rem; font-size: 1rem; }
.pack-checks { list-style: none; padding: 0; margin: 0.3rem 0; }
.pack-checks li { padding: 0.25rem 0; }
.pack-box { display: inline-block; width: 0.95rem; height: 0.95rem; border: 1.5px solid var(--ink); border-radius: 3px; margin-right: 0.55rem; vertical-align: -0.15rem; }
.pack-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 0.75rem; margin-top: 0.7rem; font-size: 0.8rem; color: var(--muted); }
.pack-fields span { border-top: 1px solid var(--ink); padding-top: 0.2rem; min-height: 1.6rem; }
@media print {
  body:has(.pack-view) .topbar, body:has(.pack-view) .acct-panel > :not(.pack-view) { display: none !important; }
  body:has(.pack-view) .acct-panel { border: 0; box-shadow: none; padding: 0; }
  .pack-sheet { border-color: #C8C4BB; background: #fff; color: #121417; }
  .pack-box, .pack-fields span { border-color: #121417; }
  .pack-sub, .pack-fields { color: #5A6168; }
}
/* Store apps (iPhone and Android wrappers): no buy buttons, prices or upgrade links. See native.js. */
html.ff-native [data-ff-buy], html.ff-native [data-ff-buy] + .ff-buy-sep { display: none !important; }

/* Final changes: New job and My jobs only show once someone is signed in */
body:not(.ff-signed-in) #btn-new-job, body:not(.ff-signed-in) .app-menu-cta, body:not(.ff-signed-in) .jobs-head .btn { display: none !important; }

/* Same hover rings as the site. Black gets a logo colored ring, white gets a black ring. */
:root { --hl: #D87F28; }
/* --hl is the exact accent from the FIELDFOLIO logo files (#D87F28). Same value in light and dark. */
html[data-theme="dark"] { --hl: #D87F28; }
/* Motion tokens, same values as the site. */
:root { --ff-ease: cubic-bezier(0.2, 0, 0, 1); --ff-dur: 0.2s; --ff-lift: 0px;
  --glow-box: 0 6px 18px rgba(18, 20, 23, 0.12), 0 0 0 1px rgba(18, 20, 23, 0.12);
  --glow-or: 0 6px 18px rgba(216, 127, 40, 0.22), 0 0 0 1px rgba(216, 127, 40, 0.34); }
html[data-theme="dark"] { --glow-box: 0 6px 18px rgba(216, 127, 40, 0.20), 0 0 0 1px rgba(216, 127, 40, 0.30); }
.btn, .btn-ghost { transition: box-shadow var(--ff-dur) var(--ff-ease), transform var(--ff-dur) var(--ff-ease), border-color var(--ff-dur) var(--ff-ease), background var(--ff-dur) var(--ff-ease); }
.btn:active { transform: translateY(0.5px); }
@media (hover: hover) {
  .btn-ghost:hover { box-shadow: var(--glow-box); }
  .btn:not(.btn-ghost):not(.btn-share):hover { box-shadow: var(--glow-or); }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active { transform: none; }
}

/* ===== 2026-09-30 sample before sign in (read only) + delete account dialog ===== */
.sample-gate-note { display: none; }
body.ff-auth-gate .sample-gate-note { display: block; color: var(--ink); }
body.ff-auth-gate .sample-modal-lead:not(.sample-gate-note) { display: none; }
body.ff-auth-gate #btn-sample-use { display: none !important; }
.ff-del-modal { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ff-del-backdrop { position: absolute; inset: 0; background: rgba(18, 20, 23, 0.6); }
.ff-del-panel {
  position: relative; width: min(440px, 100%); max-height: 92vh; overflow: auto;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-top: 5px solid var(--warn); border-radius: 16px; padding: 1.1rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.ff-del-panel h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.ff-del-panel p { margin: 0 0 0.6rem; }
.ff-del-panel ul { margin: 0 0 0.7rem; padding-left: 1.2rem; }
.ff-del-panel li { margin: 0.15rem 0; }
.ff-del-label { font-weight: 700; margin: 0.4rem 0 0.25rem; display: block; }
.ff-del-panel input { width: 100%; min-height: 44px; }
.ff-del-panel .hint, .ff-del-panel .hint a { color: var(--ink); }
.ff-del-actions { display: flex; gap: 0.5rem; margin: 0.6rem 0; }
.ff-del-actions .btn { flex: 1; min-height: 44px; }
.ff-del-go:disabled { opacity: 0.55; cursor: not-allowed; }
.ff-del-done { max-width: 28rem; margin: 1rem auto 0; padding: 0.8rem 1rem; border: 2px solid var(--ok); border-radius: 12px; background: var(--panel); color: var(--ink); }
@media print { .ff-del-modal { display: none !important; } }

/* 2026-09-30k Menu button: label centered both ways */
.topbar-actions #btn-menu {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  line-height: 1; padding-top: 0; padding-bottom: 0; text-align: center; box-sizing: border-box;
}
.topbar-actions #btn-menu { padding-top: 2px; padding-bottom: 0; padding-left: 0.7rem; padding-right: calc(0.7rem + 0.67px); }

/* 2026-09-30 CSP: utility classes that replace inline style attributes (no visual change) */
.u-1386d5{margin:0 !important}
.u-48a4e4{background:#B42318 !important}
.u-722a5d{background:#C47A2C !important}
.u-746882{background:#2F6B3A !important}
.u-cde4b8{background:#121417 !important}
.u-ecf57f{margin-bottom:0.35rem !important}
.u-fad213{background:#1B6CA8 !important}

/* jobs page */
  body { padding-bottom: 2rem; }
  .jobs-panel { margin-top: 0.5rem; }
  .jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
  .jobs-head h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
  .jobs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
  .job-row {
    background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 0.85rem 0.95rem; display: grid; gap: 0.35rem;
    box-shadow: var(--shadow);
  }
  .job-row.is-current { border-color: var(--ink); }
  .job-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
  .job-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
  .job-meta { margin: 0; color: var(--muted); font-size: 0.88rem; }
  .job-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
    background: var(--ink); color: var(--btn-on-ink); border-radius: 999px; padding: 0.15rem 0.55rem;
  }
  .job-badge.cloud { background: var(--steel); }
  .jobs-empty {
    background: var(--panel); border: 1.5px dashed var(--line); border-radius: var(--radius);
    padding: 1.4rem 1rem; text-align: center;
  }
  .jobs-empty p { margin: 0 0 0.85rem; color: var(--muted); }

/* CSP: classes that replace inline style attributes and cssText (no visual change) */
.ff-legal-overlay{position:fixed;inset:0;z-index:9999;background:rgba(18,20,23,.55);display:flex;align-items:flex-end;justify-content:center;padding:1rem}
.ff-legal-card{background:#fff;color:#121417;max-width:28rem;width:100%;border-radius:12px;padding:1.1rem 1.15rem 1.2rem;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.ff-legal-h{margin:0 0 .5rem;font-size:1.05rem}
.ff-legal-p{margin:0 0 .75rem;font-size:.9rem;line-height:1.4}
.ff-legal-a{color:#121417;font-weight:700}
#ff-legal-ack-btn{width:100%}
.ff-auth-legal-row{display:flex;gap:.5rem;align-items:flex-start;font-size:.85rem;line-height:1.35}
.ff-auth-agree{margin-top:.2rem}
.ff-share-legal-note{font-size:.8rem;margin:.5rem 1rem 0;color:var(--muted)}
.ff-pay-h{margin-top:1rem}
.ff-print-frame{position:fixed;right:0;bottom:0;width:0;height:0;border:0;visibility:hidden}

/* ===== Account recovery (forgot password, forgot email, new password) ===== */
.auth-help-row { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: -0.1rem 0 0.1rem; }
.auth-help-link {
  background: none; border: none; padding: 0.55rem 0; min-height: 44px;
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px;
}
.auth-help-link:hover { color: var(--ink); }
.auth-help-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.auth-panel {
  display: grid; gap: 0.45rem; padding: 0.7rem 0.8rem;
  background: var(--soft, var(--bg)); border: 1.5px solid var(--line); border-radius: 10px;
}
.auth-panel[hidden] { display: none !important; }
.auth-hint { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--muted); }
.auth-hint a { color: var(--accent-text); font-weight: 600; word-break: break-word; }
.auth-panel .auth-label input { background: var(--panel); }
html[data-theme="dark"] .auth-panel .auth-label input { background: var(--field, #232A32); }
@media (min-width: 900px) {
  body.ff-auth-gate #auth-root .auth-help-row { justify-content: space-between; }
  body.ff-auth-gate #auth-root .auth-help-link { font-size: 0.92rem; }
  body.ff-auth-gate #auth-root .auth-panel { padding: 0.9rem 1rem; }
}

/* Underlines never cut through descenders (g, y, p, j, q) */
a:not(.btn):not(.logo):not(.app-logo), .auth-help-link, .hint a, .note a, .auth-msg a {
  text-decoration-skip-ink: auto; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.auth-help-link { line-height: 1.5; overflow: visible; height: auto; text-underline-offset: 0.2em; text-decoration-thickness: 1px; text-decoration-skip-ink: auto; }

/* 2026-09-30m app header uses the exact site header (same markup and metrics) */
:root { --nav-bg: rgba(237, 234, 228, 0.96); }
html[data-theme="dark"] { --nav-bg: rgba(18, 20, 23, 0.96); }
.container { width: min(1080px, 92%); margin: 0 auto; }
.nav { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); border-bottom: 2px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; gap: 0.5rem; }
.logo { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; color: var(--ink); font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; line-height: 1.5; }
.logo:hover { text-decoration: none; color: var(--ink); }
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; }
.nav-inner .theme-toggle { margin-left: auto; }
.nav-inner .nav-toggle { margin-left: 0.35rem; }
.nav-inner .logo { margin-right: 0; }
.save-row { display: flex; justify-content: flex-end; margin: 0 0 0.5rem; }

/* 2026-09-30m header controls: one soft style, no black border, no black hover fill.
   Hover is only the same soft glow every other button has. */
.nav-toggle, .theme-toggle, .nav-inner .nav-toggle {
  display: inline-flex !important; align-items: center; justify-content: center;
  box-sizing: border-box; height: 44px; min-height: 44px; min-width: 44px;
  padding: 2px 0.95rem 0; gap: 0.35rem; margin: 0;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--ink);
  font-family: inherit; font-size: 0.9rem; font-weight: 700; line-height: 1;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.theme-toggle { padding: 0 0.7rem; }
.nav-toggle { min-width: 66px; }
.nav-toggle:hover, .theme-toggle:hover, .nav-toggle:focus-visible, .theme-toggle:focus-visible {
  background: var(--panel); color: var(--ink); border-color: var(--line);
  box-shadow: var(--glow-box); text-decoration: none; transform: none;
}
.nav-toggle:focus-visible, .theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .theme-icon { font-size: 1rem; line-height: 1; }
.theme-toggle .theme-label { font-size: 0.9rem; letter-spacing: 0; }
@media (max-width: 720px) { .theme-toggle .theme-label { display: none; } .theme-toggle { min-width: 44px; width: 44px; padding: 0; } }

/* 2026-09-30m narrow phones: Sample / Desktop sit beside Menu without squeezing it */
.nav-inner .nav-toggle, .nav-inner .theme-toggle, .nav-inner .logo { flex-shrink: 0; }
@media (max-width: 420px) {
  .nav-inner { gap: 0.25rem; }
  .nav-inner .nav-toggle:not(#btn-menu) { padding-left: 0.4rem; padding-right: 0.4rem; min-width: 0; }
}
@media (max-width: 420px) { .nav-inner { gap: 0.15rem; } .nav-inner .nav-toggle { margin-left: 0; } }
