/* Phone surfaces: technician (tech/) and subcontractor (trade/) share this file. */

/* Headers */
.app-head { padding: 6px var(--app-gutter) var(--s-3); display: grid; gap: var(--s-2); }
.app-head .top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 32px; }
.app-title { font-size: 30px; line-height: 1.05; letter-spacing: -0.015em; }
.appbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 48px; padding: 0 8px; position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg); }
.appbar h1, .appbar .t { font-size: var(--t-16); text-align: center; font-variation-settings: "wdth" 112; font-family: var(--font-display); font-weight: 600; }
.appbar .sub { display: block; font-family: var(--font-body); font-variation-settings: "wdth" 100; font-weight: 400; font-size: var(--t-12); color: var(--muted); }
.appbar a, .appbar button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); border-radius: var(--r-ctl); text-decoration: none; }
.appbar.scrolled { border-bottom: var(--rule); }

.section-h { display: flex; align-items: baseline; justify-content: space-between; padding: var(--s-5) var(--app-gutter) var(--s-2); }
.section-h h2 { font-size: var(--t-15); font-variation-settings: "wdth" 112; }
.section-h a { font-size: var(--t-13); color: var(--muted); text-decoration: none; }

/* Jobs */
.now { margin: var(--s-2) var(--app-gutter) 0; border-radius: var(--r-lg); overflow: hidden; background: var(--drench); color: var(--on-drench); }
.now .pic { position: relative; height: 128px; }
.now .pic img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.now .pic .tag { position: absolute; left: 14px; top: 12px; font-family: var(--font-mono); font-size: 11px; padding: 3px 7px; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); }
.now .body { padding: var(--s-4); display: grid; gap: var(--s-3); }
.now h3 { font-size: 22px; }
.now .muted { color: var(--on-drench-muted); }
.now .ruler { background-image: repeating-linear-gradient(90deg, var(--drench-line) 0 1px, transparent 1px 8px); }
.now .btn:not(.primary) { background: transparent; color: var(--on-drench); border-color: var(--drench-line); }

.job { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--app-gutter); text-decoration: none; color: inherit; min-height: 64px; }
.job .when { font-family: var(--font-mono); font-size: var(--t-14); font-variant-numeric: tabular-nums; }
.job .when small { display: block; font-size: 10px; color: var(--muted); }
.job h3 { font-family: var(--font-body); font-variation-settings: "wdth" 100; font-size: var(--t-15); font-weight: 600; letter-spacing: 0; }
.job p { font-size: var(--t-13); color: var(--muted); }
.list-rule > * + * { border-top: var(--rule); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--app-gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 12px; border-radius: var(--r-full); border: var(--bw) solid var(--line-strong); background: var(--bg);
  font-size: var(--t-13); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-family: var(--font-mono); font-size: 11px; opacity: .7; }

.sticky-foot { position: sticky; bottom: 0; margin-top: auto; padding: var(--s-3) var(--app-gutter); background: var(--bg); border-top: var(--rule); display: flex; gap: var(--s-2); z-index: var(--z-sticky); }
.sticky-foot .btn { flex: 1; }

