/* The customer page, UI v3 "the signboard, lit up" (owner 2026-10-29, docs/superpowers/specs/2026-10-29-ui-v3-design.md).
   Loaded after style.css, /shared/ui.css and /shared/kit.css, so these rules win: style.css keeps the rules the tests
   pin and the fine Tamil width fixes; this file is the look. Tokens come from /shared/ui.css. The board stays yellow
   with ink lettering in both schemes (every shop board in town is); everything else follows the phone's light or dark
   setting. Motion: only transform and opacity, the shared curves, everything off under reduced motion (end of file). */

/* ---- the page's older names follow the shared tokens ---- */
:root { --bg: var(--ground); --card: var(--paper); --text: var(--carbon); --accent: var(--ink); --accent-text: var(--on-ink); --amber: var(--board);
  --error: var(--red); --ok: var(--green); --tile-on: var(--ink-soft); --ticket: var(--paper); --ticket-muted: var(--muted);
  --board-ink: #2a2b86;   /* lettering on the yellow board, both schemes */
  --ld-ink: var(--ink); }
/* owner 2026-11-14: a finger pulled down at the top of the page reloaded it (Chrome's pull to refresh) in the middle of
   an order: the files come back (visit.js) but every crop and page order made by hand was lost. The browser's own
   reload button still works. */
html, body { overscroll-behavior-y: contain; }
/* owner 2026-11-14: an iPhone zooms the whole page in when a box with words under 16 px is tapped, and does not zoom back
   (the three option lists were the browser's own 13 px). Rules below that set a size still win. */
input, select, textarea { font-size: 16px; }
html { color-scheme: light dark; scroll-padding-top: 132px; }   /* the sticky tabs + rail must never cover what the page scrolls to */
body { font-size: 16px; line-height: 1.45; color: var(--carbon);
  /* the lit board throws a little yellow on the counter under it */
  background: radial-gradient(70% 220px at 50% 0, rgba(255, 210, 31, 0.28), rgba(255, 210, 31, 0) 100%) no-repeat, var(--ground); }
html[lang="ta"] body { line-height: 1.6; }
main { padding: 14px 14px 110px; }
main h2, section > h2 { font: 700 1.55rem/1.15 var(--display); font-stretch: 85%; letter-spacing: 0; margin: 0 0 10px; text-wrap: balance; }
html[lang="ta"] main h2, html[lang="ta"] section > h2 { line-height: 1.4; }
main h3 { text-wrap: balance; }

/* ---- the board: yellow, lit from the top-left, ink lettering, an ink foot; the controls sit on the board ---- */
header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "badge name restart lang"; align-items: center;
  gap: 10px 12px; padding: 14px 16px 12px; background: var(--board-lit); color: var(--board-ink); border-bottom: 4px solid var(--board-ink);
  box-shadow: 0 10px 28px -18px rgba(32, 34, 58, 0.55); }
header .brand { display: contents; }
header .badge { grid-area: badge; width: 40px; height: 40px; border-radius: 11px; background: var(--board-ink); color: var(--board);
  box-shadow: inset 0 0 0 2px var(--board-ink), inset 0 0 0 4px var(--board), 0 2px 6px rgba(32, 34, 58, 0.25);
  font: 800 0.95rem/1 var(--display); font-stretch: 75%; }
header h1, #shop-name { grid-area: name; min-width: 0; margin: 0; color: var(--board-ink); font: 800 clamp(1.35rem, 6vw, 1.9rem)/1.05 var(--display);
  font-stretch: 78%; letter-spacing: 0; overflow-wrap: break-word; }
header .restart-btn { grid-area: restart; justify-self: end; margin: 0; min-height: 44px; padding: 6px 12px; border: 2px solid var(--board-ink);
  border-radius: 12px; background: rgba(255, 255, 255, 0.28); color: var(--board-ink); font-weight: 700; font-size: 0.9rem; max-width: 9em; }
header #lang-slot { grid-area: lang; margin: 0; }
header .lang-switch { border: 2px solid var(--board-ink); border-radius: 12px; background: rgba(255, 255, 255, 0.28); }
header .lang-switch .lang-btn { color: var(--board-ink); font-weight: 700; min-height: 44px; }
header .lang-switch .lang-btn + .lang-btn { border-left: 2px solid var(--board-ink); }
header .lang-switch .lang-btn.on { background: var(--board-ink); color: var(--board); }
header .lang-switch .lang-btn:focus-visible, header .restart-btn:focus-visible { outline: 3px solid var(--board-ink); outline-offset: 2px; }
@media (max-width: 559px) {
  header { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "badge restart lang" "name name name"; row-gap: 10px; }
  header h1, #shop-name { font-size: clamp(1.9rem, 9.5vw, 2.6rem); line-height: 1; }
  html[lang="ta"] header h1 { line-height: 1.2; }
}

/* ---- the rate line under the board: the shop's state as a live dot, the rates in ink, a call chip at the end ---- */
.shopbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; background: var(--paper); color: var(--muted); border-bottom: 1px solid var(--line); }
/* the state line carries its own dot in its words (shop_open / shop_closed); it wraps as a soft chip on its own row */
.shopbar .pill { flex: 1 1 100%; display: block; min-height: 30px; padding: 6px 12px; border-radius: 12px; background: var(--paper-2); color: var(--carbon);
  font-weight: 700; font-size: 0.9rem; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.shopbar .pill.on { color: var(--green); background: var(--green-soft); }
.shopbar .pill.skel { min-height: 30px; }
#rates { flex: 1 1 0; min-width: 0; color: var(--carbon); font-weight: 700; font-variant-numeric: tabular-nums; }   /* wraps beside the call chip, never under it */
.call-chip { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--paper); color: var(--ink); text-decoration: none; transition: transform var(--t-press) var(--ease-spring), background-color var(--t-fast) ease; }
.call-chip:active { transform: scale(0.94); }
.call-chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.call-chip[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .call-chip:hover { background: var(--ink-soft); } }

