/* Benchbook — one dark environment throughout. The journal/forms/profile ("paper") screens use the
   charcoal reading surface; Community and Collection use the deeper midnight photographic surface.
   Layout: single reading column (≤640px) inside a fixed app frame with a pinned four-tab bar. */
:root {
  --paper: #111615; --ink: #F0EBE2; --muted: #A39D93; --rule: #2A3231; --oxblood: #D0B694; --oxblood-ink: #E6D3B3; --rose: #25271F;
  --wine: #842D3D; --field: #1A2120; --danger-ink: #E58A7B;
  --midnight: #0C1010; --panel: #151A1B; --charcoal: #101413; --ivory: #F3EEE5; --ivory-muted: #B9B2A6; --brass: #D0B694; --copper: #DA8055; --green: #8DB898;
  --warn: #E2A35A; --suede: #13201B;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --tabbar: 60px; --read: 640px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--paper); color: var(--ink); }
body { font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
:root[data-env="dark"] body { background: var(--midnight); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- frame */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); background: var(--paper); }
.app.env-dark { background: var(--midnight); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
:root[data-env="dark"] body::before { background: var(--midnight); }
.screens { position: relative; flex: 1; min-height: 0; }
.screen-host { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 28px; }
.screen-host.paper { background: var(--paper); color: var(--ink); color-scheme: dark; }
.screen-host.dark { background: var(--midnight); color: var(--ivory); color-scheme: dark; }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: var(--charcoal); border-top: 1px solid #1E2524; color: #8E948F;
  padding: 4px var(--gr) calc(4px + env(safe-area-inset-bottom, 0px)) var(--gl); flex-shrink: 0; z-index: 5; }
.tabbar.dark { background: var(--charcoal); border-top-color: #1E2524; color: #8E948F; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 11.5px; color: #8E948F; letter-spacing: .01em; min-width: 0; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab.on { color: var(--brass); font-weight: 500; }
/* the camera: the quickest way in — larger, brass, lifted above the bar */
.tab-camera { position: relative; display: grid; place-items: center; min-height: 52px; }
.tab-camera-btn { width: 60px; height: 60px; border-radius: 50%; margin-top: -22px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #E4CFAE, var(--brass) 60%, #B39A74); color: var(--charcoal);
  box-shadow: 0 0 0 5px var(--charcoal), 0 6px 18px rgba(0,0,0,.55); transition: transform .12s; }
.tab-camera-btn:active { transform: scale(.94); }
.tab-camera-btn:focus-visible { outline: 2px solid var(--copper); outline-offset: 6px; }
.tab-camera-btn.busy { opacity: .7; }

/* ---------------------------------------------------------------- bars */
.topbar { position: sticky; top: 0; z-index: 4; background: var(--paper); border-bottom: 1px solid transparent; }
.topbar.dark { background: var(--midnight); color: var(--ivory); }
.topbar-row { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 54px; padding: 0 calc(var(--gr) - 10px) 0 calc(var(--gl) - 10px); max-width: calc(var(--read) + 40px); margin: 0 auto; }
.topbar-title { font-family: var(--serif); font-size: 18px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-right { display: flex; justify-content: flex-end; }
.serif-mark { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 22px; flex-shrink: 0; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.brass { color: var(--brass); }
.icon-spacer { width: 44px; height: 44px; display: inline-block; }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 6px var(--gr) 4px var(--gl); max-width: calc(var(--read) + 40px); margin: 0 auto; }
.mast-actions { display: flex; gap: 2px; margin-right: -10px; }
.wordmark-spaced { font-family: var(--serif); font-size: 13px; letter-spacing: .38em; color: var(--ink); }
.wordmark-bold { font: 700 26px/1 var(--sans); letter-spacing: -.01em; margin: 0; color: var(--ivory); }
.dark-mast { background: var(--midnight); max-width: none; }
.sticky { position: sticky; top: 0; z-index: 4; }
.searchbar { display: flex; align-items: center; gap: 8px; flex: 1; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; padding: 6px 0; }
.searchbar.dark { border-bottom-color: #2A3231; color: var(--ivory); }
.link-btn { color: var(--oxblood); display: inline-flex; align-items: center; gap: 5px; min-height: 36px; font-size: 14.5px; }
.link-btn.inline { min-height: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--rule); }
.link-btn.danger { color: var(--danger-ink); }
.link-btn.strong { font-weight: 600; }
.env-dark .link-btn, .dark-page .link-btn, .dark .link-btn { color: var(--brass); }

/* ---------------------------------------------------------------- reading column */
.paper-page { min-height: 100%; }
.reading { max-width: var(--read); margin: 0 auto; padding: 4px var(--gr) 24px var(--gl); }
.pad { padding: 16px var(--gr) 16px var(--gl); }
.center { text-align: center; }
.muted { color: var(--muted); }
.dark-page .muted, .screen-host.dark .muted { color: var(--ivory-muted); }
.small { font-size: 13px; }
.page-title { font: 400 30px/1.15 var(--serif); margin: 14px 0 4px; text-wrap: balance; text-align: left; }
.section-h { font: 400 21px/1.3 var(--serif); margin: 28px 0 10px; display: flex; align-items: center; gap: 8px; text-wrap: balance; }
.sub-h { font: 600 15px/1.3 var(--sans); margin: 22px 0 8px; letter-spacing: .01em; }
.count { font: 500 12px var(--sans); color: var(--muted); background: var(--rose); border-radius: 10px; padding: 1px 8px; }
.rule-sep { border-top: 1px solid var(--rule); margin-top: 22px; padding-top: 6px; }
.sub-line { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; }
.note-box { background: var(--rose); border-radius: 8px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.note-box.warn { background: #2A2016; }
.error-line { color: var(--danger-ink); font-size: 14px; }
.ai-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin: 8px 0; flex-wrap: wrap; }
.ai-line.warn { color: var(--warn); }
.privacy-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.banner { padding: 10px var(--gr) 10px var(--gl); font-size: 14px; background: #2A2016; }
.banner.dark { background: #2A2016; color: #F0D7BD; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; color: var(--muted); }

/* ---------------------------------------------------------------- buttons, chips, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--rule); background: transparent; font-size: 15px; }
.btn.primary { background: var(--oxblood); color: var(--charcoal); font-weight: 500; border-color: var(--oxblood); }
.btn.primary:hover:not(:disabled) { background: var(--oxblood-ink); }
.btn.danger { background: #8E2525; border-color: #8E2525; color: #fff; }
.btn.danger-quiet { color: var(--danger-ink); border-color: transparent; padding-left: 0; }
.btn.quiet { border-color: transparent; color: var(--muted); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; margin: 10px 0; }
.btn.brass { background: var(--brass); color: var(--charcoal); border-color: var(--brass); }
.btn.dark { color: var(--ivory); border-color: #2A3231; }
.save-card { margin-top: 18px; height: 50px; font-size: 16.5px; font-family: var(--serif); }
.quiet-actions { display: flex; gap: 18px; align-items: center; margin: 10px 0; }
.quiet-actions.wrap { flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--rule); font-size: 14px; }
.chip.on { background: var(--rose); border-color: var(--rose); color: var(--oxblood-ink); font-weight: 500; }
.dark .chip.on, .dark-page .chip.on { background: #2B2A22; border-color: var(--brass); color: var(--brass); }
.form { display: flex; flex-direction: column; gap: 6px; }
.form input:not([type=checkbox]), .form select, .form-grid input, .form-grid select, .ref-form input, .ann-form input, .cap-input, .capture-bench select, .ref-form select, .tag-add input {
  border: 1px solid var(--rule); background: var(--field); border-radius: 8px; min-height: 44px; padding: 8px 12px; width: 100%; font-size: 16px; }
.dark input, .dark select, .dark textarea, .dark-page select { background: #1A2120; border-color: #2A3231; color: var(--ivory); }
.form-grid { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 8px 12px; align-items: center; margin: 10px 0; }
.form-grid .autotext { border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; background: var(--field); }
@media (max-width: 380px) { .form-grid { grid-template-columns: 1fr; } }
.field-label { font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.title-input { font: 400 26px/1.25 var(--serif); border: 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important; background: transparent !important; padding: 8px 0 !important; outline: none; width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--oxblood); }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { width: 44px; height: 26px; border-radius: 13px; background: var(--rule); position: relative; transition: background .15s; flex-shrink: 0; }
.toggle-ui { border: 1px solid #3A4442; }
.toggle-ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ivory); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-ui { background: var(--oxblood); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); background: var(--charcoal); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--copper); outline-offset: 2px; }

/* inline notebook fields */
.autotext { width: 100%; resize: none; border: 0; background: transparent; outline: none; overflow: hidden; display: block; }
.title-edit { font: 400 26px/1.22 var(--serif); padding: 4px 0; margin: 2px 0 8px; border-radius: 4px; }
.body-edit { font: 400 16.5px/1.6 var(--serif); padding: 6px 0; min-height: 3.2em; }
.title-edit:focus { background: linear-gradient(transparent calc(100% - 1px), var(--rule) 0); }
.suggested, .title-edit.suggested { box-shadow: inset 3px 0 0 var(--copper); padding-left: 8px; }
.obj-fields, .detail-fields { margin: 6px 0; }
.field { display: grid; grid-template-columns: minmax(104px, 34%) 1fr 34px; align-items: center; gap: 4px 10px; border-bottom: 1px solid var(--rule); min-height: 48px; padding: 4px 0; position: relative; }
.field.wide { grid-template-columns: 1fr 34px; }
.field.wide .field-label { grid-column: 1 / -1; padding-top: 8px; }
.field.wide .field-value { grid-column: 1; }
.field-value { min-width: 0; font-family: var(--serif); font-size: 15.5px; }
.field-value input, .field-value select, .field-value textarea { border: 0; background: transparent; width: 100%; min-height: 40px; outline: none; font-family: var(--serif); font-size: 15.5px; padding: 0; }
.field-value input:focus, .field-value textarea:focus { background: linear-gradient(transparent calc(100% - 1px), var(--oxblood) 0); }
.field-remove { width: 34px; height: 34px; display: grid; place-items: center; color: #7E8682; border-radius: 17px; }
.field-remove:hover { color: var(--ink); background: var(--rose); }
.field-priv { width: 34px; display: grid; place-items: center; color: #7E8682; }
.field-error { display: block; color: var(--danger-ink); font: 12.5px var(--sans); }
.num-input { display: flex; align-items: center; gap: 6px; }
.num-input input { font-variant-numeric: tabular-nums; }
.num-input .unit, .num-input select { color: var(--muted); font: 14px var(--sans); width: auto; }
.detail-btn { margin: 8px 0; }
.conditions { grid-template-columns: 1fr 34px; }
.cond-toggle { display: flex; align-items: center; gap: 10px; min-height: 46px; width: 100%; text-align: left; border-bottom: 1px solid var(--rule); }
.conditions .cond-toggle { border: 0; }
.cond-sum { flex: 1; font: 14px var(--serif); color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cond-grid { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 10px; align-items: center; padding: 6px 0 12px; font-size: 14px; }
.cond-grid input, .cond-grid select { border: 1px solid var(--rule); border-radius: 6px; min-height: 40px; padding: 4px 10px; background: var(--field); width: 100%; }
.cond-grid .lbl, .cond-grid label { color: var(--muted); }
.stray { margin: 12px 0; padding: 8px 10px; background: #171D1C; border-radius: 8px; }
.stray-row { display: grid; grid-template-columns: 38% 1fr 34px; align-items: center; font-size: 14px; }
.combo { position: relative; }
.combo input { width: 100%; padding-right: 36px !important; }
.combo-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 17px; }
.combo.open .combo-toggle svg { transform: rotate(180deg); }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); min-width: 220px; background: #1A2120; border: 1px solid #34403D; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.55); list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow: auto; overscroll-behavior: contain; }
.combo-list button { width: 100%; text-align: left; padding: 10px 10px; border-radius: 6px; font: 15px var(--sans); color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.combo-list button:hover, .combo-list button.active { background: #24302D; }
.combo-list button.free { color: var(--brass); font-style: italic; }
.combo-list button.current { color: var(--brass); }
.combo-text { flex: 1; min-width: 0; }
.combo-ic { width: 22px; flex-shrink: 0; display: grid; place-items: center; color: #B9A383; }
.combo-list button { justify-content: flex-start; }
.combo-group { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.combo.with-icon input { padding-left: 32px !important; }
.combo-lead { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 22px; display: grid; place-items: center; color: var(--brass); pointer-events: none; }
.field-value .combo.with-icon input { padding-left: 28px !important; }
.field-value .combo-lead { left: 0; }
.combo.clearable input { padding-right: 68px !important; }
.combo-clear { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); border-radius: 15px; }
.combo-clear:hover { background: #24302D; color: var(--ink); }

/* ---------------------------------------------------------------- stage track */
.chapterbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px; padding: 0 calc(var(--gr) - 10px) 4px var(--gl); max-width: calc(var(--read) + 40px); margin: 0 auto; border-bottom: 1px solid var(--rule); }
.chap-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 13.5px; color: var(--muted); padding-right: 6px; }
.stagetrack { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; padding: 6px 0; min-width: 0; }
.stagetrack-line { position: absolute; left: 12.5%; right: 12.5%; top: 15px; height: 1px; background: var(--rule); }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); min-height: 44px; min-width: 0; }
.stage .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #4A5250; background: var(--paper); position: relative; z-index: 1; }
.stage .dot.on { background: #7D6E58; border-color: #7D6E58; }
.stage .dot.ring { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--oxblood); }
.stage .dot.on.ring, .stage .dot.cur { background: var(--oxblood); border-color: var(--oxblood); }
.stage.viewing { color: var(--oxblood); font-weight: 600; }
/* job status on the current dot */
.stage .dot { display: grid; place-items: center; }
.st-waiting_parts .dot.cur, .st-paused .dot.cur { background: #E2A35A; border-color: #E2A35A; }
.st-paused .dot.cur { background: #8E948F; border-color: #8E948F; }
.st-completed .dot.on { background: #6E9C78; border-color: #6E9C78; }
.st-completed .dot.cur { background: var(--green); border-color: var(--green); }
.dot-glyph { color: var(--charcoal); display: grid; place-items: center; }
.dot-glyph svg { stroke-width: 2.6; }
.stagetrack.compact .dot.cur { width: 14px; height: 14px; margin-top: -2px; }
.stagetrack.compact .dot-glyph svg { stroke-width: 3; }
.stage-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stagetrack.compact { width: 96px; padding: 4px 0; }
.stagetrack.compact .stagetrack-line { top: 9px; }
.stagetrack.compact .stage { min-height: 0; }
.stagetrack.compact .dot { width: 10px; height: 10px; border-width: 1.2px; }

/* ---------------------------------------------------------------- audience */
.aud { display: inline-flex; align-items: center; gap: 4px; font: 13px var(--sans); color: var(--muted); }
.aud.small { font-size: 12.5px; }
.aud-btn { min-height: 32px; padding: 0 8px; border-radius: 16px; border: 1px solid var(--rule); }
.aud-btn:hover { background: var(--rose); }

/* ---------------------------------------------------------------- photos */
.photo { position: relative; overflow: hidden; width: 100%; background: #151A1B; display: block; max-width: 100%; }
button.photo { cursor: zoom-in; }
.photo img { transition: opacity .25s, filter .35s; }
.photo.upgrading img { filter: blur(.4px); }
.photo-missing { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; text-align: center; padding: 8px; }
.video-badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); pointer-events: none; }
.photo-placeholder { width: 100%; aspect-ratio: 16/9; background: var(--field); color: var(--muted); display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 4px; }
.photo-placeholder.tall { aspect-ratio: 4/3; }
.photo-placeholder.hero { aspect-ratio: 1.15; border-radius: 0; }
.photo.hero { max-height: 62vh; }
.gallery { position: relative; margin: 10px calc(-1 * var(--gl)) 10px calc(-1 * var(--gr)); }
@media (min-width: 700px) { .gallery { margin-left: 0; margin-right: 0; } }
/* capped in height on wide, short screens: the width follows the photograph's shape so it is never left-aligned in an empty band */
.gallery-track { --gmax: 72vh; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; max-height: var(--gmax); max-width: calc(var(--gmax) * var(--ar, 1.6)); margin-inline: auto; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; height: 100%; }
.gallery-slide .photo { height: 100%; }
.counter { position: absolute; right: 12px; bottom: 10px; background: rgba(12,16,16,.62); color: #fff; font: 500 12px var(--sans); padding: 3px 9px; border-radius: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.counter.top { top: 64px; bottom: auto; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(12,16,16,.72); color: var(--ivory); display: none; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .gallery:hover .gal-nav { display: grid; } .gal-nav:disabled { opacity: .3; } }

/* ---------------------------------------------------------------- community feed */
.feed { min-height: 100%; background: var(--midnight); }
.posts { display: flex; flex-direction: column; gap: 6px; max-width: 760px; margin: 0 auto; }
.post { position: relative; background: var(--panel); }
.post .gallery { margin: 0; }
.post .gallery-track { --gmax: 82vh; }
.posts > .post { width: 100%; margin-inline: auto; }
.post .photo { background: var(--panel); }
.fade-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px calc(var(--gr) - 8px) 26px var(--gl);
  background: linear-gradient(rgba(12,16,16,.72), rgba(12,16,16,0)); pointer-events: none; }
.fade-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px var(--gr) 10px var(--gl); background: linear-gradient(rgba(12,16,16,0), rgba(12,16,16,.82)); pointer-events: none; }
.fade-top > *, .fade-bottom > * { pointer-events: auto; }
.post-author { display: flex; align-items: center; gap: 10px; text-align: left; color: var(--ivory); min-height: 44px; }
.post-author strong { display: block; font: 500 14px var(--sans); }
.post-author small { display: block; font-size: 12px; color: #C9C3B8; }
.post-title { font: 400 23px/1.2 var(--serif); color: var(--ivory); text-align: left; display: block; text-wrap: balance; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.post-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; color: var(--ivory); }
.stage-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #E6DDD0; }
.stage-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copper); }
.heart, .comment-count { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; min-width: 40px; font-size: 14px; font-variant-numeric: tabular-nums; }
.heart.on { color: var(--copper); }
.heart.dark.on { color: var(--copper); }
.heart.pop svg { animation: pop .38s ease-out; }
@keyframes pop { 50% { transform: scale(1.3); } }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: #3A403E; color: var(--ivory); font-family: var(--serif); flex-shrink: 0; overflow: hidden; border: 1px solid rgba(243,238,229,.25); }
.paper-page .avatar { background: var(--rose); color: var(--oxblood-ink); border-color: transparent; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pull-hint { display: grid; place-items: center; color: var(--ivory-muted); overflow: hidden; transition: height .18s; }
.pull-spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid #3A4442; border-top-color: var(--ivory-muted); }
.pull-spinner.armed { border-top-color: var(--brass); border-right-color: var(--brass); }
.pull-hint.busy .pull-spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.post-flags { display: flex; gap: 6px; margin-left: auto; margin-right: 2px; }
.post-flag { display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px var(--sans); color: var(--ivory); background: rgba(12,16,16,.7); border: 1px solid rgba(243,238,229,.22); border-radius: 12px; padding: 3px 8px; }
.sentinel { min-height: 60px; display: grid; place-items: center; }
.feed-skeleton div { height: 380px; background: linear-gradient(90deg, var(--panel), #1B2122, var(--panel)); margin-bottom: 6px; }
.empty { text-align: center; padding: 48px var(--gr) 32px var(--gl); max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.empty h3 { font: 400 22px var(--serif); color: var(--ink); margin: 8px 0 2px; }
.empty p { margin: 0 0 14px; }
.empty.dark { color: var(--ivory-muted); }
.empty.dark h3 { color: var(--ivory); }

/* sheet / menu */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(12,16,16,.42); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--paper); color: var(--ink); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 14px 14px 0 0;
  padding: 6px var(--gr) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gl); animation: up .2s ease-out; }
.sheet.dark { background: #161C1B; color: var(--ivory); color-scheme: dark; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--rule); margin: 4px auto 8px; }
.sheet.dark .sheet-grip { background: #34403D; }
.sheet-title { font: 600 13px var(--sans); color: var(--muted); padding: 6px 4px 8px; letter-spacing: .02em; }
.menu { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 8px; text-align: left; border-radius: 8px; }
.menu-item:hover:not(:disabled) { background: color-mix(in srgb, currentColor 6%, transparent); }
.menu-label { flex: 1; display: flex; flex-direction: column; font-size: 15.5px; }
.menu-label small { color: var(--muted); font-size: 12.5px; }
.sheet.dark .menu-label small { color: var(--ivory-muted); }
.menu-item.danger { color: var(--danger-ink); }
.sheet.dark .menu-item.danger { color: #E58A7B; }
.confirm h3 { font: 400 21px var(--serif); margin: 6px 0; }
.confirm p { color: var(--muted); margin: 0 0 16px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.saved-badge { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); z-index: 55; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(24,30,29,.96); color: var(--ivory); border: 1px solid rgba(208,182,148,.45); border-radius: 16px; padding: 5px 12px 5px 10px; font: 500 13px var(--sans);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: savedIn 2.2s ease-out forwards; pointer-events: none; white-space: nowrap; }
.saved-badge svg { color: var(--brass); }
@keyframes savedIn { 0% { opacity: 0; transform: translate(-50%, -8px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.toast { font-weight: 500; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; max-width: min(92vw, 460px); box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: up .2s; }

/* ---------------------------------------------------------------- post detail / entry blocks */
.byline { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 48px; margin: 6px 0; }
.byline strong { display: block; font: 500 14px var(--sans); }
.byline small { display: block; color: var(--muted); font-size: 12.5px; }
.entry-block { padding: 14px 0 6px; }
.entry-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font: 500 11.5px var(--sans); letter-spacing: .1em; color: var(--muted); min-height: 32px; }
.meta-btn { font: inherit; letter-spacing: inherit; color: var(--muted); min-height: 32px; }
.entry-title { font: 400 25px/1.2 var(--serif); margin: 4px 0 6px; text-wrap: balance; }
.entry-block.lead .entry-title { font-size: 28px; }
.title-btn { text-align: left; font: inherit; display: block; }
.title-btn:hover { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.entry-type { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fault-status { border: 1px solid var(--rule); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.fault-status.confirmed { border-color: #8A6A70; color: var(--oxblood-ink); }
.outcome { display: inline-flex; align-items: center; gap: 3px; font: 500 12px var(--sans); border-radius: 10px; padding: 1px 8px; border: 1px solid var(--rule); }
.outcome.pass { color: var(--green); border-color: #4F6B57; }
.outcome.fail { color: var(--danger-ink); border-color: #7A4545; }
.entry-body { font: 400 16.5px/1.62 var(--serif); margin: 8px 0; white-space: pre-wrap; }
.conditions-line { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.detail-rows { margin: 8px 0; display: flex; flex-direction: column; }
.detail-rows > div { display: grid; grid-template-columns: minmax(104px, 36%) 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.detail-rows dt { color: var(--muted); font-size: 13.5px; }
.detail-rows dd { margin: 0; font-family: var(--serif); min-width: 0; overflow-wrap: anywhere; }
.readings { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); border-radius: 8px; margin: 10px 0; }
.readings > div { padding: 10px 12px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.readings > div:last-child { border-right: 0; }
.readings span { font-size: 12.5px; color: var(--muted); }
.readings strong { font: 400 19px var(--serif); font-variant-numeric: tabular-nums; }
.comparison table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.comparison th, .comparison td { padding: 8px 6px; border-bottom: 1px solid var(--rule); text-align: center; font-size: 15px; }
.comparison th[scope=row] { text-align: left; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.comparison thead th { font: 500 12.5px var(--sans); color: var(--muted); }
.comparison td { font-family: var(--serif); }
.reaction-row { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); }
.chapter-empty { padding: 24px 0 8px; }
.chapter-empty p { font-family: var(--serif); }
.add-card { margin: 26px 0 10px; padding: 14px 14px 16px; border-radius: 14px; border: 1px dashed rgba(208,182,148,.45); background: rgba(208,182,148,.05); }
.add-card-head { display: flex; align-items: center; gap: 8px; color: var(--brass); font-size: 14.5px; }
.add-card-head strong { font-weight: 600; }
.add-card-media { margin-left: auto; display: flex; gap: 8px; }
.add-card-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.add-pill { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 23px; background: var(--brass); color: var(--charcoal); font: 500 14.5px var(--sans); position: relative; }
.add-pill::before { content: "+"; font: 600 17px var(--sans); margin-right: -2px; }
.add-pill:active { transform: scale(.98); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(208,182,148,.5); color: var(--brass); background: rgba(12,16,16,.4); }
.round-btn:hover { background: rgba(208,182,148,.12); }
.photo-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -4px 0 6px; }

.comp-val { display: inline-flex; align-items: center; gap: 7px; }
.comp-val svg { color: var(--brass); flex-shrink: 0; }
.photo-buttons.no-photos { justify-content: flex-start; border: 1px dashed var(--rule); border-radius: 12px; padding: 14px; margin: 8px 0 12px; }
.photo-buttons.no-photos .muted { flex: 1; }
.entry-block.has-photos { padding-top: 6px; }
.entry-block.has-photos .gallery { margin-top: 0; }
.journal.drag { outline: 3px dashed var(--oxblood); outline-offset: -8px; }
.drop-hint { border: 2px dashed var(--oxblood); border-radius: 10px; padding: 20px; text-align: center; color: var(--oxblood); margin: 14px 0; }

/* composer */
.type-chooser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 10px; }
.type-chooser button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 1px solid var(--rule); border-radius: 8px; font-size: 12.5px; min-height: 66px; color: var(--muted); }
.type-chooser button.on { background: var(--rose); border-color: #6B5E4A; color: var(--oxblood); font-weight: 500; }
.type-chooser.suggested { box-shadow: none; padding-left: 0; }
.type-chooser.suggested button.on { box-shadow: inset 0 -3px 0 var(--copper); }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; margin: 8px 0; }
.strip-item { position: relative; flex: 0 0 auto; height: 132px; }
.strip-item .photo { height: 132px; width: auto; border-radius: 4px; }
.photo-strip.full { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 0; padding: 0; margin: 0 calc(-1 * var(--gl)) 10px calc(-1 * var(--gr)); max-height: 72vh; }
@media (min-width: 700px) { .photo-strip.full { margin-left: 0; margin-right: 0; } }
.photo-strip.full::-webkit-scrollbar { display: none; }
.photo-strip.full .strip-item { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.photo-strip.full .strip-item .photo { height: 100%; width: 100%; border-radius: 0; }
.strip-item.single { height: auto; }
.strip-item.single .photo { height: auto; width: 100%; max-height: 50vh; }
.strip-remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(12,16,16,.8); color: var(--ivory); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.save-state { font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.save-chip { font-size: 12px; color: var(--muted); padding-right: 6px; }
.datetime { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); cursor: pointer; }
.datetime input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.datetime:focus-within { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 4px; }

/* discussion — social style: avatars, bubbles, pill composer */
.discussion { margin-top: 22px; }
.disc-head { display: flex; align-items: center; gap: 8px; font: 600 15px var(--sans); margin: 0 0 12px; letter-spacing: .01em; }
.disc-count { font: 500 12px var(--sans); color: var(--charcoal); background: var(--brass); border-radius: 10px; padding: 1px 8px; }
.disc-more { font: 500 13.5px var(--sans); color: var(--ivory-muted); margin: 0 0 10px; min-height: 32px; }
.disc-more:hover { color: var(--ink); }
.disc-empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment.sending { opacity: .6; }
.comment-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.bubble { background: #1C2322; border-radius: 4px 18px 18px 18px; padding: 8px 14px 10px; max-width: 100%; }
.comment.mine .bubble { background: #2A2820; }
.bubble strong { display: block; font: 600 13px var(--sans); margin-bottom: 1px; }
.bubble p { margin: 0; font: 15px/1.45 var(--sans); overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-meta { display: flex; gap: 14px; align-items: center; font: 500 12px var(--sans); color: var(--muted); padding: 4px 0 0 12px; }
.comment-meta button { font: inherit; color: var(--muted); }
.comment-meta button:hover { color: var(--ink); }
.comment-failed { color: var(--danger-ink); }
.comment-failed button { color: var(--danger-ink); text-decoration: underline; }
.comment-composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; }
.composer-pill { flex: 1; display: flex; align-items: flex-end; gap: 6px; border: 1px solid #2A3231; border-radius: 22px; padding: 4px 4px 4px 16px; background: #1A2120; min-width: 0; }
.composer-pill:focus-within { border-color: rgba(208,182,148,.6); }
.composer-pill .autotext { font: 15px/1.45 var(--sans); padding: 7px 0; max-height: 140px; overflow-y: auto; }
.send-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; transition: background .15s, color .15s; }
.send-btn.ready { background: var(--brass); color: var(--charcoal); }
.send-btn:disabled { opacity: 1; }
.sheet.dark .comment-meta span, .sheet.dark .muted { color: var(--ivory-muted); }

/* ---------------------------------------------------------------- bench list */
.bench-tabs { display: flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--rule); padding: 0 var(--gr) 0 var(--gl); max-width: calc(var(--read) + 40px); margin: 0 auto; }
.ul-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); margin: 10px 0; }
.ul-tabs.scroll { overflow-x: auto; scrollbar-width: none; padding: 0 var(--gr) 0 var(--gl); max-width: calc(var(--read) + 40px); margin: 10px auto; }
.ul-tabs button { min-height: 44px; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ul-tabs button.on { color: var(--oxblood); border-bottom-color: var(--oxblood); font-weight: 500; }
.new-job { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; color: var(--muted); }
.contents { list-style: none; margin: 0 auto; padding: 0 var(--gr) 0 var(--gl); max-width: calc(var(--read) + 40px); }
.job { display: grid; grid-template-columns: 30px 1fr; gap: 6px; border-bottom: 1px solid var(--rule); padding: 16px 0; }
.num { font: 400 14px var(--serif); color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.job-main { min-width: 0; }
.job.featured .photo { border-radius: 2px; }
.job-title-lg { font: 400 27px/1.2 var(--serif); margin: 12px 0 2px; }
.job-sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.job.featured .stagetrack { margin: 12px 0 2px; }
.job-status { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.job-status strong { font: 400 14.5px var(--serif); color: var(--ink); }
.job-status .sep { width: 10px; }
.status.waiting_parts, .status.paused { color: var(--warn); }
.status.completed { color: var(--green); }
.job-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; text-align: left; width: 100%; }
.job-thumb { border-radius: 2px; }
.job-thumb.ph { width: 96px; aspect-ratio: 1.12; display: grid; place-items: center; background: var(--field); color: var(--muted); }
.job-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-title { font: 400 19px/1.25 var(--serif); }

/* ---------------------------------------------------------------- collection (dark, continuous surface) */
.collection { min-height: 100%; background: radial-gradient(120% 60% at 50% 30%, #182822 0%, var(--suede) 45%, var(--charcoal) 100%); color: var(--ivory); }
.coll-pinned { position: sticky; top: 0; z-index: 4; background: var(--charcoal); }
.coll-mast { max-width: none; }
.coll-title { font: 400 30px/1 var(--serif); margin: 0; color: var(--ivory); }
.cal-strip { padding: 0 0 8px; border-bottom: 1px solid #1E2826; }
.cal-head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--gr) 0 var(--gl); }
.cal-month { position: relative; display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--ivory); min-height: 36px; cursor: pointer; }
.cal-month input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cal-days { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gr) 0 var(--gl); }
.cal-days::-webkit-scrollbar { display: none; }
.cal-day { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 2px; border-radius: 6px; border: 1px solid transparent; color: #A9AFA9; }
.cal-day.today { border-color: var(--brass); color: var(--ivory); }
.cal-day .wd { font-size: 10.5px; }
.cal-day .thumb { position: relative; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.cal-day .thumb .photo { height: 100%; border-radius: 50%; }
.empty-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed #36403D; }
.cal-day .badge { position: absolute; right: -2px; top: -2px; background: var(--brass); color: var(--charcoal); font: 600 10px var(--sans); border-radius: 8px; min-width: 15px; height: 15px; display: grid; place-items: center; }
.cal-day .dn { font: 400 13px var(--serif); color: var(--ivory); font-variant-numeric: tabular-nums; }
.cal-day .wl { font-size: 9.5px; max-width: 50px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 13px; }
.coll-count { font-size: 12px; color: #8E948F; padding: 10px var(--gr) 0 var(--gl); letter-spacing: .02em; }
.watch-surface { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px calc(var(--gr) - 6px) 20px calc(var(--gl) - 6px); max-width: 1100px; margin: 0 auto; }
@media (min-width: 760px) { .watch-surface { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .watch-surface { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 300px) { .watch-surface { grid-template-columns: 1fr; } }
.watch-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 6px 18px; color: var(--ivory); position: relative; }
.watch-tile:hover .watch-img { transform: translateY(-2px); }
.watch-img { width: 100%; transition: transform .25s; }
.watch-img .photo { background: transparent; -webkit-mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%); }
.watch-ph { display: grid; place-items: center; aspect-ratio: .86; width: 100%; color: #3E4A46; }
.watch-cap { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: -14px; position: relative; padding: 14px 6px 0; background: radial-gradient(ellipse 80% 90% at 50% 70%, rgba(16,20,19,.75), transparent 75%); }
.watch-cap .brand { font: 500 10.5px var(--sans); letter-spacing: .26em; color: var(--brass); }
.watch-cap .model { font: 400 19px/1.2 var(--serif); color: var(--ivory); overflow-wrap: anywhere; }
.watch-cap .days { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #A9AFA9; font-variant-numeric: tabular-nums; }
.dark-page { min-height: 100%; background: var(--midnight); color: var(--ivory); }
.day-list { display: flex; flex-direction: column; gap: 14px; max-width: var(--read); margin: 0 auto; padding: 8px var(--gr) 20px var(--gl); }
.day-item { text-align: left; }
.day-cap { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.day-cap .serif { font: 400 19px var(--serif); }
.day-cap small { display: inline-flex; align-items: center; gap: 4px; color: var(--ivory-muted); }
.explore { list-style: none; padding: 0 var(--gr) 0 var(--gl); margin: 0 auto; max-width: var(--read); }
.explore button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 64px; border-bottom: 1px solid #1E2826; }
.explore span { flex: 1; display: flex; flex-direction: column; }
.explore small { color: var(--ivory-muted); }
.watch-tile.static { cursor: default; }
/* the final tile of the collection: add a watch */
.watch-add { justify-content: flex-start; }
.watch-add-ring { width: 78%; aspect-ratio: 1; margin: 6% auto 0; border-radius: 50%; border: 1.5px dashed rgba(208,182,148,.6); display: grid; place-items: center; color: var(--brass);
  background: radial-gradient(circle, rgba(208,182,148,.10), transparent 70%); transition: border-color .2s, background .2s; }
.watch-add:hover .watch-add-ring, .watch-add:focus-visible .watch-add-ring { border-color: var(--brass); background: radial-gradient(circle, rgba(208,182,148,.18), transparent 70%); }
.watch-add .watch-cap { margin-top: 8px; background: none; }

/* ---------------------------------------------------------------- watch detail / wrist time */
.watch-detail .photo.hero { background: #151A1B; }
.private-toggle { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 60px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 18px; }
.private-toggle span { flex: 1; display: flex; flex-direction: column; }
.private-toggle small { color: var(--muted); font-size: 12.5px; }
.thumb-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; }
.thumb-item { flex: 0 0 92px; display: flex; flex-direction: column; gap: 4px; }
.thumb-item .photo { border-radius: 4px; }
.cover-pick { font-size: 11.5px; color: var(--muted); min-height: 28px; border-radius: 12px; border: 1px solid var(--rule); }
.cover-pick.on { background: var(--rose); color: var(--oxblood); border-color: var(--rose); }
.thumb-add { flex: 0 0 92px; aspect-ratio: 1; border: 1px dashed #4A5250; border-radius: 4px; display: grid; place-items: center; color: var(--muted); }
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.svc-date { font: 13px var(--sans); color: var(--muted); }
.svc-main p { font-family: var(--serif); margin: 4px 0; }
@media (max-width: 420px) { .service-list li { grid-template-columns: 1fr; gap: 2px; } }
.shot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shot { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); text-align: left; }
.shot span { display: inline-flex; gap: 4px; align-items: center; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; color: var(--oxblood); }
.month-title { font: 400 24px var(--serif); margin: 0; color: var(--ink); }
.month-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.month-cal th { font: 500 12px var(--sans); color: var(--muted); padding: 4px 0; }
.month-cal td { border: 1px solid var(--rule); height: 54px; vertical-align: top; padding: 0; }
.month-cal td button { width: 100%; height: 100%; min-height: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 2px; }
.month-cal .dn { font: 12.5px var(--serif); font-variant-numeric: tabular-nums; }
.month-cal td .photo { border-radius: 2px; width: 90%; }
.month-cal td.today { outline: 2px solid var(--oxblood); outline-offset: -2px; }
.wt-sum { margin: 14px 0 0; font-family: var(--serif); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 86px 1fr 60px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row.self .bar-name { font-weight: 600; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: #232A29; border-radius: 1px; }
.bar { display: block; height: 100%; background: var(--oxblood); border-radius: 1px; }
.bar-n { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.row-link { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 50px; border-top: 1px solid var(--rule); margin-top: 16px; font-size: 15px; }

/* ---------------------------------------------------------------- wristshot composer */
.ws-photo .photo { border-radius: 4px; max-height: 64vh; }
.frame-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.dest-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.dest { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1px solid #34403D; border-radius: 8px; color: var(--ivory); font-size: 15px; }
.dest.on { background: #2B2A22; border-color: var(--brass); color: var(--brass); }
.dest-row.light .dest { border-color: var(--rule); color: var(--ink); }
.dest-row.light .dest.on { background: var(--rose); border-color: #6B5E4A; color: var(--oxblood); }
.recog { margin: 8px 0; }
.recog-card { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; }
.recog-card > div { flex: 1; min-width: 0; }
.recog-card.col { flex-direction: column; align-items: flex-start; }
.recog-card small, .suggest-card small { color: var(--muted); font-size: 12.5px; display: block; }
.recog-thumb { width: 54px; flex-shrink: 0; border-radius: 4px; }
.recog-thumb.ph { width: 54px; height: 54px; display: grid; place-items: center; background: var(--field); }
.serif { font-family: var(--serif); }
.serif.big { font-size: 22px; line-height: 1.2; }
.suggest-card { border: 1px solid var(--rule); border-radius: 10px; padding: 14px; margin: 8px 0; }
.watch-pick { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
.watch-pick button { flex: 0 0 92px; display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 12.5px; text-align: center; padding: 6px; border: 1px solid var(--rule); border-radius: 8px; }
.watch-pick button.on { border-color: var(--oxblood); background: var(--rose); color: var(--oxblood-ink); }
.watch-pick .photo { background: transparent; }
.watch-pick .ph { width: 60px; height: 60px; display: grid; place-items: center; color: var(--muted); }
.capture { min-height: 100%; }
.capture-photo { max-width: 760px; margin: 0 auto; }
.capture-photo .photo { background: var(--midnight); max-height: 58vh; }
.capture .pad { max-width: var(--read); margin: 0 auto; }
.capture-bench { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.capture .field-label { color: var(--ivory-muted); }
.capture-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ivory-muted); font-size: 14px; min-height: 24px; margin: 4px 0 0; }
.pull-spinner.mini { width: 16px; height: 16px; border-width: 2px; border-top-color: var(--brass); animation: spin .8s linear infinite; }
.job-select { flex: 1 1 200px; min-width: 0; min-height: 40px; border: 1px solid var(--rule); border-radius: 8px; background: var(--field); color: var(--ink); padding: 6px 10px; font-size: 15px; }
.capture-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- built-in camera */
.camera { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: flex; flex-direction: column; justify-content: space-between; color-scheme: dark; touch-action: manipulation; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-video.mirror { transform: scaleX(-1); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: .7; pointer-events: none; }
.cam-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 24px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.cam-save { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--sans); padding: 6px 11px; border-radius: 16px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.22); color: #ddd; }
.cam-save.on { color: var(--brass); border-color: rgba(208,182,148,.55); }
.cam-msg { position: relative; margin: 0 auto; max-width: 320px; text-align: center; padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cam-msg p { margin: 0; }
.cam-bottom { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 26px 18px calc(env(safe-area-inset-bottom, 0px) + 22px); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.cam-side { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: #eee; min-width: 64px; min-height: 56px; justify-content: center; }
.cam-shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; background: transparent; }
.cam-shutter span { width: 62px; height: 62px; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shutter:active span { transform: scale(.88); }
.cam-shutter:disabled { opacity: .45; }

/* ---------------------------------------------------------------- photo viewer */
.viewer { position: fixed; inset: 0; z-index: 30; background: #0B0E0E; color: var(--ivory); display: flex; flex-direction: column; color-scheme: dark;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.viewer-bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 54px; padding: 0 6px; }
.viewer-title { text-align: center; font: 400 16px var(--serif); font-variant-numeric: tabular-nums; }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; position: relative; user-select: none; }
.viewer-stage.mode-pin, .viewer-stage.mode-highlight { cursor: crosshair; }
.img-box { position: relative; transform-origin: center center; will-change: transform; }
.img-box img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.video-note { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.marker { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 15px; background: var(--wine); color: #fff; font: 600 12px var(--sans); border: 2px solid #F5E9EA; box-shadow: 0 1px 6px rgba(0,0,0,.45); padding: 0 6px; }
.marker.pin { position: absolute; }
.marker.sel, .hl.sel .marker { background: var(--copper); }
.hl { position: absolute; border: 2px solid #F5E9EA; outline: 2px solid var(--wine); border-radius: 3px; background: rgba(132,45,61,.12); }
.hl .marker { position: absolute; left: -12px; top: -14px; transform-origin: center; }
.hl.drafting { outline-style: dashed; pointer-events: none; }
.viewer-nav { position: absolute; top: 50%; width: 44px; height: 44px; border-radius: 22px; background: rgba(243,238,229,.12); display: none; place-items: center; z-index: 2; }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .viewer-nav { display: grid; } .viewer-nav:disabled { opacity: .25; } }
.viewer-bottom { max-height: 40vh; overflow-y: auto; padding: 0 var(--gr) 8px var(--gl); }
.viewer-hint { text-align: center; font-size: 13px; color: var(--brass); padding: 6px 0; }
.viewer-hint.subtle { color: #7E8682; font-size: 12px; }
.viewer-tools { display: flex; justify-content: center; gap: 8px; border-top: 1px solid #222A29; border-bottom: 1px solid #222A29; }
.viewer-tools button { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 12px; font-size: 14px; }
.viewer-tools button.on { color: var(--brass); }
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-list li { border-bottom: 1px solid #1E2524; }
.ann-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 50px; }
.ann-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 15px; background: var(--wine); color: #fff; font: 600 12px var(--sans); flex-shrink: 0; }
.ann-list li.removed .ann-num { background: #3A3F3E; }
.ann-text { flex: 1; font: 15px var(--serif); }
.ann-detail { padding: 0 0 10px 42px; }
.ann-detail p { margin: 4px 0; font-family: var(--serif); }
.ann-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.ann-form { display: flex; flex-direction: column; gap: 6px; }
.ann-form .autotext { border: 1px solid #2A3231; border-radius: 8px; padding: 9px 12px; background: #1A2120; }
.ann-form input { background: #1A2120; border-color: #2A3231; }

/* ---------------------------------------------------------------- info page */
.info-sec { border-top: 1px solid var(--rule); margin-top: 22px; }
.info-sec .section-h { margin-top: 18px; }
.private-sec { background: #171D1C; margin: 22px calc(-1 * var(--gl)) 0 calc(-1 * var(--gr)); padding: 2px var(--gr) 16px var(--gl); border-top: 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-variant-numeric: tabular-nums; }
.work-list { padding-left: 18px; margin: 0 0 8px; }
.work-list li .link-btn { color: var(--ink); text-align: left; }
.checklist { width: 100%; border-collapse: collapse; }
.checklist th { text-align: left; font: 400 14px var(--serif); padding: 6px 0; border-bottom: 1px solid var(--rule); }
.checklist td { border-bottom: 1px solid var(--rule); width: 46%; }
.checklist select { width: 100%; border: 0; background: transparent; min-height: 40px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.ba { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 6px 0; }
.ba th, .ba td { padding: 7px 4px; border-bottom: 1px solid var(--rule); font-size: 13.5px; text-align: center; }
.ba th[scope=row] { text-align: left; font-weight: 400; color: var(--muted); white-space: nowrap; }
.ba thead th { font: 500 11.5px var(--sans); color: var(--muted); }
.ba td span { font-family: var(--serif); }
.ba input { width: 100%; min-width: 46px; border: 1px solid var(--rule); border-radius: 4px; min-height: 34px; text-align: center; background: var(--field); }
.ba.other td { text-align: left; }
.refs { list-style: none; padding: 0; margin: 0; }
.refs li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ref-title a { display: inline-flex; gap: 5px; align-items: center; font-family: var(--serif); }
.ref-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.found { border: 1px solid var(--rule); border-radius: 8px; padding: 10px; margin: 10px 0; }
.found-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; }
.ref-form { display: flex; flex-direction: column; gap: 6px; }
.ref-form .autotext { border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; background: var(--field); }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.share-pick { position: relative; border-radius: 4px; overflow: hidden; outline: 2px solid transparent; }
.share-pick.on { outline-color: var(--oxblood); outline-offset: -2px; }
.pick-mark { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 12px; background: var(--oxblood); color: var(--charcoal); display: grid; place-items: center; }
.key-mark { position: absolute; left: 4px; bottom: 4px; background: rgba(12,16,16,.8); color: var(--ivory); font-size: 10.5px; padding: 0 5px; border-radius: 3px; }
.caption-box { white-space: pre-wrap; font: 14px/1.5 var(--serif); background: #171D1C; border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; background: #171D1C; padding: 8px; border-radius: 6px; }
.tag-add { display: flex; gap: 8px; margin: 6px 0 12px; }
.ai-box { border-left: 3px solid var(--copper); padding: 4px 12px; margin: 12px 0; }

/* ---------------------------------------------------------------- profile & account */
.profile-head { max-width: var(--read); margin: 0 auto; padding: 4px var(--gr) 0 var(--gl); }
.profile-id { display: flex; gap: 18px; align-items: center; }
.monogram { width: 92px; height: 92px; border-radius: 50%; background: var(--wine); color: var(--ivory); display: grid; place-items: center; font: 400 34px var(--serif); flex-shrink: 0; }
.profile-name { font: 400 28px/1.15 var(--serif); margin: 0; overflow-wrap: anywhere; }
.profile-role { font-family: var(--serif); color: var(--muted); }
.profile-loc { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.profile-bio { font: italic 400 16px/1.5 var(--serif); margin: 14px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0; }
.stats > div { display: flex; flex-direction: column-reverse; align-items: center; border-right: 1px solid var(--rule); }
.stats > div:last-child { border-right: 0; }
.stats dd { margin: 0; font: 400 21px var(--serif); font-variant-numeric: tabular-nums; }
.stats dt { font-size: 12px; color: var(--muted); text-align: center; }
.profile-action { margin: 4px 0 8px; }
.status-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0 auto; padding: 4px var(--gr) 0 var(--gl); max-width: var(--read); width: 100%; text-align: left; }
.status-line.warn { color: var(--warn); }
.portfolio { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.portfolio-cap { padding: 8px var(--gr) 14px var(--gl); }
.portfolio-cap .title-btn { font: 400 18px var(--serif); }
.meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.meta-row .hearts { display: inline-flex; align-items: center; gap: 3px; }
.meta-row .link-btn { min-height: 30px; font-size: 12.5px; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 var(--gr) 0 var(--gl); max-width: var(--read); margin: 0 auto; }
.mini-watch { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.mini-watch .brand { font-size: 10.5px; letter-spacing: .22em; color: var(--muted); display: block; }
.mini-watch .ph { aspect-ratio: .9; display: grid; place-items: center; background: var(--field); }
.signin .google { gap: 10px; }
.g { font: 700 17px var(--sans); color: #4285F4; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.alt-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; }
.recovery-code { font: 600 19px/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; background: var(--field); border: 1px dashed var(--oxblood); border-radius: 8px; padding: 14px; text-align: center; overflow-wrap: anywhere; white-space: normal; }
.sync-state { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 10px; background: #171D1C; margin: 8px 0 12px; }
.sync-state div { display: flex; flex-direction: column; }
.sync-state small { color: var(--muted); }
.sync-state.ok { background: #16241B; color: var(--green); }
.sync-state.warn { background: #2A2016; color: var(--warn); }
.sync-state strong { color: var(--ink); }
.outbox, .import-jobs { list-style: none; padding: 0; margin: 0; }
.ob, .import-jobs li { border-bottom: 1px solid var(--rule); }
.ob-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; min-height: 52px; }
.ob-op { font: 500 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }
.ob-label { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-state { font-size: 12px; color: var(--muted); }
.ob-state.error, .ob-state.conflict { color: var(--warn); font-weight: 500; }
.ob-body { padding: 0 0 12px; }
.diff { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.diff th, .diff td { border-bottom: 1px solid var(--rule); padding: 6px 4px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.import-cards { font-size: 13.5px; color: var(--muted); padding-left: 20px; }
.import-progress p { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
code { font-size: .9em; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- component picker */
.component-pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; text-align: left; font: 15.5px var(--serif); color: var(--ink); }
.component-pick.is-empty .cp-text { color: var(--muted); font-family: var(--sans); font-size: 14.5px; }
.component-pick .cp-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--brass); background: rgba(208,182,148,.1); flex-shrink: 0; }
.component-pick .cp-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.component-pick > svg:last-child { color: var(--muted); }
.ann-form .component-pick { border: 1px solid #2A3231; border-radius: 8px; padding: 4px 10px; background: #1A2120; }
.component-sheet { display: flex; flex-direction: column; }
.cs-head { position: sticky; top: -6px; z-index: 2; padding-bottom: 6px; background: #161C1B; }
.cs-search { display: flex; align-items: center; gap: 8px; border: 1px solid #2A3231; border-radius: 22px; padding: 0 14px; min-height: 42px; color: var(--ivory-muted); background: #1A2120; }
.cs-search input { flex: 1; border: 0; background: none; outline: none; color: var(--ivory); font-size: 16px; min-width: 0; }
.cs-list { list-style: none; margin: 0; padding: 0; }
.cs-group { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ivory-muted); padding: 14px 6px 4px; }
.cs-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 4px 6px; border-radius: 10px; text-align: left; font-size: 15.5px; color: var(--ivory); }
.cs-row span:nth-child(2) { flex: 1; }
.cs-row:hover { background: rgba(243,238,229,.05); }
.cs-row.on { color: var(--brass); }
.cs-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--brass); background: rgba(208,182,148,.09); flex-shrink: 0; }
.cs-own { color: var(--brass); }
.cs-clear { color: var(--ivory-muted); }
.cs-ownform { display: flex; gap: 8px; margin: 6px 0; }
.cs-ownform input { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid #2A3231; background: #1A2120; color: var(--ivory); padding: 0 12px; font-size: 16px; }

.cs-tabs { display: flex; flex-wrap: wrap; gap: 6px 5px; margin: 10px 0 4px; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid #2A3231; color: var(--ivory-muted); font: 500 12.5px var(--sans); white-space: nowrap; }
.cs-tab svg { color: var(--brass); }
.cs-tab.on { background: var(--brass); border-color: var(--brass); color: var(--charcoal); }
.cs-tab.on svg { color: var(--charcoal); }

/* journal: swipe sideways between stages */
.chapter.from-right { animation: chapterIn .22s ease-out; --from: 28px; }
.chapter.from-left { animation: chapterIn .22s ease-out; --from: -28px; }
@keyframes chapterIn { from { transform: translateX(var(--from)); opacity: .3; } }

.action-row { display: grid; grid-template-columns: minmax(104px, 34%) 1fr; align-items: center; gap: 10px; border-bottom: 1px solid var(--rule); margin: -2px 0 10px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; margin-top: 4px; }

/* four-stage mini track (feed, post job card) */
.stage-mini { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #E6DDD0; }
.sm-track { display: inline-flex; align-items: center; }
.sm-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #6E675D; box-sizing: border-box; }
.sm-dot + .sm-dot { margin-left: 9px; }
.sm-dot + .sm-dot::before { content: ''; position: absolute; right: calc(100% + 1.5px); top: 50%; width: 9px; height: 1.5px; margin-top: -0.75px; background: #6E675D; }
.sm-dot.done { background: var(--copper); border-color: var(--copper); }
.sm-dot.done + .sm-dot::before { background: var(--copper); }
.sm-dot.on { width: 10px; height: 10px; background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 169, 110, .22); }
.paper-page .stage-mini { color: var(--ink-muted, #6b645a); }
/* job link card under a post */
.job-card { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rule, #d8d0c2); background: transparent; text-align: left; color: inherit; }
.job-card .jc-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(201, 169, 110, .16); color: var(--brass); }
.job-card .jc-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-card strong { font: 600 15px var(--sans); }
.job-card small { color: var(--ink-muted, #6b645a); font-size: 12.5px; }

.ep-photo { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.ep-photo-actions { display: flex; align-items: center; gap: 14px; }
.ep-photo .btn.disabled { opacity: .6; pointer-events: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.monogram.photo { padding: 0; overflow: hidden; }

/* privacy icon (closed eye: only you · open eye: members · globe: everyone) */
.priv-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -5px -4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted, #8a8174); vertical-align: middle; flex: 0 0 auto; cursor: pointer; }
.priv-ic.public { color: var(--brass); }
.priv-ic.members { color: #7FB0E0; }
.priv-ic.inherited { opacity: .75; }
.priv-ic:hover, .priv-ic:focus-visible { background: rgba(201, 169, 110, .14); }
.section-h .priv-ic, .sub-h .priv-ic { margin-left: 6px; }
.privacy-sheet { padding: 4px 4px 12px; }
.privacy-sheet .sheet-title { margin-bottom: 8px; }
.priv-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; }
button.priv-row:hover { background: rgba(201, 169, 110, .1); }
.priv-row.on { color: var(--brass); }
.priv-row-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(201, 169, 110, .14); color: var(--brass); flex: 0 0 auto; }
.priv-row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.priv-row-text strong { font: 600 15px var(--sans); }
.priv-row-text small { font-size: 13px; color: var(--ink-muted, #8a8174); }
.priv-row.on .priv-row-text small { color: inherit; opacity: .8; }

.title-priv { display: flex; align-items: center; gap: 8px; }
.title-priv .title-input { flex: 1; min-width: 0; }
.priv-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule, #d8d0c2); margin-bottom: 12px; }
.priv-line .priv-ic { margin: 0; width: 34px; height: 34px; }
.post-flag.icon-only { padding: 2px; }

/* journal cards: each entry is its own card, not a feed post */
.jcard { display: flex; flex-direction: column; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: 16px; background: var(--panel); overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 18px rgba(0, 0, 0, .22); transition: transform .12s ease, border-color .12s ease; }
.jcard:hover { border-color: #3A4442; }
.jcard:active { transform: scale(.99); }
.jcard-photo { position: relative; }
.jcard-photo .photo, .jcard-photo img { border-radius: 0; }
.jcard-count { position: absolute; right: 10px; bottom: 10px; pointer-events: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px; background: rgba(12, 16, 16, .72); color: var(--ivory); font-size: 12px; }
.jcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.jcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.jcard-meta .priv-ic { margin-left: auto; }
.jcard-time { color: var(--muted); }
.type-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 10px; font: 600 12px var(--sans); letter-spacing: .02em; background: rgba(208, 182, 148, .14); color: var(--brass); }
.type-chip.fault { background: rgba(229, 138, 123, .15); color: var(--danger-ink); }
.type-chip.action { background: rgba(141, 184, 152, .15); color: var(--green); }
.type-chip.test { background: rgba(127, 176, 224, .15); color: #7FB0E0; }
.jcard-title { margin: 0; font: 600 18px/1.3 var(--serif); color: var(--ink); }
.jcard-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink); }
.jcard-facts span { display: inline-flex; align-items: center; gap: 6px; }
.jcard-facts svg { color: var(--brass); }
.jcard-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jcard .readings { margin: 2px 0 0; }
.jcard-compare { margin: 0; display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }

/* the job-information button sits on the stage line: watch symbol level with the dots, label level with theirs */
.chapterbar { align-items: start; }
.chap-btn { flex-direction: column; justify-content: flex-start; gap: 3px; min-height: 44px; padding: 3px 8px 0 0; font-size: 12px; }
.chap-btn svg { color: var(--brass); }
.chapterbar > .icon-btn { margin-top: -7px; }

.jcard-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.jcard-strip::-webkit-scrollbar { display: none; }
.jcard-slide { flex: 0 0 100%; scroll-snap-align: start; }
.jcard-facts { align-items: center; }
.jcard-facts .jcard-arrow { color: var(--muted); margin: 0 -6px; }

/* My Bench: each job is a card */
.bjobs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.bjob { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 16px; background: var(--panel); overflow: hidden; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); transition: border-color .12s ease, transform .12s ease; }
.bjob:hover { border-color: #3A4442; }
.bjob:active { transform: scale(.99); }
.bjob-ph { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--field); color: var(--brass); }
.bjob-body { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.bjob-head { display: flex; align-items: center; gap: 8px; }
.bjob-title { flex: 1; min-width: 0; font: 600 18px/1.3 var(--serif); color: var(--ink); }
.bjob .stagetrack { margin-top: 4px; }
/* the card has room for the full stage names */
.bjob .stagetrack.compact { width: 100%; max-width: 300px; }
/* My Bench: header, tabs and the grid of jobs share one centred column, wider than reading pages so wide screens get
   several cards a row */
.bench { --bench-w: 1040px; }
.bench .masthead, .bench .ul-tabs.bench-tabs { max-width: calc(var(--bench-w) + 40px); margin-left: auto; margin-right: auto; }
.bench .bjobs { max-width: calc(var(--bench-w) + 40px); margin: 12px auto 0; padding: 0 var(--gr) 24px var(--gl); }

/* the card note: a filled field below the selections, underline turns brass while typing */
.body-edit { margin-top: 12px; padding: 12px 14px; border-radius: 6px 6px 0 0; background: transparent; border-bottom: 2px solid transparent; min-height: 4.2em; }
.body-edit:focus { background: rgba(208, 182, 148, .08); border-bottom: 2px solid var(--brass); outline: none; }

/* add card: the card types are round buttons, like the gallery and camera buttons */
.add-card-types { display: flex; justify-content: space-evenly; gap: 4px; margin-top: 14px; grid-template-columns: none; }
.add-type { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; border-radius: 12px; background: none; }
.add-type .round-btn.big { width: 54px; height: 54px; pointer-events: none; }
.add-type-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.add-type:active .round-btn { transform: scale(.96); }
/* type chooser: long labels shrink rather than being cut off */
.type-chooser button { padding-left: 1px; padding-right: 1px; letter-spacing: 0; }
.type-chooser button span { white-space: nowrap; font-size: min(12.5px, 3.2vw); }


.save-row { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 18px; }
.save-row .btn { width: 100%; min-height: 50px; }
.cancel-card { background: transparent; border: 1px solid var(--rule); color: var(--muted); }

/* stage indicator: filled = has cards; the tab being viewed has a ring (no shading); Watch tab first on the job */
.stage .dot { border-color: #59615E; }
.stage .dot.on { background: var(--brass); border-color: var(--brass); }
.stage.has .stage-label { color: var(--brass); }
.stage.viewing .stage-label { font-weight: 700; color: var(--ink); }
.stage.viewing.has .stage-label { color: var(--brass); }
.stage .dot.ring { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--brass); }
.stage .dot.on.ring, .stage .dot.cur { background: var(--brass); border-color: var(--brass); }
.stagetrack.with-watch { grid-template-columns: repeat(5, 1fr); }
.stagetrack.with-watch .stagetrack-line { left: 10%; right: 10%; }
.stage .dot.watch { width: 24px; height: 24px; margin-top: -3px; border: 0; background: var(--paper); color: var(--muted); display: grid; place-items: center; }
.stage .dot.watch.ring { width: 22px; height: 22px; margin-top: -2px; color: var(--brass); }
.stage.watch-tab.viewing .stage-label { color: var(--brass); }

.info.embedded .info-state { display: flex; justify-content: flex-end; margin: -4px 0 4px; }
.info.embedded .reading { padding: 0; }

/* feed mini track: filled = has cards, ring = this post's stage */
.sm-dot.done { background: var(--brass); border-color: var(--brass); }
.sm-dot + .sm-dot::before { background: #6E675D !important; }
.sm-dot.on { width: 7px; height: 7px; background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 2px var(--midnight), 0 0 0 3.2px var(--brass); }

/* selection lists with icons */
.chip svg { flex: 0 0 auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.pick-select { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 2px; background: none; border: 0; color: var(--ink); font: 400 16px var(--serif); text-align: left; }
.pick-select .ps-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(208,182,148,.1); color: var(--brass); flex: 0 0 auto; }
.pick-select .ps-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-select.is-empty .ps-text { color: var(--muted); font-family: var(--sans); font-size: 14px; }
.pick-select > svg:last-child { color: var(--muted); }

.unit-pick { flex: 0 0 auto; min-width: 92px; }
.unit-pick .pick-select { font: 400 14px var(--sans); min-height: 40px; gap: 6px; }
.unit-pick .pick-select .ps-icon { width: 24px; height: 24px; }
.checklist .pick-select { font-size: 14px; font-family: var(--sans); min-height: 36px; }

/* Watch tab: the watch's photograph above its details */
.ji-cover { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 12px; overflow: hidden; margin: 6px 0 14px; cursor: zoom-in; }
.ji-cover.empty { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border: 1px dashed var(--rule); cursor: default; color: var(--muted); }
.ji-photo-row { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; }
.ji-photo-row > span { flex: 1; }
.danger-zone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }
