/* 검수 화면. 상세 화면의 색·글자 크기·간격·배치는 승인된 시안을 따른다. 밝은 화면 하나뿐이다. */
:root {
  --fg: #1d1d1f; --muted: #5f6169; --bg: #f3f4f7; --card: #fff; --line: #dde0e6; --rule: #a9afba;
  --primary: #2457d6; --primary-bg: #eaf0ff; --ok: #1d7a3a; --ok-bg: #e7f4ec;
  --warn: #845200; --warn-bg: #fdf1dc; --err: #b3261e; --err-bg: #fdecea;
  --t-small: 13px; --t-body: 15px; --t-mid: 18px; --t-big: 24px; --t-huge: 30px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* 낱말은 붙여 두되, 제자리보다 긴 낱말(거래처·파일 이름·주소)은 끊는다. 끊지 않으면 화면 전체가 가로로 밀린다. */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: var(--t-body)/1.6 system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; font-size: var(--t-body); }
h1 { font-size: var(--t-big); line-height: 1.3; }
a { color: var(--primary); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { width: 100%; min-height: 34px; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: inherit; font: inherit; line-height: 1.4; }
textarea { display: block; resize: vertical; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.alert { margin: 8px 0; padding: 10px 12px; border-radius: 8px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.error { background: var(--err-bg); color: var(--err); }
.meta, .hint { margin: 0; color: var(--muted); font-size: var(--t-small); }
.empty { margin: 0; color: var(--muted); }
/* 눈에만 안 보인다. 폼의 첫 저장 단추(.enter-save)도 이렇게 감춰야 Enter를 받는다. */
.sr-only, .enter-save { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 머리줄. 아주 넓은 화면에서는 머리줄, 본문, 단추 줄의 양옆이 같이 넓어진다. */
.bar-top, .body, .actions, .home { padding-inline: max(24px, (100% - 1600px) / 2); }
.bar-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { color: inherit; font-weight: 700; text-decoration: none; }
.who { color: var(--muted); font-size: var(--t-small); }
.link { padding: 0; border: 0; background: none; }
.link:hover { text-decoration: underline; }

/* 목록·로그인 */
main { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px; }
main > h1, .card h1 { margin: 8px 0 12px; }
.card { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.narrow { max-width: 420px; margin: 40px auto; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 4px; font-weight: 600; }
label input { padding: 10px 12px; border-radius: 8px; }
/* 목록. 줄 하나가 링크 하나다. 모양은 시안 첫 화면의 .samples와 .tag를 따른다. 꼬리표는 색만이 아니라 글로도 말한다. */
.samples { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--card); list-style: none; }
.samples li + li { border-top: 1px solid var(--line); }
.samples a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 18px; color: inherit; text-decoration: none; }
.samples a:hover { background: var(--bg); }
.samples a:focus-visible { outline-offset: -3px; }
.samples a > :not(.tags) { grid-column: 1; }
.samples .kind { color: var(--muted); font-size: var(--t-small); }
.id { color: var(--muted); font: var(--t-small) ui-monospace, Menlo, monospace; }
.tags { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-end; align-self: center; gap: 4px; }
.tag { padding: 4px 10px; border-radius: 4px; background: var(--ok-bg); color: var(--ok); font-size: var(--t-small); font-weight: 600; white-space: nowrap; }
.tag.err { background: var(--err-bg); color: var(--err); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

/* 상세 화면: 값과 원본을 나란히 두고, 단추 줄은 늘 화면 아래에 있다(내용이 짧아도).
   확인할 것에서 건너가거나 Tab으로 옮겨 간 칸이 위의 탭과 아래 단추 줄에 가리지 않게 그만큼 띄우고 스크롤한다. */
html { scroll-padding-block: 64px 120px; }
main.wide { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); max-width: none; padding: 0; }
.review { display: flex; flex-direction: column; }
.body { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-content: start; align-items: start; gap: 24px; padding-block: 20px 28px; }
.values { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.back { justify-self: start; font-size: var(--t-small); text-decoration: none; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px 16px; }
.head .meta { margin-top: 2px; }
.state { display: inline-block; padding: 4px 10px; border-radius: 4px; background: var(--primary-bg); color: var(--primary); font-size: var(--t-small); font-weight: 600; }
.state.ok { background: var(--ok-bg); color: var(--ok); }
.state.no { background: var(--err-bg); color: var(--err); }
.lead, .values .alert, dl, dd { margin: 0; }
dt { color: var(--muted); font-size: var(--t-small); }

/* 확인할 것. 번호가 그 칸의 번호와 같다. */
.mark { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--err); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.mark.warn { background: var(--warn); }
.mark.fixed { background: none; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.todo { padding: 14px 16px; border-radius: 8px; background: var(--err-bg); }
.todo.warn { background: var(--warn-bg); }
.todo.clear { background: var(--ok-bg); color: var(--ok); }
.todo ol { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.todo li > * { display: flex; align-items: start; gap: 10px; margin-inline: -8px; padding: 8px; border-radius: 6px; color: inherit; text-decoration: none; }
.todo a[href]:hover { background: rgb(179 38 30 / .08); }
.todo .warn a[href]:hover { background: rgb(132 82 0 / .08); }
.what { flex: 1; min-width: 0; }
.what b { display: block; }
.todo .go { color: var(--err); font-size: var(--t-small); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.todo .warn .go { color: var(--warn); }

/* 읽은 값 */
.sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
/* 한 줄에 세 칸이다. 총액이 있는 첫 줄만 다르다: 총액이 먼저 제 글만큼(적어도 한 칸) 차지하고 .wide가 나머지를 쓴다.
   나머지가 한 칸도 안 되면 총액이 다음 줄로 간다. 1px은 아랫줄 칸이 첫 줄로 올라오지 않게 한다. */
.sum { --col: calc((100% - 40px) / 3); display: flex; flex-wrap: wrap; align-items: start; gap: 10px 20px; }
.sum > * { flex: 0 0 var(--col); min-width: 0; }
.sum .wide { flex: 1 0 calc(var(--col) + 1px); }
.sum .wide .cell { font-size: var(--t-mid); font-weight: 600; }
.kind-long, .kind-lines, .kind-json { flex-basis: 100%; }
.money { flex: 0 1 auto; min-width: var(--col); margin-left: auto; text-align: right; }
.money a { display: inline-block; color: inherit; font-size: var(--t-big); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; text-decoration: none; }
.totals { justify-self: end; display: grid; gap: 2px; width: min(100%, 340px); }
.totals > div { display: grid; grid-template-columns: minmax(5em, auto) minmax(0, 1fr); align-items: center; column-gap: 12px; }
.totals .why { grid-column: 1 / -1; margin-bottom: 4px; }
.sumline { padding-top: 4px; border-top: 1px solid var(--rule); font-weight: 700; }
.more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
* + .more { padding-top: 14px; border-top: 1px solid var(--line); }
.kinds { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.kinds input, .kinds select { width: auto; max-width: 100%; }

/* 칸. 글자(.v)와 입력칸의 높이가 같다. */
.cell { display: block; min-width: 0; }
.v { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 34px; margin-inline: -6px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: none; line-height: 1.4; text-align: left; white-space: pre-wrap; }
.v:where(button):hover { border-color: var(--line); background: var(--bg); }
/* 고치기 전의 값과 지금 값. 나란히 놓을 자리가 없으면 지금 값이 아랫줄로 간다. */
.pair { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-width: 0; }
.pair > * { min-width: 0; }
.num .pair { justify-content: flex-end; }
.was { color: var(--muted); font-size: var(--t-small); text-decoration: line-through; }
.none { color: var(--muted); }
/* 고친 칸은 파랗다. 아직 틀린 칸은 고쳤어도 빨갛고, 지금 고치는 입력칸은 희다. */
.cell.changed > * { border-color: var(--primary); background: var(--primary-bg); }
.cell.bad > * { border-color: var(--err); background: var(--err-bg); }
.cell.warn > * { border-color: var(--warn); background: var(--warn-bg); }
.cell.editing > * { border-color: var(--primary); background: #fff; }
.num .cell { display: flex; justify-content: flex-end; }
.num .v, .num input { font-variant-numeric: tabular-nums; }
/* 요약의 짧은 글(사업자번호)과 날짜·숫자·선택은 한 줄이고, 제자리보다 긴 글만 줄을 바꾼다. 14px은 양옆으로 나온 12px에 반올림 여유를 더한 것이다. */
.sum .kind-text .v, .kind-date .v, .kind-number .v, .totals .v, .kinds .v { width: max-content; max-width: calc(100% + 14px); }
.num input { text-align: right; }
.cell textarea { min-height: 52px; field-sizing: content; }
.why { color: var(--err); font-size: var(--t-small); font-weight: 400; }
.why p { margin: 0; }
.why .warn { color: var(--warn); }
.why .fixed { color: var(--primary); }
/* 저장이 겹쳤을 때 칸 아래의 "내 화면에 있던 값"과 표 아래의 "내 화면에 있던 줄". 글만 있고 스크립트가 있든 없든 같다.
   여러 줄 글과 목록은 줄바꿈 그대로 보이고, 긴 낱말은 body처럼 끊는다. */
.attempted { margin-top: 2px; color: var(--muted); font-size: var(--t-small); }
.attempted p { margin: 0; }
.attempted ul { margin: 2px 0 0; padding-left: 18px; }
.attempted .typed { white-space: pre-wrap; }
.table-field > .attempted { margin-top: 8px; }
.totals .attempted { grid-column: 1 / -1; margin-bottom: 4px; }
/* 확인할 것에서 건너온 자리 */
.hit { box-shadow: 0 0 0 3px rgb(179 38 30 / .28); }

/* 표. 양옆 6px는 칸(.v)이 바깥으로 나온 만큼이다. 없으면 빨간 테두리가 잘린다. 표를 줄마다 접을지는 이 상자의 폭을 본다. */
.table-scroll { position: relative; container: items / inline-size; margin-inline: -6px; padding-inline: 6px; overflow-x: auto; }
.items { width: 100%; border-collapse: collapse; }
.items th { padding: 6px 8px; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: var(--t-small); font-weight: 600; text-align: left; white-space: nowrap; }
.items th.num { text-align: right; }
.items td { padding: 3px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.items input { min-width: 60px; }
/* 표의 열은 가장 긴 낱말보다 좁아지지 않는다. body처럼 두면 좁은 화면에서 품명이 한 글자씩 선다.
   열은 칸이 양옆으로 나온 12px을 빼고 그 낱말에 맞춰지므로, 칸이 12px을 더 쓰지 못하면 낱말이 중간에서 끊긴다. */
.items .v { max-width: calc(100% + 12px); overflow-wrap: break-word; }
/* 첫 열(품명)만 다르다. 띄어쓰기 없는 긴 품명이 금액을 밀어내지 않게 여덟 글자보다 긴 낱말은 나뉜다.
   글은 어디서나 나뉘게 두고, 같은 글의 보이지 않는 줄이 열의 가장 좁은 폭(가장 긴 낱말, 길어도 8em)을 잡는다.
   번호가 있으면 그 자리(20px + 간격 6px)까지 8em에 넣는다. */
.items [data-text] { overflow-wrap: anywhere; }
.items [data-text]::after { content: attr(data-text); display: block; max-width: 8em; height: 0; overflow: hidden; visibility: hidden; overflow-wrap: normal; }
.items .mark + .pair [data-text]::after { max-width: calc(8em - 26px); }
/* 자리가 모자라면 글이 먼저 잘린다. 숫자가 잘리거나 나뉘면 다른 값으로 읽힌다("비어 있음"은 나뉘어도 된다). */
.items .num .v { max-width: none; white-space: nowrap; }
.items .num .none { text-align: right; white-space: normal; }
.items .num input { field-sizing: content; }
.items .has-note td { border-bottom: 0; }
.items .note td { padding: 4px 8px 8px; }
.del { min-width: 34px; min-height: 34px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: var(--t-small); }
.del:hover { background: var(--err-bg); color: var(--err); }
.add { min-height: 36px; margin-top: 18px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-size: var(--t-small); }

/* 원본. 값을 내려 보는 동안 옆에 붙어 있다. */
.doc { position: sticky; top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.paper { width: 100%; max-height: calc(100vh - 120px); margin: 0; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
iframe.paper { display: block; height: calc(100vh - 150px); }
.paper img { display: block; width: 100%; height: auto; }
.cells { padding: 12px 14px; font: var(--t-small)/1.6 ui-monospace, Menlo, monospace; tab-size: 16; }
.texts { padding: 12px 14px 0; }
.texts h3 { color: var(--muted); font-size: var(--t-small); font-weight: 400; }
.texts pre { margin: 0 0 12px; font: inherit; white-space: pre-wrap; }

/* 아래 단추 줄. 지금 누를 단추 하나만 진하다. 글이 길면 글이 줄을 바꾸고, 단추는 제자리에 있다. */
.actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--card); }
.actions p { flex: 1 1 0; min-width: 0; margin: 0; font-weight: 600; }
.btns { display: flex; gap: 8px; }
.btn, .primary { min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-weight: 600; white-space: nowrap; }
.btn.go, .primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn.ok { border-color: var(--ok); background: var(--ok); color: #fff; }
.btn.no { border-color: var(--err); color: var(--err); }
.btn:disabled { border-color: var(--line); background: var(--bg); color: var(--muted); cursor: not-allowed; }
/* 두 번 누르는 사람의 두 번째 누름이 방금 열린 화면의 승인이나 방금 바뀐 단추에 닿지 않게, 단추 묶음은 나온 뒤 반 초 동안 마우스와 손가락을 받지 않는다.
   묶음 안의 단추는 그것을 물려받는다. 저장은 혼자 나올 수 있고(고친 칸을 닫을 때) 바로 눌린다. 승인도 혼자 나올 수 있어(고친 것을 되돌릴 때) 제 반 초를 갖는다.
   자판은 막지 않는다. pointer-events를 움직이지 못하는 브라우저에서는 바로 눌린다. */
.actions .btns, .actions [data-approve] { animation: settle .5s; }
@keyframes settle { from, to { pointer-events: none; } }

/* 스크립트가 있어야 움직이는 것: 글자 단추, 값·원본 탭, 원본 접기와 펼치기. 없으면 입력칸과 원본이 그대로 보인다. */
button.v, .tabs, .ghost { display: none; }
.ghost { min-height: 32px; padding: 6px 0; border: 0; background: none; color: var(--primary); font-size: var(--t-small); }

/* 눌러서 고치는 화면(.scripted)은 값이 글자로 보이고 누른 칸만 입력칸이 된다.
   data-edits는 review.js가 시작을 마치면서 적는다. 파일을 못 받았거나 시작하다 멈추면 없으므로 입력칸과 원본이 그대로 보인다.
   scripting 조건을 모르는 옛 브라우저에서는 스크립트가 없을 때처럼 입력칸이 늘 보인다(review.js도 거기에 맞춘다). */
@media (scripting: enabled) {
  .scripted[data-edits] button.v { display: inline-flex; }
  .scripted[data-edits] .cell:not(.editing) > [name], .scripted[data-edits] .editing > .v { display: none; }
}
@media (scripting: enabled) and (min-width: 821px) {
  .scripted[data-edits] [data-hide-original], .no-original [data-show-original] { display: inline-block; }
  .no-original .body { grid-template-columns: minmax(0, 1fr); }
  .no-original .doc { display: none; }
}
@media (scripting: enabled) and (max-width: 820px) {
  .scripted[data-edits] .tabs { position: sticky; top: 0; z-index: 2; display: flex; border-bottom: 1px solid var(--line); background: var(--card); }
  .tabs button { flex: 1; min-height: 44px; padding: 10px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); }
  .tabs [aria-pressed="true"] { border-color: var(--primary); color: var(--fg); font-weight: 600; }
  .scripted[data-edits][data-tab="values"] .doc, .scripted[data-edits][data-tab="original"] .values { display: none; }
}

/* 체험판(정적 데모). 첫 화면은 시안의 #home-screen을 따르고, 상세 화면은 위의 모양에 띠만 더한다. */
.ribbon { margin: 0; padding: 8px 24px; background: #fff1cf; color: #5c4400; font-size: var(--t-small); text-align: center; }
.home { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 28px; padding-block: 28px 32px; }
.home h1 { max-width: 20em; font-size: var(--t-huge); text-wrap: balance; }
.home h2 { margin-bottom: 10px; font-size: var(--t-mid); }
.home .say { max-width: 60ch; margin: 8px 0 0; color: var(--muted); font-size: var(--t-mid); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; counter-reset: step; list-style: none; }
.steps li { padding-top: 10px; border-top: 2px solid var(--fg); counter-increment: step; }
.steps b { display: block; }
.steps b::before { content: counter(step) ". "; }
.steps span { color: var(--muted); }
.fine { max-width: 70ch; margin: 0; color: var(--muted); font-size: var(--t-small); }
a.btn { color: inherit; text-align: center; text-decoration: none; }
/* 눌러도 움직이지 않을 단추를 감춘다: demo.js가 시작하기 전의 모든 단추와, 승인하거나 반려해 잠근 표의 단추. */
[data-demo-wait] :is(.btns, .add, .del), [inert] :is(.add, .del) { display: none; }

/* 좁은 화면: 값 아래에 원본. 입력칸 글자가 16px보다 작으면 아이폰이 누를 때 화면을 키운다. */
@media (max-width: 820px) {
  .bar-top, .body, .actions, .home { padding-inline: 16px; }
  .home h1 { font-size: var(--t-big); }
  .home .say { font-size: var(--t-body); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .body { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 14px 20px; }
  .doc { position: static; }
  .paper { max-height: none; }
  iframe.paper { height: 70vh; }
  .sheet { padding: 14px 16px; }
  .sum { --col: calc((100% - 20px) / 2); }
  .sum .wide, .money, .kind-text { flex-basis: 100%; }
  .money { order: -1; text-align: left; }
  .actions p { flex: 1 1 100%; }
  .btns { flex: 1; }
  .btn { flex: 1; padding-inline: 10px; }
  input, select, textarea { font-size: 16px; }
}

/* 휴대폰과, 원본과 나란해서 표가 다 들어가지 않는 폭에서는 표가 줄마다 접힌다. 주문 품목 표(.order)는 세 줄로, 다른 표는
   "이름: 값"으로 접는다. 스크립트가 없으면 입력칸이 늘 보여 글보다 자리를 더 쓰므로 더 넓은 화면까지 접는다.
   원본을 접어 표가 넓어졌으면(700px 위) 접지 않는다. */
@media (max-width: 620px), (min-width: 821px) and (max-width: 1023px), (scripting: none) and (min-width: 821px) and (max-width: 1240px) {
  @container items (max-width: 700px) {
    .items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .items, .items tbody { display: block; }
    .items tr { display: grid; align-items: center; column-gap: 8px; padding-block: 8px; border-bottom: 1px solid var(--line); }
    .items td { display: block; min-width: 0; padding: 0; border: 0; }
    .items .has-note { padding-bottom: 2px; border-bottom: 0; }
    .items .note { display: block; padding-top: 0; }
    .items .note td { padding: 0 0 6px; }
    .items .num .cell { justify-content: flex-start; }
    .items input { min-width: 64px; }
    .items [data-label] { display: grid; grid-template-columns: 6em minmax(0, 1fr); align-items: center; gap: 8px; }
    .items [data-label]::before { content: attr(data-label); color: var(--muted); font-size: var(--t-small); }
    .c-del { justify-self: end; }

    /* 긴 단위가 숫자를 밀어내지 않게 숫자 열이 먼저 자리를 잡고, 단위는 남은 자리에서 줄의 40%까지만 쓴다.
       20px은 "×"의 자리다. 단가가 금액보다 길지 않으면 늘 들어간다. */
    .order tr { grid-template: "name name name amount" "spec spec spec del" "quantity unit price price" / auto fit-content(40%) minmax(20px, 1fr) auto; }
    .order .num { min-width: auto; }
    .order [data-label] { display: block; }
    .order [data-label]::before { content: none; }
    .order .c-name { grid-area: name; font-weight: 600; }
    /* 품명은 낱말에 맞춘 열이 아니다. 금액과 8px 떨어져 있어, 12px을 더 쓰면 빨간 칸끼리 겹친다. */
    .order .c-name .v { max-width: 100%; }
    .order .c-spec { grid-area: spec; color: var(--muted); }
    .order .c-quantity { grid-area: quantity; }
    .order .c-unit { grid-area: unit; }
    .order .c-unit_price { grid-area: price; }
    .order .c-unit_price .cell { align-items: center; gap: 10px; }
    .order .c-unit_price .cell::before { content: "×"; color: var(--muted); }
    .order .c-amount { grid-area: amount; }
    .order .c-amount .cell { justify-content: flex-end; }
    .order .c-del { grid-area: del; }
  }
}

/* 스크립트가 없을 때: 위아래로 붙은 입력칸 사이를 띄우고, 눌러도 움직이지 않는 단추는 감춘다(빈 줄은 저장할 때 빠진다). */
@media (scripting: none) {
  .items input { margin-block: 2px; }
  .add, .del { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .todo a { transition: background-color .2s; }
}