/* ---- a frosted bar that stays at the top with the step rail in it ---- */
.mode-nav { position: sticky; top: 0; z-index: 10; margin: 0; padding: 8px 12px 8px; background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
@supports not (backdrop-filter: blur(1px)) { .mode-nav { background: var(--paper); } }
/* the step rail: three numbered stops, the fill slides to the step the customer is on (app.js setStep -> li.on) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 640px; margin: 8px auto 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.steps li { position: relative; padding: 8px 4px 0; text-align: center; color: var(--muted); font-weight: 600; overflow-wrap: normal; }
.steps li::before { content: ""; display: block; height: 4px; margin: 0 2px 6px; border-radius: 2px; background: var(--line); }
.steps li::after { content: ""; position: absolute; top: 8px; left: 2px; right: 2px; height: 4px; border-radius: 2px; background: var(--ink); transform: scaleX(0);
  transform-origin: left; transition: transform 0.4s var(--ease-out); }
.steps li.on { color: var(--ink); font-weight: 800; }
.steps li.on::after, .steps li:has(~ li.on)::after { transform: scaleX(1); }
.steps li:has(~ li.on) { color: var(--carbon); }
.steps li:has(~ li.on)::after { background: var(--green); }

/* ---- the steps are sheets: paper with a hairline and a soft shadow, rising in; what sits inside is a tone step ---- */
section { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 16px; box-shadow: var(--shadow-1); }
#step-upload > #sorted { background: none; border: 0; padding: 0; box-shadow: none; }
.arrange { background: var(--paper-2); border: 0; box-shadow: none; border-radius: var(--r); }
.preview { border: 0; box-shadow: none; background: var(--paper-2); border-radius: var(--r); padding: 12px; }
.preview h3 { font: 700 1.15rem/1.2 var(--display); font-stretch: 85%; margin: 0 0 6px; }
.file-list li { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--paper); }
.file-list.refused li { background: var(--red-soft); border-color: transparent; }

/* every choice and button shows where the keyboard is */
main button:focus-visible, main a:focus-visible, main input:focus-visible, main select:focus-visible, main summary:focus-visible,
.file-btn:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
main input[type="radio"], main input[type="checkbox"] { accent-color: var(--ink); }
main fieldset > label > input[type="radio"] { width: 22px; height: 22px; flex: none; }

/* ---- buttons: the one next action is ink (a little light on its top edge), the rest paper; a press gives 3% ---- */
button.primary, .file-btn { border-radius: 14px; min-height: 52px; }
button.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 86%, #ffffff) 0%, var(--ink) 55%, var(--ink-deep) 100%); color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -10px var(--ink); font-size: 1.05rem; }
/* owner 2026-11-14: an iPhone on iOS 15 to 16.1 and an Android 6 phone do not know color-mix(). A rule holding var() and
   an unknown function is not skipped, it is emptied: the main button was white words on no background there. */
@supports not (color: color-mix(in srgb, red, blue)) { button.primary { background: var(--ink); } }
button.primary:disabled, .file-btn.disabled { opacity: 1; background: var(--line); color: var(--muted); box-shadow: none; }
button.ghost { border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--carbon); font-weight: 700; }
button.ghost, .link-btn, .speak-btn, .copy-btn, .add-more, header .restart-btn, .sent-actions .sent-btn, .pay-btn, #download,
.visit-orders button, .job-banner .alts button, .restart-dlg .restart-actions button, .lk-row button, #missing-sheet button:not(.dlg-x):not(.lang-btn), button.mini,
.stepper button, .stepper input, #delete, .zoom-btn, .sorted-list .item button, .sorted .so-same button { min-height: 48px; }
button.mini { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper-2); color: var(--carbon); font-size: 1.1rem; }
@media (hover: hover) and (pointer: fine) {
  button.ghost:hover:not(:disabled), button.mini:hover:not(:disabled) { background: var(--ink-soft); border-color: var(--ink); }
  button.primary:hover:not(:disabled) { filter: brightness(1.08); }
}
button.primary, button.ghost, .file-btn, .add-more, .speak-btn, .copy-btn, button.mini, .stepper button, .pay-btn, .sent-actions .sent-btn, .link-btn, #delete, #download {
  transition: transform var(--t-press) var(--ease-spring), background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease; }
button.mini:not(:disabled):active, .stepper button:active, .pay-btn:active, .sent-actions .sent-btn:active, .link-btn:active, #delete:active, #download:active, .copy-btn:active { transform: scale(0.96); }

/* ---- step 1, before you start: four rules on a checklist, the privacy note as fine print, the tick box a sheet ---- */
#step-conditions h2 { margin: 0 0 10px; }
.conditions li { border-bottom: 0; padding: 9px 0 9px 34px; font-weight: 600; }
.conditions li::before { top: 13px; left: 0; width: 20px; height: 20px; border-radius: 7px; background: var(--board); box-shadow: inset 0 0 0 2px var(--board-ink); }
#step-conditions .notice { background: none; padding: 0; margin: 12px 0; font-size: 0.875rem; line-height: 1.55; color: var(--muted); }
.consent { min-height: 60px; margin: 12px 0 0; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper-2); align-items: center; gap: 12px;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease; }
.consent input { width: 26px; height: 26px; }
.consent:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); }

/* ---- step 2, the files: a dashed drop card with the upload mark (not a filled block: ink is for the next action);
   the quiet rows under it; file cards with the picture, the name, the size ---- */
.file-btn.big { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 124px; max-width: 460px;
  margin: 4px auto 12px; padding: 18px 16px; border: 2px dashed var(--ink); border-radius: var(--r-lg); background: var(--ink-soft); color: var(--ink);
  font-size: 1.05rem; font-weight: 800; box-shadow: none; transition: transform var(--t-press) var(--ease-spring), background-color var(--t-fast) ease, border-color var(--t-fast) ease; }
