:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #13243a;
  --muted: #6c7888;
  --line: #dce3ea;
  --surface: #ffffff;
  --background: #f2f5f8;
  --accent: #157a6e;
  --accent-dark: #0e5f56;
  --accent-soft: #e2f2ef;
  --danger: #b13b3b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body { margin: 0; background: var(--background); color: var(--ink); }
.shell { width: min(780px, 100%); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 18px max(40px, env(safe-area-inset-bottom)); }
.app-header { margin-bottom: 18px; }
h1, h2, p { margin-top: 0; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.02em; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 850; line-height: 1; letter-spacing: .15em; text-transform: uppercase; }
.budget-title { display: flex; align-items: center; gap: 8px; }
.draft-bell { position: relative; display: grid; place-items: center; width: 24px; min-height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--accent-dark); font-size: 14px; }
.draft-bell span { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #d88922; color: white; font-size: 10px; }
.draft-menu { position: absolute; z-index: 30; width: min(420px, calc(100vw - 36px)); margin-top: 0; padding: 14px; border: 1px solid #ead8b2; border-radius: 17px; background: white; box-shadow: 0 18px 50px rgba(19,36,58,.18); }
.draft-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.draft-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 9px 10px; border-top: 1px solid #edf1f4; border-radius: 0; background: white; color: var(--ink); text-align: left; }
.draft-menu-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.draft-menu-item small { flex: 0 0 auto; color: #9a651c; font-size: 10px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; margin-bottom: 4px; }
.tabs { overflow-x: auto; }
.tabs-track { display: flex; align-items: flex-end; gap: clamp(18px, 4vw, 34px); width: max-content; transition: transform .28s cubic-bezier(.2,.75,.25,1); will-change: transform; }
.tab { min-height: auto; padding: 0 0 9px; border: 0; border-bottom: 4px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: clamp(25px, 6vw, 46px); font-weight: 820; letter-spacing: -.045em; white-space: nowrap; }
.tab:hover { background: transparent; color: var(--ink); }
.tab.active { border-bottom-color: var(--accent); color: var(--ink); }
.write-control { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; cursor: pointer; }
.write-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px; background: #c6d0da; transition: .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(19,36,58,.2); transition: .2s ease; }
.write-control input:checked ~ .switch { background: var(--accent); }
.write-control input:checked ~ .switch::after { transform: translateX(16px); }
.write-control input:focus-visible ~ .switch { outline: 3px solid rgba(21,122,110,.25); outline-offset: 2px; }
.write-control.unavailable { cursor: not-allowed; opacity: .68; }
.write-copy { display: grid; gap: 0; white-space: nowrap; }
.write-copy strong { font-size: 11px; line-height: 1.05; }
.write-copy small { color: var(--muted); font-size: 9px; line-height: 1.1; }
.card { margin-bottom: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 30px rgba(19,36,58,.055); }
.composer { display: grid; gap: 16px; }
.suggestion-heading, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-label { display: block; margin-bottom: 3px; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.adaptive-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; transition: color .2s ease; }
.adaptive-label[data-state="loading"] { color: var(--accent); }
.adaptive-label[data-state="loading"]::before { content: ""; width: 10px; height: 10px; border: 2px solid #b8dbd6; border-top-color: var(--accent); border-radius: 50%; animation: suggestion-spin .65s linear infinite; }
.adaptive-label[data-state="updated"] { color: var(--accent-dark); font-weight: 750; }
.adaptive-label[data-state="updated"]::before { content: "✓"; font-size: 12px; }
.suggestion-cloud { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-height: 38px; margin: 0; }
.suggestion-cloud .suggestion-chip { transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease; }
.suggestion-cloud.is-loading .suggestion-chip { opacity: .38; transform: translateY(2px) scale(.985); }
.suggestion-cloud.is-updating .suggestion-chip { animation: suggestion-in .36s cubic-bezier(.2,.75,.25,1) both; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(2) { animation-delay: 38ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(3) { animation-delay: 76ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(4) { animation-delay: 114ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(5) { animation-delay: 152ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(6) { animation-delay: 190ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(7) { animation-delay: 228ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(8) { animation-delay: 266ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(9) { animation-delay: 304ms; }
.suggestion-cloud.is-updating .suggestion-chip:nth-child(10) { animation-delay: 342ms; }
@keyframes suggestion-in { from { opacity: 0; transform: translateY(9px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes suggestion-spin { to { transform: rotate(360deg); } }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-area { margin: 0 0 14px; padding: 12px; border: 1px dashed #aebdca; border-radius: 16px; background: #f8fafb; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.upload-area.is-dragging { border-color: var(--accent); background: #eef7f5; transform: translateY(-1px); }
.upload-picker { display: flex; align-items: center; gap: 12px; min-height: 58px; margin: 0; cursor: pointer; }
.upload-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-size: 25px; font-weight: 500; line-height: 1; }
.upload-copy { display: grid; gap: 2px; }
.upload-copy strong { font-size: 14px; }
.upload-copy small, .upload-selection small { color: var(--muted); font-size: 11px; font-weight: 500; }
.upload-selection { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.upload-selection > span { display: grid; min-width: 0; gap: 2px; }
.upload-selection strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.upload-note { margin: 7px 0 0 50px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.upload-note:not(:empty) { min-height: 13px; }
.receipt-result { display: grid; gap: 12px; margin-top: 12px; padding: 18px; border-radius: 16px; background: #eef7f5; }
.receipt-result > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.receipt-result > div strong { font-size: 12px; }
.receipt-result > div span, .receipt-result > p { color: var(--muted); font-size: 10px; }
.receipt-result pre { max-height: 230px; margin: 0; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--ink); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt-result > p { margin: 0; line-height: 1.4; }
.receipt-result-head { align-items: center; }
.receipt-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 2px 0 6px; padding: 0; list-style: none; }
.receipt-progress li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px 10px; border-radius: 10px; background: #e3eceb; color: var(--muted); font-size: 11px; font-weight: 750; }
.receipt-progress li span { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #cad8d6; color: #50636d; font-size: 10px; }
.receipt-progress li.is-current { background: #fff; color: var(--accent-dark); box-shadow: inset 0 0 0 2px rgba(21,122,110,.28); }
.receipt-progress li.is-current span { background: var(--accent); color: #fff; }
.receipt-progress li.is-complete { color: var(--accent-dark); }
.receipt-progress li.is-complete span { background: var(--accent-soft); color: var(--accent-dark); }
.receipt-progress li.is-error { background: #fae8e8; color: var(--danger); }
.receipt-progress li.is-error span { background: var(--danger); color: #fff; }
.receipt-alert { width: 100%; padding: 11px 13px; border: 1px solid #e7b76c; border-radius: 12px; background: #fff5df; color: #74420d; font-size: 12px; line-height: 1.45; }
.receipt-alert.is-error { border-color: #e5aaaa; background: #fae8e8; color: var(--danger); }
.manual-entry { padding: 0; background: transparent; }
.input-row { display: block; }
.input-copy { position: relative; display: grid; min-width: 0; }
.input-copy textarea { position: relative; z-index: 2; grid-column: 1; padding-right: 82px; border-radius: 15px 15px 0 0; }
.suggestion-panel { position: relative; z-index: 1; width: 100%; margin-top: -1px; padding: 12px 14px 14px; border: 1px solid #bcd8d3; border-top: 0; border-radius: 0 0 15px 15px; background: var(--accent-soft); box-shadow: 0 10px 18px rgba(19,36,58,.06); }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
textarea, input { width: 100%; border: 1px solid #b9c5d1; border-radius: 14px; background: #fbfcfd; color: var(--ink); font: inherit; font-size: 17px; outline: none; }
select { width: 100%; min-height: 44px; padding: 0 38px 0 12px; border: 1px solid #b9c5d1; border-radius: 12px; background: white; color: var(--ink); font: inherit; font-size: 14px; }
textarea { min-height: 124px; padding: 15px; resize: vertical; }
input { padding: 13px 14px; margin-bottom: 12px; }
textarea:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,122,110,.14); }
button { min-height: 46px; border: 0; border-radius: 13px; padding: 0 18px; background: var(--accent); color: white; font: inherit; font-weight: 760; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { cursor: wait; opacity: .6; }
.recognize { position: absolute; z-index: 4; top: 12px; right: 12px; display: grid; place-content: center; width: 54px; min-height: 40px; padding: 0; border-radius: 11px; box-shadow: 0 4px 12px rgba(19,36,58,.15); }
.recognize strong { font-size: 15px; }
.secondary { background: #e7ecf1; color: var(--ink); }
.secondary:hover { background: #d8e0e7; }
.chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-size: 13px; }
.chip:hover { border-color: #9ccbc5; background: #eef7f5; }
.suggestion-chip.is-active { border-color: var(--accent); background: var(--accent); color: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.privacy, .note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 750; }
.draft-summary { display: grid; gap: 10px; margin-top: 18px; }
.draft-operation { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcfd; }
.draft-operation-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.draft-operation-title span { color: var(--accent-dark); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.draft-operation-title strong { font-size: 22px; }
.draft-operation dl { display: grid; grid-template-columns: 1.5fr 1.2fr .7fr; gap: 14px; margin: 0; }
.draft-operation dl div { min-width: 0; }
.draft-operation dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.draft-operation dd { margin: 0; font-size: 13px; line-height: 1.35; }
.draft-source { display: grid; gap: 4px; margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: #f4f8f8; font-size: 13px; line-height: 1.4; }
.draft-source:empty { display: none; }
.draft-source span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.draft-operation.needs-edit { border-color: #ead8b2; background: #fffdfa; }
.operation-editor { margin: 16px -16px -16px; padding: 14px 16px 16px; border-top: 1px solid #ead8b2; border-radius: 0 0 16px 16px; background: #fff7e7; }
.operation-editor-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.operation-editor-title strong { color: #805500; font-size: 13px; }
.operation-editor-title span { color: #9a7b42; font-size: 10px; }
.operation-fields { display: grid; gap: 12px; }
.draft-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.draft-field > span, .draft-field legend { display: block; margin: 0 0 7px; color: #725322; font-size: 11px; font-weight: 750; }
.draft-field input { min-height: 44px; margin: 0; padding: 10px 12px; background: white; font-size: 14px; }
.draft-field-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.field-chip.is-active { border-color: var(--accent); background: var(--accent); color: white; }
.apply-correction { width: 100%; min-height: 42px; margin-top: 13px; }
.memory-editor { margin-top: 12px; padding: 11px; border: 1px solid #e6c988; border-radius: 12px; background: rgba(255,255,255,.55); }
.memory-toggle { display: flex; align-items: center; gap: 9px; margin: 0; color: #725322; font-size: 12px; cursor: pointer; }
.memory-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.memory-phrase { display: grid; gap: 6px; margin-top: 10px; }
.memory-phrase > span { color: #725322; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.memory-phrase input { margin: 0; min-height: 40px; padding: 8px 10px; background: white; font-size: 13px; }
.memory-phrase small { color: #8b744e; font-size: 10px; line-height: 1.35; }
.operation-complete { margin: 13px 0 0; color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.operation-ready { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.operation-ready .operation-complete { margin: 0; }
.edit-operation { min-height: 34px; padding: 0 12px; font-size: 11px; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.feedback { min-height: 24px; margin: 2px 4px 20px; color: var(--accent-dark); font-size: 14px; font-weight: 650; }
.feedback:empty { display: none; }
.feedback.error { color: var(--danger); }
.history-section { padding-top: 2px; }
.history-section > .section-title { align-items: baseline; margin-bottom: 14px; }
.text-button { min-height: auto; padding: 4px; background: transparent; color: var(--accent); font-size: 13px; }
.text-button:hover { background: transparent; color: var(--accent-dark); }
.history { display: grid; gap: 18px; }
.history-day { display: grid; gap: 10px; }
.history-day-title { margin: 0; padding: 0 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.history-group { overflow: hidden; padding: 0 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 7px 20px rgba(19,36,58,.045); }
.history-group-title { display: flex; align-items: center; gap: 8px; padding: 11px 0 6px; }
.history-group-title small { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: #f0f3f6; color: var(--muted); font-size: 11px; font-weight: 700; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid #edf1f4; }
.history-item:first-of-type { border-top: 0; }
.history-item p { min-width: 0; margin: 0; font-size: 14px; font-weight: 450; line-height: 1.4; overflow-wrap: anywhere; }
.history-item.is-draft { margin: 0 -15px; padding: 12px 15px; border-left: 4px solid #d88922; background: #fff9ee; }
.open-draft, .confirm-draft { min-height: 30px; padding: 0 10px; background: #d88922; font-size: 11px; white-space: nowrap; }
.confirm-draft { background: var(--accent); }
.delete-draft { width: 30px; min-height: 30px; padding: 0; background: transparent; color: #a85f18; font-size: 17px; }
.delete-draft:hover { background: #f7e5cb; color: #82440d; }
.draft-drawer { position: fixed; z-index: 50; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: min(520px, calc(100vw - 36px)); max-height: min(78vh, 760px); overflow: auto; padding-top: 38px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 22px 70px rgba(19,36,58,.24); }
.draft-drawer .draft { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.draft-drawer-close { position: absolute; z-index: 2; top: 8px; right: 10px; width: 30px; min-height: 30px; padding: 0; border-radius: 50%; background: #edf1f4; color: var(--ink); font-size: 20px; }
.history-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.history-status { padding: 5px 9px; border-radius: 999px; background: #edf1f4; font-size: 12px; font-weight: 600; }
.overview-section { display: grid; gap: 14px; }
.overview-title { margin-bottom: -8px; }
.overview-updated { margin: 0; color: var(--muted); font-size: 11px; }
.overview-updated.is-loading { display: flex; align-items: center; gap: 7px; color: var(--accent-dark); }
.overview-updated.is-loading::before { content: ""; width: 12px; height: 12px; border: 2px solid #b8dbd6; border-top-color: var(--accent); border-radius: 50%; animation: suggestion-spin .65s linear infinite; }
.overview-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric-card, .overview-block { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 24px rgba(19,36,58,.045); }
.metric-card { display: grid; align-content: space-between; min-height: 104px; padding: 15px; }
.metric-card span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.metric-card strong { margin-top: 12px; font-size: 22px; letter-spacing: -.035em; }
.overview-block { padding: 17px; }
.overview-block > h2 { margin-bottom: 14px; font-size: 18px; }
.overview-list, .category-list { display: grid; gap: 9px; }
.overview-item { display: grid; gap: 5px; padding: 12px 0; border-top: 1px solid #edf1f4; }
.overview-item:first-child { padding-top: 0; border-top: 0; }
.overview-item-main, .overview-item-meta, .category-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.overview-item-main strong, .category-line strong { min-width: 0; }
.overview-item-main time, .overview-item-meta { color: var(--muted); font-size: 11px; }
.overview-item-meta span:last-child { text-align: right; }
.category-item { display: grid; gap: 6px; }
.category-line span { color: var(--muted); font-size: 11px; }
.category-track { height: 8px; overflow: hidden; border-radius: 999px; background: #edf2f2; }
.category-fill { height: 100%; min-width: 3px; border-radius: inherit; background: var(--accent); }
.status-confirmed { background: var(--accent-soft); color: var(--accent-dark); }
.status-failed { background: #fae8e8; color: var(--danger); }
.receipt-result > .receipt-draft-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; width: 100%; margin: 8px 0 4px; }
.receipt-draft-form[hidden] { display: none; }
.receipt-draft-form label { display: grid; min-width: 0; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.25; }
.receipt-draft-form input, .receipt-draft-form select { width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid #b8c7d2; border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; }
.receipt-draft-form input:focus, .receipt-draft-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,122,110,.14); }
.receipt-draft-form input:disabled, .receipt-draft-form select:disabled { border-color: #d7e0e5; background: #f5f7f8; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.receipt-draft-form.is-readonly::before { content: "Проверьте итоговые данные перед записью"; grid-column: 1 / -1; color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.receipt-draft-form .wide { grid-column: 1 / -1; }
.receipt-draft-form button { justify-self: start; }
.receipt-draft-form .receipt-save { justify-self: end; min-width: 220px; }
.receipt-missing { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff5df; color: #a85f18; font-size: 12px; line-height: 1.4; }
.receipt-missing:empty { display: none; }
.receipt-duplicate { padding: 12px; border: 1px solid #e7b76c; border-radius: 12px; background: #fff5df; color: #74420d; font-size: 12px; }
.receipt-duplicate p { margin: 0 0 8px; }
.receipt-duplicate .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-duplicate button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.receipt-result details { margin: 10px 0; }
.receipt-result summary { cursor: pointer; color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.upload-note.is-processing { display: flex; align-items: center; gap: 8px; color: var(--accent-dark); font-weight: 700; }
.upload-note.is-processing::before { content: ""; width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid #b8dbd6; border-top-color: var(--accent); border-radius: 50%; animation: suggestion-spin .7s linear infinite; }
.receipt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 12px 0; }
.receipt-actions[hidden] { display: none; }
.receipt-actions span { flex: 1 1 220px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.empty-state { color: var(--muted); }
.login { max-width: 520px; }
@media (max-width: 680px) {
  .top-row { gap: 10px; min-height: 30px; margin-bottom: 5px; }
  .write-control { padding: 0; border: 0; background: transparent; }
  .tabs { width: 100%; overflow: hidden; touch-action: pan-y; }
  .tabs-track { gap: 18px; }
  .tabs-track.is-dragging { transition: none; }
  .tab { font-size: clamp(24px, 8vw, 38px); }
  .draft-operation dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .shell { padding-inline: 12px; }
  .eyebrow { font-size: 9px; }
  .write-copy strong { font-size: 10px; }
  .write-copy small { font-size: 8px; }
  .card { padding: 17px; border-radius: 18px; }
  .input-copy textarea { padding-right: 72px; }
  .recognize { top: 10px; right: 10px; width: 50px; min-height: 38px; }
  .recognize strong { font-size: 14px; }
  .upload-area { padding: 10px 12px; }
  .upload-picker { width: 100%; }
  .upload-note { margin-left: 0; }
  .suggestion-panel { padding: 10px 12px 12px; }
  .overview-metrics { grid-template-columns: 1fr 1fr; }
  .actions button { flex: 1; }
  .history-item { align-items: center; flex-direction: row; gap: 10px; }
  .history-item p { font-size: 13px; }
  .history-meta { flex: 0 0 auto; width: auto; }
  .draft-operation dl { grid-template-columns: 1fr; }
  .receipt-result { padding: 14px; }
  .receipt-result > .receipt-draft-form { grid-template-columns: 1fr; gap: 12px; }
  .receipt-draft-form .wide { grid-column: auto; }
  .receipt-draft-form .receipt-save { justify-self: stretch; width: 100%; min-width: 0; }
  .receipt-progress { gap: 5px; }
  .receipt-progress li { justify-content: center; padding: 8px 5px; font-size: 0; }
  .receipt-progress li span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .adaptive-label[data-state="loading"]::before, .suggestion-cloud.is-updating .suggestion-chip { animation: none; }
  .suggestion-cloud .suggestion-chip { transition: none; }
}