/* Camera */
.cam-page .phone { background: #0d0c0d; color: #fff; }
.cam-page .phone-status { color: #fff; }
.cam { position: relative; flex: 1; display: flex; flex-direction: column; background: #0d0c0d; color: #fff; min-height: 0; }
.cam-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px 10px; }
.cam-top button, .cam-top a { min-width: 44px; height: 44px; display: inline-grid; grid-auto-flow: column; gap: 6px; place-items: center; place-content: center; padding: 0 10px; border: 0; border-radius: var(--r-full);
  background: oklch(1 0 0 / .12); color: #fff; font-size: var(--t-13); font-weight: 500; text-decoration: none; }
.vf2 { position: relative; flex: 1; margin: 0 10px; border-radius: 14px; overflow: hidden; background: #222; touch-action: none; }
.vf2 > img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.vf2.live > img { animation: drift 9s var(--ease) infinite alternate; }
@keyframes drift { from { transform: scale(1.06) translate(-1%, 0); } to { transform: scale(1.1) translate(1.2%, -1%); } }
.vf2 video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf2 .reticle { left: calc(50% - 60px); top: calc(44% - 60px); }
.vf2 .hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; pointer-events: none; }
.vf2 .hud span { background: oklch(0.15 0.01 358 / .6); padding: 4px 8px; border-radius: var(--r-ctl); }
.vf2 .tilt { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 120px; height: 2px; background: oklch(1 0 0 / .5); pointer-events: none; transition: transform var(--dur-2) var(--ease); }
.vf2 .tilt.level { background: var(--laser); }
.vf2 .flashpop { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.vf2 .flashpop.go { animation: flashpop .32s var(--ease) both; }
@keyframes flashpop { 0% { opacity: .9; } 100% { opacity: 0; } }
.vf2 canvas.draw, .vf2 svg.mk { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 22px 18px; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; padding: 0; }
.shutter::after { content: ''; width: 60px; height: 60px; border-radius: 50%; background: var(--primary); transition: transform var(--dur-1) var(--ease); }
.shutter:active::after { transform: scale(.88); }
.burst { justify-self: start; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; border: 2px solid #fff; position: relative; background: #333; padding: 0; }
.burst img { width: 100%; height: 100%; object-fit: cover; }
.burst b { position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--primary); font-size: 11px; display: grid; place-items: center; }
.cam-side { justify-self: end; width: 48px; height: 48px; border-radius: 50%; border: 0; background: oklch(1 0 0 / .12); color: #fff; display: grid; place-items: center; }
.mk-tools { display: flex; justify-content: center; gap: 6px; padding: 14px 8px 18px; }
.mk-tools button { height: 44px; min-width: 44px; justify-content: center; padding: 0 11px; border-radius: var(--r-full); border: 0; background: oklch(1 0 0 / .12); color: #fff; font-size: var(--t-14); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.mk-tools button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.mk-tools .go { background: var(--primary); color: var(--on-primary); }

/* Tag sheet */
.ai { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: var(--s-3); border-radius: var(--r-card); background: var(--primary-soft); color: var(--ink); font-size: var(--t-14); }
.ai .ico { color: var(--primary-strong); grid-row: span 2; margin-top: 2px; }
.ai .why { font-size: var(--t-12); color: var(--ink-2); }
.ai .acts { grid-column: 2; display: flex; gap: 6px; margin-top: 6px; }
.form-stack { display: grid; gap: var(--s-4); }
.plan.mini { aspect-ratio: 4 / 3; cursor: crosshair; }

/* Snag detail */
.hero-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo svg.mk { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-card); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--cut, 50%)); }
.compare .line { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px oklch(0.2 0.01 358 / .3); pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .lbl { position: absolute; bottom: 8px; font-family: var(--font-mono); font-size: 11px; color: #fff; background: oklch(0.15 0.01 358 / .6); padding: 3px 7px; border-radius: var(--r-ctl); }
.timeline { display: grid; gap: 0; }
.timeline li { list-style: none; display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding-bottom: 14px; position: relative; font-size: var(--t-14); }
.timeline li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--bg); margin-top: 5px; z-index: 1; }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ink); }
.timeline small { display: block; color: var(--muted); font-size: var(--t-12); }

/* Sync */
.big-level { margin: var(--s-3) var(--app-gutter) 0; padding: var(--s-5) var(--s-4); border-radius: var(--r-lg); background: var(--surface); display: grid; justify-items: center; gap: var(--s-3); text-align: center; }
.big-level .vial { position: relative; width: 220px; height: 44px; border-radius: 22px; background: var(--bg); border: 1.5px solid var(--line-strong); overflow: hidden; }
.big-level .vial::before, .big-level .vial::after { content: ''; position: absolute; top: 6px; bottom: 6px; width: 1.5px; background: var(--ink-2); }
.big-level .vial::before { left: calc(50% - 26px); } .big-level .vial::after { left: calc(50% + 24px); }
.big-level .bubble { position: absolute; top: 9px; left: calc(50% - 20px); width: 40px; height: 24px; border-radius: 12px; background: var(--success);
  transition: transform 1.2s var(--ease-out), background var(--dur-2); }
.big-level.off .bubble { transform: translateX(-66px); background: var(--warning); }
.big-level.busy .bubble { animation: bubble2 1.1s var(--ease) infinite alternate; background: var(--info); }
@keyframes bubble2 { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
.big-level h2 { font-size: 22px; }
.q-item { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--app-gutter); }
.q-item img { width: 44px; height: 44px; border-radius: var(--r-ctl); object-fit: cover; }
.q-item h3 { font-family: var(--font-body); font-variation-settings: "wdth" 100; font-size: var(--t-14); font-weight: 600; letter-spacing: 0; }
.q-item p { font-size: var(--t-12); color: var(--muted); }

/* Login */
.login-pic { position: relative; height: 340px; flex: none; }
.login-pic img { width: 100%; height: 100%; object-fit: cover; }
.login-pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, oklch(0.19 0.01 358 / .15), oklch(0.19 0.01 358 / .0) 40%, var(--bg) 100%); }
.login-pic .wordmark { position: absolute; left: var(--app-gutter); top: 64px; z-index: 1; color: #fff; }
.sso { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: var(--h-touch); border-radius: var(--r-card);
  border: var(--bw-strong) solid var(--line-strong); background: var(--bg); font-size: var(--t-16); font-weight: 500; }
.sso:hover { border-color: var(--ink-2); }
.idp { font-family: "Segoe UI", system-ui, sans-serif; font-variation-settings: normal; }
.idp .acct { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 0; background: none; border-bottom: 1px solid #e5e5e5; text-align: left; min-height: 60px; }
.idp .acct:hover { background: #f3f3f3; }
.coach { display: grid; gap: var(--s-4); }
.coach .step { display: grid; grid-template-columns: 36px 1fr; gap: var(--s-3); align-items: start; }
.coach .step .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); }

/* Profile */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 56px; padding: 0 var(--app-gutter); font-size: var(--t-15); }
.set-row small { display: block; font-size: var(--t-12); color: var(--muted); }