.file-btn.big::before { content: ""; width: 40px; height: 40px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0 4.5 4.5M12 4 7.5 8.5'/%3E%3Cpath d='M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0 4.5 4.5M12 4 7.5 8.5'/%3E%3Cpath d='M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E") center / contain no-repeat; }
.file-btn.big.disabled { border-color: var(--line-2); background: var(--paper-2); color: var(--muted); }
.file-btn.big:not(.disabled):active { transform: scale(0.985); }
#step-upload.drop-on { outline: 0; }
#step-upload.drop-on .file-btn.big { transform: scale(1.02); background: var(--amber-soft); border-color: var(--board-ink); border-style: solid; }
/* with files in the list the big card steps back to one outline row: "+ Add more files" is the way to add */
#step-upload:has(#file-list li) .file-btn.big { flex-direction: row; min-height: 48px; margin: 4px auto 8px; padding: 10px 14px; background: none; font-size: 1rem; border-radius: 12px; }
#step-upload:has(#file-list li) .file-btn.big::before { width: 22px; height: 22px; }
#step-upload > .hint { text-align: center; margin: 0 0 10px; }
#step-upload > .link-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 460px; min-height: 52px; margin: 0 auto 8px;
  padding: 10px 14px; border-radius: 12px; background: var(--paper-2); color: var(--carbon); text-align: left; text-decoration: none; font-weight: 700; }
