html { color-scheme: light }
html[data-theme=dark] { color-scheme:dark }
body { margin:0; font:400 16px/1.5 Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; background:var(--page); color:var(--on-surface); word-break:keep-all; overflow-wrap:anywhere; font-variant-numeric:tabular-nums }
#shell { width:min(100%, 36rem); height:100vh; height:100dvh; margin:auto; display:flex; flex-direction:column; background:var(--page) }
#back { justify-self:start; align-self:flex-start; color:var(--muted); padding-inline:4px; font-size:.875rem }
main { flex:1; min-height:0; overflow-y:auto; padding:24px 16px; overscroll-behavior:contain; scrollbar-gutter:auto }
h1,h2,h3,p,dl,dd { margin:0 }
h1,h2,h3,strong,b { font-weight:600 }
h1 { font-size:clamp(1.65rem,6vw,2rem); line-height:1.25; letter-spacing:-.05em }
h2 { font-size:1.15rem; letter-spacing:-.035em }
h3 { font-size:1rem }
section, .stack, label.field { display:grid; gap:12px; min-width:0 }
section + section { margin-top:24px }
.view { display:grid; gap:24px; animation:arrive var(--motion-control) var(--ease-enter) }
.view > section + section { margin:0 }
@keyframes arrive { from {opacity:.4; transform:translateY(4px)} }
footer { flex:none; background:var(--surface); border-top:1px solid var(--border); padding:8px 16px max(8px,env(safe-area-inset-bottom)); display:grid; gap:8px }
footer:empty, #alerts:empty, #errors:empty, div:empty:not(.skeleton):not(.progress-track) { display:none }
nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px }
nav button { border:0; color:var(--muted); font-size:.875rem; background:transparent; padding:0 4px }
nav button[aria-current=page], button[aria-pressed=true] { color:var(--on-surface); background:var(--surface-selected); font-weight:600 }
#alerts, #errors { padding:8px 16px; max-height:25dvh; overflow:auto }
#alerts { font-size:.9375rem }
.muted, dt, .eyebrow { color:var(--muted) }
.eyebrow { font-size:.875rem; font-weight:500 }
.title { display:grid; gap:4px }
.card { display:grid; gap:12px; background:var(--card-face); border:0 }
.button:any-link { color:var(--on-surface) }
.button.primary:any-link { color:var(--on-emphasis) }
.row,.choices { display:flex; align-items:center; flex-wrap:wrap; gap:8px }
.choices > *, .equal > * { flex:1 1 auto }
.metric { font-size:clamp(1.4rem,6vw,2rem); font-weight:600; letter-spacing:-.04em }
.today-summary,.suggestions { display:flex; gap:4px; overflow-x:auto }
.today-summary button,.suggestions button { flex:none }
.today-summary { justify-content:space-between }
.today-summary button { font-size:clamp(.78rem,3.4vw,.94rem); padding-inline:2px }
.step-bars { display:flex; gap:4px }
.step-bars i { background:var(--border); flex:1; height:4px; border-radius:2px }
.step-bars i.on { background:var(--on-surface) }
.field > span, .field-label, summary { font-weight:500; white-space:nowrap }
summary { padding:12px 0 }
details[open] > summary { margin-bottom:8px }
textarea { resize:vertical }
.big-input { font-size:clamp(1.6rem,8vw,2.25rem) !important; text-align:right; font-weight:600; letter-spacing:-.04em }
.amount-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px }
.amount-summary { min-width:0; font-size:.8125rem; line-height:1.25 }
.amount-summary strong,.amount-summary span { display:inline-block }
.empty { padding:24px 16px; border:1px dashed var(--control-border); border-radius:8px; text-align:center; color:var(--muted) }
.review-row { padding:8px 0; border-bottom:1px solid var(--border); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center }
.review-row small { display:block; color:var(--muted) }
.thumbs { display:flex; gap:8px; flex-wrap:wrap }
.thumbs img { display:block; width:80px; height:80px; object-fit:cover; background:var(--surface-selected); border-radius:8px }
.file-picker { position:relative; overflow:hidden }
.file-picker input { position:absolute; inset:0; opacity:0; cursor:pointer }
.file-picker:focus-within { outline:2px solid var(--focus) }
button.pref { max-width:100%; overflow:hidden; display:block; text-align:start; text-overflow:ellipsis }
.amount-panel,.material-value { text-align:right }
.amount-display { display:block; font-size:clamp(1.75rem,8vw,2.75rem); letter-spacing:-.04em; line-height:1.2; white-space:nowrap }
.amount-reading { color:var(--muted); font-weight:500 }
.disclosure { display:block; overflow:hidden; text-overflow:ellipsis; background:var(--card-face); border:0; font-size:.875rem; padding-inline:4px }
.form-row { display:grid; grid-template-columns:max-content minmax(0,1fr); width:100%; min-height:56px; text-align:left }
.form-row > span { display:block; overflow:hidden; text-overflow:ellipsis; text-align:right }
.view,.card,.stack,section { grid-template-columns:minmax(0,1fr) }
.thumbs .stack { width:min(100%,9rem) }
.thumbs img { max-width:100% }
.sheet .field { margin:0 }
.notice .row { margin-top:4px }
.notice button { margin:4px }
.primary[aria-busy=true]::after { content:'…' }
@media (max-height:540px) { main { padding-block:12px } footer { max-height:40dvh; overflow:auto } }
@media (min-width:600px) { #shell { border-inline:1px solid var(--border) } main { padding:32px 24px } }

.card.job-card {
  position:relative; display:grid; grid-template-columns:4.25rem minmax(0,1fr) auto;
  padding:8px; gap:8px; align-items:start;
}
.job-time { font-size:1rem; padding-block:4px; white-space:nowrap }
.job-copy { min-width:0 }
.job-copy small,.open-job { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.job-copy small { color:var(--muted); line-height:20px }
.open-job { width:100%; min-width:0; min-height:28px; text-align:left; font-weight:700; border:0; padding:0; background:transparent }
.open-job::after { content:''; position:absolute; inset:0; border-radius:12px }
.open-job:active { transform:none }
.job-actions { display:grid; justify-items:end; align-content:space-between; gap:4px }
.job-actions .phone { position:relative; z-index:1; padding-inline:8px }
.ended .open-job,.ended .job-time { color:var(--muted) }
.detail-row { display:grid; grid-template-columns:3.5rem minmax(0,1fr) auto; align-items:center; gap:8px; min-height:48px; border-bottom:1px solid var(--border) }
.detail-row dt { font-size:.875rem }
.confirm-actions,.amount-options,.five-options,.six-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px }
.confirm-actions button { min-height:48px }
.five-options { grid-template-columns:repeat(5,minmax(0,1fr)) }
.six-options { grid-template-columns:repeat(6,minmax(0,1fr)); gap:0 }
.five-options button,.six-options button { min-width:0; padding:0 }
.paste-field { position:relative }
.paste-field textarea { padding-bottom:48px }
.paste-field button { position:absolute; right:4px; bottom:1px; font-size:.875rem }
.finish-heading .step-header { height:32px; align-items:center }
.finish-heading h1 { flex:1; font-size:1.06rem; white-space:nowrap }
.finish-heading #back { position:relative; align-self:center; min-height:32px }
.finish-heading #back::after { content:''; position:absolute; inset:-8px 0 }
.finish-heading .step-bars i { height:2px }
main:has(.amount-stage) { padding:4px 12px; overflow:hidden }
.amount-stage { display:flex; flex-direction:column; height:100%; gap:4px }
.amount-stage .amount-panel { flex:none }
.amount-panel .amount-display { font-size:2rem; line-height:38px }
.amount-panel .amount-reading { display:block; line-height:20px; font-size:.875rem }
.fee-line { display:flex; justify-content:space-between; align-items:center; gap:4px; text-align:left }
.fee-line button { flex:none; min-height:48px; font-size:.8125rem; padding:0 4px; text-decoration:underline }
.amount-scroll { min-height:0; min-width:0; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:4px }
.amount-scroll > * { flex:none }
.amount-warnings .notice { padding:2px 4px; font-size:.8125rem }
.suggestions button { height:48px; padding-inline:8px; background:transparent; border:0; font-weight:600 }
.suggestions { scrollbar-width:none }
.amount-options button { height:48px }
.keypad { grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px }
.keypad button,.keypad button:nth-last-child(-n+2) { border:0; background:var(--surface-selected); color:var(--on-surface); min-width:0; min-height:52px; padding:0; font-size:22px }
.keypad .wide-key { grid-column:span 2 }
.keypad .unit-key { background:var(--accent-soft); color:var(--accent); font-weight:700 }
.material-value { position:sticky; top:0; background:var(--surface); z-index:1 }

