/* 엔빵 — "영수증" 컨셉 (Jone Lab 작업 노트 스타일) */
:root {
  --paper: #f6f1e7; --sheet: #fffdf6; --thermal: #fffefa;
  --ink: #2a2622; --ink2: #6f675e; --ink3: #9c9387; --line: #d9d0c1; --rule: #e7dfd0;
  --mint: #14b8a6; --mint-ink: #0f766e; --mint-wash: rgba(20,184,166,.28);
  --red: #c2410c;
  --hand: "Nanum Pen Script", "Pretendard Variable", cursive;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Noto Sans KR", "Segoe UI", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Pretendard Variable", monospace;
  --wobble: 255px 12px 225px 12px / 12px 225px 12px 255px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper) var(--noise); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hand { font-family: var(--hand); font-weight: 400; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* 상단 */
nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.hero { position: relative; padding: 26px 0 30px; }
h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.03em; font-weight: 800; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl-mark { position: absolute; left: -4px; right: -6px; bottom: .02em; width: calc(100% + 10px); height: .42em; z-index: -1; }
.hl-mark path { fill: var(--mint); opacity: .45; mix-blend-mode: multiply; }
.lead { color: var(--ink2); font-size: 17px; margin: 0; max-width: 540px; }
.lead b { color: var(--ink); }
.scribble { position: absolute; right: 4%; top: 34px; margin: 0; font-family: var(--hand); font-size: 28px; color: var(--mint-ink); transform: rotate(-6deg); }
.scribble::after { content: ""; display: block; width: 70px; height: 36px; margin: -2px 0 0 40px; background: currentColor; -webkit-mask: url(/assets/arrow-down.svg) center / contain no-repeat; mask: url(/assets/arrow-down.svg) center / contain no-repeat; }

/* 손그림 버튼 */
.ink-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: var(--wobble); background: var(--sheet); color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: 2px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; -webkit-tap-highlight-color: transparent; }
.ink-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--ink); }
.ink-btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--ink); }
.ink-btn.mint { background: var(--mint); }
.ink-btn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.ink-btn.big { min-height: 52px; padding: 10px 22px; font-size: 17px; }
.ink-btn.done { background: #d7f5ef; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink3); cursor: pointer; }
.icon-btn:hover { color: var(--red); }

/* 책상 레이아웃 */
.desk { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 44px; align-items: start; padding: 6px 0 56px; }

/* 계산서 메모지 */
.pad { position: relative; background: var(--sheet) var(--noise); border-radius: 4px 4px 6px 6px; padding: 30px 26px 24px 54px; box-shadow: 0 1px 0 #e6dccb, 0 2px 0 #f0e8da, 0 3px 0 #e2d7c4, 0 18px 30px -22px rgba(70,50,30,.45);
  background-image: var(--noise), linear-gradient(90deg, transparent 38px, rgba(194,65,12,.28) 38px 39.5px, transparent 39.5px), repeating-linear-gradient(transparent 0 35px, var(--rule) 35px 36px); }
.tape { position: absolute; top: -12px; left: 50%; width: 120px; height: 28px; transform: translateX(-50%) rotate(-2deg); background: rgba(20,184,166,.22); border-left: 2px dashed rgba(255,255,255,.6); border-right: 2px dashed rgba(255,255,255,.6); }
.pad-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 18px; }
.pad-title { font-size: 38px; line-height: 1; }
.pad-no { font-family: var(--mono); font-size: 13px; color: var(--ink2); }
.pad-sec { margin-bottom: 22px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1.1; margin: 0 0 10px; }
.sec-title .num { width: 30px; height: 30px; display: grid; place-items: center; font-size: 22px; border: 2px solid var(--mint-ink); color: var(--mint-ink); border-radius: 50% 45% 55% 48% / 52% 50% 46% 50%; }
.line-field { display: block; margin-bottom: 14px; }
.lbl { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); }
.lbl small { font-weight: 500; color: var(--ink3); }
.in, select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 2px; font-size: 16px; background: transparent; border: 0; border-bottom: 2px solid #cfc5b4; border-radius: 0; outline: none; transition: border-color .12s; }
.in:focus, select:focus { border-bottom-color: var(--mint); background: rgba(20,184,166,.06); }
.in::placeholder { color: #b3a998; }
.in.bad { border-bottom-color: var(--red); }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer; background-image: url(/assets/caret.svg); background-repeat: no-repeat; background-position: right 4px center; background-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 14px; min-height: 40px; border: 1.5px solid var(--ink); border-radius: 30px 24px 28px 22px / 22px 28px 24px 30px; background: #fff; font-weight: 700; font-size: 15px; max-width: 100%; }
.chip:nth-child(3n+1) { transform: rotate(-1.2deg); } .chip:nth-child(3n+2) { transform: rotate(.8deg); }
.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink3); display: grid; place-items: center; cursor: pointer; }
.chip button:hover { color: var(--red); }
.chip button .ic { width: 14px; height: 14px; }
.add-row { display: flex; gap: 10px; align-items: flex-end; }
.add-row .in { flex: 1; }

