:root {
  --ink: #16181A;
  --ink-2: #2A2D30;
  --ground: #F3F2EE;
  --card: #FFFFFF;
  --line: #D3D0C8;
  --line-soft: #ECE9E2;
  --muted: #5A5D60;
  --accent: #C2410C;
  --accent-text: #B03A0A;
  --accent-soft: #F2B48F;
  --ok: #2F6B3A;
  --danger: #A12A1E;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'Barlow', system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--accent-text); }
.cond { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-weight: 700; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; background: var(--ground); }

/* header */
.top { background: var(--ink); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.top-row { display: flex; align-items: center; gap: 10px; }
.top h1 { margin: 0; flex: 1; font-size: 28px; line-height: 1.1; }
.top .sub { font-size: 14px; color: #B9BBBD; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 22px; border: none; background: var(--ink-2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.logo-dot { width: 40px; height: 40px; flex: none; border-radius: 20px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* search */
.search { position: relative; }
.search input { width: 100%; min-height: 50px; padding: 0 44px 0 44px; border-radius: 12px; border: none; background: #fff; color: var(--ink); font-size: 17px; }
.search svg { position: absolute; left: 14px; top: 15px; }
.search .clear { position: absolute; right: 4px; top: 3px; width: 44px; height: 44px; border: none; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }

/* chips */
.chips { padding: 12px 16px 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { padding: 8px 16px 6px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* job list */
.list { flex: 1; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.job { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; text-align: left; width: 100%; cursor: pointer; font: inherit; }
.job .thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; background: #D9D6CE; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.job .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.job .name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .addr { font-size: 14px; color: #3A3D40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .small { font-size: 13px; color: var(--muted); }
.job .dist { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.empty { padding: 28px 8px; text-align: center; font-size: 16px; line-height: 1.4; color: var(--muted); }

/* bottom bar */
.bottom { position: sticky; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px; border: none; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* forms */
.form { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; }
.field input { min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 17px; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.msg { padding: 12px; border-radius: 12px; font-size: 15px; line-height: 1.35; }
.msg.error { background: #FBE6E2; color: var(--danger); border: 1px solid #F0BFB6; }
.msg.info { background: var(--card); color: #3A3D40; border: 1px solid var(--line); }

/* sign in */
.signin { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 440px; margin: 0 auto; gap: 18px; }
.signin h1 { margin: 0; font-size: 56px; line-height: 1; }
.signin h1 span { color: var(--accent); }
.signin p { margin: 0; font-size: 17px; color: var(--muted); }

/* menu sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(22, 24, 26, 0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet { width: 100%; max-width: 640px; background: var(--ground); border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet .who { font-size: 15px; color: var(--muted); }

/* placeholder job page */
.coming { margin: 16px; padding: 18px; border-radius: 12px; border: 1.5px dashed #B5B1A8; color: var(--muted); font-size: 16px; line-height: 1.4; text-align: center; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- piece 2: job view ---------- */
.kicker { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 2px; }
.job-title { font-size: 32px; margin: 0; line-height: 1.05; }
.link-btn { align-self: flex-start; min-height: 36px; padding: 0; border: none; background: transparent; color: var(--accent-soft); font-size: 15px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.actions { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.btn.big { min-height: 64px; font-size: 21px; border-radius: 14px; }
.btn.danger { background: var(--danger); }
.chip.text { border: none; background: transparent; color: var(--accent-text); font-weight: 700; margin-left: auto; padding: 0 6px; }
.groups { flex: 1; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 18px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.group-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.group-head span { font-size: 14px; color: var(--muted); }
.group-empty { font-size: 15px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; border: none; padding: 0; background: #D9D6CE; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile img:not([src]) { visibility: hidden; }
.tile.on { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.tile-who { position: absolute; right: 6px; top: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: rgba(22,24,26,0.72); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tile-wait { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 13px; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tile-check { position: absolute; left: 6px; top: 6px; width: 26px; height: 26px; border-radius: 13px; border: 2px solid #fff; background: rgba(22,24,26,0.45); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tile.on .tile-check { background: var(--accent); }
.status { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; min-height: 28px; width: 100%; border: none; background: transparent; text-align: left; padding: 0; font-family: inherit; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--accent-text); }
.status.bad { color: var(--danger); cursor: pointer; text-decoration: underline; }
.select-bar { display: flex; align-items: center; gap: 12px; }
.select-bar span { font-size: 16px; font-weight: 700; white-space: nowrap; }
.select-bar .btn { flex: 1; }
.empty b { color: var(--ink); }

/* sheets, toasts */
.sheet { max-height: 88dvh; overflow-y: auto; }
.sheet-title { margin: 0; font-size: 20px; font-weight: 700; }
.sheet-text { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.4; }
.sheet .btn.secondary { justify-content: flex-start; padding: 0 16px; }
.name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.name-grid .btn.secondary { justify-content: center; }
.field select { min-height: 50px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.toast.error { background: var(--danger); }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 20; background: #0E0F10; color: #fff; display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 12px 12px; }
.viewer-info { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; }
.viewer-info .sub { font-size: 14px; font-weight: 500; color: #B9BBBD; }
.viewer-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.viewer-body img, .viewer-body video { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- camera ---------- */
.cam { position: fixed; inset: 0; background: #0E0F10; color: #fff; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.cam-top { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
.icon-btn.dark { background: #24272A; }
.cam-job { flex: 1; min-width: 0; }
.cam-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-addr { font-size: 14px; color: #B9BBBD; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; }
.pill.dark { background: #24272A; color: #fff; min-height: 44px; }
.pill.accent { background: var(--accent); color: #fff; }
.pill.light { background: #fff; color: #0E0F10; min-height: 48px; padding: 0 20px; font-size: 17px; }
.pill.dark-outline { background: transparent; color: #fff; border: 1px solid #44484C; font-weight: 600; }
.pill.on { background: #3A2418; color: #fff; border: 1px solid var(--accent-soft); }
.cam-saving { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; font-size: 14px; color: #B9BBBD; }
.cam-view { position: relative; flex: 1; min-height: 0; margin: 0 8px; border-radius: 16px; overflow: hidden; background: #2A2620; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-stamp { position: absolute; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 8px; background: rgba(14,15,16,0.7); font-size: 13px; font-weight: 600; line-height: 1.35; }
.cam-stamp span { color: #B9BBBD; font-weight: 500; }
.cam-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 16px; line-height: 1.4; background: rgba(14,15,16,0.85); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camflash 0.25s ease-out; }
@keyframes camflash { from { opacity: 0.8; } to { opacity: 0; } }
.cam-labels { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; overflow-x: auto; font-size: 14px; color: #B9BBBD; }
.cam-modes { display: flex; justify-content: center; gap: 24px; padding: 12px 16px 4px; }
.mode { min-height: 36px; padding: 0 8px; border: none; border-bottom: 2px solid transparent; background: transparent; color: #8E9194; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; font-family: inherit; }
.mode.on { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }
.cam-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; padding: 8px 24px 8px; }
.cam-last { justify-self: start; position: relative; width: 56px; height: 56px; border-radius: 10px; border: 2px solid #fff; background: #3A3631 center / cover no-repeat; padding: 0; cursor: pointer; }
.cam-last span { position: absolute; right: -8px; top: -8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.shutter { justify-self: center; width: 84px; height: 84px; border-radius: 42px; border: 5px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: all 0.15s; }
.shutter:active span { transform: scale(0.9); }
.shutter.video span { background: #D9473A; }
.shutter.rec span { border-radius: 8px; transform: scale(0.55); }
.cam-controls .pill.light { justify-self: end; }
.cam-status { min-height: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 16px calc(16px + env(safe-area-inset-bottom)); font-size: 14px; font-weight: 600; color: var(--accent-soft); text-align: center; }

/* ---------- piece 3: markup ---------- */
.tile-marked { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 12px; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tile-wait + .tile-marked, .tile-marked:has(+ .tile-wait) { left: 36px; }
.viewer-top .pill.dark { min-height: 44px; }
.viewer-pic { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.viewer-pic img { display: block; max-width: 100vw; max-height: calc(100dvh - 90px); object-fit: contain; }
.viewer-marks, .markup-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mk { position: fixed; inset: 0; z-index: 60; background: #0E0F10; color: #fff; display: flex; flex-direction: column; }
.mk-top { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 12px 10px; }
.mk-swatch-btn { width: 44px; height: 44px; border-radius: 22px; border: none; background: #24272A; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mk-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.mk-color { display: block; width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.3); }
.mk-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 0 0 4px; }
.mk-canvas { position: relative; flex: none; }
.mk-canvas img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.mk-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.mk-handle { cursor: grab; }
.mk-pop { position: absolute; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(14,15,16,0.9); z-index: 2; }
.mk-pop button { width: 44px; height: 44px; border-radius: 8px; border: none; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; font-family: Georgia, serif; font-size: 22px; font-weight: 700; cursor: pointer; }
.mk-pop button[hidden] { display: none; }
.mk-tools { width: 56px; flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #1A1C1E; }
.mk-tools button { width: 48px; height: 46px; border-radius: 10px; border: none; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mk-tools button[aria-pressed="true"] { background: var(--accent); }
.mk-t { font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.mk-tray { background: #1A1C1E; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.mk-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mk-row::-webkit-scrollbar { display: none; }
.mk-row .pill { min-height: 38px; font-size: 14px; }
.mk-stickers button { width: 56px; height: 52px; flex: none; border-radius: 10px; border: none; background: #2A2D30; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mk-bottom { display: flex; align-items: center; gap: 12px; }
.mk-hint { flex: 1; font-size: 13px; color: #B9BBBD; }
.mk-bottom .btn { width: auto; padding: 0 28px; }
.mk-colors { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.mk-colors button { aspect-ratio: 1 / 1; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }

/* ---------- piece 4: worksheet ---------- */
.ws .row-2 { margin-top: 2px; }
.ws-top-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #B9BBBD; }
.ws-top-field input { min-height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid #44484C; background: #0E0F10; color: #fff; font-size: 18px; font-weight: 700; font-family: inherit; }
.ws-list { flex: 1; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.ws-card { border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.ws-card.closed { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px; text-align: left; width: 100%; cursor: pointer; font-family: inherit; }
.ws-card.open { border: 2px solid var(--accent); padding: 0 14px 14px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 8px; }
.ws-head { display: flex; align-items: center; gap: 10px; min-height: 52px; border: none; background: transparent; padding: 0; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink); }
.ws-title { font-size: 17px; font-weight: 700; flex: none; }
.ws-sum { flex: 1; min-width: 0; text-align: right; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-close { margin-left: auto; color: var(--accent-text); font-weight: 700; font-size: 15px; }
.ws-done { color: var(--ok); display: flex; flex: none; }
.ws-todo { width: 20px; height: 20px; flex: none; border-radius: 10px; border: 2px solid #B5B1A8; }
.ws-item { display: flex; flex-direction: column; gap: 6px; }
.ws-label { font-size: 15px; font-weight: 700; }
.ws-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.ws-field input, .ws-field textarea, .ws-qty input, .ws-amt input { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; font-family: inherit; }
.ws-field textarea { resize: vertical; }
.ws-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-opt { min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; font-family: inherit; }
.ws-opt[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ws-priced { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.ws-priced-head { display: flex; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 600; }
.ws-hint { font-size: 13px; color: var(--muted); font-weight: 500; }
.ws-hint.bad { color: var(--danger); font-weight: 600; }
.ws-mode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ws-mode button { min-height: 42px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ws-mode button.on.price { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.ws-mode button.on.included { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 700; }
.ws-mode button.on.na { background: var(--muted); color: #fff; border-color: var(--muted); font-weight: 700; }
.ws-qty, .ws-amt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ws-qty input, .ws-amt input { width: 110px; }
.ws-info { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); font-style: italic; }
.ws-row { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--ground); }
.ws-row-head { display: flex; justify-content: space-between; align-items: center; }
.ws-remove { border: none; background: transparent; color: var(--danger); font-weight: 600; font-size: 14px; min-height: 36px; cursor: pointer; font-family: inherit; }
.ws-add { min-height: 44px; border-radius: 8px; border: 1.5px dashed #B5B1A8; background: transparent; color: var(--accent-text); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-family: inherit; }
.ws-extra { padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.ws-bottom { display: flex; flex-direction: column; gap: 10px; }
.ws-total { display: flex; align-items: baseline; justify-content: space-between; }
.ws-total span { font-size: 14px; font-weight: 600; color: var(--muted); }
.ws-total b { font-size: 30px; line-height: 1; }

/* slide to send */
.slider { position: relative; height: 60px; border-radius: 30px; border: 2px solid var(--accent); background: #fff; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.slider-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 52px; font-size: 17px; font-weight: 700; color: var(--accent-text); pointer-events: none; }
.slider-knob { position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; border-radius: 24px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: grab; z-index: 1; }
.slider.sent .slider-text { color: #fff; }
.slider.sent .slider-knob { background: #fff; color: var(--accent); }
.slider:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- piece 5: work notes ---------- */
.row-act { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; }
.row-act .btn { min-height: 52px; font-size: 15px; padding: 0 6px; gap: 6px; }
.nt-who { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.nt-avatar { width: 40px; height: 40px; flex: none; border-radius: 20px; background: var(--ink-2); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.form textarea { min-height: 180px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 17px; line-height: 1.4; resize: vertical; }
.nt-head { display: flex; justify-content: space-between; align-items: baseline; }
.nt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nt-tile { aspect-ratio: 1 / 1; border-radius: 8px; background: #D9D6CE center / cover no-repeat; }
.nt-tile.more { background: var(--ink-2); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.nt-lock { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: #FBEDE4; border: 1px solid #F0C9B0; color: var(--accent-text); font-size: 15px; line-height: 1.35; }
.nt-lock span { color: var(--ink); }
.notes { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.notes h2 { margin: 0; font-size: 18px; font-weight: 700; }
.note { border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.note summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; cursor: pointer; list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note-who { width: 30px; height: 30px; flex: none; border-radius: 15px; background: var(--ink-2); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.note-first { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.note-body { padding: 0 12px 12px 52px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }

/* ---------- piece 6: crew ---------- */
.crew-pill { flex: none; min-height: 44px; background: transparent; color: #fff; border: 1px solid #4A4E52; font-weight: 600; }
.cr-head { display: flex; align-items: baseline; justify-content: space-between; }
.cr-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.cr-list { border-radius: 12px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.cr-row { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); width: 100%; background: transparent; border-left: none; border-right: none; border-top: none; text-align: left; font-family: inherit; color: var(--ink); }
.cr-row:last-child { border-bottom: none; }
.cr-btn { cursor: pointer; }
.cr-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 17px; }
.cr-avatar { width: 40px; height: 40px; flex: none; border-radius: 20px; background: var(--ink-2); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cr-avatar.off { background: #B5B1A8; }
.switch { width: 60px; height: 36px; flex: none; border-radius: 18px; border: none; padding: 3px; background: #B5B1A8; display: flex; justify-content: flex-start; cursor: pointer; transition: background 0.15s; }
.switch span { width: 30px; height: 30px; border-radius: 15px; background: #fff; display: block; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch[aria-checked="true"] { background: var(--ok); justify-content: flex-end; }
.form input#crfind { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; }

/* ---------- piece 7: settings ---------- */
.logo-dot { overflow: hidden; }
.logo-dot img { width: 100%; height: 100%; object-fit: contain; }
.st-sec { display: flex; flex-direction: column; gap: 6px; }
.st-sec h2 { margin: 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.st-card { border-radius: 12px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.st-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px; border: none; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); font-family: inherit; text-align: left; cursor: pointer; }
.st-row:last-child { border-bottom: none; }
.st-label { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.st-value { font-size: 15px; color: var(--muted); text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-value.accent { color: var(--accent-text); font-weight: 700; }
.st-logo { width: 48px; height: 48px; flex: none; border-radius: 24px; border: 1px solid var(--line); background: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.st-logo img { width: 100%; height: 100%; object-fit: contain; }
.st-spec { border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 12px 14px; font-size: 15px; }
.st-spec summary { font-weight: 700; cursor: pointer; }
.st-spec ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.5; }
.st-stickers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-sticker { aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--line); background: #6E6A63; padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--accent-text); }
.st-sticker img { width: 100%; height: 100%; object-fit: contain; }
.st-sticker.add { background: transparent; border: 1.5px dashed #B5B1A8; }
.link-btn.dark { color: var(--accent-text); }
.pr-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 14px; border-bottom: 1px solid var(--line-soft); }
.pr-row:last-child { border-bottom: none; }
.pr-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; display: flex; flex-direction: column; }
.pr-price { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.pr-price input { width: 90px; min-height: 42px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 16px; font-family: inherit; text-align: right; }
.btn.secondary.danger-text { color: var(--danger); }
.mk-tabs { gap: 4px; }
.mk-tab { min-height: 34px; padding: 0 10px; border: none; border-bottom: 2px solid transparent; background: transparent; color: #B9BBBD; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.mk-tab[aria-pressed="true"] { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }
.mk-stickers img { object-fit: contain; }
.note-send { padding: 0 12px 12px; }
