@charset "UTF-8";

@font-face {
  font-family: "Struk Thermal";
  src: url("fonts/Inconsolata-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 50% 200%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #223c34;
  --muted: #858981;
  --green: #153e35;
  --orange: #e77c48;
  --border: #e8e8df;
  --canvas: #f8f9f5;
  --paper-width: 58mm;
  --paper-margin: 5mm;
  --receipt-font-size: 12px;
  --receipt-weight: 400;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #eaa476; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.app { min-height: 100vh; }
.sidebar { width: 224px; background: var(--green); color: #fff; position: fixed; inset: 0 auto 0 0; padding: 36px 20px 22px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; margin: 0 13px 62px; font-size: 35px; line-height: 1; letter-spacing: -1.9px; font-weight: 750; width: fit-content; }
.brand-icon { width: 36px; height: 40px; display: grid; place-items: center; color: #ffba87; transform: rotate(-7deg); }
.brand-icon .icon { width: 36px; height: 36px; stroke-width: 1.8; }
.brand-dot { color: #f2a575; }
.sidebar-label { font-size: 9px; letter-spacing: 1.9px; font-weight: 600; color: #86a99d; margin: 0 16px 18px; }
.navigation { display: grid; gap: 7px; }
.nav-item { min-height: 47px; width: 100%; text-decoration: none; display: flex; gap: 12px; align-items: center; padding: 12px 15px; border: 0; background: none; color: #b8cec4; font-size: 13px; font-weight: 500; border-radius: 7px; text-align: left; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: #ffffff0b; color: white; }
.nav-item.active { background: #30564c; color: #fff; }
.nav-item.active .icon { color: #f2b68e; }
.nav-dot { width: 5px; height: 5px; background: #f2b68e; border-radius: 50%; margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 60px; }
.sidebar-note { background: #ffffff06; border: 1px solid #ffffff17; border-radius: 10px; padding: 20px 17px; overflow: hidden; position: relative; }
.sidebar-note::after { content: ""; position: absolute; width: 105px; height: 105px; border: 1px solid #ffffff0c; border-radius: 50%; top: -37px; right: -36px; box-shadow: 0 0 0 13px #ffffff03, 0 0 0 27px #ffffff03; }
.note-icon { color: #eab38d; display: block; margin-bottom: 16px; }
.note-icon .icon { width: 24px; height: 24px; }
.sidebar-note h3 { font-size: 15px; line-height: 1.6; font-weight: 550; margin: 0 0 9px; letter-spacing: -.2px; }
.sidebar-note p { font-size: 11px; color: #9ab5a9; line-height: 1.8; margin: 0 0 20px; }
.sidebar-note > span:last-child { display: flex; align-items: center; justify-content: space-between; color: #edba99; font-size: 10px; letter-spacing: .3px; }
.sidebar-note > span:last-child .icon { width: 16px; height: 16px; }
.local-status { margin: 23px 4px 0; display: flex; gap: 8px; align-items: center; font-size: 10px; color: #a5beb3; }
.status-dot { width: 6px; height: 6px; background: #8db5a1; border-radius: 50%; box-shadow: 0 0 0 3px #8db5a10f; flex-shrink: 0; }
.main-content { margin-left: 224px; padding: 0 42px; max-width: 1800px; }
.topbar { height: 84px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.breadcrumb { display: flex; gap: 12px; align-items: center; color: #969a91; font-size: 12px; }
.breadcrumb .icon { width: 11px; height: 11px; color: #a2a79b; }
.breadcrumb span { color: #4d6156; }
.topbar-right { display: flex; align-items: center; gap: 20px; font-size: 10px; color: #888d82; }
.user-avatar { display: grid; place-items: center; background: #e8ecdf; width: 30px; height: 30px; border-radius: 50%; color: #5b6d51; font-size: 11px; font-weight: 600; border: 3px solid #f1f3ec; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 33px 0 32px; }
.eyebrow { font-size: 8px; letter-spacing: 1.8px; font-weight: 650; display: flex; gap: 6px; align-items: center; color: #7d877b; margin-bottom: 11px; }
.eyebrow > span { width: 5px; height: 5px; background: #b3be9d; border-radius: 50%; }
h1 { font-size: clamp(25px, 2.4vw, 36px); letter-spacing: -1.2px; margin: 0 0 9px; font-weight: 650; line-height: 1.2; }
h1 > span { color: var(--orange); }
.page-header p { font-size: 12px; margin: 0; color: #7d8575; line-height: 1.8; }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; padding-top: 10px; }
.button { border-radius: 6px; border: 1px solid transparent; min-height: 42px; padding: 11px 17px; font-size: 12px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 8px; transition: background .16s, box-shadow .16s, transform .16s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button .icon { width: 16px; height: 16px; }
.button-primary { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 3px 5px #c97f4312; }
.button-primary:hover { background: #d96e3b; border-color: #d96e3b; }
.button-secondary { background: #fff; border-color: #e1e5da; color: #52604e; }
.button-secondary:hover { background: #f0f3ea; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(330px, 1fr); gap: 30px; align-items: start; }
.editor-heading, .preview-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; min-height: 20px; gap: 8px; }
.editor-heading h2, .preview-heading h2 { font-size: 14px; letter-spacing: -.25px; font-weight: 650; margin: 0; }
.save-status { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #7d8974; text-align: right; }
.save-status .icon { width: 12px; height: 12px; color: #6d8b67; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 23px; margin-bottom: 15px; }
.section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.section-icon { display: grid; place-items: center; color: #71816a; border: 1px solid #e8ecdf; background: #f7f8f2; border-radius: 8px; width: 33px; height: 33px; flex-shrink: 0; }
.section-icon .icon { width: 17px; height: 17px; stroke-width: 1.5; }
.section-heading h3 { font-size: 14px; font-weight: 650; margin: 0 0 5px; letter-spacing: -.1px; }
.section-heading p { font-size: 11px; color: #8b9282; margin: 0; line-height: 1.5; }
.section-number { color: #c8cdc0; font-size: 10px; margin-left: auto; align-self: flex-start; padding-top: 4px; font-variant-numeric: tabular-nums; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { min-width: 0; }
.full { grid-column: 1 / -1; }
.field > label, .field-label, .label-row > label { display: block; font-size: 12px; font-weight: 550; color: #596450; margin-bottom: 8px; line-height: 1.5; }
.required { color: #d2946f; font-weight: 400; }
input:not([type="checkbox"]), textarea, select { display: block; width: 100%; min-width: 0; background: #fff; border: 1px solid #e2e5db; color: #46503f; border-radius: 5px; padding: 10px 11px; font-size: 13px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]) { height: 42px; }
input::placeholder, textarea::placeholder { color: #afb3a6; }
input:not([type="checkbox"]):hover, textarea:hover, select:hover { border-color: #b9c5ac; }
input:not([type="checkbox"]):focus, textarea:focus, select:focus { outline: none; border-color: #829d77; box-shadow: 0 0 0 3px #829d7716; }
input:user-invalid, textarea:user-invalid { border-color: #ce795f; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="datetime-local"] { font-size: 13px; }
textarea { resize: vertical; min-height: 62px; }
.uppercase { text-transform: uppercase; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.text-button { border: 0; padding: 0; background: none; color: #718866; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 500; text-decoration: none; line-height: 1.5; }
.text-button:hover { color: #284b31; }
.text-button .icon { width: 12px; height: 12px; }
.input-affix { display: flex; align-items: center; position: relative; }
.input-affix > span { position: absolute; left: 11px; font-size: 12px; color: #8f9885; pointer-events: none; }
.input-affix > input { padding-left: 34px; }
.input-affix.suffix > span { left: auto; right: 12px; }
.input-affix.suffix > input { padding: 10px 43px 10px 11px; }
.field-hint { font-size: 10px; line-height: 1.7; color: #89957d; margin: 7px 0 0; }
.field-hint code { color: #738669; font-size: 9px; background: #f3f5ee; padding: 2px 4px; border-radius: 3px; }
.segmented { display: flex; padding: 3px; border: 1px solid #e8e9e1; border-radius: 5px; background: #f4f5ef; gap: 3px; }
.segmented > button { flex: 1; background: transparent; border: 1px solid transparent; border-radius: 3px; padding: 7px 9px; color: #849178; font-size: 11px; white-space: nowrap; transition: background .15s, color .15s; }
.segmented > button:hover { color: #456343; }
.segmented > button.selected { background: #fff; border-color: #e2e7d9; color: #55694b; box-shadow: 0 1px 3px #334a2b07; font-weight: 600; }
.calculation-switch { width: 100%; }
.subsidy-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-block: 1px solid #f0f1eb; }
.subsidy-switch > div > label, .setting-toggle > div > label { font-size: 12px; font-weight: 550; cursor: pointer; }
.subsidy-switch p, .setting-toggle p { margin: 5px 0 0; font-size: 10px; color: #89957c; line-height: 1.6; }
.switch { position: relative; flex-shrink: 0; width: 31px; height: 18px; display: inline-flex; margin: 0 !important; cursor: pointer; }
.switch input { position: absolute; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch > span { width: 31px; height: 18px; background: #d9ded1; border-radius: 12px; transition: background .15s; }
.switch > span::after { content: ""; width: 12px; height: 12px; background: white; border-radius: 50%; position: absolute; left: 3px; top: 3px; box-shadow: 0 1px 2px #0001; transition: transform .15s; }
.switch input:checked + span { background: #64815a; }
.switch input:checked + span::after { transform: translateX(13px); }
.switch input:focus-visible + span { outline: 3px solid #eaa476; outline-offset: 3px; }
.total-summary { margin-top: 22px; padding: 16px; border-radius: 6px; background: #f4f7ef; border: 1px solid #e8eedf; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total-summary > div > span { font-size: 10px; color: #748765; display: block; margin-bottom: 6px; }
.total-summary strong { display: block; color: #47643c; font-size: 23px; letter-spacing: -.7px; font-weight: 650; overflow-wrap: anywhere; }
.total-volume { color: #788e69; background: #e9efdf; font-size: 10px; padding: 6px 8px; border-radius: 4px; flex-shrink: 0; }
.example-note { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; color: #89977d; padding: 1px 5px; line-height: 1.7; margin: 19px 0 0; }
.example-note .icon { width: 13px; height: 13px; margin-top: 1px; }
.preview-sticky { position: sticky; top: 24px; }
.preview-column { align-self: stretch; min-width: 0; }
.live-badge { display: flex; align-items: center; gap: 5px; color: #839477; font-size: 7px; font-weight: 600; letter-spacing: .8px; padding: 4px 6px; border: 1px solid #e4e9db; border-radius: 4px; background: #f1f5e9; }
.live-badge > span { height: 4px; width: 4px; background: #7d9a6a; border-radius: 50%; }
.preview-panel { border: 1px solid #e4e6db; border-radius: 10px; overflow: hidden; background: #eeeee5; }
.preview-toolbar { display: flex; align-items: center; padding: 14px 17px; gap: 10px; background: #fff; border-bottom: 1px solid var(--border); }
.preview-toolbar > span { font-size: 11px; color: #87917e; margin-right: auto; white-space: nowrap; }
.paper-switch { flex-shrink: 0; }
.paper-switch > button { font-size: 9px; padding: 5px 8px; }
.icon-button { display: grid; place-items: center; background: none; border: 0; width: 30px; height: 30px; padding: 5px; border-radius: 4px; flex-shrink: 0; color: #87917b; }
.icon-button:hover { background: #f0f3e8; color: #415e34; }
.icon-button .icon { width: 17px; height: 17px; }
.preview-stage { display: flex; justify-content: center; align-items: flex-start; padding: 34px 18px 40px; min-height: 350px; background-color: #eeeee5; background-image: radial-gradient(#d8dccd 0.65px, transparent 0.65px); background-size: 9px 9px; }
.preview-bottom { display: flex; justify-content: space-between; align-items: center; padding: 14px 17px; gap: 7px; border-top: 1px solid #e0e3d6; background: #f6f7ef; }
.preview-bottom > span { display: flex; align-items: center; gap: 5px; font-size: 8px; color: #98a18c; }
.preview-bottom > span > .icon { width: 12px; height: 12px; }
.preview-bottom .text-button { font-size: 8px; white-space: nowrap; }
.print-tip { display: flex; gap: 11px; margin-top: 20px; padding: 17px; border: 1px solid #e7e8dd; border-radius: 8px; background: #f3f5eb; }
.tip-icon { width: 29px; height: 29px; display: grid; place-items: center; background: #e8eddd; border: 1px solid #e0e7d3; color: #7d8c6f; border-radius: 6px; flex-shrink: 0; }
.tip-icon .icon { width: 16px; height: 16px; }
.print-tip strong { font-size: 12px; font-weight: 600; color: #6c7a60; display: block; padding-top: 1px; }
.print-tip p { font-size: 11px; line-height: 1.9; color: #889578; margin: 5px 0 9px; }
.print-tip .text-button { font-size: 9px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 8px; color: #a2a894; padding: 19px 0 0; }
.privacy-note .icon { width: 12px; height: 12px; }
.app-footer { border-top: 1px solid var(--border); margin-top: 36px; padding: 20px 0 25px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 8px; color: #b0b5a7; }
.app-footer > span:first-child { color: #839376; font-size: 12px; font-weight: 700; letter-spacing: -.4px; }
.app-footer > span:first-child > span { margin-left: 8px; font-weight: 400; letter-spacing: 0; font-size: 8px; color: #a1a991; }

/* Receipt dimensions are shared by the live preview and the print document. */
.receipt {
  --receipt-scale: 1.2;
  width: calc(var(--paper-width) * var(--receipt-scale));
  flex-shrink: 0;
  padding: calc(6mm * var(--receipt-scale)) calc(var(--paper-margin) * var(--receipt-scale)) calc(7mm * var(--receipt-scale));
  font-family: "Struk Thermal", "Consolas", monospace;
  font-size: calc(var(--receipt-font-size) * var(--receipt-scale));
  font-weight: var(--receipt-weight);
  line-height: 1.3;
  color: #000;
  background: #fff;
  box-shadow: 0 4px 8px #55573a0c, 0 15px 28px #55573a0a;
  position: relative;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
  font-variant-ligatures: none;
  font-variation-settings: "wdth" var(--line-width, 90);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.receipt::after { content: ""; position: absolute; inset: auto 0 -5px; height: 6px; background: linear-gradient(135deg, #fff 25%, transparent 25%) -5px 0 / 10px 10px, linear-gradient(225deg, #fff 25%, transparent 25%) -5px 0 / 10px 10px; }
.receipt-header { text-align: center; line-height: 1.35; }
.receipt-brand { margin-bottom: .35em; font-family: Arial, sans-serif; font-size: .91em; font-weight: 900; }
/* The supplied square WebP includes empty space and a light checkerboard.
   Crop its display box and render the light background white; keep the source intact. */
.receipt-logo { width: calc(31mm * var(--receipt-scale)); max-width: 100%; aspect-ratio: 320 / 78; overflow: hidden; margin: 0 auto .35em; }
.receipt-logo img { display: block; width: 100%; height: auto; transform: translateY(-37.5%); filter: grayscale(1) contrast(4); }
.receipt-fit { white-space: nowrap; font-size: calc(1em * var(--line-font-scale, 1)); font-variation-settings: "wdth" var(--line-width, 90); }
.receipt-station-id { font-weight: 700; font-size: calc(1.15em * var(--line-font-scale, 1)); }
.receipt-business { font-weight: var(--receipt-weight); }
.receipt-footer { white-space: pre-line; overflow-wrap: anywhere; }
.receipt-meta { margin-top: .45em; }
.receipt-meta-line { display: flex; align-items: baseline; justify-content: space-between; gap: .8em; }
.receipt-meta-line > span { min-width: 0; flex-shrink: 0; }
.receipt-meta-line > span:last-child { text-align: right; }
.receipt-rule { margin: .7em 0; border: 0; border-top: 1px dashed #000; }
.receipt-row { display: grid; grid-template-columns: 39% .65em minmax(0, 1fr); gap: .12em; align-items: baseline; }
.receipt-row > span { min-width: 0; white-space: nowrap; }
.receipt-row.price-row { grid-template-columns: 61% .65em minmax(0, 1fr); }
.receipt-section-title { margin-bottom: .12em; }
.receipt-payment { padding: .15em 0 .2em; }
.receipt-payment-amount { text-align: right; font-size: calc(1.06em * var(--line-font-scale, 1)); margin-top: .3em; }
.receipt-footer { text-align: center; padding-top: .25em; line-height: 1.4; }
.receipt-blank { color: #777; }
.print-root { display: none; }
.print-root.measuring { position: absolute; left: -20000px; top: 0; display: block; visibility: hidden; }
.print-root .receipt { --receipt-scale: 1; box-shadow: none; }
.print-root .receipt::after { display: none; }

.modal { border: 1px solid #e4e6db; border-radius: 14px; color: var(--ink); width: min(480px, calc(100% - 32px)); padding: 27px; max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 20px 100px #102f3326; }
.modal::backdrop { background: #14271f70; backdrop-filter: blur(3px); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 25px; }
.modal-heading .eyebrow { font-size: 7px; margin-bottom: 9px; }
.modal-heading h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.8px; }
.modal-heading > .icon-button { margin: -8px -8px 0 0; }
.settings-content { display: grid; gap: 19px; }
.settings-content .field > label, .settings-content .field-label { font-size: 11px; }
.settings-content .segmented > button { font-size: 11px; padding: 9px; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 4px; }
.setting-toggle > div > label { font-size: 11px; }
.settings-note { background: #f3f6ec; color: #80906f; font-size: 10px; line-height: 1.8; padding: 13px 14px; border-radius: 5px; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; padding-top: 18px; border-top: 1px solid #eef0e7; }
.guide-modal { width: min(520px, calc(100% - 32px)); }
.guide-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 21px; }
.guide-steps li { display: flex; align-items: flex-start; gap: 13px; }
.guide-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #5c7b4e; background: #eff3e6; border: 1px solid #e5ebd8; font-size: 11px; flex-shrink: 0; }
.guide-steps h3 { font-size: 12px; margin: 3px 0 6px; }
.guide-steps p { font-size: 11px; line-height: 1.9; color: #88917e; margin: 0; }
.guide-callout { display: flex; gap: 9px; align-items: flex-start; padding: 14px; background: #f5f6ee; border-radius: 6px; margin-top: 22px; color: #829273; }
.guide-callout > .icon { width: 16px; height: 16px; margin-top: 3px; }
.guide-callout > p { font-size: 10px; line-height: 1.8; margin: 0; }
.small-modal { width: min(430px, calc(100% - 32px)); }
.new-dialog-description { font-size: 12px; line-height: 1.9; color: #86917c; margin: 0; }
.toast { position: fixed; left: calc(50% + 112px); bottom: 25px; transform: translate(-50%, 20px); background: #244c3f; color: #fff; padding: 13px 19px; border-radius: 8px; font-size: 12px; opacity: 0; visibility: hidden; box-shadow: 0 5px 20px #183e3520; transition: opacity .2s, transform .2s, visibility .2s; max-width: calc(100% - 40px); text-align: center; z-index: 50; }
.toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; border: 0; }
.noscript { position: fixed; inset: auto 0 0; background: #fbe2c8; color: #7a4528; font-size: 14px; padding: 18px; text-align: center; z-index: 100; }

@media (min-width: 1600px) {
  .main-content { padding-inline: 60px; }
  .workspace-grid { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(400px, .9fr); }
  .form-card { padding: 28px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 195px; padding-inline: 15px; }
  .brand { margin-left: 10px; }
  .main-content { margin-left: 195px; padding-inline: 28px; }
  .workspace-grid { gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(305px, .95fr); }
  .form-card { padding: 19px; }
  .page-header { gap: 14px; }
  .header-actions { gap: 7px; }
  .header-actions .button { padding-inline: 12px; font-size: 10px; }
  .toast { left: calc(50% + 97.5px); }
}
@media (max-width: 1000px) {
  .sidebar { width: 76px; padding-inline: 11px; align-items: center; }
  .brand { margin: 0 0 55px; }
  .brand > span:last-child, .sidebar-label, .nav-item > span, .sidebar-bottom { display: none; }
  .navigation { width: 100%; }
  .nav-item { padding: 13px; justify-content: center; }
  .nav-item .icon { width: 21px; height: 21px; }
  .main-content { margin-left: 76px; padding-inline: 26px; }
  .workspace-grid { gap: 21px; grid-template-columns: minmax(0, 1fr) minmax(310px, .95fr); }
  .toast { left: calc(50% + 38px); }
  .section-heading p { font-size: 8px; }
}
@media (max-width: 800px) {
  .main-content { padding-inline: 22px; }
  .topbar { height: 65px; }
  .page-header { align-items: flex-start; flex-wrap: wrap; padding-block: 26px; gap: 17px; }
  .header-actions { padding: 0; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-column { grid-row: 1; }
  .preview-sticky { position: static; }
  .preview-stage { max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
  .preview-panel { max-width: 100%; }
  .print-tip { margin-top: 12px; padding: 14px; }
  .print-tip p { margin-bottom: 5px; }
  .privacy-note { padding-top: 12px; }
  .editor-column { margin-top: 8px; }
  .form-card { padding: 23px; }
  .field-grid { gap: 19px; }
  .section-heading p { font-size: 9px; }
  .app-footer { margin-top: 25px; }
}
@media (max-width: 560px) {
  .sidebar { position: relative; width: 100%; height: 64px; padding: 13px 20px; flex-direction: row; justify-content: space-between; }
  .brand { font-size: 28px; gap: 6px; margin: 0; }
  .brand > span:last-child { display: block; }
  .brand-icon { width: 25px; height: 31px; }
  .brand-icon .icon { width: 27px; height: 27px; }
  .navigation { display: flex; width: auto; gap: 5px; }
  .nav-item { width: 34px; height: 34px; min-height: 0; padding: 7px; }
  .nav-item .icon { width: 19px; height: 19px; }
  .main-content { margin-left: 0; padding-inline: 18px; }
  .topbar { height: 46px; }
  .topbar-right { gap: 9px; }
  #today { display: none; }
  .user-avatar { width: 26px; height: 26px; }
  .page-header { padding-block: 24px; gap: 18px; }
  h1 { font-size: 30px; }
  .eyebrow { font-size: 7px; }
  .header-actions { width: 100%; gap: 10px; }
  .header-actions .button { flex: 1; padding-block: 12px; font-size: 11px; }
  .editor-heading, .preview-heading { margin-bottom: 12px; }
  .form-card { padding: 20px 18px; border-radius: 9px; }
  .field-grid { gap: 16px 13px; }
  input:not([type="checkbox"]), textarea, select, input[type="datetime-local"] { font-size: 16px; }
  .field > label, .field-label, .label-row > label { font-size: 11px; }
  input:not([type="checkbox"]) { height: 43px; }
  .field-hint { font-size: 10px; }
  .section-heading { gap: 9px; }
  .section-heading h3 { font-size: 13px; }
  .section-heading p { font-size: 9px; }
  .save-status { font-size: 8px; }
  .section-number { font-size: 9px; }
  .example-note { font-size: 10px; }
  .preview-toolbar { padding-inline: 13px; }
  .preview-bottom { padding-inline: 12px; }
  .preview-bottom > span { font-size: 8px; }
  .privacy-note { font-size: 9px; }
  .toast { left: 50%; width: max-content; }
  .app-footer { align-items: flex-start; }
  .app-footer > span:last-child { display: none; }
  .modal { padding: 23px 20px; }
  .modal-heading h2 { font-size: 21px; }
  .settings-content .field-grid { gap: 12px; }
  .settings-content select { font-size: 13px; }
  .modal-actions .button { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

@media print {
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; width: var(--paper-width); min-width: 0; height: auto; }
  body > :not(#print-root) { display: none !important; }
  #print-root { display: block !important; position: static !important; visibility: visible !important; width: var(--paper-width); margin: 0; padding: 0; }
  #print-root .receipt { --receipt-scale: 1; width: var(--paper-width); margin: 0; border: 0; box-shadow: none; color: #000; background: #fff; }
  #print-root .receipt::after { display: none; }
  .receipt-header, .receipt-row, .receipt-meta, .receipt-payment { break-inside: avoid; }
}