/* 지출 한 줄 */
.exp { position: relative; padding: 12px 0 14px; border-top: 2px dashed #d6ccbb; }
.exp:first-child { border-top: 0; padding-top: 0; }
.exp-no { position: absolute; left: -40px; top: 18px; width: 30px; text-align: center; font-family: var(--hand); font-size: 22px; color: var(--red); }
.exp:first-child .exp-no { top: 6px; }
.exp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) auto; gap: 10px; align-items: start; }
.exp-top .in[data-f="desc"] { font-weight: 700; }
.amount-wrap { display: flex; align-items: flex-end; gap: 4px; }
.amount-wrap .in { flex: 1; min-width: 0; text-align: right; font-family: var(--mono); font-size: 17px; font-weight: 700; }
.unit-btn { flex: none; width: 36px; height: 36px; margin-bottom: 4px; border-radius: 50%; border: 1.5px solid var(--ink3); background: transparent; font-weight: 800; font-size: 13px; color: var(--ink2); cursor: pointer; }
.unit-btn:hover { border-color: var(--ink); color: var(--ink); }
.hint { font-family: var(--hand); font-size: 19px; line-height: 1.1; color: var(--mint-ink); margin-top: 2px; min-height: 1.1em; text-align: right; }
.hint.bad { color: var(--red); }
.exp-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-top: 8px; }
.exp-meta .k { font-size: 13px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.exp-meta select { max-width: 220px; min-height: 40px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.tg { position: relative; min-height: 40px; padding: 4px 13px; border: 1.5px dashed #bdb2a0; border-radius: 30px 24px 28px 22px / 22px 28px 24px 30px; background: transparent; color: var(--ink3); font-size: 14px; font-weight: 700; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg[aria-pressed="true"] { border: 1.5px solid var(--ink); color: var(--ink); background: linear-gradient(transparent 52%, var(--mint-wash) 52% 88%, transparent 88%); }
.tg.all { font-family: var(--hand); font-size: 20px; padding: 0 12px; }
.custom-toggle { border: 0; background: none; padding: 8px 0; min-height: 40px; font-family: var(--hand); font-size: 20px; color: var(--mint-ink); cursor: pointer; text-decoration: underline wavy rgba(15,118,110,.5); text-underline-offset: 4px; white-space: nowrap; }
.custom { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 14px; margin-top: 4px; }
.custom label { display: flex; align-items: flex-end; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.custom label span { flex: none; max-width: 64px; padding-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom .in { min-height: 40px; text-align: right; font-family: var(--mono); }
.note { font-size: 12.5px; color: var(--ink3); margin: 6px 0 0; }
.issue { margin: 6px 0 0; font-family: var(--hand); font-size: 19px; line-height: 1.2; color: var(--red); }
.add-exp { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 6px; border: 2px dashed #bdb2a0; border-radius: var(--wobble); background: transparent; color: var(--ink2); font-weight: 700; cursor: pointer; }
.add-exp:hover { border-color: var(--ink); color: var(--ink); }
.empty { text-align: center; padding: 4px 0 16px; }
.empty img { width: 190px; height: auto; display: block; margin: 0 auto 4px; }
.empty p { color: var(--ink2); font-size: 14px; margin: 0 0 14px; }
.empty .hand { font-size: 26px; color: var(--ink); }
.pad-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 16px; }
.round { display: flex; align-items: center; gap: 10px; }
.round .hand { font-size: 22px; white-space: nowrap; }
.round select { width: auto; font-weight: 700; }

/* 프린터 + 영수증 */
.printer-col { position: relative; padding-top: 4px; outline: none; scroll-margin-top: 12px; }
.printer { position: relative; z-index: 2; height: 42px; border-radius: 14px 14px 10px 10px; background: var(--ink); box-shadow: inset 0 -3px 0 #000, 0 6px 12px -6px rgba(0,0,0,.4); }
.printer .slot { position: absolute; left: 14px; right: 14px; bottom: 9px; height: 6px; border-radius: 3px; background: #0d0b0a; }
.printer .led { position: absolute; right: 18px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: #4a443d; }
.printer .led.on { background: var(--mint); }
.feed { position: relative; z-index: 1; margin: -14px 22px 0; padding-top: 14px; overflow: hidden; filter: drop-shadow(0 6px 6px rgba(70,50,30,.18)); }
.receipt { position: relative; padding: 22px 20px 34px; background: var(--thermal) var(--noise); font-family: var(--mono); font-size: 14px; line-height: 1.55; color: #34302b;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%; }
.r-center { text-align: center; }
.r-logo { font-family: var(--sans); font-weight: 800; font-size: 22px; letter-spacing: .3em; margin-right: -.3em; }
.r-sub { font-size: 12px; color: var(--ink2); letter-spacing: .08em; }
.r-title { font-family: var(--sans); font-weight: 800; font-size: 17px; margin: 12px 0 0; overflow-wrap: anywhere; }
.dots { height: 4px; margin: 12px 0; background: radial-gradient(circle, #a49a8b 1.1px, transparent 1.6px) 0 50% / 8px 4px repeat-x; }
.dbl { height: 6px; margin: 12px 0; border-top: 1.5px solid #6f675e; border-bottom: 1.5px solid #6f675e; }
.rl { display: flex; align-items: baseline; gap: 10px; }
.rl .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl .r { flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rl .m { flex: none; color: var(--ink2); font-size: 12px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl.small { font-size: 12px; color: var(--ink2); }
.rl.total { font-size: 18px; font-weight: 800; font-family: var(--sans); }
.rl.total .r { font-family: var(--mono); position: relative; }
.r-head { font-family: var(--sans); font-weight: 800; font-size: 13px; letter-spacing: .12em; margin: 0 0 6px; }
.r-sharers { font-size: 11.5px; color: var(--ink3); margin: -2px 0 4px; }
.circle-mark { position: absolute; left: -12px; top: -8px; width: calc(100% + 24px); height: calc(100% + 16px); pointer-events: none; overflow: visible; }
.r-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.r-table th, .r-table td { padding: 3px 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-table th { font-family: var(--sans); font-size: 11px; color: var(--ink2); font-weight: 700; border-bottom: 1px dashed #b9b0a2; }
.r-table th:first-child, .r-table td:first-child { text-align: left; width: 22%; }
.r-table td.neg { font-weight: 800; }
.r-table td .adj { display: block; font-size: 10px; color: var(--ink3); font-weight: 400; }
.tr { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #d2c9ba; }
.sent-btn { flex: none; width: 44px; height: 44px; margin-left: -8px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; color: transparent; }
.sent-btn::before { content: ""; grid-area: 1 / 1; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 5px 7px 5px 6px; background: #fff; }
.sent-btn .ic { grid-area: 1 / 1; position: relative; width: 16px; height: 16px; }
.sent-btn[aria-pressed="true"]::before { background: var(--mint); }
.sent-btn[aria-pressed="true"] { color: var(--ink); }
.sent-btn:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: -4px; border-radius: 8px; }
.tr.is-sent .tr-who, .tr.is-sent .tr-bank { color: var(--ink3); }
.tr.is-sent .tr-amt { color: var(--ink3); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(15,118,110,.7); }
.r-sent { margin-left: 10px; padding: 1px 8px; border-radius: 99px; background: var(--mint-wash); color: var(--mint-ink); font-size: 11.5px; letter-spacing: 0; }
.tr:last-child { border-bottom: 0; }
.tr-main { flex: 1; min-width: 0; }
.tr-who { display: flex; align-items: center; gap: 6px; font-family: var(--sans); font-weight: 700; min-width: 0; font-size: 15px; }
.tr-who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42%; }
.tr-who .ic { width: 16px; height: 16px; color: var(--mint-ink); }
.tr-amt { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-bank { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: var(--wobble); background: transparent; font-family: var(--sans); font-weight: 700; font-size: 13px; cursor: pointer; }
.copy-btn .ic { width: 15px; height: 15px; }
.copy-btn:hover, .copy-btn.done { background: var(--mint-wash); }
.r-note { font-size: 11.5px; color: var(--ink2); margin: 8px 0 0; line-height: 1.5; font-family: var(--sans); }
.r-done { text-align: center; font-family: var(--sans); font-weight: 700; padding: 6px 0; }
.r-warn { margin: -2px 0 6px; color: var(--red); }
.bank-row { display: flex; align-items: center; gap: 8px; }
.bank-row > span { flex: 0 0 64px; font-family: var(--sans); font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-row .in { flex: 1; min-height: 40px; font-size: 14px; border-bottom: 1.5px dotted #a49a8b; font-family: var(--sans); }
.bank-row .ro { flex: 1; font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; padding: 4px 0; }
.barcode { display: block; width: 72%; height: 44px; margin: 16px auto 4px; }
.thanks { font-size: 12px; color: var(--ink2); }
.thanks .hand { font-size: 22px; color: var(--ink); display: block; line-height: 1.2; }
.placeholder { padding: 26px 6px 10px; text-align: center; color: var(--ink2); font-family: var(--sans); font-size: 14px; }
.placeholder .hand { display: block; font-size: 26px; color: var(--ink); margin-bottom: 4px; }
.stamp-anchor { position: relative; height: 0; }
.stamp { position: absolute; right: 2px; top: -96px; width: 156px; height: 86px; transform: rotate(-13deg); pointer-events: none; mix-blend-mode: multiply; opacity: .9; }
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.receipt-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 22px 0; }
.receipt-actions .ink-btn { padding: 8px 6px; font-size: 14px; }

/* 공유받은 영수증 */
.shared-note { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 auto 26px; max-width: 640px; padding: 14px 18px; background: #fff7c7; box-shadow: 0 10px 18px -14px rgba(70,50,30,.5); transform: rotate(-.6deg); }
.shared-note p { margin: 0; font-size: 13px; color: var(--ink2); }
.shared-note .hand { font-size: 26px; color: var(--ink); line-height: 1.1; }
body.view .desk { grid-template-columns: minmax(0, 460px); justify-content: center; }
body.view .editor, body.view .pad, body.view #btn-reset, body.view .scribble { display: none; }

footer { border-top: 2px dashed var(--line); padding: 26px 0 44px; color: var(--ink2); font-size: 13px; }
footer p { margin: 0 0 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 32px; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-links .ic { width: 16px; height: 16px; }

.bottom-bar { display: none; }

/* 보관함 */
html.lock { overflow: hidden; }
.vault-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(42,38,34,.38); }
.vault { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: var(--sheet) var(--noise); padding: 18px 20px 14px; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 4px 6px 0 var(--ink); }
.vault-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.vault-head h2 { margin: 0; font-size: 34px; line-height: 1; }
.vault-head h2 small { font-family: var(--mono); font-size: 13px; color: var(--ink2); margin-left: 6px; }
.vault-note { margin: 10px 0 6px; font-size: 13px; color: var(--ink2); }
.vault-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.vault-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1.5px dashed #d6ccbb; }
.vault-item:last-child { border-bottom: 0; }
.vi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vi-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-main span { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-item.now .vi-main b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 2px; }
.vi-now { flex: none; font-size: 12px; font-weight: 700; color: var(--mint-ink); padding: 0 6px; }
.vault-empty { padding: 18px 0 10px; color: var(--ink2); font-size: 14px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px) rotate(-1deg); opacity: 0; pointer-events: none; background: var(--ink); color: var(--sheet); font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: var(--wobble); transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); }

@media (max-width: 960px) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .printer-col { max-width: 520px; width: 100%; margin: 0 auto; }
  .scribble { display: none; }
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .bottom-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper) var(--noise); border-top: 2px solid var(--ink); }
  .bottom-bar .ink-btn { flex: 1; min-height: 48px; font-size: 16px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .pad-foot .big { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav-actions .ink-btn { padding: 6px 10px; }
  .brand span { font-size: 18px; }
  .hero { padding: 16px 0 24px; }
  .lead { font-size: 15.5px; }
  .pad { padding: 26px 16px 20px 40px; background-image: var(--noise), linear-gradient(90deg, transparent 28px, rgba(194,65,12,.28) 28px 29.5px, transparent 29.5px), repeating-linear-gradient(transparent 0 35px, var(--rule) 35px 36px); }
  .exp-no { left: -36px; width: 26px; font-size: 20px; }
  .exp-top { grid-template-columns: minmax(0, 1fr) auto; }
  .exp-top .amount-cell { grid-column: 1 / -1; grid-row: 2; }
  .exp-meta select { max-width: none; }
  .feed { margin: -14px 10px 0; }
  .printer-col .receipt-actions { margin: 20px 0 0; grid-template-columns: minmax(0, 1fr); }
  .receipt { padding: 20px 14px 32px; font-size: 13.5px; }
  .stamp { width: 132px; height: 74px; right: 0; top: -84px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