#step-upload > .link-btn::after { content: "›" / ""; flex: none; font-size: 1.6rem; line-height: 1; color: var(--ink); }
#step-upload > .private { text-align: center; }
.add-more { border: 2px dashed var(--ink); border-radius: 12px; color: var(--ink); background: var(--paper); }
/* once "+ Add more files" is on screen (the sorted list, the options) it is the one way to add: the card above steps out */
#step-upload:has(#add-more:not([hidden])) .file-btn.big, #step-upload:has(#add-more:not([hidden])) > .hint { display: none; }
.cam-take { border-color: var(--ink); border-radius: 12px; color: var(--ink); background: var(--paper); }
#step-upload:has(#add-more:not([hidden])) #take-photo { display: none; }   /* the one under Add more takes over */
/* a file card: the name may take two lines (never cut to "sampl..."), a drawn document stands in for a missing picture */
.file-list .fname { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
#file-list li:not(:has(.row-thumb))::before { content: ""; flex: none; width: 40px; height: 48px; background: var(--ink); opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E") center / contain no-repeat; }
.file-list { gap: 8px; }
.file-list .fname { font-weight: 700; }
.row-thumb { width: 56px; height: 56px; border-radius: 10px; box-shadow: 0 1px 3px rgba(32, 34, 58, 0.25); }
.file-list .file-chip { color: var(--muted); }
.file-list button.unlock { border-radius: 12px; border-color: #e8b100; background: var(--amber-soft); color: var(--amber-ink); }
.file-list button.unlock.open { border-color: var(--green); background: var(--green-soft); color: var(--green); }
#file-error:empty, #chosen:empty { min-height: 0; margin: 0; }
.drop-hint { border: 2px dashed var(--ink); border-radius: 14px; color: var(--ink); background: var(--ink-soft); }
.checking { color: var(--muted); font-weight: 600; }
.error:not(:empty) { padding: 10px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); }
.job-banner { border: 0; border-radius: 14px; background: var(--ink-soft); color: var(--carbon); }
.job-banner .note { color: var(--amber-ink); }
.sorted-list .item { border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.sorted-list .ms-ask { background: var(--amber-soft); border-color: transparent; border-radius: 12px; color: var(--carbon); }
.sorted-list .ms-ask p, .sorted-list .ms-ask p.hint { color: var(--carbon); }
.sorted-list .ms-ask p.hint { color: var(--amber-ink); }
.sorted-list .so-pick { border-radius: 12px; background: var(--paper); border-color: var(--line); color: var(--carbon); }
.sorted-list .so-pick span { color: var(--carbon); }
.sorted .so-id-sum { background: var(--ink-soft); color: var(--carbon); border-left-color: var(--ink); border-radius: 12px; }
.sorted .so-same { border-radius: 14px; border-color: var(--ink); background: var(--paper-2); }
.sorted-list .item.so-drop-on { outline-color: var(--ink); }
.zoom-btn { background: var(--paper); color: var(--carbon); border: 1.5px solid var(--line); border-radius: 12px; }
.chooser .tile { border-radius: 12px; border-color: var(--line); background: var(--paper-2); color: var(--carbon); }
.chooser .tile.suggested { border: 2px solid var(--ink); }
.chooser .tile em { color: var(--ink); }

/* ---- step 3, the options: a display heading per group, big tiles with drawn pictures, the chosen one tinted
   ink with a yellow check that pops; nothing moves when a tile is chosen ---- */
#options fieldset { border: 0; border-radius: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
#options legend { padding: 0; margin-bottom: 8px; font: 700 1.2rem/1.25 var(--display); font-stretch: 85%; color: var(--carbon); }
html[lang="ta"] #options legend { line-height: 1.5; }
#options fieldset.tiles { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.tile { min-height: 86px; padding: 10px 6px 9px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--carbon); font-size: 0.9375rem; line-height: 1.25;
  overflow-wrap: break-word; transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease, transform var(--t-press) var(--ease-spring); }
html[lang="ta"] .tile { line-height: 1.4; font-size: 0.875rem; padding-inline: 4px; }
.tile:active { transform: scale(0.97); }
.tile small { font-size: 0.8125rem; color: var(--muted); }
.tile:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); color: var(--carbon); box-shadow: none; }
.tile:has(input:checked)::after { content: "✓" / ""; position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--board); color: var(--board-ink); font-size: 13px; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px rgba(32, 34, 58, 0.3); animation: ui-pop var(--t-base) var(--ease-spring) both; }
.tile:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.tile:has(input:disabled) { opacity: 0.4; }
.ico { color: var(--ink); font-size: 1.5rem; }
.tile:has(input:checked) .ico { color: var(--ink); }
/* the paper pictures: a plain sheet with a turned corner, a bond sheet with its lines, a glossy photo */
.ico.pic { position: relative; width: 28px; height: 36px; min-height: 0; border-radius: 3px; background: #fff; border: 2px solid currentColor; box-sizing: border-box; }
.ico.pic::before { content: ""; position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; background: linear-gradient(225deg, var(--paper) 0 50%, currentColor 50%); border-bottom-left-radius: 2px; }
.ico.pic-bond { background: repeating-linear-gradient(#fbf3d6 0 5px, #e3d7a9 5px 6px) 0 8px / 100% 6px repeat-y, #fbf3d6; background-clip: padding-box; }
.ico.pic-photo { background: linear-gradient(160deg, #7cc4ff 0%, #4f8ee6 45%, #ffd21f 46%, #ff9f43 100%); border-color: #fff; box-shadow: 0 0 0 2px currentColor; }
.ico.pic-photo::before { display: none; }
.swatch { width: 40px; height: 26px; border-radius: 7px; }
.swatch.bw { border-color: var(--line-2); }
.sheet { border-color: currentColor; }
details.advanced { margin: 12px 0 0; padding: 0 14px; border-radius: 14px; background: var(--paper-2); }
details.advanced[open] { padding-bottom: 12px; }
details.advanced summary { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 4px 0; color: var(--ink); font-weight: 700; list-style: none; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary::before { content: "›" / ""; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-soft);
  font-size: 1.2rem; line-height: 1; transform: rotate(0deg); transition: transform var(--t-base) var(--ease-out); }
details.advanced[open] summary::before { transform: rotate(90deg); }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.stepper button { width: 52px; height: 48px; border: 0; border-radius: 0; background: var(--paper-2); color: var(--ink); font-weight: 800; font-size: 1.4rem; }
.stepper input { width: 64px; height: 48px; border: 0; border-left: 2px solid var(--line); border-right: 2px solid var(--line); border-radius: 0; background: var(--paper); color: var(--carbon); font-weight: 800; font-size: 1.15rem; text-align: center; }
#range, #colour-pages { height: 48px; min-width: 0; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--carbon); font: inherit; font-size: 1rem; }
#range { width: 9rem; max-width: 100%; }
#colour-pages { width: 100%; max-width: 16rem; }
#range:focus, #colour-pages:focus { border-color: var(--ink); }
fieldset label { min-height: 48px; }
.extras .extra input[type=number] { height: 44px; border: 2px solid var(--line); border-radius: 10px; padding: 0 8px; background: var(--paper); color: var(--carbon); }
.note, .hint, .chosen { color: var(--muted); }

/* ---- the bottom bar: the price and the one next button share a frosted bar that stays under the thumb while the
   options are on screen; the WhatsApp button rises above it ---- */
.sendbar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; align-items: center; gap: 12px; margin: 18px -6px 0; padding: 10px 10px 10px 16px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--shadow-2); animation: ui-slide-up var(--t-base) var(--ease-out) both; }
@supports not (backdrop-filter: blur(1px)) { .sendbar { background: var(--paper); } }
.sendbar .rate, #rate { flex: 1 1 auto; min-width: 0; margin: 0; text-align: left; color: var(--carbon); font: 800 1.3rem/1.2 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sendbar #send { flex: 0 1 auto; width: auto; min-width: 8.5rem; max-width: 60%; margin: 0; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sendbar #send::after { content: "›" / ""; font-size: 1.4rem; line-height: 1; transform: translateY(-1px); }
.sendbar #send[hidden] { display: none; }
.totals { color: var(--carbon); font: 800 1.15rem/1.2 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; }
body:has(#options:not([hidden])), body:has(#step-conditions:not([hidden])), body:has(#files-continue:not([hidden])) { --wa-lift: 96px; }
@media (max-width: 859px) {
  .preview { position: static; }
  #files-continue { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 6; box-shadow: 0 0 0 8px var(--paper), var(--shadow-2); }
  /* owner 2026-10-30: the tick box and Continue stay on screen together; only the rules and the note above scroll */
  .cond-act { position: sticky; bottom: 0; z-index: 6; margin: 0 -16px -20px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -12px 16px -12px rgba(0, 0, 0, 0.45); }
  .cond-act .consent { margin: 0; }
  body:has(#step-conditions:not([hidden])) { --wa-lift: calc(var(--cond-bar, 144px) + 12px); }   /* --cond-bar: app.js measures the bar */
  /* no blank space under the card on this step: scrolled to the end, the bar still sits at the bottom, under the WhatsApp button */
  body:has(#step-conditions:not([hidden])), body:has(#step-conditions:not([hidden])) main { padding-bottom: 0; }
}
@media (min-width: 860px) {
  .sendbar { position: static; margin: 18px 0 0; box-shadow: var(--shadow-1); animation: none; }
  #step-upload:has(#options:not([hidden])) { max-width: 1040px; }
}
#progress { display: block; width: 100%; max-width: 420px; height: 10px; margin: 12px auto 0; border: 0; border-radius: 5px; background: var(--line); color: var(--ink); overflow: hidden; -webkit-appearance: none; appearance: none; }
#progress[hidden] { display: none; }
#progress::-webkit-progress-bar { background: var(--line); border-radius: 5px; }
#progress::-webkit-progress-value { background: var(--ink); border-radius: 5px; transition: width var(--t-base) var(--ease-out); }
#progress::-moz-progress-bar { background: var(--ink); border-radius: 5px; }
#download { border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--carbon); font-weight: 700; }

/* ---- the preview: sheets of paper on the tone step, each with its own shadow; warnings as an amber note ---- */
.paper { border: 0; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 8px 16px -10px rgba(0, 0, 0, 0.45); }
.sheet-card figcaption { color: var(--muted); }
.print-hints { background: var(--amber-soft); border-left: 4px solid var(--board); border-radius: 12px; color: var(--carbon); }
.print-hints .sig-picture { border-radius: 8px; }

/* ---- the done screen: the ticket is the paper (no card around it), the code a stamped token, two actions under it ---- */
#step-done { background: none; padding: 0; border: 0; box-shadow: none; }
.ticket { position: relative; background: var(--paper); border: 0; border-radius: var(--r-lg); margin-top: 4px; box-shadow: var(--shadow-1); }
.perf { background: radial-gradient(circle at 0 50%, var(--ground) 11px, transparent 12px) left / 22px 22px no-repeat,
  radial-gradient(circle at 100% 50%, var(--ground) 11px, transparent 12px) right / 22px 22px no-repeat; }
.perf::after { border-top-color: var(--line-2); }
.ticket-head { padding: 20px 14px 14px; }
.ticket-label { font: 700 1.15rem/1.2 var(--display); font-stretch: 85%; color: var(--muted); }
.ticket-head .code { font: 800 76px/1 var(--display); font-stretch: 78%; letter-spacing: 0.08em; padding: 12px 14px 6px 22px; color: var(--board-ink); background: var(--board-lit);
  border: 3px solid var(--board-ink); border-radius: 18px; box-shadow: inset 0 0 0 4px var(--board), inset 0 0 0 6px var(--board-ink), 0 10px 24px -14px rgba(32, 34, 58, 0.6); }
@media (max-width: 360px) { .ticket-head .code { font-size: 62px; } }
.ticket-say { font-size: 0.9375rem; color: var(--muted); }
.ticket-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; }
.speak-btn, .copy-btn { flex: 1 1 140px; max-width: 240px; min-height: 48px; margin: 0; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper);
  color: var(--carbon); font: inherit; font-weight: 700; overflow-wrap: anywhere; cursor: pointer; }
.copy-btn[hidden], .speak-btn[hidden] { display: none; }
.copy-btn.done { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.ticket-stub { padding: 8px 18px 20px; gap: 6px; }
.ticket-stub .status { font: 700 1.25rem/1.25 var(--display); font-stretch: 85%; }
.ticket-stub .price { font: 800 1.6rem/1.2 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.ticket .summary, .ticket .price.muted { color: var(--muted); }
.queue { color: var(--ink); }
.tracker { margin: 18px 6px 4px; }
.ready-line { background: var(--green-soft); border-color: var(--green); border-radius: 14px; }
.keep-open { color: var(--muted); }
#delete { border: 2px solid var(--red); border-radius: 12px; color: var(--red); background: var(--paper); font: inherit; font-weight: 700; }
#again { margin-top: 16px; }
.review { border: 0; border-radius: var(--r); background: var(--amber-soft); color: var(--carbon); box-shadow: none; }
.review .stars { color: #e8a800; }
.review-later { border-color: var(--line-2); color: var(--carbon); }

/* pay and check-your-details: sheets like the ticket, the big number in the display face */
.pay-box { border: 2px solid transparent; background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-1); }
.pay-box.paid { border-color: var(--green); }
.pay-due { font: 800 1.5rem/1.2 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.pay-box.paid .pay-due { color: var(--green); }
.pay-btn { border: 1.5px solid var(--line-2); border-radius: 12px; }
.pay-btn.pay-upi { background: var(--green); border-color: var(--green); color: #fff; }
.pay-qr { border-radius: 12px; padding: 6px; box-shadow: var(--shadow-1); }
.sent-actions .sent-btn, .vs-row { border: 1.5px solid var(--line-2); border-radius: 12px; }
.vs-row { background: var(--paper); box-shadow: var(--shadow-1); border-color: var(--line); }
.details-box { gap: 12px; margin: 12px 0; padding: 18px 16px; border: 0; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-1); }
.details-box h3 { font: 700 1.35rem/1.2 var(--display); font-stretch: 85%; }
html[lang="ta"] .details-box h3 { line-height: 1.45; }
.details-box > p:not(.details-state) { color: var(--muted); }
.details-field { gap: 4px; }
.details-field > span { font-weight: 700; }
.details-field input { min-height: 48px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--carbon); font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.details-field input:focus { border-color: var(--ink); }
.details-field input::placeholder { color: var(--muted); opacity: 1; letter-spacing: 0.04em; }
.details-field small { color: var(--muted); font-size: 0.875rem; }
.details-ok { font-size: 1.05rem; }
.details-state:not(:empty) { margin: 0; font-weight: 700; color: var(--green); }
.sv-chosen { color: var(--green); }
.case-stage { color: var(--carbon); }
.private { color: var(--green); }

/* ---- dialogs on this page: a sheet that rises, a soft ink backdrop, a round glass close ---- */
.chooser, .restart-dlg, #missing-sheet { border: 0; border-radius: var(--r-lg); padding: 20px 18px; background: var(--paper); color: var(--carbon); box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(10px); transition: opacity 0.2s var(--ease-out), transform 0.26s var(--ease-out), overlay 0.2s allow-discrete, display 0.2s allow-discrete; }
:is(.chooser, .restart-dlg, #missing-sheet)[open] { opacity: 1; transform: none; }
@starting-style { :is(.chooser, .restart-dlg, #missing-sheet)[open] { opacity: 0; transform: translateY(10px); } }
:is(.chooser, .restart-dlg, #missing-sheet)::backdrop { background: rgba(32, 34, 58, 0.45); }
.restart-dlg h2 { font: 700 1.4rem/1.2 var(--display); font-stretch: 85%; margin: 0 0 8px; }
.restart-dlg .restart-actions button { border-radius: 12px; }
.dlg-x { border: 1px solid var(--line); background: var(--glass); color: var(--carbon); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-1); }
.dlg-x:hover { background: var(--paper-2); }
.dlg-x:focus-visible { outline: 3px solid var(--ink); }

/* ---- Change my order (owner 2026-11-01): the button on the waiting page and its sheet ---- */
.change-view { display: grid; gap: 8px; margin: 12px 0 0; }
.change-btn { min-height: 48px; border-radius: 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 700; }
.change-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); color: var(--carbon); }
.change-dlg { width: min(100% - 24px, 480px); max-height: calc(100% - 24px); padding: 16px; border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--carbon); box-shadow: var(--shadow-2); }
.change-dlg::backdrop { background: rgba(32, 34, 58, 0.55); }
.change-dlg h2 { margin: 0; font-size: 1.2rem; }
.change-choices { display: grid; gap: 10px; margin: 14px 0; }
.change-choice { display: grid; gap: 4px; justify-items: start; min-height: 64px; padding: 12px 14px; text-align: left; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); color: var(--carbon); }
.change-choice span { color: var(--muted); font-size: 0.9rem; }
.change-form { display: grid; gap: 12px; margin: 14px 0; }
.change-row { display: grid; grid-template-columns: minmax(6em, 1fr) auto; align-items: center; gap: 10px; font-weight: 600; }
.change-row select { min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); color: var(--carbon); padding: 0 8px; }
.change-row[hidden] { display: none; }
/* the sheet's parts set their own display, so a hidden one must say none again (no global [hidden] rule here) */
.change-view[hidden], .change-choices[hidden], .change-choice[hidden], .change-form[hidden], #ch-save[hidden] { display: none; }
.change-line { margin: 0; }
/* where a file is (owner 2026-11-01): WhatsApp, Gmail, DigiLocker, Drive, one line each */
.where-file { margin: 4px 0 10px; color: var(--carbon); }
.where-file summary { cursor: pointer; font-weight: 700; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.where-file ul { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 0.95rem; }
.shared-wait { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); font-weight: 600; }
.shared-wait[hidden], .install-view[hidden] { display: none; }
.install-view { display: grid; gap: 8px; margin: 12px 0 0; padding: 12px; border-radius: 12px; border: 2px dashed var(--line); }
.install-view p { margin: 0; }
.change-form .change-btn { justify-self: start; padding: 0 16px; }
.change-price { margin: 0; font-weight: 800; font-size: 1.1rem; }
.change-foot { display: flex; gap: 10px; justify-content: flex-end; }
.change-foot button { min-height: 48px; padding: 0 16px; border-radius: 12px; }
.change-foot .primary { width: auto; margin: 0; }
.pay-return, .pay-check { margin: 6px 0 0; font-weight: 700; color: var(--ink); }

/* ---- the shared kit in the page's colours (kit.css itself is not edited: tests pin it) ---- */
.kit-lang .lang-switch, .vw-lang .lang-switch, .dl-root .lang-switch, .gd-sheet .lang-switch { border-color: var(--ink); }
.kit-lang .lang-switch .lang-btn, .dl-root .lang-switch .lang-btn, .gd-sheet .lang-switch .lang-btn { color: var(--carbon); }
.kit-lang .lang-switch .lang-btn + .lang-btn, .dl-root .lang-switch .lang-btn + .lang-btn, .gd-sheet .lang-switch .lang-btn + .lang-btn { border-left-color: var(--ink); }
.kit-lang .lang-switch .lang-btn.on, .dl-root .lang-switch .lang-btn.on, .gd-sheet .lang-switch .lang-btn.on { background: var(--ink); color: var(--on-ink); }
/* the dark kit dialogs (photo fixer, card adjust, ID card copy, page editor) stay dark in the light theme: their switch keeps
   light words, or the unchosen language is dark on dark (owner 2026-11-01) */
.sc-overlay .kit-lang .lang-switch, .pe-overlay .kit-lang .lang-switch { border-color: rgba(255, 255, 255, 0.6); }
.sc-overlay .kit-lang .lang-switch .lang-btn, .pe-overlay .kit-lang .lang-switch .lang-btn { color: #fff; }
.sc-overlay .kit-lang .lang-switch .lang-btn + .lang-btn, .pe-overlay .kit-lang .lang-switch .lang-btn + .lang-btn { border-left-color: rgba(255, 255, 255, 0.45); }
.sc-overlay .kit-lang .lang-switch .lang-btn.on, .pe-overlay .kit-lang .lang-switch .lang-btn.on { background: #a9aaff; color: #14152b; }
.ul-sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--paper); color: var(--carbon); box-shadow: var(--shadow-2); }
.ul-sheet::backdrop { background: rgba(32, 34, 58, 0.5); }
.ul-btn { border-radius: 12px; border-color: var(--line-2); background: var(--paper); color: var(--carbon); }
.ul-btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ul-input { border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--carbon); }
.ul-file, .ul-why, .ul-note, .ul-hints { color: var(--muted); }
.ul-chip[aria-expanded="true"] { background: var(--ink-soft); border-color: var(--ink); }
.ul-panel, .ul-help { border-color: var(--line); }
.org-tile { border-radius: 14px; border-color: var(--line); background: var(--paper); }
.org-tile.colour { border-color: var(--board); }
.org-face { background: var(--paper-2); border-radius: 10px; }
.org-num { background: var(--ink); color: var(--on-ink); }
.org-btn { border-radius: 12px; border-color: var(--line-2); background: var(--paper); color: var(--carbon); }
.org-btn.danger { color: var(--red); border-color: var(--red); }
.org-count, .org-hint { color: var(--muted); }
.vw-root .vw-btn { border-radius: 12px; }
.wa-fab { box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45); transition: bottom var(--t-base) var(--ease-out), transform var(--t-press) var(--ease-spring); }
.wa-fab:active { transform: scale(0.94); }

/* ---- motion that says what happened (the motion spec's moments, kept from the 2026-10-21 skin): a step rises into
   place; a file's row is washed yellow for a moment; the ticket feeds out and hops once when the print is ready ---- */
#step-conditions:not([hidden]), #step-upload:not([hidden]) { animation: ui-rise var(--t-slow) var(--ease-out) both; }
#options:not([hidden]), #preview:not([hidden]), #sorted:not([hidden]), #arrange:not([hidden]), #job-banner:not([hidden]) { animation: ui-rise 0.32s var(--ease-out) both; }
#step-done:not([hidden]) { animation: ui-fade 0.24s ease-out both; }
#file-list li { position: relative; isolation: isolate; }
#file-list li.row-in::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--board); opacity: 0; pointer-events: none; animation: row-wash 1.4s ease-out; }
@keyframes row-wash { from { opacity: 0.45; } }
#drop-hint:not([hidden]) { animation: ui-rise 0.2s var(--ease-out) both; }
#step-done:not([hidden]) .ticket { animation: ticket-feed 0.48s var(--ease-out) both; }
@keyframes ticket-feed { from { transform: translateY(-18px); opacity: 0; } }
.ticket-head .code { animation-delay: 0.24s; }
#step-done.st-wait #summary:empty::before, #step-done.st-wait #price:empty::before { content: ""; display: block; height: 1.1em; width: 70%; margin: 4px auto; border-radius: 4px;
  background: var(--line); animation: skel-pulse 1s ease-in-out infinite alternate; }
#step-done.st-wait #price:empty::before { width: 40%; height: 1.4em; }
@keyframes skel-pulse { to { opacity: 0.45; } }
#step-done:not([hidden]) .ticket:has(.code.fresh) { animation: ticket-hop 0.5s var(--ease-spring); }
@keyframes ticket-hop { 40% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  #step-conditions:not([hidden]), #step-upload:not([hidden]), #options:not([hidden]), #preview:not([hidden]), #sorted:not([hidden]),
  #arrange:not([hidden]), #job-banner:not([hidden]), #step-done:not([hidden]), #file-list li.row-in::after, #drop-hint:not([hidden]),
  #step-done:not([hidden]) .ticket, #step-done:not([hidden]) .ticket:has(.code.fresh), #step-done.st-wait #summary:empty::before,
  #step-done.st-wait #price:empty::before, .tile:has(input:checked)::after, .sendbar { animation: none; }
  .tile, .consent, .steps li::after, .call-chip, button.primary, button.ghost, .file-btn, .add-more, .speak-btn, .copy-btn, button.mini, .stepper button,
  .pay-btn, .sent-actions .sent-btn, .link-btn, #delete, #download, details.advanced summary::before, .wa-fab, #progress::-webkit-progress-value { transition: none; }
  #step-upload.drop-on .file-btn.big, .tile:active, .call-chip:active, .file-btn.big:not(.disabled):active, button.mini:not(:disabled):active, .stepper button:active,
  .pay-btn:active, .sent-actions .sent-btn:active, .link-btn:active, #delete:active, #download:active, .copy-btn:active, .wa-fab:active { transform: none; }
  .chooser, .restart-dlg, #missing-sheet { transition: none; }
}

/* ---- Arrange cards (spec one-order §4.4): the batch's ID card sheets, each with its card places over it ---- */
.cards-dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; }
.cards-pack { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cards-pack button { flex: 1 1 140px; min-height: 48px; }
.cards-pack button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.cards-sheets { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.cards-face { display: block; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: visible; }
.cards-face img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cards-sheets.sb-dragging { touch-action: none; }
.vs-photos { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.vs-photos .pd-title { margin: 0; font-weight: 800; }
#sheet-note, #nup-note { margin: 6px 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }

/* ---- Print setup for a long file (owner 2026-11-10): 120 pages made the page 16,000 px long, and on a wide screen the
   preview sat under every page tile. Wide: Arrange pages and the options on the left, the preview always in sight on the
   right, under the step rail; its sheets scroll in their own box, so the total stays on screen. ---- */
@media (min-width: 860px) {
  .workspace { grid-auto-flow: row dense; }
  .workspace > #sheet-note { grid-column: 1 / -1; }
  .workspace > .arrange, .workspace > #options { grid-column: 1; }
  .workspace > .arrange { margin: 0; }
  .workspace > .preview { grid-column: 2; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; }
  .workspace:has(> .arrange:not([hidden])) > .preview { grid-row: span 2; }
  /* the sheets fill the column in even rows (a book-style sheet takes two places: its front and back side by side) */
  .preview .sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; align-items: start;
    max-height: max(200px, calc(100vh - 330px)); overflow-y: auto; padding: 4px 4px 8px; scrollbar-width: thin; }
  .preview .sheets > :not(.sheet-card) { grid-column: 1 / -1; justify-self: center; }
  .preview .sheets .sheet-card:has(.faces:not(.up) > .paper + .paper) { grid-column: span 2; }
  .preview .sheets .faces { align-items: flex-start; }
  .preview .sheets .paper { flex: 1 1 0; width: auto; min-width: 0; }
  .preview .sheets .faces.up .paper { flex: none; width: 100%; }
}
/* a wide screen has room for four pages across and a wider preview */
@media (min-width: 1280px) {
  main.wide { max-width: min(96vw, 1300px); }
  #step-upload:has(#options:not([hidden])) { max-width: 1240px; }
}
/* both sides as they turn: book style side by side, flip up one above the other */
.faces.up { flex-direction: column; }
.sheets .more { align-self: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper);
  color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.sheets .more:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---- "Some pages in colour" (owner 2026-11-10): the third Colour choice and its page numbers, right under the tiles ---- */
.swatch.mix { border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #111 0 17%, #888 17% 34%, #eee 34% 50%, transparent 50%), linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7); }
#colour-pages-row { margin: -6px 0 16px; padding: 10px 12px 12px; border-radius: 12px; background: var(--ink-soft); font-weight: 700; }
#colour-pages-row small { font-weight: 400; color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }
#colour-pages { width: 100%; max-width: 18rem; }
#color-mix-tile[hidden] { display: none; }

/* ---- Sides (owner 2026-11-10: "animated previews so we understand"): each tile shows its own turn, one after the other.
   One side: the sheet turns over and its back is empty. Book style: the page turns sideways. Flip up: the page turns
   upward. With "reduce motion" they are still pictures. ---- */
.flip.single::before { background-image: repeating-linear-gradient(#fff 0 4px, #cbd5e1 4px 5px); }
.flip.long::before { box-shadow: 16px 0 0 -2px #fff, 16px 0 0 0 currentColor; }   /* the page under the one that turns */
.flip.short::before { box-shadow: 0 16px 0 -2px #fff, 0 16px 0 0 currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .flip.single::before { animation: flip-one 6s linear infinite; }
  .flip.long::after { transform-origin: 0 50%; animation: flip-book 6s ease-in-out 2s infinite; }
  .flip.short::after { transform-origin: 50% 0; animation: flip-up 6s ease-in-out 4s infinite; }
  .tile:has(input:disabled) .flip::after { animation: none; }
}
@keyframes flip-one {
  0%, 4% { transform: perspective(90px) rotateY(0); background-image: repeating-linear-gradient(#fff 0 4px, #cbd5e1 4px 5px); animation-timing-function: ease-in; }
  9% { transform: perspective(90px) rotateY(90deg); background-image: repeating-linear-gradient(#fff 0 4px, #cbd5e1 4px 5px); }
  9.02% { transform: perspective(90px) rotateY(90deg); background-image: none; animation-timing-function: ease-out; }
  14%, 24% { transform: perspective(90px) rotateY(180deg); background-image: none; animation-timing-function: ease-in; }
  29% { transform: perspective(90px) rotateY(90deg); background-image: none; }
  29.02% { transform: perspective(90px) rotateY(90deg); background-image: repeating-linear-gradient(#fff 0 4px, #cbd5e1 4px 5px); animation-timing-function: ease-out; }
  34%, 100% { transform: perspective(90px) rotateY(0); background-image: repeating-linear-gradient(#fff 0 4px, #cbd5e1 4px 5px); }
}
@keyframes flip-book {
  0%, 4% { transform: perspective(110px) rotateY(0); }
  14%, 24% { transform: perspective(110px) rotateY(-180deg); }
  34%, 100% { transform: perspective(110px) rotateY(0); }
}
@keyframes flip-up {
  0%, 4% { transform: perspective(110px) rotateX(0); }
  14%, 24% { transform: perspective(110px) rotateX(180deg); }
  34%, 100% { transform: perspective(110px) rotateX(0); }
}

/* 2026-11-14: on a phone the name had 30-45 px beside the size and three buttons ("2. c…"). The name keeps room for
   itself; what does not fit beside it (size, ↑ ↓ ✕) goes to the row below, at the right. */
.file-list li { flex-wrap: wrap; }
.file-list .fname { flex: 1 1 calc(100% - 64px); }   /* the name has the row beside its picture; size and buttons share the next one */
.file-list .fname + small { margin-left: auto; }

/* ---- review 2026-11-14 (docs/superpowers/research/2026-11-14-full-review.md, section 4) ---- */
/* 1. The total stands in the Send bar, large, with the rate small under it; no total yet: the rate alone, as before. */
#sendbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
#sendbar .send-total { grid-column: 1; margin: 0; color: var(--carbon); font: 800 1.3rem/1.2 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#sendbar .send-total[hidden] { display: none; }
#sendbar .send-total.roll { animation: roll-in 0.26s var(--ease-out); }
#sendbar #rate { grid-column: 1; }
#sendbar .send-total:not([hidden]) + #rate { color: var(--muted); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
#sendbar #send { grid-column: 2; grid-row: 1 / span 2; max-width: none; }
/* 8. The four rules are a list to read, not boxes to tick: a small dot, not a yellow square. */
.conditions li { padding-left: 24px; }
.conditions li::before { top: 18px; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: none; }
/* 9. The chat button sits in the shop bar beside the call button; floating, it covered Remove, Our services and Change my order. */
.shopbar #wa-slot { flex: none; display: flex; }
.shopbar #wa-slot:empty { display: none; }
.shopbar .wa-fab { position: static; width: 44px; height: 44px; box-shadow: none; }
.shopbar .wa-fab svg { width: 26px; height: 26px; }
/* 10. Delete my file is the last thing on the order page, apart from Change my order; its question is the page's own. */
#delete { margin-top: 28px; border-width: 1px; font-weight: 600; }
.restart-dlg .restart-actions button.danger { background: var(--red); border-color: var(--red); color: #fff; }
/* 12. Nothing a customer must read is under 14 px. */
.steps, .tile small, .sheet-card figcaption, .file-list small, .file-list .file-chip, #colour-pages-row small, .print-hints .note,
.org-hint, .org-note, .org-marks label, .keep-open, .so-tip { font-size: 0.875rem; }
@media (min-width: 560px) { .tracker { font-size: 0.875rem; } }
/* 13. Green words on the pale green ground were 4.27:1; this ink is 7:1 there. The dark scheme keeps its light green. */
:root { --green-ink: #0b5a3f; }
:root[data-theme="dark"] { --green-ink: var(--green); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --green-ink: var(--green); } }
.shopbar .pill.on, .file-list button.unlock.open, .copy-btn.done, .ready-line { color: var(--green-ink); }
@media (prefers-reduced-motion: reduce) { #sendbar .send-total.roll { animation: none; } }
/* 2. The sorted list: a row's lesser tools fold under "More"; Continue stays in reach and counts the open questions. */
.sorted-list .so-more { flex-basis: 100%; min-width: 0; }
.sorted-list .so-more > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink); font-weight: 600; cursor: pointer; }
.sorted-list .so-more > summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.sorted-list .so-more[open] > summary { margin-bottom: 4px; }
.sorted .primary.big[data-left]::after { content: " · " attr(data-left); font-weight: 500; }
@media (max-width: 859px) {
  .sorted .primary.big { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 6; box-shadow: 0 0 0 8px var(--paper), var(--shadow-2); }
}
/* a question's two answers stand side by side (they were stacked, each a full row) */
.sorted-list .ms-ask > button { flex: 1 1 0; min-width: 118px; max-width: none; padding: 8px 10px; font-size: 0.9375rem; line-height: 1.25; }
