/* config/fonts-build.ts 가 만든 파일이에요(손으로 고치지 말고 npm run fonts) */

@font-face {
  font-family: "nbbang sans";
  src: url(/fonts/sans-more-Cf-jEqsm.woff2) format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+3131-3163, U+AC00-D7A3;
}

@font-face {
  font-family: "nbbang sans";
  src: url(/fonts/sans-site-D14ME9cE.woff2) format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+20-7E, U+A0, U+A9, U+B0, U+B7, U+D7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+20A9, U+2190, U+2192, U+2212, U+2514, U+2713, U+300C-300F, U+3131-3132, U+3134, U+3137-3139, U+3141-3143, U+3145-314E, U+AC00-AC01, U+AC04, U+AC12, U+AC19, U+AC1C, U+AC70, U+AC74, U+AC83, U+AC8C, U+ACA8, U+ACB0, U+ACC4, U+ACE0, U+ACE8, U+ACF5, U+ACFC, U+AD00, U+AD6C, U+ADE0, U+ADF8, U+AE00, U+AE08, U+AE30, U+AE4C, U+AE5D, U+AECF, U+AF34, U+AF49, U+AFE8, U+B044, U+B05D, U+B098, U+B09C, U+B0A8, U+B0B4, U+B0B8, U+B0BC, U+B0C4, U+B0C8, U+B123, U+B141, U+B144, U+B204, U+B20C, U+B220, U+B294, U+B298, U+B2C8, U+B2D8, U+B2E4, U+B2E8, U+B2EB, U+B2F4, U+B300, U+B354, U+B358, U+B35C, U+B370, U+B3C4, U+B3C8, U+B3CC, U+B3FC, U+B418, U+B41C, U+B428, U+B450, U+B454, U+B480, U+B4A4, U+B4DC-B4DD, U+B4E4, U+B4F1, U+B610-B611, U+B77C, U+B78C, U+B791, U+B798, U+B7EC, U+B80C, U+B824-B825, U+B838, U+B840, U+B85C-B85D, U+B8CC, U+B974, U+B978, U+B97C, U+B984, U+B9AC, U+B9B4, U+B9BC, U+B9C1, U+B9C8-B9C9, U+B9CC, U+B9CE, U+B9DB, U+B9E8, U+BA38, U+BA3C, U+BA54, U+BA64, U+BA74, U+BA85, U+BAA8-BAA9, U+BABB, U+BB38, U+BB50, U+BBF8, U+BBFC, U+BC14-BC15, U+BC1B, U+BC29, U+BC30-BC31, U+BC84, U+BC88, U+BCC4, U+BCF4-BCF5, U+BCFC, U+BD10, U+BD80, U+BD84, U+BD99, U+BE0C, U+BE44, U+BE48, U+BE75, U+BE7C, U+BE90, U+BF51, U+C0AC, U+C0B0, U+C0B4, U+C0C1, U+C0C8, U+C11C, U+C120, U+C124, U+C131, U+C138, U+C168, U+C18C-C18D, U+C1A1, U+C218-C219, U+C220, U+C27C, U+C2A4, U+C2DC-C2DD, U+C37C, U+C4F0, U+C4F4, U+C529, U+C544, U+C548, U+C54A, U+C558, U+C561, U+C57D, U+C5B4-C5B5, U+C5BC, U+C5C6, U+C5C8, U+C5D0, U+C5D4, U+C5EC, U+C5F0, U+C5F4, U+C600-C601, U+C608, U+C624, U+C62C, U+C640, U+C644, U+C678, U+C67C, U+C694, U+C6A9, U+C6B0, U+C6B4, U+C6CC, U+C6D0, U+C6D4, U+C6E0, U+C704, U+C720, U+C73C, U+C740, U+C744, U+C74C, U+C751, U+C758, U+C774, U+C778, U+C77C-C77D, U+C784, U+C788, U+C790-C791, U+C794, U+C798, U+C7A5, U+C800-C801, U+C804, U+C811, U+C815, U+C81C-C81D, U+C870, U+C88C, U+C8FC, U+C904, U+C911, U+C918, U+C99D, U+C9C0-C9C1, U+C9D1, U+C9F0, U+C9F8, U+CABD, U+CC28, U+CC38, U+CC3C-CC3E, U+CC44, U+CC9C, U+CCD0, U+CD1D, U+CD5C, U+CD94, U+CD9C, U+CE58, U+CE5C, U+CE68, U+CE74, U+CE78, U+CEE4, U+D06C, U+D0DD, U+D130, U+D1A1, U+D2B8, U+D398, U+D3B8, U+D3EC, U+D45C, U+D488, U+D504, U+D53C, U+D558, U+D55C, U+D560, U+D568-D569, U+D574, U+D588-D589, U+D604, U+D615, U+D655, U+D68C, U+D69F, U+D788, U+FF05, U+FF0C, U+FF5E, U+FFE6;
}

@font-face {
  font-family: "nbbang hand";
  src: url(/fonts/hand-site-DiEk6fVN.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
/* 엔빵 — "영수증" 컨셉 (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: "nbbang hand", "nbbang sans", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; /* 손글씨를 받기 전엔 본문 글꼴로(cursive 는 '?'·숫자만 기울어진 글꼴로 나왔어요) */
  --sans: "nbbang sans", "Pretendard Variable", Pretendard, -apple-system, "Noto Sans KR", "Segoe UI", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "nbbang sans", 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; word-break: keep-all; overflow-wrap: break-word; }
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; min-height: 44px; 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: 44px; 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(--ink2); 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); }
.save-warn { margin: -6px 0 18px; padding: 10px 14px; border: 1.5px solid var(--red); border-radius: 8px; background: #fff3ea; color: var(--ink); font-size: 14px; line-height: 1.55; }
.save-warn b { color: var(--red); }
.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(--ink2); }
.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 { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink2); display: grid; place-items: center; cursor: pointer; }
/* 빼기·만 단추는 보이는 크기 그대로, 누르는 자리만 44px */
.chip button::before, .unit-btn::before { content: ""; position: absolute; inset: -4px; }
.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 { position: relative; 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: 44px; padding: 4px 13px; border: 1.5px dashed #bdb2a0; border-radius: 30px 24px 28px 22px / 22px 28px 24px 30px; background: transparent; color: var(--ink2); 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: 44px; 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(--ink2); 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); }
/* 지출이 쌓이면 제목 밑에 건수·합계와 새 줄 단추 — 맨 아래 '지출 한 줄 추가'까지 한참 내려가지 않게 */
.exp-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 8px; font-size: 13px; color: var(--ink2); }
.exp-sum b { color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.exp-sum .ink-btn { flex: none; }
.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; }
/* 자판으로 '영수증 뽑기'를 누르면 포커스가 영수증으로 와요 — 어디 있는지 보이게 */
/* .receipt 에 그리면 톱니 끝단 mask·.feed 의 overflow:hidden 에 잘려 보이지 않았어요 → 영수증을 감싼 .feed 둘레에 */
.printer-col:focus-visible .feed { outline: 2px solid var(--mint-ink); outline-offset: 4px; }
.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); margin-bottom: 8px; } /* 합계 동그라미가 아래 '송금 단위' 줄 글자를 긋지 않게 */
.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; }
.r-more { display: block; width: 100%; min-height: 44px; margin: 4px 0 0; padding: 0; border: 0; border-top: 1.5px dashed #cfc6b6; background: none; font: 700 12.5px/1.3 var(--sans); color: var(--mint-ink); cursor: pointer; }
.r-more:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 2px; }
.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: var(--name-w, 22%); }
/* 숫자 칸 사이 틈 — 큰 금액에서 '40,000,000120,000,0…'처럼 붙어 읽혔어요. 끝자리가 잘리면 app.ts fitTable 이 글자를 줄여요 */
.r-table th + th, .r-table td + td { padding-left: 6px; }
.r-table td.neg { font-weight: 800; }
/* 가장 작은 글자로도 금액이 칸을 넘으면(수십억 원·좁은 휴대폰) 말줄임 대신 두 줄로 — 끝자리가 '…'로 사라지지 않게(app.ts fitTable) */
.r-table.wrap td + td { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.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; white-space: nowrap; }
.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: 44px; 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; }
/* 비어 있는 계좌 칸 밑: 보관함의 같은 이름 지난 계좌를 한 번에 */
.bank-fill { display: flex; align-items: center; gap: 6px; width: calc(100% - 72px); min-height: 44px; margin: 0 0 6px 72px; padding: 0 10px; border: 1.5px dashed var(--mint-ink); border-radius: 22px; background: rgba(20,184,166,.07); color: var(--ink); font: 700 13px var(--sans); text-align: left; cursor: pointer; }
.bank-fill .ic { flex: none; width: 13px; height: 13px; color: var(--mint-ink); }
.bank-fill span { flex: none; white-space: nowrap; }
.bank-fill .bf-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--ink2); }
.bank-fill:hover { border-style: solid; background: var(--mint-wash); }
.bank-fill:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 2px; }
.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; }
/* © 줄 링크: 높이 15px 이라 엄지로 누르기 어렵고, 좁은 폭에서 '글꼴 / 라이선스'로 꺾였어요 */
.foot-meta a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.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: 44px; }
.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.tall { height: min(640px, calc(100vh - 48px)); height: min(640px, calc(100dvh - 48px)); }
.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); word-break: keep-all; } /* 좁은 화면에선 줄을 바꿔 보관한 때까지 보여요 */
.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; }
.vi-main span i { font-style: normal; white-space: nowrap; } /* 좁은 화면에서 '오늘 / 19:14'처럼 끊기지 않게 덩어리째 줄을 바꿔요 */
.vi-main .vi-who { font-family: var(--sans); font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-find { display: block; margin: 0 0 4px; }
.vault-find .in::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: var(--ink2); -webkit-mask: url(/assets/i-x.svg) center / contain no-repeat; mask: url(/assets/i-x.svg) center / contain no-repeat; cursor: pointer; }
.vault-empty { padding: 18px 0 10px; color: var(--ink2); font-size: 14px; text-align: center; }
/* 알림은 보관함(61) 위에 떠야 보여요 */
.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: 70; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); }
.toast.has-act { display: flex; align-items: center; gap: 4px 12px; padding: 4px 6px 4px 16px; text-align: left; }
.toast.show.has-act { pointer-events: auto; }
/* 되돌린 뒤 '되돌렸어요'가 떠 있는 동안 같은 자리·크기로 누름을 받아 둬요(두 번째 누름이 밑의 단추로 새지 않게) */
.toast.show.catch { pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.toast-act { flex: none; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--mint); border-radius: 20px; background: none; color: var(--mint); font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; }
.toast-act:hover { background: var(--mint); color: var(--ink); }
.toast-act:focus-visible { outline: 2px solid var(--sheet); outline-offset: 2px; }
/* 지난 멤버 (참여자가 없을 때만) */
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.recent-lbl { font-size: 13px; font-weight: 700; color: var(--ink2); }
.recent-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.recent-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 0 14px 0 10px; border: 1.5px dashed var(--mint-ink); border-radius: 24px; background: rgba(20,184,166,.07); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.recent-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-btn .ic { width: 14px; height: 14px; color: var(--mint-ink); }
.recent-btn:hover { border-style: solid; background: var(--mint-wash); }
.recent-btn:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 2px; }

@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; }
  /* Tab 으로 옮긴 칸·단추가 아래 띠 밑에 숨지 않게(링크 복사·두 번째 지출의 같이 쓴 사람 등이 띠에 가렸어요) */
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* 가로로 돌린 휴대폰: 화면 높이가 390 남짓이라 아래 띠를 낮게 */
@media (max-width: 960px) and (max-height: 500px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .bottom-bar { padding: 6px 16px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-bar .ink-btn { min-height: 44px; font-size: 15px; }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}
/* 휴대폰에서 글자를 치는 동안(자판이 올라옴, app.ts syncKeyboard): 아래 띠는 숨기고 알림은 보이는 화면 맨 위로(자판 뒤·치는 칸 위를 피해서) */
@media (max-width: 960px) {
  html.kb { scroll-padding-bottom: 0; }
  html.kb .bottom-bar { display: none; }
  html.kb .toast { top: calc(var(--kb-top, 0px) + 12px); bottom: auto; }
}
@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; }
}
